diff --git a/API_VERSION b/API_VERSION index 012d1278d..7fa3a2d3c 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -0de52cdca31a7c51c6d11187fc88ab23ea3a1c5b \ No newline at end of file +577fcb57736b925392ea563c0284df9002c75ac9 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c6ee373b9..edaae7f45 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2031 \ No newline at end of file +v2099 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index 995c6c73e..45efe0b9f 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -682,6 +682,20 @@ class RegistrationDate(StripeObject): The four-digit year of registration. """ + class RepresentativeDeclaration(StripeObject): + date: Optional[int] + """ + The Unix timestamp marking when the representative declaration attestation was made. + """ + ip: Optional[str] + """ + The IP address from which the representative declaration attestation was made. + """ + user_agent: Optional[str] + """ + The user-agent string from the browser where the representative declaration attestation was made. + """ + class Verification(StripeObject): class Document(StripeObject): back: Optional[ExpandableField["File"]] @@ -767,6 +781,10 @@ class Document(StripeObject): The company's phone number (used for verification). """ registration_date: Optional[RegistrationDate] + representative_declaration: Optional[RepresentativeDeclaration] + """ + This hash is used to attest that the representative is authorized to act as the representative of their legal entity. + """ structure: Optional[ Literal[ "free_zone_establishment", @@ -820,6 +838,7 @@ class Document(StripeObject): "directorship_declaration": DirectorshipDeclaration, "ownership_declaration": OwnershipDeclaration, "registration_date": RegistrationDate, + "representative_declaration": RepresentativeDeclaration, "verification": Verification, } @@ -950,6 +969,7 @@ class Error(StripeObject): "invalid_url_website_other", "invalid_value_other", "unsupported_business_type", + "verification_data_not_found", "verification_directors_mismatch", "verification_document_address_mismatch", "verification_document_address_missing", @@ -1131,6 +1151,7 @@ class Error(StripeObject): "invalid_url_website_other", "invalid_value_other", "unsupported_business_type", + "verification_data_not_found", "verification_directors_mismatch", "verification_document_address_mismatch", "verification_document_address_missing", diff --git a/stripe/_bank_account.py b/stripe/_bank_account.py index 068e8cccd..4a2c291df 100644 --- a/stripe/_bank_account.py +++ b/stripe/_bank_account.py @@ -83,6 +83,7 @@ class Error(StripeObject): "invalid_url_website_other", "invalid_value_other", "unsupported_business_type", + "verification_data_not_found", "verification_directors_mismatch", "verification_document_address_mismatch", "verification_document_address_missing", @@ -214,6 +215,7 @@ class Error(StripeObject): "invalid_url_website_other", "invalid_value_other", "unsupported_business_type", + "verification_data_not_found", "verification_directors_mismatch", "verification_document_address_mismatch", "verification_document_address_missing", diff --git a/stripe/_capability.py b/stripe/_capability.py index 8e244eefd..352e2aaa9 100644 --- a/stripe/_capability.py +++ b/stripe/_capability.py @@ -75,6 +75,7 @@ class Error(StripeObject): "invalid_url_website_other", "invalid_value_other", "unsupported_business_type", + "verification_data_not_found", "verification_directors_mismatch", "verification_document_address_mismatch", "verification_document_address_missing", @@ -245,6 +246,7 @@ class Error(StripeObject): "invalid_url_website_other", "invalid_value_other", "unsupported_business_type", + "verification_data_not_found", "verification_directors_mismatch", "verification_document_address_mismatch", "verification_document_address_missing", diff --git a/stripe/_charge.py b/stripe/_charge.py index f6c9757c8..a71352ebd 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -1119,7 +1119,7 @@ class Crypto(StripeObject): """ The wallet address of the customer. """ - network: Optional[Literal["base", "ethereum", "polygon"]] + network: Optional[Literal["base", "ethereum", "polygon", "solana"]] """ The blockchain network that the transaction was sent on. """ @@ -1882,7 +1882,10 @@ class Qris(StripeObject): pass class Rechnung(StripeObject): - pass + payment_portal_url: Optional[str] + """ + Payment portal URL. + """ class RevolutPay(StripeObject): class Funding(StripeObject): diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 8ae96dd7f..a9186cff8 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -1566,6 +1566,7 @@ class Zip(StripeObject): "card_present", "cashapp", "crypto", + "custom", "customer_balance", "eps", "fpx", diff --git a/stripe/_credit_note.py b/stripe/_credit_note.py index b4b7bf640..631acc50b 100644 --- a/stripe/_credit_note.py +++ b/stripe/_credit_note.py @@ -88,14 +88,33 @@ class PretaxCreditAmount(StripeObject): """ class Refund(StripeObject): + class PaymentRecordRefund(StripeObject): + payment_record: str + """ + ID of the payment record. + """ + refund_group: str + """ + ID of the refund group. + """ + amount_refunded: int """ Amount of the refund that applies to this credit note, in cents (or local equivalent). """ + payment_record_refund: Optional[PaymentRecordRefund] + """ + The PaymentRecord refund details associated with this credit note refund. + """ refund: ExpandableField["RefundResource"] """ ID of the refund. """ + type: Optional[Literal["payment_record_refund", "refund"]] + """ + Type of the refund, one of `refund` or `payment_record_refund`. + """ + _inner_class_types = {"payment_record_refund": PaymentRecordRefund} class ShippingCost(StripeObject): class Tax(StripeObject): diff --git a/stripe/_customer.py b/stripe/_customer.py index 38f213be8..435766419 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -281,6 +281,10 @@ class Location(StripeObject): """ The identified tax location of the customer. """ + provider: Literal["anrok", "avalara", "sphere", "stripe"] + """ + The tax calculation provider used for location resolution. Defaults to `stripe` when not using a [third-party provider](https://docs.stripe.com/tax/third-party-apps). + """ _inner_class_types = {"location": Location} address: Optional[Address] diff --git a/stripe/_customer_session.py b/stripe/_customer_session.py index 79e2e1891..245e82af9 100644 --- a/stripe/_customer_session.py +++ b/stripe/_customer_session.py @@ -32,6 +32,80 @@ class BuyButton(StripeObject): Whether the buy button is enabled. """ + class CustomerSheet(StripeObject): + class Features(StripeObject): + payment_method_allow_redisplay_filters: Optional[ + List[Literal["always", "limited", "unspecified"]] + ] + """ + A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the customer sheet displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + + If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + """ + payment_method_remove: Optional[Literal["disabled", "enabled"]] + """ + Controls whether the customer sheet displays the option to remove a saved payment method." + + Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + """ + + enabled: bool + """ + Whether the customer sheet is enabled. + """ + features: Optional[Features] + """ + This hash defines whether the customer sheet supports certain features. + """ + _inner_class_types = {"features": Features} + + class MobilePaymentElement(StripeObject): + class Features(StripeObject): + payment_method_allow_redisplay_filters: Optional[ + List[Literal["always", "limited", "unspecified"]] + ] + """ + A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the mobile payment element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + + If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + """ + payment_method_redisplay: Optional[ + Literal["disabled", "enabled"] + ] + """ + Controls whether or not the mobile payment element shows saved payment methods. + """ + payment_method_remove: Optional[Literal["disabled", "enabled"]] + """ + Controls whether the mobile payment element displays the option to remove a saved payment method." + + Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + """ + payment_method_save: Optional[Literal["disabled", "enabled"]] + """ + Controls whether the mobile payment element displays a checkbox offering to save a new payment method. + + If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + """ + payment_method_save_allow_redisplay_override: Optional[ + Literal["always", "limited", "unspecified"] + ] + """ + Allows overriding the value of allow_override when saving a new payment method when payment_method_save is set to disabled. Use values: "always", "limited", or "unspecified". + + If not specified, defaults to `nil` (no override value). + """ + + enabled: bool + """ + Whether the mobile payment element is enabled. + """ + features: Optional[Features] + """ + This hash defines whether the mobile payment element supports certain features. + """ + _inner_class_types = {"features": Features} + class PaymentElement(StripeObject): class Features(StripeObject): payment_method_allow_redisplay_filters: List[ @@ -87,10 +161,43 @@ class PricingTable(StripeObject): Whether the pricing table is enabled. """ + class TaxIdElement(StripeObject): + class Features(StripeObject): + tax_id_redisplay: Literal["disabled", "enabled"] + """ + Controls whether the Tax ID Element displays saved tax IDs for the customer. This parameter defaults to `disabled`. + + When enabled, the Tax ID Element will show existing tax IDs associated with the customer, allowing them to select from previously saved tax identification numbers. + """ + tax_id_save: Literal["disabled", "enabled"] + """ + Controls whether the Tax ID Element allows merchants to save new tax IDs for their customer. This parameter defaults to `disabled`. + + When enabled, customers can enter and save new tax identification numbers during the payment flow, which will be stored securely and associated with their customer object for future use. + """ + + enabled: bool + """ + Whether the Tax ID Element is enabled. + """ + features: Optional[Features] + """ + This hash defines whether the Tax ID Element supports certain features. + """ + _inner_class_types = {"features": Features} + buy_button: BuyButton """ This hash contains whether the buy button is enabled. """ + customer_sheet: CustomerSheet + """ + This hash contains whether the customer sheet is enabled and the features it supports. + """ + mobile_payment_element: MobilePaymentElement + """ + This hash contains whether the mobile payment element is enabled and the features it supports. + """ payment_element: PaymentElement """ This hash contains whether the Payment Element is enabled and the features it supports. @@ -99,10 +206,17 @@ class PricingTable(StripeObject): """ This hash contains whether the pricing table is enabled. """ + tax_id_element: Optional[TaxIdElement] + """ + This hash contains whether the Tax ID Element is enabled and the features it supports. + """ _inner_class_types = { "buy_button": BuyButton, + "customer_sheet": CustomerSheet, + "mobile_payment_element": MobilePaymentElement, "payment_element": PaymentElement, "pricing_table": PricingTable, + "tax_id_element": TaxIdElement, } client_secret: str diff --git a/stripe/_file.py b/stripe/_file.py index c20c2b016..78a817632 100644 --- a/stripe/_file.py +++ b/stripe/_file.py @@ -63,6 +63,7 @@ class File(CreateableAPIResource["File"], ListableAPIResource["File"]): "identity_document_downloadable", "issuing_regulatory_reporting", "pci_document", + "platform_terms_of_service", "selfie", "sigma_scheduled_query", "tax_document_user_upload", diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 178dad5ca..b1d6a62f1 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -556,6 +556,7 @@ class LastFinalizationError(StripeObject): "payment_intent_mandate_invalid", "payment_intent_payment_attempt_expired", "payment_intent_payment_attempt_failed", + "payment_intent_rate_limit_exceeded", "payment_intent_unexpected_state", "payment_method_bank_account_already_verified", "payment_method_bank_account_blocked", diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 6187e36d1..2163c01b1 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -780,7 +780,7 @@ class Crypto(StripeObject): """ The wallet address of the customer. """ - network: Optional[Literal["base", "ethereum", "polygon"]] + network: Optional[Literal["base", "ethereum", "polygon", "solana"]] """ The blockchain network that the transaction was sent on. """ @@ -1553,7 +1553,10 @@ class Qris(StripeObject): pass class Rechnung(StripeObject): - pass + payment_portal_url: Optional[str] + """ + Payment portal URL. + """ class RevolutPay(StripeObject): class Funding(StripeObject): diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index d57e0a36f..fd2219b5d 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -293,6 +293,7 @@ class LastPaymentError(StripeObject): "payment_intent_mandate_invalid", "payment_intent_payment_attempt_expired", "payment_intent_payment_attempt_failed", + "payment_intent_rate_limit_exceeded", "payment_intent_unexpected_state", "payment_method_bank_account_already_verified", "payment_method_bank_account_blocked", diff --git a/stripe/_payment_intent_amount_details_line_item.py b/stripe/_payment_intent_amount_details_line_item.py index 31b6098f6..bb6f12af1 100644 --- a/stripe/_payment_intent_amount_details_line_item.py +++ b/stripe/_payment_intent_amount_details_line_item.py @@ -20,6 +20,8 @@ class CardPresent(StripeObject): class Klarna(StripeObject): image_url: Optional[str] product_url: Optional[str] + reference: Optional[str] + subscription_reference: Optional[str] class Paypal(StripeObject): category: Optional[ diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index 84c174ad6..c4eb91be0 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -323,6 +323,31 @@ class RenderingOptions(StripeObject): """ _inner_class_types = {"invoice_data": InvoiceData} + class NameCollection(StripeObject): + class Business(StripeObject): + enabled: bool + """ + Indicates whether business name collection is enabled for the payment link. + """ + optional: bool + """ + Whether the customer is required to complete the field before checking out. Defaults to `false`. + """ + + class Individual(StripeObject): + enabled: bool + """ + Indicates whether individual name collection is enabled for the payment link. + """ + optional: bool + """ + Whether the customer is required to complete the field before checking out. Defaults to `false`. + """ + + business: Optional[Business] + individual: Optional[Individual] + _inner_class_types = {"business": Business, "individual": Individual} + class OptionalItem(StripeObject): class AdjustableQuantity(StripeObject): enabled: bool @@ -788,6 +813,7 @@ class TransferData(StripeObject): """ Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. """ + name_collection: Optional[NameCollection] object: Literal["payment_link"] """ String representing the object's type. Objects of the same type share the same value. @@ -1141,6 +1167,7 @@ async def retrieve_async( "custom_fields": CustomField, "custom_text": CustomText, "invoice_creation": InvoiceCreation, + "name_collection": NameCollection, "optional_items": OptionalItem, "payment_intent_data": PaymentIntentData, "phone_number_collection": PhoneNumberCollection, diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index effcdd387..62a02a862 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -807,6 +807,31 @@ class Cashapp(StripeObject): class Crypto(StripeObject): pass + class Custom(StripeObject): + class Logo(StripeObject): + content_type: Optional[str] + """ + Content type of the Dashboard-only CustomPaymentMethodType logo. + """ + url: str + """ + URL of the Dashboard-only CustomPaymentMethodType logo. + """ + + display_name: Optional[str] + """ + Display name of the Dashboard-only CustomPaymentMethodType. + """ + logo: Optional[Logo] + """ + Contains information about the Dashboard-only CustomPaymentMethodType logo. + """ + type: str + """ + ID of the Dashboard-only CustomPaymentMethodType. Not expandable. + """ + _inner_class_types = {"logo": Logo} + class CustomerBalance(StripeObject): pass @@ -1459,6 +1484,7 @@ class Zip(StripeObject): Time at which the object was created. Measured in seconds since the Unix epoch. """ crypto: Optional[Crypto] + custom: Optional[Custom] customer: Optional[ExpandableField["Customer"]] """ The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. @@ -1545,6 +1571,7 @@ class Zip(StripeObject): "card_present", "cashapp", "crypto", + "custom", "customer_balance", "eps", "fpx", @@ -2062,6 +2089,7 @@ async def retrieve_async( "card_present": CardPresent, "cashapp": Cashapp, "crypto": Crypto, + "custom": Custom, "customer_balance": CustomerBalance, "eps": Eps, "fpx": Fpx, diff --git a/stripe/_payment_method_configuration.py b/stripe/_payment_method_configuration.py index 5435dfd4e..f7f820a61 100644 --- a/stripe/_payment_method_configuration.py +++ b/stripe/_payment_method_configuration.py @@ -402,6 +402,28 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} + class Crypto(StripeObject): + class DisplayPreference(StripeObject): + overridable: Optional[bool] + """ + For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + """ + preference: Literal["none", "off", "on"] + """ + The account's display preference. + """ + value: Literal["off", "on"] + """ + The effective display preference value. + """ + + available: bool + """ + Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + """ + display_preference: DisplayPreference + _inner_class_types = {"display_preference": DisplayPreference} + class CustomerBalance(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -732,6 +754,28 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} + class MbWay(StripeObject): + class DisplayPreference(StripeObject): + overridable: Optional[bool] + """ + For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + """ + preference: Literal["none", "off", "on"] + """ + The account's display preference. + """ + value: Literal["off", "on"] + """ + The effective display preference value. + """ + + available: bool + """ + Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + """ + display_preference: DisplayPreference + _inner_class_types = {"display_preference": DisplayPreference} + class Mobilepay(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -1328,6 +1372,7 @@ class DisplayPreference(StripeObject): card: Optional[Card] cartes_bancaires: Optional[CartesBancaires] cashapp: Optional[Cashapp] + crypto: Optional[Crypto] customer_balance: Optional[CustomerBalance] eps: Optional[Eps] fpx: Optional[Fpx] @@ -1355,6 +1400,7 @@ class DisplayPreference(StripeObject): """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. """ + mb_way: Optional[MbWay] mobilepay: Optional[Mobilepay] multibanco: Optional[Multibanco] name: str @@ -1547,6 +1593,7 @@ async def retrieve_async( "card": Card, "cartes_bancaires": CartesBancaires, "cashapp": Cashapp, + "crypto": Crypto, "customer_balance": CustomerBalance, "eps": Eps, "fpx": Fpx, @@ -1562,6 +1609,7 @@ async def retrieve_async( "konbini": Konbini, "kr_card": KrCard, "link": Link, + "mb_way": MbWay, "mobilepay": Mobilepay, "multibanco": Multibanco, "naver_pay": NaverPay, diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index a8f5b6727..772fbafa2 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -28,6 +28,9 @@ from stripe.params._payment_record_report_payment_params import ( PaymentRecordReportPaymentParams, ) + from stripe.params._payment_record_report_refund_params import ( + PaymentRecordReportRefundParams, + ) from stripe.params._payment_record_retrieve_params import ( PaymentRecordRetrieveParams, ) @@ -793,7 +796,7 @@ class Crypto(StripeObject): """ The wallet address of the customer. """ - network: Optional[Literal["base", "ethereum", "polygon"]] + network: Optional[Literal["base", "ethereum", "polygon", "solana"]] """ The blockchain network that the transaction was sent on. """ @@ -1566,7 +1569,10 @@ class Qris(StripeObject): pass class Rechnung(StripeObject): - pass + payment_portal_url: Optional[str] + """ + Payment portal URL. + """ class RevolutPay(StripeObject): class Funding(StripeObject): @@ -2771,6 +2777,124 @@ async def report_payment_attempt_informational_async( # pyright: ignore[reportG ), ) + @classmethod + def _cls_report_refund( + cls, id: str, **params: Unpack["PaymentRecordReportRefundParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was refunded. + """ + return cast( + "PaymentRecord", + cls._static_request( + "post", + "/v1/payment_records/{id}/report_refund".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @overload + @staticmethod + def report_refund( + id: str, **params: Unpack["PaymentRecordReportRefundParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was refunded. + """ + ... + + @overload + def report_refund( + self, **params: Unpack["PaymentRecordReportRefundParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was refunded. + """ + ... + + @class_method_variant("_cls_report_refund") + def report_refund( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["PaymentRecordReportRefundParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was refunded. + """ + return cast( + "PaymentRecord", + self._request( + "post", + "/v1/payment_records/{id}/report_refund".format( + id=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_report_refund_async( + cls, id: str, **params: Unpack["PaymentRecordReportRefundParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was refunded. + """ + return cast( + "PaymentRecord", + await cls._static_request_async( + "post", + "/v1/payment_records/{id}/report_refund".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def report_refund_async( + id: str, **params: Unpack["PaymentRecordReportRefundParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was refunded. + """ + ... + + @overload + async def report_refund_async( + self, **params: Unpack["PaymentRecordReportRefundParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was refunded. + """ + ... + + @class_method_variant("_cls_report_refund_async") + async def report_refund_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["PaymentRecordReportRefundParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was refunded. + """ + return cast( + "PaymentRecord", + await self._request_async( + "post", + "/v1/payment_records/{id}/report_refund".format( + id=sanitize_id(self.get("id")) + ), + params=params, + ), + ) + @classmethod def retrieve( cls, id: str, **params: Unpack["PaymentRecordRetrieveParams"] diff --git a/stripe/_payment_record_service.py b/stripe/_payment_record_service.py index a95c5cea8..ef6eb9d07 100644 --- a/stripe/_payment_record_service.py +++ b/stripe/_payment_record_service.py @@ -26,6 +26,9 @@ from stripe.params._payment_record_report_payment_params import ( PaymentRecordReportPaymentParams, ) + from stripe.params._payment_record_report_refund_params import ( + PaymentRecordReportRefundParams, + ) from stripe.params._payment_record_retrieve_params import ( PaymentRecordRetrieveParams, ) @@ -304,6 +307,52 @@ async def report_payment_attempt_informational_async( ), ) + def report_refund( + self, + id: str, + params: "PaymentRecordReportRefundParams", + options: Optional["RequestOptions"] = None, + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was refunded. + """ + return cast( + "PaymentRecord", + self._request( + "post", + "/v1/payment_records/{id}/report_refund".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def report_refund_async( + self, + id: str, + params: "PaymentRecordReportRefundParams", + options: Optional["RequestOptions"] = None, + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was refunded. + """ + return cast( + "PaymentRecord", + await self._request_async( + "post", + "/v1/payment_records/{id}/report_refund".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + def report_payment( self, params: "PaymentRecordReportPaymentParams", diff --git a/stripe/_person.py b/stripe/_person.py index 6c9e2a76c..3b3608855 100644 --- a/stripe/_person.py +++ b/stripe/_person.py @@ -201,6 +201,7 @@ class Error(StripeObject): "invalid_url_website_other", "invalid_value_other", "unsupported_business_type", + "verification_data_not_found", "verification_directors_mismatch", "verification_document_address_mismatch", "verification_document_address_missing", @@ -410,6 +411,7 @@ class Error(StripeObject): "invalid_url_website_other", "invalid_value_other", "unsupported_business_type", + "verification_data_not_found", "verification_directors_mismatch", "verification_document_address_mismatch", "verification_document_address_missing", diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py index fd605fca6..18b51a7d3 100644 --- a/stripe/_quote_preview_invoice.py +++ b/stripe/_quote_preview_invoice.py @@ -514,6 +514,7 @@ class LastFinalizationError(StripeObject): "payment_intent_mandate_invalid", "payment_intent_payment_attempt_expired", "payment_intent_payment_attempt_failed", + "payment_intent_rate_limit_exceeded", "payment_intent_unexpected_state", "payment_method_bank_account_already_verified", "payment_method_bank_account_blocked", diff --git a/stripe/_refund.py b/stripe/_refund.py index b4358ddc4..10c71f463 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -103,6 +103,12 @@ class Card(StripeObject): class Cashapp(StripeObject): pass + class Crypto(StripeObject): + reference: Optional[str] + """ + The transaction hash of the refund. + """ + class CustomerCashBalance(StripeObject): pass @@ -259,6 +265,7 @@ class Zip(StripeObject): br_bank_transfer: Optional[BrBankTransfer] card: Optional[Card] cashapp: Optional[Cashapp] + crypto: Optional[Crypto] customer_cash_balance: Optional[CustomerCashBalance] eps: Optional[Eps] eu_bank_transfer: Optional[EuBankTransfer] @@ -297,6 +304,7 @@ class Zip(StripeObject): "br_bank_transfer": BrBankTransfer, "card": Card, "cashapp": Cashapp, + "crypto": Crypto, "customer_cash_balance": CustomerCashBalance, "eps": Eps, "eu_bank_transfer": EuBankTransfer, diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index 861a23ed0..3e65b07fa 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -600,6 +600,7 @@ class SetupError(StripeObject): "payment_intent_mandate_invalid", "payment_intent_payment_attempt_expired", "payment_intent_payment_attempt_failed", + "payment_intent_rate_limit_exceeded", "payment_intent_unexpected_state", "payment_method_bank_account_already_verified", "payment_method_bank_account_blocked", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index d200f4ee5..9f2a514c6 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -208,6 +208,7 @@ class LastSetupError(StripeObject): "payment_intent_mandate_invalid", "payment_intent_payment_attempt_expired", "payment_intent_payment_attempt_failed", + "payment_intent_rate_limit_exceeded", "payment_intent_unexpected_state", "payment_method_bank_account_already_verified", "payment_method_bank_account_blocked", @@ -906,6 +907,71 @@ class MandateOptions(StripeObject): """ An arbitrary string attached to the object. Often useful for displaying to users. """ + excluded_payment_method_types: Optional[ + List[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + ] + ] + """ + Payment method types that are excluded from this SetupIntent. + """ flow_directions: Optional[List[Literal["inbound", "outbound"]]] """ Indicates the directions of money movement for which this payment method is intended to be used. diff --git a/stripe/billing_portal/_configuration.py b/stripe/billing_portal/_configuration.py index 822a3acd7..7006d6042 100644 --- a/stripe/billing_portal/_configuration.py +++ b/stripe/billing_portal/_configuration.py @@ -32,7 +32,7 @@ class Configuration( UpdateableAPIResource["Configuration"], ): """ - A portal configuration describes the functionality and behavior of a portal session. + A portal configuration describes the functionality and behavior you embed in a portal session. Related guide: [Configure the customer portal](https://docs.stripe.com/customer-management/configure-portal). """ OBJECT_NAME: ClassVar[Literal["billing_portal.configuration"]] = ( diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 76e546247..d22f13097 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -1718,6 +1718,18 @@ class Swish(StripeObject): The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. """ + class Twint(StripeObject): + setup_future_usage: Optional[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): @@ -1840,6 +1852,7 @@ class ManualEntry(StripeObject): sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] swish: Optional[Swish] + twint: Optional[Twint] us_bank_account: Optional[UsBankAccount] _inner_class_types = { "acss_debit": AcssDebit, @@ -1882,6 +1895,7 @@ class ManualEntry(StripeObject): "sepa_debit": SepaDebit, "sofort": Sofort, "swish": Swish, + "twint": Twint, "us_bank_account": UsBankAccount, } diff --git a/stripe/events/_v2_money_management_transaction_created_event.py b/stripe/events/_v2_money_management_transaction_created_event.py index 08fb20e82..d9d137098 100644 --- a/stripe/events/_v2_money_management_transaction_created_event.py +++ b/stripe/events/_v2_money_management_transaction_created_event.py @@ -1,12 +1,15 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe._api_mode import ApiMode from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast +from typing import Any, Dict, Optional, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor from stripe._stripe_client import StripeClient from stripe.v2.money_management._transaction import Transaction @@ -76,6 +79,41 @@ class V2MoneyManagementTransactionCreatedEvent(Event): LOOKUP_TYPE = "v2.money_management.transaction.created" type: Literal["v2.money_management.transaction.created"] + class V2MoneyManagementTransactionCreatedEventData(StripeObject): + v1_id: Optional[str] + """ + Id of the v1 Transaction corresponding to this Transaction. + """ + + data: V2MoneyManagementTransactionCreatedEventData + """ + Data for the v2.money_management.transaction.created event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2MoneyManagementTransactionCreatedEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2MoneyManagementTransactionCreatedEvent.V2MoneyManagementTransactionCreatedEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + class RelatedObject(StripeObject): id: str """ diff --git a/stripe/financial_connections/_account.py b/stripe/financial_connections/_account.py index b39a4d758..bfd3113aa 100644 --- a/stripe/financial_connections/_account.py +++ b/stripe/financial_connections/_account.py @@ -680,7 +680,7 @@ def _cls_subscribe( cls, account: str, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ - Subscribes to periodic refreshes of data associated with a Financial Connections Account. + Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day. """ return cast( "Account", @@ -699,7 +699,7 @@ def subscribe( account: str, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ - Subscribes to periodic refreshes of data associated with a Financial Connections Account. + Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day. """ ... @@ -708,7 +708,7 @@ def subscribe( self, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ - Subscribes to periodic refreshes of data associated with a Financial Connections Account. + Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day. """ ... @@ -717,7 +717,7 @@ def subscribe( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ - Subscribes to periodic refreshes of data associated with a Financial Connections Account. + Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day. """ return cast( "Account", @@ -735,7 +735,7 @@ async def _cls_subscribe_async( cls, account: str, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ - Subscribes to periodic refreshes of data associated with a Financial Connections Account. + Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day. """ return cast( "Account", @@ -754,7 +754,7 @@ async def subscribe_async( account: str, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ - Subscribes to periodic refreshes of data associated with a Financial Connections Account. + Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day. """ ... @@ -763,7 +763,7 @@ async def subscribe_async( self, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ - Subscribes to periodic refreshes of data associated with a Financial Connections Account. + Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day. """ ... @@ -772,7 +772,7 @@ async def subscribe_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ - Subscribes to periodic refreshes of data associated with a Financial Connections Account. + Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day. """ return cast( "Account", diff --git a/stripe/financial_connections/_account_service.py b/stripe/financial_connections/_account_service.py index cabb1e315..e0cbacdb1 100644 --- a/stripe/financial_connections/_account_service.py +++ b/stripe/financial_connections/_account_service.py @@ -247,7 +247,7 @@ def subscribe( options: Optional["RequestOptions"] = None, ) -> "Account": """ - Subscribes to periodic refreshes of data associated with a Financial Connections Account. + Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day. """ return cast( "Account", @@ -269,7 +269,7 @@ async def subscribe_async( options: Optional["RequestOptions"] = None, ) -> "Account": """ - Subscribes to periodic refreshes of data associated with a Financial Connections Account. + Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day. """ return cast( "Account", diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index 3f503d872..4bc745546 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -134,6 +134,7 @@ AccountCreateParamsCompanyDirectorshipDeclaration as AccountCreateParamsCompanyDirectorshipDeclaration, AccountCreateParamsCompanyOwnershipDeclaration as AccountCreateParamsCompanyOwnershipDeclaration, AccountCreateParamsCompanyRegistrationDate as AccountCreateParamsCompanyRegistrationDate, + AccountCreateParamsCompanyRepresentativeDeclaration as AccountCreateParamsCompanyRepresentativeDeclaration, AccountCreateParamsCompanyVerification as AccountCreateParamsCompanyVerification, AccountCreateParamsCompanyVerificationDocument as AccountCreateParamsCompanyVerificationDocument, AccountCreateParamsController as AccountCreateParamsController, @@ -529,6 +530,7 @@ AccountUpdateParamsCompanyDirectorshipDeclaration as AccountUpdateParamsCompanyDirectorshipDeclaration, AccountUpdateParamsCompanyOwnershipDeclaration as AccountUpdateParamsCompanyOwnershipDeclaration, AccountUpdateParamsCompanyRegistrationDate as AccountUpdateParamsCompanyRegistrationDate, + AccountUpdateParamsCompanyRepresentativeDeclaration as AccountUpdateParamsCompanyRepresentativeDeclaration, AccountUpdateParamsCompanyVerification as AccountUpdateParamsCompanyVerification, AccountUpdateParamsCompanyVerificationDocument as AccountUpdateParamsCompanyVerificationDocument, AccountUpdateParamsDocuments as AccountUpdateParamsDocuments, @@ -889,6 +891,7 @@ CreditNoteCreateParamsLine as CreditNoteCreateParamsLine, CreditNoteCreateParamsLineTaxAmount as CreditNoteCreateParamsLineTaxAmount, CreditNoteCreateParamsRefund as CreditNoteCreateParamsRefund, + CreditNoteCreateParamsRefundPaymentRecordRefund as CreditNoteCreateParamsRefundPaymentRecordRefund, CreditNoteCreateParamsShippingCost as CreditNoteCreateParamsShippingCost, ) from stripe.params._credit_note_line_item_list_params import ( @@ -909,6 +912,7 @@ CreditNotePreviewLinesListParamsLine as CreditNotePreviewLinesListParamsLine, CreditNotePreviewLinesListParamsLineTaxAmount as CreditNotePreviewLinesListParamsLineTaxAmount, CreditNotePreviewLinesListParamsRefund as CreditNotePreviewLinesListParamsRefund, + CreditNotePreviewLinesListParamsRefundPaymentRecordRefund as CreditNotePreviewLinesListParamsRefundPaymentRecordRefund, CreditNotePreviewLinesListParamsShippingCost as CreditNotePreviewLinesListParamsShippingCost, ) from stripe.params._credit_note_preview_lines_params import ( @@ -916,6 +920,7 @@ CreditNotePreviewLinesParamsLine as CreditNotePreviewLinesParamsLine, CreditNotePreviewLinesParamsLineTaxAmount as CreditNotePreviewLinesParamsLineTaxAmount, CreditNotePreviewLinesParamsRefund as CreditNotePreviewLinesParamsRefund, + CreditNotePreviewLinesParamsRefundPaymentRecordRefund as CreditNotePreviewLinesParamsRefundPaymentRecordRefund, CreditNotePreviewLinesParamsShippingCost as CreditNotePreviewLinesParamsShippingCost, ) from stripe.params._credit_note_preview_params import ( @@ -923,6 +928,7 @@ CreditNotePreviewParamsLine as CreditNotePreviewParamsLine, CreditNotePreviewParamsLineTaxAmount as CreditNotePreviewParamsLineTaxAmount, CreditNotePreviewParamsRefund as CreditNotePreviewParamsRefund, + CreditNotePreviewParamsRefundPaymentRecordRefund as CreditNotePreviewParamsRefundPaymentRecordRefund, CreditNotePreviewParamsShippingCost as CreditNotePreviewParamsShippingCost, ) from stripe.params._credit_note_retrieve_params import ( @@ -1103,9 +1109,15 @@ CustomerSessionCreateParams as CustomerSessionCreateParams, CustomerSessionCreateParamsComponents as CustomerSessionCreateParamsComponents, CustomerSessionCreateParamsComponentsBuyButton as CustomerSessionCreateParamsComponentsBuyButton, + CustomerSessionCreateParamsComponentsCustomerSheet as CustomerSessionCreateParamsComponentsCustomerSheet, + CustomerSessionCreateParamsComponentsCustomerSheetFeatures as CustomerSessionCreateParamsComponentsCustomerSheetFeatures, + CustomerSessionCreateParamsComponentsMobilePaymentElement as CustomerSessionCreateParamsComponentsMobilePaymentElement, + CustomerSessionCreateParamsComponentsMobilePaymentElementFeatures as CustomerSessionCreateParamsComponentsMobilePaymentElementFeatures, CustomerSessionCreateParamsComponentsPaymentElement as CustomerSessionCreateParamsComponentsPaymentElement, CustomerSessionCreateParamsComponentsPaymentElementFeatures as CustomerSessionCreateParamsComponentsPaymentElementFeatures, CustomerSessionCreateParamsComponentsPricingTable as CustomerSessionCreateParamsComponentsPricingTable, + CustomerSessionCreateParamsComponentsTaxIdElement as CustomerSessionCreateParamsComponentsTaxIdElement, + CustomerSessionCreateParamsComponentsTaxIdElementFeatures as CustomerSessionCreateParamsComponentsTaxIdElementFeatures, ) from stripe.params._customer_tax_id_create_params import ( CustomerTaxIdCreateParams as CustomerTaxIdCreateParams, @@ -2747,6 +2759,9 @@ PaymentLinkCreateParamsLineItemPriceData as PaymentLinkCreateParamsLineItemPriceData, PaymentLinkCreateParamsLineItemPriceDataProductData as PaymentLinkCreateParamsLineItemPriceDataProductData, PaymentLinkCreateParamsLineItemPriceDataRecurring as PaymentLinkCreateParamsLineItemPriceDataRecurring, + PaymentLinkCreateParamsNameCollection as PaymentLinkCreateParamsNameCollection, + PaymentLinkCreateParamsNameCollectionBusiness as PaymentLinkCreateParamsNameCollectionBusiness, + PaymentLinkCreateParamsNameCollectionIndividual as PaymentLinkCreateParamsNameCollectionIndividual, PaymentLinkCreateParamsOptionalItem as PaymentLinkCreateParamsOptionalItem, PaymentLinkCreateParamsOptionalItemAdjustableQuantity as PaymentLinkCreateParamsOptionalItemAdjustableQuantity, PaymentLinkCreateParamsPaymentIntentData as PaymentLinkCreateParamsPaymentIntentData, @@ -2797,6 +2812,9 @@ PaymentLinkModifyParamsInvoiceCreationInvoiceDataRenderingOptions as PaymentLinkModifyParamsInvoiceCreationInvoiceDataRenderingOptions, PaymentLinkModifyParamsLineItem as PaymentLinkModifyParamsLineItem, PaymentLinkModifyParamsLineItemAdjustableQuantity as PaymentLinkModifyParamsLineItemAdjustableQuantity, + PaymentLinkModifyParamsNameCollection as PaymentLinkModifyParamsNameCollection, + PaymentLinkModifyParamsNameCollectionBusiness as PaymentLinkModifyParamsNameCollectionBusiness, + PaymentLinkModifyParamsNameCollectionIndividual as PaymentLinkModifyParamsNameCollectionIndividual, PaymentLinkModifyParamsPaymentIntentData as PaymentLinkModifyParamsPaymentIntentData, PaymentLinkModifyParamsPhoneNumberCollection as PaymentLinkModifyParamsPhoneNumberCollection, PaymentLinkModifyParamsRestrictions as PaymentLinkModifyParamsRestrictions, @@ -2837,6 +2855,9 @@ PaymentLinkUpdateParamsInvoiceCreationInvoiceDataRenderingOptions as PaymentLinkUpdateParamsInvoiceCreationInvoiceDataRenderingOptions, PaymentLinkUpdateParamsLineItem as PaymentLinkUpdateParamsLineItem, PaymentLinkUpdateParamsLineItemAdjustableQuantity as PaymentLinkUpdateParamsLineItemAdjustableQuantity, + PaymentLinkUpdateParamsNameCollection as PaymentLinkUpdateParamsNameCollection, + PaymentLinkUpdateParamsNameCollectionBusiness as PaymentLinkUpdateParamsNameCollectionBusiness, + PaymentLinkUpdateParamsNameCollectionIndividual as PaymentLinkUpdateParamsNameCollectionIndividual, PaymentLinkUpdateParamsPaymentIntentData as PaymentLinkUpdateParamsPaymentIntentData, PaymentLinkUpdateParamsPhoneNumberCollection as PaymentLinkUpdateParamsPhoneNumberCollection, PaymentLinkUpdateParamsRestrictions as PaymentLinkUpdateParamsRestrictions, @@ -2888,6 +2909,8 @@ PaymentMethodConfigurationCreateParamsCartesBancairesDisplayPreference as PaymentMethodConfigurationCreateParamsCartesBancairesDisplayPreference, PaymentMethodConfigurationCreateParamsCashapp as PaymentMethodConfigurationCreateParamsCashapp, PaymentMethodConfigurationCreateParamsCashappDisplayPreference as PaymentMethodConfigurationCreateParamsCashappDisplayPreference, + PaymentMethodConfigurationCreateParamsCrypto as PaymentMethodConfigurationCreateParamsCrypto, + PaymentMethodConfigurationCreateParamsCryptoDisplayPreference as PaymentMethodConfigurationCreateParamsCryptoDisplayPreference, PaymentMethodConfigurationCreateParamsCustomerBalance as PaymentMethodConfigurationCreateParamsCustomerBalance, PaymentMethodConfigurationCreateParamsCustomerBalanceDisplayPreference as PaymentMethodConfigurationCreateParamsCustomerBalanceDisplayPreference, PaymentMethodConfigurationCreateParamsEps as PaymentMethodConfigurationCreateParamsEps, @@ -2920,6 +2943,8 @@ PaymentMethodConfigurationCreateParamsKrCardDisplayPreference as PaymentMethodConfigurationCreateParamsKrCardDisplayPreference, PaymentMethodConfigurationCreateParamsLink as PaymentMethodConfigurationCreateParamsLink, PaymentMethodConfigurationCreateParamsLinkDisplayPreference as PaymentMethodConfigurationCreateParamsLinkDisplayPreference, + PaymentMethodConfigurationCreateParamsMbWay as PaymentMethodConfigurationCreateParamsMbWay, + PaymentMethodConfigurationCreateParamsMbWayDisplayPreference as PaymentMethodConfigurationCreateParamsMbWayDisplayPreference, PaymentMethodConfigurationCreateParamsMobilepay as PaymentMethodConfigurationCreateParamsMobilepay, PaymentMethodConfigurationCreateParamsMobilepayDisplayPreference as PaymentMethodConfigurationCreateParamsMobilepayDisplayPreference, PaymentMethodConfigurationCreateParamsMultibanco as PaymentMethodConfigurationCreateParamsMultibanco, @@ -3012,6 +3037,8 @@ PaymentMethodConfigurationModifyParamsCartesBancairesDisplayPreference as PaymentMethodConfigurationModifyParamsCartesBancairesDisplayPreference, PaymentMethodConfigurationModifyParamsCashapp as PaymentMethodConfigurationModifyParamsCashapp, PaymentMethodConfigurationModifyParamsCashappDisplayPreference as PaymentMethodConfigurationModifyParamsCashappDisplayPreference, + PaymentMethodConfigurationModifyParamsCrypto as PaymentMethodConfigurationModifyParamsCrypto, + PaymentMethodConfigurationModifyParamsCryptoDisplayPreference as PaymentMethodConfigurationModifyParamsCryptoDisplayPreference, PaymentMethodConfigurationModifyParamsCustomerBalance as PaymentMethodConfigurationModifyParamsCustomerBalance, PaymentMethodConfigurationModifyParamsCustomerBalanceDisplayPreference as PaymentMethodConfigurationModifyParamsCustomerBalanceDisplayPreference, PaymentMethodConfigurationModifyParamsEps as PaymentMethodConfigurationModifyParamsEps, @@ -3044,6 +3071,8 @@ PaymentMethodConfigurationModifyParamsKrCardDisplayPreference as PaymentMethodConfigurationModifyParamsKrCardDisplayPreference, PaymentMethodConfigurationModifyParamsLink as PaymentMethodConfigurationModifyParamsLink, PaymentMethodConfigurationModifyParamsLinkDisplayPreference as PaymentMethodConfigurationModifyParamsLinkDisplayPreference, + PaymentMethodConfigurationModifyParamsMbWay as PaymentMethodConfigurationModifyParamsMbWay, + PaymentMethodConfigurationModifyParamsMbWayDisplayPreference as PaymentMethodConfigurationModifyParamsMbWayDisplayPreference, PaymentMethodConfigurationModifyParamsMobilepay as PaymentMethodConfigurationModifyParamsMobilepay, PaymentMethodConfigurationModifyParamsMobilepayDisplayPreference as PaymentMethodConfigurationModifyParamsMobilepayDisplayPreference, PaymentMethodConfigurationModifyParamsMultibanco as PaymentMethodConfigurationModifyParamsMultibanco, @@ -3136,6 +3165,8 @@ PaymentMethodConfigurationUpdateParamsCartesBancairesDisplayPreference as PaymentMethodConfigurationUpdateParamsCartesBancairesDisplayPreference, PaymentMethodConfigurationUpdateParamsCashapp as PaymentMethodConfigurationUpdateParamsCashapp, PaymentMethodConfigurationUpdateParamsCashappDisplayPreference as PaymentMethodConfigurationUpdateParamsCashappDisplayPreference, + PaymentMethodConfigurationUpdateParamsCrypto as PaymentMethodConfigurationUpdateParamsCrypto, + PaymentMethodConfigurationUpdateParamsCryptoDisplayPreference as PaymentMethodConfigurationUpdateParamsCryptoDisplayPreference, PaymentMethodConfigurationUpdateParamsCustomerBalance as PaymentMethodConfigurationUpdateParamsCustomerBalance, PaymentMethodConfigurationUpdateParamsCustomerBalanceDisplayPreference as PaymentMethodConfigurationUpdateParamsCustomerBalanceDisplayPreference, PaymentMethodConfigurationUpdateParamsEps as PaymentMethodConfigurationUpdateParamsEps, @@ -3168,6 +3199,8 @@ PaymentMethodConfigurationUpdateParamsKrCardDisplayPreference as PaymentMethodConfigurationUpdateParamsKrCardDisplayPreference, PaymentMethodConfigurationUpdateParamsLink as PaymentMethodConfigurationUpdateParamsLink, PaymentMethodConfigurationUpdateParamsLinkDisplayPreference as PaymentMethodConfigurationUpdateParamsLinkDisplayPreference, + PaymentMethodConfigurationUpdateParamsMbWay as PaymentMethodConfigurationUpdateParamsMbWay, + PaymentMethodConfigurationUpdateParamsMbWayDisplayPreference as PaymentMethodConfigurationUpdateParamsMbWayDisplayPreference, PaymentMethodConfigurationUpdateParamsMobilepay as PaymentMethodConfigurationUpdateParamsMobilepay, PaymentMethodConfigurationUpdateParamsMobilepayDisplayPreference as PaymentMethodConfigurationUpdateParamsMobilepayDisplayPreference, PaymentMethodConfigurationUpdateParamsMultibanco as PaymentMethodConfigurationUpdateParamsMultibanco, @@ -3241,6 +3274,7 @@ PaymentMethodCreateParamsCardNetworks as PaymentMethodCreateParamsCardNetworks, PaymentMethodCreateParamsCashapp as PaymentMethodCreateParamsCashapp, PaymentMethodCreateParamsCrypto as PaymentMethodCreateParamsCrypto, + PaymentMethodCreateParamsCustom as PaymentMethodCreateParamsCustom, PaymentMethodCreateParamsCustomerBalance as PaymentMethodCreateParamsCustomerBalance, PaymentMethodCreateParamsEps as PaymentMethodCreateParamsEps, PaymentMethodCreateParamsFpx as PaymentMethodCreateParamsFpx, @@ -3374,6 +3408,13 @@ PaymentRecordReportPaymentParamsShippingDetails as PaymentRecordReportPaymentParamsShippingDetails, PaymentRecordReportPaymentParamsShippingDetailsAddress as PaymentRecordReportPaymentParamsShippingDetailsAddress, ) + from stripe.params._payment_record_report_refund_params import ( + PaymentRecordReportRefundParams as PaymentRecordReportRefundParams, + PaymentRecordReportRefundParamsAmount as PaymentRecordReportRefundParamsAmount, + PaymentRecordReportRefundParamsProcessorDetails as PaymentRecordReportRefundParamsProcessorDetails, + PaymentRecordReportRefundParamsProcessorDetailsCustom as PaymentRecordReportRefundParamsProcessorDetailsCustom, + PaymentRecordReportRefundParamsRefunded as PaymentRecordReportRefundParamsRefunded, + ) from stripe.params._payment_record_retrieve_params import ( PaymentRecordRetrieveParams as PaymentRecordRetrieveParams, ) @@ -4779,6 +4820,7 @@ TokenCreateParamsAccountCompanyDirectorshipDeclaration as TokenCreateParamsAccountCompanyDirectorshipDeclaration, TokenCreateParamsAccountCompanyOwnershipDeclaration as TokenCreateParamsAccountCompanyOwnershipDeclaration, TokenCreateParamsAccountCompanyRegistrationDate as TokenCreateParamsAccountCompanyRegistrationDate, + TokenCreateParamsAccountCompanyRepresentativeDeclaration as TokenCreateParamsAccountCompanyRepresentativeDeclaration, TokenCreateParamsAccountCompanyVerification as TokenCreateParamsAccountCompanyVerification, TokenCreateParamsAccountCompanyVerificationDocument as TokenCreateParamsAccountCompanyVerificationDocument, TokenCreateParamsAccountIndividual as TokenCreateParamsAccountIndividual, @@ -5305,6 +5347,10 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsCompanyRepresentativeDeclaration": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsCompanyVerification": ( "stripe.params._account_create_params", False, @@ -6573,6 +6619,10 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsCompanyRepresentativeDeclaration": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsCompanyVerification": ( "stripe.params._account_update_params", False, @@ -7615,6 +7665,10 @@ "stripe.params._credit_note_create_params", False, ), + "CreditNoteCreateParamsRefundPaymentRecordRefund": ( + "stripe.params._credit_note_create_params", + False, + ), "CreditNoteCreateParamsShippingCost": ( "stripe.params._credit_note_create_params", False, @@ -7652,6 +7706,10 @@ "stripe.params._credit_note_preview_lines_list_params", False, ), + "CreditNotePreviewLinesListParamsRefundPaymentRecordRefund": ( + "stripe.params._credit_note_preview_lines_list_params", + False, + ), "CreditNotePreviewLinesListParamsShippingCost": ( "stripe.params._credit_note_preview_lines_list_params", False, @@ -7672,6 +7730,10 @@ "stripe.params._credit_note_preview_lines_params", False, ), + "CreditNotePreviewLinesParamsRefundPaymentRecordRefund": ( + "stripe.params._credit_note_preview_lines_params", + False, + ), "CreditNotePreviewLinesParamsShippingCost": ( "stripe.params._credit_note_preview_lines_params", False, @@ -7692,6 +7754,10 @@ "stripe.params._credit_note_preview_params", False, ), + "CreditNotePreviewParamsRefundPaymentRecordRefund": ( + "stripe.params._credit_note_preview_params", + False, + ), "CreditNotePreviewParamsShippingCost": ( "stripe.params._credit_note_preview_params", False, @@ -8005,6 +8071,22 @@ "stripe.params._customer_session_create_params", False, ), + "CustomerSessionCreateParamsComponentsCustomerSheet": ( + "stripe.params._customer_session_create_params", + False, + ), + "CustomerSessionCreateParamsComponentsCustomerSheetFeatures": ( + "stripe.params._customer_session_create_params", + False, + ), + "CustomerSessionCreateParamsComponentsMobilePaymentElement": ( + "stripe.params._customer_session_create_params", + False, + ), + "CustomerSessionCreateParamsComponentsMobilePaymentElementFeatures": ( + "stripe.params._customer_session_create_params", + False, + ), "CustomerSessionCreateParamsComponentsPaymentElement": ( "stripe.params._customer_session_create_params", False, @@ -8017,6 +8099,14 @@ "stripe.params._customer_session_create_params", False, ), + "CustomerSessionCreateParamsComponentsTaxIdElement": ( + "stripe.params._customer_session_create_params", + False, + ), + "CustomerSessionCreateParamsComponentsTaxIdElementFeatures": ( + "stripe.params._customer_session_create_params", + False, + ), "CustomerTaxIdCreateParams": ( "stripe.params._customer_tax_id_create_params", False, @@ -13619,6 +13709,18 @@ "stripe.params._payment_link_create_params", False, ), + "PaymentLinkCreateParamsNameCollection": ( + "stripe.params._payment_link_create_params", + False, + ), + "PaymentLinkCreateParamsNameCollectionBusiness": ( + "stripe.params._payment_link_create_params", + False, + ), + "PaymentLinkCreateParamsNameCollectionIndividual": ( + "stripe.params._payment_link_create_params", + False, + ), "PaymentLinkCreateParamsOptionalItem": ( "stripe.params._payment_link_create_params", False, @@ -13787,6 +13889,18 @@ "stripe.params._payment_link_modify_params", False, ), + "PaymentLinkModifyParamsNameCollection": ( + "stripe.params._payment_link_modify_params", + False, + ), + "PaymentLinkModifyParamsNameCollectionBusiness": ( + "stripe.params._payment_link_modify_params", + False, + ), + "PaymentLinkModifyParamsNameCollectionIndividual": ( + "stripe.params._payment_link_modify_params", + False, + ), "PaymentLinkModifyParamsPaymentIntentData": ( "stripe.params._payment_link_modify_params", False, @@ -13931,6 +14045,18 @@ "stripe.params._payment_link_update_params", False, ), + "PaymentLinkUpdateParamsNameCollection": ( + "stripe.params._payment_link_update_params", + False, + ), + "PaymentLinkUpdateParamsNameCollectionBusiness": ( + "stripe.params._payment_link_update_params", + False, + ), + "PaymentLinkUpdateParamsNameCollectionIndividual": ( + "stripe.params._payment_link_update_params", + False, + ), "PaymentLinkUpdateParamsPaymentIntentData": ( "stripe.params._payment_link_update_params", False, @@ -14119,6 +14245,14 @@ "stripe.params._payment_method_configuration_create_params", False, ), + "PaymentMethodConfigurationCreateParamsCrypto": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), + "PaymentMethodConfigurationCreateParamsCryptoDisplayPreference": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), "PaymentMethodConfigurationCreateParamsCustomerBalance": ( "stripe.params._payment_method_configuration_create_params", False, @@ -14247,6 +14381,14 @@ "stripe.params._payment_method_configuration_create_params", False, ), + "PaymentMethodConfigurationCreateParamsMbWay": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), + "PaymentMethodConfigurationCreateParamsMbWayDisplayPreference": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), "PaymentMethodConfigurationCreateParamsMobilepay": ( "stripe.params._payment_method_configuration_create_params", False, @@ -14599,6 +14741,14 @@ "stripe.params._payment_method_configuration_modify_params", False, ), + "PaymentMethodConfigurationModifyParamsCrypto": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), + "PaymentMethodConfigurationModifyParamsCryptoDisplayPreference": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), "PaymentMethodConfigurationModifyParamsCustomerBalance": ( "stripe.params._payment_method_configuration_modify_params", False, @@ -14727,6 +14877,14 @@ "stripe.params._payment_method_configuration_modify_params", False, ), + "PaymentMethodConfigurationModifyParamsMbWay": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), + "PaymentMethodConfigurationModifyParamsMbWayDisplayPreference": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), "PaymentMethodConfigurationModifyParamsMobilepay": ( "stripe.params._payment_method_configuration_modify_params", False, @@ -15079,6 +15237,14 @@ "stripe.params._payment_method_configuration_update_params", False, ), + "PaymentMethodConfigurationUpdateParamsCrypto": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), + "PaymentMethodConfigurationUpdateParamsCryptoDisplayPreference": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), "PaymentMethodConfigurationUpdateParamsCustomerBalance": ( "stripe.params._payment_method_configuration_update_params", False, @@ -15207,6 +15373,14 @@ "stripe.params._payment_method_configuration_update_params", False, ), + "PaymentMethodConfigurationUpdateParamsMbWay": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), + "PaymentMethodConfigurationUpdateParamsMbWayDisplayPreference": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), "PaymentMethodConfigurationUpdateParamsMobilepay": ( "stripe.params._payment_method_configuration_update_params", False, @@ -15491,6 +15665,10 @@ "stripe.params._payment_method_create_params", False, ), + "PaymentMethodCreateParamsCustom": ( + "stripe.params._payment_method_create_params", + False, + ), "PaymentMethodCreateParamsCustomerBalance": ( "stripe.params._payment_method_create_params", False, @@ -15883,6 +16061,26 @@ "stripe.params._payment_record_report_payment_params", False, ), + "PaymentRecordReportRefundParams": ( + "stripe.params._payment_record_report_refund_params", + False, + ), + "PaymentRecordReportRefundParamsAmount": ( + "stripe.params._payment_record_report_refund_params", + False, + ), + "PaymentRecordReportRefundParamsProcessorDetails": ( + "stripe.params._payment_record_report_refund_params", + False, + ), + "PaymentRecordReportRefundParamsProcessorDetailsCustom": ( + "stripe.params._payment_record_report_refund_params", + False, + ), + "PaymentRecordReportRefundParamsRefunded": ( + "stripe.params._payment_record_report_refund_params", + False, + ), "PaymentRecordRetrieveParams": ( "stripe.params._payment_record_retrieve_params", False, @@ -20178,6 +20376,10 @@ "stripe.params._token_create_params", False, ), + "TokenCreateParamsAccountCompanyRepresentativeDeclaration": ( + "stripe.params._token_create_params", + False, + ), "TokenCreateParamsAccountCompanyVerification": ( "stripe.params._token_create_params", False, diff --git a/stripe/params/_account_create_params.py b/stripe/params/_account_create_params.py index af474503e..9fa6d7854 100644 --- a/stripe/params/_account_create_params.py +++ b/stripe/params/_account_create_params.py @@ -1217,6 +1217,12 @@ class AccountCreateParamsCompany(TypedDict): """ The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). """ + representative_declaration: NotRequired[ + "AccountCreateParamsCompanyRepresentativeDeclaration" + ] + """ + This hash is used to attest that the representative is authorized to act as the representative of their legal entity. + """ structure: NotRequired[ "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" ] @@ -1375,6 +1381,21 @@ class AccountCreateParamsCompanyRegistrationDate(TypedDict): """ +class AccountCreateParamsCompanyRepresentativeDeclaration(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the representative declaration attestation was made. + """ + ip: NotRequired[str] + """ + The IP address from which the representative declaration attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the representative declaration attestation was made. + """ + + class AccountCreateParamsCompanyVerification(TypedDict): document: NotRequired["AccountCreateParamsCompanyVerificationDocument"] """ diff --git a/stripe/params/_account_update_params.py b/stripe/params/_account_update_params.py index 269cef2e9..452297570 100644 --- a/stripe/params/_account_update_params.py +++ b/stripe/params/_account_update_params.py @@ -1201,6 +1201,12 @@ class AccountUpdateParamsCompany(TypedDict): """ The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). """ + representative_declaration: NotRequired[ + "AccountUpdateParamsCompanyRepresentativeDeclaration" + ] + """ + This hash is used to attest that the representative is authorized to act as the representative of their legal entity. + """ structure: NotRequired[ "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" ] @@ -1359,6 +1365,21 @@ class AccountUpdateParamsCompanyRegistrationDate(TypedDict): """ +class AccountUpdateParamsCompanyRepresentativeDeclaration(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the representative declaration attestation was made. + """ + ip: NotRequired[str] + """ + The IP address from which the representative declaration attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the representative declaration attestation was made. + """ + + class AccountUpdateParamsCompanyVerification(TypedDict): document: NotRequired["AccountUpdateParamsCompanyVerificationDocument"] """ diff --git a/stripe/params/_credit_note_create_params.py b/stripe/params/_credit_note_create_params.py index b56295fda..349d1d6f0 100644 --- a/stripe/params/_credit_note_create_params.py +++ b/stripe/params/_credit_note_create_params.py @@ -129,10 +129,31 @@ class CreditNoteCreateParamsRefund(TypedDict): """ Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. """ + payment_record_refund: NotRequired[ + "CreditNoteCreateParamsRefundPaymentRecordRefund" + ] + """ + The PaymentRecord refund details to link to this credit note. Required when `type` is `payment_record_refund`. + """ refund: NotRequired[str] """ ID of an existing refund to link this credit note to. Required when `type` is `refund`. """ + type: NotRequired[Literal["payment_record_refund", "refund"]] + """ + Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. + """ + + +class CreditNoteCreateParamsRefundPaymentRecordRefund(TypedDict): + payment_record: str + """ + The ID of the PaymentRecord with the refund to link to this credit note. + """ + refund_group: str + """ + The PaymentRecord refund group to link to this credit note. For refunds processed off-Stripe, this will correspond to the `processor_details.custom.refund_reference` field provided when reporting the refund on the PaymentRecord. + """ class CreditNoteCreateParamsShippingCost(TypedDict): diff --git a/stripe/params/_credit_note_preview_lines_list_params.py b/stripe/params/_credit_note_preview_lines_list_params.py index 49fa12d76..337f7e9d3 100644 --- a/stripe/params/_credit_note_preview_lines_list_params.py +++ b/stripe/params/_credit_note_preview_lines_list_params.py @@ -140,10 +140,31 @@ class CreditNotePreviewLinesListParamsRefund(TypedDict): """ Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. """ + payment_record_refund: NotRequired[ + "CreditNotePreviewLinesListParamsRefundPaymentRecordRefund" + ] + """ + The PaymentRecord refund details to link to this credit note. Required when `type` is `payment_record_refund`. + """ refund: NotRequired[str] """ ID of an existing refund to link this credit note to. Required when `type` is `refund`. """ + type: NotRequired[Literal["payment_record_refund", "refund"]] + """ + Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. + """ + + +class CreditNotePreviewLinesListParamsRefundPaymentRecordRefund(TypedDict): + payment_record: str + """ + The ID of the PaymentRecord with the refund to link to this credit note. + """ + refund_group: str + """ + The PaymentRecord refund group to link to this credit note. For refunds processed off-Stripe, this will correspond to the `processor_details.custom.refund_reference` field provided when reporting the refund on the PaymentRecord. + """ class CreditNotePreviewLinesListParamsShippingCost(TypedDict): diff --git a/stripe/params/_credit_note_preview_lines_params.py b/stripe/params/_credit_note_preview_lines_params.py index 570d75fa4..c1a761dc3 100644 --- a/stripe/params/_credit_note_preview_lines_params.py +++ b/stripe/params/_credit_note_preview_lines_params.py @@ -141,10 +141,31 @@ class CreditNotePreviewLinesParamsRefund(TypedDict): """ Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. """ + payment_record_refund: NotRequired[ + "CreditNotePreviewLinesParamsRefundPaymentRecordRefund" + ] + """ + The PaymentRecord refund details to link to this credit note. Required when `type` is `payment_record_refund`. + """ refund: NotRequired[str] """ ID of an existing refund to link this credit note to. Required when `type` is `refund`. """ + type: NotRequired[Literal["payment_record_refund", "refund"]] + """ + Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. + """ + + +class CreditNotePreviewLinesParamsRefundPaymentRecordRefund(TypedDict): + payment_record: str + """ + The ID of the PaymentRecord with the refund to link to this credit note. + """ + refund_group: str + """ + The PaymentRecord refund group to link to this credit note. For refunds processed off-Stripe, this will correspond to the `processor_details.custom.refund_reference` field provided when reporting the refund on the PaymentRecord. + """ class CreditNotePreviewLinesParamsShippingCost(TypedDict): diff --git a/stripe/params/_credit_note_preview_params.py b/stripe/params/_credit_note_preview_params.py index 6814902ec..9626dba96 100644 --- a/stripe/params/_credit_note_preview_params.py +++ b/stripe/params/_credit_note_preview_params.py @@ -129,10 +129,31 @@ class CreditNotePreviewParamsRefund(TypedDict): """ Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. """ + payment_record_refund: NotRequired[ + "CreditNotePreviewParamsRefundPaymentRecordRefund" + ] + """ + The PaymentRecord refund details to link to this credit note. Required when `type` is `payment_record_refund`. + """ refund: NotRequired[str] """ ID of an existing refund to link this credit note to. Required when `type` is `refund`. """ + type: NotRequired[Literal["payment_record_refund", "refund"]] + """ + Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. + """ + + +class CreditNotePreviewParamsRefundPaymentRecordRefund(TypedDict): + payment_record: str + """ + The ID of the PaymentRecord with the refund to link to this credit note. + """ + refund_group: str + """ + The PaymentRecord refund group to link to this credit note. For refunds processed off-Stripe, this will correspond to the `processor_details.custom.refund_reference` field provided when reporting the refund on the PaymentRecord. + """ class CreditNotePreviewParamsShippingCost(TypedDict): diff --git a/stripe/params/_customer_list_payment_methods_params.py b/stripe/params/_customer_list_payment_methods_params.py index b8ec4ceb6..1dfaf8df4 100644 --- a/stripe/params/_customer_list_payment_methods_params.py +++ b/stripe/params/_customer_list_payment_methods_params.py @@ -43,6 +43,7 @@ class CustomerListPaymentMethodsParams(RequestOptions): "card", "cashapp", "crypto", + "custom", "customer_balance", "eps", "fpx", diff --git a/stripe/params/_customer_payment_method_list_params.py b/stripe/params/_customer_payment_method_list_params.py index 9748fad0e..3a93cee13 100644 --- a/stripe/params/_customer_payment_method_list_params.py +++ b/stripe/params/_customer_payment_method_list_params.py @@ -42,6 +42,7 @@ class CustomerPaymentMethodListParams(TypedDict): "card", "cashapp", "crypto", + "custom", "customer_balance", "eps", "fpx", diff --git a/stripe/params/_customer_session_create_params.py b/stripe/params/_customer_session_create_params.py index 89041dc2b..f9f149a81 100644 --- a/stripe/params/_customer_session_create_params.py +++ b/stripe/params/_customer_session_create_params.py @@ -29,6 +29,18 @@ class CustomerSessionCreateParamsComponents(TypedDict): """ Configuration for buy button. """ + customer_sheet: NotRequired[ + "CustomerSessionCreateParamsComponentsCustomerSheet" + ] + """ + Configuration for the customer sheet. + """ + mobile_payment_element: NotRequired[ + "CustomerSessionCreateParamsComponentsMobilePaymentElement" + ] + """ + Configuration for the mobile payment element. + """ payment_element: NotRequired[ "CustomerSessionCreateParamsComponentsPaymentElement" ] @@ -41,6 +53,12 @@ class CustomerSessionCreateParamsComponents(TypedDict): """ Configuration for the pricing table. """ + tax_id_element: NotRequired[ + "CustomerSessionCreateParamsComponentsTaxIdElement" + ] + """ + Configuration for the Tax ID Element. + """ class CustomerSessionCreateParamsComponentsBuyButton(TypedDict): @@ -50,6 +68,86 @@ class CustomerSessionCreateParamsComponentsBuyButton(TypedDict): """ +class CustomerSessionCreateParamsComponentsCustomerSheet(TypedDict): + enabled: bool + """ + Whether the customer sheet is enabled. + """ + features: NotRequired[ + "CustomerSessionCreateParamsComponentsCustomerSheetFeatures" + ] + """ + This hash defines whether the customer sheet supports certain features. + """ + + +class CustomerSessionCreateParamsComponentsCustomerSheetFeatures(TypedDict): + payment_method_allow_redisplay_filters: NotRequired[ + List[Literal["always", "limited", "unspecified"]] + ] + """ + A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the customer sheet displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + + If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + """ + payment_method_remove: NotRequired[Literal["disabled", "enabled"]] + """ + Controls whether the customer sheet displays the option to remove a saved payment method." + + Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + """ + + +class CustomerSessionCreateParamsComponentsMobilePaymentElement(TypedDict): + enabled: bool + """ + Whether the mobile payment element is enabled. + """ + features: NotRequired[ + "CustomerSessionCreateParamsComponentsMobilePaymentElementFeatures" + ] + """ + This hash defines whether the mobile payment element supports certain features. + """ + + +class CustomerSessionCreateParamsComponentsMobilePaymentElementFeatures( + TypedDict, +): + payment_method_allow_redisplay_filters: NotRequired[ + List[Literal["always", "limited", "unspecified"]] + ] + """ + A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the mobile payment element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + + If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + """ + payment_method_redisplay: NotRequired[Literal["disabled", "enabled"]] + """ + Controls whether or not the mobile payment element shows saved payment methods. + """ + payment_method_remove: NotRequired[Literal["disabled", "enabled"]] + """ + Controls whether the mobile payment element displays the option to remove a saved payment method." + + Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + """ + payment_method_save: NotRequired[Literal["disabled", "enabled"]] + """ + Controls whether the mobile payment element displays a checkbox offering to save a new payment method. + + If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + """ + payment_method_save_allow_redisplay_override: NotRequired[ + Literal["always", "limited", "unspecified"] + ] + """ + Allows overriding the value of allow_override when saving a new payment method when payment_method_save is set to disabled. Use values: "always", "limited", or "unspecified". + + If not specified, defaults to `nil` (no override value). + """ + + class CustomerSessionCreateParamsComponentsPaymentElement(TypedDict): enabled: bool """ @@ -107,3 +205,31 @@ class CustomerSessionCreateParamsComponentsPricingTable(TypedDict): """ Whether the pricing table is enabled. """ + + +class CustomerSessionCreateParamsComponentsTaxIdElement(TypedDict): + enabled: bool + """ + Whether the Tax ID Element is enabled. + """ + features: NotRequired[ + "CustomerSessionCreateParamsComponentsTaxIdElementFeatures" + ] + """ + This hash defines whether the Tax ID Element supports certain features. + """ + + +class CustomerSessionCreateParamsComponentsTaxIdElementFeatures(TypedDict): + tax_id_redisplay: NotRequired[Literal["disabled", "enabled"]] + """ + Controls whether the Tax ID Element displays saved tax IDs for the customer. This parameter defaults to `disabled`. + + When enabled, the Tax ID Element will show existing tax IDs associated with the customer, allowing them to select from previously saved tax identification numbers. + """ + tax_id_save: NotRequired[Literal["disabled", "enabled"]] + """ + Controls whether the Tax ID Element allows merchants to save new tax IDs for their customer. This parameter defaults to `disabled`. + + When enabled, customers can enter and save new tax identification numbers during the payment flow, which will be stored securely and associated with their customer object for future use. + """ diff --git a/stripe/params/_file_create_params.py b/stripe/params/_file_create_params.py index 6f60879f4..00b5f427f 100644 --- a/stripe/params/_file_create_params.py +++ b/stripe/params/_file_create_params.py @@ -28,6 +28,7 @@ class FileCreateParams(RequestOptions): "identity_document", "issuing_regulatory_reporting", "pci_document", + "platform_terms_of_service", "tax_document_user_upload", "terminal_android_apk", "terminal_reader_splashscreen", diff --git a/stripe/params/_file_list_params.py b/stripe/params/_file_list_params.py index 527f12cbe..4dcb719d1 100644 --- a/stripe/params/_file_list_params.py +++ b/stripe/params/_file_list_params.py @@ -37,6 +37,7 @@ class FileListParams(RequestOptions): "identity_document_downloadable", "issuing_regulatory_reporting", "pci_document", + "platform_terms_of_service", "selfie", "sigma_scheduled_query", "tax_document_user_upload", diff --git a/stripe/params/_payment_attempt_record_list_params.py b/stripe/params/_payment_attempt_record_list_params.py index 9993a6b2d..b6c453515 100644 --- a/stripe/params/_payment_attempt_record_list_params.py +++ b/stripe/params/_payment_attempt_record_list_params.py @@ -18,3 +18,7 @@ class PaymentAttemptRecordListParams(RequestOptions): """ The ID of the Payment Record. """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ diff --git a/stripe/params/_payment_intent_capture_params.py b/stripe/params/_payment_intent_capture_params.py index 443f35918..c1f9d8123 100644 --- a/stripe/params/_payment_intent_capture_params.py +++ b/stripe/params/_payment_intent_capture_params.py @@ -175,6 +175,10 @@ class PaymentIntentCaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( """ URL to the product page. Max length, 4096 characters. """ + reference: NotRequired[str] + """ + Unique reference for this line item to correlate it with your system's internal records. The field is displayed in the Klarna Consumer App if passed. + """ subscription_reference: NotRequired[str] """ Reference for the subscription this line item is for. diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index 25c31d7e2..3ce26178b 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -246,6 +246,10 @@ class PaymentIntentConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( """ URL to the product page. Max length, 4096 characters. """ + reference: NotRequired[str] + """ + Unique reference for this line item to correlate it with your system's internal records. The field is displayed in the Klarna Consumer App if passed. + """ subscription_reference: NotRequired[str] """ Reference for the subscription this line item is for. diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index 734f66923..197ba3413 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -378,6 +378,10 @@ class PaymentIntentCreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( """ URL to the product page. Max length, 4096 characters. """ + reference: NotRequired[str] + """ + Unique reference for this line item to correlate it with your system's internal records. The field is displayed in the Klarna Consumer App if passed. + """ subscription_reference: NotRequired[str] """ Reference for the subscription this line item is for. diff --git a/stripe/params/_payment_intent_increment_authorization_params.py b/stripe/params/_payment_intent_increment_authorization_params.py index 2409c279e..65d5cc90b 100644 --- a/stripe/params/_payment_intent_increment_authorization_params.py +++ b/stripe/params/_payment_intent_increment_authorization_params.py @@ -185,6 +185,10 @@ class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMetho """ URL to the product page. Max length, 4096 characters. """ + reference: NotRequired[str] + """ + Unique reference for this line item to correlate it with your system's internal records. The field is displayed in the Klarna Consumer App if passed. + """ subscription_reference: NotRequired[str] """ Reference for the subscription this line item is for. diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index a8be3455f..9629ead33 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -265,6 +265,10 @@ class PaymentIntentModifyParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( """ URL to the product page. Max length, 4096 characters. """ + reference: NotRequired[str] + """ + Unique reference for this line item to correlate it with your system's internal records. The field is displayed in the Klarna Consumer App if passed. + """ subscription_reference: NotRequired[str] """ Reference for the subscription this line item is for. diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index 2377db034..a93ced3a1 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -264,6 +264,10 @@ class PaymentIntentUpdateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( """ URL to the product page. Max length, 4096 characters. """ + reference: NotRequired[str] + """ + Unique reference for this line item to correlate it with your system's internal records. The field is displayed in the Klarna Consumer App if passed. + """ subscription_reference: NotRequired[str] """ Reference for the subscription this line item is for. diff --git a/stripe/params/_payment_link_create_params.py b/stripe/params/_payment_link_create_params.py index 3f3cb469a..f579fdbdb 100644 --- a/stripe/params/_payment_link_create_params.py +++ b/stripe/params/_payment_link_create_params.py @@ -70,6 +70,10 @@ class PaymentLinkCreateParams(RequestOptions): """ Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. """ + name_collection: NotRequired["PaymentLinkCreateParamsNameCollection"] + """ + Controls settings applied for collecting the customer's name. + """ on_behalf_of: NotRequired[str] """ The account on behalf of which to charge. @@ -617,6 +621,39 @@ class PaymentLinkCreateParamsLineItemPriceDataRecurring(TypedDict): """ +class PaymentLinkCreateParamsNameCollection(TypedDict): + business: NotRequired["PaymentLinkCreateParamsNameCollectionBusiness"] + """ + Controls settings applied for collecting the customer's business name. + """ + individual: NotRequired["PaymentLinkCreateParamsNameCollectionIndividual"] + """ + Controls settings applied for collecting the customer's individual name. + """ + + +class PaymentLinkCreateParamsNameCollectionBusiness(TypedDict): + enabled: bool + """ + Enable business name collection on the payment link. Defaults to `false`. + """ + optional: NotRequired[bool] + """ + Whether the customer is required to provide their business name before checking out. Defaults to `false`. + """ + + +class PaymentLinkCreateParamsNameCollectionIndividual(TypedDict): + enabled: bool + """ + Enable individual name collection on the payment link. Defaults to `false`. + """ + optional: NotRequired[bool] + """ + Whether the customer is required to provide their full name before checking out. Defaults to `false`. + """ + + class PaymentLinkCreateParamsOptionalItem(TypedDict): adjustable_quantity: NotRequired[ "PaymentLinkCreateParamsOptionalItemAdjustableQuantity" diff --git a/stripe/params/_payment_link_modify_params.py b/stripe/params/_payment_link_modify_params.py index 1cdef040e..03aa05bda 100644 --- a/stripe/params/_payment_link_modify_params.py +++ b/stripe/params/_payment_link_modify_params.py @@ -60,6 +60,12 @@ class PaymentLinkModifyParams(RequestOptions): """ Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. """ + name_collection: NotRequired[ + "Literal['']|PaymentLinkModifyParamsNameCollection" + ] + """ + Controls settings applied for collecting the customer's name. + """ payment_intent_data: NotRequired[ "PaymentLinkModifyParamsPaymentIntentData" ] @@ -437,6 +443,39 @@ class PaymentLinkModifyParamsLineItemAdjustableQuantity(TypedDict): """ +class PaymentLinkModifyParamsNameCollection(TypedDict): + business: NotRequired["PaymentLinkModifyParamsNameCollectionBusiness"] + """ + Controls settings applied for collecting the customer's business name. + """ + individual: NotRequired["PaymentLinkModifyParamsNameCollectionIndividual"] + """ + Controls settings applied for collecting the customer's individual name. + """ + + +class PaymentLinkModifyParamsNameCollectionBusiness(TypedDict): + enabled: bool + """ + Enable business name collection on the payment link. Defaults to `false`. + """ + optional: NotRequired[bool] + """ + Whether the customer is required to provide their business name before checking out. Defaults to `false`. + """ + + +class PaymentLinkModifyParamsNameCollectionIndividual(TypedDict): + enabled: bool + """ + Enable individual name collection on the payment link. Defaults to `false`. + """ + optional: NotRequired[bool] + """ + Whether the customer is required to provide their full name before checking out. Defaults to `false`. + """ + + class PaymentLinkModifyParamsPaymentIntentData(TypedDict): description: NotRequired["Literal['']|str"] """ diff --git a/stripe/params/_payment_link_update_params.py b/stripe/params/_payment_link_update_params.py index 1e475a944..85f0949fd 100644 --- a/stripe/params/_payment_link_update_params.py +++ b/stripe/params/_payment_link_update_params.py @@ -59,6 +59,12 @@ class PaymentLinkUpdateParams(TypedDict): """ Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. """ + name_collection: NotRequired[ + "Literal['']|PaymentLinkUpdateParamsNameCollection" + ] + """ + Controls settings applied for collecting the customer's name. + """ payment_intent_data: NotRequired[ "PaymentLinkUpdateParamsPaymentIntentData" ] @@ -436,6 +442,39 @@ class PaymentLinkUpdateParamsLineItemAdjustableQuantity(TypedDict): """ +class PaymentLinkUpdateParamsNameCollection(TypedDict): + business: NotRequired["PaymentLinkUpdateParamsNameCollectionBusiness"] + """ + Controls settings applied for collecting the customer's business name. + """ + individual: NotRequired["PaymentLinkUpdateParamsNameCollectionIndividual"] + """ + Controls settings applied for collecting the customer's individual name. + """ + + +class PaymentLinkUpdateParamsNameCollectionBusiness(TypedDict): + enabled: bool + """ + Enable business name collection on the payment link. Defaults to `false`. + """ + optional: NotRequired[bool] + """ + Whether the customer is required to provide their business name before checking out. Defaults to `false`. + """ + + +class PaymentLinkUpdateParamsNameCollectionIndividual(TypedDict): + enabled: bool + """ + Enable individual name collection on the payment link. Defaults to `false`. + """ + optional: NotRequired[bool] + """ + Whether the customer is required to provide their full name before checking out. Defaults to `false`. + """ + + class PaymentLinkUpdateParamsPaymentIntentData(TypedDict): description: NotRequired["Literal['']|str"] """ diff --git a/stripe/params/_payment_method_configuration_create_params.py b/stripe/params/_payment_method_configuration_create_params.py index feaec7f07..99e265abe 100644 --- a/stripe/params/_payment_method_configuration_create_params.py +++ b/stripe/params/_payment_method_configuration_create_params.py @@ -82,6 +82,10 @@ class PaymentMethodConfigurationCreateParams(RequestOptions): """ Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. """ + crypto: NotRequired["PaymentMethodConfigurationCreateParamsCrypto"] + """ + [Stablecoin payments](https://stripe.com/docs/payments/stablecoin-payments) enable customers to pay in stablecoins like USDC from 100s of wallets including Phantom and Metamask. + """ customer_balance: NotRequired[ "PaymentMethodConfigurationCreateParamsCustomerBalance" ] @@ -156,6 +160,10 @@ class PaymentMethodConfigurationCreateParams(RequestOptions): """ [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. """ + mb_way: NotRequired["PaymentMethodConfigurationCreateParamsMbWay"] + """ + MB WAY is the most popular wallet in Portugal. After entering their phone number in your checkout, customers approve the payment directly in their MB WAY app. Check this [page](https://stripe.com/docs/payments/mb-way) for more details. + """ mobilepay: NotRequired["PaymentMethodConfigurationCreateParamsMobilepay"] """ MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. @@ -570,6 +578,22 @@ class PaymentMethodConfigurationCreateParamsCashappDisplayPreference( """ +class PaymentMethodConfigurationCreateParamsCrypto(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsCryptoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsCryptoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationCreateParamsCustomerBalance(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationCreateParamsCustomerBalanceDisplayPreference" @@ -842,6 +866,22 @@ class PaymentMethodConfigurationCreateParamsLinkDisplayPreference(TypedDict): """ +class PaymentMethodConfigurationCreateParamsMbWay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsMbWayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsMbWayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationCreateParamsMobilepay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationCreateParamsMobilepayDisplayPreference" diff --git a/stripe/params/_payment_method_configuration_modify_params.py b/stripe/params/_payment_method_configuration_modify_params.py index 4d2ee1627..c95ea3d76 100644 --- a/stripe/params/_payment_method_configuration_modify_params.py +++ b/stripe/params/_payment_method_configuration_modify_params.py @@ -86,6 +86,10 @@ class PaymentMethodConfigurationModifyParams(RequestOptions): """ Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. """ + crypto: NotRequired["PaymentMethodConfigurationModifyParamsCrypto"] + """ + [Stablecoin payments](https://stripe.com/docs/payments/stablecoin-payments) enable customers to pay in stablecoins like USDC from 100s of wallets including Phantom and Metamask. + """ customer_balance: NotRequired[ "PaymentMethodConfigurationModifyParamsCustomerBalance" ] @@ -160,6 +164,10 @@ class PaymentMethodConfigurationModifyParams(RequestOptions): """ [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. """ + mb_way: NotRequired["PaymentMethodConfigurationModifyParamsMbWay"] + """ + MB WAY is the most popular wallet in Portugal. After entering their phone number in your checkout, customers approve the payment directly in their MB WAY app. Check this [page](https://stripe.com/docs/payments/mb-way) for more details. + """ mobilepay: NotRequired["PaymentMethodConfigurationModifyParamsMobilepay"] """ MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. @@ -570,6 +578,22 @@ class PaymentMethodConfigurationModifyParamsCashappDisplayPreference( """ +class PaymentMethodConfigurationModifyParamsCrypto(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsCryptoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsCryptoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationModifyParamsCustomerBalance(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationModifyParamsCustomerBalanceDisplayPreference" @@ -842,6 +866,22 @@ class PaymentMethodConfigurationModifyParamsLinkDisplayPreference(TypedDict): """ +class PaymentMethodConfigurationModifyParamsMbWay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsMbWayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsMbWayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationModifyParamsMobilepay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationModifyParamsMobilepayDisplayPreference" diff --git a/stripe/params/_payment_method_configuration_update_params.py b/stripe/params/_payment_method_configuration_update_params.py index bfdb7b680..5b1e45d6d 100644 --- a/stripe/params/_payment_method_configuration_update_params.py +++ b/stripe/params/_payment_method_configuration_update_params.py @@ -85,6 +85,10 @@ class PaymentMethodConfigurationUpdateParams(TypedDict): """ Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. """ + crypto: NotRequired["PaymentMethodConfigurationUpdateParamsCrypto"] + """ + [Stablecoin payments](https://stripe.com/docs/payments/stablecoin-payments) enable customers to pay in stablecoins like USDC from 100s of wallets including Phantom and Metamask. + """ customer_balance: NotRequired[ "PaymentMethodConfigurationUpdateParamsCustomerBalance" ] @@ -159,6 +163,10 @@ class PaymentMethodConfigurationUpdateParams(TypedDict): """ [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. """ + mb_way: NotRequired["PaymentMethodConfigurationUpdateParamsMbWay"] + """ + MB WAY is the most popular wallet in Portugal. After entering their phone number in your checkout, customers approve the payment directly in their MB WAY app. Check this [page](https://stripe.com/docs/payments/mb-way) for more details. + """ mobilepay: NotRequired["PaymentMethodConfigurationUpdateParamsMobilepay"] """ MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. @@ -569,6 +577,22 @@ class PaymentMethodConfigurationUpdateParamsCashappDisplayPreference( """ +class PaymentMethodConfigurationUpdateParamsCrypto(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsCryptoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsCryptoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationUpdateParamsCustomerBalance(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationUpdateParamsCustomerBalanceDisplayPreference" @@ -841,6 +865,22 @@ class PaymentMethodConfigurationUpdateParamsLinkDisplayPreference(TypedDict): """ +class PaymentMethodConfigurationUpdateParamsMbWay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsMbWayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsMbWayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationUpdateParamsMobilepay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationUpdateParamsMobilepayDisplayPreference" diff --git a/stripe/params/_payment_method_create_params.py b/stripe/params/_payment_method_create_params.py index 334d5b7fa..6d0f80739 100644 --- a/stripe/params/_payment_method_create_params.py +++ b/stripe/params/_payment_method_create_params.py @@ -74,6 +74,10 @@ class PaymentMethodCreateParams(RequestOptions): """ If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. """ + custom: NotRequired["PaymentMethodCreateParamsCustom"] + """ + If this is a `custom` PaymentMethod, this hash contains details about the Custom payment method. + """ customer: NotRequired[str] """ The `Customer` to whom the original PaymentMethod is attached. @@ -271,6 +275,7 @@ class PaymentMethodCreateParams(RequestOptions): "card", "cashapp", "crypto", + "custom", "customer_balance", "eps", "fpx", @@ -502,6 +507,13 @@ class PaymentMethodCreateParamsCrypto(TypedDict): pass +class PaymentMethodCreateParamsCustom(TypedDict): + type: str + """ + ID of the Dashboard-only CustomPaymentMethodType. This field is used by Stripe products' internal code to support CPMs. + """ + + class PaymentMethodCreateParamsCustomerBalance(TypedDict): pass diff --git a/stripe/params/_payment_method_list_params.py b/stripe/params/_payment_method_list_params.py index 1ffdd5d19..6894f0f8b 100644 --- a/stripe/params/_payment_method_list_params.py +++ b/stripe/params/_payment_method_list_params.py @@ -43,6 +43,7 @@ class PaymentMethodListParams(RequestOptions): "card", "cashapp", "crypto", + "custom", "customer_balance", "eps", "fpx", @@ -88,5 +89,5 @@ class PaymentMethodListParams(RequestOptions): ] ] """ - An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + Filters the list by the object `type` field. Unfiltered, the list returns all payment method types except `custom`. If your integration expects only one type of payment method in the response, specify that type value in the request to reduce your payload. """ diff --git a/stripe/params/_payment_record_report_refund_params.py b/stripe/params/_payment_record_report_refund_params.py new file mode 100644 index 000000000..f79bf5bb3 --- /dev/null +++ b/stripe/params/_payment_record_report_refund_params.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentRecordReportRefundParams(RequestOptions): + amount: NotRequired["PaymentRecordReportRefundParamsAmount"] + """ + A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing how much of this payment to refund. Can refund only up to the remaining, unrefunded amount of the payment. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + initiated_at: NotRequired[int] + """ + When the reported refund was initiated. Measured in seconds since the Unix epoch. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + outcome: Literal["refunded"] + """ + The outcome of the reported refund. + """ + processor_details: "PaymentRecordReportRefundParamsProcessorDetails" + """ + Processor information for this refund. + """ + refunded: "PaymentRecordReportRefundParamsRefunded" + """ + Information about the payment attempt refund. + """ + + +class PaymentRecordReportRefundParamsAmount(TypedDict): + currency: str + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: int + """ + A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY. + """ + + +class PaymentRecordReportRefundParamsProcessorDetails(TypedDict): + custom: NotRequired[ + "PaymentRecordReportRefundParamsProcessorDetailsCustom" + ] + """ + Information about the custom processor used to make this refund. + """ + type: Literal["custom"] + """ + The type of the processor details. An additional hash is included on processor_details with a name matching this value. It contains additional information specific to the processor. + """ + + +class PaymentRecordReportRefundParamsProcessorDetailsCustom(TypedDict): + refund_reference: str + """ + A reference to the external refund. This field must be unique across all refunds. + """ + + +class PaymentRecordReportRefundParamsRefunded(TypedDict): + refunded_at: int + """ + When the reported refund completed. Measured in seconds since the Unix epoch. + """ diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index 56c0ee15b..eac17bbd8 100644 --- a/stripe/params/_setup_intent_create_params.py +++ b/stripe/params/_setup_intent_create_params.py @@ -44,6 +44,71 @@ class SetupIntentCreateParams(RequestOptions): """ An arbitrary string attached to the object. Often useful for displaying to users. """ + excluded_payment_method_types: NotRequired[ + List[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + ] + ] + """ + The list of payment method types to exclude from use with this SetupIntent. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index 61ab6344e..87975019e 100644 --- a/stripe/params/_setup_intent_modify_params.py +++ b/stripe/params/_setup_intent_modify_params.py @@ -28,6 +28,12 @@ class SetupIntentModifyParams(RequestOptions): """ An arbitrary string attached to the object. Often useful for displaying to users. """ + excluded_payment_method_types: NotRequired[ + "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + ] + """ + The list of payment method types to exclude from use with this SetupIntent. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index e0d9eaf5f..71240804b 100644 --- a/stripe/params/_setup_intent_update_params.py +++ b/stripe/params/_setup_intent_update_params.py @@ -27,6 +27,12 @@ class SetupIntentUpdateParams(TypedDict): """ An arbitrary string attached to the object. Often useful for displaying to users. """ + excluded_payment_method_types: NotRequired[ + "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + ] + """ + The list of payment method types to exclude from use with this SetupIntent. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. diff --git a/stripe/params/_token_create_params.py b/stripe/params/_token_create_params.py index 26976f7be..658dc00b0 100644 --- a/stripe/params/_token_create_params.py +++ b/stripe/params/_token_create_params.py @@ -142,6 +142,12 @@ class TokenCreateParamsAccountCompany(TypedDict): """ The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). """ + representative_declaration: NotRequired[ + "TokenCreateParamsAccountCompanyRepresentativeDeclaration" + ] + """ + This hash is used to attest that the representative is authorized to act as the representative of their legal entity. + """ structure: NotRequired[ "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" ] @@ -300,6 +306,21 @@ class TokenCreateParamsAccountCompanyRegistrationDate(TypedDict): """ +class TokenCreateParamsAccountCompanyRepresentativeDeclaration(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the representative declaration attestation was made. + """ + ip: NotRequired[str] + """ + The IP address from which the representative declaration attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the representative declaration attestation was made. + """ + + class TokenCreateParamsAccountCompanyVerification(TypedDict): document: NotRequired[ "TokenCreateParamsAccountCompanyVerificationDocument" diff --git a/stripe/params/billing/_credit_grant_create_params.py b/stripe/params/billing/_credit_grant_create_params.py index fe1bc84f3..de037e822 100644 --- a/stripe/params/billing/_credit_grant_create_params.py +++ b/stripe/params/billing/_credit_grant_create_params.py @@ -14,9 +14,9 @@ class CreditGrantCreateParams(RequestOptions): """ Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. """ - category: Literal["paid", "promotional"] + category: NotRequired[Literal["paid", "promotional"]] """ - The category of this credit grant. + The category of this credit grant. It defaults to `paid` if not specified. """ customer: NotRequired[str] """ diff --git a/stripe/params/billing_portal/_configuration_create_params.py b/stripe/params/billing_portal/_configuration_create_params.py index 54501c2df..1265f59ac 100644 --- a/stripe/params/billing_portal/_configuration_create_params.py +++ b/stripe/params/billing_portal/_configuration_create_params.py @@ -109,6 +109,10 @@ class ConfigurationCreateParamsFeaturesPaymentMethodUpdate(TypedDict): """ Whether the feature is enabled. """ + payment_method_configuration: NotRequired["Literal['']|str"] + """ + The [Payment Method Configuration](https://docs.stripe.com/api/payment_method_configurations) to use for this portal session. When specified, customers will be able to update their payment method to one of the options specified by the payment method configuration. If not set or set to an empty string, the default payment method configuration is used. + """ class ConfigurationCreateParamsFeaturesSubscriptionCancel(TypedDict): diff --git a/stripe/params/billing_portal/_configuration_modify_params.py b/stripe/params/billing_portal/_configuration_modify_params.py index 8b48f3425..72cbf435c 100644 --- a/stripe/params/billing_portal/_configuration_modify_params.py +++ b/stripe/params/billing_portal/_configuration_modify_params.py @@ -113,6 +113,10 @@ class ConfigurationModifyParamsFeaturesPaymentMethodUpdate(TypedDict): """ Whether the feature is enabled. """ + payment_method_configuration: NotRequired["Literal['']|str"] + """ + The [Payment Method Configuration](https://docs.stripe.com/api/payment_method_configurations) to use for this portal session. When specified, customers will be able to update their payment method to one of the options specified by the payment method configuration. If not set or set to an empty string, the default payment method configuration is used. + """ class ConfigurationModifyParamsFeaturesSubscriptionCancel(TypedDict): diff --git a/stripe/params/billing_portal/_configuration_update_params.py b/stripe/params/billing_portal/_configuration_update_params.py index f8ab8ae22..084ad54b6 100644 --- a/stripe/params/billing_portal/_configuration_update_params.py +++ b/stripe/params/billing_portal/_configuration_update_params.py @@ -112,6 +112,10 @@ class ConfigurationUpdateParamsFeaturesPaymentMethodUpdate(TypedDict): """ Whether the feature is enabled. """ + payment_method_configuration: NotRequired["Literal['']|str"] + """ + The [Payment Method Configuration](https://docs.stripe.com/api/payment_method_configurations) to use for this portal session. When specified, customers will be able to update their payment method to one of the options specified by the payment method configuration. If not set or set to an empty string, the default payment method configuration is used. + """ class ConfigurationUpdateParamsFeaturesSubscriptionCancel(TypedDict): diff --git a/stripe/params/checkout/__init__.py b/stripe/params/checkout/__init__.py index b9ef06bae..d3a183bca 100644 --- a/stripe/params/checkout/__init__.py +++ b/stripe/params/checkout/__init__.py @@ -104,6 +104,7 @@ SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions as SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions, SessionCreateParamsPaymentMethodOptionsSofort as SessionCreateParamsPaymentMethodOptionsSofort, SessionCreateParamsPaymentMethodOptionsSwish as SessionCreateParamsPaymentMethodOptionsSwish, + SessionCreateParamsPaymentMethodOptionsTwint as SessionCreateParamsPaymentMethodOptionsTwint, SessionCreateParamsPaymentMethodOptionsUsBankAccount as SessionCreateParamsPaymentMethodOptionsUsBankAccount, SessionCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections as SessionCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections, SessionCreateParamsPaymentMethodOptionsWechatPay as SessionCreateParamsPaymentMethodOptionsWechatPay, @@ -604,6 +605,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsPaymentMethodOptionsTwint": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsPaymentMethodOptionsUsBankAccount": ( "stripe.params.checkout._session_create_params", False, diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index 2dfc97ea7..2017e84a2 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -514,7 +514,7 @@ class SessionCreateParamsBrandingSettings(TypedDict): """ display_name: NotRequired[str] """ - A string to override the business name shown on the Checkout Session. + A string to override the business name shown on the Checkout Session. This only shows at the top of the Checkout page, and your business name still appears in terms, receipts, and other places. """ font_family: NotRequired[ "Literal['']|Literal['be_vietnam_pro', 'bitter', 'chakra_petch', 'default', 'hahmlet', 'inconsolata', 'inter', 'lato', 'lora', 'm_plus_1_code', 'montserrat', 'noto_sans', 'noto_sans_jp', 'noto_serif', 'nunito', 'open_sans', 'pridi', 'pt_sans', 'pt_serif', 'raleway', 'roboto', 'roboto_slab', 'source_sans_pro', 'titillium_web', 'ubuntu_mono', 'zen_maru_gothic']" @@ -524,11 +524,11 @@ class SessionCreateParamsBrandingSettings(TypedDict): """ icon: NotRequired["SessionCreateParamsBrandingSettingsIcon"] """ - The icon for the Checkout Session. You cannot set both `logo` and `icon`. + The icon for the Checkout Session. For best results, use a square image. """ logo: NotRequired["SessionCreateParamsBrandingSettingsLogo"] """ - The logo for the Checkout Session. You cannot set both `logo` and `icon`. + The logo for the Checkout Session. """ @@ -1398,6 +1398,10 @@ class SessionCreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Swish payment method options. """ + twint: NotRequired["SessionCreateParamsPaymentMethodOptionsTwint"] + """ + contains details about the TWINT payment method options. + """ us_bank_account: NotRequired[ "SessionCreateParamsPaymentMethodOptionsUsBankAccount" ] @@ -2411,6 +2415,19 @@ class SessionCreateParamsPaymentMethodOptionsSwish(TypedDict): """ +class SessionCreateParamsPaymentMethodOptionsTwint(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + class SessionCreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): financial_connections: NotRequired[ "SessionCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" diff --git a/stripe/params/tax/__init__.py b/stripe/params/tax/__init__.py index c6cf0ff6e..0db0a9dca 100644 --- a/stripe/params/tax/__init__.py +++ b/stripe/params/tax/__init__.py @@ -183,6 +183,7 @@ RegistrationCreateParamsCountryOptionsTh as RegistrationCreateParamsCountryOptionsTh, RegistrationCreateParamsCountryOptionsTj as RegistrationCreateParamsCountryOptionsTj, RegistrationCreateParamsCountryOptionsTr as RegistrationCreateParamsCountryOptionsTr, + RegistrationCreateParamsCountryOptionsTw as RegistrationCreateParamsCountryOptionsTw, RegistrationCreateParamsCountryOptionsTz as RegistrationCreateParamsCountryOptionsTz, RegistrationCreateParamsCountryOptionsUa as RegistrationCreateParamsCountryOptionsUa, RegistrationCreateParamsCountryOptionsUg as RegistrationCreateParamsCountryOptionsUg, @@ -884,6 +885,10 @@ "stripe.params.tax._registration_create_params", False, ), + "RegistrationCreateParamsCountryOptionsTw": ( + "stripe.params.tax._registration_create_params", + False, + ), "RegistrationCreateParamsCountryOptionsTz": ( "stripe.params.tax._registration_create_params", False, diff --git a/stripe/params/tax/_registration_create_params.py b/stripe/params/tax/_registration_create_params.py index 2ea18e073..cca7d5c29 100644 --- a/stripe/params/tax/_registration_create_params.py +++ b/stripe/params/tax/_registration_create_params.py @@ -388,6 +388,10 @@ class RegistrationCreateParamsCountryOptions( """ Options for the registration in TR. """ + tw: NotRequired["RegistrationCreateParamsCountryOptionsTw"] + """ + Options for the registration in TW. + """ tz: NotRequired["RegistrationCreateParamsCountryOptionsTz"] """ Options for the registration in TZ. @@ -1714,6 +1718,13 @@ class RegistrationCreateParamsCountryOptionsTr(TypedDict): """ +class RegistrationCreateParamsCountryOptionsTw(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + class RegistrationCreateParamsCountryOptionsTz(TypedDict): type: Literal["simplified"] """ diff --git a/stripe/params/terminal/__init__.py b/stripe/params/terminal/__init__.py index c1cdd38a8..37b428948 100644 --- a/stripe/params/terminal/__init__.py +++ b/stripe/params/terminal/__init__.py @@ -22,6 +22,7 @@ ConfigurationCreateParamsTippingDkk as ConfigurationCreateParamsTippingDkk, ConfigurationCreateParamsTippingEur as ConfigurationCreateParamsTippingEur, ConfigurationCreateParamsTippingGbp as ConfigurationCreateParamsTippingGbp, + ConfigurationCreateParamsTippingGip as ConfigurationCreateParamsTippingGip, ConfigurationCreateParamsTippingHkd as ConfigurationCreateParamsTippingHkd, ConfigurationCreateParamsTippingHuf as ConfigurationCreateParamsTippingHuf, ConfigurationCreateParamsTippingJpy as ConfigurationCreateParamsTippingJpy, @@ -64,6 +65,7 @@ ConfigurationModifyParamsTippingDkk as ConfigurationModifyParamsTippingDkk, ConfigurationModifyParamsTippingEur as ConfigurationModifyParamsTippingEur, ConfigurationModifyParamsTippingGbp as ConfigurationModifyParamsTippingGbp, + ConfigurationModifyParamsTippingGip as ConfigurationModifyParamsTippingGip, ConfigurationModifyParamsTippingHkd as ConfigurationModifyParamsTippingHkd, ConfigurationModifyParamsTippingHuf as ConfigurationModifyParamsTippingHuf, ConfigurationModifyParamsTippingJpy as ConfigurationModifyParamsTippingJpy, @@ -103,6 +105,7 @@ ConfigurationUpdateParamsTippingDkk as ConfigurationUpdateParamsTippingDkk, ConfigurationUpdateParamsTippingEur as ConfigurationUpdateParamsTippingEur, ConfigurationUpdateParamsTippingGbp as ConfigurationUpdateParamsTippingGbp, + ConfigurationUpdateParamsTippingGip as ConfigurationUpdateParamsTippingGip, ConfigurationUpdateParamsTippingHkd as ConfigurationUpdateParamsTippingHkd, ConfigurationUpdateParamsTippingHuf as ConfigurationUpdateParamsTippingHuf, ConfigurationUpdateParamsTippingJpy as ConfigurationUpdateParamsTippingJpy, @@ -298,6 +301,10 @@ "stripe.params.terminal._configuration_create_params", False, ), + "ConfigurationCreateParamsTippingGip": ( + "stripe.params.terminal._configuration_create_params", + False, + ), "ConfigurationCreateParamsTippingHkd": ( "stripe.params.terminal._configuration_create_params", False, @@ -442,6 +449,10 @@ "stripe.params.terminal._configuration_modify_params", False, ), + "ConfigurationModifyParamsTippingGip": ( + "stripe.params.terminal._configuration_modify_params", + False, + ), "ConfigurationModifyParamsTippingHkd": ( "stripe.params.terminal._configuration_modify_params", False, @@ -582,6 +593,10 @@ "stripe.params.terminal._configuration_update_params", False, ), + "ConfigurationUpdateParamsTippingGip": ( + "stripe.params.terminal._configuration_update_params", + False, + ), "ConfigurationUpdateParamsTippingHkd": ( "stripe.params.terminal._configuration_update_params", False, diff --git a/stripe/params/terminal/_configuration_create_params.py b/stripe/params/terminal/_configuration_create_params.py index 82fd97f3e..9109080da 100644 --- a/stripe/params/terminal/_configuration_create_params.py +++ b/stripe/params/terminal/_configuration_create_params.py @@ -137,6 +137,10 @@ class ConfigurationCreateParamsTipping(TypedDict): """ Tipping configuration for GBP """ + gip: NotRequired["ConfigurationCreateParamsTippingGip"] + """ + Tipping configuration for GIP + """ hkd: NotRequired["ConfigurationCreateParamsTippingHkd"] """ Tipping configuration for HKD @@ -322,6 +326,21 @@ class ConfigurationCreateParamsTippingGbp(TypedDict): """ +class ConfigurationCreateParamsTippingGip(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + class ConfigurationCreateParamsTippingHkd(TypedDict): fixed_amounts: NotRequired[List[int]] """ diff --git a/stripe/params/terminal/_configuration_modify_params.py b/stripe/params/terminal/_configuration_modify_params.py index fa5e50c48..5356eb67a 100644 --- a/stripe/params/terminal/_configuration_modify_params.py +++ b/stripe/params/terminal/_configuration_modify_params.py @@ -145,6 +145,10 @@ class ConfigurationModifyParamsTipping(TypedDict): """ Tipping configuration for GBP """ + gip: NotRequired["ConfigurationModifyParamsTippingGip"] + """ + Tipping configuration for GIP + """ hkd: NotRequired["ConfigurationModifyParamsTippingHkd"] """ Tipping configuration for HKD @@ -330,6 +334,21 @@ class ConfigurationModifyParamsTippingGbp(TypedDict): """ +class ConfigurationModifyParamsTippingGip(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + class ConfigurationModifyParamsTippingHkd(TypedDict): fixed_amounts: NotRequired[List[int]] """ diff --git a/stripe/params/terminal/_configuration_update_params.py b/stripe/params/terminal/_configuration_update_params.py index 6e0785a0b..93806b36f 100644 --- a/stripe/params/terminal/_configuration_update_params.py +++ b/stripe/params/terminal/_configuration_update_params.py @@ -144,6 +144,10 @@ class ConfigurationUpdateParamsTipping(TypedDict): """ Tipping configuration for GBP """ + gip: NotRequired["ConfigurationUpdateParamsTippingGip"] + """ + Tipping configuration for GIP + """ hkd: NotRequired["ConfigurationUpdateParamsTippingHkd"] """ Tipping configuration for HKD @@ -329,6 +333,21 @@ class ConfigurationUpdateParamsTippingGbp(TypedDict): """ +class ConfigurationUpdateParamsTippingGip(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + class ConfigurationUpdateParamsTippingHkd(TypedDict): fixed_amounts: NotRequired[List[int]] """ diff --git a/stripe/params/terminal/_reader_collect_inputs_params.py b/stripe/params/terminal/_reader_collect_inputs_params.py index 90ca68798..e66b3c064 100644 --- a/stripe/params/terminal/_reader_collect_inputs_params.py +++ b/stripe/params/terminal/_reader_collect_inputs_params.py @@ -12,7 +12,7 @@ class ReaderCollectInputsParams(RequestOptions): """ inputs: List["ReaderCollectInputsParamsInput"] """ - List of inputs to be collected using the Reader + List of inputs to be collected from the customer using the Reader. Maximum 5 inputs. """ metadata: NotRequired[Dict[str, str]] """ @@ -52,11 +52,11 @@ class ReaderCollectInputsParamsInputCustomText(TypedDict): """ skip_button: NotRequired[str] """ - The skip button text + Custom text for the skip button. Maximum 14 characters. """ submit_button: NotRequired[str] """ - The submit button text + Custom text for the submit button. Maximum 30 characters. """ title: str """ @@ -78,7 +78,7 @@ class ReaderCollectInputsParamsInputSelectionChoice(TypedDict): """ style: NotRequired[Literal["primary", "secondary"]] """ - The style of the button which will be shown for this choice + The style of the button which will be shown for this choice. Can be `primary` or `secondary`. """ text: str """ @@ -89,13 +89,13 @@ class ReaderCollectInputsParamsInputSelectionChoice(TypedDict): class ReaderCollectInputsParamsInputToggle(TypedDict): default_value: NotRequired[Literal["disabled", "enabled"]] """ - The default value of the toggle + The default value of the toggle. Can be `enabled` or `disabled`. """ description: NotRequired[str] """ - The description which will be displayed for the toggle + The description which will be displayed for the toggle. Maximum 50 characters. At least one of title or description must be provided. """ title: NotRequired[str] """ - The title which will be displayed for the toggle + The title which will be displayed for the toggle. Maximum 50 characters. At least one of title or description must be provided. """ diff --git a/stripe/params/terminal/_reader_collect_payment_method_params.py b/stripe/params/terminal/_reader_collect_payment_method_params.py index f6572c95e..f402dc90a 100644 --- a/stripe/params/terminal/_reader_collect_payment_method_params.py +++ b/stripe/params/terminal/_reader_collect_payment_method_params.py @@ -10,7 +10,7 @@ class ReaderCollectPaymentMethodParams(RequestOptions): "ReaderCollectPaymentMethodParamsCollectConfig" ] """ - Configuration overrides. + Configuration overrides for this collection, such as tipping, surcharging, and customer cancellation settings. """ expand: NotRequired[List[str]] """ @@ -18,7 +18,7 @@ class ReaderCollectPaymentMethodParams(RequestOptions): """ payment_intent: str """ - PaymentIntent ID. + The ID of the PaymentIntent to collect a payment method for. """ diff --git a/stripe/params/terminal/_reader_confirm_payment_intent_params.py b/stripe/params/terminal/_reader_confirm_payment_intent_params.py index 47785c3fa..e7bdba441 100644 --- a/stripe/params/terminal/_reader_confirm_payment_intent_params.py +++ b/stripe/params/terminal/_reader_confirm_payment_intent_params.py @@ -10,7 +10,7 @@ class ReaderConfirmPaymentIntentParams(RequestOptions): "ReaderConfirmPaymentIntentParamsConfirmConfig" ] """ - Configuration overrides. + Configuration overrides for this confirmation, such as surcharge settings and return URL. """ expand: NotRequired[List[str]] """ @@ -18,7 +18,7 @@ class ReaderConfirmPaymentIntentParams(RequestOptions): """ payment_intent: str """ - PaymentIntent ID. + The ID of the PaymentIntent to confirm. """ diff --git a/stripe/params/terminal/_reader_present_payment_method_params.py b/stripe/params/terminal/_reader_present_payment_method_params.py index c73ce6ea1..000061f71 100644 --- a/stripe/params/terminal/_reader_present_payment_method_params.py +++ b/stripe/params/terminal/_reader_present_payment_method_params.py @@ -63,5 +63,5 @@ class ReaderPresentPaymentMethodParamsCardPresent(TypedDict): class ReaderPresentPaymentMethodParamsInteracPresent(TypedDict): number: NotRequired[str] """ - Card Number + The Interac card number. """ diff --git a/stripe/params/terminal/_reader_process_payment_intent_params.py b/stripe/params/terminal/_reader_process_payment_intent_params.py index e1207d8ae..267333ce1 100644 --- a/stripe/params/terminal/_reader_process_payment_intent_params.py +++ b/stripe/params/terminal/_reader_process_payment_intent_params.py @@ -12,13 +12,13 @@ class ReaderProcessPaymentIntentParams(RequestOptions): """ payment_intent: str """ - PaymentIntent ID + The ID of the PaymentIntent to process on the reader. """ process_config: NotRequired[ "ReaderProcessPaymentIntentParamsProcessConfig" ] """ - Configuration overrides + Configuration overrides for this transaction, such as tipping and customer cancellation settings. """ diff --git a/stripe/params/terminal/_reader_process_setup_intent_params.py b/stripe/params/terminal/_reader_process_setup_intent_params.py index 0f98f8bb1..373e2ec05 100644 --- a/stripe/params/terminal/_reader_process_setup_intent_params.py +++ b/stripe/params/terminal/_reader_process_setup_intent_params.py @@ -16,11 +16,11 @@ class ReaderProcessSetupIntentParams(RequestOptions): """ process_config: NotRequired["ReaderProcessSetupIntentParamsProcessConfig"] """ - Configuration overrides + Configuration overrides for this setup, such as MOTO and customer cancellation settings. """ setup_intent: str """ - SetupIntent ID + The ID of the SetupIntent to process on the reader. """ diff --git a/stripe/params/terminal/_reader_refund_payment_params.py b/stripe/params/terminal/_reader_refund_payment_params.py index 2cb33c244..9d1a0297c 100644 --- a/stripe/params/terminal/_reader_refund_payment_params.py +++ b/stripe/params/terminal/_reader_refund_payment_params.py @@ -34,7 +34,7 @@ class ReaderRefundPaymentParams(RequestOptions): "ReaderRefundPaymentParamsRefundPaymentConfig" ] """ - Configuration overrides + Configuration overrides for this refund, such as customer cancellation settings. """ reverse_transfer: NotRequired[bool] """ diff --git a/stripe/params/terminal/_reader_set_reader_display_params.py b/stripe/params/terminal/_reader_set_reader_display_params.py index bc4b3f77c..448aa8917 100644 --- a/stripe/params/terminal/_reader_set_reader_display_params.py +++ b/stripe/params/terminal/_reader_set_reader_display_params.py @@ -8,7 +8,7 @@ class ReaderSetReaderDisplayParams(RequestOptions): cart: NotRequired["ReaderSetReaderDisplayParamsCart"] """ - Cart + Cart details to display on the reader screen, including line items, amounts, and currency. """ expand: NotRequired[List[str]] """ @@ -16,7 +16,7 @@ class ReaderSetReaderDisplayParams(RequestOptions): """ type: Literal["cart"] """ - Type + Type of information to display. Only `cart` is currently supported. """ @@ -27,22 +27,22 @@ class ReaderSetReaderDisplayParamsCart(TypedDict): """ line_items: List["ReaderSetReaderDisplayParamsCartLineItem"] """ - Array of line items that were purchased. + Array of line items to display. """ tax: NotRequired[int] """ - The amount of tax in cents. + The amount of tax in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). """ total: int """ - Total balance of cart due in cents. + Total balance of cart due in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). """ class ReaderSetReaderDisplayParamsCartLineItem(TypedDict): amount: int """ - The price of the item in cents. + The price of the item in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). """ description: str """ diff --git a/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py b/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py index 333fcb456..74561c821 100644 --- a/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py +++ b/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py @@ -62,5 +62,5 @@ class ReaderPresentPaymentMethodParamsCardPresent(TypedDict): class ReaderPresentPaymentMethodParamsInteracPresent(TypedDict): number: NotRequired[str] """ - Card Number + The Interac card number. """ diff --git a/stripe/params/v2/billing/_collection_setting_create_params.py b/stripe/params/v2/billing/_collection_setting_create_params.py index aac0b70bb..ed39245df 100644 --- a/stripe/params/v2/billing/_collection_setting_create_params.py +++ b/stripe/params/v2/billing/_collection_setting_create_params.py @@ -43,7 +43,7 @@ class CollectionSettingCreateParamsEmailDelivery(TypedDict): "CollectionSettingCreateParamsEmailDeliveryPaymentDue" ] """ - Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state. + Controls emails for when the payment is due. For example after the invoice is finalized and transitions to Open state. """ @@ -54,7 +54,7 @@ class CollectionSettingCreateParamsEmailDeliveryPaymentDue(TypedDict): """ include_payment_link: bool """ - If true the payment link to hosted invocie page would be included in email and PDF of the invoice. + If true the payment link to hosted invoice page would be included in email and PDF of the invoice. """ diff --git a/stripe/params/v2/billing/_collection_setting_update_params.py b/stripe/params/v2/billing/_collection_setting_update_params.py index 70c3b861c..5faa7ad6e 100644 --- a/stripe/params/v2/billing/_collection_setting_update_params.py +++ b/stripe/params/v2/billing/_collection_setting_update_params.py @@ -49,7 +49,7 @@ class CollectionSettingUpdateParamsEmailDelivery(TypedDict): "CollectionSettingUpdateParamsEmailDeliveryPaymentDue" ] """ - Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state. + Controls emails for when the payment is due. For example after the invoice is finalized and transitions to Open state. """ @@ -60,7 +60,7 @@ class CollectionSettingUpdateParamsEmailDeliveryPaymentDue(TypedDict): """ include_payment_link: bool """ - If true the payment link to hosted invocie page would be included in email and PDF of the invoice. + If true the payment link to hosted invoice page would be included in email and PDF of the invoice. """ diff --git a/stripe/params/v2/core/__init__.py b/stripe/params/v2/core/__init__.py index a302ba09d..ebea71a57 100644 --- a/stripe/params/v2/core/__init__.py +++ b/stripe/params/v2/core/__init__.py @@ -88,6 +88,7 @@ AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts as AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts, AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrencies as AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrencies, AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp as AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp, + AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd as AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd, AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfers as AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfers, AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts as AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts, AccountCreateParamsConfigurationStorerCapabilitiesOutboundPayments as AccountCreateParamsConfigurationStorerCapabilitiesOutboundPayments, @@ -105,6 +106,7 @@ AccountCreateParamsIdentityAttestationsDirectorshipDeclaration as AccountCreateParamsIdentityAttestationsDirectorshipDeclaration, AccountCreateParamsIdentityAttestationsOwnershipDeclaration as AccountCreateParamsIdentityAttestationsOwnershipDeclaration, AccountCreateParamsIdentityAttestationsPersonsProvided as AccountCreateParamsIdentityAttestationsPersonsProvided, + AccountCreateParamsIdentityAttestationsRepresentativeDeclaration as AccountCreateParamsIdentityAttestationsRepresentativeDeclaration, AccountCreateParamsIdentityAttestationsTermsOfService as AccountCreateParamsIdentityAttestationsTermsOfService, AccountCreateParamsIdentityAttestationsTermsOfServiceAccount as AccountCreateParamsIdentityAttestationsTermsOfServiceAccount, AccountCreateParamsIdentityAttestationsTermsOfServiceStorer as AccountCreateParamsIdentityAttestationsTermsOfServiceStorer, @@ -247,6 +249,7 @@ AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts as AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts, AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies as AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies, AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp as AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp, + AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd as AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd, AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfers as AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfers, AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts as AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts, AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPayments as AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPayments, @@ -264,6 +267,7 @@ AccountUpdateParamsIdentityAttestationsDirectorshipDeclaration as AccountUpdateParamsIdentityAttestationsDirectorshipDeclaration, AccountUpdateParamsIdentityAttestationsOwnershipDeclaration as AccountUpdateParamsIdentityAttestationsOwnershipDeclaration, AccountUpdateParamsIdentityAttestationsPersonsProvided as AccountUpdateParamsIdentityAttestationsPersonsProvided, + AccountUpdateParamsIdentityAttestationsRepresentativeDeclaration as AccountUpdateParamsIdentityAttestationsRepresentativeDeclaration, AccountUpdateParamsIdentityAttestationsTermsOfService as AccountUpdateParamsIdentityAttestationsTermsOfService, AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount as AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount, AccountUpdateParamsIdentityAttestationsTermsOfServiceStorer as AccountUpdateParamsIdentityAttestationsTermsOfServiceStorer, @@ -670,6 +674,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfers": ( "stripe.params.v2.core._account_create_params", False, @@ -738,6 +746,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsIdentityAttestationsRepresentativeDeclaration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsIdentityAttestationsTermsOfService": ( "stripe.params.v2.core._account_create_params", False, @@ -1271,6 +1283,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfers": ( "stripe.params.v2.core._account_update_params", False, @@ -1339,6 +1355,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsIdentityAttestationsRepresentativeDeclaration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsIdentityAttestationsTermsOfService": ( "stripe.params.v2.core._account_update_params", False, diff --git a/stripe/params/v2/core/_account_create_params.py b/stripe/params/v2/core/_account_create_params.py index 6cae37523..810e226b9 100644 --- a/stripe/params/v2/core/_account_create_params.py +++ b/stripe/params/v2/core/_account_create_params.py @@ -108,7 +108,12 @@ class AccountCreateParamsConfigurationCustomerAutomaticIndirectTax(TypedDict): A recent IP address of the customer used for tax reporting and tax location inference. """ location_source: NotRequired[ - Literal["identity_address", "ip_address", "shipping_address"] + Literal[ + "identity_address", + "ip_address", + "payment_method", + "shipping_address", + ] ] """ The data source used to identify the customer's tax location - defaults to 'identity_address'. Will only be used for automatic tax calculation on the customer's Invoices and Subscriptions. @@ -1217,6 +1222,12 @@ class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrencies( """ Can hold storage-type funds on Stripe in GBP. """ + usd: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd" + ] + """ + Can hold storage-type funds on Stripe in USD. + """ class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp( @@ -1228,6 +1239,15 @@ class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp( """ +class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + class AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfers( TypedDict, ): @@ -1459,7 +1479,9 @@ class AccountCreateParamsDefaultsProfile(TypedDict): class AccountCreateParamsDefaultsResponsibilities(TypedDict): - fees_collector: Literal["application", "stripe"] + fees_collector: Literal[ + "application", "application_custom", "application_express", "stripe" + ] """ A value indicating the party responsible for collecting fees from this account. """ @@ -1472,7 +1494,7 @@ class AccountCreateParamsDefaultsResponsibilities(TypedDict): class AccountCreateParamsIdentity(TypedDict): attestations: NotRequired["AccountCreateParamsIdentityAttestations"] """ - Attestations from the identity's key people, e.g. owners, executives, directors. + Attestations from the identity's key people, e.g. owners, executives, directors, representatives. """ business_details: NotRequired["AccountCreateParamsIdentityBusinessDetails"] """ @@ -1513,6 +1535,12 @@ class AccountCreateParamsIdentityAttestations(TypedDict): """ Attestation that all Persons with a specific Relationship value have been provided. """ + representative_declaration: NotRequired[ + "AccountCreateParamsIdentityAttestationsRepresentativeDeclaration" + ] + """ + This hash is used to attest that the representative is authorized to act as the representative of their legal entity. + """ terms_of_service: NotRequired[ "AccountCreateParamsIdentityAttestationsTermsOfService" ] @@ -1577,6 +1605,23 @@ class AccountCreateParamsIdentityAttestationsPersonsProvided(TypedDict): """ +class AccountCreateParamsIdentityAttestationsRepresentativeDeclaration( + TypedDict, +): + date: NotRequired[str] + """ + The time marking when the representative attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: NotRequired[str] + """ + The IP address from which the representative attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the representative attestation was made. + """ + + class AccountCreateParamsIdentityAttestationsTermsOfService(TypedDict): account: NotRequired[ "AccountCreateParamsIdentityAttestationsTermsOfServiceAccount" diff --git a/stripe/params/v2/core/_account_list_params.py b/stripe/params/v2/core/_account_list_params.py index 18b4dee2d..3b1c551fe 100644 --- a/stripe/params/v2/core/_account_list_params.py +++ b/stripe/params/v2/core/_account_list_params.py @@ -9,6 +9,10 @@ class AccountListParams(TypedDict): """ Filter only accounts that have all of the configurations specified. If omitted, returns all accounts regardless of which configurations they have. """ + closed: NotRequired[bool] + """ + Filter by whether the account is closed. If omitted, returns only Accounts that are not closed. + """ limit: NotRequired[int] """ The upper limit on the number of accounts returned by the List Account request. diff --git a/stripe/params/v2/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py index 7fda01b6b..c63a98c02 100644 --- a/stripe/params/v2/core/_account_update_params.py +++ b/stripe/params/v2/core/_account_update_params.py @@ -112,7 +112,12 @@ class AccountUpdateParamsConfigurationCustomerAutomaticIndirectTax(TypedDict): A recent IP address of the customer used for tax reporting and tax location inference. """ location_source: NotRequired[ - Literal["identity_address", "ip_address", "shipping_address"] + Literal[ + "identity_address", + "ip_address", + "payment_method", + "shipping_address", + ] ] """ The data source used to identify the customer's tax location - defaults to 'identity_address'. Will only be used for automatic tax calculation on the customer's Invoices and Subscriptions. @@ -1245,6 +1250,12 @@ class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies( """ Can hold storage-type funds on Stripe in GBP. """ + usd: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd" + ] + """ + Can hold storage-type funds on Stripe in USD. + """ class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp( @@ -1256,6 +1267,15 @@ class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp( """ +class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + class AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfers( TypedDict, ): @@ -1487,7 +1507,9 @@ class AccountUpdateParamsDefaultsProfile(TypedDict): class AccountUpdateParamsDefaultsResponsibilities(TypedDict): - fees_collector: Literal["application", "stripe"] + fees_collector: Literal[ + "application", "application_custom", "application_express", "stripe" + ] """ A value indicating the party responsible for collecting fees from this account. """ @@ -1500,7 +1522,7 @@ class AccountUpdateParamsDefaultsResponsibilities(TypedDict): class AccountUpdateParamsIdentity(TypedDict): attestations: NotRequired["AccountUpdateParamsIdentityAttestations"] """ - Attestations from the identity's key people, e.g. owners, executives, directors. + Attestations from the identity's key people, e.g. owners, executives, directors, representatives. """ business_details: NotRequired["AccountUpdateParamsIdentityBusinessDetails"] """ @@ -1541,6 +1563,12 @@ class AccountUpdateParamsIdentityAttestations(TypedDict): """ Attestation that all Persons with a specific Relationship value have been provided. """ + representative_declaration: NotRequired[ + "AccountUpdateParamsIdentityAttestationsRepresentativeDeclaration" + ] + """ + This hash is used to attest that the representative is authorized to act as the representative of their legal entity. + """ terms_of_service: NotRequired[ "AccountUpdateParamsIdentityAttestationsTermsOfService" ] @@ -1605,6 +1633,23 @@ class AccountUpdateParamsIdentityAttestationsPersonsProvided(TypedDict): """ +class AccountUpdateParamsIdentityAttestationsRepresentativeDeclaration( + TypedDict, +): + date: NotRequired[str] + """ + The time marking when the representative attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: NotRequired[str] + """ + The IP address from which the representative attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the representative attestation was made. + """ + + class AccountUpdateParamsIdentityAttestationsTermsOfService(TypedDict): account: NotRequired[ "AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount" diff --git a/stripe/params/v2/core/_event_list_params.py b/stripe/params/v2/core/_event_list_params.py index 364815d48..da7f96049 100644 --- a/stripe/params/v2/core/_event_list_params.py +++ b/stripe/params/v2/core/_event_list_params.py @@ -1,14 +1,35 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from typing import List from typing_extensions import NotRequired, TypedDict class EventListParams(TypedDict): + gt: NotRequired[str] + """ + Filter for events created after the specified timestamp. + """ + gte: NotRequired[str] + """ + Filter for events created at or after the specified timestamp. + """ limit: NotRequired[int] """ The page size. """ - object_id: str + lt: NotRequired[str] + """ + Filter for events created before the specified timestamp. + """ + lte: NotRequired[str] + """ + Filter for events created at or before the specified timestamp. + """ + object_id: NotRequired[str] """ Primary object ID used to retrieve related events. """ + types: NotRequired[List[str]] + """ + An array of up to 20 strings containing specific event names. + """ diff --git a/stripe/params/v2/core/vault/__init__.py b/stripe/params/v2/core/vault/__init__.py index d2f17e133..cb6115ae9 100644 --- a/stripe/params/v2/core/vault/__init__.py +++ b/stripe/params/v2/core/vault/__init__.py @@ -17,18 +17,30 @@ from stripe.params.v2.core.vault._gb_bank_account_initiate_confirmation_of_payee_params import ( GbBankAccountInitiateConfirmationOfPayeeParams as GbBankAccountInitiateConfirmationOfPayeeParams, ) + from stripe.params.v2.core.vault._gb_bank_account_list_params import ( + GbBankAccountListParams as GbBankAccountListParams, + ) from stripe.params.v2.core.vault._gb_bank_account_retrieve_params import ( GbBankAccountRetrieveParams as GbBankAccountRetrieveParams, ) from stripe.params.v2.core.vault._us_bank_account_archive_params import ( UsBankAccountArchiveParams as UsBankAccountArchiveParams, ) + from stripe.params.v2.core.vault._us_bank_account_confirm_microdeposits_params import ( + UsBankAccountConfirmMicrodepositsParams as UsBankAccountConfirmMicrodepositsParams, + ) from stripe.params.v2.core.vault._us_bank_account_create_params import ( UsBankAccountCreateParams as UsBankAccountCreateParams, ) + from stripe.params.v2.core.vault._us_bank_account_list_params import ( + UsBankAccountListParams as UsBankAccountListParams, + ) from stripe.params.v2.core.vault._us_bank_account_retrieve_params import ( UsBankAccountRetrieveParams as UsBankAccountRetrieveParams, ) + from stripe.params.v2.core.vault._us_bank_account_send_microdeposits_params import ( + UsBankAccountSendMicrodepositsParams as UsBankAccountSendMicrodepositsParams, + ) from stripe.params.v2.core.vault._us_bank_account_update_params import ( UsBankAccountUpdateParams as UsBankAccountUpdateParams, ) @@ -55,6 +67,10 @@ "stripe.params.v2.core.vault._gb_bank_account_initiate_confirmation_of_payee_params", False, ), + "GbBankAccountListParams": ( + "stripe.params.v2.core.vault._gb_bank_account_list_params", + False, + ), "GbBankAccountRetrieveParams": ( "stripe.params.v2.core.vault._gb_bank_account_retrieve_params", False, @@ -63,14 +79,26 @@ "stripe.params.v2.core.vault._us_bank_account_archive_params", False, ), + "UsBankAccountConfirmMicrodepositsParams": ( + "stripe.params.v2.core.vault._us_bank_account_confirm_microdeposits_params", + False, + ), "UsBankAccountCreateParams": ( "stripe.params.v2.core.vault._us_bank_account_create_params", False, ), + "UsBankAccountListParams": ( + "stripe.params.v2.core.vault._us_bank_account_list_params", + False, + ), "UsBankAccountRetrieveParams": ( "stripe.params.v2.core.vault._us_bank_account_retrieve_params", False, ), + "UsBankAccountSendMicrodepositsParams": ( + "stripe.params.v2.core.vault._us_bank_account_send_microdeposits_params", + False, + ), "UsBankAccountUpdateParams": ( "stripe.params.v2.core.vault._us_bank_account_update_params", False, diff --git a/stripe/params/v2/core/vault/_gb_bank_account_list_params.py b/stripe/params/v2/core/vault/_gb_bank_account_list_params.py new file mode 100644 index 000000000..9d7f61736 --- /dev/null +++ b/stripe/params/v2/core/vault/_gb_bank_account_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class GbBankAccountListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 10. + """ diff --git a/stripe/params/v2/core/vault/_us_bank_account_confirm_microdeposits_params.py b/stripe/params/v2/core/vault/_us_bank_account_confirm_microdeposits_params.py new file mode 100644 index 000000000..89622c350 --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_confirm_microdeposits_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class UsBankAccountConfirmMicrodepositsParams(TypedDict): + amounts: NotRequired[List[int]] + """ + Two amounts received through Send Microdeposits must match the input to Confirm Microdeposits to verify US Bank Account. + """ + descriptor_code: NotRequired[str] + """ + Descriptor code received through Send Microdeposits must match the input to Confirm Microdeposits to verify US Bank Account. + """ diff --git a/stripe/params/v2/core/vault/_us_bank_account_list_params.py b/stripe/params/v2/core/vault/_us_bank_account_list_params.py new file mode 100644 index 000000000..38a0aa68f --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_list_params.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class UsBankAccountListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 10. + """ + verification_status: NotRequired[str] + """ + Optionally filter by verification status. Mutually exclusive with `unverified`, `verified`, `awaiting_verification`, and `verification_failed`. + """ diff --git a/stripe/params/v2/core/vault/_us_bank_account_send_microdeposits_params.py b/stripe/params/v2/core/vault/_us_bank_account_send_microdeposits_params.py new file mode 100644 index 000000000..e16ba1f63 --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_send_microdeposits_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class UsBankAccountSendMicrodepositsParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/__init__.py b/stripe/params/v2/money_management/__init__.py index 7b37752d3..f8dd9ccf7 100644 --- a/stripe/params/v2/money_management/__init__.py +++ b/stripe/params/v2/money_management/__init__.py @@ -24,6 +24,9 @@ from stripe.params.v2.money_management._financial_account_retrieve_params import ( FinancialAccountRetrieveParams as FinancialAccountRetrieveParams, ) + from stripe.params.v2.money_management._financial_account_update_params import ( + FinancialAccountUpdateParams as FinancialAccountUpdateParams, + ) from stripe.params.v2.money_management._financial_address_create_params import ( FinancialAddressCreateParams as FinancialAddressCreateParams, ) @@ -180,6 +183,10 @@ "stripe.params.v2.money_management._financial_account_retrieve_params", False, ), + "FinancialAccountUpdateParams": ( + "stripe.params.v2.money_management._financial_account_update_params", + False, + ), "FinancialAddressCreateParams": ( "stripe.params.v2.money_management._financial_address_create_params", False, diff --git a/stripe/params/v2/money_management/_financial_account_update_params.py b/stripe/params/v2/money_management/_financial_account_update_params.py new file mode 100644 index 000000000..80b9a02b2 --- /dev/null +++ b/stripe/params/v2/money_management/_financial_account_update_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class FinancialAccountUpdateParams(TypedDict): + display_name: NotRequired[str] + """ + A descriptive name for the FinancialAccount, up to 50 characters long. This name will be used in the Stripe Dashboard and embedded components. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Metadata associated with the FinancialAccount. + """ diff --git a/stripe/tax/_registration.py b/stripe/tax/_registration.py index f4a56e526..09bbc9c93 100644 --- a/stripe/tax/_registration.py +++ b/stripe/tax/_registration.py @@ -916,6 +916,12 @@ class Tr(StripeObject): Type of registration in `country`. """ + class Tw(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Tz(StripeObject): type: Literal["simplified"] """ @@ -1116,6 +1122,7 @@ class Zw(StripeObject): th: Optional[Th] tj: Optional[Tj] tr: Optional[Tr] + tw: Optional[Tw] tz: Optional[Tz] ua: Optional[Ua] ug: Optional[Ug] @@ -1216,6 +1223,7 @@ class Zw(StripeObject): "th": Th, "tj": Tj, "tr": Tr, + "tw": Tw, "tz": Tz, "ua": Ua, "ug": Ug, diff --git a/stripe/terminal/_configuration.py b/stripe/terminal/_configuration.py index 326a722c3..c16a6fad0 100644 --- a/stripe/terminal/_configuration.py +++ b/stripe/terminal/_configuration.py @@ -212,6 +212,20 @@ class Gbp(StripeObject): Below this amount, fixed amounts will be displayed; above it, percentages will be displayed """ + class Gip(StripeObject): + fixed_amounts: Optional[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: Optional[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: Optional[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + class Hkd(StripeObject): fixed_amounts: Optional[List[int]] """ @@ -389,6 +403,7 @@ class Usd(StripeObject): dkk: Optional[Dkk] eur: Optional[Eur] gbp: Optional[Gbp] + gip: Optional[Gip] hkd: Optional[Hkd] huf: Optional[Huf] jpy: Optional[Jpy] @@ -411,6 +426,7 @@ class Usd(StripeObject): "dkk": Dkk, "eur": Eur, "gbp": Gbp, + "gip": Gip, "hkd": Hkd, "huf": Huf, "jpy": Jpy, diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index 9bef03e8f..aaeb2c796 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -118,15 +118,15 @@ class Selection(StripeObject): class Choice(StripeObject): id: Optional[str] """ - The id to be selected + The identifier for the selected choice. Maximum 50 characters. """ style: Optional[Literal["primary", "secondary"]] """ - The button style for the choice + The button style for the choice. Can be `primary` or `secondary`. """ text: str """ - The text to be selected + The text to be selected. Maximum 30 characters. """ choices: List[Choice] @@ -158,19 +158,19 @@ class Text(StripeObject): class Toggle(StripeObject): default_value: Optional[Literal["disabled", "enabled"]] """ - The toggle's default value + The toggle's default value. Can be `enabled` or `disabled`. """ description: Optional[str] """ - The toggle's description text + The toggle's description text. Maximum 50 characters. """ title: Optional[str] """ - The toggle's title text + The toggle's title text. Maximum 50 characters. """ value: Optional[Literal["disabled", "enabled"]] """ - The toggle's collected value + The toggle's collected value. Can be `enabled` or `disabled`. """ custom_text: Optional[CustomText] @@ -458,11 +458,11 @@ class LineItem(StripeObject): cart: Optional[Cart] """ - Cart object to be displayed by the reader. + Cart object to be displayed by the reader, including line items, amounts, and currency. """ type: Literal["cart"] """ - Type of information to be displayed by the reader. + Type of information to be displayed by the reader. Only `cart` is currently supported. """ _inner_class_types = {"cart": Cart} @@ -600,7 +600,7 @@ def _cls_cancel_action( cls, reader: str, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ - Cancels the current reader action. + Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. """ return cast( "Reader", @@ -619,7 +619,7 @@ def cancel_action( reader: str, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ - Cancels the current reader action. + Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. """ ... @@ -628,7 +628,7 @@ def cancel_action( self, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ - Cancels the current reader action. + Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. """ ... @@ -637,7 +637,7 @@ def cancel_action( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ - Cancels the current reader action. + Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. """ return cast( "Reader", @@ -655,7 +655,7 @@ async def _cls_cancel_action_async( cls, reader: str, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ - Cancels the current reader action. + Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. """ return cast( "Reader", @@ -674,7 +674,7 @@ async def cancel_action_async( reader: str, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ - Cancels the current reader action. + Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. """ ... @@ -683,7 +683,7 @@ async def cancel_action_async( self, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ - Cancels the current reader action. + Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. """ ... @@ -692,7 +692,7 @@ async def cancel_action_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ - Cancels the current reader action. + Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. """ return cast( "Reader", @@ -710,7 +710,7 @@ def _cls_collect_inputs( cls, reader: str, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ - Initiates an input collection flow on a Reader. + Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. """ return cast( "Reader", @@ -729,7 +729,7 @@ def collect_inputs( reader: str, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ - Initiates an input collection flow on a Reader. + Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. """ ... @@ -738,7 +738,7 @@ def collect_inputs( self, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ - Initiates an input collection flow on a Reader. + Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. """ ... @@ -747,7 +747,7 @@ def collect_inputs( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ - Initiates an input collection flow on a Reader. + Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. """ return cast( "Reader", @@ -765,7 +765,7 @@ async def _cls_collect_inputs_async( cls, reader: str, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ - Initiates an input collection flow on a Reader. + Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. """ return cast( "Reader", @@ -784,7 +784,7 @@ async def collect_inputs_async( reader: str, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ - Initiates an input collection flow on a Reader. + Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. """ ... @@ -793,7 +793,7 @@ async def collect_inputs_async( self, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ - Initiates an input collection flow on a Reader. + Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. """ ... @@ -802,7 +802,7 @@ async def collect_inputs_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ - Initiates an input collection flow on a Reader. + Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. """ return cast( "Reader", @@ -820,7 +820,7 @@ def _cls_collect_payment_method( cls, reader: str, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. """ return cast( "Reader", @@ -839,7 +839,7 @@ def collect_payment_method( reader: str, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. """ ... @@ -848,7 +848,7 @@ def collect_payment_method( self, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. """ ... @@ -857,7 +857,7 @@ def collect_payment_method( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. """ return cast( "Reader", @@ -875,7 +875,7 @@ async def _cls_collect_payment_method_async( cls, reader: str, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. """ return cast( "Reader", @@ -894,7 +894,7 @@ async def collect_payment_method_async( reader: str, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. """ ... @@ -903,7 +903,7 @@ async def collect_payment_method_async( self, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. """ ... @@ -912,7 +912,7 @@ async def collect_payment_method_async( # pyright: ignore[reportGeneralTypeIssu self, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. """ return cast( "Reader", @@ -930,7 +930,7 @@ def _cls_confirm_payment_intent( cls, reader: str, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ - Finalizes a payment on a Reader. + Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. """ return cast( "Reader", @@ -949,7 +949,7 @@ def confirm_payment_intent( reader: str, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ - Finalizes a payment on a Reader. + Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. """ ... @@ -958,7 +958,7 @@ def confirm_payment_intent( self, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ - Finalizes a payment on a Reader. + Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. """ ... @@ -967,7 +967,7 @@ def confirm_payment_intent( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ - Finalizes a payment on a Reader. + Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. """ return cast( "Reader", @@ -985,7 +985,7 @@ async def _cls_confirm_payment_intent_async( cls, reader: str, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ - Finalizes a payment on a Reader. + Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. """ return cast( "Reader", @@ -1004,7 +1004,7 @@ async def confirm_payment_intent_async( reader: str, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ - Finalizes a payment on a Reader. + Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. """ ... @@ -1013,7 +1013,7 @@ async def confirm_payment_intent_async( self, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ - Finalizes a payment on a Reader. + Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. """ ... @@ -1022,7 +1022,7 @@ async def confirm_payment_intent_async( # pyright: ignore[reportGeneralTypeIssu self, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ - Finalizes a payment on a Reader. + Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. """ return cast( "Reader", @@ -1238,7 +1238,7 @@ def _cls_process_payment_intent( cls, reader: str, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader. + Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. """ return cast( "Reader", @@ -1257,7 +1257,7 @@ def process_payment_intent( reader: str, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader. + Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. """ ... @@ -1266,7 +1266,7 @@ def process_payment_intent( self, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader. + Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. """ ... @@ -1275,7 +1275,7 @@ def process_payment_intent( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader. + Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. """ return cast( "Reader", @@ -1293,7 +1293,7 @@ async def _cls_process_payment_intent_async( cls, reader: str, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader. + Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. """ return cast( "Reader", @@ -1312,7 +1312,7 @@ async def process_payment_intent_async( reader: str, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader. + Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. """ ... @@ -1321,7 +1321,7 @@ async def process_payment_intent_async( self, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader. + Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. """ ... @@ -1330,7 +1330,7 @@ async def process_payment_intent_async( # pyright: ignore[reportGeneralTypeIssu self, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ - Initiates a payment flow on a Reader. + Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. """ return cast( "Reader", @@ -1348,7 +1348,7 @@ def _cls_process_setup_intent( cls, reader: str, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ - Initiates a setup intent flow on a Reader. + Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details. """ return cast( "Reader", @@ -1367,7 +1367,7 @@ def process_setup_intent( reader: str, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ - Initiates a setup intent flow on a Reader. + Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details. """ ... @@ -1376,7 +1376,7 @@ def process_setup_intent( self, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ - Initiates a setup intent flow on a Reader. + Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details. """ ... @@ -1385,7 +1385,7 @@ def process_setup_intent( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ - Initiates a setup intent flow on a Reader. + Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details. """ return cast( "Reader", @@ -1403,7 +1403,7 @@ async def _cls_process_setup_intent_async( cls, reader: str, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ - Initiates a setup intent flow on a Reader. + Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details. """ return cast( "Reader", @@ -1422,7 +1422,7 @@ async def process_setup_intent_async( reader: str, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ - Initiates a setup intent flow on a Reader. + Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details. """ ... @@ -1431,7 +1431,7 @@ async def process_setup_intent_async( self, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ - Initiates a setup intent flow on a Reader. + Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details. """ ... @@ -1440,7 +1440,7 @@ async def process_setup_intent_async( # pyright: ignore[reportGeneralTypeIssues self, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ - Initiates a setup intent flow on a Reader. + Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details. """ return cast( "Reader", @@ -1458,7 +1458,7 @@ def _cls_refund_payment( cls, reader: str, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ - Initiates a refund on a Reader + Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. """ return cast( "Reader", @@ -1477,7 +1477,7 @@ def refund_payment( reader: str, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ - Initiates a refund on a Reader + Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. """ ... @@ -1486,7 +1486,7 @@ def refund_payment( self, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ - Initiates a refund on a Reader + Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. """ ... @@ -1495,7 +1495,7 @@ def refund_payment( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ - Initiates a refund on a Reader + Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. """ return cast( "Reader", @@ -1513,7 +1513,7 @@ async def _cls_refund_payment_async( cls, reader: str, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ - Initiates a refund on a Reader + Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. """ return cast( "Reader", @@ -1532,7 +1532,7 @@ async def refund_payment_async( reader: str, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ - Initiates a refund on a Reader + Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. """ ... @@ -1541,7 +1541,7 @@ async def refund_payment_async( self, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ - Initiates a refund on a Reader + Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. """ ... @@ -1550,7 +1550,7 @@ async def refund_payment_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ - Initiates a refund on a Reader + Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. """ return cast( "Reader", @@ -1590,7 +1590,7 @@ def _cls_set_reader_display( cls, reader: str, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ - Sets reader display to show cart details. + Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display). """ return cast( "Reader", @@ -1609,7 +1609,7 @@ def set_reader_display( reader: str, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ - Sets reader display to show cart details. + Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display). """ ... @@ -1618,7 +1618,7 @@ def set_reader_display( self, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ - Sets reader display to show cart details. + Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display). """ ... @@ -1627,7 +1627,7 @@ def set_reader_display( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ - Sets reader display to show cart details. + Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display). """ return cast( "Reader", @@ -1645,7 +1645,7 @@ async def _cls_set_reader_display_async( cls, reader: str, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ - Sets reader display to show cart details. + Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display). """ return cast( "Reader", @@ -1664,7 +1664,7 @@ async def set_reader_display_async( reader: str, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ - Sets reader display to show cart details. + Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display). """ ... @@ -1673,7 +1673,7 @@ async def set_reader_display_async( self, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ - Sets reader display to show cart details. + Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display). """ ... @@ -1682,7 +1682,7 @@ async def set_reader_display_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ - Sets reader display to show cart details. + Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display). """ return cast( "Reader", diff --git a/stripe/terminal/_reader_service.py b/stripe/terminal/_reader_service.py index c8c3838e0..8cb36a77f 100644 --- a/stripe/terminal/_reader_service.py +++ b/stripe/terminal/_reader_service.py @@ -258,7 +258,7 @@ def cancel_action( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Cancels the current reader action. + Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. """ return cast( "Reader", @@ -280,7 +280,7 @@ async def cancel_action_async( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Cancels the current reader action. + Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. """ return cast( "Reader", @@ -302,7 +302,7 @@ def collect_inputs( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Initiates an input collection flow on a Reader. + Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. """ return cast( "Reader", @@ -324,7 +324,7 @@ async def collect_inputs_async( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Initiates an input collection flow on a Reader. + Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. """ return cast( "Reader", @@ -346,7 +346,7 @@ def collect_payment_method( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. """ return cast( "Reader", @@ -368,7 +368,7 @@ async def collect_payment_method_async( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. """ return cast( "Reader", @@ -390,7 +390,7 @@ def confirm_payment_intent( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Finalizes a payment on a Reader. + Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. """ return cast( "Reader", @@ -412,7 +412,7 @@ async def confirm_payment_intent_async( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Finalizes a payment on a Reader. + Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. """ return cast( "Reader", @@ -434,7 +434,7 @@ def process_payment_intent( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Initiates a payment flow on a Reader. + Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. """ return cast( "Reader", @@ -456,7 +456,7 @@ async def process_payment_intent_async( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Initiates a payment flow on a Reader. + Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. """ return cast( "Reader", @@ -478,7 +478,7 @@ def process_setup_intent( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Initiates a setup intent flow on a Reader. + Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details. """ return cast( "Reader", @@ -500,7 +500,7 @@ async def process_setup_intent_async( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Initiates a setup intent flow on a Reader. + Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details. """ return cast( "Reader", @@ -522,7 +522,7 @@ def refund_payment( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Initiates a refund on a Reader + Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. """ return cast( "Reader", @@ -544,7 +544,7 @@ async def refund_payment_async( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Initiates a refund on a Reader + Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. """ return cast( "Reader", @@ -566,7 +566,7 @@ def set_reader_display( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Sets reader display to show cart details. + Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display). """ return cast( "Reader", @@ -588,7 +588,7 @@ async def set_reader_display_async( options: Optional["RequestOptions"] = None, ) -> "Reader": """ - Sets reader display to show cart details. + Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display). """ return cast( "Reader", diff --git a/stripe/v2/billing/_cadence.py b/stripe/v2/billing/_cadence.py index e4334a075..e3872b00d 100644 --- a/stripe/v2/billing/_cadence.py +++ b/stripe/v2/billing/_cadence.py @@ -273,12 +273,12 @@ class PaymentDue(StripeObject): """ include_payment_link: bool """ - If true the payment link to hosted invocie page would be included in email and PDF of the invoice. + If true the payment link to hosted invoice page would be included in email and PDF of the invoice. """ payment_due: Optional[PaymentDue] """ - Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state. + Controls emails for when the payment is due. For example after the invoice is finalized and transitions to Open state. """ _inner_class_types = {"payment_due": PaymentDue} diff --git a/stripe/v2/billing/_collection_setting.py b/stripe/v2/billing/_collection_setting.py index 60339141c..1538d6dfd 100644 --- a/stripe/v2/billing/_collection_setting.py +++ b/stripe/v2/billing/_collection_setting.py @@ -25,12 +25,12 @@ class PaymentDue(StripeObject): """ include_payment_link: bool """ - If true the payment link to hosted invocie page would be included in email and PDF of the invoice. + If true the payment link to hosted invoice page would be included in email and PDF of the invoice. """ payment_due: Optional[PaymentDue] """ - Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state. + Controls emails for when the payment is due. For example after the invoice is finalized and transitions to Open state. """ _inner_class_types = {"payment_due": PaymentDue} diff --git a/stripe/v2/billing/_collection_setting_version.py b/stripe/v2/billing/_collection_setting_version.py index 8c9fd572d..8a2131009 100644 --- a/stripe/v2/billing/_collection_setting_version.py +++ b/stripe/v2/billing/_collection_setting_version.py @@ -21,12 +21,12 @@ class PaymentDue(StripeObject): """ include_payment_link: bool """ - If true the payment link to hosted invocie page would be included in email and PDF of the invoice. + If true the payment link to hosted invoice page would be included in email and PDF of the invoice. """ payment_due: Optional[PaymentDue] """ - Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state. + Controls emails for when the payment is due. For example after the invoice is finalized and transitions to Open state. """ _inner_class_types = {"payment_due": PaymentDue} diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index 4ba3d14f5..bafb9b8be 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -40,7 +40,10 @@ class Location(StripeObject): """ location_source: Optional[ Literal[ - "identity_address", "ip_address", "shipping_address" + "identity_address", + "ip_address", + "payment_method", + "shipping_address", ] ] """ @@ -2700,11 +2703,54 @@ class StatusDetail(StripeObject): """ _inner_class_types = {"status_details": StatusDetail} + class Usd(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + requested: bool + """ + Whether the Capability has been requested. + """ + status: Literal[ + "active", "pending", "restricted", "unsupported" + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details regarding the status of the Capability. `status_details` will be empty if the Capability's status is `active`. + """ + _inner_class_types = {"status_details": StatusDetail} + gbp: Optional[Gbp] """ Can hold storage-type funds on Stripe in GBP. """ - _inner_class_types = {"gbp": Gbp} + usd: Optional[Usd] + """ + Can hold storage-type funds on Stripe in USD. + """ + _inner_class_types = {"gbp": Gbp, "usd": Usd} class InboundTransfers(StripeObject): class BankAccounts(StripeObject): @@ -3057,7 +3103,12 @@ class Profile(StripeObject): """ class Responsibilities(StripeObject): - fees_collector: Literal["application", "stripe"] + fees_collector: Literal[ + "application", + "application_custom", + "application_express", + "stripe", + ] """ A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this Account. """ @@ -3229,6 +3280,20 @@ class PersonsProvided(StripeObject): Reason for why the company is exempt from providing ownership information. """ + class RepresentativeDeclaration(StripeObject): + date: Optional[str] + """ + The time marking when the representative attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: Optional[str] + """ + The IP address from which the representative attestation was made. + """ + user_agent: Optional[str] + """ + The user agent of the browser from which the representative attestation was made. + """ + class TermsOfService(StripeObject): class Account(StripeObject): date: Optional[str] @@ -3280,6 +3345,10 @@ class Storer(StripeObject): """ Attestation that all Persons with a specific Relationship value have been provided. """ + representative_declaration: Optional[RepresentativeDeclaration] + """ + This hash is used to attest that the representative is authorized to act as the representative of their legal entity. + """ terms_of_service: Optional[TermsOfService] """ Attestations of accepted terms of service agreements. @@ -3288,6 +3357,7 @@ class Storer(StripeObject): "directorship_declaration": DirectorshipDeclaration, "ownership_declaration": OwnershipDeclaration, "persons_provided": PersonsProvided, + "representative_declaration": RepresentativeDeclaration, "terms_of_service": TermsOfService, } @@ -4272,7 +4342,7 @@ class Kanji(StripeObject): attestations: Optional[Attestations] """ - Attestations from the identity's key people, e.g. owners, executives, directors. + Attestations from the identity's key people, e.g. owners, executives, directors, representatives. """ business_details: Optional[BusinessDetails] """ @@ -4442,6 +4512,7 @@ class Deadline(StripeObject): "gb_bank_transfer_payments", "grabpay_payments", "holds_currencies.gbp", + "holds_currencies.usd", "ideal_payments", "inbound_transfers.financial_accounts", "jcb_payments", @@ -4603,6 +4674,10 @@ class MinimumDeadline(StripeObject): """ Filter only accounts that have all of the configurations specified. If omitted, returns all accounts regardless of which configurations they have. """ + closed: Optional[bool] + """ + A value indicating if the Account has been closed. + """ configuration: Optional[Configuration] """ An Account Configuration which allows the Account to take on a key persona across Stripe products. diff --git a/stripe/v2/core/_account_service.py b/stripe/v2/core/_account_service.py index f6989a466..27d89401c 100644 --- a/stripe/v2/core/_account_service.py +++ b/stripe/v2/core/_account_service.py @@ -213,7 +213,7 @@ def close( options: Optional["RequestOptions"] = None, ) -> "Account": """ - Removes access to the Account and its associated resources. + Removes access to the Account and its associated resources. Closed Accounts can no longer be operated on, but limited information can still be retrieved through the API in order to be able to track their history. """ return cast( "Account", @@ -233,7 +233,7 @@ async def close_async( options: Optional["RequestOptions"] = None, ) -> "Account": """ - Removes access to the Account and its associated resources. + Removes access to the Account and its associated resources. Closed Accounts can no longer be operated on, but limited information can still be retrieved through the API in order to be able to track their history. """ return cast( "Account", diff --git a/stripe/v2/core/_event_service.py b/stripe/v2/core/_event_service.py index f52f3eccc..38da51e63 100644 --- a/stripe/v2/core/_event_service.py +++ b/stripe/v2/core/_event_service.py @@ -18,7 +18,7 @@ class EventService(StripeService): def list( self, - params: "EventListParams", + params: Optional["EventListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[Event]": """ @@ -37,7 +37,7 @@ def list( async def list_async( self, - params: "EventListParams", + params: Optional["EventListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[Event]": """ diff --git a/stripe/v2/core/vault/_gb_bank_account_service.py b/stripe/v2/core/vault/_gb_bank_account_service.py index 5992ac155..2ebaf2ff7 100644 --- a/stripe/v2/core/vault/_gb_bank_account_service.py +++ b/stripe/v2/core/vault/_gb_bank_account_service.py @@ -19,13 +19,55 @@ from stripe.params.v2.core.vault._gb_bank_account_initiate_confirmation_of_payee_params import ( GbBankAccountInitiateConfirmationOfPayeeParams, ) + from stripe.params.v2.core.vault._gb_bank_account_list_params import ( + GbBankAccountListParams, + ) from stripe.params.v2.core.vault._gb_bank_account_retrieve_params import ( GbBankAccountRetrieveParams, ) + from stripe.v2._list_object import ListObject from stripe.v2.core.vault._gb_bank_account import GbBankAccount class GbBankAccountService(StripeService): + def list( + self, + params: Optional["GbBankAccountListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[GbBankAccount]": + """ + List objects that can be used as destinations for outbound money movement via OutboundPayment. + """ + return cast( + "ListObject[GbBankAccount]", + self._request( + "get", + "/v2/core/vault/gb_bank_accounts", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["GbBankAccountListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[GbBankAccount]": + """ + List objects that can be used as destinations for outbound money movement via OutboundPayment. + """ + return cast( + "ListObject[GbBankAccount]", + await self._request_async( + "get", + "/v2/core/vault/gb_bank_accounts", + base_address="api", + params=params, + options=options, + ), + ) + def create( self, params: "GbBankAccountCreateParams", diff --git a/stripe/v2/core/vault/_us_bank_account.py b/stripe/v2/core/vault/_us_bank_account.py index a35d95100..fa2c1ad61 100644 --- a/stripe/v2/core/vault/_us_bank_account.py +++ b/stripe/v2/core/vault/_us_bank_account.py @@ -13,6 +13,41 @@ class UsBankAccount(StripeObject): OBJECT_NAME: ClassVar[Literal["v2.core.vault.us_bank_account"]] = ( "v2.core.vault.us_bank_account" ) + + class Verification(StripeObject): + class MicrodepositVerificationDetails(StripeObject): + expires: str + """ + Time when microdeposits will expire and have to be re-sent. + """ + microdeposit_type: Literal["amounts", "descriptor_code"] + """ + Microdeposit type can be amounts or descriptor_type. + """ + sent: str + """ + Time when microdeposits were sent. + """ + + microdeposit_verification_details: Optional[ + MicrodepositVerificationDetails + ] + """ + The microdeposit verification details if the status is awaiting verification. + """ + status: Literal[ + "awaiting_verification", + "unverified", + "verification_failed", + "verified", + ] + """ + The bank account verification status. + """ + _inner_class_types = { + "microdeposit_verification_details": MicrodepositVerificationDetails, + } + archived: bool """ Whether this USBankAccount object was archived. @@ -53,3 +88,8 @@ class UsBankAccount(StripeObject): """ The ACH routing number of the bank account. """ + verification: Verification + """ + The bank account verification details. + """ + _inner_class_types = {"verification": Verification} diff --git a/stripe/v2/core/vault/_us_bank_account_service.py b/stripe/v2/core/vault/_us_bank_account_service.py index 7faa9ae91..3674515a6 100644 --- a/stripe/v2/core/vault/_us_bank_account_service.py +++ b/stripe/v2/core/vault/_us_bank_account_service.py @@ -10,19 +10,67 @@ from stripe.params.v2.core.vault._us_bank_account_archive_params import ( UsBankAccountArchiveParams, ) + from stripe.params.v2.core.vault._us_bank_account_confirm_microdeposits_params import ( + UsBankAccountConfirmMicrodepositsParams, + ) from stripe.params.v2.core.vault._us_bank_account_create_params import ( UsBankAccountCreateParams, ) + from stripe.params.v2.core.vault._us_bank_account_list_params import ( + UsBankAccountListParams, + ) from stripe.params.v2.core.vault._us_bank_account_retrieve_params import ( UsBankAccountRetrieveParams, ) + from stripe.params.v2.core.vault._us_bank_account_send_microdeposits_params import ( + UsBankAccountSendMicrodepositsParams, + ) from stripe.params.v2.core.vault._us_bank_account_update_params import ( UsBankAccountUpdateParams, ) + from stripe.v2._list_object import ListObject from stripe.v2.core.vault._us_bank_account import UsBankAccount class UsBankAccountService(StripeService): + def list( + self, + params: Optional["UsBankAccountListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[UsBankAccount]": + """ + List USBankAccount objects. Optionally filter by verification status. + """ + return cast( + "ListObject[UsBankAccount]", + self._request( + "get", + "/v2/core/vault/us_bank_accounts", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["UsBankAccountListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[UsBankAccount]": + """ + List USBankAccount objects. Optionally filter by verification status. + """ + return cast( + "ListObject[UsBankAccount]", + await self._request_async( + "get", + "/v2/core/vault/us_bank_accounts", + base_address="api", + params=params, + options=options, + ), + ) + def create( self, params: "UsBankAccountCreateParams", @@ -196,3 +244,91 @@ async def archive_async( options=options, ), ) + + def confirm_microdeposits( + self, + id: str, + params: Optional["UsBankAccountConfirmMicrodepositsParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Confirm microdeposits amounts or descriptor code that you have received from the Send Microdeposits request. Once you correctly confirm this, this US Bank Account will be verified and eligible to transfer funds with. + """ + return cast( + "UsBankAccount", + self._request( + "post", + "/v2/core/vault/us_bank_accounts/{id}/confirm_microdeposits".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def confirm_microdeposits_async( + self, + id: str, + params: Optional["UsBankAccountConfirmMicrodepositsParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Confirm microdeposits amounts or descriptor code that you have received from the Send Microdeposits request. Once you correctly confirm this, this US Bank Account will be verified and eligible to transfer funds with. + """ + return cast( + "UsBankAccount", + await self._request_async( + "post", + "/v2/core/vault/us_bank_accounts/{id}/confirm_microdeposits".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def send_microdeposits( + self, + id: str, + params: Optional["UsBankAccountSendMicrodepositsParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Send microdeposits in order to verify your US Bank Account so it is eligible to transfer funds. This will start the verification process and you must Confirm Microdeposits to successfully verify your US Bank Account. + """ + return cast( + "UsBankAccount", + self._request( + "post", + "/v2/core/vault/us_bank_accounts/{id}/send_microdeposits".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def send_microdeposits_async( + self, + id: str, + params: Optional["UsBankAccountSendMicrodepositsParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Send microdeposits in order to verify your US Bank Account so it is eligible to transfer funds. This will start the verification process and you must Confirm Microdeposits to successfully verify your US Bank Account. + """ + return cast( + "UsBankAccount", + await self._request_async( + "post", + "/v2/core/vault/us_bank_accounts/{id}/send_microdeposits".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_financial_account_service.py b/stripe/v2/money_management/_financial_account_service.py index bd81d11b0..c5a114c64 100644 --- a/stripe/v2/money_management/_financial_account_service.py +++ b/stripe/v2/money_management/_financial_account_service.py @@ -19,6 +19,9 @@ from stripe.params.v2.money_management._financial_account_retrieve_params import ( FinancialAccountRetrieveParams, ) + from stripe.params.v2.money_management._financial_account_update_params import ( + FinancialAccountUpdateParams, + ) from stripe.v2._list_object import ListObject from stripe.v2.money_management._financial_account import FinancialAccount @@ -144,6 +147,50 @@ async def retrieve_async( ), ) + def update( + self, + id: str, + params: Optional["FinancialAccountUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "FinancialAccount": + """ + Updates an existing FinancialAccount. + """ + return cast( + "FinancialAccount", + self._request( + "post", + "/v2/money_management/financial_accounts/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + id: str, + params: Optional["FinancialAccountUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "FinancialAccount": + """ + Updates an existing FinancialAccount. + """ + return cast( + "FinancialAccount", + await self._request_async( + "post", + "/v2/money_management/financial_accounts/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + def close( self, id: str, diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 25018a236..3788e8f03 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -44512,18 +44512,17 @@ def test_v2_core_event_get_service( http_client_mock.stub_request( "get", "/v2/core/events", - "object_id=object_id", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.events.list({"object_id": "object_id"}) + client.v2.core.events.list() http_client_mock.assert_requested( "get", path="/v2/core/events", - query_string="object_id=object_id", + query_string="", api_base="https://api.stripe.com", ) @@ -44724,6 +44723,26 @@ def test_v2_core_event_destination_post_5_service( is_json=True, ) + def test_v2_core_vault_gb_bank_account_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/core/vault/gb_bank_accounts", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.gb_bank_accounts.list() + http_client_mock.assert_requested( + "get", + path="/v2/core/vault/gb_bank_accounts", + query_string="", + api_base="https://api.stripe.com", + ) + def test_v2_core_vault_gb_bank_account_post_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -44751,7 +44770,7 @@ def test_v2_core_vault_gb_bank_account_post_service( is_json=True, ) - def test_v2_core_vault_gb_bank_account_get_service( + def test_v2_core_vault_gb_bank_account_get_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( @@ -44841,6 +44860,26 @@ def test_v2_core_vault_gb_bank_account_post_4_service( is_json=True, ) + def test_v2_core_vault_us_bank_account_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/core/vault/us_bank_accounts", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.us_bank_accounts.list() + http_client_mock.assert_requested( + "get", + path="/v2/core/vault/us_bank_accounts", + query_string="", + api_base="https://api.stripe.com", + ) + def test_v2_core_vault_us_bank_account_post_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -44867,7 +44906,7 @@ def test_v2_core_vault_us_bank_account_post_service( is_json=True, ) - def test_v2_core_vault_us_bank_account_get_service( + def test_v2_core_vault_us_bank_account_get_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( @@ -44931,6 +44970,50 @@ def test_v2_core_vault_us_bank_account_post_3_service( is_json=True, ) + def test_v2_core_vault_us_bank_account_post_4_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.us_bank_accounts.confirm_microdeposits("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_core_vault_us_bank_account_post_5_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts/id_123/send_microdeposits", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.us_bank_accounts.send_microdeposits("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts/id_123/send_microdeposits", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + def test_v2_money_management_adjustment_get_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -45039,6 +45122,28 @@ def test_v2_money_management_financial_account_get_2_service( def test_v2_money_management_financial_account_post_2_service( self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/financial_accounts/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.financial_accounts.update("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/money_management/financial_accounts/id_123", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_financial_account_post_3_service( + self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", @@ -46103,7 +46208,7 @@ def test_feature_not_enabled_error_service( http_client_mock.stub_request( "post", "/v2/money_management/financial_accounts", - rbody='{"error":{"type":"feature_not_enabled","code":"recipient_feature_not_active"}}', + rbody='{"error":{"type":"feature_not_enabled","code":"outbound_flow_from_closed_financial_account_unsupported"}}', rcode=400, ) client = StripeClient(