From bfe1175fb77301192921c2dbf7e8aa2522309119 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:31:34 -0700 Subject: [PATCH 01/11] Update generated code (#1373) * Update generated code for v1190 * Update generated code for v1192 * Update generated code for v1194 * Update generated code for v1195 * Update generated code for v1196 * Update generated code for v1198 * Update generated code for v1199 * Update generated code for v1200 * Update generated code for v1201 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_account.py | 24 +++---- stripe/_account_external_account_service.py | 2 +- stripe/_account_person_service.py | 4 +- stripe/_account_service.py | 8 +-- stripe/_charge.py | 37 +++++++---- stripe/_charge_service.py | 4 +- stripe/_confirmation_token.py | 33 ++++++++-- stripe/_payment_intent.py | 46 +++++++++++--- stripe/_payment_intent_service.py | 37 +++++++++-- stripe/_payment_method.py | 28 +++++++-- stripe/_quote.py | 16 ++--- stripe/_quote_service.py | 4 +- stripe/_setup_intent.py | 62 ++++++++++++++++++- stripe/_setup_intent_service.py | 51 +++++++++++++++ stripe/_token.py | 2 +- stripe/_token_service.py | 2 +- stripe/checkout/_session.py | 2 +- stripe/checkout/_session_service.py | 2 +- .../treasury/_outbound_payment_service.py | 4 ++ .../treasury/_outbound_transfer_service.py | 4 ++ stripe/treasury/_outbound_payment.py | 10 ++- stripe/treasury/_outbound_transfer.py | 10 ++- 23 files changed, 320 insertions(+), 74 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1af8caa5d..82e4a49f9 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1189 \ No newline at end of file +v1201 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index ad20ec69f..f5246a701 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -2270,7 +2270,7 @@ class CreateParamsDocuments(TypedDict): "Account.CreateParamsDocumentsBankAccountOwnershipVerification" ] """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check. + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. """ company_license: NotRequired[ "Account.CreateParamsDocumentsCompanyLicense" @@ -2840,7 +2840,7 @@ class CreatePersonParams(RequestOptions): "Account.CreatePersonParamsAdditionalTosAcceptances" ] """ - Details on the legal guardian's acceptance of the required Stripe agreements. + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. """ address: NotRequired["Account.CreatePersonParamsAddress"] """ @@ -3405,7 +3405,7 @@ class ModifyExternalAccountParamsDocuments(TypedDict): "Account.ModifyExternalAccountParamsDocumentsBankAccountOwnershipVerification" ] """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check. + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check. """ class ModifyExternalAccountParamsDocumentsBankAccountOwnershipVerification( @@ -3421,7 +3421,7 @@ class ModifyPersonParams(RequestOptions): "Account.ModifyPersonParamsAdditionalTosAcceptances" ] """ - Details on the legal guardian's acceptance of the required Stripe agreements. + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. """ address: NotRequired["Account.ModifyPersonParamsAddress"] """ @@ -3980,7 +3980,7 @@ def _cls_delete( Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -4004,7 +4004,7 @@ def delete( Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -4017,7 +4017,7 @@ def delete(self, **params: Unpack["Account.DeleteParams"]) -> "Account": Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -4032,7 +4032,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -4051,7 +4051,7 @@ async def _cls_delete_async( Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -4075,7 +4075,7 @@ async def delete_async( Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -4090,7 +4090,7 @@ async def delete_async( Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -4105,7 +4105,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ diff --git a/stripe/_account_external_account_service.py b/stripe/_account_external_account_service.py index 06a2b7e77..a048e69d5 100644 --- a/stripe/_account_external_account_service.py +++ b/stripe/_account_external_account_service.py @@ -193,7 +193,7 @@ class UpdateParamsDocuments(TypedDict): "AccountExternalAccountService.UpdateParamsDocumentsBankAccountOwnershipVerification" ] """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check. + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check. """ class UpdateParamsDocumentsBankAccountOwnershipVerification(TypedDict): diff --git a/stripe/_account_person_service.py b/stripe/_account_person_service.py index 363ea0130..0fe82b820 100644 --- a/stripe/_account_person_service.py +++ b/stripe/_account_person_service.py @@ -15,7 +15,7 @@ class CreateParams(TypedDict): "AccountPersonService.CreateParamsAdditionalTosAcceptances" ] """ - Details on the legal guardian's acceptance of the required Stripe agreements. + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. """ address: NotRequired["AccountPersonService.CreateParamsAddress"] """ @@ -444,7 +444,7 @@ class UpdateParams(TypedDict): "AccountPersonService.UpdateParamsAdditionalTosAcceptances" ] """ - Details on the legal guardian's acceptance of the required Stripe agreements. + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. """ address: NotRequired["AccountPersonService.UpdateParamsAddress"] """ diff --git a/stripe/_account_service.py b/stripe/_account_service.py index 2aa902006..11ccec68e 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -1077,7 +1077,7 @@ class CreateParamsDocuments(TypedDict): "AccountService.CreateParamsDocumentsBankAccountOwnershipVerification" ] """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check. + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. """ company_license: NotRequired[ "AccountService.CreateParamsDocumentsCompanyLicense" @@ -2725,7 +2725,7 @@ class UpdateParamsDocuments(TypedDict): "AccountService.UpdateParamsDocumentsBankAccountOwnershipVerification" ] """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check. + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. """ company_license: NotRequired[ "AccountService.UpdateParamsDocumentsCompanyLicense" @@ -3325,7 +3325,7 @@ def delete( Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ @@ -3352,7 +3352,7 @@ async def delete_async( Test-mode accounts can be deleted at any time. - Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero. + Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. """ diff --git a/stripe/_charge.py b/stripe/_charge.py index 7ab12a247..a1dd7cf1c 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -703,6 +703,10 @@ class ShippingAddress(StripeObject): """ The authorized amount. """ + authorization_code: Optional[str] + """ + Authorization code on the charge. + """ brand: Optional[str] """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -850,6 +854,14 @@ class Receipt(StripeObject): An indication of various EMV functions performed during the transaction. """ + class Wallet(StripeObject): + type: Literal[ + "apple_pay", "google_pay", "samsung_pay", "unknown" + ] + """ + The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + """ + amount_authorized: Optional[int] """ The authorized amount @@ -926,10 +938,7 @@ class Receipt(StripeObject): """ network_transaction_id: Optional[str] """ - This is used by the financial networks to identify a transaction. - Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. - The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). - This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. """ offline: Optional[Offline] """ @@ -959,7 +968,12 @@ class Receipt(StripeObject): """ A collection of fields required to be displayed on receipts. Only required for EMV transactions. """ - _inner_class_types = {"offline": Offline, "receipt": Receipt} + wallet: Optional[Wallet] + _inner_class_types = { + "offline": Offline, + "receipt": Receipt, + "wallet": Wallet, + } class Cashapp(StripeObject): buyer_id: Optional[str] @@ -1247,10 +1261,7 @@ class Receipt(StripeObject): """ network_transaction_id: Optional[str] """ - This is used by the financial networks to identify a transaction. - Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. - The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). - This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. """ preferred_locales: Optional[List[str]] """ @@ -1796,7 +1807,7 @@ class CaptureParams(RequestOptions): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ transfer_data: NotRequired["Charge.CaptureParamsTransferData"] """ @@ -1874,7 +1885,7 @@ class CreateParams(RequestOptions): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ transfer_data: NotRequired["Charge.CreateParamsTransferData"] """ @@ -2309,7 +2320,7 @@ class SearchParams(RequestOptions): """ source_transfer: Optional[ExpandableField["Transfer"]] """ - The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details. """ statement_descriptor: Optional[str] """ @@ -2317,7 +2328,7 @@ class SearchParams(RequestOptions): """ statement_descriptor_suffix: Optional[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ status: Literal["failed", "pending", "succeeded"] """ diff --git a/stripe/_charge_service.py b/stripe/_charge_service.py index f21605715..a079598a3 100644 --- a/stripe/_charge_service.py +++ b/stripe/_charge_service.py @@ -38,7 +38,7 @@ class CaptureParams(TypedDict): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ transfer_data: NotRequired["ChargeService.CaptureParamsTransferData"] """ @@ -116,7 +116,7 @@ class CreateParams(TypedDict): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ transfer_data: NotRequired["ChargeService.CreateParamsTransferData"] """ diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 2d9cec16d..239f20322 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -265,6 +265,17 @@ class Receipt(StripeObject): An indication of various EMV functions performed during the transaction. """ + class Wallet(StripeObject): + type: Literal[ + "apple_pay", + "google_pay", + "samsung_pay", + "unknown", + ] + """ + The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + """ + amount_authorized: Optional[int] """ The authorized amount @@ -341,10 +352,7 @@ class Receipt(StripeObject): """ network_transaction_id: Optional[str] """ - This is used by the financial networks to identify a transaction. - Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. - The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). - This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. """ offline: Optional[Offline] """ @@ -374,9 +382,11 @@ class Receipt(StripeObject): """ A collection of fields required to be displayed on receipts. Only required for EMV transactions. """ + wallet: Optional[Wallet] _inner_class_types = { "offline": Offline, "receipt": Receipt, + "wallet": Wallet, } card_present: Optional[CardPresent] @@ -710,6 +720,14 @@ class Offline(StripeObject): The method used to process this payment method offline. Only deferred is allowed. """ + class Wallet(StripeObject): + type: Literal[ + "apple_pay", "google_pay", "samsung_pay", "unknown" + ] + """ + The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + """ + brand: Optional[str] """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -784,7 +802,12 @@ class Offline(StripeObject): """ How card details were read in this transaction. """ - _inner_class_types = {"networks": Networks, "offline": Offline} + wallet: Optional[Wallet] + _inner_class_types = { + "networks": Networks, + "offline": Offline, + "wallet": Wallet, + } class Cashapp(StripeObject): buyer_id: Optional[str] diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index d6bed7af9..7ddf264ba 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -1085,6 +1085,10 @@ class AuBecsDebit(StripeObject): """ class BacsDebit(StripeObject): + class MandateOptions(StripeObject): + pass + + mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ Literal["none", "off_session", "on_session"] ] @@ -1097,6 +1101,7 @@ class BacsDebit(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + _inner_class_types = {"mandate_options": MandateOptions} class Bancontact(StripeObject): preferred_language: Literal["de", "en", "fr", "nl"] @@ -2080,7 +2085,7 @@ class CaptureParams(RequestOptions): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired["PaymentIntent.CaptureParamsTransferData"] """ @@ -3242,6 +3247,12 @@ class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" ] @@ -3257,6 +3268,9 @@ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] """ @@ -4413,7 +4427,7 @@ class CreateParams(RequestOptions): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: NotRequired[str] """ @@ -4509,7 +4523,7 @@ class CreateParams(RequestOptions): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired["PaymentIntent.CreateParamsTransferData"] """ @@ -5592,6 +5606,12 @@ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" ] @@ -5607,6 +5627,9 @@ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class CreateParamsPaymentMethodOptionsBancontact(TypedDict): preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] """ @@ -6845,7 +6868,7 @@ class ModifyParams(RequestOptions): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: NotRequired[str] """ @@ -6913,7 +6936,7 @@ class ModifyParams(RequestOptions): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired["PaymentIntent.ModifyParamsTransferData"] """ @@ -7936,6 +7959,12 @@ class ModifyParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ class ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" ] @@ -7951,6 +7980,9 @@ class ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ModifyParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class ModifyParamsPaymentMethodOptionsBancontact(TypedDict): preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] """ @@ -9177,7 +9209,7 @@ class VerifyMicrodepositsParams(RequestOptions): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: Optional[str] """ @@ -9277,7 +9309,7 @@ class VerifyMicrodepositsParams(RequestOptions): """ statement_descriptor_suffix: Optional[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ status: Literal[ "canceled", diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 89591eb10..7e005149d 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -72,7 +72,7 @@ class CaptureParams(TypedDict): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired[ "PaymentIntentService.CaptureParamsTransferData" @@ -1260,6 +1260,12 @@ class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" ] @@ -1275,6 +1281,9 @@ class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] """ @@ -2431,7 +2440,7 @@ class CreateParams(TypedDict): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: NotRequired[str] """ @@ -2529,7 +2538,7 @@ class CreateParams(TypedDict): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired[ "PaymentIntentService.CreateParamsTransferData" @@ -3636,6 +3645,12 @@ class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" ] @@ -3651,6 +3666,9 @@ class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class CreateParamsPaymentMethodOptionsBancontact(TypedDict): preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] """ @@ -4917,7 +4935,7 @@ class UpdateParams(TypedDict): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.corp.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ description: NotRequired[str] """ @@ -4987,7 +5005,7 @@ class UpdateParams(TypedDict): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ transfer_data: NotRequired[ "PaymentIntentService.UpdateParamsTransferData" @@ -6034,6 +6052,12 @@ class UpdateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): """ class UpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" ] @@ -6049,6 +6073,9 @@ class UpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. """ + class UpdateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class UpdateParamsPaymentMethodOptionsBancontact(TypedDict): preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] """ diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 8f8497b43..992ccf063 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -225,6 +225,14 @@ class Receipt(StripeObject): An indication of various EMV functions performed during the transaction. """ + class Wallet(StripeObject): + type: Literal[ + "apple_pay", "google_pay", "samsung_pay", "unknown" + ] + """ + The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + """ + amount_authorized: Optional[int] """ The authorized amount @@ -301,10 +309,7 @@ class Receipt(StripeObject): """ network_transaction_id: Optional[str] """ - This is used by the financial networks to identify a transaction. - Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. - The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). - This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. """ offline: Optional[Offline] """ @@ -334,9 +339,11 @@ class Receipt(StripeObject): """ A collection of fields required to be displayed on receipts. Only required for EMV transactions. """ + wallet: Optional[Wallet] _inner_class_types = { "offline": Offline, "receipt": Receipt, + "wallet": Wallet, } card_present: Optional[CardPresent] @@ -670,6 +677,12 @@ class Offline(StripeObject): The method used to process this payment method offline. Only deferred is allowed. """ + class Wallet(StripeObject): + type: Literal["apple_pay", "google_pay", "samsung_pay", "unknown"] + """ + The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. + """ + brand: Optional[str] """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -744,7 +757,12 @@ class Offline(StripeObject): """ How card details were read in this transaction. """ - _inner_class_types = {"networks": Networks, "offline": Offline} + wallet: Optional[Wallet] + _inner_class_types = { + "networks": Networks, + "offline": Offline, + "wallet": Wallet, + } class Cashapp(StripeObject): buyer_id: Optional[str] diff --git a/stripe/_quote.py b/stripe/_quote.py index fc7dc4df7..89da6af2d 100644 --- a/stripe/_quote.py +++ b/stripe/_quote.py @@ -1791,7 +1791,7 @@ async def modify_async( @classmethod def _cls_pdf(cls, quote: str, **params: Unpack["Quote.PdfParams"]) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ return cast( Any, @@ -1807,14 +1807,14 @@ def _cls_pdf(cls, quote: str, **params: Unpack["Quote.PdfParams"]) -> Any: @staticmethod def pdf(quote: str, **params: Unpack["Quote.PdfParams"]) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ ... @overload def pdf(self, **params: Unpack["Quote.PdfParams"]) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ ... @@ -1823,7 +1823,7 @@ def pdf( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["Quote.PdfParams"] ) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ return cast( Any, @@ -1842,7 +1842,7 @@ async def _cls_pdf_async( cls, quote: str, **params: Unpack["Quote.PdfParams"] ) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ return cast( Any, @@ -1860,14 +1860,14 @@ async def pdf_async( quote: str, **params: Unpack["Quote.PdfParams"] ) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ ... @overload async def pdf_async(self, **params: Unpack["Quote.PdfParams"]) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ ... @@ -1876,7 +1876,7 @@ async def pdf_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["Quote.PdfParams"] ) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ return cast( Any, diff --git a/stripe/_quote_service.py b/stripe/_quote_service.py index d1e256ebf..8db87912b 100644 --- a/stripe/_quote_service.py +++ b/stripe/_quote_service.py @@ -910,7 +910,7 @@ def pdf( options: RequestOptions = {}, ) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ return cast( Any, @@ -931,7 +931,7 @@ async def pdf_async( options: RequestOptions = {}, ) -> Any: """ - Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf) + Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ return cast( Any, diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 86bc2c2fd..b19a36352 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -461,6 +461,13 @@ class MandateOptions(StripeObject): class AmazonPay(StripeObject): pass + class BacsDebit(StripeObject): + class MandateOptions(StripeObject): + pass + + mandate_options: Optional[MandateOptions] + _inner_class_types = {"mandate_options": MandateOptions} + class Card(StripeObject): class MandateOptions(StripeObject): amount: int @@ -614,6 +621,7 @@ class MandateOptions(StripeObject): acss_debit: Optional[AcssDebit] amazon_pay: Optional[AmazonPay] + bacs_debit: Optional[BacsDebit] card: Optional[Card] card_present: Optional[CardPresent] link: Optional[Link] @@ -623,6 +631,7 @@ class MandateOptions(StripeObject): _inner_class_types = { "acss_debit": AcssDebit, "amazon_pay": AmazonPay, + "bacs_debit": BacsDebit, "card": Card, "card_present": CardPresent, "link": Link, @@ -1343,6 +1352,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. """ + bacs_debit: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ card: NotRequired["SetupIntent.ConfirmParamsPaymentMethodOptionsCard"] """ Configuration for any card setup attempted on this SetupIntent. @@ -1423,6 +1438,17 @@ class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): pass + class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + class ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class ConfirmParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodOptionsCardMandateOptions" @@ -2462,6 +2488,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. """ + bacs_debit: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ card: NotRequired["SetupIntent.CreateParamsPaymentMethodOptionsCard"] """ Configuration for any card setup attempted on this SetupIntent. @@ -2542,6 +2574,17 @@ class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): pass + class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class CreateParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntent.CreateParamsPaymentMethodOptionsCardMandateOptions" @@ -3548,6 +3591,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. """ + bacs_debit: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ card: NotRequired["SetupIntent.ModifyParamsPaymentMethodOptionsCard"] """ Configuration for any card setup attempted on this SetupIntent. @@ -3628,6 +3677,17 @@ class ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class ModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): pass + class ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + class ModifyParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class ModifyParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodOptionsCardMandateOptions" @@ -4006,7 +4066,7 @@ class VerifyMicrodepositsParams(RequestOptions): """ payment_method: Optional[ExpandableField["PaymentMethod"]] """ - ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.corp.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. + ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. """ payment_method_configuration_details: Optional[ PaymentMethodConfigurationDetails diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index f768a1e5e..fb4dda1ee 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -760,6 +760,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. """ + bacs_debit: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ card: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodOptionsCard" ] @@ -844,6 +850,17 @@ class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): pass + class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + class ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class ConfirmParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodOptionsCardMandateOptions" @@ -1911,6 +1928,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. """ + bacs_debit: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ card: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodOptionsCard" ] @@ -1995,6 +2018,17 @@ class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): pass + class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class CreateParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodOptionsCardMandateOptions" @@ -3039,6 +3073,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. """ + bacs_debit: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ card: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodOptionsCard" ] @@ -3123,6 +3163,17 @@ class UpdateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class UpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): pass + class UpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + class UpdateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): + pass + class UpdateParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodOptionsCardMandateOptions" diff --git a/stripe/_token.py b/stripe/_token.py index 2d405fbdf..11558266a 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -703,7 +703,7 @@ class CreateParamsPerson(TypedDict): "Token.CreateParamsPersonAdditionalTosAcceptances" ] """ - Details on the legal guardian's acceptance of the required Stripe agreements. + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. """ address: NotRequired["Token.CreateParamsPersonAddress"] """ diff --git a/stripe/_token_service.py b/stripe/_token_service.py index fd82b1ab1..422b953dd 100644 --- a/stripe/_token_service.py +++ b/stripe/_token_service.py @@ -674,7 +674,7 @@ class CreateParamsPerson(TypedDict): "TokenService.CreateParamsPersonAdditionalTosAcceptances" ] """ - Details on the legal guardian's acceptance of the required Stripe agreements. + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. """ address: NotRequired["TokenService.CreateParamsPersonAddress"] """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index f30e84f17..644112811 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -1639,7 +1639,7 @@ class CreateParams(RequestOptions): """ cancel_url: NotRequired[str] """ - If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. + If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded`. """ client_reference_id: NotRequired[str] """ diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index ad754f660..59750df82 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -36,7 +36,7 @@ class CreateParams(TypedDict): """ cancel_url: NotRequired[str] """ - If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. + If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded`. """ client_reference_id: NotRequired[str] """ diff --git a/stripe/test_helpers/treasury/_outbound_payment_service.py b/stripe/test_helpers/treasury/_outbound_payment_service.py index 754c7cba2..8299fc12a 100644 --- a/stripe/test_helpers/treasury/_outbound_payment_service.py +++ b/stripe/test_helpers/treasury/_outbound_payment_service.py @@ -87,6 +87,10 @@ class UpdateParamsTrackingDetailsAch(TypedDict): """ class UpdateParamsTrackingDetailsUsDomesticWire(TypedDict): + chips: NotRequired[str] + """ + CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + """ imad: NotRequired[str] """ IMAD for funds sent over the `us_domestic_wire` network. diff --git a/stripe/test_helpers/treasury/_outbound_transfer_service.py b/stripe/test_helpers/treasury/_outbound_transfer_service.py index 6bc5760bb..185038a5b 100644 --- a/stripe/test_helpers/treasury/_outbound_transfer_service.py +++ b/stripe/test_helpers/treasury/_outbound_transfer_service.py @@ -87,6 +87,10 @@ class UpdateParamsTrackingDetailsAch(TypedDict): """ class UpdateParamsTrackingDetailsUsDomesticWire(TypedDict): + chips: NotRequired[str] + """ + CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + """ imad: NotRequired[str] """ IMAD for funds sent over the `us_domestic_wire` network. diff --git a/stripe/treasury/_outbound_payment.py b/stripe/treasury/_outbound_payment.py index 36d468169..db206c833 100644 --- a/stripe/treasury/_outbound_payment.py +++ b/stripe/treasury/_outbound_payment.py @@ -190,7 +190,11 @@ class Ach(StripeObject): """ class UsDomesticWire(StripeObject): - imad: str + chips: Optional[str] + """ + CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network. + """ + imad: Optional[str] """ IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. """ @@ -525,6 +529,10 @@ class UpdateParamsTrackingDetailsAch(TypedDict): """ class UpdateParamsTrackingDetailsUsDomesticWire(TypedDict): + chips: NotRequired[str] + """ + CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + """ imad: NotRequired[str] """ IMAD for funds sent over the `us_domestic_wire` network. diff --git a/stripe/treasury/_outbound_transfer.py b/stripe/treasury/_outbound_transfer.py index 794a444e1..db574845d 100644 --- a/stripe/treasury/_outbound_transfer.py +++ b/stripe/treasury/_outbound_transfer.py @@ -168,7 +168,11 @@ class Ach(StripeObject): """ class UsDomesticWire(StripeObject): - imad: str + chips: Optional[str] + """ + CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + """ + imad: Optional[str] """ IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. """ @@ -355,6 +359,10 @@ class UpdateParamsTrackingDetailsAch(TypedDict): """ class UpdateParamsTrackingDetailsUsDomesticWire(TypedDict): + chips: NotRequired[str] + """ + CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + """ imad: NotRequired[str] """ IMAD for funds sent over the `us_domestic_wire` network. From 5ff3d4b5730737399db2eeaae47e0a5d7772db1d Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Thu, 15 Aug 2024 14:16:42 -0700 Subject: [PATCH 02/11] Bump version to 10.8.0 --- CHANGELOG.md | 9 +++++++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d055d730e..11ef47a0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## 10.8.0 - 2024-08-15 +* [#1373](https://github.com/stripe/stripe-python/pull/1373) Update generated code + * Add support for `authorization_code` on resource class `stripe.Charge.PaymentMethodDetails.Card` + * Add support for `wallet` on resource classes `stripe.Charge.PaymentMethodDetails.CardPresent`, `stripe.ConfirmationToken.PaymentMethodPreview.Card.GeneratedFrom.PaymentMethodDetails.CardPresent`, `stripe.ConfirmationToken.PaymentMethodPreview.CardPresent`, `stripe.PaymentMethod.Card.GeneratedFrom.PaymentMethodDetails.CardPresent`, and `stripe.PaymentMethod.CardPresent` + * Add support for `mandate_options` on parameter classes `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptionsBacsDebit`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptionsBacsDebit`, and `stripe.PaymentIntent.ModifyParamsPaymentMethodOptionsBacsDebit` and resource class `stripe.PaymentIntent.PaymentMethodOptions.BacsDebit` + * Add support for `bacs_debit` on parameter classes `stripe.SetupIntent.ConfirmParamsPaymentMethodOptions`, `stripe.SetupIntent.CreateParamsPaymentMethodOptions`, and `stripe.SetupIntent.ModifyParamsPaymentMethodOptions` and resource class `stripe.SetupIntent.PaymentMethodOptions` + * Add support for `chips` on resource classes `stripe.treasury.OutboundPayment.TrackingDetails.UsDomesticWire` and `stripe.treasury.OutboundTransfer.TrackingDetails.UsDomesticWire` and parameter classes `stripe.treasury.OutboundPayment.UpdateParamsTrackingDetailsUsDomesticWire` and `stripe.treasury.OutboundTransfer.UpdateParamsTrackingDetailsUsDomesticWire` + * Change type of `imad` on `stripe.treasury.OutboundPayment.TrackingDetails.UsDomesticWire` and `stripe.treasury.OutboundTransfer.TrackingDetails.UsDomesticWire` from `str` to `Optional[str]` + ## 10.7.0 - 2024-08-08 * [#1371](https://github.com/stripe/stripe-python/pull/1371) Update generated code * Add support for `type` on resource classes `stripe.Charge.PaymentMethodDetails.CardPresent.Offline`, `stripe.ConfirmationToken.PaymentMethodPreview.Card.GeneratedFrom.PaymentMethodDetails.CardPresent.Offline`, `stripe.PaymentMethod.Card.GeneratedFrom.PaymentMethodDetails.CardPresent.Offline`, and `stripe.SetupAttempt.PaymentMethodDetails.CardPresent.Offline` diff --git a/VERSION b/VERSION index 1bcdaf5fe..2a3262d8a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.7.0 +10.8.0 diff --git a/stripe/_version.py b/stripe/_version.py index f052486b9..aa24b7374 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "10.7.0" +VERSION = "10.8.0" From 86c9f2307a528f838cca0a449bf8697cfcdff063 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Mon, 26 Aug 2024 19:24:40 +0200 Subject: [PATCH 03/11] Chain exceptions when reraising them (#1366) This makes debugging easier, since the original exception's details and traceback aren't just flattened to a string --- stripe/_http_client.py | 24 ++++++++++++------------ stripe/_stripe_object.py | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/stripe/_http_client.py b/stripe/_http_client.py index a936dd654..af7a16cff 100644 --- a/stripe/_http_client.py +++ b/stripe/_http_client.py @@ -713,7 +713,7 @@ def _request_internal( return content, status_code, result.headers - def _handle_request_error(self, e) -> NoReturn: + def _handle_request_error(self, e: Exception) -> NoReturn: # Catch SSL error first as it belongs to ConnectionError, # but we don't want to retry if isinstance(e, self.requests.exceptions.SSLError): @@ -764,7 +764,7 @@ def _handle_request_error(self, e) -> NoReturn: should_retry = False msg = textwrap.fill(msg) + "\n\n(Network error: %s)" % (err,) - raise APIConnectionError(msg, should_retry=should_retry) + raise APIConnectionError(msg, should_retry=should_retry) from e def close(self): if getattr(self._thread_local, "session", None) is not None: @@ -869,7 +869,7 @@ def _request_internal( return content, result.status_code, result.headers - def _handle_request_error(self, e, url) -> NoReturn: + def _handle_request_error(self, e: Exception, url: str) -> NoReturn: if isinstance(e, self.urlfetch.InvalidURLError): msg = ( "The Stripe library attempted to fetch an " @@ -892,7 +892,7 @@ def _handle_request_error(self, e, url) -> NoReturn: ) msg = textwrap.fill(msg) + "\n\n(Network error: " + str(e) + ")" - raise APIConnectionError(msg) + raise APIConnectionError(msg) from e def close(self): pass @@ -1046,7 +1046,7 @@ def _request_internal( return rcontent, rcode, headers - def _handle_request_error(self, e) -> NoReturn: + def _handle_request_error(self, e: Exception) -> NoReturn: if e.args[0] in [ self.pycurl.E_COULDNT_CONNECT, self.pycurl.E_COULDNT_RESOLVE_HOST, @@ -1079,7 +1079,7 @@ def _handle_request_error(self, e) -> NoReturn: should_retry = False msg = textwrap.fill(msg) + "\n\n(Network error: " + e.args[1] + ")" - raise APIConnectionError(msg, should_retry=should_retry) + raise APIConnectionError(msg, should_retry=should_retry) from e def _get_proxy(self, url) -> Optional[ParseResult]: if self._parsed_proxy: @@ -1194,13 +1194,13 @@ def _request_internal( lh = dict((k.lower(), v) for k, v in iter(dict(headers).items())) return rcontent, rcode, lh - def _handle_request_error(self, e) -> NoReturn: + def _handle_request_error(self, e: Exception) -> NoReturn: msg = ( "Unexpected error communicating with Stripe. " "If this problem persists, let us know at support@stripe.com." ) msg = textwrap.fill(msg) + "\n\n(Network error: " + str(e) + ")" - raise APIConnectionError(msg) + raise APIConnectionError(msg) from e def close(self): pass @@ -1307,7 +1307,7 @@ async def request_async( response_headers = response.headers return content, status_code, response_headers - def _handle_request_error(self, e) -> NoReturn: + def _handle_request_error(self, e: Exception) -> NoReturn: msg = ( "Unexpected error communicating with Stripe. If this " "problem persists, let us know at support@stripe.com." @@ -1316,7 +1316,7 @@ def _handle_request_error(self, e) -> NoReturn: should_retry = True msg = textwrap.fill(msg) + "\n\n(Network error: %s)" % (err,) - raise APIConnectionError(msg, should_retry=should_retry) + raise APIConnectionError(msg, should_retry=should_retry) from e def request_stream( self, method: str, url: str, headers: Mapping[str, str], post_data=None @@ -1446,7 +1446,7 @@ async def request_async( return (await content.read()), status_code, response_headers - def _handle_request_error(self, e) -> NoReturn: + def _handle_request_error(self, e: Exception) -> NoReturn: msg = ( "Unexpected error communicating with Stripe. If this " "problem persists, let us know at support@stripe.com." @@ -1455,7 +1455,7 @@ def _handle_request_error(self, e) -> NoReturn: should_retry = True msg = textwrap.fill(msg) + "\n\n(Network error: %s)" % (err,) - raise APIConnectionError(msg, should_retry=should_retry) + raise APIConnectionError(msg, should_retry=should_retry) from e def request_stream(self) -> Tuple[Iterable[bytes], int, Mapping[str, str]]: raise NotImplementedError( diff --git a/stripe/_stripe_object.py b/stripe/_stripe_object.py index d0b2230f0..1e7bff5d9 100644 --- a/stripe/_stripe_object.py +++ b/stripe/_stripe_object.py @@ -171,7 +171,7 @@ def __getattr__(self, k): k = self._field_remappings[k] return self[k] except KeyError as err: - raise AttributeError(*err.args) + raise AttributeError(*err.args) from err def __delattr__(self, k): if k[0] == "_" or k in self.__dict__: From cf7bb8b23eb0537fa86710f821a30dc2757f0869 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein <52928443+richardm-stripe@users.noreply.github.com> Date: Mon, 26 Aug 2024 13:03:36 -0700 Subject: [PATCH 04/11] Update http client comment (#1381) --- stripe/_http_client.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/stripe/_http_client.py b/stripe/_http_client.py index af7a16cff..459b40ae5 100644 --- a/stripe/_http_client.py +++ b/stripe/_http_client.py @@ -39,10 +39,12 @@ Never, ) -# - Requests is the preferred HTTP library -# - Google App Engine has urlfetch -# - Use Pycurl if it's there (at least it verifies SSL certs) -# - Fall back to urllib2 with a warning if needed + +# The precedence of HTTP libraries is +# - Urlfetch (this is provided by Google App Engine, so if it's present you probably want it) +# - Requests (popular library, the top priority for all environments outside Google App Engine, but not always present) +# - Pycurl (another library, not always present, not as preferred as Requests but at least it verifies SSL certs) +# - urllib2 with a warning (basically always present, fallback if needed) try: import urllib.request as urllibrequest import urllib.error as urlliberror From 1a7a18201ad6ecff0383caf6d25d3796f8964c9c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 22:02:00 +0000 Subject: [PATCH 05/11] Update generated code for v1218 --- OPENAPI_VERSION | 2 +- stripe/checkout/_session.py | 1 + stripe/checkout/_session_service.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c69246dbc..1bfc7d089 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1216 \ No newline at end of file +v1218 \ No newline at end of file diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 4fd3dad76..a9192f201 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -2015,6 +2015,7 @@ class CreateParams(RequestOptions): "klarna", "konbini", "link", + "mb_way", "mobilepay", "multibanco", "oxxo", diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index c5d30b63e..75a104888 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -243,6 +243,7 @@ class CreateParams(TypedDict): "klarna", "konbini", "link", + "mb_way", "mobilepay", "multibanco", "oxxo", From 8675970fa0a8399aa3c8767e1263c825756c1af6 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 27 Aug 2024 07:37:45 +0000 Subject: [PATCH 06/11] Update generated code for v1219 --- OPENAPI_VERSION | 2 +- stripe/tax/_calculation.py | 2 +- stripe/tax/_calculation_service.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1bfc7d089..e4c3076f0 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1218 \ No newline at end of file +v1219 \ No newline at end of file diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index 4bccc2b64..07f6d8442 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -629,7 +629,7 @@ class CreateParamsShippingCost(TypedDict): """ tax_code: NotRequired[str] """ - The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://stripe.com/settings/tax) is used. + The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used. """ class ListLineItemsParams(RequestOptions): diff --git a/stripe/tax/_calculation_service.py b/stripe/tax/_calculation_service.py index 521450ba6..e83b6cc3e 100644 --- a/stripe/tax/_calculation_service.py +++ b/stripe/tax/_calculation_service.py @@ -269,7 +269,7 @@ class CreateParamsShippingCost(TypedDict): """ tax_code: NotRequired[str] """ - The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://stripe.com/settings/tax) is used. + The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used. """ class RetrieveParams(TypedDict): From 59b8f3d94576e5888a6512c25fd916c5d1996e37 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 27 Aug 2024 17:16:31 +0000 Subject: [PATCH 07/11] Update generated code for v1220 --- OPENAPI_VERSION | 2 +- stripe/_invoice.py | 1 + stripe/_object_classes.py | 1 + stripe/_payment_intent.py | 1 + stripe/_quote_preview_invoice.py | 1 + stripe/_setup_attempt.py | 1 + stripe/_setup_intent.py | 1 + stripe/_terminal_service.py | 6 ++ stripe/api_resources/terminal/__init__.py | 3 + .../terminal/reader_collected_data.py | 21 +++++ stripe/terminal/__init__.py | 6 ++ stripe/terminal/_reader_collected_data.py | 82 +++++++++++++++++++ .../_reader_collected_data_service.py | 62 ++++++++++++++ 13 files changed, 187 insertions(+), 1 deletion(-) create mode 100644 stripe/api_resources/terminal/reader_collected_data.py create mode 100644 stripe/terminal/_reader_collected_data.py create mode 100644 stripe/terminal/_reader_collected_data_service.py diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e4c3076f0..655572183 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1219 \ No newline at end of file +v1220 \ No newline at end of file diff --git a/stripe/_invoice.py b/stripe/_invoice.py index f8f210652..88992efa5 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -520,6 +520,7 @@ class LastFinalizationError(StripeObject): "taxes_calculation_failed", "terminal_location_country_unsupported", "terminal_reader_busy", + "terminal_reader_collected_data_invalid", "terminal_reader_hardware_fault", "terminal_reader_invalid_location_for_payment", "terminal_reader_offline", diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index 0e02e76af..c7f999ed2 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -141,6 +141,7 @@ stripe.terminal.ConnectionToken.OBJECT_NAME: stripe.terminal.ConnectionToken, stripe.terminal.Location.OBJECT_NAME: stripe.terminal.Location, stripe.terminal.Reader.OBJECT_NAME: stripe.terminal.Reader, + stripe.terminal.ReaderCollectedData.OBJECT_NAME: stripe.terminal.ReaderCollectedData, stripe.test_helpers.TestClock.OBJECT_NAME: stripe.test_helpers.TestClock, stripe.Token.OBJECT_NAME: stripe.Token, stripe.Topup.OBJECT_NAME: stripe.Topup, diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index e2463a768..60338852a 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -273,6 +273,7 @@ class LastPaymentError(StripeObject): "taxes_calculation_failed", "terminal_location_country_unsupported", "terminal_reader_busy", + "terminal_reader_collected_data_invalid", "terminal_reader_hardware_fault", "terminal_reader_invalid_location_for_payment", "terminal_reader_offline", diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py index 19d1b3002..7a9cdca22 100644 --- a/stripe/_quote_preview_invoice.py +++ b/stripe/_quote_preview_invoice.py @@ -502,6 +502,7 @@ class LastFinalizationError(StripeObject): "taxes_calculation_failed", "terminal_location_country_unsupported", "terminal_reader_busy", + "terminal_reader_collected_data_invalid", "terminal_reader_hardware_fault", "terminal_reader_invalid_location_for_payment", "terminal_reader_offline", diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index 7a97a8b48..85bb49a48 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -600,6 +600,7 @@ class SetupError(StripeObject): "taxes_calculation_failed", "terminal_location_country_unsupported", "terminal_reader_busy", + "terminal_reader_collected_data_invalid", "terminal_reader_hardware_fault", "terminal_reader_invalid_location_for_payment", "terminal_reader_offline", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index b324a0062..72bc2dfa9 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -244,6 +244,7 @@ class LastSetupError(StripeObject): "taxes_calculation_failed", "terminal_location_country_unsupported", "terminal_reader_busy", + "terminal_reader_collected_data_invalid", "terminal_reader_hardware_fault", "terminal_reader_invalid_location_for_payment", "terminal_reader_offline", diff --git a/stripe/_terminal_service.py b/stripe/_terminal_service.py index a7dc46543..d960ac18e 100644 --- a/stripe/_terminal_service.py +++ b/stripe/_terminal_service.py @@ -4,6 +4,9 @@ from stripe.terminal._configuration_service import ConfigurationService from stripe.terminal._connection_token_service import ConnectionTokenService from stripe.terminal._location_service import LocationService +from stripe.terminal._reader_collected_data_service import ( + ReaderCollectedDataService, +) from stripe.terminal._reader_service import ReaderService @@ -14,3 +17,6 @@ def __init__(self, requestor): self.connection_tokens = ConnectionTokenService(self._requestor) self.locations = LocationService(self._requestor) self.readers = ReaderService(self._requestor) + self.reader_collected_data = ReaderCollectedDataService( + self._requestor + ) diff --git a/stripe/api_resources/terminal/__init__.py b/stripe/api_resources/terminal/__init__.py index 7e4cab631..e19cc7ac5 100644 --- a/stripe/api_resources/terminal/__init__.py +++ b/stripe/api_resources/terminal/__init__.py @@ -20,3 +20,6 @@ from stripe.api_resources.terminal.connection_token import ConnectionToken from stripe.api_resources.terminal.location import Location from stripe.api_resources.terminal.reader import Reader + from stripe.api_resources.terminal.reader_collected_data import ( + ReaderCollectedData, + ) diff --git a/stripe/api_resources/terminal/reader_collected_data.py b/stripe/api_resources/terminal/reader_collected_data.py new file mode 100644 index 000000000..e25ac2207 --- /dev/null +++ b/stripe/api_resources/terminal/reader_collected_data.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TYPE_CHECKING +from warnings import warn + +warn( + """ + The stripe.api_resources.terminal.reader_collected_data package is deprecated, please change your + imports to import from stripe.terminal directly. + From: + from stripe.api_resources.terminal.reader_collected_data import ReaderCollectedData + To: + from stripe.terminal import ReaderCollectedData + """, + DeprecationWarning, + stacklevel=2, +) +if not TYPE_CHECKING: + from stripe.terminal._reader_collected_data import ( # noqa + ReaderCollectedData, + ) diff --git a/stripe/terminal/__init__.py b/stripe/terminal/__init__.py index e4bff0712..5d8761712 100644 --- a/stripe/terminal/__init__.py +++ b/stripe/terminal/__init__.py @@ -15,4 +15,10 @@ LocationService as LocationService, ) from stripe.terminal._reader import Reader as Reader +from stripe.terminal._reader_collected_data import ( + ReaderCollectedData as ReaderCollectedData, +) +from stripe.terminal._reader_collected_data_service import ( + ReaderCollectedDataService as ReaderCollectedDataService, +) from stripe.terminal._reader_service import ReaderService as ReaderService diff --git a/stripe/terminal/_reader_collected_data.py b/stripe/terminal/_reader_collected_data.py new file mode 100644 index 000000000..b825e7f5d --- /dev/null +++ b/stripe/terminal/_reader_collected_data.py @@ -0,0 +1,82 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_resource import APIResource +from stripe._request_options import RequestOptions +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional +from typing_extensions import Literal, NotRequired, Unpack + + +class ReaderCollectedData(APIResource["ReaderCollectedData"]): + """ + Returns data collected by Terminal readers. This data is only stored for 24 hours. + """ + + OBJECT_NAME: ClassVar[Literal["terminal.reader_collected_data"]] = ( + "terminal.reader_collected_data" + ) + + class Magstripe(StripeObject): + data: Optional[str] + """ + The raw magstripe data collected by the reader. + """ + + class RetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + magstripe: Optional[Magstripe] + """ + The magstripe data collected by the reader. + """ + object: Literal["terminal.reader_collected_data"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + type: Literal["magstripe"] + """ + The type of data collected by the reader. + """ + + @classmethod + def retrieve( + cls, id: str, **params: Unpack["ReaderCollectedData.RetrieveParams"] + ) -> "ReaderCollectedData": + """ + Retrieve data collected using Reader hardware. + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["ReaderCollectedData.RetrieveParams"] + ) -> "ReaderCollectedData": + """ + Retrieve data collected using Reader hardware. + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + + @classmethod + def class_url(cls): + return "/v1/terminal/reader_collected_data" + + _inner_class_types = {"magstripe": Magstripe} diff --git a/stripe/terminal/_reader_collected_data_service.py b/stripe/terminal/_reader_collected_data_service.py new file mode 100644 index 000000000..9da52755b --- /dev/null +++ b/stripe/terminal/_reader_collected_data_service.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from stripe.terminal._reader_collected_data import ReaderCollectedData +from typing import List, cast +from typing_extensions import NotRequired, TypedDict + + +class ReaderCollectedDataService(StripeService): + class RetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + def retrieve( + self, + reader_collected_data: str, + params: "ReaderCollectedDataService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> ReaderCollectedData: + """ + Retrieve data collected using Reader hardware. + """ + return cast( + ReaderCollectedData, + self._request( + "get", + "/v1/terminal/reader_collected_data/{reader_collected_data}".format( + reader_collected_data=sanitize_id(reader_collected_data), + ), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + reader_collected_data: str, + params: "ReaderCollectedDataService.RetrieveParams" = {}, + options: RequestOptions = {}, + ) -> ReaderCollectedData: + """ + Retrieve data collected using Reader hardware. + """ + return cast( + ReaderCollectedData, + await self._request_async( + "get", + "/v1/terminal/reader_collected_data/{reader_collected_data}".format( + reader_collected_data=sanitize_id(reader_collected_data), + ), + api_mode="V1", + base_address="api", + params=params, + options=options, + ), + ) From 4aceb97547a991bebf8da2ff9c924f7dcebbd21d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 27 Aug 2024 21:07:04 +0000 Subject: [PATCH 08/11] Update generated code for v1222 --- OPENAPI_VERSION | 2 +- stripe/_payment_method.py | 24 ------------------------ stripe/_payment_method_service.py | 24 ------------------------ 3 files changed, 1 insertion(+), 49 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 655572183..ad9d6675e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1220 \ No newline at end of file +v1222 \ No newline at end of file diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 210c281b2..0beba234c 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -2072,10 +2072,6 @@ class ModifyParams(RequestOptions): """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. """ - rechnung: NotRequired["PaymentMethod.ModifyParamsRechnung"] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ us_bank_account: NotRequired["PaymentMethod.ModifyParamsUsBankAccount"] """ If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. @@ -2166,26 +2162,6 @@ class ModifyParamsPayto(TypedDict): The PayID alias for the bank account. """ - class ModifyParamsRechnung(TypedDict): - dob: "PaymentMethod.ModifyParamsRechnungDob" - """ - Customer's date of birth - """ - - class ModifyParamsRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - class ModifyParamsUsBankAccount(TypedDict): account_holder_type: NotRequired[Literal["company", "individual"]] """ diff --git a/stripe/_payment_method_service.py b/stripe/_payment_method_service.py index 1660ada47..4245d609a 100644 --- a/stripe/_payment_method_service.py +++ b/stripe/_payment_method_service.py @@ -813,10 +813,6 @@ class UpdateParams(TypedDict): """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. """ - rechnung: NotRequired["PaymentMethodService.UpdateParamsRechnung"] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ us_bank_account: NotRequired[ "PaymentMethodService.UpdateParamsUsBankAccount" ] @@ -909,26 +905,6 @@ class UpdateParamsPayto(TypedDict): The PayID alias for the bank account. """ - class UpdateParamsRechnung(TypedDict): - dob: "PaymentMethodService.UpdateParamsRechnungDob" - """ - Customer's date of birth - """ - - class UpdateParamsRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - class UpdateParamsUsBankAccount(TypedDict): account_holder_type: NotRequired[Literal["company", "individual"]] """ From 45264108355919405ee72f8590f37d6c40f62246 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Wed, 28 Aug 2024 04:26:21 +0300 Subject: [PATCH 09/11] Do not share RequestorOptions between APIRequestor instances if not passed (#1365) --- stripe/_api_requestor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stripe/_api_requestor.py b/stripe/_api_requestor.py index cc75eb516..dd91278b5 100644 --- a/stripe/_api_requestor.py +++ b/stripe/_api_requestor.py @@ -72,9 +72,11 @@ class _APIRequestor(object): def __init__( self, - options: RequestorOptions = RequestorOptions(), + options: Optional[RequestorOptions] = None, client: Optional[HTTPClient] = None, ): + if options is None: + options = RequestorOptions() self._options = options self._client = client From b9ff520ce2ef2944b04612c8f525ff3e38d51b7f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 16:57:51 +0000 Subject: [PATCH 10/11] Update generated code for v1225 --- OPENAPI_VERSION | 2 +- stripe/_line_item.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index b0cc0372f..f4c2f9398 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1224 \ No newline at end of file +v1225 \ No newline at end of file diff --git a/stripe/_line_item.py b/stripe/_line_item.py index 0372bdda6..88b5ffffe 100644 --- a/stripe/_line_item.py +++ b/stripe/_line_item.py @@ -90,7 +90,7 @@ class Tax(StripeObject): """ 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). """ - description: str + description: Optional[str] """ An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. """ From 8a5279d24713e0fef95e44ebc11221902ba33ae4 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:03:11 +0000 Subject: [PATCH 11/11] Update generated code for v1226 --- OPENAPI_VERSION | 2 +- stripe/issuing/_credit_underwriting_record.py | 8 ++++---- stripe/issuing/_credit_underwriting_record_service.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f4c2f9398..5bc53115a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1225 \ No newline at end of file +v1226 \ No newline at end of file diff --git a/stripe/issuing/_credit_underwriting_record.py b/stripe/issuing/_credit_underwriting_record.py index 0341c0987..f85cd45cf 100644 --- a/stripe/issuing/_credit_underwriting_record.py +++ b/stripe/issuing/_credit_underwriting_record.py @@ -393,7 +393,7 @@ class CorrectParams(RequestOptions): """ regulatory_reporting_file: NotRequired[str] """ - File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://docs.stripe.com/issuing/credit/report-required-regulatory-data-for-credit-decisions). Optional if previously provided and no changes are needed. + File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). Optional if previously provided and no changes are needed. """ underwriting_exception: NotRequired[ "CreditUnderwritingRecord.CorrectParamsUnderwritingException" @@ -819,7 +819,7 @@ class CreateFromProactiveReviewParams(RequestOptions): """ regulatory_reporting_file: NotRequired[str] """ - File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://docs.stripe.com/issuing/credit/report-required-regulatory-data-for-credit-decisions). + File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). """ underwriting_exception: NotRequired[ "CreditUnderwritingRecord.CreateFromProactiveReviewParamsUnderwritingException" @@ -1112,7 +1112,7 @@ class ReportDecisionParams(RequestOptions): """ regulatory_reporting_file: NotRequired[str] """ - File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://docs.stripe.com/issuing/credit/report-required-regulatory-data-for-credit-decisions). + File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). """ underwriting_exception: NotRequired[ "CreditUnderwritingRecord.ReportDecisionParamsUnderwritingException" @@ -1297,7 +1297,7 @@ class RetrieveParams(RequestOptions): """ regulatory_reporting_file: Optional[str] """ - File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://docs.stripe.com/issuing/credit/report-required-regulatory-data-for-credit-decisions). + File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). """ underwriting_exception: Optional[UnderwritingException] """ diff --git a/stripe/issuing/_credit_underwriting_record_service.py b/stripe/issuing/_credit_underwriting_record_service.py index c41e78933..23090408a 100644 --- a/stripe/issuing/_credit_underwriting_record_service.py +++ b/stripe/issuing/_credit_underwriting_record_service.py @@ -43,7 +43,7 @@ class CorrectParams(TypedDict): """ regulatory_reporting_file: NotRequired[str] """ - File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://docs.stripe.com/issuing/credit/report-required-regulatory-data-for-credit-decisions). Optional if previously provided and no changes are needed. + File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). Optional if previously provided and no changes are needed. """ underwriting_exception: NotRequired[ "CreditUnderwritingRecordService.CorrectParamsUnderwritingException" @@ -463,7 +463,7 @@ class CreateFromProactiveReviewParams(TypedDict): """ regulatory_reporting_file: NotRequired[str] """ - File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://docs.stripe.com/issuing/credit/report-required-regulatory-data-for-credit-decisions). + File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). """ underwriting_exception: NotRequired[ "CreditUnderwritingRecordService.CreateFromProactiveReviewParamsUnderwritingException" @@ -758,7 +758,7 @@ class ReportDecisionParams(TypedDict): """ regulatory_reporting_file: NotRequired[str] """ - File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://docs.stripe.com/issuing/credit/report-required-regulatory-data-for-credit-decisions). + File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). """ underwriting_exception: NotRequired[ "CreditUnderwritingRecordService.ReportDecisionParamsUnderwritingException"