From 425002a581253257b8e9779d6b50c56ff162a6f5 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 9 Jun 2025 13:28:57 +0000 Subject: [PATCH 01/28] Update generated code for v1789 and 2025-05-28.preview --- API_VERSION | 1 + OPENAPI_VERSION | 2 +- stripe/_account.py | 15 +++++++ stripe/_account_service.py | 27 +++++++++++++ stripe/_credit_note.py | 18 ++++----- stripe/_credit_note_preview_lines_service.py | 6 +-- stripe/_credit_note_service.py | 12 +++--- stripe/_event.py | 2 +- stripe/_invoice.py | 2 +- stripe/_invoice_service.py | 2 +- stripe/_payment_attempt_record.py | 9 ++--- stripe/_payment_intent.py | 6 +-- stripe/_payment_intent_service.py | 6 +-- stripe/_payment_record.py | 9 ++--- stripe/_setup_intent.py | 6 +-- stripe/_setup_intent_service.py | 4 +- stripe/_subscription.py | 8 ++-- stripe/_subscription_service.py | 6 +-- stripe/_token.py | 3 ++ stripe/_token_service.py | 3 ++ stripe/billing_portal/_session.py | 4 +- stripe/billing_portal/_session_service.py | 2 +- stripe/checkout/_session.py | 9 ++--- stripe/checkout/_session_service.py | 9 ++--- stripe/identity/_verification_session.py | 40 +++++++++++++++++++ .../identity/_verification_session_service.py | 16 ++++++++ stripe/terminal/_configuration.py | 1 + stripe/terminal/_location.py | 2 +- stripe/terminal/_location_service.py | 2 +- stripe/treasury/_financial_account.py | 4 ++ stripe/treasury/_financial_account_service.py | 4 ++ 31 files changed, 171 insertions(+), 69 deletions(-) create mode 100644 API_VERSION diff --git a/API_VERSION b/API_VERSION new file mode 100644 index 000000000..414806f2d --- /dev/null +++ b/API_VERSION @@ -0,0 +1 @@ +2025-05-28.preview \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3108db19f..da86bc739 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1773 \ No newline at end of file +v1789 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index 477610a59..e6ddb426e 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -2744,6 +2744,9 @@ class CreateParamsCompany(TypedDict): registration_date: NotRequired[ "Literal['']|Account.CreateParamsCompanyRegistrationDate" ] + """ + When the business was incorporated or registered. + """ registration_number: NotRequired[str] """ The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). @@ -3020,6 +3023,12 @@ class CreateParamsDocuments(TypedDict): """ One or more documents that demonstrate proof of a company's tax ID. """ + proof_of_address: NotRequired[ + "Account.CreateParamsDocumentsProofOfAddress" + ] + """ + One or more documents that demonstrate proof of address. + """ proof_of_registration: NotRequired[ "Account.CreateParamsDocumentsProofOfRegistration" ] @@ -3069,6 +3078,12 @@ class CreateParamsDocumentsCompanyTaxIdVerification(TypedDict): One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. """ + class CreateParamsDocumentsProofOfAddress(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + class CreateParamsDocumentsProofOfRegistration(TypedDict): files: NotRequired[List[str]] """ diff --git a/stripe/_account_service.py b/stripe/_account_service.py index 58fb8c9c7..c3658dd70 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -1224,6 +1224,9 @@ class CreateParamsCompany(TypedDict): registration_date: NotRequired[ "Literal['']|AccountService.CreateParamsCompanyRegistrationDate" ] + """ + When the business was incorporated or registered. + """ registration_number: NotRequired[str] """ The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). @@ -1506,6 +1509,12 @@ class CreateParamsDocuments(TypedDict): """ One or more documents that demonstrate proof of a company's tax ID. """ + proof_of_address: NotRequired[ + "AccountService.CreateParamsDocumentsProofOfAddress" + ] + """ + One or more documents that demonstrate proof of address. + """ proof_of_registration: NotRequired[ "AccountService.CreateParamsDocumentsProofOfRegistration" ] @@ -1555,6 +1564,12 @@ class CreateParamsDocumentsCompanyTaxIdVerification(TypedDict): One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. """ + class CreateParamsDocumentsProofOfAddress(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + class CreateParamsDocumentsProofOfRegistration(TypedDict): files: NotRequired[List[str]] """ @@ -3613,6 +3628,12 @@ class UpdateParamsDocuments(TypedDict): """ One or more documents that demonstrate proof of a company's tax ID. """ + proof_of_address: NotRequired[ + "AccountService.UpdateParamsDocumentsProofOfAddress" + ] + """ + One or more documents that demonstrate proof of address. + """ proof_of_registration: NotRequired[ "AccountService.UpdateParamsDocumentsProofOfRegistration" ] @@ -3662,6 +3683,12 @@ class UpdateParamsDocumentsCompanyTaxIdVerification(TypedDict): One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. """ + class UpdateParamsDocumentsProofOfAddress(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + class UpdateParamsDocumentsProofOfRegistration(TypedDict): files: NotRequired[List[str]] """ diff --git a/stripe/_credit_note.py b/stripe/_credit_note.py index d36176630..8044d6640 100644 --- a/stripe/_credit_note.py +++ b/stripe/_credit_note.py @@ -197,7 +197,7 @@ class TaxRateDetails(StripeObject): class CreateParams(RequestOptions): amount: NotRequired[int] """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. + The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ credit_amount: NotRequired[int] """ @@ -221,7 +221,7 @@ class CreateParams(RequestOptions): """ lines: NotRequired[List["CreditNote.CreateParamsLine"]] """ - Line items that make up the credit note. + Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ memo: NotRequired[str] """ @@ -256,7 +256,7 @@ class CreateParams(RequestOptions): """ shipping_cost: NotRequired["CreditNote.CreateParamsShippingCost"] """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ class CreateParamsLine(TypedDict): @@ -416,7 +416,7 @@ class ModifyParams(RequestOptions): class PreviewLinesParams(RequestOptions): amount: NotRequired[int] """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. + The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ credit_amount: NotRequired[int] """ @@ -448,7 +448,7 @@ class PreviewLinesParams(RequestOptions): """ lines: NotRequired[List["CreditNote.PreviewLinesParamsLine"]] """ - Line items that make up the credit note. + Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ memo: NotRequired[str] """ @@ -483,7 +483,7 @@ class PreviewLinesParams(RequestOptions): """ shipping_cost: NotRequired["CreditNote.PreviewLinesParamsShippingCost"] """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ starting_after: NotRequired[str] """ @@ -563,7 +563,7 @@ class PreviewLinesParamsShippingCost(TypedDict): class PreviewParams(RequestOptions): amount: NotRequired[int] """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. + The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ credit_amount: NotRequired[int] """ @@ -587,7 +587,7 @@ class PreviewParams(RequestOptions): """ lines: NotRequired[List["CreditNote.PreviewParamsLine"]] """ - Line items that make up the credit note. + Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ memo: NotRequired[str] """ @@ -622,7 +622,7 @@ class PreviewParams(RequestOptions): """ shipping_cost: NotRequired["CreditNote.PreviewParamsShippingCost"] """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ class PreviewParamsLine(TypedDict): diff --git a/stripe/_credit_note_preview_lines_service.py b/stripe/_credit_note_preview_lines_service.py index 4923a5d63..e897ed45f 100644 --- a/stripe/_credit_note_preview_lines_service.py +++ b/stripe/_credit_note_preview_lines_service.py @@ -12,7 +12,7 @@ class CreditNotePreviewLinesService(StripeService): class ListParams(TypedDict): amount: NotRequired[int] """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. + The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ credit_amount: NotRequired[int] """ @@ -46,7 +46,7 @@ class ListParams(TypedDict): List["CreditNotePreviewLinesService.ListParamsLine"] ] """ - Line items that make up the credit note. + Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ memo: NotRequired[str] """ @@ -85,7 +85,7 @@ class ListParams(TypedDict): "CreditNotePreviewLinesService.ListParamsShippingCost" ] """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ starting_after: NotRequired[str] """ diff --git a/stripe/_credit_note_service.py b/stripe/_credit_note_service.py index 4c5023103..ab87ed277 100644 --- a/stripe/_credit_note_service.py +++ b/stripe/_credit_note_service.py @@ -22,7 +22,7 @@ def __init__(self, requestor): class CreateParams(TypedDict): amount: NotRequired[int] """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. + The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ credit_amount: NotRequired[int] """ @@ -46,7 +46,7 @@ class CreateParams(TypedDict): """ lines: NotRequired[List["CreditNoteService.CreateParamsLine"]] """ - Line items that make up the credit note. + Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ memo: NotRequired[str] """ @@ -83,7 +83,7 @@ class CreateParams(TypedDict): "CreditNoteService.CreateParamsShippingCost" ] """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ class CreateParamsLine(TypedDict): @@ -211,7 +211,7 @@ class ListParamsCreated(TypedDict): class PreviewParams(TypedDict): amount: NotRequired[int] """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. + The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ credit_amount: NotRequired[int] """ @@ -235,7 +235,7 @@ class PreviewParams(TypedDict): """ lines: NotRequired[List["CreditNoteService.PreviewParamsLine"]] """ - Line items that make up the credit note. + Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ memo: NotRequired[str] """ @@ -272,7 +272,7 @@ class PreviewParams(TypedDict): "CreditNoteService.PreviewParamsShippingCost" ] """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. """ class PreviewParamsLine(TypedDict): diff --git a/stripe/_event.py b/stripe/_event.py index 950f926f0..d7a23bd63 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -173,7 +173,7 @@ class RetrieveParams(RequestOptions): """ api_version: Optional[str] """ - The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014. + The Stripe API version used to render `data` when the event was created. The contents of `data` never change, so this value remains static regardless of the API version currently in use. This property is populated only for events created on or after October 31, 2014. """ context: Optional[str] """ diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 43d7c4c90..e891fbb01 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -3989,7 +3989,7 @@ class CreatePreviewParamsSubscriptionDetails(TypedDict): """ cancel_at_period_end: NotRequired[bool] """ - Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ cancel_now: NotRequired[bool] """ diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 99e3947f2..98d1d5c91 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -2779,7 +2779,7 @@ class CreatePreviewParamsSubscriptionDetails(TypedDict): """ cancel_at_period_end: NotRequired[bool] """ - Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ cancel_now: NotRequired[bool] """ diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 9cc81eac7..17bbabef2 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -1582,13 +1582,7 @@ class Twint(StripeObject): class UsBankAccount(StripeObject): account_holder_type: Optional[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ account_type: Optional[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ bank_name: Optional[str] """ Name of the bank associated with the bank account. @@ -1720,6 +1714,9 @@ class Zip(StripeObject): It contains information specific to the payment method. """ us_bank_account: Optional[UsBankAccount] + """ + Details of the US Bank Account used for this payment attempt. + """ wechat: Optional[Wechat] wechat_pay: Optional[WechatPay] zip: Optional[Zip] diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 1550ea734..3f464e324 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -4132,7 +4132,7 @@ class ConfirmParams(RequestOptions): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ radar_options: NotRequired["PaymentIntent.ConfirmParamsRadarOptions"] """ @@ -8037,7 +8037,7 @@ class CreateParams(RequestOptions): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ radar_options: NotRequired["PaymentIntent.CreateParamsRadarOptions"] """ @@ -12151,7 +12151,7 @@ class ModifyParams(RequestOptions): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ receipt_email: NotRequired["Literal['']|str"] """ diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 98a356fa7..15fac1a3a 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -905,7 +905,7 @@ class ConfirmParams(TypedDict): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ radar_options: NotRequired[ "PaymentIntentService.ConfirmParamsRadarOptions" @@ -4852,7 +4852,7 @@ class CreateParams(TypedDict): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ radar_options: NotRequired[ "PaymentIntentService.CreateParamsRadarOptions" @@ -9054,7 +9054,7 @@ class UpdateParams(TypedDict): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ receipt_email: NotRequired["Literal['']|str"] """ diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 82417fa14..3b517705e 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -1586,13 +1586,7 @@ class Twint(StripeObject): class UsBankAccount(StripeObject): account_holder_type: Optional[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ account_type: Optional[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ bank_name: Optional[str] """ Name of the bank associated with the bank account. @@ -1724,6 +1718,9 @@ class Zip(StripeObject): It contains information specific to the payment method. """ us_bank_account: Optional[UsBankAccount] + """ + Details of the US Bank Account used for this payment attempt. + """ wechat: Optional[Wechat] wechat_pay: Optional[WechatPay] zip: Optional[Zip] diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index e3775427f..577744b3c 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -2261,7 +2261,7 @@ class CreateParams(RequestOptions): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ return_url: NotRequired[str] """ @@ -3780,7 +3780,7 @@ class ModifyParams(RequestOptions): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ class ModifyParamsPaymentMethodData(TypedDict): @@ -5226,7 +5226,7 @@ class VerifyMicrodepositsParams(RequestOptions): """ payment_method_types: List[str] """ - The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. + The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ single_use_mandate: Optional[ExpandableField["Mandate"]] """ diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index b9eb59fa8..d19c63b23 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -1568,7 +1568,7 @@ class CreateParams(TypedDict): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ return_url: NotRequired[str] """ @@ -3147,7 +3147,7 @@ class UpdateParams(TypedDict): """ payment_method_types: NotRequired[List[str]] """ - The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ class UpdateParamsPaymentMethodData(TypedDict): diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 3045590a6..9528e84d8 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -590,7 +590,7 @@ class CreateParams(RequestOptions): """ automatic_tax: NotRequired["Subscription.CreateParamsAutomaticTax"] """ - Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + Automatic tax settings for this subscription. """ backdate_start_date: NotRequired[int] """ @@ -624,7 +624,7 @@ class CreateParams(RequestOptions): """ cancel_at_period_end: NotRequired[bool] """ - Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ collection_method: NotRequired[ Literal["charge_automatically", "send_invoice"] @@ -1605,7 +1605,7 @@ class ModifyParams(RequestOptions): """ cancel_at_period_end: NotRequired[bool] """ - Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ cancellation_details: NotRequired[ "Subscription.ModifyParamsCancellationDetails" @@ -2474,7 +2474,7 @@ class SearchParams(RequestOptions): """ cancel_at_period_end: bool """ - Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. This field will be removed in a future API version. Please use `cancel_at` instead. + Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. """ canceled_at: Optional[int] """ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index 68abb5bc6..eeaaee5d8 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -59,7 +59,7 @@ class CreateParams(TypedDict): "SubscriptionService.CreateParamsAutomaticTax" ] """ - Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + Automatic tax settings for this subscription. """ backdate_start_date: NotRequired[int] """ @@ -93,7 +93,7 @@ class CreateParams(TypedDict): """ cancel_at_period_end: NotRequired[bool] """ - Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ collection_method: NotRequired[ Literal["charge_automatically", "send_invoice"] @@ -1132,7 +1132,7 @@ class UpdateParams(TypedDict): """ cancel_at_period_end: NotRequired[bool] """ - Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. """ cancellation_details: NotRequired[ "SubscriptionService.UpdateParamsCancellationDetails" diff --git a/stripe/_token.py b/stripe/_token.py index 1d1b28780..240c39ac4 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -174,6 +174,9 @@ class CreateParamsAccountCompany(TypedDict): registration_date: NotRequired[ "Literal['']|Token.CreateParamsAccountCompanyRegistrationDate" ] + """ + When the business was incorporated or registered. + """ registration_number: NotRequired[str] """ The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). diff --git a/stripe/_token_service.py b/stripe/_token_service.py index 927ef7f39..981996870 100644 --- a/stripe/_token_service.py +++ b/stripe/_token_service.py @@ -141,6 +141,9 @@ class CreateParamsAccountCompany(TypedDict): registration_date: NotRequired[ "Literal['']|TokenService.CreateParamsAccountCompanyRegistrationDate" ] + """ + When the business was incorporated or registered. + """ registration_number: NotRequired[str] """ The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). diff --git a/stripe/billing_portal/_session.py b/stripe/billing_portal/_session.py index 81d44cb26..d6295f8e5 100644 --- a/stripe/billing_portal/_session.py +++ b/stripe/billing_portal/_session.py @@ -131,7 +131,7 @@ class Item(StripeObject): discounts: Optional[List[Discount]] """ - The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + The coupon or promotion code to apply to this subscription update. """ items: List[Item] """ @@ -364,7 +364,7 @@ class CreateParamsFlowDataSubscriptionUpdateConfirm(TypedDict): ] ] """ - The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + The coupon or promotion code to apply to this subscription update. """ items: List[ "Session.CreateParamsFlowDataSubscriptionUpdateConfirmItem" diff --git a/stripe/billing_portal/_session_service.py b/stripe/billing_portal/_session_service.py index 21ce06da5..1371f6695 100644 --- a/stripe/billing_portal/_session_service.py +++ b/stripe/billing_portal/_session_service.py @@ -200,7 +200,7 @@ class CreateParamsFlowDataSubscriptionUpdateConfirm(TypedDict): ] ] """ - The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + The coupon or promotion code to apply to this subscription update. """ items: List[ "SessionService.CreateParamsFlowDataSubscriptionUpdateConfirmItem" diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 2ce9d1c84..19e084c8f 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -2259,7 +2259,7 @@ class CreateParams(RequestOptions): """ line_items: NotRequired[List["Session.CreateParamsLineItem"]] """ - A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). The parameter is required for `payment` and `subscription` mode. For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. @@ -4676,14 +4676,11 @@ class CreateParamsSubscriptionData(TypedDict): """ trial_end: NotRequired[int] """ - Unix timestamp representing the end of the trial period the customer - will get before being charged for the first time. Has to be at least - 48 hours in the future. + Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future. """ trial_period_days: NotRequired[int] """ - Integer representing the number of trial period days before the - customer is charged for the first time. Has to be at least 1. + Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. """ trial_settings: NotRequired[ "Session.CreateParamsSubscriptionDataTrialSettings" diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index 6cf2d51e7..eb476b21c 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -134,7 +134,7 @@ class CreateParams(TypedDict): """ line_items: NotRequired[List["SessionService.CreateParamsLineItem"]] """ - A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). The parameter is required for `payment` and `subscription` mode. For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. @@ -2605,14 +2605,11 @@ class CreateParamsSubscriptionData(TypedDict): """ trial_end: NotRequired[int] """ - Unix timestamp representing the end of the trial period the customer - will get before being charged for the first time. Has to be at least - 48 hours in the future. + Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future. """ trial_period_days: NotRequired[int] """ - Integer representing the number of trial period days before the - customer is charged for the first time. Has to be at least 1. + Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. """ trial_settings: NotRequired[ "SessionService.CreateParamsSubscriptionDataTrialSettings" diff --git a/stripe/identity/_verification_session.py b/stripe/identity/_verification_session.py index 5ecd70ea0..aa2e98113 100644 --- a/stripe/identity/_verification_session.py +++ b/stripe/identity/_verification_session.py @@ -106,6 +106,16 @@ class Email(StripeObject): class IdNumber(StripeObject): pass + class Matching(StripeObject): + dob: Optional[Literal["none", "similar"]] + """ + Strictness of the DOB matching policy to apply. + """ + name: Optional[Literal["none", "similar"]] + """ + Strictness of the name matching policy to apply. + """ + class Phone(StripeObject): require_verification: Optional[bool] """ @@ -115,11 +125,13 @@ class Phone(StripeObject): document: Optional[Document] email: Optional[Email] id_number: Optional[IdNumber] + matching: Optional[Matching] phone: Optional[Phone] _inner_class_types = { "document": Document, "email": Email, "id_number": IdNumber, + "matching": Matching, "phone": Phone, } @@ -139,6 +151,16 @@ class Redaction(StripeObject): Indicates whether this object and its related objects have been redacted or not. """ + class RelatedPerson(StripeObject): + account: Optional[str] + """ + Token referencing the associated Account of the related Person resource. + """ + person: Optional[str] + """ + Token referencing the related Person resource. + """ + class VerifiedOutputs(StripeObject): class Address(StripeObject): city: Optional[str] @@ -263,6 +285,12 @@ class CreateParams(RequestOptions): """ Token referencing a Customer Account resource. """ + related_person: NotRequired[ + "VerificationSession.CreateParamsRelatedPerson" + ] + """ + Tokens referencing a Person resource and it's associated account. + """ return_url: NotRequired[str] """ The URL that the user will be redirected to upon completing the verification flow. @@ -314,6 +342,16 @@ class CreateParamsProvidedDetails(TypedDict): Phone number of user being verified """ + class CreateParamsRelatedPerson(TypedDict): + account: str + """ + A token representing a connected account. If provided, the person parameter is also required and must be associated with the account. + """ + person: str + """ + A token referencing a Person resource that this verification is being used to verify. + """ + class ListParams(RequestOptions): client_reference_id: NotRequired[str] """ @@ -496,6 +534,7 @@ class RetrieveParams(RequestOptions): """ Token referencing a Customer Account resource. """ + related_person: Optional[RelatedPerson] status: Literal["canceled", "processing", "requires_input", "verified"] """ Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). @@ -1054,5 +1093,6 @@ async def retrieve_async( "options": Options, "provided_details": ProvidedDetails, "redaction": Redaction, + "related_person": RelatedPerson, "verified_outputs": VerifiedOutputs, } diff --git a/stripe/identity/_verification_session_service.py b/stripe/identity/_verification_session_service.py index 5000991c2..bc598768f 100644 --- a/stripe/identity/_verification_session_service.py +++ b/stripe/identity/_verification_session_service.py @@ -47,6 +47,12 @@ class CreateParams(TypedDict): """ Token referencing a Customer Account resource. """ + related_person: NotRequired[ + "VerificationSessionService.CreateParamsRelatedPerson" + ] + """ + Tokens referencing a Person resource and it's associated account. + """ return_url: NotRequired[str] """ The URL that the user will be redirected to upon completing the verification flow. @@ -98,6 +104,16 @@ class CreateParamsProvidedDetails(TypedDict): Phone number of user being verified """ + class CreateParamsRelatedPerson(TypedDict): + account: str + """ + A token representing a connected account. If provided, the person parameter is also required and must be associated with the account. + """ + person: str + """ + A token referencing a Person resource that this verification is being used to verify. + """ + class ListParams(TypedDict): client_reference_id: NotRequired[str] """ diff --git a/stripe/terminal/_configuration.py b/stripe/terminal/_configuration.py index f8382d28b..f0162b715 100644 --- a/stripe/terminal/_configuration.py +++ b/stripe/terminal/_configuration.py @@ -30,6 +30,7 @@ class Configuration( ): """ A Configurations object represents how features should be configured for terminal readers. + For information about how to use it, see the [Terminal configurations documentation](https://docs.stripe.com/terminal/fleet/configurations-overview). """ OBJECT_NAME: ClassVar[Literal["terminal.configuration"]] = ( diff --git a/stripe/terminal/_location.py b/stripe/terminal/_location.py index afbad216d..1ce2eb031 100644 --- a/stripe/terminal/_location.py +++ b/stripe/terminal/_location.py @@ -130,7 +130,7 @@ class ModifyParams(RequestOptions): """ The ID of a configuration that will be used to customize all readers in this location. """ - display_name: NotRequired[str] + display_name: NotRequired["Literal['']|str"] """ A name for the location. """ diff --git a/stripe/terminal/_location_service.py b/stripe/terminal/_location_service.py index 6e810861b..8dd6dbf46 100644 --- a/stripe/terminal/_location_service.py +++ b/stripe/terminal/_location_service.py @@ -94,7 +94,7 @@ class UpdateParams(TypedDict): """ The ID of a configuration that will be used to customize all readers in this location. """ - display_name: NotRequired[str] + display_name: NotRequired["Literal['']|str"] """ A name for the location. """ diff --git a/stripe/treasury/_financial_account.py b/stripe/treasury/_financial_account.py index 8f931b299..366f9e70f 100644 --- a/stripe/treasury/_financial_account.py +++ b/stripe/treasury/_financial_account.py @@ -347,6 +347,10 @@ class ListParams(RequestOptions): """ An object ID cursor for use in pagination. """ + status: NotRequired[Literal["closed", "open"]] + """ + Only return FinancialAccounts that have the given status: `open` or `closed` + """ class ListParamsCreated(TypedDict): gt: NotRequired[int] diff --git a/stripe/treasury/_financial_account_service.py b/stripe/treasury/_financial_account_service.py index 06d8fe63a..86ffbf0c6 100644 --- a/stripe/treasury/_financial_account_service.py +++ b/stripe/treasury/_financial_account_service.py @@ -252,6 +252,10 @@ class ListParams(TypedDict): """ An object ID cursor for use in pagination. """ + status: NotRequired[Literal["closed", "open"]] + """ + Only return FinancialAccounts that have the given status: `open` or `closed` + """ class ListParamsCreated(TypedDict): gt: NotRequired[int] From c7108f2bb10800333dfb0e0a7e148631fe5aa134 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 10 Jun 2025 08:40:01 +0000 Subject: [PATCH 02/28] Update generated code for v1791 and 2025-05-28.preview --- OPENAPI_VERSION | 2 +- stripe/_payment_intent.py | 8 ++++---- stripe/_payment_intent_service.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index da86bc739..fdc3b205b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1789 \ No newline at end of file +v1791 \ No newline at end of file diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 3f464e324..6a3213f26 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -2322,7 +2322,7 @@ class Giropay(StripeObject): """ class Gopay(StripeObject): - setup_future_usage: Optional[Literal["none"]] + setup_future_usage: Optional[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6883,7 +6883,7 @@ class ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): """ class ConfirmParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -10809,7 +10809,7 @@ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): """ class CreateParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -14883,7 +14883,7 @@ class ModifyParamsPaymentMethodOptionsGiropay(TypedDict): """ class ModifyParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 15fac1a3a..5beaae3f3 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -3698,7 +3698,7 @@ class ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): """ class ConfirmParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7674,7 +7674,7 @@ class CreateParamsPaymentMethodOptionsGiropay(TypedDict): """ class CreateParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -11836,7 +11836,7 @@ class UpdateParamsPaymentMethodOptionsGiropay(TypedDict): """ class UpdateParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. From 3143122eb3837ad0e176f722962284bad72277c7 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 00:53:29 +0000 Subject: [PATCH 03/28] Update generated code for v1795 and 2025-05-28.preview --- OPENAPI_VERSION | 2 +- stripe/_dispute.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index fdc3b205b..bc8f932b3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1791 \ No newline at end of file +v1795 \ No newline at end of file diff --git a/stripe/_dispute.py b/stripe/_dispute.py index cf5c46f5c..2584022a1 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -368,7 +368,7 @@ class Card(StripeObject): """ Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. """ - case_type: Literal["chargeback", "inquiry"] + case_type: Literal["chargeback", "compliance", "inquiry"] """ The type of dispute opened. Different case types may have varying fees and financial impact. """ @@ -794,7 +794,9 @@ class RetrieveParams(RequestOptions): """ 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). """ - enhanced_eligibility_types: List[Literal["visa_compelling_evidence_3"]] + enhanced_eligibility_types: List[ + Literal["visa_compelling_evidence_3", "visa_compliance"] + ] """ List of eligibility types that are included in `enhanced_evidence`. """ From 5fa4bc10fc9de485429ecaffa8dd2ec607f26c76 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 02:58:31 +0000 Subject: [PATCH 04/28] Update generated code for v1796 and 2025-05-28.preview --- OPENAPI_VERSION | 2 +- stripe/_charge.py | 6 ++--- stripe/_confirmation_token.py | 8 +++---- stripe/_invoice.py | 8 +++---- stripe/_invoice_service.py | 8 +++---- stripe/_payment_intent.py | 22 +++++++++---------- stripe/_payment_intent_service.py | 12 +++++----- .../_confirmation_token_service.py | 4 ++-- 8 files changed, 35 insertions(+), 35 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bc8f932b3..3dad0942d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1795 \ No newline at end of file +v1796 \ No newline at end of file diff --git a/stripe/_charge.py b/stripe/_charge.py index ecc5cf171..b217eb440 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -483,9 +483,9 @@ class Plan(StripeObject): For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ plan: Optional[Plan] @@ -845,7 +845,7 @@ class ShippingAddress(StripeObject): incremental_authorization: Optional[IncrementalAuthorization] installments: Optional[Installments] """ - Installment details for this payment (Mexico only). + Installment details for this payment. For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). """ diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 6ff46537b..d0cb2e181 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -75,9 +75,9 @@ class Plan(StripeObject): For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ plan: Optional[Plan] @@ -2649,9 +2649,9 @@ class CreateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ class CreateParamsShipping(TypedDict): diff --git a/stripe/_invoice.py b/stripe/_invoice.py index e891fbb01..8e4f730c6 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -1978,9 +1978,9 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( @@ -4683,9 +4683,9 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 98d1d5c91..1d3febf05 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -760,9 +760,9 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( @@ -3834,9 +3834,9 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ class UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 6a3213f26..5f7a930df 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -1977,9 +1977,9 @@ class AvailablePlan(StripeObject): For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ class Plan(StripeObject): @@ -1992,9 +1992,9 @@ class Plan(StripeObject): For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ available_plans: Optional[List[AvailablePlan]] @@ -2092,7 +2092,7 @@ class Address(StripeObject): """ installments: Optional[Installments] """ - Installment details for this payment (Mexico only). + Installment details for this payment. For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). """ @@ -6561,9 +6561,9 @@ class ConfirmParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ class ConfirmParamsPaymentMethodOptionsCardMandateOptions(TypedDict): @@ -10487,9 +10487,9 @@ class CreateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ class CreateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): @@ -14561,9 +14561,9 @@ class ModifyParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ class ModifyParamsPaymentMethodOptionsCardMandateOptions(TypedDict): diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 5beaae3f3..a02c7a18c 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -3376,9 +3376,9 @@ class ConfirmParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ class ConfirmParamsPaymentMethodOptionsCardMandateOptions(TypedDict): @@ -7352,9 +7352,9 @@ class CreateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ class CreateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): @@ -11514,9 +11514,9 @@ class UpdateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ class UpdateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): diff --git a/stripe/test_helpers/_confirmation_token_service.py b/stripe/test_helpers/_confirmation_token_service.py index 07cb34b3e..3fe284718 100644 --- a/stripe/test_helpers/_confirmation_token_service.py +++ b/stripe/test_helpers/_confirmation_token_service.py @@ -964,9 +964,9 @@ class CreateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["fixed_count"] + type: Literal["bonus", "fixed_count", "revolving"] """ - Type of installment plan, one of `fixed_count`. + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ class CreateParamsShipping(TypedDict): From 7b83953291d07b86bfb8f00aa21cdb9fe0c03959 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 15:10:12 +0000 Subject: [PATCH 05/28] Update generated code for v1796 and 2025-05-28.preview --- stripe/_api_version.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stripe/_api_version.py b/stripe/_api_version.py index f4435ce79..04746054b 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -2,3 +2,5 @@ # File generated from our OpenAPI spec class _ApiVersion: CURRENT = "2025-05-28.preview" + CURRENT_MAJOR = "preview" + CURRENT_MONTHLY = "2025-05-28" From ce3571c3eb4842cb14a5728cdbc91d0de1b3354d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 18:57:28 +0000 Subject: [PATCH 06/28] Update generated code for v1797 and 2025-05-28.preview --- OPENAPI_VERSION | 2 +- stripe/_dispute.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3dad0942d..d5559dc5e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1796 \ No newline at end of file +v1797 \ No newline at end of file diff --git a/stripe/_dispute.py b/stripe/_dispute.py index 2584022a1..8f4d2c067 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -354,6 +354,9 @@ class VisaCompliance(StripeObject): """ The number of times evidence has been submitted. Typically, you may only submit evidence once. """ + submission_method: Optional[ + Literal["manual", "not_submitted", "smart_disputes"] + ] _inner_class_types = {"enhanced_eligibility": EnhancedEligibility} class PaymentMethodDetails(StripeObject): From e404e396594facbb180d1dfb7c63e67e1dccb9e5 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 20:26:27 +0000 Subject: [PATCH 07/28] Update generated code for v1799 and 2025-05-28.preview --- OPENAPI_VERSION | 2 +- stripe/_customer_session.py | 4 ++-- stripe/_customer_session_service.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d5559dc5e..3cac03d77 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1797 \ No newline at end of file +v1799 \ No newline at end of file diff --git a/stripe/_customer_session.py b/stripe/_customer_session.py index e95a0887d..d0b4b6c4a 100644 --- a/stripe/_customer_session.py +++ b/stripe/_customer_session.py @@ -52,7 +52,7 @@ class Features(StripeObject): """ payment_method_redisplay_limit: Optional[int] """ - Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. """ payment_method_remove: Literal["disabled", "enabled"] """ @@ -180,7 +180,7 @@ class CreateParamsComponentsPaymentElementFeatures(TypedDict): """ payment_method_redisplay_limit: NotRequired[int] """ - Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. """ payment_method_remove: NotRequired[Literal["disabled", "enabled"]] """ diff --git a/stripe/_customer_session_service.py b/stripe/_customer_session_service.py index 2b4c96f38..45cb77aed 100644 --- a/stripe/_customer_session_service.py +++ b/stripe/_customer_session_service.py @@ -79,7 +79,7 @@ class CreateParamsComponentsPaymentElementFeatures(TypedDict): """ payment_method_redisplay_limit: NotRequired[int] """ - Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. """ payment_method_remove: NotRequired[Literal["disabled", "enabled"]] """ From 30ce651dd8ebf824f7fd74bdd9efd00528e96b49 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 15:37:12 +0000 Subject: [PATCH 08/28] Update generated code for v1800 and 2025-05-28.preview --- OPENAPI_VERSION | 2 +- stripe/_api_version.py | 4 ++-- stripe/_invoice.py | 14 ++++++++++++-- stripe/_invoice_service.py | 14 ++++++++++++-- stripe/_quote.py | 7 ++++++- stripe/_quote_service.py | 7 ++++++- stripe/_subscription.py | 10 ++++++++-- stripe/_subscription_schedule.py | 7 ++++++- stripe/_subscription_schedule_service.py | 7 ++++++- stripe/_subscription_service.py | 12 ++++++++++-- stripe/checkout/_session.py | 7 ++++++- stripe/checkout/_session_service.py | 7 ++++++- 12 files changed, 81 insertions(+), 17 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3cac03d77..ad4294e18 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1799 \ No newline at end of file +v1800 \ No newline at end of file diff --git a/stripe/_api_version.py b/stripe/_api_version.py index 04746054b..bb3b192c9 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2025-05-28.preview" + CURRENT = "2025-06-30.preview" CURRENT_MAJOR = "preview" - CURRENT_MONTHLY = "2025-05-28" + CURRENT_MONTHLY = "2025-06-30" diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 8e4f730c6..d81916bdf 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -2828,7 +2828,9 @@ class CreatePreviewParamsScheduleDetails(TypedDict): """ Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. """ - billing_mode: NotRequired[Literal["classic", "flexible"]] + billing_mode: NotRequired[ + "Invoice.CreatePreviewParamsScheduleDetailsBillingMode" + ] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -3390,6 +3392,9 @@ class CreatePreviewParamsScheduleDetailsAmendmentTrialSettingsEndBehavior( Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. """ + class CreatePreviewParamsScheduleDetailsBillingMode(TypedDict): + type: Literal["classic", "flexible"] + class CreatePreviewParamsScheduleDetailsPhase(TypedDict): add_invoice_items: NotRequired[ List[ @@ -3977,7 +3982,9 @@ class CreatePreviewParamsSubscriptionDetails(TypedDict): """ For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. """ - billing_mode: NotRequired[Literal["classic", "flexible"]] + billing_mode: NotRequired[ + "Invoice.CreatePreviewParamsSubscriptionDetailsBillingMode" + ] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -4034,6 +4041,9 @@ class CreatePreviewParamsSubscriptionDetails(TypedDict): If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. """ + class CreatePreviewParamsSubscriptionDetailsBillingMode(TypedDict): + type: Literal["classic", "flexible"] + class CreatePreviewParamsSubscriptionDetailsItem(TypedDict): billing_thresholds: NotRequired[ "Literal['']|Invoice.CreatePreviewParamsSubscriptionDetailsItemBillingThresholds" diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 1d3febf05..37de9da7a 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -1618,7 +1618,9 @@ class CreatePreviewParamsScheduleDetails(TypedDict): """ Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. """ - billing_mode: NotRequired[Literal["classic", "flexible"]] + billing_mode: NotRequired[ + "InvoiceService.CreatePreviewParamsScheduleDetailsBillingMode" + ] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -2178,6 +2180,9 @@ class CreatePreviewParamsScheduleDetailsAmendmentTrialSettingsEndBehavior( Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. """ + class CreatePreviewParamsScheduleDetailsBillingMode(TypedDict): + type: Literal["classic", "flexible"] + class CreatePreviewParamsScheduleDetailsPhase(TypedDict): add_invoice_items: NotRequired[ List[ @@ -2767,7 +2772,9 @@ class CreatePreviewParamsSubscriptionDetails(TypedDict): """ For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. """ - billing_mode: NotRequired[Literal["classic", "flexible"]] + billing_mode: NotRequired[ + "InvoiceService.CreatePreviewParamsSubscriptionDetailsBillingMode" + ] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -2824,6 +2831,9 @@ class CreatePreviewParamsSubscriptionDetails(TypedDict): If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. """ + class CreatePreviewParamsSubscriptionDetailsBillingMode(TypedDict): + type: Literal["classic", "flexible"] + class CreatePreviewParamsSubscriptionDetailsItem(TypedDict): billing_thresholds: NotRequired[ "Literal['']|InvoiceService.CreatePreviewParamsSubscriptionDetailsItemBillingThresholds" diff --git a/stripe/_quote.py b/stripe/_quote.py index 042dee204..937ec806c 100644 --- a/stripe/_quote.py +++ b/stripe/_quote.py @@ -1709,7 +1709,9 @@ class CreateParamsSubscriptionData(TypedDict): """ When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. """ - billing_mode: NotRequired[Literal["classic", "flexible"]] + billing_mode: NotRequired[ + "Quote.CreateParamsSubscriptionDataBillingMode" + ] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -1858,6 +1860,9 @@ class CreateParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt( The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. """ + class CreateParamsSubscriptionDataBillingMode(TypedDict): + type: Literal["classic", "flexible"] + class CreateParamsSubscriptionDataOverride(TypedDict): applies_to: "Quote.CreateParamsSubscriptionDataOverrideAppliesTo" """ diff --git a/stripe/_quote_service.py b/stripe/_quote_service.py index 8b5f56649..1c545e53d 100644 --- a/stripe/_quote_service.py +++ b/stripe/_quote_service.py @@ -877,7 +877,9 @@ class CreateParamsSubscriptionData(TypedDict): """ When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. """ - billing_mode: NotRequired[Literal["classic", "flexible"]] + billing_mode: NotRequired[ + "QuoteService.CreateParamsSubscriptionDataBillingMode" + ] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -1026,6 +1028,9 @@ class CreateParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt( The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. """ + class CreateParamsSubscriptionDataBillingMode(TypedDict): + type: Literal["classic", "flexible"] + class CreateParamsSubscriptionDataOverride(TypedDict): applies_to: ( "QuoteService.CreateParamsSubscriptionDataOverrideAppliesTo" diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 9528e84d8..f52491b2f 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -606,7 +606,7 @@ class CreateParams(RequestOptions): """ Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC. """ - billing_mode: NotRequired[Literal["classic", "flexible"]] + billing_mode: NotRequired["Subscription.CreateParamsBillingMode"] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -900,6 +900,9 @@ class CreateParamsBillingCycleAnchorConfig(TypedDict): The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59. """ + class CreateParamsBillingMode(TypedDict): + type: Literal["classic", "flexible"] + class CreateParamsBillingThresholds(TypedDict): amount_gte: NotRequired[int] """ @@ -1563,7 +1566,7 @@ class ListParamsCurrentPeriodStart(TypedDict): """ class MigrateParams(RequestOptions): - billing_mode: Literal["flexible"] + billing_mode: "Subscription.MigrateParamsBillingMode" """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -1572,6 +1575,9 @@ class MigrateParams(RequestOptions): Specifies which fields in the response should be expanded. """ + class MigrateParamsBillingMode(TypedDict): + type: Literal["flexible"] + class ModifyParams(RequestOptions): add_invoice_items: NotRequired[ List["Subscription.ModifyParamsAddInvoiceItem"] diff --git a/stripe/_subscription_schedule.py b/stripe/_subscription_schedule.py index 5e578833c..c44a193af 100644 --- a/stripe/_subscription_schedule.py +++ b/stripe/_subscription_schedule.py @@ -1202,7 +1202,9 @@ class CreateParams(RequestOptions): """ Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. """ - billing_mode: NotRequired[Literal["classic", "flexible"]] + billing_mode: NotRequired[ + "SubscriptionSchedule.CreateParamsBillingMode" + ] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -1251,6 +1253,9 @@ class CreateParams(RequestOptions): When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. """ + class CreateParamsBillingMode(TypedDict): + type: Literal["classic", "flexible"] + class CreateParamsDefaultSettings(TypedDict): application_fee_percent: NotRequired[float] """ diff --git a/stripe/_subscription_schedule_service.py b/stripe/_subscription_schedule_service.py index 7ac574518..0dccf1120 100644 --- a/stripe/_subscription_schedule_service.py +++ b/stripe/_subscription_schedule_service.py @@ -647,7 +647,9 @@ class CreateParams(TypedDict): """ Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. """ - billing_mode: NotRequired[Literal["classic", "flexible"]] + billing_mode: NotRequired[ + "SubscriptionScheduleService.CreateParamsBillingMode" + ] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -700,6 +702,9 @@ class CreateParams(TypedDict): When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. """ + class CreateParamsBillingMode(TypedDict): + type: Literal["classic", "flexible"] + class CreateParamsDefaultSettings(TypedDict): application_fee_percent: NotRequired[float] """ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index eeaaee5d8..e03bfdcb6 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -75,7 +75,9 @@ class CreateParams(TypedDict): """ Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC. """ - billing_mode: NotRequired[Literal["classic", "flexible"]] + billing_mode: NotRequired[ + "SubscriptionService.CreateParamsBillingMode" + ] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -373,6 +375,9 @@ class CreateParamsBillingCycleAnchorConfig(TypedDict): The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59. """ + class CreateParamsBillingMode(TypedDict): + type: Literal["classic", "flexible"] + class CreateParamsBillingThresholds(TypedDict): amount_gte: NotRequired[int] """ @@ -1044,7 +1049,7 @@ class ListParamsCurrentPeriodStart(TypedDict): """ class MigrateParams(TypedDict): - billing_mode: Literal["flexible"] + billing_mode: "SubscriptionService.MigrateParamsBillingMode" """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -1053,6 +1058,9 @@ class MigrateParams(TypedDict): Specifies which fields in the response should be expanded. """ + class MigrateParamsBillingMode(TypedDict): + type: Literal["flexible"] + class ResumeParams(TypedDict): billing_cycle_anchor: NotRequired[Literal["now", "unchanged"]] """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 19e084c8f..d34e13749 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -4634,7 +4634,9 @@ class CreateParamsSubscriptionData(TypedDict): """ A future timestamp to anchor the subscription's billing cycle for new subscriptions. """ - billing_mode: NotRequired[Literal["classic", "flexible"]] + billing_mode: NotRequired[ + "Session.CreateParamsSubscriptionDataBillingMode" + ] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -4689,6 +4691,9 @@ class CreateParamsSubscriptionData(TypedDict): Settings related to subscription trials. """ + class CreateParamsSubscriptionDataBillingMode(TypedDict): + type: Literal["classic", "flexible"] + class CreateParamsSubscriptionDataInvoiceSettings(TypedDict): issuer: NotRequired[ "Session.CreateParamsSubscriptionDataInvoiceSettingsIssuer" diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index eb476b21c..75bd4885c 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -2563,7 +2563,9 @@ class CreateParamsSubscriptionData(TypedDict): """ A future timestamp to anchor the subscription's billing cycle for new subscriptions. """ - billing_mode: NotRequired[Literal["classic", "flexible"]] + billing_mode: NotRequired[ + "SessionService.CreateParamsSubscriptionDataBillingMode" + ] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -2618,6 +2620,9 @@ class CreateParamsSubscriptionData(TypedDict): Settings related to subscription trials. """ + class CreateParamsSubscriptionDataBillingMode(TypedDict): + type: Literal["classic", "flexible"] + class CreateParamsSubscriptionDataInvoiceSettings(TypedDict): issuer: NotRequired[ "SessionService.CreateParamsSubscriptionDataInvoiceSettingsIssuer" From 060893bec6b5cda85121bc8b5d540be09fc9aa18 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 17:54:34 +0000 Subject: [PATCH 09/28] Update generated code for v1800 and 2025-05-28.preview --- stripe/_api_version.py | 1 - 1 file changed, 1 deletion(-) diff --git a/stripe/_api_version.py b/stripe/_api_version.py index bb3b192c9..65066e624 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -3,4 +3,3 @@ class _ApiVersion: CURRENT = "2025-06-30.preview" CURRENT_MAJOR = "preview" - CURRENT_MONTHLY = "2025-06-30" From c77d676f6bd17ea81ef29a2b59fb93e7ae90a750 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 22:10:34 +0000 Subject: [PATCH 10/28] Update generated code for v1801 and 2025-05-28.preview --- OPENAPI_VERSION | 2 +- stripe/_account_session.py | 186 ++++++++++++++--------------- stripe/_account_session_service.py | 124 +++++++++---------- 3 files changed, 156 insertions(+), 156 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ad4294e18..31e612ae1 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1800 \ No newline at end of file +v1801 \ No newline at end of file diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 3d547fe58..706e9f3db 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -25,11 +25,11 @@ class AccountManagement(StripeObject): class Features(StripeObject): disable_stripe_user_authentication: bool """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ enabled: bool @@ -43,11 +43,11 @@ class AccountOnboarding(StripeObject): class Features(StripeObject): disable_stripe_user_authentication: bool """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ enabled: bool @@ -61,23 +61,23 @@ class Balances(StripeObject): class Features(StripeObject): disable_stripe_user_authentication: bool """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ edit_payout_schedule: bool """ - Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ instant_payouts: bool """ - Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ standard_payouts: bool """ - Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ enabled: bool @@ -128,15 +128,15 @@ class Features(StripeObject): """ destination_on_behalf_of_charge_management: bool """ - Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. """ dispute_management: bool """ - Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. """ refund_management: bool """ - Whether to allow sending refunds. This is `true` by default. + Whether sending refunds is enabled. This is `true` by default. """ enabled: bool @@ -161,11 +161,11 @@ class FinancialAccount(StripeObject): class Features(StripeObject): disable_stripe_user_authentication: bool """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ external_account_collection: bool """ - Whether to allow external accounts to be linked for money transfer. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ send_money: bool """ @@ -239,7 +239,7 @@ class Features(StripeObject): """ disable_stripe_user_authentication: bool """ - Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ spend_control_management: bool """ @@ -257,11 +257,11 @@ class NotificationBanner(StripeObject): class Features(StripeObject): disable_stripe_user_authentication: bool """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ enabled: bool @@ -279,15 +279,15 @@ class Features(StripeObject): """ destination_on_behalf_of_charge_management: bool """ - Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. """ dispute_management: bool """ - Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. """ refund_management: bool """ - Whether to allow sending refunds. This is `true` by default. + Whether sending refunds is enabled. This is `true` by default. """ enabled: bool @@ -301,15 +301,15 @@ class PaymentDisputes(StripeObject): class Features(StripeObject): destination_on_behalf_of_charge_management: bool """ - Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. """ dispute_management: bool """ - Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. """ refund_management: bool """ - Whether to allow sending refunds. This is `true` by default. + Whether sending refunds is enabled. This is `true` by default. """ enabled: bool @@ -327,15 +327,15 @@ class Features(StripeObject): """ destination_on_behalf_of_charge_management: bool """ - Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. """ dispute_management: bool """ - Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. """ refund_management: bool """ - Whether to allow sending refunds. This is `true` by default. + Whether sending refunds is enabled. This is `true` by default. """ enabled: bool @@ -349,23 +349,23 @@ class Payouts(StripeObject): class Features(StripeObject): disable_stripe_user_authentication: bool """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ edit_payout_schedule: bool """ - Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ external_account_collection: bool """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ instant_payouts: bool """ - Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ standard_payouts: bool """ - Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ enabled: bool @@ -470,169 +470,169 @@ class CreateParamsComponents(TypedDict): "AccountSession.CreateParamsComponentsAccountManagement" ] """ - Configuration for the account management embedded component. + Configuration for the [account management](https://docs.stripe.com/connect/supported-embedded-components/account-management/) embedded component. """ account_onboarding: NotRequired[ "AccountSession.CreateParamsComponentsAccountOnboarding" ] """ - Configuration for the account onboarding embedded component. + Configuration for the [account onboarding](https://docs.stripe.com/connect/supported-embedded-components/account-onboarding/) embedded component. """ app_install: NotRequired[ "AccountSession.CreateParamsComponentsAppInstall" ] """ - Configuration for the app install component. + Configuration for the [app install](https://docs.stripe.com/connect/supported-embedded-components/app-install/) embedded component. """ app_viewport: NotRequired[ "AccountSession.CreateParamsComponentsAppViewport" ] """ - Configuration for the app viewport component. + Configuration for the [app viewport](https://docs.stripe.com/connect/supported-embedded-components/app-viewport/) embedded component. """ balances: NotRequired["AccountSession.CreateParamsComponentsBalances"] """ - Configuration for the balances embedded component. + Configuration for the [balances](https://docs.stripe.com/connect/supported-embedded-components/balances/) embedded component. """ capital_financing: NotRequired[ "AccountSession.CreateParamsComponentsCapitalFinancing" ] """ - Configuration for the capital financing embedded component. + Configuration for the [Capital financing](https://docs.stripe.com/connect/supported-embedded-components/capital-financing/) embedded component. """ capital_financing_application: NotRequired[ "AccountSession.CreateParamsComponentsCapitalFinancingApplication" ] """ - Configuration for the capital financing application embedded component. + Configuration for the [Capital financing application](https://docs.stripe.com/connect/supported-embedded-components/capital-financing-application/) embedded component. """ capital_financing_promotion: NotRequired[ "AccountSession.CreateParamsComponentsCapitalFinancingPromotion" ] """ - Configuration for the capital financing promotion embedded component. + Configuration for the [Capital financing promotion](https://docs.stripe.com/connect/supported-embedded-components/capital-financing-promotion/) embedded component. """ capital_overview: NotRequired[ "AccountSession.CreateParamsComponentsCapitalOverview" ] """ - Configuration for the capital overview embedded component. + Configuration for the [Capital overview](https://docs.stripe.com/connect/supported-embedded-components/capital-overview/) embedded component. """ disputes_list: NotRequired[ "AccountSession.CreateParamsComponentsDisputesList" ] """ - Configuration for the disputes list embedded component. + Configuration for the [disputes list](https://docs.stripe.com/connect/supported-embedded-components/disputes-list/) embedded component. """ documents: NotRequired[ "AccountSession.CreateParamsComponentsDocuments" ] """ - Configuration for the documents embedded component. + Configuration for the [documents](https://docs.stripe.com/connect/supported-embedded-components/documents/) embedded component. """ export_tax_transactions: NotRequired[ "AccountSession.CreateParamsComponentsExportTaxTransactions" ] """ - Configuration for the export tax transactions embedded component. + Configuration for the [export tax transactions](https://docs.stripe.com/connect/supported-embedded-components/export-tax-transactions/) embedded component. """ financial_account: NotRequired[ "AccountSession.CreateParamsComponentsFinancialAccount" ] """ - Configuration for the financial account embedded component. + Configuration for the [financial account](https://docs.stripe.com/connect/supported-embedded-components/financial-account/) embedded component. """ financial_account_transactions: NotRequired[ "AccountSession.CreateParamsComponentsFinancialAccountTransactions" ] """ - Configuration for the financial account transactions embedded component. + Configuration for the [financial account transactions](https://docs.stripe.com/connect/supported-embedded-components/financial-account-transactions/) embedded component. """ issuing_card: NotRequired[ "AccountSession.CreateParamsComponentsIssuingCard" ] """ - Configuration for the issuing card embedded component. + Configuration for the [issuing card](https://docs.stripe.com/connect/supported-embedded-components/issuing-card/) embedded component. """ issuing_cards_list: NotRequired[ "AccountSession.CreateParamsComponentsIssuingCardsList" ] """ - Configuration for the issuing cards list embedded component. + Configuration for the [issuing cards list](https://docs.stripe.com/connect/supported-embedded-components/issuing-cards-list/) embedded component. """ notification_banner: NotRequired[ "AccountSession.CreateParamsComponentsNotificationBanner" ] """ - Configuration for the notification banner embedded component. + Configuration for the [notification banner](https://docs.stripe.com/connect/supported-embedded-components/notification-banner/) embedded component. """ payment_details: NotRequired[ "AccountSession.CreateParamsComponentsPaymentDetails" ] """ - Configuration for the payment details embedded component. + Configuration for the [payment details](https://docs.stripe.com/connect/supported-embedded-components/payment-details/) embedded component. """ payment_disputes: NotRequired[ "AccountSession.CreateParamsComponentsPaymentDisputes" ] """ - Configuration for the payment disputes embedded component. + Configuration for the [payment disputes](https://docs.stripe.com/connect/supported-embedded-components/payment-disputes/) embedded component. """ payment_method_settings: NotRequired[ "AccountSession.CreateParamsComponentsPaymentMethodSettings" ] """ - Configuration for the payment method settings embedded component. + Configuration for the [payment method settings](https://docs.stripe.com/connect/supported-embedded-components/payment-method-settings/) embedded component. """ payments: NotRequired["AccountSession.CreateParamsComponentsPayments"] """ - Configuration for the payments embedded component. + Configuration for the [payments](https://docs.stripe.com/connect/supported-embedded-components/payments/) embedded component. """ payouts: NotRequired["AccountSession.CreateParamsComponentsPayouts"] """ - Configuration for the payouts embedded component. + Configuration for the [payouts](https://docs.stripe.com/connect/supported-embedded-components/payouts/) embedded component. """ payouts_list: NotRequired[ "AccountSession.CreateParamsComponentsPayoutsList" ] """ - Configuration for the payouts list embedded component. + Configuration for the [payouts list](https://docs.stripe.com/connect/supported-embedded-components/payouts-list/) embedded component. """ product_tax_code_selector: NotRequired[ "AccountSession.CreateParamsComponentsProductTaxCodeSelector" ] """ - Configuration for the product tax code selector embedded component. + Configuration for the [product tax code selector](https://docs.stripe.com/connect/supported-embedded-components/product-tax-code-selector/) embedded component. """ recipients: NotRequired[ "AccountSession.CreateParamsComponentsRecipients" ] """ - Configuration for the recipients component. + Configuration for the [recipients](https://docs.stripe.com/connect/supported-embedded-components/recipients/) embedded component. """ reporting_chart: NotRequired[ "AccountSession.CreateParamsComponentsReportingChart" ] """ - Configuration for the reporting chart embedded component. + Configuration for the [reporting chart](https://docs.stripe.com/connect/supported-embedded-components/reporting-chart/) embedded component. """ tax_registrations: NotRequired[ "AccountSession.CreateParamsComponentsTaxRegistrations" ] """ - Configuration for the tax registrations embedded component. + Configuration for the [tax registrations](https://docs.stripe.com/connect/supported-embedded-components/tax-registrations/) embedded component. """ tax_settings: NotRequired[ "AccountSession.CreateParamsComponentsTaxSettings" ] """ - Configuration for the tax settings embedded component. + Configuration for the [tax settings](https://docs.stripe.com/connect/supported-embedded-components/tax-settings/) embedded component. """ tax_threshold_monitoring: NotRequired[ "AccountSession.CreateParamsComponentsTaxThresholdMonitoring" ] """ - Configuration for the tax threshold monitoring embedded component. + Configuration for the [tax threshold monitoring](https://docs.stripe.com/connect/supported-embedded-components/tax-threshold-monitoring/) embedded component. """ class CreateParamsComponentsAccountManagement(TypedDict): @@ -650,11 +650,11 @@ class CreateParamsComponentsAccountManagement(TypedDict): class CreateParamsComponentsAccountManagementFeatures(TypedDict): disable_stripe_user_authentication: NotRequired[bool] """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ class CreateParamsComponentsAccountOnboarding(TypedDict): @@ -672,11 +672,11 @@ class CreateParamsComponentsAccountOnboarding(TypedDict): class CreateParamsComponentsAccountOnboardingFeatures(TypedDict): disable_stripe_user_authentication: NotRequired[bool] """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ class CreateParamsComponentsAppInstall(TypedDict): @@ -694,7 +694,7 @@ class CreateParamsComponentsAppInstall(TypedDict): class CreateParamsComponentsAppInstallFeatures(TypedDict): allowed_apps: NotRequired["Literal['']|List[str]"] """ - List of apps allowed to be enabled for this account session. + The list of apps allowed to be enabled in the embedded component. """ class CreateParamsComponentsAppViewport(TypedDict): @@ -712,7 +712,7 @@ class CreateParamsComponentsAppViewport(TypedDict): class CreateParamsComponentsAppViewportFeatures(TypedDict): allowed_apps: NotRequired["Literal['']|List[str]"] """ - List of apps allowed to be enabled for this account session. + The list of apps allowed to be enabled in the embedded component. """ class CreateParamsComponentsBalances(TypedDict): @@ -730,23 +730,23 @@ class CreateParamsComponentsBalances(TypedDict): class CreateParamsComponentsBalancesFeatures(TypedDict): disable_stripe_user_authentication: NotRequired[bool] """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ edit_payout_schedule: NotRequired[bool] """ - Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ instant_payouts: NotRequired[bool] """ - Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ standard_payouts: NotRequired[bool] """ - Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ class CreateParamsComponentsCapitalFinancing(TypedDict): @@ -828,15 +828,15 @@ class CreateParamsComponentsDisputesListFeatures(TypedDict): """ destination_on_behalf_of_charge_management: NotRequired[bool] """ - Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. """ dispute_management: NotRequired[bool] """ - Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. """ refund_management: NotRequired[bool] """ - Whether to allow sending refunds. This is `true` by default. + Whether sending refunds is enabled. This is `true` by default. """ class CreateParamsComponentsDocuments(TypedDict): @@ -884,11 +884,11 @@ class CreateParamsComponentsFinancialAccount(TypedDict): class CreateParamsComponentsFinancialAccountFeatures(TypedDict): disable_stripe_user_authentication: NotRequired[bool] """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ external_account_collection: NotRequired[bool] """ - Whether to allow external accounts to be linked for money transfer. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ send_money: NotRequired[bool] """ @@ -976,7 +976,7 @@ class CreateParamsComponentsIssuingCardsListFeatures(TypedDict): """ disable_stripe_user_authentication: NotRequired[bool] """ - Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ spend_control_management: NotRequired[bool] """ @@ -998,11 +998,11 @@ class CreateParamsComponentsNotificationBanner(TypedDict): class CreateParamsComponentsNotificationBannerFeatures(TypedDict): disable_stripe_user_authentication: NotRequired[bool] """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ class CreateParamsComponentsPaymentDetails(TypedDict): @@ -1024,15 +1024,15 @@ class CreateParamsComponentsPaymentDetailsFeatures(TypedDict): """ destination_on_behalf_of_charge_management: NotRequired[bool] """ - Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. """ dispute_management: NotRequired[bool] """ - Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. """ refund_management: NotRequired[bool] """ - Whether to allow sending refunds. This is `true` by default. + Whether sending refunds is enabled. This is `true` by default. """ class CreateParamsComponentsPaymentDisputes(TypedDict): @@ -1050,15 +1050,15 @@ class CreateParamsComponentsPaymentDisputes(TypedDict): class CreateParamsComponentsPaymentDisputesFeatures(TypedDict): destination_on_behalf_of_charge_management: NotRequired[bool] """ - Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. """ dispute_management: NotRequired[bool] """ - Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. """ refund_management: NotRequired[bool] """ - Whether to allow sending refunds. This is `true` by default. + Whether sending refunds is enabled. This is `true` by default. """ class CreateParamsComponentsPaymentMethodSettings(TypedDict): @@ -1095,15 +1095,15 @@ class CreateParamsComponentsPaymentsFeatures(TypedDict): """ destination_on_behalf_of_charge_management: NotRequired[bool] """ - Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. """ dispute_management: NotRequired[bool] """ - Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. """ refund_management: NotRequired[bool] """ - Whether to allow sending refunds. This is `true` by default. + Whether sending refunds is enabled. This is `true` by default. """ class CreateParamsComponentsPayouts(TypedDict): @@ -1121,23 +1121,23 @@ class CreateParamsComponentsPayouts(TypedDict): class CreateParamsComponentsPayoutsFeatures(TypedDict): disable_stripe_user_authentication: NotRequired[bool] """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ edit_payout_schedule: NotRequired[bool] """ - Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ instant_payouts: NotRequired[bool] """ - Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ standard_payouts: NotRequired[bool] """ - Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ class CreateParamsComponentsPayoutsList(TypedDict): diff --git a/stripe/_account_session_service.py b/stripe/_account_session_service.py index 7980cf9e1..12630be35 100644 --- a/stripe/_account_session_service.py +++ b/stripe/_account_session_service.py @@ -27,175 +27,175 @@ class CreateParamsComponents(TypedDict): "AccountSessionService.CreateParamsComponentsAccountManagement" ] """ - Configuration for the account management embedded component. + Configuration for the [account management](https://docs.stripe.com/connect/supported-embedded-components/account-management/) embedded component. """ account_onboarding: NotRequired[ "AccountSessionService.CreateParamsComponentsAccountOnboarding" ] """ - Configuration for the account onboarding embedded component. + Configuration for the [account onboarding](https://docs.stripe.com/connect/supported-embedded-components/account-onboarding/) embedded component. """ app_install: NotRequired[ "AccountSessionService.CreateParamsComponentsAppInstall" ] """ - Configuration for the app install component. + Configuration for the [app install](https://docs.stripe.com/connect/supported-embedded-components/app-install/) embedded component. """ app_viewport: NotRequired[ "AccountSessionService.CreateParamsComponentsAppViewport" ] """ - Configuration for the app viewport component. + Configuration for the [app viewport](https://docs.stripe.com/connect/supported-embedded-components/app-viewport/) embedded component. """ balances: NotRequired[ "AccountSessionService.CreateParamsComponentsBalances" ] """ - Configuration for the balances embedded component. + Configuration for the [balances](https://docs.stripe.com/connect/supported-embedded-components/balances/) embedded component. """ capital_financing: NotRequired[ "AccountSessionService.CreateParamsComponentsCapitalFinancing" ] """ - Configuration for the capital financing embedded component. + Configuration for the [Capital financing](https://docs.stripe.com/connect/supported-embedded-components/capital-financing/) embedded component. """ capital_financing_application: NotRequired[ "AccountSessionService.CreateParamsComponentsCapitalFinancingApplication" ] """ - Configuration for the capital financing application embedded component. + Configuration for the [Capital financing application](https://docs.stripe.com/connect/supported-embedded-components/capital-financing-application/) embedded component. """ capital_financing_promotion: NotRequired[ "AccountSessionService.CreateParamsComponentsCapitalFinancingPromotion" ] """ - Configuration for the capital financing promotion embedded component. + Configuration for the [Capital financing promotion](https://docs.stripe.com/connect/supported-embedded-components/capital-financing-promotion/) embedded component. """ capital_overview: NotRequired[ "AccountSessionService.CreateParamsComponentsCapitalOverview" ] """ - Configuration for the capital overview embedded component. + Configuration for the [Capital overview](https://docs.stripe.com/connect/supported-embedded-components/capital-overview/) embedded component. """ disputes_list: NotRequired[ "AccountSessionService.CreateParamsComponentsDisputesList" ] """ - Configuration for the disputes list embedded component. + Configuration for the [disputes list](https://docs.stripe.com/connect/supported-embedded-components/disputes-list/) embedded component. """ documents: NotRequired[ "AccountSessionService.CreateParamsComponentsDocuments" ] """ - Configuration for the documents embedded component. + Configuration for the [documents](https://docs.stripe.com/connect/supported-embedded-components/documents/) embedded component. """ export_tax_transactions: NotRequired[ "AccountSessionService.CreateParamsComponentsExportTaxTransactions" ] """ - Configuration for the export tax transactions embedded component. + Configuration for the [export tax transactions](https://docs.stripe.com/connect/supported-embedded-components/export-tax-transactions/) embedded component. """ financial_account: NotRequired[ "AccountSessionService.CreateParamsComponentsFinancialAccount" ] """ - Configuration for the financial account embedded component. + Configuration for the [financial account](https://docs.stripe.com/connect/supported-embedded-components/financial-account/) embedded component. """ financial_account_transactions: NotRequired[ "AccountSessionService.CreateParamsComponentsFinancialAccountTransactions" ] """ - Configuration for the financial account transactions embedded component. + Configuration for the [financial account transactions](https://docs.stripe.com/connect/supported-embedded-components/financial-account-transactions/) embedded component. """ issuing_card: NotRequired[ "AccountSessionService.CreateParamsComponentsIssuingCard" ] """ - Configuration for the issuing card embedded component. + Configuration for the [issuing card](https://docs.stripe.com/connect/supported-embedded-components/issuing-card/) embedded component. """ issuing_cards_list: NotRequired[ "AccountSessionService.CreateParamsComponentsIssuingCardsList" ] """ - Configuration for the issuing cards list embedded component. + Configuration for the [issuing cards list](https://docs.stripe.com/connect/supported-embedded-components/issuing-cards-list/) embedded component. """ notification_banner: NotRequired[ "AccountSessionService.CreateParamsComponentsNotificationBanner" ] """ - Configuration for the notification banner embedded component. + Configuration for the [notification banner](https://docs.stripe.com/connect/supported-embedded-components/notification-banner/) embedded component. """ payment_details: NotRequired[ "AccountSessionService.CreateParamsComponentsPaymentDetails" ] """ - Configuration for the payment details embedded component. + Configuration for the [payment details](https://docs.stripe.com/connect/supported-embedded-components/payment-details/) embedded component. """ payment_disputes: NotRequired[ "AccountSessionService.CreateParamsComponentsPaymentDisputes" ] """ - Configuration for the payment disputes embedded component. + Configuration for the [payment disputes](https://docs.stripe.com/connect/supported-embedded-components/payment-disputes/) embedded component. """ payment_method_settings: NotRequired[ "AccountSessionService.CreateParamsComponentsPaymentMethodSettings" ] """ - Configuration for the payment method settings embedded component. + Configuration for the [payment method settings](https://docs.stripe.com/connect/supported-embedded-components/payment-method-settings/) embedded component. """ payments: NotRequired[ "AccountSessionService.CreateParamsComponentsPayments" ] """ - Configuration for the payments embedded component. + Configuration for the [payments](https://docs.stripe.com/connect/supported-embedded-components/payments/) embedded component. """ payouts: NotRequired[ "AccountSessionService.CreateParamsComponentsPayouts" ] """ - Configuration for the payouts embedded component. + Configuration for the [payouts](https://docs.stripe.com/connect/supported-embedded-components/payouts/) embedded component. """ payouts_list: NotRequired[ "AccountSessionService.CreateParamsComponentsPayoutsList" ] """ - Configuration for the payouts list embedded component. + Configuration for the [payouts list](https://docs.stripe.com/connect/supported-embedded-components/payouts-list/) embedded component. """ product_tax_code_selector: NotRequired[ "AccountSessionService.CreateParamsComponentsProductTaxCodeSelector" ] """ - Configuration for the product tax code selector embedded component. + Configuration for the [product tax code selector](https://docs.stripe.com/connect/supported-embedded-components/product-tax-code-selector/) embedded component. """ recipients: NotRequired[ "AccountSessionService.CreateParamsComponentsRecipients" ] """ - Configuration for the recipients component. + Configuration for the [recipients](https://docs.stripe.com/connect/supported-embedded-components/recipients/) embedded component. """ reporting_chart: NotRequired[ "AccountSessionService.CreateParamsComponentsReportingChart" ] """ - Configuration for the reporting chart embedded component. + Configuration for the [reporting chart](https://docs.stripe.com/connect/supported-embedded-components/reporting-chart/) embedded component. """ tax_registrations: NotRequired[ "AccountSessionService.CreateParamsComponentsTaxRegistrations" ] """ - Configuration for the tax registrations embedded component. + Configuration for the [tax registrations](https://docs.stripe.com/connect/supported-embedded-components/tax-registrations/) embedded component. """ tax_settings: NotRequired[ "AccountSessionService.CreateParamsComponentsTaxSettings" ] """ - Configuration for the tax settings embedded component. + Configuration for the [tax settings](https://docs.stripe.com/connect/supported-embedded-components/tax-settings/) embedded component. """ tax_threshold_monitoring: NotRequired[ "AccountSessionService.CreateParamsComponentsTaxThresholdMonitoring" ] """ - Configuration for the tax threshold monitoring embedded component. + Configuration for the [tax threshold monitoring](https://docs.stripe.com/connect/supported-embedded-components/tax-threshold-monitoring/) embedded component. """ class CreateParamsComponentsAccountManagement(TypedDict): @@ -213,11 +213,11 @@ class CreateParamsComponentsAccountManagement(TypedDict): class CreateParamsComponentsAccountManagementFeatures(TypedDict): disable_stripe_user_authentication: NotRequired[bool] """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ class CreateParamsComponentsAccountOnboarding(TypedDict): @@ -235,11 +235,11 @@ class CreateParamsComponentsAccountOnboarding(TypedDict): class CreateParamsComponentsAccountOnboardingFeatures(TypedDict): disable_stripe_user_authentication: NotRequired[bool] """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ class CreateParamsComponentsAppInstall(TypedDict): @@ -257,7 +257,7 @@ class CreateParamsComponentsAppInstall(TypedDict): class CreateParamsComponentsAppInstallFeatures(TypedDict): allowed_apps: NotRequired["Literal['']|List[str]"] """ - List of apps allowed to be enabled for this account session. + The list of apps allowed to be enabled in the embedded component. """ class CreateParamsComponentsAppViewport(TypedDict): @@ -275,7 +275,7 @@ class CreateParamsComponentsAppViewport(TypedDict): class CreateParamsComponentsAppViewportFeatures(TypedDict): allowed_apps: NotRequired["Literal['']|List[str]"] """ - List of apps allowed to be enabled for this account session. + The list of apps allowed to be enabled in the embedded component. """ class CreateParamsComponentsBalances(TypedDict): @@ -293,23 +293,23 @@ class CreateParamsComponentsBalances(TypedDict): class CreateParamsComponentsBalancesFeatures(TypedDict): disable_stripe_user_authentication: NotRequired[bool] """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ edit_payout_schedule: NotRequired[bool] """ - Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ instant_payouts: NotRequired[bool] """ - Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ standard_payouts: NotRequired[bool] """ - Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ class CreateParamsComponentsCapitalFinancing(TypedDict): @@ -391,15 +391,15 @@ class CreateParamsComponentsDisputesListFeatures(TypedDict): """ destination_on_behalf_of_charge_management: NotRequired[bool] """ - Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. """ dispute_management: NotRequired[bool] """ - Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. """ refund_management: NotRequired[bool] """ - Whether to allow sending refunds. This is `true` by default. + Whether sending refunds is enabled. This is `true` by default. """ class CreateParamsComponentsDocuments(TypedDict): @@ -447,11 +447,11 @@ class CreateParamsComponentsFinancialAccount(TypedDict): class CreateParamsComponentsFinancialAccountFeatures(TypedDict): disable_stripe_user_authentication: NotRequired[bool] """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ external_account_collection: NotRequired[bool] """ - Whether to allow external accounts to be linked for money transfer. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ send_money: NotRequired[bool] """ @@ -539,7 +539,7 @@ class CreateParamsComponentsIssuingCardsListFeatures(TypedDict): """ disable_stripe_user_authentication: NotRequired[bool] """ - Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ spend_control_management: NotRequired[bool] """ @@ -561,11 +561,11 @@ class CreateParamsComponentsNotificationBanner(TypedDict): class CreateParamsComponentsNotificationBannerFeatures(TypedDict): disable_stripe_user_authentication: NotRequired[bool] """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ class CreateParamsComponentsPaymentDetails(TypedDict): @@ -587,15 +587,15 @@ class CreateParamsComponentsPaymentDetailsFeatures(TypedDict): """ destination_on_behalf_of_charge_management: NotRequired[bool] """ - Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. """ dispute_management: NotRequired[bool] """ - Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. """ refund_management: NotRequired[bool] """ - Whether to allow sending refunds. This is `true` by default. + Whether sending refunds is enabled. This is `true` by default. """ class CreateParamsComponentsPaymentDisputes(TypedDict): @@ -613,15 +613,15 @@ class CreateParamsComponentsPaymentDisputes(TypedDict): class CreateParamsComponentsPaymentDisputesFeatures(TypedDict): destination_on_behalf_of_charge_management: NotRequired[bool] """ - Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. """ dispute_management: NotRequired[bool] """ - Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. """ refund_management: NotRequired[bool] """ - Whether to allow sending refunds. This is `true` by default. + Whether sending refunds is enabled. This is `true` by default. """ class CreateParamsComponentsPaymentMethodSettings(TypedDict): @@ -658,15 +658,15 @@ class CreateParamsComponentsPaymentsFeatures(TypedDict): """ destination_on_behalf_of_charge_management: NotRequired[bool] """ - Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. """ dispute_management: NotRequired[bool] """ - Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. """ refund_management: NotRequired[bool] """ - Whether to allow sending refunds. This is `true` by default. + Whether sending refunds is enabled. This is `true` by default. """ class CreateParamsComponentsPayouts(TypedDict): @@ -684,23 +684,23 @@ class CreateParamsComponentsPayouts(TypedDict): class CreateParamsComponentsPayoutsFeatures(TypedDict): disable_stripe_user_authentication: NotRequired[bool] """ - Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. """ edit_payout_schedule: NotRequired[bool] """ - Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ external_account_collection: NotRequired[bool] """ - Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. """ instant_payouts: NotRequired[bool] """ - Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ standard_payouts: NotRequired[bool] """ - Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. """ class CreateParamsComponentsPayoutsList(TypedDict): From 014c86047db00a125c10e39cd277691781d31d79 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 08:59:37 +0000 Subject: [PATCH 11/28] Update generated code for v1803 and 2025-05-28.preview --- OPENAPI_VERSION | 2 +- stripe/_charge.py | 4 +++- stripe/_confirmation_token.py | 5 ++++- stripe/_payment_attempt_record.py | 4 +++- stripe/_payment_intent.py | 3 +++ stripe/_payment_intent_service.py | 3 +++ stripe/_payment_method.py | 5 ++++- stripe/_payment_method_service.py | 1 + stripe/_payment_record.py | 4 +++- stripe/_setup_attempt.py | 4 +++- stripe/_setup_intent.py | 3 +++ stripe/_setup_intent_service.py | 3 +++ stripe/test_helpers/_confirmation_token_service.py | 1 + 13 files changed, 35 insertions(+), 7 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 31e612ae1..e8f2c5d05 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1801 \ No newline at end of file +v1803 \ No newline at end of file diff --git a/stripe/_charge.py b/stripe/_charge.py index b217eb440..6612b37e2 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -1228,6 +1228,7 @@ class Ideal(StripeObject): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", @@ -1244,7 +1245,7 @@ class Ideal(StripeObject): ] ] """ - The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. """ bic: Optional[ Literal[ @@ -1252,6 +1253,7 @@ class Ideal(StripeObject): "ASNBNL21", "BITSNL2A", "BUNQNL2A", + "BUUTNL2A", "FVLBNL22", "HANDNL2A", "INGBNL2A", diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index d0cb2e181..1f2c0004a 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -955,6 +955,7 @@ class Ideal(StripeObject): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", @@ -971,7 +972,7 @@ class Ideal(StripeObject): ] ] """ - The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. """ bic: Optional[ Literal[ @@ -979,6 +980,7 @@ class Ideal(StripeObject): "ASNBNL21", "BITSNL2A", "BUNQNL2A", + "BUUTNL2A", "FVLBNL22", "HANDNL2A", "INGBNL2A", @@ -2355,6 +2357,7 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 17bbabef2..3118b95f3 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -835,6 +835,7 @@ class Ideal(StripeObject): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", @@ -851,7 +852,7 @@ class Ideal(StripeObject): ] ] """ - The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. """ bic: Optional[ Literal[ @@ -859,6 +860,7 @@ class Ideal(StripeObject): "ASNBNL21", "BITSNL2A", "BUNQNL2A", + "BUUTNL2A", "FVLBNL22", "HANDNL2A", "INGBNL2A", diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 5f7a930df..555f2698e 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -5525,6 +5525,7 @@ class ConfirmParamsPaymentMethodDataIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", @@ -9451,6 +9452,7 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", @@ -13525,6 +13527,7 @@ class ModifyParamsPaymentMethodDataIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index a02c7a18c..639a6adb1 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -2340,6 +2340,7 @@ class ConfirmParamsPaymentMethodDataIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", @@ -6316,6 +6317,7 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", @@ -10478,6 +10480,7 @@ class UpdateParamsPaymentMethodDataIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 7b1071510..bcfbc8309 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -886,6 +886,7 @@ class Ideal(StripeObject): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", @@ -902,7 +903,7 @@ class Ideal(StripeObject): ] ] """ - The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. """ bic: Optional[ Literal[ @@ -910,6 +911,7 @@ class Ideal(StripeObject): "ASNBNL21", "BITSNL2A", "BUNQNL2A", + "BUUTNL2A", "FVLBNL22", "HANDNL2A", "INGBNL2A", @@ -2001,6 +2003,7 @@ class CreateParamsIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", diff --git a/stripe/_payment_method_service.py b/stripe/_payment_method_service.py index 8c42e896d..9ac29e063 100644 --- a/stripe/_payment_method_service.py +++ b/stripe/_payment_method_service.py @@ -607,6 +607,7 @@ class CreateParamsIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 3b517705e..c96fdd221 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -839,6 +839,7 @@ class Ideal(StripeObject): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", @@ -855,7 +856,7 @@ class Ideal(StripeObject): ] ] """ - The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. """ bic: Optional[ Literal[ @@ -863,6 +864,7 @@ class Ideal(StripeObject): "ASNBNL21", "BITSNL2A", "BUNQNL2A", + "BUUTNL2A", "FVLBNL22", "HANDNL2A", "INGBNL2A", diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index d97411cf8..5dde6345f 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -287,6 +287,7 @@ class Ideal(StripeObject): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", @@ -303,7 +304,7 @@ class Ideal(StripeObject): ] ] """ - The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. """ bic: Optional[ Literal[ @@ -311,6 +312,7 @@ class Ideal(StripeObject): "ASNBNL21", "BITSNL2A", "BUNQNL2A", + "BUUTNL2A", "FVLBNL22", "HANDNL2A", "INGBNL2A", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 577744b3c..f3072f874 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -1430,6 +1430,7 @@ class ConfirmParamsPaymentMethodDataIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", @@ -2909,6 +2910,7 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", @@ -4355,6 +4357,7 @@ class ModifyParamsPaymentMethodDataIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index d19c63b23..c81ebb925 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -731,6 +731,7 @@ class ConfirmParamsPaymentMethodDataIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", @@ -2258,6 +2259,7 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", @@ -3764,6 +3766,7 @@ class UpdateParamsPaymentMethodDataIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", diff --git a/stripe/test_helpers/_confirmation_token_service.py b/stripe/test_helpers/_confirmation_token_service.py index 3fe284718..33e4ce6eb 100644 --- a/stripe/test_helpers/_confirmation_token_service.py +++ b/stripe/test_helpers/_confirmation_token_service.py @@ -668,6 +668,7 @@ class CreateParamsPaymentMethodDataIdeal(TypedDict): "abn_amro", "asn_bank", "bunq", + "buut", "handelsbanken", "ing", "knab", From 0042f045edfccaddeca02e69f4725ebb1929db3a Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 16:29:40 +0000 Subject: [PATCH 12/28] Update generated code for v1805 and 2025-05-28.preview --- OPENAPI_VERSION | 2 +- stripe/_quote.py | 11 +++++++++-- stripe/_quote_preview_subscription_schedule.py | 15 +++++++++++++-- stripe/_subscription.py | 18 +++++++++--------- stripe/_subscription_schedule.py | 15 +++++++++++++-- stripe/_subscription_service.py | 2 +- 6 files changed, 46 insertions(+), 17 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e8f2c5d05..867356add 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1803 \ No newline at end of file +v1805 \ No newline at end of file diff --git a/stripe/_quote.py b/stripe/_quote.py index 937ec806c..9e6a97d62 100644 --- a/stripe/_quote.py +++ b/stripe/_quote.py @@ -580,6 +580,12 @@ class LineEndsAt(StripeObject): "bill_until": BillUntil, } + class BillingMode(StripeObject): + type: Literal["classic", "flexible"] + """ + Controls how prorations and invoices for subscriptions are calculated and orchestrated. + """ + class Prebilling(StripeObject): iterations: int @@ -597,9 +603,9 @@ class Prebilling(StripeObject): """ Whether the subscription will always start a new billing period when the quote is accepted. """ - billing_mode: Optional[Literal["classic", "flexible"]] + billing_mode: Optional[BillingMode] """ - The [billing mode](https://docs.stripe.com/api/subscriptions/create#create_subscription-billing_mode) that will be set on the subscription once the quote is accepted. + The billing mode of the quote. """ description: Optional[str] """ @@ -637,6 +643,7 @@ class Prebilling(StripeObject): """ _inner_class_types = { "bill_on_acceptance": BillOnAcceptance, + "billing_mode": BillingMode, "prebilling": Prebilling, } diff --git a/stripe/_quote_preview_subscription_schedule.py b/stripe/_quote_preview_subscription_schedule.py index 76c9f3c91..566fb15f9 100644 --- a/stripe/_quote_preview_subscription_schedule.py +++ b/stripe/_quote_preview_subscription_schedule.py @@ -41,6 +41,16 @@ class AppliesTo(StripeObject): Describes whether the quote line is affecting a new schedule or an existing schedule. """ + class BillingMode(StripeObject): + type: Literal["classic", "flexible"] + """ + Controls how prorations and invoices for subscriptions are calculated and orchestrated. + """ + updated_at: Optional[int] + """ + Details on when the current billing_mode was adopted. + """ + class CurrentPhase(StripeObject): end_date: int """ @@ -572,9 +582,9 @@ class Prebilling(StripeObject): """ Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. """ - billing_mode: Optional[Literal["classic", "flexible"]] + billing_mode: Optional[BillingMode] """ - The [billing mode](https://docs.stripe.com/api/subscriptions/create#create_subscription-billing_mode) that will be used to process all future operations for the subscription schedule. + The billing mode of the subscription. """ canceled_at: Optional[int] """ @@ -657,6 +667,7 @@ class Prebilling(StripeObject): """ _inner_class_types = { "applies_to": AppliesTo, + "billing_mode": BillingMode, "current_phase": CurrentPhase, "default_settings": DefaultSettings, "last_price_migration_error": LastPriceMigrationError, diff --git a/stripe/_subscription.py b/stripe/_subscription.py index f52491b2f..ff4a9d178 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -110,7 +110,11 @@ class BillingCycleAnchorConfig(StripeObject): The second of the minute of the billing_cycle_anchor. """ - class BillingModeDetails(StripeObject): + class BillingMode(StripeObject): + type: Literal["classic", "flexible"] + """ + Controls how prorations and invoices for subscriptions are calculated and orchestrated. + """ updated_at: Optional[int] """ Details on when the current billing_mode was adopted. @@ -594,7 +598,7 @@ class CreateParams(RequestOptions): """ backdate_start_date: NotRequired[int] """ - For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. """ billing_cycle_anchor: NotRequired[int] """ @@ -2462,13 +2466,9 @@ class SearchParams(RequestOptions): """ The fixed values used to calculate the `billing_cycle_anchor`. """ - billing_mode: Optional[Literal["classic", "flexible"]] - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - billing_mode_details: Optional[BillingModeDetails] + billing_mode: Optional[BillingMode] """ - Details about when the current billing_mode was updated. + The billing mode of the subscription. """ billing_thresholds: Optional[BillingThresholds] """ @@ -3370,7 +3370,7 @@ async def search_auto_paging_iter_async( _inner_class_types = { "automatic_tax": AutomaticTax, "billing_cycle_anchor_config": BillingCycleAnchorConfig, - "billing_mode_details": BillingModeDetails, + "billing_mode": BillingMode, "billing_thresholds": BillingThresholds, "cancellation_details": CancellationDetails, "invoice_settings": InvoiceSettings, diff --git a/stripe/_subscription_schedule.py b/stripe/_subscription_schedule.py index c44a193af..651758e18 100644 --- a/stripe/_subscription_schedule.py +++ b/stripe/_subscription_schedule.py @@ -49,6 +49,16 @@ class SubscriptionSchedule( "subscription_schedule" ) + class BillingMode(StripeObject): + type: Literal["classic", "flexible"] + """ + Controls how prorations and invoices for subscriptions are calculated and orchestrated. + """ + updated_at: Optional[int] + """ + Details on when the current billing_mode was adopted. + """ + class CurrentPhase(StripeObject): end_date: int """ @@ -2708,9 +2718,9 @@ class RetrieveParams(RequestOptions): """ Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. """ - billing_mode: Optional[Literal["classic", "flexible"]] + billing_mode: Optional[BillingMode] """ - The [billing mode](https://docs.stripe.com/api/subscriptions/create#create_subscription-billing_mode) that will be used to process all future operations for the subscription schedule. + The billing mode of the subscription. """ canceled_at: Optional[int] """ @@ -3263,6 +3273,7 @@ async def retrieve_async( return instance _inner_class_types = { + "billing_mode": BillingMode, "current_phase": CurrentPhase, "default_settings": DefaultSettings, "last_price_migration_error": LastPriceMigrationError, diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index e03bfdcb6..eb7e55bc9 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -63,7 +63,7 @@ class CreateParams(TypedDict): """ backdate_start_date: NotRequired[int] """ - For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. """ billing_cycle_anchor: NotRequired[int] """ From e88770cc8b3999c2458754943ba905ef75450d6c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 17:11:02 +0000 Subject: [PATCH 13/28] Update generated code for v1806 and 2025-06-30.preview --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- stripe/v2/core/_account.py | 12 ++++++++++ stripe/v2/core/_account_service.py | 22 +++++++++++++++++++ stripe/v2/core/_person.py | 5 +++++ stripe/v2/core/accounts/_person_service.py | 10 +++++++++ .../v2/money_management/_financial_account.py | 17 ++++++++++++-- .../v2/money_management/_outbound_payment.py | 2 +- .../v2/money_management/_outbound_transfer.py | 2 +- .../v2/money_management/_received_credit.py | 18 ++++++++++++--- stripe/v2/payments/_off_session_payment.py | 6 +---- .../payments/_off_session_payment_service.py | 2 +- tests/test_generated_examples.py | 8 +++---- 13 files changed, 89 insertions(+), 19 deletions(-) diff --git a/API_VERSION b/API_VERSION index 414806f2d..c77af7bdd 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -2025-05-28.preview \ No newline at end of file +2025-06-30.preview \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 867356add..7f696950b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1805 \ No newline at end of file +v1806 \ No newline at end of file diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index 874012c7a..1cdfde8de 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -264,6 +264,7 @@ class Location(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -658,6 +659,7 @@ class Address(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -2899,6 +2901,7 @@ class Address(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -3972,6 +3975,7 @@ class Address(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -4500,6 +4504,7 @@ class Kana(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -4783,6 +4788,7 @@ class Kanji(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -5196,6 +5202,7 @@ class AdditionalAddress(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -5522,6 +5529,7 @@ class Address(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -5977,6 +5985,7 @@ class Kana(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -6260,6 +6269,7 @@ class Kanji(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -6636,6 +6646,7 @@ class Kanji(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -6947,6 +6958,7 @@ class Kanji(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", diff --git a/stripe/v2/core/_account_service.py b/stripe/v2/core/_account_service.py index cae8b0150..07ca36cc8 100644 --- a/stripe/v2/core/_account_service.py +++ b/stripe/v2/core/_account_service.py @@ -479,6 +479,7 @@ class CreateParamsConfigurationCustomerShippingAddress(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -1469,6 +1470,7 @@ class CreateParamsConfigurationMerchantSupportAddress(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -2141,6 +2143,7 @@ class CreateParamsIdentity(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -2616,6 +2619,7 @@ class CreateParamsIdentityBusinessDetailsAddress(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -3179,6 +3183,7 @@ class CreateParamsIdentityBusinessDetailsScriptAddressesKana(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -3460,6 +3465,7 @@ class CreateParamsIdentityBusinessDetailsScriptAddressesKanji(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -3819,6 +3825,7 @@ class CreateParamsIdentityIndividual(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -4112,6 +4119,7 @@ class CreateParamsIdentityIndividualAdditionalAddress(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -4415,6 +4423,7 @@ class CreateParamsIdentityIndividualAddress(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -4884,6 +4893,7 @@ class CreateParamsIdentityIndividualScriptAddressesKana(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -5165,6 +5175,7 @@ class CreateParamsIdentityIndividualScriptAddressesKanji(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -5721,6 +5732,7 @@ class UpdateParamsConfigurationCustomerShippingAddress(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -6713,6 +6725,7 @@ class UpdateParamsConfigurationMerchantSupportAddress(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -7391,6 +7404,7 @@ class UpdateParamsIdentity(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -7886,6 +7900,7 @@ class UpdateParamsIdentityBusinessDetailsAddress(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -8473,6 +8488,7 @@ class UpdateParamsIdentityBusinessDetailsScriptAddressesKana(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -8758,6 +8774,7 @@ class UpdateParamsIdentityBusinessDetailsScriptAddressesKanji(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -9133,6 +9150,7 @@ class UpdateParamsIdentityIndividual(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -9434,6 +9452,7 @@ class UpdateParamsIdentityIndividualAdditionalAddress(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -9741,6 +9760,7 @@ class UpdateParamsIdentityIndividualAddress(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -10222,6 +10242,7 @@ class UpdateParamsIdentityIndividualScriptAddressesKana(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -10507,6 +10528,7 @@ class UpdateParamsIdentityIndividualScriptAddressesKanji(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", diff --git a/stripe/v2/core/_person.py b/stripe/v2/core/_person.py index 5369a8e09..b6e1675b0 100644 --- a/stripe/v2/core/_person.py +++ b/stripe/v2/core/_person.py @@ -266,6 +266,7 @@ class AdditionalAddress(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -592,6 +593,7 @@ class Address(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -1047,6 +1049,7 @@ class Kana(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -1330,6 +1333,7 @@ class Kanji(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -1706,6 +1710,7 @@ class Kanji(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", diff --git a/stripe/v2/core/accounts/_person_service.py b/stripe/v2/core/accounts/_person_service.py index 130750090..205c8e472 100644 --- a/stripe/v2/core/accounts/_person_service.py +++ b/stripe/v2/core/accounts/_person_service.py @@ -309,6 +309,7 @@ class CreateParams(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -598,6 +599,7 @@ class CreateParamsAdditionalAddress(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -923,6 +925,7 @@ class CreateParamsAddress(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -1390,6 +1393,7 @@ class CreateParamsScriptAddressesKana(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -1671,6 +1675,7 @@ class CreateParamsScriptAddressesKanji(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -2042,6 +2047,7 @@ class UpdateParams(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -2335,6 +2341,7 @@ class UpdateParamsAdditionalAddress(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -2664,6 +2671,7 @@ class UpdateParamsAddress(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -3141,6 +3149,7 @@ class UpdateParamsScriptAddressesKana(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -3426,6 +3435,7 @@ class UpdateParamsScriptAddressesKanji(TypedDict): "vu", "wf", "ws", + "xx", "ye", "yt", "za", diff --git a/stripe/v2/money_management/_financial_account.py b/stripe/v2/money_management/_financial_account.py index 6068ef690..53250d1e4 100644 --- a/stripe/v2/money_management/_financial_account.py +++ b/stripe/v2/money_management/_financial_account.py @@ -35,6 +35,13 @@ class Other(StripeObject): The type of the FinancialAccount, represented as a string. Upgrade your API version to see the type reflected in `financial_account.type`. """ + class StatusDetails(StripeObject): + class Closed(StripeObject): + reason: Literal["account_closed", "closed_by_platform", "other"] + + closed: Optional[Closed] + _inner_class_types = {"closed": Closed} + class Storage(StripeObject): holds_currencies: List[ Literal[ @@ -474,6 +481,7 @@ class Storage(StripeObject): "vu", "wf", "ws", + "xx", "ye", "yt", "za", @@ -487,11 +495,14 @@ class Storage(StripeObject): """ Time at which the object was created. """ - description: Optional[str] id: str """ Unique identifier for the object. """ + metadata: Optional[Dict[str, str]] + """ + Metadata associated with the FinancialAccount + """ object: Literal["v2.money_management.financial_account"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -500,10 +511,11 @@ class Storage(StripeObject): """ If this is a `other` FinancialAccount, this hash indicates what the actual type is. Upgrade your API version to see it reflected in `type`. """ - status: Literal["closed", "open"] + status: Literal["closed", "open", "pending"] """ Closed Enum. An enum representing the status of the FinancialAccount. This indicates whether or not the FinancialAccount can be used for any money movement flows. """ + status_details: Optional[StatusDetails] storage: Optional[Storage] """ If this is a `storage` FinancialAccount, this hash includes details specific to `storage` FinancialAccounts. @@ -520,5 +532,6 @@ class Storage(StripeObject): _inner_class_types = { "balance": Balance, "other": Other, + "status_details": StatusDetails, "storage": Storage, } diff --git a/stripe/v2/money_management/_outbound_payment.py b/stripe/v2/money_management/_outbound_payment.py index 3a2656e48..af82c4291 100644 --- a/stripe/v2/money_management/_outbound_payment.py +++ b/stripe/v2/money_management/_outbound_payment.py @@ -185,7 +185,7 @@ class TraceId(StripeObject): """ statement_descriptor: str """ - The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). + The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). It will default to `STRIPE` if not set on the account settings. """ status: Literal["canceled", "failed", "posted", "processing", "returned"] """ diff --git a/stripe/v2/money_management/_outbound_transfer.py b/stripe/v2/money_management/_outbound_transfer.py index e9302b8c9..74347dd67 100644 --- a/stripe/v2/money_management/_outbound_transfer.py +++ b/stripe/v2/money_management/_outbound_transfer.py @@ -166,7 +166,7 @@ class TraceId(StripeObject): """ statement_descriptor: str """ - The description that appears on the receiving end for an OutboundTransfer (for example, bank statement for external bank transfer). + The description that appears on the receiving end for an OutboundTransfer (for example, bank statement for external bank transfer). It will default to `STRIPE` if not set on the account settings. """ status: Literal["canceled", "failed", "posted", "processing", "returned"] """ diff --git a/stripe/v2/money_management/_received_credit.py b/stripe/v2/money_management/_received_credit.py index 56eebe515..b167c4183 100644 --- a/stripe/v2/money_management/_received_credit.py +++ b/stripe/v2/money_management/_received_credit.py @@ -61,14 +61,26 @@ class StatusTransitions(StripeObject): """ class BalanceTransfer(StripeObject): - payout_v1: str + from_account: Optional[str] """ - The ID of the Stripe Money Movement that originated the ReceivedCredit. + The ID of the account that owns the source object originated the ReceivedCredit. """ - type: Literal["payout_v1"] + type: Literal["outbound_payment", "outbound_transfer", "payout_v1"] """ Open Enum. The type of Stripe Money Movement that originated the ReceivedCredit. """ + outbound_payment: Optional[str] + """ + The ID of the outbound payment object that originated the ReceivedCredit. + """ + outbound_transfer: Optional[str] + """ + The ID of the outbound transfer object that originated the ReceivedCredit. + """ + payout_v1: Optional[str] + """ + The ID of the payout object that originated the ReceivedCredit. + """ class BankTransfer(StripeObject): class GbBankAccount(StripeObject): diff --git a/stripe/v2/payments/_off_session_payment.py b/stripe/v2/payments/_off_session_payment.py index ff178f798..0f98ef7ab 100644 --- a/stripe/v2/payments/_off_session_payment.py +++ b/stripe/v2/payments/_off_session_payment.py @@ -26,7 +26,7 @@ class RetryDetails(StripeObject): """ class TransferData(StripeObject): - amount: int + amount: Optional[int] """ Amount in minor units that you want to transfer. """ @@ -39,10 +39,6 @@ class TransferData(StripeObject): """ The amount you requested to be collected on the OSP upon creation. """ - attempts: int - """ - Number of authorization attempts. - """ cadence: Literal["recurring", "unscheduled"] """ The frequency of the underlying payment that this OSP represents. diff --git a/stripe/v2/payments/_off_session_payment_service.py b/stripe/v2/payments/_off_session_payment_service.py index 27edea9f7..8e441d0b2 100644 --- a/stripe/v2/payments/_off_session_payment_service.py +++ b/stripe/v2/payments/_off_session_payment_service.py @@ -71,7 +71,7 @@ class CreateParamsRetryDetails(TypedDict): """ class CreateParamsTransferData(TypedDict): - amount: int + amount: NotRequired[int] """ Amount in minor units that you want to transfer. """ diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 1acea3ee0..fe2f3fc27 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -35056,7 +35056,7 @@ def test_insufficient_funds_error_service( http_client_mock.stub_request( "post", "/v2/money_management/outbound_payments", - rbody='{"error":{"type":"insufficient_funds","code":"outbound_payment_insufficient_funds"}}', + rbody='{"error":{"type":"insufficient_funds","code":"insufficient_funds"}}', rcode=400, ) client = StripeClient( @@ -35092,7 +35092,7 @@ def test_quota_exceeded_error_service( http_client_mock.stub_request( "post", "/v2/core/vault/us_bank_accounts", - rbody='{"error":{"type":"quota_exceeded","code":"outbound_payment_recipient_amount_limit_exceeded"}}', + rbody='{"error":{"type":"quota_exceeded","code":"recipient_amount_limit_exceeded"}}', rcode=400, ) client = StripeClient( @@ -35123,7 +35123,7 @@ def test_recipient_not_notifiable_error_service( http_client_mock.stub_request( "post", "/v2/money_management/outbound_payments", - rbody='{"error":{"type":"recipient_not_notifiable","code":"outbound_payment_recipient_email_does_not_exist"}}', + rbody='{"error":{"type":"recipient_not_notifiable","code":"recipient_email_does_not_exist"}}', rcode=400, ) client = StripeClient( @@ -35159,7 +35159,7 @@ def test_feature_not_enabled_error_service( http_client_mock.stub_request( "post", "/v2/money_management/outbound_payments", - rbody='{"error":{"type":"feature_not_enabled","code":"outbound_payment_recipient_feature_not_active"}}', + rbody='{"error":{"type":"feature_not_enabled","code":"recipient_feature_not_active"}}', rcode=400, ) client = StripeClient( From 6e60db1068465ad710dc43aa4697f6b520de3745 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 18:38:16 +0000 Subject: [PATCH 14/28] Update generated code for v1807 and 2025-06-30.preview --- OPENAPI_VERSION | 2 +- stripe/terminal/_reader.py | 20 ++++++++++---------- stripe/terminal/_reader_service.py | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7f696950b..91d48abb4 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1806 \ No newline at end of file +v1807 \ No newline at end of file diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index 36efc2b8b..9edd44ba7 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -223,7 +223,7 @@ class Tipping(StripeObject): enable_customer_cancellation: Optional[bool] """ - Enable customer initiated cancellation when processing this payment. + Enable customer-initiated cancellation when processing this payment. """ skip_tipping: Optional[bool] """ @@ -261,7 +261,7 @@ class ConfirmPaymentIntent(StripeObject): class ConfirmConfig(StripeObject): return_url: Optional[str] """ - If the customer does not abandon authenticating the payment, they will be redirected to this specified URL after completion. + If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion. """ account: Optional[str] @@ -288,11 +288,11 @@ class Tipping(StripeObject): enable_customer_cancellation: Optional[bool] """ - Enable customer initiated cancellation when processing this payment. + Enable customer-initiated cancellation when processing this payment. """ return_url: Optional[str] """ - If the customer does not abandon authenticating the payment, they will be redirected to this specified URL after completion. + If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion. """ skip_tipping: Optional[bool] """ @@ -322,7 +322,7 @@ class ProcessSetupIntent(StripeObject): class ProcessConfig(StripeObject): enable_customer_cancellation: Optional[bool] """ - Enable customer initiated cancellation when processing this SetupIntent. + Enable customer-initiated cancellation when processing this SetupIntent. """ generated_card: Optional[str] @@ -343,7 +343,7 @@ class RefundPayment(StripeObject): class RefundPaymentConfig(StripeObject): enable_customer_cancellation: Optional[bool] """ - Enable customer initiated cancellation when refunding this payment. + Enable customer-initiated cancellation when refunding this payment. """ account: Optional[str] @@ -597,7 +597,7 @@ class CollectPaymentMethodParams(RequestOptions): "Reader.CollectPaymentMethodParamsCollectConfig" ] """ - Configuration overrides + Configuration overrides. """ expand: NotRequired[List[str]] """ @@ -605,7 +605,7 @@ class CollectPaymentMethodParams(RequestOptions): """ payment_intent: str """ - PaymentIntent ID + PaymentIntent ID. """ class CollectPaymentMethodParamsCollectConfig(TypedDict): @@ -641,7 +641,7 @@ class ConfirmPaymentIntentParams(RequestOptions): "Reader.ConfirmPaymentIntentParamsConfirmConfig" ] """ - Configuration overrides + Configuration overrides. """ expand: NotRequired[List[str]] """ @@ -649,7 +649,7 @@ class ConfirmPaymentIntentParams(RequestOptions): """ payment_intent: str """ - PaymentIntent ID + PaymentIntent ID. """ class ConfirmPaymentIntentParamsConfirmConfig(TypedDict): diff --git a/stripe/terminal/_reader_service.py b/stripe/terminal/_reader_service.py index d92c5ea14..d55f5b6e7 100644 --- a/stripe/terminal/_reader_service.py +++ b/stripe/terminal/_reader_service.py @@ -115,7 +115,7 @@ class CollectPaymentMethodParams(TypedDict): "ReaderService.CollectPaymentMethodParamsCollectConfig" ] """ - Configuration overrides + Configuration overrides. """ expand: NotRequired[List[str]] """ @@ -123,7 +123,7 @@ class CollectPaymentMethodParams(TypedDict): """ payment_intent: str """ - PaymentIntent ID + PaymentIntent ID. """ class CollectPaymentMethodParamsCollectConfig(TypedDict): @@ -159,7 +159,7 @@ class ConfirmPaymentIntentParams(TypedDict): "ReaderService.ConfirmPaymentIntentParamsConfirmConfig" ] """ - Configuration overrides + Configuration overrides. """ expand: NotRequired[List[str]] """ @@ -167,7 +167,7 @@ class ConfirmPaymentIntentParams(TypedDict): """ payment_intent: str """ - PaymentIntent ID + PaymentIntent ID. """ class ConfirmPaymentIntentParamsConfirmConfig(TypedDict): From 4716c3db7abf1c55826f820a04ce0886fc698b2d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 19:05:08 +0000 Subject: [PATCH 15/28] Update generated code for v1809 and 2025-06-30.preview --- OPENAPI_VERSION | 2 +- stripe/_account.py | 40 ++++++++++++++++++++++++++++++++++++++ stripe/_account_service.py | 40 ++++++++++++++++++++++++++++++++++++++ stripe/_subscription.py | 2 +- 4 files changed, 82 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 91d48abb4..f6968f7f4 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1807 \ No newline at end of file +v1809 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index e6ddb426e..0855aae8f 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -1380,10 +1380,30 @@ class Schedule(StripeObject): """ The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. """ + monthly_payout_days: Optional[List[int]] + """ + The days of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + """ weekly_anchor: Optional[str] """ The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. """ + weekly_payout_days: Optional[ + List[ + Literal[ + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", + ] + ] + ] + """ + The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly. + """ debit_negative_balances: bool """ @@ -3601,6 +3621,10 @@ class CreateParamsSettingsPayoutsSchedule(TypedDict): """ The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. """ + monthly_payout_days: NotRequired[List[int]] + """ + The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. + """ weekly_anchor: NotRequired[ Literal[ "friday", @@ -3615,6 +3639,22 @@ class CreateParamsSettingsPayoutsSchedule(TypedDict): """ The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) """ + weekly_payout_days: NotRequired[ + List[ + Literal[ + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", + ] + ] + ] + """ + The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.) + """ class CreateParamsSettingsTaxForms(TypedDict): consented_to_paperless_delivery: NotRequired[bool] diff --git a/stripe/_account_service.py b/stripe/_account_service.py index c3658dd70..62ebb4f22 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -2101,6 +2101,10 @@ class CreateParamsSettingsPayoutsSchedule(TypedDict): """ The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. """ + monthly_payout_days: NotRequired[List[int]] + """ + The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. + """ weekly_anchor: NotRequired[ Literal[ "friday", @@ -2115,6 +2119,22 @@ class CreateParamsSettingsPayoutsSchedule(TypedDict): """ The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) """ + weekly_payout_days: NotRequired[ + List[ + Literal[ + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", + ] + ] + ] + """ + The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.) + """ class CreateParamsSettingsTaxForms(TypedDict): consented_to_paperless_delivery: NotRequired[bool] @@ -4224,6 +4244,10 @@ class UpdateParamsSettingsPayoutsSchedule(TypedDict): """ The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. """ + monthly_payout_days: NotRequired[List[int]] + """ + The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. + """ weekly_anchor: NotRequired[ Literal[ "friday", @@ -4238,6 +4262,22 @@ class UpdateParamsSettingsPayoutsSchedule(TypedDict): """ The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) """ + weekly_payout_days: NotRequired[ + List[ + Literal[ + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", + ] + ] + ] + """ + The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.) + """ class UpdateParamsSettingsTaxForms(TypedDict): consented_to_paperless_delivery: NotRequired[bool] diff --git a/stripe/_subscription.py b/stripe/_subscription.py index ff4a9d178..375c8e3b1 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -2652,7 +2652,7 @@ class SearchParams(RequestOptions): """ trial_start: Optional[int] """ - If the subscription has a trial, the beginning of that trial. For subsequent trials, this date remains as the start of the first ever trial on the subscription. + If the subscription has a trial, the beginning of that trial. """ @classmethod From 3b462bc82e41fc34d88a9c2e31b3ec447ee2d31b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 20:55:02 +0000 Subject: [PATCH 16/28] Update generated code for v1811 and 2025-06-30.preview --- OPENAPI_VERSION | 2 +- stripe/_dispute.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f6968f7f4..265df8e82 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1809 \ No newline at end of file +v1811 \ No newline at end of file diff --git a/stripe/_dispute.py b/stripe/_dispute.py index 8f4d2c067..a654957ed 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -357,6 +357,9 @@ class VisaCompliance(StripeObject): submission_method: Optional[ Literal["manual", "not_submitted", "smart_disputes"] ] + """ + Whether the dispute was submitted manually, with Smart Disputes, or not submitted. + """ _inner_class_types = {"enhanced_eligibility": EnhancedEligibility} class PaymentMethodDetails(StripeObject): From 810e92e4b7573c204ef6b859d787653ac37a5986 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 21:52:27 +0000 Subject: [PATCH 17/28] Update generated code for v1812 and 2025-06-30.preview --- OPENAPI_VERSION | 2 +- stripe/_quote.py | 2 +- stripe/_quote_preview_subscription_schedule.py | 2 +- stripe/_subscription.py | 2 +- stripe/_subscription_schedule.py | 2 +- stripe/_webhook_endpoint.py | 1 + stripe/_webhook_endpoint_service.py | 1 + 7 files changed, 7 insertions(+), 5 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 265df8e82..69e11eef2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1811 \ No newline at end of file +v1812 \ No newline at end of file diff --git a/stripe/_quote.py b/stripe/_quote.py index 9e6a97d62..06012c5f0 100644 --- a/stripe/_quote.py +++ b/stripe/_quote.py @@ -603,7 +603,7 @@ class Prebilling(StripeObject): """ Whether the subscription will always start a new billing period when the quote is accepted. """ - billing_mode: Optional[BillingMode] + billing_mode: BillingMode """ The billing mode of the quote. """ diff --git a/stripe/_quote_preview_subscription_schedule.py b/stripe/_quote_preview_subscription_schedule.py index 566fb15f9..24a7898cf 100644 --- a/stripe/_quote_preview_subscription_schedule.py +++ b/stripe/_quote_preview_subscription_schedule.py @@ -582,7 +582,7 @@ class Prebilling(StripeObject): """ Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. """ - billing_mode: Optional[BillingMode] + billing_mode: BillingMode """ The billing mode of the subscription. """ diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 375c8e3b1..59300b595 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -2466,7 +2466,7 @@ class SearchParams(RequestOptions): """ The fixed values used to calculate the `billing_cycle_anchor`. """ - billing_mode: Optional[BillingMode] + billing_mode: BillingMode """ The billing mode of the subscription. """ diff --git a/stripe/_subscription_schedule.py b/stripe/_subscription_schedule.py index 651758e18..f3596a52d 100644 --- a/stripe/_subscription_schedule.py +++ b/stripe/_subscription_schedule.py @@ -2718,7 +2718,7 @@ class RetrieveParams(RequestOptions): """ Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. """ - billing_mode: Optional[BillingMode] + billing_mode: BillingMode """ The billing mode of the subscription. """ diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py index 842ef75e5..bdab9546a 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -144,6 +144,7 @@ class CreateParams(RequestOptions): "2025-03-31.basil", "2025-04-30.basil", "2025-05-28.basil", + "2025-06-30.basil", ] ] """ diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py index 17b4aaf7a..4d09a0db9 100644 --- a/stripe/_webhook_endpoint_service.py +++ b/stripe/_webhook_endpoint_service.py @@ -125,6 +125,7 @@ class CreateParams(TypedDict): "2025-03-31.basil", "2025-04-30.basil", "2025-05-28.basil", + "2025-06-30.basil", ] ] """ From 4ab9494677eac21be37e87bee920d30d6728c737 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 23:35:39 +0000 Subject: [PATCH 18/28] Update generated code for v1813 and 2025-06-30.preview --- OPENAPI_VERSION | 2 +- stripe/_charge.py | 24 ++++++++++++------------ stripe/_confirmation_token.py | 16 ++++++++-------- stripe/_payment_attempt_record.py | 24 ++++++++++++------------ stripe/_payment_method.py | 16 ++++++++-------- stripe/_payment_record.py | 24 ++++++++++++------------ 6 files changed, 53 insertions(+), 53 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 69e11eef2..a6dd3a2fd 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1812 \ No newline at end of file +v1813 \ No newline at end of file diff --git a/stripe/_charge.py b/stripe/_charge.py index 6612b37e2..f82c65257 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -926,11 +926,11 @@ class Receipt(StripeObject): """ application_cryptogram: Optional[str] """ - EMV tag 9F26, cryptogram generated by the integrated circuit chip. + The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. """ application_preferred_name: Optional[str] """ - Mnenomic of the Application Identifier. + The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. """ authorization_code: Optional[str] """ @@ -946,15 +946,15 @@ class Receipt(StripeObject): """ dedicated_file_name: Optional[str] """ - EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. """ terminal_verification_results: Optional[str] """ - The outcome of a series of EMV functions performed by the card reader. + A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. """ transaction_status_information: Optional[str] """ - An indication of various EMV functions performed during the transaction. + An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. """ class Wallet(StripeObject): @@ -1053,7 +1053,7 @@ class Wallet(StripeObject): """ preferred_locales: Optional[List[str]] """ - EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ Literal[ @@ -1300,11 +1300,11 @@ class Receipt(StripeObject): """ application_cryptogram: Optional[str] """ - EMV tag 9F26, cryptogram generated by the integrated circuit chip. + The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. """ application_preferred_name: Optional[str] """ - Mnenomic of the Application Identifier. + The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. """ authorization_code: Optional[str] """ @@ -1320,15 +1320,15 @@ class Receipt(StripeObject): """ dedicated_file_name: Optional[str] """ - EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. """ terminal_verification_results: Optional[str] """ - The outcome of a series of EMV functions performed by the card reader. + A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. """ transaction_status_information: Optional[str] """ - An indication of various EMV functions performed during the transaction. + An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. """ brand: Optional[str] @@ -1395,7 +1395,7 @@ class Receipt(StripeObject): """ preferred_locales: Optional[List[str]] """ - EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ Literal[ diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 1f2c0004a..6060a068e 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -272,11 +272,11 @@ class Receipt(StripeObject): """ application_cryptogram: Optional[str] """ - EMV tag 9F26, cryptogram generated by the integrated circuit chip. + The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. """ application_preferred_name: Optional[str] """ - Mnenomic of the Application Identifier. + The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. """ authorization_code: Optional[str] """ @@ -292,15 +292,15 @@ class Receipt(StripeObject): """ dedicated_file_name: Optional[str] """ - EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. """ terminal_verification_results: Optional[str] """ - The outcome of a series of EMV functions performed by the card reader. + A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. """ transaction_status_information: Optional[str] """ - An indication of various EMV functions performed during the transaction. + An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. """ class Wallet(StripeObject): @@ -402,7 +402,7 @@ class Wallet(StripeObject): """ preferred_locales: Optional[List[str]] """ - EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ Literal[ @@ -830,7 +830,7 @@ class Wallet(StripeObject): """ preferred_locales: Optional[List[str]] """ - EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ Literal[ @@ -1063,7 +1063,7 @@ class Networks(StripeObject): """ preferred_locales: Optional[List[str]] """ - EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ Literal[ diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 3118b95f3..3bc5b5d86 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -523,11 +523,11 @@ class Receipt(StripeObject): """ application_cryptogram: Optional[str] """ - EMV tag 9F26, cryptogram generated by the integrated circuit chip. + The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. """ application_preferred_name: Optional[str] """ - Mnenomic of the Application Identifier. + The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. """ authorization_code: Optional[str] """ @@ -543,15 +543,15 @@ class Receipt(StripeObject): """ dedicated_file_name: Optional[str] """ - EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. """ terminal_verification_results: Optional[str] """ - The outcome of a series of EMV functions performed by the card reader. + A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. """ transaction_status_information: Optional[str] """ - An indication of various EMV functions performed during the transaction. + An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. """ class Wallet(StripeObject): @@ -650,7 +650,7 @@ class Wallet(StripeObject): """ preferred_locales: Optional[List[str]] """ - EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ Literal[ @@ -907,11 +907,11 @@ class Receipt(StripeObject): """ application_cryptogram: Optional[str] """ - EMV tag 9F26, cryptogram generated by the integrated circuit chip. + The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. """ application_preferred_name: Optional[str] """ - Mnenomic of the Application Identifier. + The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. """ authorization_code: Optional[str] """ @@ -927,15 +927,15 @@ class Receipt(StripeObject): """ dedicated_file_name: Optional[str] """ - EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. """ terminal_verification_results: Optional[str] """ - The outcome of a series of EMV functions performed by the card reader. + A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. """ transaction_status_information: Optional[str] """ - An indication of various EMV functions performed during the transaction. + An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. """ brand: Optional[str] @@ -1002,7 +1002,7 @@ class Receipt(StripeObject): """ preferred_locales: Optional[List[str]] """ - EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ Literal[ diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index bcfbc8309..8cd008324 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -208,11 +208,11 @@ class Receipt(StripeObject): """ application_cryptogram: Optional[str] """ - EMV tag 9F26, cryptogram generated by the integrated circuit chip. + The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. """ application_preferred_name: Optional[str] """ - Mnenomic of the Application Identifier. + The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. """ authorization_code: Optional[str] """ @@ -228,15 +228,15 @@ class Receipt(StripeObject): """ dedicated_file_name: Optional[str] """ - EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. """ terminal_verification_results: Optional[str] """ - The outcome of a series of EMV functions performed by the card reader. + A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. """ transaction_status_information: Optional[str] """ - An indication of various EMV functions performed during the transaction. + An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. """ class Wallet(StripeObject): @@ -335,7 +335,7 @@ class Wallet(StripeObject): """ preferred_locales: Optional[List[str]] """ - EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ Literal[ @@ -761,7 +761,7 @@ class Wallet(StripeObject): """ preferred_locales: Optional[List[str]] """ - EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ Literal[ @@ -994,7 +994,7 @@ class Networks(StripeObject): """ preferred_locales: Optional[List[str]] """ - EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ Literal[ diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index c96fdd221..49bfae690 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -527,11 +527,11 @@ class Receipt(StripeObject): """ application_cryptogram: Optional[str] """ - EMV tag 9F26, cryptogram generated by the integrated circuit chip. + The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. """ application_preferred_name: Optional[str] """ - Mnenomic of the Application Identifier. + The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. """ authorization_code: Optional[str] """ @@ -547,15 +547,15 @@ class Receipt(StripeObject): """ dedicated_file_name: Optional[str] """ - EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. """ terminal_verification_results: Optional[str] """ - The outcome of a series of EMV functions performed by the card reader. + A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. """ transaction_status_information: Optional[str] """ - An indication of various EMV functions performed during the transaction. + An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. """ class Wallet(StripeObject): @@ -654,7 +654,7 @@ class Wallet(StripeObject): """ preferred_locales: Optional[List[str]] """ - EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ Literal[ @@ -911,11 +911,11 @@ class Receipt(StripeObject): """ application_cryptogram: Optional[str] """ - EMV tag 9F26, cryptogram generated by the integrated circuit chip. + The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers. """ application_preferred_name: Optional[str] """ - Mnenomic of the Application Identifier. + The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip. """ authorization_code: Optional[str] """ @@ -931,15 +931,15 @@ class Receipt(StripeObject): """ dedicated_file_name: Optional[str] """ - EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84. """ terminal_verification_results: Optional[str] """ - The outcome of a series of EMV functions performed by the card reader. + A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95. """ transaction_status_information: Optional[str] """ - An indication of various EMV functions performed during the transaction. + An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B. """ brand: Optional[str] @@ -1006,7 +1006,7 @@ class Receipt(StripeObject): """ preferred_locales: Optional[List[str]] """ - EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ Literal[ From 3fb662026439b06f94312fd230f42a797ec4ce24 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 19 Jun 2025 10:35:16 +0000 Subject: [PATCH 19/28] Update generated code for v1814 and 2025-06-30.preview --- OPENAPI_VERSION | 2 +- stripe/_mandate.py | 5 + stripe/_order.py | 160 ++++++++++- stripe/_order_service.py | 156 ++++++++++- stripe/_payment_intent.py | 226 ++++++++++++++- stripe/_payment_intent_service.py | 222 ++++++++++++++- stripe/_setup_intent.py | 411 ++++++++++++++++++++++++++++ stripe/_setup_intent_service.py | 399 +++++++++++++++++++++++++++ stripe/checkout/_session.py | 40 +++ stripe/checkout/_session_service.py | 40 +++ 10 files changed, 1648 insertions(+), 13 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a6dd3a2fd..1d8f69a27 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1813 \ No newline at end of file +v1814 \ No newline at end of file diff --git a/stripe/_mandate.py b/stripe/_mandate.py index 161483efd..288bd567f 100644 --- a/stripe/_mandate.py +++ b/stripe/_mandate.py @@ -112,6 +112,9 @@ class Cashapp(StripeObject): class KakaoPay(StripeObject): pass + class Klarna(StripeObject): + pass + class KrCard(StripeObject): pass @@ -222,6 +225,7 @@ class UsBankAccount(StripeObject): card: Optional[Card] cashapp: Optional[Cashapp] kakao_pay: Optional[KakaoPay] + klarna: Optional[Klarna] kr_card: Optional[KrCard] link: Optional[Link] naver_pay: Optional[NaverPay] @@ -243,6 +247,7 @@ class UsBankAccount(StripeObject): "card": Card, "cashapp": Cashapp, "kakao_pay": KakaoPay, + "klarna": Klarna, "kr_card": KrCard, "link": Link, "naver_pay": NaverPay, diff --git a/stripe/_order.py b/stripe/_order.py index 513e6427e..7288bd208 100644 --- a/stripe/_order.py +++ b/stripe/_order.py @@ -316,7 +316,9 @@ class Klarna(StripeObject): """ Preferred locale of the Klarna checkout page that the customer is redirected to. """ - setup_future_usage: Optional[Literal["none"]] + setup_future_usage: Optional[ + Literal["none", "off_session", "on_session"] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1646,6 +1648,12 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + on_demand: NotRequired[ + "Order.CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ preferred_locale: NotRequired[ Literal[ "cs-CZ", @@ -1699,7 +1707,9 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): """ Preferred language of the Klarna authorization page that the customer is redirected to """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1711,6 +1721,74 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(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`. """ + subscriptions: NotRequired[ + "Literal['']|List[Order.CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + class CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( + TypedDict, + ): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription( + TypedDict, + ): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "Order.CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ class CreateParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] @@ -2991,6 +3069,12 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + on_demand: NotRequired[ + "Order.ModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ preferred_locale: NotRequired[ Literal[ "cs-CZ", @@ -3044,7 +3128,9 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): """ Preferred language of the Klarna authorization page that the customer is redirected to """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3056,6 +3142,74 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsKlarna(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`. """ + subscriptions: NotRequired[ + "Literal['']|List[Order.ModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + class ModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( + TypedDict, + ): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class ModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription( + TypedDict, + ): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "Order.ModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class ModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ class ModifyParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] diff --git a/stripe/_order_service.py b/stripe/_order_service.py index 702b64934..3a66bb5ec 100644 --- a/stripe/_order_service.py +++ b/stripe/_order_service.py @@ -692,6 +692,12 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + on_demand: NotRequired[ + "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ preferred_locale: NotRequired[ Literal[ "cs-CZ", @@ -745,7 +751,9 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): """ Preferred language of the Klarna authorization page that the customer is redirected to """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -757,6 +765,74 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(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`. """ + subscriptions: NotRequired[ + "Literal['']|List[OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + class CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( + TypedDict, + ): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription( + TypedDict, + ): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ class CreateParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] @@ -2045,6 +2121,12 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + on_demand: NotRequired[ + "OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ preferred_locale: NotRequired[ Literal[ "cs-CZ", @@ -2098,7 +2180,9 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): """ Preferred language of the Klarna authorization page that the customer is redirected to """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2110,6 +2194,74 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsKlarna(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`. """ + subscriptions: NotRequired[ + "Literal['']|List[OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + class UpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( + TypedDict, + ): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class UpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription( + TypedDict, + ): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class UpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ class UpdateParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 555f2698e..3c369889b 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -2405,7 +2405,9 @@ class Klarna(StripeObject): """ Preferred locale of the Klarna checkout page that the customer is redirected to. """ - setup_future_usage: Optional[Literal["none"]] + setup_future_usage: Optional[ + Literal["none", "off_session", "on_session"] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6983,6 +6985,12 @@ class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + on_demand: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ preferred_locale: NotRequired[ Literal[ "cs-CZ", @@ -7036,7 +7044,9 @@ class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): """ Preferred language of the Klarna authorization page that the customer is redirected to """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7048,6 +7058,70 @@ class ConfirmParamsPaymentMethodOptionsKlarna(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`. """ + subscriptions: NotRequired[ + "Literal['']|List[PaymentIntent.ConfirmParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + class ConfirmParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class ConfirmParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): confirmation_number: NotRequired["Literal['']|str"] @@ -10910,6 +10984,12 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + on_demand: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ preferred_locale: NotRequired[ Literal[ "cs-CZ", @@ -10963,7 +11043,9 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): """ Preferred language of the Klarna authorization page that the customer is redirected to """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -10975,6 +11057,70 @@ class CreateParamsPaymentMethodOptionsKlarna(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`. """ + subscriptions: NotRequired[ + "Literal['']|List[PaymentIntent.CreateParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + class CreateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class CreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): confirmation_number: NotRequired["Literal['']|str"] @@ -14985,6 +15131,12 @@ class ModifyParamsPaymentMethodOptionsKlarna(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + on_demand: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ preferred_locale: NotRequired[ Literal[ "cs-CZ", @@ -15038,7 +15190,9 @@ class ModifyParamsPaymentMethodOptionsKlarna(TypedDict): """ Preferred language of the Klarna authorization page that the customer is redirected to """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -15050,6 +15204,70 @@ class ModifyParamsPaymentMethodOptionsKlarna(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`. """ + subscriptions: NotRequired[ + "Literal['']|List[PaymentIntent.ModifyParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + class ModifyParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class ModifyParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class ModifyParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ class ModifyParamsPaymentMethodOptionsKonbini(TypedDict): confirmation_number: NotRequired["Literal['']|str"] diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 639a6adb1..5407ff72f 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -3798,6 +3798,12 @@ class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + on_demand: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ preferred_locale: NotRequired[ Literal[ "cs-CZ", @@ -3851,7 +3857,9 @@ class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): """ Preferred language of the Klarna authorization page that the customer is redirected to """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3863,6 +3871,70 @@ class ConfirmParamsPaymentMethodOptionsKlarna(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`. """ + subscriptions: NotRequired[ + "Literal['']|List[PaymentIntentService.ConfirmParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + class ConfirmParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class ConfirmParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): confirmation_number: NotRequired["Literal['']|str"] @@ -7775,6 +7847,12 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + on_demand: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ preferred_locale: NotRequired[ Literal[ "cs-CZ", @@ -7828,7 +7906,9 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): """ Preferred language of the Klarna authorization page that the customer is redirected to """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7840,6 +7920,70 @@ class CreateParamsPaymentMethodOptionsKlarna(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`. """ + subscriptions: NotRequired[ + "Literal['']|List[PaymentIntentService.CreateParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + class CreateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class CreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): confirmation_number: NotRequired["Literal['']|str"] @@ -11938,6 +12082,12 @@ class UpdateParamsPaymentMethodOptionsKlarna(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + on_demand: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ preferred_locale: NotRequired[ Literal[ "cs-CZ", @@ -11991,7 +12141,9 @@ class UpdateParamsPaymentMethodOptionsKlarna(TypedDict): """ Preferred language of the Klarna authorization page that the customer is redirected to """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -12003,6 +12155,70 @@ class UpdateParamsPaymentMethodOptionsKlarna(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`. """ + subscriptions: NotRequired[ + "Literal['']|List[PaymentIntentService.UpdateParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + class UpdateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class UpdateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class UpdateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ class UpdateParamsPaymentMethodOptionsKonbini(TypedDict): confirmation_number: NotRequired["Literal['']|str"] diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index f3072f874..14ec6b0dd 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -571,6 +571,16 @@ class MandateOptions(StripeObject): class CardPresent(StripeObject): pass + class Klarna(StripeObject): + currency: Optional[str] + """ + The currency of the setup intent. Three letter ISO currency code. + """ + preferred_locale: Optional[str] + """ + Preferred locale of the Klarna checkout page that the customer is redirected to. + """ + class Link(StripeObject): persistent_token: Optional[str] """ @@ -741,6 +751,7 @@ class MandateOptions(StripeObject): bacs_debit: Optional[BacsDebit] card: Optional[Card] card_present: Optional[CardPresent] + klarna: Optional[Klarna] link: Optional[Link] paypal: Optional[Paypal] payto: Optional[Payto] @@ -752,6 +763,7 @@ class MandateOptions(StripeObject): "bacs_debit": BacsDebit, "card": Card, "card_present": CardPresent, + "klarna": Klarna, "link": Link, "paypal": Paypal, "payto": Payto, @@ -1719,6 +1731,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. """ + klarna: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + """ link: NotRequired["SetupIntent.ConfirmParamsPaymentMethodOptionsLink"] """ If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. @@ -1977,6 +1995,133 @@ class ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBanca message extension: CB-SCORE; numeric value 0-99 """ + class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): + currency: NotRequired[str] + """ + The currency of the SetupIntent. Three letter ISO currency code. + """ + on_demand: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up a payment method for on-demand payments. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + subscriptions: NotRequired[ + "Literal['']|List[SetupIntent.ConfirmParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription + """ + + class ConfirmParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class ConfirmParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: "SetupIntent.ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + class ConfirmParamsPaymentMethodOptionsLink(TypedDict): persistent_token: NotRequired[str] """ @@ -3199,6 +3344,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. """ + klarna: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + """ link: NotRequired["SetupIntent.CreateParamsPaymentMethodOptionsLink"] """ If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. @@ -3455,6 +3606,133 @@ class CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancai message extension: CB-SCORE; numeric value 0-99 """ + class CreateParamsPaymentMethodOptionsKlarna(TypedDict): + currency: NotRequired[str] + """ + The currency of the SetupIntent. Three letter ISO currency code. + """ + on_demand: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up a payment method for on-demand payments. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + subscriptions: NotRequired[ + "Literal['']|List[SetupIntent.CreateParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription + """ + + class CreateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class CreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: "SetupIntent.CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + class CreateParamsPaymentMethodOptionsLink(TypedDict): persistent_token: NotRequired[str] """ @@ -4646,6 +4924,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. """ + klarna: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + """ link: NotRequired["SetupIntent.ModifyParamsPaymentMethodOptionsLink"] """ If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. @@ -4902,6 +5186,133 @@ class ModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancai message extension: CB-SCORE; numeric value 0-99 """ + class ModifyParamsPaymentMethodOptionsKlarna(TypedDict): + currency: NotRequired[str] + """ + The currency of the SetupIntent. Three letter ISO currency code. + """ + on_demand: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up a payment method for on-demand payments. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + subscriptions: NotRequired[ + "Literal['']|List[SetupIntent.ModifyParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription + """ + + class ModifyParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class ModifyParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: "SetupIntent.ModifyParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class ModifyParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + class ModifyParamsPaymentMethodOptionsLink(TypedDict): persistent_token: NotRequired[str] """ diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index c81ebb925..409d59793 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -1024,6 +1024,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. """ + klarna: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodOptionsKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + """ link: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodOptionsLink" ] @@ -1284,6 +1290,133 @@ class ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBanca message extension: CB-SCORE; numeric value 0-99 """ + class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): + currency: NotRequired[str] + """ + The currency of the SetupIntent. Three letter ISO currency code. + """ + on_demand: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up a payment method for on-demand payments. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + subscriptions: NotRequired[ + "Literal['']|List[SetupIntentService.ConfirmParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription + """ + + class ConfirmParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class ConfirmParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: "SetupIntentService.ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + class ConfirmParamsPaymentMethodOptionsLink(TypedDict): persistent_token: NotRequired[str] """ @@ -2552,6 +2685,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. """ + klarna: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodOptionsKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + """ link: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodOptionsLink" ] @@ -2812,6 +2951,133 @@ class CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancai message extension: CB-SCORE; numeric value 0-99 """ + class CreateParamsPaymentMethodOptionsKlarna(TypedDict): + currency: NotRequired[str] + """ + The currency of the SetupIntent. Three letter ISO currency code. + """ + on_demand: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up a payment method for on-demand payments. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + subscriptions: NotRequired[ + "Literal['']|List[SetupIntentService.CreateParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription + """ + + class CreateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class CreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: "SetupIntentService.CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + class CreateParamsPaymentMethodOptionsLink(TypedDict): persistent_token: NotRequired[str] """ @@ -4059,6 +4325,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. """ + klarna: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodOptionsKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + """ link: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodOptionsLink" ] @@ -4319,6 +4591,133 @@ class UpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancai message extension: CB-SCORE; numeric value 0-99 """ + class UpdateParamsPaymentMethodOptionsKlarna(TypedDict): + currency: NotRequired[str] + """ + The currency of the SetupIntent. Three letter ISO currency code. + """ + on_demand: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up a payment method for on-demand payments. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + subscriptions: NotRequired[ + "Literal['']|List[SetupIntentService.UpdateParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription + """ + + class UpdateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + class UpdateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: "SetupIntentService.UpdateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class UpdateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + class UpdateParamsPaymentMethodOptionsLink(TypedDict): persistent_token: NotRequired[str] """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index d34e13749..46f5ee040 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -3754,6 +3754,46 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + subscriptions: NotRequired[ + "Literal['']|List[Session.CreateParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if the Checkout Session sets up a future subscription. + """ + + class CreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: "Session.CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): expires_after_days: NotRequired[int] diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index 75bd4885c..3d6ffff2a 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -1683,6 +1683,46 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + subscriptions: NotRequired[ + "Literal['']|List[SessionService.CreateParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if the Checkout Session sets up a future subscription. + """ + + class CreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: "SessionService.CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + class CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, + ): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): expires_after_days: NotRequired[int] From d014fb8bb0f554b7639dadc0864b33eec6f461fe Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 15:33:18 +0000 Subject: [PATCH 20/28] Update generated code for v1815 and 2025-06-30.preview --- OPENAPI_VERSION | 2 +- stripe/tax/_registration.py | 18 ++++++++++++++++++ stripe/tax/_registration_service.py | 10 ++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1d8f69a27..695bc1a3e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1814 \ No newline at end of file +v1815 \ No newline at end of file diff --git a/stripe/tax/_registration.py b/stripe/tax/_registration.py index b3fdd7c16..747ca293b 100644 --- a/stripe/tax/_registration.py +++ b/stripe/tax/_registration.py @@ -791,6 +791,12 @@ class Tz(StripeObject): Type of registration in `country`. """ + class Ua(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Ug(StripeObject): type: Literal["simplified"] """ @@ -980,6 +986,7 @@ class Zw(StripeObject): tj: Optional[Tj] tr: Optional[Tr] tz: Optional[Tz] + ua: Optional[Ua] ug: Optional[Ug] us: Optional[Us] uy: Optional[Uy] @@ -1079,6 +1086,7 @@ class Zw(StripeObject): "tj": Tj, "tr": Tr, "tz": Tz, + "ua": Ua, "ug": Ug, "us": Us, "uy": Uy, @@ -1473,6 +1481,10 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in TZ. """ + ua: NotRequired["Registration.CreateParamsCountryOptionsUa"] + """ + Options for the registration in UA. + """ ug: NotRequired["Registration.CreateParamsCountryOptionsUg"] """ Options for the registration in UG. @@ -2382,6 +2394,12 @@ class CreateParamsCountryOptionsTz(TypedDict): Type of registration to be created in `country`. """ + class CreateParamsCountryOptionsUa(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsUg(TypedDict): type: Literal["simplified"] """ diff --git a/stripe/tax/_registration_service.py b/stripe/tax/_registration_service.py index 4e8d85728..f8abadea1 100644 --- a/stripe/tax/_registration_service.py +++ b/stripe/tax/_registration_service.py @@ -397,6 +397,10 @@ class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): """ Options for the registration in TZ. """ + ua: NotRequired["RegistrationService.CreateParamsCountryOptionsUa"] + """ + Options for the registration in UA. + """ ug: NotRequired["RegistrationService.CreateParamsCountryOptionsUg"] """ Options for the registration in UG. @@ -1306,6 +1310,12 @@ class CreateParamsCountryOptionsTz(TypedDict): Type of registration to be created in `country`. """ + class CreateParamsCountryOptionsUa(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + class CreateParamsCountryOptionsUg(TypedDict): type: Literal["simplified"] """ From 3ded03f795ef24b05ce141a344e7089993be42ad Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 17:18:00 +0000 Subject: [PATCH 21/28] Update generated code for v1816 and 2025-06-30.preview --- OPENAPI_VERSION | 2 +- stripe/_invoice_item.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 695bc1a3e..bf34cc2a3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1815 \ No newline at end of file +v1816 \ No newline at end of file diff --git a/stripe/_invoice_item.py b/stripe/_invoice_item.py index d545efc2e..bb6260a43 100644 --- a/stripe/_invoice_item.py +++ b/stripe/_invoice_item.py @@ -34,10 +34,7 @@ class InvoiceItem( UpdateableAPIResource["InvoiceItem"], ): """ - Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an - invoice by creating or updating it with an `invoice` field, at which point it will be included as - [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within - [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines). + Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). When you create an invoice item with an `invoice` field, it is attached to the specified invoice and included as [an invoice line item](https://stripe.com/docs/api/invoices/line_item) within [invoice.lines](https://stripe.com/docs/api/invoices/object#invoice_object-lines). Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined with a [subscription](https://stripe.com/docs/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge From 2790c3d1fab15f8dc96a727d7378557d729dae63 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 19:09:25 +0000 Subject: [PATCH 22/28] Update generated code for v1817 and 2025-06-30.preview --- OPENAPI_VERSION | 2 +- stripe/_account.py | 16 +++ stripe/_account_service.py | 24 ++++ stripe/_charge.py | 20 ++++ stripe/_confirmation_token.py | 16 +++ stripe/_customer.py | 1 + stripe/_customer_payment_method_service.py | 1 + stripe/_invoice.py | 5 +- stripe/_invoice_service.py | 4 +- stripe/_payment_attempt_record.py | 20 ++++ stripe/_payment_intent.py | 104 ++++++++++++++++++ stripe/_payment_intent_service.py | 90 +++++++++++++++ stripe/_payment_method.py | 15 +++ stripe/_payment_method_service.py | 9 ++ stripe/_payment_record.py | 20 ++++ stripe/_quote_preview_invoice.py | 1 + stripe/_setup_intent.py | 24 ++++ stripe/_setup_intent_service.py | 30 +++++ stripe/_subscription.py | 5 +- stripe/_subscription_service.py | 4 +- stripe/checkout/_session.py | 1 + stripe/checkout/_session_service.py | 1 + .../_confirmation_token_service.py | 10 ++ 23 files changed, 414 insertions(+), 9 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bf34cc2a3..e11db67e6 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1816 \ No newline at end of file +v1817 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index 0855aae8f..8fec42bd2 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -248,6 +248,10 @@ class Capabilities(StripeObject): """ The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. """ + crypto_payments: Optional[Literal["active", "inactive", "pending"]] + """ + The status of the Crypto capability of the account, or whether the account can directly process Crypto payments. + """ eps_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. @@ -1910,6 +1914,12 @@ class CreateParamsCapabilities(TypedDict): """ The cashapp_payments capability. """ + crypto_payments: NotRequired[ + "Account.CreateParamsCapabilitiesCryptoPayments" + ] + """ + The crypto_payments capability. + """ eps_payments: NotRequired[ "Account.CreateParamsCapabilitiesEpsPayments" ] @@ -2339,6 +2349,12 @@ class CreateParamsCapabilitiesCashappPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesCryptoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesEpsPayments(TypedDict): requested: NotRequired[bool] """ diff --git a/stripe/_account_service.py b/stripe/_account_service.py index 62ebb4f22..8d79f92ba 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -362,6 +362,12 @@ class CreateParamsCapabilities(TypedDict): """ The cashapp_payments capability. """ + crypto_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesCryptoPayments" + ] + """ + The crypto_payments capability. + """ eps_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesEpsPayments" ] @@ -795,6 +801,12 @@ class CreateParamsCapabilitiesCashappPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class CreateParamsCapabilitiesCryptoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class CreateParamsCapabilitiesEpsPayments(TypedDict): requested: NotRequired[bool] """ @@ -2574,6 +2586,12 @@ class UpdateParamsCapabilities(TypedDict): """ The cashapp_payments capability. """ + crypto_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesCryptoPayments" + ] + """ + The crypto_payments capability. + """ eps_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesEpsPayments" ] @@ -3007,6 +3025,12 @@ class UpdateParamsCapabilitiesCashappPayments(TypedDict): Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. """ + class UpdateParamsCapabilitiesCryptoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + class UpdateParamsCapabilitiesEpsPayments(TypedDict): requested: NotRequired[bool] """ diff --git a/stripe/_charge.py b/stripe/_charge.py index f82c65257..5c462547d 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -1088,6 +1088,24 @@ class Cashapp(StripeObject): A public identifier for buyers using Cash App. """ + class Crypto(StripeObject): + buyer_address: Optional[str] + """ + The wallet address of the customer. + """ + network: Optional[Literal["base", "ethereum", "polygon"]] + """ + The blockchain network that the transaction was sent on. + """ + token_currency: Optional[Literal["usdc", "usdg", "usdp"]] + """ + The token currency that the transaction was sent with. + """ + transaction_hash: Optional[str] + """ + The blockchain transaction hash of the crypto payment. + """ + class CustomerBalance(StripeObject): pass @@ -2050,6 +2068,7 @@ class Zip(StripeObject): card: Optional[Card] card_present: Optional[CardPresent] cashapp: Optional[Cashapp] + crypto: Optional[Crypto] customer_balance: Optional[CustomerBalance] eps: Optional[Eps] fpx: Optional[Fpx] @@ -2119,6 +2138,7 @@ class Zip(StripeObject): "card": Card, "card_present": CardPresent, "cashapp": Cashapp, + "crypto": Crypto, "customer_balance": CustomerBalance, "eps": Eps, "fpx": Fpx, diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 6060a068e..a98160072 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -861,6 +861,9 @@ class Cashapp(StripeObject): A public identifier for buyers using Cash App. """ + class Crypto(StripeObject): + pass + class CustomerBalance(StripeObject): pass @@ -1499,6 +1502,7 @@ class Zip(StripeObject): card: Optional[Card] card_present: Optional[CardPresent] cashapp: Optional[Cashapp] + crypto: Optional[Crypto] customer: Optional[ExpandableField["Customer"]] """ The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. @@ -1559,6 +1563,7 @@ class Zip(StripeObject): "card", "card_present", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -1625,6 +1630,7 @@ class Zip(StripeObject): "card": Card, "card_present": CardPresent, "cashapp": Cashapp, + "crypto": Crypto, "customer_balance": CustomerBalance, "eps": Eps, "fpx": Fpx, @@ -1834,6 +1840,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired[ + "ConfirmationToken.CreateParamsPaymentMethodDataCrypto" + ] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer_balance: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataCustomerBalance" ] @@ -2084,6 +2096,7 @@ class CreateParamsPaymentMethodData(TypedDict): "blik", "boleto", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -2263,6 +2276,9 @@ class CreateParamsPaymentMethodDataBoleto(TypedDict): class CreateParamsPaymentMethodDataCashapp(TypedDict): pass + class CreateParamsPaymentMethodDataCrypto(TypedDict): + pass + class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): pass diff --git a/stripe/_customer.py b/stripe/_customer.py index 003eda4b2..25ecb7b9f 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -922,6 +922,7 @@ class ListPaymentMethodsParams(RequestOptions): "boleto", "card", "cashapp", + "crypto", "customer_balance", "eps", "fpx", diff --git a/stripe/_customer_payment_method_service.py b/stripe/_customer_payment_method_service.py index eacef6685..d97871975 100644 --- a/stripe/_customer_payment_method_service.py +++ b/stripe/_customer_payment_method_service.py @@ -49,6 +49,7 @@ class ListParams(TypedDict): "boleto", "card", "cashapp", + "crypto", "customer_balance", "eps", "fpx", diff --git a/stripe/_invoice.py b/stripe/_invoice.py index d81916bdf..356c62628 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -942,6 +942,7 @@ class Filters(StripeObject): "boleto", "card", "cashapp", + "crypto", "custom", "customer_balance", "eps", @@ -1851,7 +1852,7 @@ class CreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration @@ -4566,7 +4567,7 @@ class ModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 37de9da7a..ef33ed1c2 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -633,7 +633,7 @@ class CreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration @@ -3717,7 +3717,7 @@ class UpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 3bc5b5d86..d70aa33a2 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -685,6 +685,24 @@ class Cashapp(StripeObject): A public identifier for buyers using Cash App. """ + class Crypto(StripeObject): + buyer_address: Optional[str] + """ + The wallet address of the customer. + """ + network: Optional[Literal["base", "ethereum", "polygon"]] + """ + The blockchain network that the transaction was sent on. + """ + token_currency: Optional[Literal["usdc", "usdg", "usdp"]] + """ + The token currency that the transaction was sent with. + """ + transaction_hash: Optional[str] + """ + The blockchain transaction hash of the crypto payment. + """ + class Custom(StripeObject): display_name: str """ @@ -1658,6 +1676,7 @@ class Zip(StripeObject): """ card_present: Optional[CardPresent] cashapp: Optional[Cashapp] + crypto: Optional[Crypto] custom: Optional[Custom] """ Custom Payment Methods represent Payment Method types not modeled directly in @@ -1741,6 +1760,7 @@ class Zip(StripeObject): "card": Card, "card_present": CardPresent, "cashapp": Cashapp, + "crypto": Crypto, "custom": Custom, "customer_balance": CustomerBalance, "eps": Eps, diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 3c369889b..1c7f35777 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -2227,6 +2227,18 @@ class Cashapp(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + class Crypto(StripeObject): + setup_future_usage: Optional[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + class CustomerBalance(StripeObject): class BankTransfer(StripeObject): class EuBankTransfer(StripeObject): @@ -3067,6 +3079,7 @@ class Zip(StripeObject): card: Optional[Card] card_present: Optional[CardPresent] cashapp: Optional[Cashapp] + crypto: Optional[Crypto] customer_balance: Optional[CustomerBalance] eps: Optional[Eps] fpx: Optional[Fpx] @@ -3125,6 +3138,7 @@ class Zip(StripeObject): "card": Card, "card_present": CardPresent, "cashapp": Cashapp, + "crypto": Crypto, "customer_balance": CustomerBalance, "eps": Eps, "fpx": Fpx, @@ -5022,6 +5036,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataCrypto" + ] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer_balance: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataCustomerBalance" ] @@ -5254,6 +5274,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "blik", "boleto", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -5433,6 +5454,9 @@ class ConfirmParamsPaymentMethodDataBoleto(TypedDict): class ConfirmParamsPaymentMethodDataCashapp(TypedDict): pass + class ConfirmParamsPaymentMethodDataCrypto(TypedDict): + pass + class ConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -5880,6 +5904,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. """ + crypto: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCrypto" + ] + """ + If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + """ customer_balance: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCustomerBalance" ] @@ -6773,6 +6803,20 @@ class ConfirmParamsPaymentMethodOptionsCashapp(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 ConfirmParamsPaymentMethodOptionsCrypto(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + 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 ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): bank_transfer: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer" @@ -9023,6 +9067,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataCrypto" + ] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer_balance: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataCustomerBalance" ] @@ -9253,6 +9303,7 @@ class CreateParamsPaymentMethodData(TypedDict): "blik", "boleto", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -9432,6 +9483,9 @@ class CreateParamsPaymentMethodDataBoleto(TypedDict): class CreateParamsPaymentMethodDataCashapp(TypedDict): pass + class CreateParamsPaymentMethodDataCrypto(TypedDict): + pass + class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -9879,6 +9933,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. """ + crypto: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCrypto" + ] + """ + If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + """ customer_balance: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCustomerBalance" ] @@ -10772,6 +10832,20 @@ class CreateParamsPaymentMethodOptionsCashapp(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 CreateParamsPaymentMethodOptionsCrypto(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + 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 CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): bank_transfer: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" @@ -13170,6 +13244,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataCrypto" + ] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer_balance: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataCustomerBalance" ] @@ -13400,6 +13480,7 @@ class ModifyParamsPaymentMethodData(TypedDict): "blik", "boleto", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -13579,6 +13660,9 @@ class ModifyParamsPaymentMethodDataBoleto(TypedDict): class ModifyParamsPaymentMethodDataCashapp(TypedDict): pass + class ModifyParamsPaymentMethodDataCrypto(TypedDict): + pass + class ModifyParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -14026,6 +14110,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. """ + crypto: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCrypto" + ] + """ + If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + """ customer_balance: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCustomerBalance" ] @@ -14919,6 +15009,20 @@ class ModifyParamsPaymentMethodOptionsCashapp(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 ModifyParamsPaymentMethodOptionsCrypto(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + 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 ModifyParamsPaymentMethodOptionsCustomerBalance(TypedDict): bank_transfer: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer" diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 5407ff72f..40693f9a0 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -1807,6 +1807,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodDataCrypto" + ] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer_balance: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataCustomerBalance" ] @@ -2065,6 +2071,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "blik", "boleto", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -2246,6 +2253,9 @@ class ConfirmParamsPaymentMethodDataBoleto(TypedDict): class ConfirmParamsPaymentMethodDataCashapp(TypedDict): pass + class ConfirmParamsPaymentMethodDataCrypto(TypedDict): + pass + class ConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -2693,6 +2703,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. """ + crypto: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsCrypto" + ] + """ + If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + """ customer_balance: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsCustomerBalance" ] @@ -3586,6 +3602,20 @@ class ConfirmParamsPaymentMethodOptionsCashapp(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 ConfirmParamsPaymentMethodOptionsCrypto(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + 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 ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): bank_transfer: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer" @@ -5856,6 +5886,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodDataCrypto" + ] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer_balance: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataCustomerBalance" ] @@ -6114,6 +6150,7 @@ class CreateParamsPaymentMethodData(TypedDict): "blik", "boleto", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -6295,6 +6332,9 @@ class CreateParamsPaymentMethodDataBoleto(TypedDict): class CreateParamsPaymentMethodDataCashapp(TypedDict): pass + class CreateParamsPaymentMethodDataCrypto(TypedDict): + pass + class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -6742,6 +6782,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. """ + crypto: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsCrypto" + ] + """ + If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + """ customer_balance: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsCustomerBalance" ] @@ -7635,6 +7681,20 @@ class CreateParamsPaymentMethodOptionsCashapp(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 CreateParamsPaymentMethodOptionsCrypto(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + 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 CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): bank_transfer: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" @@ -10091,6 +10151,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodDataCrypto" + ] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer_balance: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataCustomerBalance" ] @@ -10349,6 +10415,7 @@ class UpdateParamsPaymentMethodData(TypedDict): "blik", "boleto", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -10530,6 +10597,9 @@ class UpdateParamsPaymentMethodDataBoleto(TypedDict): class UpdateParamsPaymentMethodDataCashapp(TypedDict): pass + class UpdateParamsPaymentMethodDataCrypto(TypedDict): + pass + class UpdateParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -10977,6 +11047,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. """ + crypto: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsCrypto" + ] + """ + If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + """ customer_balance: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsCustomerBalance" ] @@ -11870,6 +11946,20 @@ class UpdateParamsPaymentMethodOptionsCashapp(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 UpdateParamsPaymentMethodOptionsCrypto(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + 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 UpdateParamsPaymentMethodOptionsCustomerBalance(TypedDict): bank_transfer: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 8cd008324..0af845193 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -792,6 +792,9 @@ class Cashapp(StripeObject): A public identifier for buyers using Cash App. """ + class Crypto(StripeObject): + pass + class CustomerBalance(StripeObject): pass @@ -1501,6 +1504,10 @@ class CreateParams(RequestOptions): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired["PaymentMethod.CreateParamsCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer: NotRequired[str] """ The `Customer` to whom the original PaymentMethod is attached. @@ -1699,6 +1706,7 @@ class CreateParams(RequestOptions): "boleto", "card", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -1909,6 +1917,9 @@ class CreateParamsCardNetworks(TypedDict): class CreateParamsCashapp(TypedDict): pass + class CreateParamsCrypto(TypedDict): + pass + class CreateParamsCustomerBalance(TypedDict): pass @@ -2306,6 +2317,7 @@ class ListParams(RequestOptions): "boleto", "card", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -2527,6 +2539,7 @@ class RetrieveParams(RequestOptions): """ Time at which the object was created. Measured in seconds since the Unix epoch. """ + crypto: Optional[Crypto] customer: Optional[ExpandableField["Customer"]] """ The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. @@ -2607,6 +2620,7 @@ class RetrieveParams(RequestOptions): "card", "card_present", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -3130,6 +3144,7 @@ async def retrieve_async( "card": Card, "card_present": CardPresent, "cashapp": Cashapp, + "crypto": Crypto, "customer_balance": CustomerBalance, "eps": Eps, "fpx": Fpx, diff --git a/stripe/_payment_method_service.py b/stripe/_payment_method_service.py index 9ac29e063..536acc4fb 100644 --- a/stripe/_payment_method_service.py +++ b/stripe/_payment_method_service.py @@ -97,6 +97,10 @@ class CreateParams(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired["PaymentMethodService.CreateParamsCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer: NotRequired[str] """ The `Customer` to whom the original PaymentMethod is attached. @@ -301,6 +305,7 @@ class CreateParams(TypedDict): "boleto", "card", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -513,6 +518,9 @@ class CreateParamsCardNetworks(TypedDict): class CreateParamsCashapp(TypedDict): pass + class CreateParamsCrypto(TypedDict): + pass + class CreateParamsCustomerBalance(TypedDict): pass @@ -910,6 +918,7 @@ class ListParams(TypedDict): "boleto", "card", "cashapp", + "crypto", "customer_balance", "eps", "fpx", diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 49bfae690..8740de689 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -689,6 +689,24 @@ class Cashapp(StripeObject): A public identifier for buyers using Cash App. """ + class Crypto(StripeObject): + buyer_address: Optional[str] + """ + The wallet address of the customer. + """ + network: Optional[Literal["base", "ethereum", "polygon"]] + """ + The blockchain network that the transaction was sent on. + """ + token_currency: Optional[Literal["usdc", "usdg", "usdp"]] + """ + The token currency that the transaction was sent with. + """ + transaction_hash: Optional[str] + """ + The blockchain transaction hash of the crypto payment. + """ + class Custom(StripeObject): display_name: str """ @@ -1662,6 +1680,7 @@ class Zip(StripeObject): """ card_present: Optional[CardPresent] cashapp: Optional[Cashapp] + crypto: Optional[Crypto] custom: Optional[Custom] """ Custom Payment Methods represent Payment Method types not modeled directly in @@ -1745,6 +1764,7 @@ class Zip(StripeObject): "card": Card, "card_present": CardPresent, "cashapp": Cashapp, + "crypto": Crypto, "custom": Custom, "customer_balance": CustomerBalance, "eps": Eps, diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py index 1958ef530..00c7576ee 100644 --- a/stripe/_quote_preview_invoice.py +++ b/stripe/_quote_preview_invoice.py @@ -926,6 +926,7 @@ class Filters(StripeObject): "boleto", "card", "cashapp", + "crypto", "custom", "customer_balance", "eps", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 14ec6b0dd..c5c3d63f6 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -947,6 +947,10 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer_balance: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataCustomerBalance" ] @@ -1169,6 +1173,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "blik", "boleto", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -1348,6 +1353,9 @@ class ConfirmParamsPaymentMethodDataBoleto(TypedDict): class ConfirmParamsPaymentMethodDataCashapp(TypedDict): pass + class ConfirmParamsPaymentMethodDataCrypto(TypedDict): + pass + class ConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -2562,6 +2570,10 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired["SetupIntent.CreateParamsPaymentMethodDataCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer_balance: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataCustomerBalance" ] @@ -2782,6 +2794,7 @@ class CreateParamsPaymentMethodData(TypedDict): "blik", "boleto", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -2961,6 +2974,9 @@ class CreateParamsPaymentMethodDataBoleto(TypedDict): class CreateParamsPaymentMethodDataCashapp(TypedDict): pass + class CreateParamsPaymentMethodDataCrypto(TypedDict): + pass + class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -4142,6 +4158,10 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer_balance: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataCustomerBalance" ] @@ -4362,6 +4382,7 @@ class ModifyParamsPaymentMethodData(TypedDict): "blik", "boleto", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -4541,6 +4562,9 @@ class ModifyParamsPaymentMethodDataBoleto(TypedDict): class ModifyParamsPaymentMethodDataCashapp(TypedDict): pass + class ModifyParamsPaymentMethodDataCrypto(TypedDict): + pass + class ModifyParamsPaymentMethodDataCustomerBalance(TypedDict): pass diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index 409d59793..e367872f3 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -198,6 +198,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodDataCrypto" + ] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer_balance: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataCustomerBalance" ] @@ -456,6 +462,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "blik", "boleto", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -637,6 +644,9 @@ class ConfirmParamsPaymentMethodDataBoleto(TypedDict): class ConfirmParamsPaymentMethodDataCashapp(TypedDict): pass + class ConfirmParamsPaymentMethodDataCrypto(TypedDict): + pass + class ConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -1869,6 +1879,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodDataCrypto" + ] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer_balance: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataCustomerBalance" ] @@ -2119,6 +2135,7 @@ class CreateParamsPaymentMethodData(TypedDict): "blik", "boleto", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -2298,6 +2315,9 @@ class CreateParamsPaymentMethodDataBoleto(TypedDict): class CreateParamsPaymentMethodDataCashapp(TypedDict): pass + class CreateParamsPaymentMethodDataCrypto(TypedDict): + pass + class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): pass @@ -3509,6 +3529,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodDataCrypto" + ] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer_balance: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataCustomerBalance" ] @@ -3759,6 +3785,7 @@ class UpdateParamsPaymentMethodData(TypedDict): "blik", "boleto", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -3938,6 +3965,9 @@ class UpdateParamsPaymentMethodDataBoleto(TypedDict): class UpdateParamsPaymentMethodDataCashapp(TypedDict): pass + class UpdateParamsPaymentMethodDataCrypto(TypedDict): + pass + class UpdateParamsPaymentMethodDataCustomerBalance(TypedDict): pass diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 59300b595..2dcf37537 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -426,6 +426,7 @@ class Filters(StripeObject): "boleto", "card", "cashapp", + "crypto", "custom", "customer_balance", "eps", @@ -1133,7 +1134,7 @@ class CreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration @@ -2113,7 +2114,7 @@ class ModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index eb7e55bc9..ecbf0f0a2 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -608,7 +608,7 @@ class CreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration @@ -1644,7 +1644,7 @@ class UpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 46f5ee040..52cbd9319 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -2381,6 +2381,7 @@ class CreateParams(RequestOptions): "boleto", "card", "cashapp", + "crypto", "customer_balance", "eps", "fpx", diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index 3d6ffff2a..36aabda0b 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -258,6 +258,7 @@ class CreateParams(TypedDict): "boleto", "card", "cashapp", + "crypto", "customer_balance", "eps", "fpx", diff --git a/stripe/test_helpers/_confirmation_token_service.py b/stripe/test_helpers/_confirmation_token_service.py index 33e4ce6eb..5b223f5c1 100644 --- a/stripe/test_helpers/_confirmation_token_service.py +++ b/stripe/test_helpers/_confirmation_token_service.py @@ -135,6 +135,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. """ + crypto: NotRequired[ + "ConfirmationTokenService.CreateParamsPaymentMethodDataCrypto" + ] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ customer_balance: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataCustomerBalance" ] @@ -393,6 +399,7 @@ class CreateParamsPaymentMethodData(TypedDict): "blik", "boleto", "cashapp", + "crypto", "customer_balance", "eps", "fpx", @@ -574,6 +581,9 @@ class CreateParamsPaymentMethodDataBoleto(TypedDict): class CreateParamsPaymentMethodDataCashapp(TypedDict): pass + class CreateParamsPaymentMethodDataCrypto(TypedDict): + pass + class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): pass From 761e9cdc80c9b25f71a6aeeff172dec23b1f6687 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 06:30:45 +0000 Subject: [PATCH 23/28] Update generated code for v1818 and 2025-06-30.preview --- OPENAPI_VERSION | 2 +- stripe/_payment_intent.py | 664 +++++++++++++++++++++++++++++ stripe/_payment_intent_service.py | 676 ++++++++++++++++++++++++++++++ 3 files changed, 1341 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e11db67e6..986a23084 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1817 \ No newline at end of file +v1818 \ No newline at end of file diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 1c7f35777..bebaf575d 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -3308,6 +3308,10 @@ class CancelParams(RequestOptions): """ class CaptureParams(RequestOptions): + amount_details: NotRequired["PaymentIntent.CaptureParamsAmountDetails"] + """ + Provides industry-specific information about the amount. + """ amount_to_capture: NotRequired[int] """ The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Defaults to the full `amount_capturable` if it's not provided. @@ -3354,6 +3358,168 @@ class CaptureParams(RequestOptions): is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). """ + class CaptureParamsAmountDetails(TypedDict): + discount_amount: NotRequired["Literal['']|int"] + """ + The amount an item was discounted for. + """ + line_items: NotRequired[ + "Literal['']|List[PaymentIntent.CaptureParamsAmountDetailsLineItem]" + ] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntent.CaptureParamsAmountDetailsShipping" + ] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired[ + "Literal['']|PaymentIntent.CaptureParamsAmountDetailsTax" + ] + """ + Contains information about the tax portion of the amount. + """ + + class CaptureParamsAmountDetailsLineItem(TypedDict): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + payment_method_options: NotRequired[ + "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptions" + ] + """ + Payment method-specific information for line items. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired["PaymentIntent.CaptureParamsAmountDetailsLineItemTax"] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + unit_of_measure: NotRequired[str] + """ + A unit of measure for the line item, such as gallons, feet, meters, etc. + """ + + class CaptureParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): + card: NotRequired[ + "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard" + ] + """ + This sub-hash contains line item details that are specific to `card` payment method." + """ + card_present: NotRequired[ + "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" + ] + """ + This sub-hash contains line item details that are specific to `card_present` payment method." + """ + klarna: NotRequired[ + "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" + ] + """ + This sub-hash contains line item details that are specific to `klarna` payment method." + """ + paypal: NotRequired[ + "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" + ] + """ + This sub-hash contains line item details that are specific to `paypal` payment method." + """ + + class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard( + TypedDict + ): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( + TypedDict, + ): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( + TypedDict, + ): + image_url: NotRequired[str] + """ + URL to an image for the product. Max length, 4096 characters. + """ + product_url: NotRequired[str] + """ + URL to the product page. Max length, 4096 characters. + """ + subscription_reference: NotRequired[str] + """ + Reference for the subscription this line item is for. + """ + + class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( + TypedDict, + ): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + + class CaptureParamsAmountDetailsLineItemTax(TypedDict): + total_tax_amount: int + """ + The total tax on an item. Non-negative integer. + """ + + class CaptureParamsAmountDetailsShipping(TypedDict): + amount: NotRequired["Literal['']|int"] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping destination. + """ + + class CaptureParamsAmountDetailsTax(TypedDict): + total_tax_amount: int + """ + Total portion of the amount that is for tax. + """ + class CaptureParamsHooks(TypedDict): inputs: NotRequired["PaymentIntent.CaptureParamsHooksInputs"] """ @@ -4078,6 +4244,12 @@ class CaptureParamsTransferData(TypedDict): """ class ConfirmParams(RequestOptions): + amount_details: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsAmountDetails" + ] + """ + Provides industry-specific information about the amount. + """ application_fee_amount: NotRequired["Literal['']|int"] """ The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). @@ -4189,6 +4361,168 @@ class ConfirmParams(RequestOptions): Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. """ + class ConfirmParamsAmountDetails(TypedDict): + discount_amount: NotRequired["Literal['']|int"] + """ + The amount an item was discounted for. + """ + line_items: NotRequired[ + "Literal['']|List[PaymentIntent.ConfirmParamsAmountDetailsLineItem]" + ] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsAmountDetailsShipping" + ] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsAmountDetailsTax" + ] + """ + Contains information about the tax portion of the amount. + """ + + class ConfirmParamsAmountDetailsLineItem(TypedDict): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + payment_method_options: NotRequired[ + "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptions" + ] + """ + Payment method-specific information for line items. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired["PaymentIntent.ConfirmParamsAmountDetailsLineItemTax"] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + unit_of_measure: NotRequired[str] + """ + A unit of measure for the line item, such as gallons, feet, meters, etc. + """ + + class ConfirmParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): + card: NotRequired[ + "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard" + ] + """ + This sub-hash contains line item details that are specific to `card` payment method." + """ + card_present: NotRequired[ + "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" + ] + """ + This sub-hash contains line item details that are specific to `card_present` payment method." + """ + klarna: NotRequired[ + "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" + ] + """ + This sub-hash contains line item details that are specific to `klarna` payment method." + """ + paypal: NotRequired[ + "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" + ] + """ + This sub-hash contains line item details that are specific to `paypal` payment method." + """ + + class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard( + TypedDict + ): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( + TypedDict, + ): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( + TypedDict, + ): + image_url: NotRequired[str] + """ + URL to an image for the product. Max length, 4096 characters. + """ + product_url: NotRequired[str] + """ + URL to the product page. Max length, 4096 characters. + """ + subscription_reference: NotRequired[str] + """ + Reference for the subscription this line item is for. + """ + + class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( + TypedDict, + ): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + + class ConfirmParamsAmountDetailsLineItemTax(TypedDict): + total_tax_amount: int + """ + The total tax on an item. Non-negative integer. + """ + + class ConfirmParamsAmountDetailsShipping(TypedDict): + amount: NotRequired["Literal['']|int"] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping destination. + """ + + class ConfirmParamsAmountDetailsTax(TypedDict): + total_tax_amount: int + """ + Total portion of the amount that is for tax. + """ + class ConfirmParamsHooks(TypedDict): inputs: NotRequired["PaymentIntent.ConfirmParamsHooksInputs"] """ @@ -8030,6 +8364,10 @@ class CreateParams(RequestOptions): """ Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). """ + amount_details: NotRequired["PaymentIntent.CreateParamsAmountDetails"] + """ + Provides industry-specific information about the amount. + """ application_fee_amount: NotRequired[int] """ The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). @@ -8212,6 +8550,166 @@ class CreateParams(RequestOptions): Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. """ + class CreateParamsAmountDetails(TypedDict): + discount_amount: NotRequired["Literal['']|int"] + """ + The amount an item was discounted for. + """ + line_items: NotRequired[ + "Literal['']|List[PaymentIntent.CreateParamsAmountDetailsLineItem]" + ] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsAmountDetailsShipping" + ] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsAmountDetailsTax" + ] + """ + Contains information about the tax portion of the amount. + """ + + class CreateParamsAmountDetailsLineItem(TypedDict): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + payment_method_options: NotRequired[ + "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptions" + ] + """ + Payment method-specific information for line items. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired["PaymentIntent.CreateParamsAmountDetailsLineItemTax"] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + unit_of_measure: NotRequired[str] + """ + A unit of measure for the line item, such as gallons, feet, meters, etc. + """ + + class CreateParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): + card: NotRequired[ + "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptionsCard" + ] + """ + This sub-hash contains line item details that are specific to `card` payment method." + """ + card_present: NotRequired[ + "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" + ] + """ + This sub-hash contains line item details that are specific to `card_present` payment method." + """ + klarna: NotRequired[ + "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" + ] + """ + This sub-hash contains line item details that are specific to `klarna` payment method." + """ + paypal: NotRequired[ + "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" + ] + """ + This sub-hash contains line item details that are specific to `paypal` payment method." + """ + + class CreateParamsAmountDetailsLineItemPaymentMethodOptionsCard(TypedDict): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class CreateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( + TypedDict, + ): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class CreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( + TypedDict, + ): + image_url: NotRequired[str] + """ + URL to an image for the product. Max length, 4096 characters. + """ + product_url: NotRequired[str] + """ + URL to the product page. Max length, 4096 characters. + """ + subscription_reference: NotRequired[str] + """ + Reference for the subscription this line item is for. + """ + + class CreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( + TypedDict, + ): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + + class CreateParamsAmountDetailsLineItemTax(TypedDict): + total_tax_amount: int + """ + The total tax on an item. Non-negative integer. + """ + + class CreateParamsAmountDetailsShipping(TypedDict): + amount: NotRequired["Literal['']|int"] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping destination. + """ + + class CreateParamsAmountDetailsTax(TypedDict): + total_tax_amount: int + """ + Total portion of the amount that is for tax. + """ + class CreateParamsAutomaticPaymentMethods(TypedDict): allow_redirects: NotRequired[Literal["always", "never"]] """ @@ -12292,6 +12790,12 @@ class ModifyParams(RequestOptions): """ Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). """ + amount_details: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsAmountDetails" + ] + """ + Provides industry-specific information about the amount. + """ application_fee_amount: NotRequired["Literal['']|int"] """ The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). @@ -12416,6 +12920,166 @@ class ModifyParams(RequestOptions): A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). """ + class ModifyParamsAmountDetails(TypedDict): + discount_amount: NotRequired["Literal['']|int"] + """ + The amount an item was discounted for. + """ + line_items: NotRequired[ + "Literal['']|List[PaymentIntent.ModifyParamsAmountDetailsLineItem]" + ] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsAmountDetailsShipping" + ] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsAmountDetailsTax" + ] + """ + Contains information about the tax portion of the amount. + """ + + class ModifyParamsAmountDetailsLineItem(TypedDict): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + payment_method_options: NotRequired[ + "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptions" + ] + """ + Payment method-specific information for line items. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired["PaymentIntent.ModifyParamsAmountDetailsLineItemTax"] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + unit_of_measure: NotRequired[str] + """ + A unit of measure for the line item, such as gallons, feet, meters, etc. + """ + + class ModifyParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): + card: NotRequired[ + "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptionsCard" + ] + """ + This sub-hash contains line item details that are specific to `card` payment method." + """ + card_present: NotRequired[ + "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" + ] + """ + This sub-hash contains line item details that are specific to `card_present` payment method." + """ + klarna: NotRequired[ + "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" + ] + """ + This sub-hash contains line item details that are specific to `klarna` payment method." + """ + paypal: NotRequired[ + "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" + ] + """ + This sub-hash contains line item details that are specific to `paypal` payment method." + """ + + class ModifyParamsAmountDetailsLineItemPaymentMethodOptionsCard(TypedDict): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class ModifyParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( + TypedDict, + ): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class ModifyParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( + TypedDict, + ): + image_url: NotRequired[str] + """ + URL to an image for the product. Max length, 4096 characters. + """ + product_url: NotRequired[str] + """ + URL to the product page. Max length, 4096 characters. + """ + subscription_reference: NotRequired[str] + """ + Reference for the subscription this line item is for. + """ + + class ModifyParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( + TypedDict, + ): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + + class ModifyParamsAmountDetailsLineItemTax(TypedDict): + total_tax_amount: int + """ + The total tax on an item. Non-negative integer. + """ + + class ModifyParamsAmountDetailsShipping(TypedDict): + amount: NotRequired["Literal['']|int"] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping destination. + """ + + class ModifyParamsAmountDetailsTax(TypedDict): + total_tax_amount: int + """ + Total portion of the amount that is for tax. + """ + class ModifyParamsHooks(TypedDict): inputs: NotRequired["PaymentIntent.ModifyParamsHooksInputs"] """ diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 40693f9a0..b876608f0 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -55,6 +55,12 @@ class CancelParams(TypedDict): """ class CaptureParams(TypedDict): + amount_details: NotRequired[ + "PaymentIntentService.CaptureParamsAmountDetails" + ] + """ + Provides industry-specific information about the amount. + """ amount_to_capture: NotRequired[int] """ The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Defaults to the full `amount_capturable` if it's not provided. @@ -103,6 +109,170 @@ class CaptureParams(TypedDict): is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). """ + class CaptureParamsAmountDetails(TypedDict): + discount_amount: NotRequired["Literal['']|int"] + """ + The amount an item was discounted for. + """ + line_items: NotRequired[ + "Literal['']|List[PaymentIntentService.CaptureParamsAmountDetailsLineItem]" + ] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntentService.CaptureParamsAmountDetailsShipping" + ] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired[ + "Literal['']|PaymentIntentService.CaptureParamsAmountDetailsTax" + ] + """ + Contains information about the tax portion of the amount. + """ + + class CaptureParamsAmountDetailsLineItem(TypedDict): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + payment_method_options: NotRequired[ + "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptions" + ] + """ + Payment method-specific information for line items. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired[ + "PaymentIntentService.CaptureParamsAmountDetailsLineItemTax" + ] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + unit_of_measure: NotRequired[str] + """ + A unit of measure for the line item, such as gallons, feet, meters, etc. + """ + + class CaptureParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): + card: NotRequired[ + "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard" + ] + """ + This sub-hash contains line item details that are specific to `card` payment method." + """ + card_present: NotRequired[ + "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" + ] + """ + This sub-hash contains line item details that are specific to `card_present` payment method." + """ + klarna: NotRequired[ + "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" + ] + """ + This sub-hash contains line item details that are specific to `klarna` payment method." + """ + paypal: NotRequired[ + "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" + ] + """ + This sub-hash contains line item details that are specific to `paypal` payment method." + """ + + class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard( + TypedDict + ): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( + TypedDict, + ): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( + TypedDict, + ): + image_url: NotRequired[str] + """ + URL to an image for the product. Max length, 4096 characters. + """ + product_url: NotRequired[str] + """ + URL to the product page. Max length, 4096 characters. + """ + subscription_reference: NotRequired[str] + """ + Reference for the subscription this line item is for. + """ + + class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( + TypedDict, + ): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + + class CaptureParamsAmountDetailsLineItemTax(TypedDict): + total_tax_amount: int + """ + The total tax on an item. Non-negative integer. + """ + + class CaptureParamsAmountDetailsShipping(TypedDict): + amount: NotRequired["Literal['']|int"] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping destination. + """ + + class CaptureParamsAmountDetailsTax(TypedDict): + total_tax_amount: int + """ + Total portion of the amount that is for tax. + """ + class CaptureParamsHooks(TypedDict): inputs: NotRequired["PaymentIntentService.CaptureParamsHooksInputs"] """ @@ -835,6 +1005,12 @@ class CaptureParamsTransferData(TypedDict): """ class ConfirmParams(TypedDict): + amount_details: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsAmountDetails" + ] + """ + Provides industry-specific information about the amount. + """ application_fee_amount: NotRequired["Literal['']|int"] """ The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). @@ -948,6 +1124,170 @@ class ConfirmParams(TypedDict): Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. """ + class ConfirmParamsAmountDetails(TypedDict): + discount_amount: NotRequired["Literal['']|int"] + """ + The amount an item was discounted for. + """ + line_items: NotRequired[ + "Literal['']|List[PaymentIntentService.ConfirmParamsAmountDetailsLineItem]" + ] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsAmountDetailsShipping" + ] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsAmountDetailsTax" + ] + """ + Contains information about the tax portion of the amount. + """ + + class ConfirmParamsAmountDetailsLineItem(TypedDict): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + payment_method_options: NotRequired[ + "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptions" + ] + """ + Payment method-specific information for line items. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired[ + "PaymentIntentService.ConfirmParamsAmountDetailsLineItemTax" + ] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + unit_of_measure: NotRequired[str] + """ + A unit of measure for the line item, such as gallons, feet, meters, etc. + """ + + class ConfirmParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): + card: NotRequired[ + "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard" + ] + """ + This sub-hash contains line item details that are specific to `card` payment method." + """ + card_present: NotRequired[ + "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" + ] + """ + This sub-hash contains line item details that are specific to `card_present` payment method." + """ + klarna: NotRequired[ + "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" + ] + """ + This sub-hash contains line item details that are specific to `klarna` payment method." + """ + paypal: NotRequired[ + "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" + ] + """ + This sub-hash contains line item details that are specific to `paypal` payment method." + """ + + class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard( + TypedDict + ): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( + TypedDict, + ): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( + TypedDict, + ): + image_url: NotRequired[str] + """ + URL to an image for the product. Max length, 4096 characters. + """ + product_url: NotRequired[str] + """ + URL to the product page. Max length, 4096 characters. + """ + subscription_reference: NotRequired[str] + """ + Reference for the subscription this line item is for. + """ + + class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( + TypedDict, + ): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + + class ConfirmParamsAmountDetailsLineItemTax(TypedDict): + total_tax_amount: int + """ + The total tax on an item. Non-negative integer. + """ + + class ConfirmParamsAmountDetailsShipping(TypedDict): + amount: NotRequired["Literal['']|int"] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping destination. + """ + + class ConfirmParamsAmountDetailsTax(TypedDict): + total_tax_amount: int + """ + Total portion of the amount that is for tax. + """ + class ConfirmParamsHooks(TypedDict): inputs: NotRequired["PaymentIntentService.ConfirmParamsHooksInputs"] """ @@ -4829,6 +5169,12 @@ class CreateParams(TypedDict): """ Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). """ + amount_details: NotRequired[ + "PaymentIntentService.CreateParamsAmountDetails" + ] + """ + Provides industry-specific information about the amount. + """ application_fee_amount: NotRequired[int] """ The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). @@ -5015,6 +5361,168 @@ class CreateParams(TypedDict): Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. """ + class CreateParamsAmountDetails(TypedDict): + discount_amount: NotRequired["Literal['']|int"] + """ + The amount an item was discounted for. + """ + line_items: NotRequired[ + "Literal['']|List[PaymentIntentService.CreateParamsAmountDetailsLineItem]" + ] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsAmountDetailsShipping" + ] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsAmountDetailsTax" + ] + """ + Contains information about the tax portion of the amount. + """ + + class CreateParamsAmountDetailsLineItem(TypedDict): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + payment_method_options: NotRequired[ + "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptions" + ] + """ + Payment method-specific information for line items. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired[ + "PaymentIntentService.CreateParamsAmountDetailsLineItemTax" + ] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + unit_of_measure: NotRequired[str] + """ + A unit of measure for the line item, such as gallons, feet, meters, etc. + """ + + class CreateParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): + card: NotRequired[ + "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptionsCard" + ] + """ + This sub-hash contains line item details that are specific to `card` payment method." + """ + card_present: NotRequired[ + "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" + ] + """ + This sub-hash contains line item details that are specific to `card_present` payment method." + """ + klarna: NotRequired[ + "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" + ] + """ + This sub-hash contains line item details that are specific to `klarna` payment method." + """ + paypal: NotRequired[ + "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" + ] + """ + This sub-hash contains line item details that are specific to `paypal` payment method." + """ + + class CreateParamsAmountDetailsLineItemPaymentMethodOptionsCard(TypedDict): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class CreateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( + TypedDict, + ): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class CreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( + TypedDict, + ): + image_url: NotRequired[str] + """ + URL to an image for the product. Max length, 4096 characters. + """ + product_url: NotRequired[str] + """ + URL to the product page. Max length, 4096 characters. + """ + subscription_reference: NotRequired[str] + """ + Reference for the subscription this line item is for. + """ + + class CreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( + TypedDict, + ): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + + class CreateParamsAmountDetailsLineItemTax(TypedDict): + total_tax_amount: int + """ + The total tax on an item. Non-negative integer. + """ + + class CreateParamsAmountDetailsShipping(TypedDict): + amount: NotRequired["Literal['']|int"] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping destination. + """ + + class CreateParamsAmountDetailsTax(TypedDict): + total_tax_amount: int + """ + Total portion of the amount that is for tax. + """ + class CreateParamsAutomaticPaymentMethods(TypedDict): allow_redirects: NotRequired[Literal["always", "never"]] """ @@ -9177,6 +9685,12 @@ class UpdateParams(TypedDict): """ Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). """ + amount_details: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsAmountDetails" + ] + """ + Provides industry-specific information about the amount. + """ application_fee_amount: NotRequired["Literal['']|int"] """ The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). @@ -9307,6 +9821,168 @@ class UpdateParams(TypedDict): A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). """ + class UpdateParamsAmountDetails(TypedDict): + discount_amount: NotRequired["Literal['']|int"] + """ + The amount an item was discounted for. + """ + line_items: NotRequired[ + "Literal['']|List[PaymentIntentService.UpdateParamsAmountDetailsLineItem]" + ] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsAmountDetailsShipping" + ] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsAmountDetailsTax" + ] + """ + Contains information about the tax portion of the amount. + """ + + class UpdateParamsAmountDetailsLineItem(TypedDict): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + payment_method_options: NotRequired[ + "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptions" + ] + """ + Payment method-specific information for line items. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired[ + "PaymentIntentService.UpdateParamsAmountDetailsLineItemTax" + ] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + unit_of_measure: NotRequired[str] + """ + A unit of measure for the line item, such as gallons, feet, meters, etc. + """ + + class UpdateParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): + card: NotRequired[ + "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptionsCard" + ] + """ + This sub-hash contains line item details that are specific to `card` payment method." + """ + card_present: NotRequired[ + "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" + ] + """ + This sub-hash contains line item details that are specific to `card_present` payment method." + """ + klarna: NotRequired[ + "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" + ] + """ + This sub-hash contains line item details that are specific to `klarna` payment method." + """ + paypal: NotRequired[ + "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" + ] + """ + This sub-hash contains line item details that are specific to `paypal` payment method." + """ + + class UpdateParamsAmountDetailsLineItemPaymentMethodOptionsCard(TypedDict): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class UpdateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( + TypedDict, + ): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + class UpdateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( + TypedDict, + ): + image_url: NotRequired[str] + """ + URL to an image for the product. Max length, 4096 characters. + """ + product_url: NotRequired[str] + """ + URL to the product page. Max length, 4096 characters. + """ + subscription_reference: NotRequired[str] + """ + Reference for the subscription this line item is for. + """ + + class UpdateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( + TypedDict, + ): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + + class UpdateParamsAmountDetailsLineItemTax(TypedDict): + total_tax_amount: int + """ + The total tax on an item. Non-negative integer. + """ + + class UpdateParamsAmountDetailsShipping(TypedDict): + amount: NotRequired["Literal['']|int"] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping destination. + """ + + class UpdateParamsAmountDetailsTax(TypedDict): + total_tax_amount: int + """ + Total portion of the amount that is for tax. + """ + class UpdateParamsHooks(TypedDict): inputs: NotRequired["PaymentIntentService.UpdateParamsHooksInputs"] """ From fdd5147e2ee7942d2eba73b84b2fa76de95f3395 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 16:08:12 +0000 Subject: [PATCH 24/28] Update generated code for v1819 and 2025-06-30.preview --- OPENAPI_VERSION | 2 +- stripe/_payment_intent.py | 664 ----------------------------- stripe/_payment_intent_service.py | 676 ------------------------------ 3 files changed, 1 insertion(+), 1341 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 986a23084..d8931ef8a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1818 \ No newline at end of file +v1819 \ No newline at end of file diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index bebaf575d..1c7f35777 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -3308,10 +3308,6 @@ class CancelParams(RequestOptions): """ class CaptureParams(RequestOptions): - amount_details: NotRequired["PaymentIntent.CaptureParamsAmountDetails"] - """ - Provides industry-specific information about the amount. - """ amount_to_capture: NotRequired[int] """ The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Defaults to the full `amount_capturable` if it's not provided. @@ -3358,168 +3354,6 @@ class CaptureParams(RequestOptions): is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). """ - class CaptureParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The amount an item was discounted for. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntent.CaptureParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntent.CaptureParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntent.CaptureParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class CaptureParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired["PaymentIntent.CaptureParamsAmountDetailsLineItemTax"] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard( - TypedDict - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class CaptureParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class CaptureParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class CaptureParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - class CaptureParamsHooks(TypedDict): inputs: NotRequired["PaymentIntent.CaptureParamsHooksInputs"] """ @@ -4244,12 +4078,6 @@ class CaptureParamsTransferData(TypedDict): """ class ConfirmParams(RequestOptions): - amount_details: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ application_fee_amount: NotRequired["Literal['']|int"] """ The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). @@ -4361,168 +4189,6 @@ class ConfirmParams(RequestOptions): Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. """ - class ConfirmParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The amount an item was discounted for. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntent.ConfirmParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class ConfirmParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired["PaymentIntent.ConfirmParamsAmountDetailsLineItemTax"] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard( - TypedDict - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class ConfirmParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class ConfirmParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class ConfirmParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - class ConfirmParamsHooks(TypedDict): inputs: NotRequired["PaymentIntent.ConfirmParamsHooksInputs"] """ @@ -8364,10 +8030,6 @@ class CreateParams(RequestOptions): """ Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). """ - amount_details: NotRequired["PaymentIntent.CreateParamsAmountDetails"] - """ - Provides industry-specific information about the amount. - """ application_fee_amount: NotRequired[int] """ The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). @@ -8550,166 +8212,6 @@ class CreateParams(RequestOptions): Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. """ - class CreateParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The amount an item was discounted for. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntent.CreateParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class CreateParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired["PaymentIntent.CreateParamsAmountDetailsLineItemTax"] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsCard(TypedDict): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class CreateParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class CreateParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class CreateParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - class CreateParamsAutomaticPaymentMethods(TypedDict): allow_redirects: NotRequired[Literal["always", "never"]] """ @@ -12790,12 +12292,6 @@ class ModifyParams(RequestOptions): """ Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). """ - amount_details: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ application_fee_amount: NotRequired["Literal['']|int"] """ The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). @@ -12920,166 +12416,6 @@ class ModifyParams(RequestOptions): A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). """ - class ModifyParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The amount an item was discounted for. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntent.ModifyParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class ModifyParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired["PaymentIntent.ModifyParamsAmountDetailsLineItemTax"] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class ModifyParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class ModifyParamsAmountDetailsLineItemPaymentMethodOptionsCard(TypedDict): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class ModifyParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class ModifyParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class ModifyParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class ModifyParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class ModifyParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class ModifyParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - class ModifyParamsHooks(TypedDict): inputs: NotRequired["PaymentIntent.ModifyParamsHooksInputs"] """ diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index b876608f0..40693f9a0 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -55,12 +55,6 @@ class CancelParams(TypedDict): """ class CaptureParams(TypedDict): - amount_details: NotRequired[ - "PaymentIntentService.CaptureParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ amount_to_capture: NotRequired[int] """ The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Defaults to the full `amount_capturable` if it's not provided. @@ -109,170 +103,6 @@ class CaptureParams(TypedDict): is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). """ - class CaptureParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The amount an item was discounted for. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntentService.CaptureParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntentService.CaptureParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntentService.CaptureParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class CaptureParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired[ - "PaymentIntentService.CaptureParamsAmountDetailsLineItemTax" - ] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard( - TypedDict - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class CaptureParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class CaptureParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class CaptureParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - class CaptureParamsHooks(TypedDict): inputs: NotRequired["PaymentIntentService.CaptureParamsHooksInputs"] """ @@ -1005,12 +835,6 @@ class CaptureParamsTransferData(TypedDict): """ class ConfirmParams(TypedDict): - amount_details: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ application_fee_amount: NotRequired["Literal['']|int"] """ The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). @@ -1124,170 +948,6 @@ class ConfirmParams(TypedDict): Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. """ - class ConfirmParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The amount an item was discounted for. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntentService.ConfirmParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class ConfirmParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired[ - "PaymentIntentService.ConfirmParamsAmountDetailsLineItemTax" - ] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard( - TypedDict - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class ConfirmParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class ConfirmParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class ConfirmParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - class ConfirmParamsHooks(TypedDict): inputs: NotRequired["PaymentIntentService.ConfirmParamsHooksInputs"] """ @@ -5169,12 +4829,6 @@ class CreateParams(TypedDict): """ Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). """ - amount_details: NotRequired[ - "PaymentIntentService.CreateParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ application_fee_amount: NotRequired[int] """ The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). @@ -5361,168 +5015,6 @@ class CreateParams(TypedDict): Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. """ - class CreateParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The amount an item was discounted for. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntentService.CreateParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class CreateParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired[ - "PaymentIntentService.CreateParamsAmountDetailsLineItemTax" - ] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsCard(TypedDict): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class CreateParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class CreateParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class CreateParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - class CreateParamsAutomaticPaymentMethods(TypedDict): allow_redirects: NotRequired[Literal["always", "never"]] """ @@ -9685,12 +9177,6 @@ class UpdateParams(TypedDict): """ Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). """ - amount_details: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ application_fee_amount: NotRequired["Literal['']|int"] """ The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). @@ -9821,168 +9307,6 @@ class UpdateParams(TypedDict): A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). """ - class UpdateParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The amount an item was discounted for. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntentService.UpdateParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class UpdateParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired[ - "PaymentIntentService.UpdateParamsAmountDetailsLineItemTax" - ] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class UpdateParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class UpdateParamsAmountDetailsLineItemPaymentMethodOptionsCard(TypedDict): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class UpdateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class UpdateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class UpdateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class UpdateParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class UpdateParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class UpdateParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - class UpdateParamsHooks(TypedDict): inputs: NotRequired["PaymentIntentService.UpdateParamsHooksInputs"] """ From 1ebdeaee05d7d71260dc5ca596ccc55c37e44689 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 18:43:29 +0000 Subject: [PATCH 25/28] Update generated code for v1819 and 2025-06-30.preview --- stripe/_api_requestor.py | 4 +- stripe/_error.py | 8 +-- stripe/v2/core/_account.py | 66 ++++++++++++++++++ stripe/v2/core/_account_service.py | 36 ++++++++++ .../v2/money_management/_financial_account.py | 11 +-- tests/test_generated_examples.py | 68 +++++++++---------- 6 files changed, 141 insertions(+), 52 deletions(-) diff --git a/stripe/_api_requestor.py b/stripe/_api_requestor.py index dd850e207..2a01dd214 100644 --- a/stripe/_api_requestor.py +++ b/stripe/_api_requestor.py @@ -373,6 +373,8 @@ def specific_v2_api_error(self, rbody, rcode, resp, rheaders, error_data): return error.TemporarySessionExpiredError(**error_args) elif type == "financial_account_not_open": return error.FinancialAccountNotOpenError(**error_args) + elif type == "feature_not_enabled": + return error.FeatureNotEnabledError(**error_args) elif type == "blocked_by_stripe": return error.BlockedByStripeError(**error_args) elif type == "already_canceled": @@ -385,8 +387,6 @@ def specific_v2_api_error(self, rbody, rcode, resp, rheaders, error_data): return error.QuotaExceededError(**error_args) elif type == "recipient_not_notifiable": return error.RecipientNotNotifiableError(**error_args) - elif type == "feature_not_enabled": - return error.FeatureNotEnabledError(**error_args) elif type == "invalid_payout_method": return error.InvalidPayoutMethodError(**error_args) elif type == "controlled_by_dashboard": diff --git a/stripe/_error.py b/stripe/_error.py index beabc50b0..5e5e47c44 100644 --- a/stripe/_error.py +++ b/stripe/_error.py @@ -196,6 +196,10 @@ class FinancialAccountNotOpenError(StripeError): pass +class FeatureNotEnabledError(StripeError): + pass + + class BlockedByStripeError(StripeError): pass @@ -220,10 +224,6 @@ class RecipientNotNotifiableError(StripeError): pass -class FeatureNotEnabledError(StripeError): - pass - - class InvalidPayoutMethodError(StripeError): pass diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index 1cdfde8de..be7d38560 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -371,6 +371,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -767,6 +768,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -803,6 +805,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -839,6 +842,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -875,6 +879,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -911,6 +916,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -947,6 +953,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -983,6 +990,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1019,6 +1027,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1055,6 +1064,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1091,6 +1101,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1127,6 +1138,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1163,6 +1175,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1199,6 +1212,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1235,6 +1249,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1271,6 +1286,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1307,6 +1323,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1343,6 +1360,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1379,6 +1397,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1415,6 +1434,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1451,6 +1471,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1487,6 +1508,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1523,6 +1545,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1559,6 +1582,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1595,6 +1619,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1631,6 +1656,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1667,6 +1693,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1703,6 +1730,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1739,6 +1767,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1775,6 +1804,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1811,6 +1841,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1847,6 +1878,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1883,6 +1915,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1919,6 +1952,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1955,6 +1989,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -1991,6 +2026,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -2027,6 +2063,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -2063,6 +2100,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -2099,6 +2137,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -2135,6 +2174,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -2171,6 +2211,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -2208,6 +2249,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -2252,6 +2294,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -2288,6 +2331,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -2324,6 +2368,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -2360,6 +2405,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -3005,6 +3051,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -3043,6 +3090,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -3091,6 +3139,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -3128,6 +3177,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -3166,6 +3216,7 @@ class StatusDetail(StripeObject): "restricted_other", "unsupported_business", "unsupported_country", + "unsupported_entity_type", ] """ Machine-readable code explaining the reason for the Capability to be in its current status. @@ -4099,6 +4150,16 @@ class FrontBack(StripeObject): """ _inner_class_types = {"front_back": FrontBack} + class ProofOfAddress(StripeObject): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + class ProofOfRegistration(StripeObject): files: List[str] """ @@ -4153,6 +4214,10 @@ class ProofOfUltimateBeneficialOwnership(StripeObject): """ A document verifying the business. """ + proof_of_address: Optional[ProofOfAddress] + """ + One or more documents that demonstrate proof of address. + """ proof_of_registration: Optional[ProofOfRegistration] """ One or more documents showing the company's proof of registration with the national business registry. @@ -4171,6 +4236,7 @@ class ProofOfUltimateBeneficialOwnership(StripeObject): "company_registration_verification": CompanyRegistrationVerification, "company_tax_id_verification": CompanyTaxIdVerification, "primary_verification": PrimaryVerification, + "proof_of_address": ProofOfAddress, "proof_of_registration": ProofOfRegistration, "proof_of_ultimate_beneficial_ownership": ProofOfUltimateBeneficialOwnership, } diff --git a/stripe/v2/core/_account_service.py b/stripe/v2/core/_account_service.py index 07ca36cc8..840dc418e 100644 --- a/stripe/v2/core/_account_service.py +++ b/stripe/v2/core/_account_service.py @@ -2703,6 +2703,12 @@ class CreateParamsIdentityBusinessDetailsDocuments(TypedDict): """ A document verifying the business. """ + proof_of_address: NotRequired[ + "AccountService.CreateParamsIdentityBusinessDetailsDocumentsProofOfAddress" + ] + """ + One or more documents that demonstrate proof of address. + """ proof_of_registration: NotRequired[ "AccountService.CreateParamsIdentityBusinessDetailsDocumentsProofOfRegistration" ] @@ -2812,6 +2818,18 @@ class CreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack( A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ + class CreateParamsIdentityBusinessDetailsDocumentsProofOfAddress( + TypedDict + ): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + class CreateParamsIdentityBusinessDetailsDocumentsProofOfRegistration( TypedDict, ): @@ -8000,6 +8018,12 @@ class UpdateParamsIdentityBusinessDetailsDocuments(TypedDict): """ A document verifying the business. """ + proof_of_address: NotRequired[ + "AccountService.UpdateParamsIdentityBusinessDetailsDocumentsProofOfAddress" + ] + """ + One or more documents that demonstrate proof of address. + """ proof_of_registration: NotRequired[ Optional[ "AccountService.UpdateParamsIdentityBusinessDetailsDocumentsProofOfRegistration" @@ -8111,6 +8135,18 @@ class UpdateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack( A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ + class UpdateParamsIdentityBusinessDetailsDocumentsProofOfAddress( + TypedDict + ): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + class UpdateParamsIdentityBusinessDetailsDocumentsProofOfRegistration( TypedDict, ): diff --git a/stripe/v2/money_management/_financial_account.py b/stripe/v2/money_management/_financial_account.py index 53250d1e4..85e025453 100644 --- a/stripe/v2/money_management/_financial_account.py +++ b/stripe/v2/money_management/_financial_account.py @@ -22,7 +22,7 @@ class Balance(StripeObject): """ inbound_pending: Dict[str, Amount] """ - Balance of inbound funds that will later transition to the `cash` balance. + Balance of inbound funds that will later transition to the `available` balance. """ outbound_pending: Dict[str, Amount] """ @@ -35,13 +35,6 @@ class Other(StripeObject): The type of the FinancialAccount, represented as a string. Upgrade your API version to see the type reflected in `financial_account.type`. """ - class StatusDetails(StripeObject): - class Closed(StripeObject): - reason: Literal["account_closed", "closed_by_platform", "other"] - - closed: Optional[Closed] - _inner_class_types = {"closed": Closed} - class Storage(StripeObject): holds_currencies: List[ Literal[ @@ -515,7 +508,6 @@ class Storage(StripeObject): """ Closed Enum. An enum representing the status of the FinancialAccount. This indicates whether or not the FinancialAccount can be used for any money movement flows. """ - status_details: Optional[StatusDetails] storage: Optional[Storage] """ If this is a `storage` FinancialAccount, this hash includes details specific to `storage` FinancialAccounts. @@ -532,6 +524,5 @@ class Storage(StripeObject): _inner_class_types = { "balance": Balance, "other": Other, - "status_details": StatusDetails, "storage": Storage, } diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index fe2f3fc27..de5fe6108 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -34965,6 +34965,38 @@ def test_financial_account_not_open_error_service( is_json=True, ) + def test_feature_not_enabled_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/financial_addresses", + rbody='{"error":{"type":"feature_not_enabled","code":"storer_capability_missing"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.money_management.financial_addresses.create( + { + "currency": "stn", + "financial_account": "financial_account", + } + ) + except _error.FeatureNotEnabledError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/money_management/financial_addresses", + query_string="", + api_base="https://api.stripe.com", + post_data='{"currency":"stn","financial_account":"financial_account"}', + is_json=True, + ) + def test_blocked_by_stripe_error_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -35153,42 +35185,6 @@ def test_recipient_not_notifiable_error_service( is_json=True, ) - def test_feature_not_enabled_error_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "post", - "/v2/money_management/outbound_payments", - rbody='{"error":{"type":"feature_not_enabled","code":"recipient_feature_not_active"}}', - rcode=400, - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - try: - client.v2.money_management.outbound_payments.create( - { - "amount": {"currency": "USD", "value": 96}, - "from": { - "currency": "currency", - "financial_account": "financial_account", - }, - "to": {"recipient": "recipient"}, - } - ) - except _error.FeatureNotEnabledError: - pass - http_client_mock.assert_requested( - "post", - path="/v2/money_management/outbound_payments", - query_string="", - api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"currency","financial_account":"financial_account"},"to":{"recipient":"recipient"}}', - is_json=True, - ) - def test_invalid_payout_method_error_service( self, http_client_mock: HTTPClientMock ) -> None: From e3808c815642449e2115688eac0b278b7cca210e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 19:09:46 +0000 Subject: [PATCH 26/28] Update generated code for v1819 and 2025-06-30.preview --- stripe/_api_version.py | 1 - 1 file changed, 1 deletion(-) diff --git a/stripe/_api_version.py b/stripe/_api_version.py index 65066e624..95e5ccc8a 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -2,4 +2,3 @@ # File generated from our OpenAPI spec class _ApiVersion: CURRENT = "2025-06-30.preview" - CURRENT_MAJOR = "preview" From 8802d95b01db5d14bc434a03270c199ed7f821ca Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 13:28:05 +0000 Subject: [PATCH 27/28] Update generated code for v1819 and 2025-06-30.preview --- stripe/_account.py | 8 +- stripe/_apple_pay_domain.py | 8 +- stripe/_application.py | 8 +- stripe/_bank_account.py | 8 +- stripe/_card.py | 8 +- stripe/_coupon.py | 8 +- stripe/_customer.py | 8 +- stripe/_discount.py | 8 +- stripe/_invoice.py | 8 +- stripe/_invoice_item.py | 8 +- stripe/_person.py | 8 +- stripe/_plan.py | 8 +- stripe/_price.py | 8 +- stripe/_product.py | 8 +- stripe/_product_feature.py | 8 +- stripe/_subscription_item.py | 8 +- stripe/_tax_id.py | 8 +- stripe/_v2_services.py | 4 +- stripe/_webhook_endpoint.py | 8 +- stripe/radar/_value_list.py | 8 +- stripe/radar/_value_list_item.py | 8 +- stripe/terminal/_configuration.py | 8 +- stripe/terminal/_location.py | 8 +- stripe/terminal/_reader.py | 8 +- stripe/test_helpers/_test_clock.py | 8 +- stripe/v2/_billing_service.py | 2 +- stripe/v2/_core_service.py | 2 +- stripe/v2/_event.py | 16 +- stripe/v2/_event_destination.py | 44 +- .../_financial_address_credit_simulation.py | 8 +- ...nancial_address_generated_microdeposits.py | 8 +- stripe/v2/_money_management_service.py | 6 +- stripe/v2/billing/_meter_event.py | 8 +- stripe/v2/billing/_meter_event_adjustment.py | 8 +- stripe/v2/billing/_meter_event_session.py | 8 +- stripe/v2/core/_account.py | 8 +- stripe/v2/core/_account_link.py | 16 +- stripe/v2/core/_account_service.py | 88 +- stripe/v2/core/_event_destination_service.py | 196 ++-- stripe/v2/core/_person.py | 8 +- stripe/v2/core/accounts/_person_service.py | 80 +- stripe/v2/core/vault/_gb_bank_account.py | 8 +- .../v2/core/vault/_gb_bank_account_service.py | 128 +-- stripe/v2/core/vault/_us_bank_account.py | 8 +- .../v2/core/vault/_us_bank_account_service.py | 88 +- stripe/v2/money_management/_adjustment.py | 34 +- .../v2/money_management/_financial_account.py | 8 +- .../v2/money_management/_financial_address.py | 16 +- .../_financial_address_service.py | 48 +- .../v2/money_management/_inbound_transfer.py | 48 +- .../_inbound_transfer_service.py | 48 +- .../v2/money_management/_outbound_payment.py | 8 +- .../_outbound_payment_quote.py | 8 +- .../_outbound_payment_service.py | 84 +- .../_outbound_setup_intent.py | 16 +- .../_outbound_setup_intent_service.py | 96 +- .../v2/money_management/_outbound_transfer.py | 8 +- .../_outbound_transfer_service.py | 84 +- stripe/v2/money_management/_payout_method.py | 46 +- .../_payout_method_service.py | 88 +- .../_payout_methods_bank_account_spec.py | 8 +- .../v2/money_management/_received_credit.py | 134 +-- stripe/v2/money_management/_received_debit.py | 84 +- stripe/v2/money_management/_transaction.py | 32 +- .../v2/money_management/_transaction_entry.py | 32 +- .../payments/_off_session_payment_service.py | 84 +- tests/test_generated_examples.py | 892 +++++++++--------- 67 files changed, 1420 insertions(+), 1420 deletions(-) diff --git a/stripe/_account.py b/stripe/_account.py index 8fec42bd2..668faa2e8 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -4944,6 +4944,10 @@ class RetrievePersonParams(RequestOptions): """ Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ details_submitted: Optional[bool] """ Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](https://docs.stripe.com/connect/onboarding) to finish submitting account details. @@ -4996,10 +5000,6 @@ class RetrievePersonParams(RequestOptions): """ The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create(cls, **params: Unpack["Account.CreateParams"]) -> "Account": diff --git a/stripe/_apple_pay_domain.py b/stripe/_apple_pay_domain.py index e88f6a708..1961b46ea 100644 --- a/stripe/_apple_pay_domain.py +++ b/stripe/_apple_pay_domain.py @@ -56,6 +56,10 @@ class RetrieveParams(RequestOptions): """ Time at which the object was created. Measured in seconds since the Unix epoch. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ domain_name: str id: str """ @@ -69,10 +73,6 @@ class RetrieveParams(RequestOptions): """ String representing the object's type. Objects of the same type share the same value. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create( diff --git a/stripe/_application.py b/stripe/_application.py index 3b0e64add..dee1e54fd 100644 --- a/stripe/_application.py +++ b/stripe/_application.py @@ -7,6 +7,10 @@ class Application(StripeObject): OBJECT_NAME: ClassVar[Literal["application"]] = "application" + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ id: str """ Unique identifier for the object. @@ -19,7 +23,3 @@ class Application(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ diff --git a/stripe/_bank_account.py b/stripe/_bank_account.py index 82c0217a8..42821194d 100644 --- a/stripe/_bank_account.py +++ b/stripe/_bank_account.py @@ -335,6 +335,10 @@ class DeleteParams(RequestOptions): """ Whether this bank account is the default external account for its currency. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ fingerprint: Optional[str] """ Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. @@ -373,10 +377,6 @@ class DeleteParams(RequestOptions): For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def _cls_delete( diff --git a/stripe/_card.py b/stripe/_card.py index 356004925..727721118 100644 --- a/stripe/_card.py +++ b/stripe/_card.py @@ -105,6 +105,10 @@ class DeleteParams(RequestOptions): """ Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ description: Optional[str] """ A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) @@ -172,10 +176,6 @@ class DeleteParams(RequestOptions): """ If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def _cls_delete( diff --git a/stripe/_coupon.py b/stripe/_coupon.py index 1a037620c..4c300c04e 100644 --- a/stripe/_coupon.py +++ b/stripe/_coupon.py @@ -226,6 +226,10 @@ class RetrieveParams(RequestOptions): """ Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ duration: Literal["forever", "once", "repeating"] """ One of `forever`, `once`, or `repeating`. Describes how long a customer who applies this coupon will get the discount. @@ -282,10 +286,6 @@ class RetrieveParams(RequestOptions): """ Taking account of the above properties, whether this coupon can still be applied to a customer. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create(cls, **params: Unpack["Coupon.CreateParams"]) -> "Coupon": diff --git a/stripe/_customer.py b/stripe/_customer.py index 25ecb7b9f..a61d63fe0 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -1445,6 +1445,10 @@ class SearchParams(RequestOptions): If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ delinquent: Optional[bool] """ Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`. @@ -1533,10 +1537,6 @@ class SearchParams(RequestOptions): """ ID of the test clock that this customer belongs to. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create(cls, **params: Unpack["Customer.CreateParams"]) -> "Customer": diff --git a/stripe/_discount.py b/stripe/_discount.py index b5e21c77b..8ad599071 100644 --- a/stripe/_discount.py +++ b/stripe/_discount.py @@ -38,6 +38,10 @@ class Discount(StripeObject): """ The ID of the account associated with this discount. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ end: Optional[int] """ If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. @@ -74,7 +78,3 @@ class Discount(StripeObject): """ The subscription item that this coupon is applied to, if it is applied to a particular subscription item. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 356c62628..01610da88 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -5538,6 +5538,10 @@ class VoidInvoiceParams(RequestOptions): """ The tax rates applied to this invoice, if any. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ description: Optional[str] """ An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. @@ -5710,10 +5714,6 @@ class VoidInvoiceParams(RequestOptions): """ Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def _cls_add_lines( diff --git a/stripe/_invoice_item.py b/stripe/_invoice_item.py index bb6260a43..7a8a4491b 100644 --- a/stripe/_invoice_item.py +++ b/stripe/_invoice_item.py @@ -508,6 +508,10 @@ class RetrieveParams(RequestOptions): """ Time at which the object was created. Measured in seconds since the Unix epoch. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ description: Optional[str] """ An arbitrary string attached to the object. Often useful for displaying to users. @@ -569,10 +573,6 @@ class RetrieveParams(RequestOptions): """ ID of the test clock this invoice item belongs to. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create( diff --git a/stripe/_person.py b/stripe/_person.py index 94f6d3a18..488960df5 100644 --- a/stripe/_person.py +++ b/stripe/_person.py @@ -654,6 +654,10 @@ class Document(StripeObject): """ Time at which the object was created. Measured in seconds since the Unix epoch. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ dob: Optional[Dob] email: Optional[str] """ @@ -746,10 +750,6 @@ class Document(StripeObject): Demographic data related to the person. """ verification: Optional[Verification] - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ def instance_url(self): token = self.id diff --git a/stripe/_plan.py b/stripe/_plan.py index 113731060..6a66982df 100644 --- a/stripe/_plan.py +++ b/stripe/_plan.py @@ -315,6 +315,10 @@ class RetrieveParams(RequestOptions): """ 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). """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ id: str """ Unique identifier for the object. @@ -371,10 +375,6 @@ class RetrieveParams(RequestOptions): """ Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create(cls, **params: Unpack["Plan.CreateParams"]) -> "Plan": diff --git a/stripe/_price.py b/stripe/_price.py index 33573cc5e..862960f00 100644 --- a/stripe/_price.py +++ b/stripe/_price.py @@ -695,6 +695,10 @@ class SearchParams(RequestOptions): """ When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ id: str """ Unique identifier for the object. @@ -759,10 +763,6 @@ class SearchParams(RequestOptions): """ The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create(cls, **params: Unpack["Price.CreateParams"]) -> "Price": diff --git a/stripe/_product.py b/stripe/_product.py index 98bfb87b1..3ee2a67cd 100644 --- a/stripe/_product.py +++ b/stripe/_product.py @@ -542,6 +542,10 @@ class SearchParams(RequestOptions): """ The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ description: Optional[str] """ The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. @@ -606,10 +610,6 @@ class SearchParams(RequestOptions): """ A URL of a publicly-accessible webpage for this product. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create(cls, **params: Unpack["Product.CreateParams"]) -> "Product": diff --git a/stripe/_product_feature.py b/stripe/_product_feature.py index e17e01a41..322a8367e 100644 --- a/stripe/_product_feature.py +++ b/stripe/_product_feature.py @@ -15,6 +15,10 @@ class ProductFeature(StripeObject): """ OBJECT_NAME: ClassVar[Literal["product_feature"]] = "product_feature" + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ entitlement_feature: "Feature" """ A feature represents a monetizable ability or functionality in your system. @@ -32,7 +36,3 @@ class ProductFeature(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ diff --git a/stripe/_subscription_item.py b/stripe/_subscription_item.py index 641cd24a6..eccf80d50 100644 --- a/stripe/_subscription_item.py +++ b/stripe/_subscription_item.py @@ -454,6 +454,10 @@ class RetrieveParams(RequestOptions): """ The start time of this subscription item's current billing period. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ discounts: List[ExpandableField["Discount"]] """ The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. @@ -506,10 +510,6 @@ class RetrieveParams(RequestOptions): """ Options that configure the trial on the subscription item. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create( diff --git a/stripe/_tax_id.py b/stripe/_tax_id.py index f29852534..8d3657203 100644 --- a/stripe/_tax_id.py +++ b/stripe/_tax_id.py @@ -285,6 +285,10 @@ class RetrieveParams(RequestOptions): """ ID of the account. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ id: str """ Unique identifier for the object. @@ -425,10 +429,6 @@ class RetrieveParams(RequestOptions): """ Tax ID verification information. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create(cls, **params: Unpack["TaxId.CreateParams"]) -> "TaxId": diff --git a/stripe/_v2_services.py b/stripe/_v2_services.py index df809f2e4..84f320fd0 100644 --- a/stripe/_v2_services.py +++ b/stripe/_v2_services.py @@ -11,8 +11,8 @@ class V2Services(StripeService): def __init__(self, requestor): super().__init__(requestor) + self.billing = BillingService(self._requestor) self.core = CoreService(self._requestor) self.money_management = MoneyManagementService(self._requestor) - self.billing = BillingService(self._requestor) - self.test_helpers = TestHelperService(self._requestor) self.payments = PaymentService(self._requestor) + self.test_helpers = TestHelperService(self._requestor) diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py index bdab9546a..0af0db234 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -826,6 +826,10 @@ class RetrieveParams(RequestOptions): """ Time at which the object was created. Measured in seconds since the Unix epoch. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ description: Optional[str] """ An optional description of what the webhook is used for. @@ -862,10 +866,6 @@ class RetrieveParams(RequestOptions): """ The URL of the webhook endpoint. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create( diff --git a/stripe/radar/_value_list.py b/stripe/radar/_value_list.py index c4c41f808..5fd7a3b34 100644 --- a/stripe/radar/_value_list.py +++ b/stripe/radar/_value_list.py @@ -156,6 +156,10 @@ class RetrieveParams(RequestOptions): """ The name or email address of the user who created this value list. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ id: str """ Unique identifier for the object. @@ -195,10 +199,6 @@ class RetrieveParams(RequestOptions): """ String representing the object's type. Objects of the same type share the same value. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create(cls, **params: Unpack["ValueList.CreateParams"]) -> "ValueList": diff --git a/stripe/radar/_value_list_item.py b/stripe/radar/_value_list_item.py index 36c42a870..bac22806e 100644 --- a/stripe/radar/_value_list_item.py +++ b/stripe/radar/_value_list_item.py @@ -104,6 +104,10 @@ class RetrieveParams(RequestOptions): """ The name or email address of the user who added this item to the value list. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ id: str """ Unique identifier for the object. @@ -124,10 +128,6 @@ class RetrieveParams(RequestOptions): """ The identifier of the value list this item belongs to. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create( diff --git a/stripe/terminal/_configuration.py b/stripe/terminal/_configuration.py index f0162b715..058a261ce 100644 --- a/stripe/terminal/_configuration.py +++ b/stripe/terminal/_configuration.py @@ -1309,6 +1309,10 @@ class RetrieveParams(RequestOptions): """ bbpos_wisepos_e: Optional[BbposWiseposE] + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ id: str """ Unique identifier for the object. @@ -1335,10 +1339,6 @@ class RetrieveParams(RequestOptions): tipping: Optional[Tipping] verifone_p400: Optional[VerifoneP400] wifi: Optional[Wifi] - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create( diff --git a/stripe/terminal/_location.py b/stripe/terminal/_location.py index 1ce2eb031..f9c00783c 100644 --- a/stripe/terminal/_location.py +++ b/stripe/terminal/_location.py @@ -180,6 +180,10 @@ class RetrieveParams(RequestOptions): """ The ID of a configuration that will be used to customize all readers in this location. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ display_name: str """ The display name of the location. @@ -200,10 +204,6 @@ class RetrieveParams(RequestOptions): """ String representing the object's type. Objects of the same type share the same value. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def create(cls, **params: Unpack["Location.CreateParams"]) -> "Location": diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index 9edd44ba7..7eb29b404 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -969,6 +969,10 @@ class TimeoutInputCollectionParams(RequestOptions): """ The most recent action performed by the reader. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ device_sw_version: Optional[str] """ The current software version of the reader. @@ -1023,10 +1027,6 @@ class TimeoutInputCollectionParams(RequestOptions): """ The networking status of the reader. We do not recommend using this field in flows that may block taking payments. """ - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def _cls_cancel_action( diff --git a/stripe/test_helpers/_test_clock.py b/stripe/test_helpers/_test_clock.py index 0bee1d8f0..df06b4e03 100644 --- a/stripe/test_helpers/_test_clock.py +++ b/stripe/test_helpers/_test_clock.py @@ -91,6 +91,10 @@ class RetrieveParams(RequestOptions): """ Time at which the object was created. Measured in seconds since the Unix epoch. """ + deleted: Optional[Literal[True]] + """ + Always true for a deleted object + """ deletes_after: int """ Time at which this clock is scheduled to auto delete. @@ -120,10 +124,6 @@ class RetrieveParams(RequestOptions): The status of the Test Clock. """ status_details: StatusDetails - deleted: Optional[Literal[True]] - """ - Always true for a deleted object - """ @classmethod def _cls_advance( diff --git a/stripe/v2/_billing_service.py b/stripe/v2/_billing_service.py index 77d36d39a..3ba51acf7 100644 --- a/stripe/v2/_billing_service.py +++ b/stripe/v2/_billing_service.py @@ -16,9 +16,9 @@ class BillingService(StripeService): def __init__(self, requestor): super().__init__(requestor) - self.meter_event_session = MeterEventSessionService(self._requestor) self.meter_event_adjustments = MeterEventAdjustmentService( self._requestor, ) + self.meter_event_session = MeterEventSessionService(self._requestor) self.meter_event_stream = MeterEventStreamService(self._requestor) self.meter_events = MeterEventService(self._requestor) diff --git a/stripe/v2/_core_service.py b/stripe/v2/_core_service.py index cf234c48f..ea877a8a7 100644 --- a/stripe/v2/_core_service.py +++ b/stripe/v2/_core_service.py @@ -11,8 +11,8 @@ class CoreService(StripeService): def __init__(self, requestor): super().__init__(requestor) - self.accounts = AccountService(self._requestor) self.account_links = AccountLinkService(self._requestor) + self.accounts = AccountService(self._requestor) self.event_destinations = EventDestinationService(self._requestor) self.events = EventService(self._requestor) self.vault = VaultService(self._requestor) diff --git a/stripe/v2/_event.py b/stripe/v2/_event.py index bf45c2ed0..0e46a2b66 100644 --- a/stripe/v2/_event.py +++ b/stripe/v2/_event.py @@ -30,14 +30,14 @@ class Request(StripeObject): The idempotency key transmitted during the request. """ - type: Literal["request"] - """ - Event reason type. - """ request: Optional[Request] """ Information on the API request that instigated the event. """ + type: Literal["request"] + """ + Event reason type. + """ _inner_class_types = {"request": Request} context: Optional[str] @@ -52,6 +52,10 @@ class Request(StripeObject): """ Unique identifier for the event. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["v2.core.event"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -64,10 +68,6 @@ class Request(StripeObject): """ The type of the event. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = {"reason": Reason} diff --git a/stripe/v2/_event_destination.py b/stripe/v2/_event_destination.py index 82203a865..02d4ca172 100644 --- a/stripe/v2/_event_destination.py +++ b/stripe/v2/_event_destination.py @@ -14,19 +14,6 @@ class EventDestination(StripeObject): "v2.core.event_destination" ) - class StatusDetails(StripeObject): - class Disabled(StripeObject): - reason: Literal["no_aws_event_source_exists", "user"] - """ - Reason event destination has been disabled. - """ - - disabled: Optional[Disabled] - """ - Details about why the event destination has been disabled. - """ - _inner_class_types = {"disabled": Disabled} - class AmazonEventbridge(StripeObject): aws_account_id: str """ @@ -43,6 +30,19 @@ class AmazonEventbridge(StripeObject): The state of the AWS event source. """ + class StatusDetails(StripeObject): + class Disabled(StripeObject): + reason: Literal["no_aws_event_source_exists", "user"] + """ + Reason event destination has been disabled. + """ + + disabled: Optional[Disabled] + """ + Details about why the event destination has been disabled. + """ + _inner_class_types = {"disabled": Disabled} + class WebhookEndpoint(StripeObject): signing_secret: Optional[str] """ @@ -53,6 +53,10 @@ class WebhookEndpoint(StripeObject): The URL of the webhook endpoint, includable. """ + amazon_eventbridge: Optional[AmazonEventbridge] + """ + Amazon EventBridge configuration. + """ created: str """ Time at which the object was created. @@ -77,6 +81,10 @@ class WebhookEndpoint(StripeObject): """ 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. + """ metadata: Optional[Dict[str, str]] """ Metadata. @@ -109,20 +117,12 @@ class WebhookEndpoint(StripeObject): """ Time at which the object was last updated. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ - amazon_eventbridge: Optional[AmazonEventbridge] - """ - Amazon EventBridge configuration. - """ webhook_endpoint: Optional[WebhookEndpoint] """ Webhook endpoint configuration. """ _inner_class_types = { - "status_details": StatusDetails, "amazon_eventbridge": AmazonEventbridge, + "status_details": StatusDetails, "webhook_endpoint": WebhookEndpoint, } diff --git a/stripe/v2/_financial_address_credit_simulation.py b/stripe/v2/_financial_address_credit_simulation.py index 65ea5c674..be0a04dd7 100644 --- a/stripe/v2/_financial_address_credit_simulation.py +++ b/stripe/v2/_financial_address_credit_simulation.py @@ -9,6 +9,10 @@ class FinancialAddressCreditSimulation(StripeObject): OBJECT_NAME: ClassVar[Literal["financial_address_credit_simulation"]] = ( "financial_address_credit_simulation" ) + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["financial_address_credit_simulation"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -17,7 +21,3 @@ class FinancialAddressCreditSimulation(StripeObject): """ The status of the request, signifying whether a simulated credit was initiated. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ diff --git a/stripe/v2/_financial_address_generated_microdeposits.py b/stripe/v2/_financial_address_generated_microdeposits.py index 6780c4495..0f082a964 100644 --- a/stripe/v2/_financial_address_generated_microdeposits.py +++ b/stripe/v2/_financial_address_generated_microdeposits.py @@ -14,6 +14,10 @@ class FinancialAddressGeneratedMicrodeposits(StripeObject): """ The amounts of the microdeposits that were generated. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["financial_address_generated_microdeposits"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -22,7 +26,3 @@ class FinancialAddressGeneratedMicrodeposits(StripeObject): """ Closed Enum. The status of the request. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ diff --git a/stripe/v2/_money_management_service.py b/stripe/v2/_money_management_service.py index dab5aa203..645a23015 100644 --- a/stripe/v2/_money_management_service.py +++ b/stripe/v2/_money_management_service.py @@ -48,14 +48,14 @@ def __init__(self, requestor): self.financial_accounts = FinancialAccountService(self._requestor) self.financial_addresses = FinancialAddressService(self._requestor) self.inbound_transfers = InboundTransferService(self._requestor) - self.outbound_payments = OutboundPaymentService(self._requestor) self.outbound_payment_quotes = OutboundPaymentQuoteService( self._requestor, ) - self.outbound_transfers = OutboundTransferService(self._requestor) + self.outbound_payments = OutboundPaymentService(self._requestor) self.outbound_setup_intents = OutboundSetupIntentService( self._requestor, ) + self.outbound_transfers = OutboundTransferService(self._requestor) self.payout_methods = PayoutMethodService(self._requestor) self.payout_methods_bank_account_spec = ( PayoutMethodsBankAccountSpecService( @@ -64,5 +64,5 @@ def __init__(self, requestor): ) self.received_credits = ReceivedCreditService(self._requestor) self.received_debits = ReceivedDebitService(self._requestor) - self.transactions = TransactionService(self._requestor) self.transaction_entries = TransactionEntryService(self._requestor) + self.transactions = TransactionService(self._requestor) diff --git a/stripe/v2/billing/_meter_event.py b/stripe/v2/billing/_meter_event.py index 011fb1b81..9d5a304dd 100644 --- a/stripe/v2/billing/_meter_event.py +++ b/stripe/v2/billing/_meter_event.py @@ -25,6 +25,10 @@ class MeterEvent(StripeObject): """ A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour period. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["v2.billing.meter_event"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -40,7 +44,3 @@ class MeterEvent(StripeObject): The time of the event. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ diff --git a/stripe/v2/billing/_meter_event_adjustment.py b/stripe/v2/billing/_meter_event_adjustment.py index 980d9ab33..662e8b9bc 100644 --- a/stripe/v2/billing/_meter_event_adjustment.py +++ b/stripe/v2/billing/_meter_event_adjustment.py @@ -32,6 +32,10 @@ class Cancel(StripeObject): """ The unique id of this meter event adjustment. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["v2.billing.meter_event_adjustment"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -44,8 +48,4 @@ class Cancel(StripeObject): """ Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = {"cancel": Cancel} diff --git a/stripe/v2/billing/_meter_event_session.py b/stripe/v2/billing/_meter_event_session.py index e00933d4a..8a6d47538 100644 --- a/stripe/v2/billing/_meter_event_session.py +++ b/stripe/v2/billing/_meter_event_session.py @@ -26,11 +26,11 @@ class MeterEventSession(StripeObject): """ The unique id of this auth session. """ - object: Literal["v2.billing.meter_event_session"] - """ - String representing the object's type. Objects of the same type share the same value of the object field. - """ livemode: bool """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. """ + object: Literal["v2.billing.meter_event_session"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index be7d38560..6bd7e116e 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -7376,6 +7376,10 @@ class MinimumDeadline(StripeObject): """ Information about the company, individual, and business represented by the Account. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] """ Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. @@ -7388,10 +7392,6 @@ class MinimumDeadline(StripeObject): """ Information about the requirements for the Account, including what information needs to be collected, and by when. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = { "configuration": Configuration, "defaults": Defaults, diff --git a/stripe/v2/core/_account_link.py b/stripe/v2/core/_account_link.py index 020dd88f2..d3b2ec1b3 100644 --- a/stripe/v2/core/_account_link.py +++ b/stripe/v2/core/_account_link.py @@ -43,10 +43,6 @@ class AccountUpdate(StripeObject): The URL that the user will be redirected to upon completing the linked flow. """ - type: Literal["account_onboarding", "account_update"] - """ - Open Enum. The type of AccountLink the user is requesting. - """ account_onboarding: Optional[AccountOnboarding] """ Indicates that the AccountLink provided should onboard an account. @@ -55,6 +51,10 @@ class AccountUpdate(StripeObject): """ Indicates that the AccountLink provided should update a previously onboarded account. """ + type: Literal["account_onboarding", "account_update"] + """ + Open Enum. The type of AccountLink the user is requesting. + """ _inner_class_types = { "account_onboarding": AccountOnboarding, "account_update": AccountUpdate, @@ -72,6 +72,10 @@ class AccountUpdate(StripeObject): """ The timestamp at which this AccountLink will expire. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["v2.core.account_link"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -84,8 +88,4 @@ class AccountUpdate(StripeObject): """ The use case of AccountLink the user is requesting. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = {"use_case": UseCase} diff --git a/stripe/v2/core/_account_service.py b/stripe/v2/core/_account_service.py index 840dc418e..1714580c8 100644 --- a/stripe/v2/core/_account_service.py +++ b/stripe/v2/core/_account_service.py @@ -10635,40 +10635,38 @@ class UpdateParamsIdentityIndividualScriptNamesKanji(TypedDict): The person's last or family name. """ - def close( + def list( self, - id: str, - params: "AccountService.CloseParams" = {}, + params: "AccountService.ListParams" = {}, options: RequestOptions = {}, - ) -> Account: + ) -> ListObject[Account]: """ - Removes access to the Account and its associated resources. + Returns a list of Accounts. """ return cast( - Account, + ListObject[Account], self._request( - "post", - "/v2/core/accounts/{id}/close".format(id=sanitize_id(id)), + "get", + "/v2/core/accounts", base_address="api", params=params, options=options, ), ) - async def close_async( + async def list_async( self, - id: str, - params: "AccountService.CloseParams" = {}, + params: "AccountService.ListParams" = {}, options: RequestOptions = {}, - ) -> Account: + ) -> ListObject[Account]: """ - Removes access to the Account and its associated resources. + Returns a list of Accounts. """ return cast( - Account, + ListObject[Account], await self._request_async( - "post", - "/v2/core/accounts/{id}/close".format(id=sanitize_id(id)), + "get", + "/v2/core/accounts", base_address="api", params=params, options=options, @@ -10713,57 +10711,59 @@ async def create_async( ), ) - def list( + def retrieve( self, - params: "AccountService.ListParams" = {}, + id: str, + params: "AccountService.RetrieveParams" = {}, options: RequestOptions = {}, - ) -> ListObject[Account]: + ) -> Account: """ - Returns a list of Accounts. + Retrieves the details of an Account. """ return cast( - ListObject[Account], + Account, self._request( "get", - "/v2/core/accounts", + "/v2/core/accounts/{id}".format(id=sanitize_id(id)), base_address="api", params=params, options=options, ), ) - async def list_async( + async def retrieve_async( self, - params: "AccountService.ListParams" = {}, + id: str, + params: "AccountService.RetrieveParams" = {}, options: RequestOptions = {}, - ) -> ListObject[Account]: + ) -> Account: """ - Returns a list of Accounts. + Retrieves the details of an Account. """ return cast( - ListObject[Account], + Account, await self._request_async( "get", - "/v2/core/accounts", + "/v2/core/accounts/{id}".format(id=sanitize_id(id)), base_address="api", params=params, options=options, ), ) - def retrieve( + def update( self, id: str, - params: "AccountService.RetrieveParams" = {}, + params: "AccountService.UpdateParams" = {}, options: RequestOptions = {}, ) -> Account: """ - Retrieves the details of an Account. + Updates the details of an Account. """ return cast( Account, self._request( - "get", + "post", "/v2/core/accounts/{id}".format(id=sanitize_id(id)), base_address="api", params=params, @@ -10771,19 +10771,19 @@ def retrieve( ), ) - async def retrieve_async( + async def update_async( self, id: str, - params: "AccountService.RetrieveParams" = {}, + params: "AccountService.UpdateParams" = {}, options: RequestOptions = {}, ) -> Account: """ - Retrieves the details of an Account. + Updates the details of an Account. """ return cast( Account, await self._request_async( - "get", + "post", "/v2/core/accounts/{id}".format(id=sanitize_id(id)), base_address="api", params=params, @@ -10791,40 +10791,40 @@ async def retrieve_async( ), ) - def update( + def close( self, id: str, - params: "AccountService.UpdateParams" = {}, + params: "AccountService.CloseParams" = {}, options: RequestOptions = {}, ) -> Account: """ - Updates the details of an Account. + Removes access to the Account and its associated resources. """ return cast( Account, self._request( "post", - "/v2/core/accounts/{id}".format(id=sanitize_id(id)), + "/v2/core/accounts/{id}/close".format(id=sanitize_id(id)), base_address="api", params=params, options=options, ), ) - async def update_async( + async def close_async( self, id: str, - params: "AccountService.UpdateParams" = {}, + params: "AccountService.CloseParams" = {}, options: RequestOptions = {}, ) -> Account: """ - Updates the details of an Account. + Removes access to the Account and its associated resources. """ return cast( Account, await self._request_async( "post", - "/v2/core/accounts/{id}".format(id=sanitize_id(id)), + "/v2/core/accounts/{id}/close".format(id=sanitize_id(id)), base_address="api", params=params, options=options, diff --git a/stripe/v2/core/_event_destination_service.py b/stripe/v2/core/_event_destination_service.py index 0aa84c4ba..b8e78c65e 100644 --- a/stripe/v2/core/_event_destination_service.py +++ b/stripe/v2/core/_event_destination_service.py @@ -145,6 +145,44 @@ class UpdateParamsWebhookEndpoint(TypedDict): The URL of the webhook endpoint. """ + def list( + self, + params: "EventDestinationService.ListParams" = {}, + options: RequestOptions = {}, + ) -> ListObject[EventDestination]: + """ + Lists all event destinations. + """ + return cast( + ListObject[EventDestination], + self._request( + "get", + "/v2/core/event_destinations", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: "EventDestinationService.ListParams" = {}, + options: RequestOptions = {}, + ) -> ListObject[EventDestination]: + """ + Lists all event destinations. + """ + return cast( + ListObject[EventDestination], + await self._request_async( + "get", + "/v2/core/event_destinations", + base_address="api", + params=params, + options=options, + ), + ) + def create( self, params: "EventDestinationService.CreateParams", @@ -223,146 +261,100 @@ async def delete_async( ), ) - def disable( + def retrieve( self, id: str, - params: "EventDestinationService.DisableParams" = {}, + params: "EventDestinationService.RetrieveParams" = {}, options: RequestOptions = {}, ) -> EventDestination: """ - Disable an event destination. + Retrieves the details of an event destination. """ return cast( EventDestination, self._request( - "post", - "/v2/core/event_destinations/{id}/disable".format( - id=sanitize_id(id), - ), + "get", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), base_address="api", params=params, options=options, ), ) - async def disable_async( + async def retrieve_async( self, id: str, - params: "EventDestinationService.DisableParams" = {}, + params: "EventDestinationService.RetrieveParams" = {}, options: RequestOptions = {}, ) -> EventDestination: """ - Disable an event destination. + Retrieves the details of an event destination. """ return cast( EventDestination, await self._request_async( - "post", - "/v2/core/event_destinations/{id}/disable".format( - id=sanitize_id(id), - ), + "get", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), base_address="api", params=params, options=options, ), ) - def enable( + def update( self, id: str, - params: "EventDestinationService.EnableParams" = {}, + params: "EventDestinationService.UpdateParams" = {}, options: RequestOptions = {}, ) -> EventDestination: """ - Enable an event destination. + Update the details of an event destination. """ return cast( EventDestination, self._request( "post", - "/v2/core/event_destinations/{id}/enable".format( - id=sanitize_id(id), - ), + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), base_address="api", params=params, options=options, ), ) - async def enable_async( + async def update_async( self, id: str, - params: "EventDestinationService.EnableParams" = {}, + params: "EventDestinationService.UpdateParams" = {}, options: RequestOptions = {}, ) -> EventDestination: """ - Enable an event destination. + Update the details of an event destination. """ return cast( EventDestination, await self._request_async( "post", - "/v2/core/event_destinations/{id}/enable".format( - id=sanitize_id(id), - ), - base_address="api", - params=params, - options=options, - ), - ) - - def list( - self, - params: "EventDestinationService.ListParams" = {}, - options: RequestOptions = {}, - ) -> ListObject[EventDestination]: - """ - Lists all event destinations. - """ - return cast( - ListObject[EventDestination], - self._request( - "get", - "/v2/core/event_destinations", - base_address="api", - params=params, - options=options, - ), - ) - - async def list_async( - self, - params: "EventDestinationService.ListParams" = {}, - options: RequestOptions = {}, - ) -> ListObject[EventDestination]: - """ - Lists all event destinations. - """ - return cast( - ListObject[EventDestination], - await self._request_async( - "get", - "/v2/core/event_destinations", + "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), base_address="api", params=params, options=options, ), ) - def ping( + def disable( self, id: str, - params: "EventDestinationService.PingParams" = {}, + params: "EventDestinationService.DisableParams" = {}, options: RequestOptions = {}, - ) -> Event: + ) -> EventDestination: """ - Send a `ping` event to an event destination. + Disable an event destination. """ return cast( - Event, + EventDestination, self._request( "post", - "/v2/core/event_destinations/{id}/ping".format( + "/v2/core/event_destinations/{id}/disable".format( id=sanitize_id(id), ), base_address="api", @@ -371,20 +363,20 @@ def ping( ), ) - async def ping_async( + async def disable_async( self, id: str, - params: "EventDestinationService.PingParams" = {}, + params: "EventDestinationService.DisableParams" = {}, options: RequestOptions = {}, - ) -> Event: + ) -> EventDestination: """ - Send a `ping` event to an event destination. + Disable an event destination. """ return cast( - Event, + EventDestination, await self._request_async( "post", - "/v2/core/event_destinations/{id}/ping".format( + "/v2/core/event_destinations/{id}/disable".format( id=sanitize_id(id), ), base_address="api", @@ -393,80 +385,88 @@ async def ping_async( ), ) - def retrieve( + def enable( self, id: str, - params: "EventDestinationService.RetrieveParams" = {}, + params: "EventDestinationService.EnableParams" = {}, options: RequestOptions = {}, ) -> EventDestination: """ - Retrieves the details of an event destination. + Enable an event destination. """ return cast( EventDestination, self._request( - "get", - "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + "post", + "/v2/core/event_destinations/{id}/enable".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - async def retrieve_async( + async def enable_async( self, id: str, - params: "EventDestinationService.RetrieveParams" = {}, + params: "EventDestinationService.EnableParams" = {}, options: RequestOptions = {}, ) -> EventDestination: """ - Retrieves the details of an event destination. + Enable an event destination. """ return cast( EventDestination, await self._request_async( - "get", - "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + "post", + "/v2/core/event_destinations/{id}/enable".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - def update( + def ping( self, id: str, - params: "EventDestinationService.UpdateParams" = {}, + params: "EventDestinationService.PingParams" = {}, options: RequestOptions = {}, - ) -> EventDestination: + ) -> Event: """ - Update the details of an event destination. + Send a `ping` event to an event destination. """ return cast( - EventDestination, + Event, self._request( "post", - "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + "/v2/core/event_destinations/{id}/ping".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - async def update_async( + async def ping_async( self, id: str, - params: "EventDestinationService.UpdateParams" = {}, + params: "EventDestinationService.PingParams" = {}, options: RequestOptions = {}, - ) -> EventDestination: + ) -> Event: """ - Update the details of an event destination. + Send a `ping` event to an event destination. """ return cast( - EventDestination, + Event, await self._request_async( "post", - "/v2/core/event_destinations/{id}".format(id=sanitize_id(id)), + "/v2/core/event_destinations/{id}/ping".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, diff --git a/stripe/v2/core/_person.py b/stripe/v2/core/_person.py index b6e1675b0..78ad9e5f2 100644 --- a/stripe/v2/core/_person.py +++ b/stripe/v2/core/_person.py @@ -1458,6 +1458,10 @@ class Kanji(StripeObject): """ The person's gender (International regulations require either "male" or "female"). """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] """ Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. @@ -1754,10 +1758,6 @@ class Kanji(StripeObject): """ Time at which the object was last updated. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = { "additional_addresses": AdditionalAddress, "additional_names": AdditionalName, diff --git a/stripe/v2/core/accounts/_person_service.py b/stripe/v2/core/accounts/_person_service.py index 205c8e472..06ddc4dfa 100644 --- a/stripe/v2/core/accounts/_person_service.py +++ b/stripe/v2/core/accounts/_person_service.py @@ -3502,19 +3502,19 @@ class UpdateParamsScriptNamesKanji(TypedDict): The person's last or family name. """ - def create( + def list( self, account_id: str, - params: "PersonService.CreateParams" = {}, + params: "PersonService.ListParams" = {}, options: RequestOptions = {}, - ) -> Person: + ) -> ListObject[Person]: """ - Create a Person associated with an Account. + Returns a list of Persons associated with an Account. """ return cast( - Person, + ListObject[Person], self._request( - "post", + "get", "/v2/core/accounts/{account_id}/persons".format( account_id=sanitize_id(account_id), ), @@ -3524,19 +3524,19 @@ def create( ), ) - async def create_async( + async def list_async( self, account_id: str, - params: "PersonService.CreateParams" = {}, + params: "PersonService.ListParams" = {}, options: RequestOptions = {}, - ) -> Person: + ) -> ListObject[Person]: """ - Create a Person associated with an Account. + Returns a list of Persons associated with an Account. """ return cast( - Person, + ListObject[Person], await self._request_async( - "post", + "get", "/v2/core/accounts/{account_id}/persons".format( account_id=sanitize_id(account_id), ), @@ -3546,23 +3546,21 @@ async def create_async( ), ) - def delete( + def create( self, account_id: str, - id: str, - params: "PersonService.DeleteParams" = {}, + params: "PersonService.CreateParams" = {}, options: RequestOptions = {}, ) -> Person: """ - Delete a Person associated with an Account. + Create a Person associated with an Account. """ return cast( Person, self._request( - "delete", - "/v2/core/accounts/{account_id}/persons/{id}".format( + "post", + "/v2/core/accounts/{account_id}/persons".format( account_id=sanitize_id(account_id), - id=sanitize_id(id), ), base_address="api", params=params, @@ -3570,23 +3568,21 @@ def delete( ), ) - async def delete_async( + async def create_async( self, account_id: str, - id: str, - params: "PersonService.DeleteParams" = {}, + params: "PersonService.CreateParams" = {}, options: RequestOptions = {}, ) -> Person: """ - Delete a Person associated with an Account. + Create a Person associated with an Account. """ return cast( Person, await self._request_async( - "delete", - "/v2/core/accounts/{account_id}/persons/{id}".format( + "post", + "/v2/core/accounts/{account_id}/persons".format( account_id=sanitize_id(account_id), - id=sanitize_id(id), ), base_address="api", params=params, @@ -3594,21 +3590,23 @@ async def delete_async( ), ) - def list( + def delete( self, account_id: str, - params: "PersonService.ListParams" = {}, + id: str, + params: "PersonService.DeleteParams" = {}, options: RequestOptions = {}, - ) -> ListObject[Person]: + ) -> Person: """ - Returns a list of Persons associated with an Account. + Delete a Person associated with an Account. """ return cast( - ListObject[Person], + Person, self._request( - "get", - "/v2/core/accounts/{account_id}/persons".format( + "delete", + "/v2/core/accounts/{account_id}/persons/{id}".format( account_id=sanitize_id(account_id), + id=sanitize_id(id), ), base_address="api", params=params, @@ -3616,21 +3614,23 @@ def list( ), ) - async def list_async( + async def delete_async( self, account_id: str, - params: "PersonService.ListParams" = {}, + id: str, + params: "PersonService.DeleteParams" = {}, options: RequestOptions = {}, - ) -> ListObject[Person]: + ) -> Person: """ - Returns a list of Persons associated with an Account. + Delete a Person associated with an Account. """ return cast( - ListObject[Person], + Person, await self._request_async( - "get", - "/v2/core/accounts/{account_id}/persons".format( + "delete", + "/v2/core/accounts/{account_id}/persons/{id}".format( account_id=sanitize_id(account_id), + id=sanitize_id(id), ), base_address="api", params=params, diff --git a/stripe/v2/core/vault/_gb_bank_account.py b/stripe/v2/core/vault/_gb_bank_account.py index 7cf9c147e..5a6c4a81b 100644 --- a/stripe/v2/core/vault/_gb_bank_account.py +++ b/stripe/v2/core/vault/_gb_bank_account.py @@ -102,6 +102,10 @@ class Provided(StripeObject): """ The last 4 digits of the account number or IBAN. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["v2.core.vault.gb_bank_account"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -110,8 +114,4 @@ class Provided(StripeObject): """ The Sort Code of the bank account. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = {"confirmation_of_payee": ConfirmationOfPayee} diff --git a/stripe/v2/core/vault/_gb_bank_account_service.py b/stripe/v2/core/vault/_gb_bank_account_service.py index 2203da0ff..a169d820f 100644 --- a/stripe/v2/core/vault/_gb_bank_account_service.py +++ b/stripe/v2/core/vault/_gb_bank_account_service.py @@ -65,71 +65,58 @@ class InitiateConfirmationOfPayeeParams(TypedDict): class RetrieveParams(TypedDict): pass - def acknowledge_confirmation_of_payee( + def create( self, - id: str, - params: "GbBankAccountService.AcknowledgeConfirmationOfPayeeParams" = {}, + params: "GbBankAccountService.CreateParams", options: RequestOptions = {}, ) -> GbBankAccount: """ - Confirm that you have received the result of the Confirmation of Payee request, and that you are okay with - proceeding to pay out to this bank account despite the account not matching, partially matching, or the service - being unavailable. Once you confirm this, you will be able to send OutboundPayments, but this may lead to - funds being sent to the wrong account, which we might not be able to recover. + Create a GB bank account. """ return cast( GbBankAccount, self._request( "post", - "/v2/core/vault/gb_bank_accounts/{id}/acknowledge_confirmation_of_payee".format( - id=sanitize_id(id), - ), + "/v2/core/vault/gb_bank_accounts", base_address="api", params=params, options=options, ), ) - async def acknowledge_confirmation_of_payee_async( + async def create_async( self, - id: str, - params: "GbBankAccountService.AcknowledgeConfirmationOfPayeeParams" = {}, + params: "GbBankAccountService.CreateParams", options: RequestOptions = {}, ) -> GbBankAccount: """ - Confirm that you have received the result of the Confirmation of Payee request, and that you are okay with - proceeding to pay out to this bank account despite the account not matching, partially matching, or the service - being unavailable. Once you confirm this, you will be able to send OutboundPayments, but this may lead to - funds being sent to the wrong account, which we might not be able to recover. + Create a GB bank account. """ return cast( GbBankAccount, await self._request_async( "post", - "/v2/core/vault/gb_bank_accounts/{id}/acknowledge_confirmation_of_payee".format( - id=sanitize_id(id), - ), + "/v2/core/vault/gb_bank_accounts", base_address="api", params=params, options=options, ), ) - def archive( + def retrieve( self, id: str, - params: "GbBankAccountService.ArchiveParams" = {}, + params: "GbBankAccountService.RetrieveParams" = {}, options: RequestOptions = {}, ) -> GbBankAccount: """ - Archive a GBBankAccount object. Archived GBBankAccount objects cannot be used as outbound destinations - and will not appear in the outbound destination list. + Retrieve a GB bank account. """ return cast( GbBankAccount, self._request( - "post", - "/v2/core/vault/gb_bank_accounts/{id}/archive".format( + "get", + "/v2/core/vault/gb_bank_accounts/{id}".format( id=sanitize_id(id), ), base_address="api", @@ -138,21 +125,20 @@ def archive( ), ) - async def archive_async( + async def retrieve_async( self, id: str, - params: "GbBankAccountService.ArchiveParams" = {}, + params: "GbBankAccountService.RetrieveParams" = {}, options: RequestOptions = {}, ) -> GbBankAccount: """ - Archive a GBBankAccount object. Archived GBBankAccount objects cannot be used as outbound destinations - and will not appear in the outbound destination list. + Retrieve a GB bank account. """ return cast( GbBankAccount, await self._request_async( - "post", - "/v2/core/vault/gb_bank_accounts/{id}/archive".format( + "get", + "/v2/core/vault/gb_bank_accounts/{id}".format( id=sanitize_id(id), ), base_address="api", @@ -161,61 +147,71 @@ async def archive_async( ), ) - def create( + def acknowledge_confirmation_of_payee( self, - params: "GbBankAccountService.CreateParams", + id: str, + params: "GbBankAccountService.AcknowledgeConfirmationOfPayeeParams" = {}, options: RequestOptions = {}, ) -> GbBankAccount: """ - Create a GB bank account. + Confirm that you have received the result of the Confirmation of Payee request, and that you are okay with + proceeding to pay out to this bank account despite the account not matching, partially matching, or the service + being unavailable. Once you confirm this, you will be able to send OutboundPayments, but this may lead to + funds being sent to the wrong account, which we might not be able to recover. """ return cast( GbBankAccount, self._request( "post", - "/v2/core/vault/gb_bank_accounts", + "/v2/core/vault/gb_bank_accounts/{id}/acknowledge_confirmation_of_payee".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - async def create_async( + async def acknowledge_confirmation_of_payee_async( self, - params: "GbBankAccountService.CreateParams", + id: str, + params: "GbBankAccountService.AcknowledgeConfirmationOfPayeeParams" = {}, options: RequestOptions = {}, ) -> GbBankAccount: """ - Create a GB bank account. + Confirm that you have received the result of the Confirmation of Payee request, and that you are okay with + proceeding to pay out to this bank account despite the account not matching, partially matching, or the service + being unavailable. Once you confirm this, you will be able to send OutboundPayments, but this may lead to + funds being sent to the wrong account, which we might not be able to recover. """ return cast( GbBankAccount, await self._request_async( "post", - "/v2/core/vault/gb_bank_accounts", + "/v2/core/vault/gb_bank_accounts/{id}/acknowledge_confirmation_of_payee".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - def initiate_confirmation_of_payee( + def archive( self, id: str, - params: "GbBankAccountService.InitiateConfirmationOfPayeeParams" = {}, + params: "GbBankAccountService.ArchiveParams" = {}, options: RequestOptions = {}, ) -> GbBankAccount: """ - Initiate Confirmation of Payee (CoP) in order to verify that the owner of a UK bank account matches - who you expect. This must be done on all UK bank accounts before sending domestic OutboundPayments. If - the result is a partial match or a non match, explicit acknowledgement using AcknowledgeConfirmationOfPayee - is required before sending funds. + Archive a GBBankAccount object. Archived GBBankAccount objects cannot be used as outbound destinations + and will not appear in the outbound destination list. """ return cast( GbBankAccount, self._request( "post", - "/v2/core/vault/gb_bank_accounts/{id}/initiate_confirmation_of_payee".format( + "/v2/core/vault/gb_bank_accounts/{id}/archive".format( id=sanitize_id(id), ), base_address="api", @@ -224,23 +220,21 @@ def initiate_confirmation_of_payee( ), ) - async def initiate_confirmation_of_payee_async( + async def archive_async( self, id: str, - params: "GbBankAccountService.InitiateConfirmationOfPayeeParams" = {}, + params: "GbBankAccountService.ArchiveParams" = {}, options: RequestOptions = {}, ) -> GbBankAccount: """ - Initiate Confirmation of Payee (CoP) in order to verify that the owner of a UK bank account matches - who you expect. This must be done on all UK bank accounts before sending domestic OutboundPayments. If - the result is a partial match or a non match, explicit acknowledgement using AcknowledgeConfirmationOfPayee - is required before sending funds. + Archive a GBBankAccount object. Archived GBBankAccount objects cannot be used as outbound destinations + and will not appear in the outbound destination list. """ return cast( GbBankAccount, await self._request_async( "post", - "/v2/core/vault/gb_bank_accounts/{id}/initiate_confirmation_of_payee".format( + "/v2/core/vault/gb_bank_accounts/{id}/archive".format( id=sanitize_id(id), ), base_address="api", @@ -249,20 +243,23 @@ async def initiate_confirmation_of_payee_async( ), ) - def retrieve( + def initiate_confirmation_of_payee( self, id: str, - params: "GbBankAccountService.RetrieveParams" = {}, + params: "GbBankAccountService.InitiateConfirmationOfPayeeParams" = {}, options: RequestOptions = {}, ) -> GbBankAccount: """ - Retrieve a GB bank account. + Initiate Confirmation of Payee (CoP) in order to verify that the owner of a UK bank account matches + who you expect. This must be done on all UK bank accounts before sending domestic OutboundPayments. If + the result is a partial match or a non match, explicit acknowledgement using AcknowledgeConfirmationOfPayee + is required before sending funds. """ return cast( GbBankAccount, self._request( - "get", - "/v2/core/vault/gb_bank_accounts/{id}".format( + "post", + "/v2/core/vault/gb_bank_accounts/{id}/initiate_confirmation_of_payee".format( id=sanitize_id(id), ), base_address="api", @@ -271,20 +268,23 @@ def retrieve( ), ) - async def retrieve_async( + async def initiate_confirmation_of_payee_async( self, id: str, - params: "GbBankAccountService.RetrieveParams" = {}, + params: "GbBankAccountService.InitiateConfirmationOfPayeeParams" = {}, options: RequestOptions = {}, ) -> GbBankAccount: """ - Retrieve a GB bank account. + Initiate Confirmation of Payee (CoP) in order to verify that the owner of a UK bank account matches + who you expect. This must be done on all UK bank accounts before sending domestic OutboundPayments. If + the result is a partial match or a non match, explicit acknowledgement using AcknowledgeConfirmationOfPayee + is required before sending funds. """ return cast( GbBankAccount, await self._request_async( - "get", - "/v2/core/vault/gb_bank_accounts/{id}".format( + "post", + "/v2/core/vault/gb_bank_accounts/{id}/initiate_confirmation_of_payee".format( id=sanitize_id(id), ), base_address="api", diff --git a/stripe/v2/core/vault/_us_bank_account.py b/stripe/v2/core/vault/_us_bank_account.py index bd92361f4..a35d95100 100644 --- a/stripe/v2/core/vault/_us_bank_account.py +++ b/stripe/v2/core/vault/_us_bank_account.py @@ -41,6 +41,10 @@ class UsBankAccount(StripeObject): """ The last 4 digits of the account number. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["v2.core.vault.us_bank_account"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -49,7 +53,3 @@ class UsBankAccount(StripeObject): """ The ACH routing number of the bank account. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ diff --git a/stripe/v2/core/vault/_us_bank_account_service.py b/stripe/v2/core/vault/_us_bank_account_service.py index e2848141e..a4402ab71 100644 --- a/stripe/v2/core/vault/_us_bank_account_service.py +++ b/stripe/v2/core/vault/_us_bank_account_service.py @@ -43,105 +43,101 @@ class UpdateParams(TypedDict): The bank account's ACH routing number can be provided for update if it was empty previously. """ - def archive( + def create( self, - id: str, - params: "UsBankAccountService.ArchiveParams" = {}, + params: "UsBankAccountService.CreateParams", options: RequestOptions = {}, ) -> UsBankAccount: """ - Archive a USBankAccount object. USBankAccount objects will not be automatically archived by Stripe. - Archived USBankAccount objects cannot be used as outbound destinations - and will not appear in the outbound destination list. + Create a USBankAccount object. """ return cast( UsBankAccount, self._request( "post", - "/v2/core/vault/us_bank_accounts/{id}/archive".format( - id=sanitize_id(id), - ), + "/v2/core/vault/us_bank_accounts", base_address="api", params=params, options=options, ), ) - async def archive_async( + async def create_async( self, - id: str, - params: "UsBankAccountService.ArchiveParams" = {}, + params: "UsBankAccountService.CreateParams", options: RequestOptions = {}, ) -> UsBankAccount: """ - Archive a USBankAccount object. USBankAccount objects will not be automatically archived by Stripe. - Archived USBankAccount objects cannot be used as outbound destinations - and will not appear in the outbound destination list. + Create a USBankAccount object. """ return cast( UsBankAccount, await self._request_async( "post", - "/v2/core/vault/us_bank_accounts/{id}/archive".format( - id=sanitize_id(id), - ), + "/v2/core/vault/us_bank_accounts", base_address="api", params=params, options=options, ), ) - def create( + def retrieve( self, - params: "UsBankAccountService.CreateParams", + id: str, + params: "UsBankAccountService.RetrieveParams" = {}, options: RequestOptions = {}, ) -> UsBankAccount: """ - Create a USBankAccount object. + Retrieve a USBankAccount object. """ return cast( UsBankAccount, self._request( - "post", - "/v2/core/vault/us_bank_accounts", + "get", + "/v2/core/vault/us_bank_accounts/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - async def create_async( + async def retrieve_async( self, - params: "UsBankAccountService.CreateParams", + id: str, + params: "UsBankAccountService.RetrieveParams" = {}, options: RequestOptions = {}, ) -> UsBankAccount: """ - Create a USBankAccount object. + Retrieve a USBankAccount object. """ return cast( UsBankAccount, await self._request_async( - "post", - "/v2/core/vault/us_bank_accounts", + "get", + "/v2/core/vault/us_bank_accounts/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - def retrieve( + def update( self, id: str, - params: "UsBankAccountService.RetrieveParams" = {}, + params: "UsBankAccountService.UpdateParams" = {}, options: RequestOptions = {}, ) -> UsBankAccount: """ - Retrieve a USBankAccount object. + Update a USBankAccount object. This is limited to supplying a previously empty routing_number field. """ return cast( UsBankAccount, self._request( - "get", + "post", "/v2/core/vault/us_bank_accounts/{id}".format( id=sanitize_id(id), ), @@ -151,19 +147,19 @@ def retrieve( ), ) - async def retrieve_async( + async def update_async( self, id: str, - params: "UsBankAccountService.RetrieveParams" = {}, + params: "UsBankAccountService.UpdateParams" = {}, options: RequestOptions = {}, ) -> UsBankAccount: """ - Retrieve a USBankAccount object. + Update a USBankAccount object. This is limited to supplying a previously empty routing_number field. """ return cast( UsBankAccount, await self._request_async( - "get", + "post", "/v2/core/vault/us_bank_accounts/{id}".format( id=sanitize_id(id), ), @@ -173,20 +169,22 @@ async def retrieve_async( ), ) - def update( + def archive( self, id: str, - params: "UsBankAccountService.UpdateParams" = {}, + params: "UsBankAccountService.ArchiveParams" = {}, options: RequestOptions = {}, ) -> UsBankAccount: """ - Update a USBankAccount object. This is limited to supplying a previously empty routing_number field. + Archive a USBankAccount object. USBankAccount objects will not be automatically archived by Stripe. + Archived USBankAccount objects cannot be used as outbound destinations + and will not appear in the outbound destination list. """ return cast( UsBankAccount, self._request( "post", - "/v2/core/vault/us_bank_accounts/{id}".format( + "/v2/core/vault/us_bank_accounts/{id}/archive".format( id=sanitize_id(id), ), base_address="api", @@ -195,20 +193,22 @@ def update( ), ) - async def update_async( + async def archive_async( self, id: str, - params: "UsBankAccountService.UpdateParams" = {}, + params: "UsBankAccountService.ArchiveParams" = {}, options: RequestOptions = {}, ) -> UsBankAccount: """ - Update a USBankAccount object. This is limited to supplying a previously empty routing_number field. + Archive a USBankAccount object. USBankAccount objects will not be automatically archived by Stripe. + Archived USBankAccount objects cannot be used as outbound destinations + and will not appear in the outbound destination list. """ return cast( UsBankAccount, await self._request_async( "post", - "/v2/core/vault/us_bank_accounts/{id}".format( + "/v2/core/vault/us_bank_accounts/{id}/archive".format( id=sanitize_id(id), ), base_address="api", diff --git a/stripe/v2/money_management/_adjustment.py b/stripe/v2/money_management/_adjustment.py index 0cc7c72fe..6006e2db5 100644 --- a/stripe/v2/money_management/_adjustment.py +++ b/stripe/v2/money_management/_adjustment.py @@ -16,19 +16,6 @@ class Adjustment(StripeObject): ) class AdjustedFlow(StripeObject): - type: Literal[ - "adjustment", - "balance_exchange", - "inbound_payment", - "inbound_transfer", - "outbound_payment", - "outbound_transfer", - "received_credit", - "received_debit", - ] - """ - Closed Enum. If applicable, the type of flow linked to this Adjustment. The field matching this value will contain the ID of the flow. - """ adjustment: Optional[str] """ If applicable, the ID of the Adjustment linked to this Adjustment. @@ -53,6 +40,19 @@ class AdjustedFlow(StripeObject): """ If applicable, the ID of the ReceivedDebit linked to this Adjustment. """ + type: Literal[ + "adjustment", + "balance_exchange", + "inbound_payment", + "inbound_transfer", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit", + ] + """ + Closed Enum. If applicable, the type of flow linked to this Adjustment. The field matching this value will contain the ID of the flow. + """ adjusted_flow: Optional[AdjustedFlow] """ @@ -78,6 +78,10 @@ class AdjustedFlow(StripeObject): """ 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. + """ object: Literal["v2.money_management.adjustment"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -86,8 +90,4 @@ class AdjustedFlow(StripeObject): """ A link to the Stripe-hosted receipt that is provided when money movement is considered regulated under Stripe's money transmission licenses. The receipt link remains active for 60 days from the Adjustment creation date. After this period, the link will expire and the receipt url value will be null. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = {"adjusted_flow": AdjustedFlow} diff --git a/stripe/v2/money_management/_financial_account.py b/stripe/v2/money_management/_financial_account.py index 85e025453..ed14d34e4 100644 --- a/stripe/v2/money_management/_financial_account.py +++ b/stripe/v2/money_management/_financial_account.py @@ -492,6 +492,10 @@ class Storage(StripeObject): """ 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. + """ metadata: Optional[Dict[str, str]] """ Metadata associated with the FinancialAccount @@ -517,10 +521,6 @@ class Storage(StripeObject): Type of the FinancialAccount. An additional hash is included on the FinancialAccount with a name matching this value. It contains additional information specific to the FinancialAccount type. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = { "balance": Balance, "other": Other, diff --git a/stripe/v2/money_management/_financial_address.py b/stripe/v2/money_management/_financial_address.py index 420d945dc..fadba9757 100644 --- a/stripe/v2/money_management/_financial_address.py +++ b/stripe/v2/money_management/_financial_address.py @@ -57,14 +57,14 @@ class UsBankAccount(StripeObject): The swift code of the bank or financial institution. """ - type: Literal["gb_bank_account", "us_bank_account"] - """ - Open Enum. The type of Credentials that are provisioned for the FinancialAddress. - """ gb_bank_account: Optional[GbBankAccount] """ The credentials of the UK Bank Account for the FinancialAddress. This contains unique banking details such as the sort code, account number, etc. of a UK bank account. """ + type: Literal["gb_bank_account", "us_bank_account"] + """ + Open Enum. The type of Credentials that are provisioned for the FinancialAddress. + """ us_bank_account: Optional[UsBankAccount] """ The credentials of the US Bank Account for the FinancialAddress. This contains unique banking details such as the routing number, account number, etc. of a US bank account. @@ -277,6 +277,10 @@ class UsBankAccount(StripeObject): """ The ID of a FinancialAddress. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["v2.money_management.financial_address"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -285,8 +289,4 @@ class UsBankAccount(StripeObject): """ Closed Enum. An enum representing the status of the FinancialAddress. This indicates whether or not the FinancialAddress can be used for any money movement flows. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = {"credentials": Credentials} diff --git a/stripe/v2/money_management/_financial_address_service.py b/stripe/v2/money_management/_financial_address_service.py index 5c3f74d54..37b1ba3a2 100644 --- a/stripe/v2/money_management/_financial_address_service.py +++ b/stripe/v2/money_management/_financial_address_service.py @@ -235,18 +235,18 @@ class RetrieveParams(TypedDict): Open Enum. A list of fields to reveal in the FinancialAddresses returned. """ - def create( + def list( self, - params: "FinancialAddressService.CreateParams", + params: "FinancialAddressService.ListParams" = {}, options: RequestOptions = {}, - ) -> FinancialAddress: + ) -> ListObject[FinancialAddress]: """ - Create a new FinancialAddress for a FinancialAccount. + List all FinancialAddresses for a FinancialAccount. """ return cast( - FinancialAddress, + ListObject[FinancialAddress], self._request( - "post", + "get", "/v2/money_management/financial_addresses", base_address="api", params=params, @@ -254,18 +254,18 @@ def create( ), ) - async def create_async( + async def list_async( self, - params: "FinancialAddressService.CreateParams", + params: "FinancialAddressService.ListParams" = {}, options: RequestOptions = {}, - ) -> FinancialAddress: + ) -> ListObject[FinancialAddress]: """ - Create a new FinancialAddress for a FinancialAccount. + List all FinancialAddresses for a FinancialAccount. """ return cast( - FinancialAddress, + ListObject[FinancialAddress], await self._request_async( - "post", + "get", "/v2/money_management/financial_addresses", base_address="api", params=params, @@ -273,18 +273,18 @@ async def create_async( ), ) - def list( + def create( self, - params: "FinancialAddressService.ListParams" = {}, + params: "FinancialAddressService.CreateParams", options: RequestOptions = {}, - ) -> ListObject[FinancialAddress]: + ) -> FinancialAddress: """ - List all FinancialAddresses for a FinancialAccount. + Create a new FinancialAddress for a FinancialAccount. """ return cast( - ListObject[FinancialAddress], + FinancialAddress, self._request( - "get", + "post", "/v2/money_management/financial_addresses", base_address="api", params=params, @@ -292,18 +292,18 @@ def list( ), ) - async def list_async( + async def create_async( self, - params: "FinancialAddressService.ListParams" = {}, + params: "FinancialAddressService.CreateParams", options: RequestOptions = {}, - ) -> ListObject[FinancialAddress]: + ) -> FinancialAddress: """ - List all FinancialAddresses for a FinancialAccount. + Create a new FinancialAddress for a FinancialAccount. """ return cast( - ListObject[FinancialAddress], + FinancialAddress, await self._request_async( - "get", + "post", "/v2/money_management/financial_addresses", base_address="api", params=params, diff --git a/stripe/v2/money_management/_inbound_transfer.py b/stripe/v2/money_management/_inbound_transfer.py index 5704cc52a..f1e3b62bf 100644 --- a/stripe/v2/money_management/_inbound_transfer.py +++ b/stripe/v2/money_management/_inbound_transfer.py @@ -81,6 +81,26 @@ class BankDebitReturned(StripeObject): class BankDebitSucceeded(StripeObject): pass + bank_debit_failed: Optional[BankDebitFailed] + """ + The history entry for a failed InboundTransfer. + """ + bank_debit_processing: Optional[BankDebitProcessing] + """ + The history entry for a processing InboundTransfer. + """ + bank_debit_queued: Optional[BankDebitQueued] + """ + The history entry for a queued InboundTransfer. + """ + bank_debit_returned: Optional[BankDebitReturned] + """ + The history entry for a returned InboundTransfer. + """ + bank_debit_succeeded: Optional[BankDebitSucceeded] + """ + The history entry for a succeeded InboundTransfer. + """ created: str """ Creation time of the HistoryEntry in RFC 3339 format and UTC. @@ -107,26 +127,6 @@ class BankDebitSucceeded(StripeObject): """ Open Enum. The type of the HistoryEntry. """ - bank_debit_failed: Optional[BankDebitFailed] - """ - The history entry for a failed InboundTransfer. - """ - bank_debit_processing: Optional[BankDebitProcessing] - """ - The history entry for a processing InboundTransfer. - """ - bank_debit_queued: Optional[BankDebitQueued] - """ - The history entry for a queued InboundTransfer. - """ - bank_debit_returned: Optional[BankDebitReturned] - """ - The history entry for a returned InboundTransfer. - """ - bank_debit_succeeded: Optional[BankDebitSucceeded] - """ - The history entry for a succeeded InboundTransfer. - """ _inner_class_types = { "bank_debit_failed": BankDebitFailed, "bank_debit_processing": BankDebitProcessing, @@ -155,6 +155,10 @@ class BankDebitSucceeded(StripeObject): """ Unique identifier for the InboundTransfer. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["v2.money_management.inbound_transfer"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -171,10 +175,6 @@ class BankDebitSucceeded(StripeObject): """ A list of history objects, representing changes in the state of the InboundTransfer. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = { "from": From, "to": To, diff --git a/stripe/v2/money_management/_inbound_transfer_service.py b/stripe/v2/money_management/_inbound_transfer_service.py index 39fd3d4f2..e877174b9 100644 --- a/stripe/v2/money_management/_inbound_transfer_service.py +++ b/stripe/v2/money_management/_inbound_transfer_service.py @@ -85,18 +85,18 @@ class ListParams(TypedDict): class RetrieveParams(TypedDict): pass - def create( + def list( self, - params: "InboundTransferService.CreateParams", + params: "InboundTransferService.ListParams" = {}, options: RequestOptions = {}, - ) -> InboundTransfer: + ) -> ListObject[InboundTransfer]: """ - InboundTransfers APIs are used to create, retrieve or list InboundTransfers. + Retrieves a list of InboundTransfers. """ return cast( - InboundTransfer, + ListObject[InboundTransfer], self._request( - "post", + "get", "/v2/money_management/inbound_transfers", base_address="api", params=params, @@ -104,18 +104,18 @@ def create( ), ) - async def create_async( + async def list_async( self, - params: "InboundTransferService.CreateParams", + params: "InboundTransferService.ListParams" = {}, options: RequestOptions = {}, - ) -> InboundTransfer: + ) -> ListObject[InboundTransfer]: """ - InboundTransfers APIs are used to create, retrieve or list InboundTransfers. + Retrieves a list of InboundTransfers. """ return cast( - InboundTransfer, + ListObject[InboundTransfer], await self._request_async( - "post", + "get", "/v2/money_management/inbound_transfers", base_address="api", params=params, @@ -123,18 +123,18 @@ async def create_async( ), ) - def list( + def create( self, - params: "InboundTransferService.ListParams" = {}, + params: "InboundTransferService.CreateParams", options: RequestOptions = {}, - ) -> ListObject[InboundTransfer]: + ) -> InboundTransfer: """ - Retrieves a list of InboundTransfers. + InboundTransfers APIs are used to create, retrieve or list InboundTransfers. """ return cast( - ListObject[InboundTransfer], + InboundTransfer, self._request( - "get", + "post", "/v2/money_management/inbound_transfers", base_address="api", params=params, @@ -142,18 +142,18 @@ def list( ), ) - async def list_async( + async def create_async( self, - params: "InboundTransferService.ListParams" = {}, + params: "InboundTransferService.CreateParams", options: RequestOptions = {}, - ) -> ListObject[InboundTransfer]: + ) -> InboundTransfer: """ - Retrieves a list of InboundTransfers. + InboundTransfers APIs are used to create, retrieve or list InboundTransfers. """ return cast( - ListObject[InboundTransfer], + InboundTransfer, await self._request_async( - "get", + "post", "/v2/money_management/inbound_transfers", base_address="api", params=params, diff --git a/stripe/v2/money_management/_outbound_payment.py b/stripe/v2/money_management/_outbound_payment.py index af82c4291..14fb74116 100644 --- a/stripe/v2/money_management/_outbound_payment.py +++ b/stripe/v2/money_management/_outbound_payment.py @@ -163,6 +163,10 @@ class TraceId(StripeObject): """ Unique identifier for the OutboundPayment. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] """ Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. @@ -210,10 +214,6 @@ class TraceId(StripeObject): """ A unique identifier that can be used to track this OutboundPayment with recipient bank. Banks might call this a “reference number” or something similar. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = { "delivery_options": DeliveryOptions, "from": From, diff --git a/stripe/v2/money_management/_outbound_payment_quote.py b/stripe/v2/money_management/_outbound_payment_quote.py index 66a9dd4c7..2fea18bfb 100644 --- a/stripe/v2/money_management/_outbound_payment_quote.py +++ b/stripe/v2/money_management/_outbound_payment_quote.py @@ -120,6 +120,10 @@ class To(StripeObject): """ Unique identifier for the OutboundPaymentQuote. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["v2.money_management.outbound_payment_quote"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -128,10 +132,6 @@ class To(StripeObject): """ Details about the recipient of an OutboundPaymentQuote. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = { "delivery_options": DeliveryOptions, "estimated_fees": EstimatedFee, diff --git a/stripe/v2/money_management/_outbound_payment_service.py b/stripe/v2/money_management/_outbound_payment_service.py index 4b4d4f5ee..1eb065cbb 100644 --- a/stripe/v2/money_management/_outbound_payment_service.py +++ b/stripe/v2/money_management/_outbound_payment_service.py @@ -144,44 +144,38 @@ class ListParams(TypedDict): class RetrieveParams(TypedDict): pass - def cancel( + def list( self, - id: str, - params: "OutboundPaymentService.CancelParams" = {}, + params: "OutboundPaymentService.ListParams" = {}, options: RequestOptions = {}, - ) -> OutboundPayment: + ) -> ListObject[OutboundPayment]: """ - Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. + Returns a list of OutboundPayments that match the provided filters. """ return cast( - OutboundPayment, + ListObject[OutboundPayment], self._request( - "post", - "/v2/money_management/outbound_payments/{id}/cancel".format( - id=sanitize_id(id), - ), + "get", + "/v2/money_management/outbound_payments", base_address="api", params=params, options=options, ), ) - async def cancel_async( + async def list_async( self, - id: str, - params: "OutboundPaymentService.CancelParams" = {}, + params: "OutboundPaymentService.ListParams" = {}, options: RequestOptions = {}, - ) -> OutboundPayment: + ) -> ListObject[OutboundPayment]: """ - Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. + Returns a list of OutboundPayments that match the provided filters. """ return cast( - OutboundPayment, + ListObject[OutboundPayment], await self._request_async( - "post", - "/v2/money_management/outbound_payments/{id}/cancel".format( - id=sanitize_id(id), - ), + "get", + "/v2/money_management/outbound_payments", base_address="api", params=params, options=options, @@ -226,58 +220,64 @@ async def create_async( ), ) - def list( + def retrieve( self, - params: "OutboundPaymentService.ListParams" = {}, + id: str, + params: "OutboundPaymentService.RetrieveParams" = {}, options: RequestOptions = {}, - ) -> ListObject[OutboundPayment]: + ) -> OutboundPayment: """ - Returns a list of OutboundPayments that match the provided filters. + Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment create or list response. """ return cast( - ListObject[OutboundPayment], + OutboundPayment, self._request( "get", - "/v2/money_management/outbound_payments", + "/v2/money_management/outbound_payments/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - async def list_async( + async def retrieve_async( self, - params: "OutboundPaymentService.ListParams" = {}, + id: str, + params: "OutboundPaymentService.RetrieveParams" = {}, options: RequestOptions = {}, - ) -> ListObject[OutboundPayment]: + ) -> OutboundPayment: """ - Returns a list of OutboundPayments that match the provided filters. + Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment create or list response. """ return cast( - ListObject[OutboundPayment], + OutboundPayment, await self._request_async( "get", - "/v2/money_management/outbound_payments", + "/v2/money_management/outbound_payments/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - def retrieve( + def cancel( self, id: str, - params: "OutboundPaymentService.RetrieveParams" = {}, + params: "OutboundPaymentService.CancelParams" = {}, options: RequestOptions = {}, ) -> OutboundPayment: """ - Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment create or list response. + Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. """ return cast( OutboundPayment, self._request( - "get", - "/v2/money_management/outbound_payments/{id}".format( + "post", + "/v2/money_management/outbound_payments/{id}/cancel".format( id=sanitize_id(id), ), base_address="api", @@ -286,20 +286,20 @@ def retrieve( ), ) - async def retrieve_async( + async def cancel_async( self, id: str, - params: "OutboundPaymentService.RetrieveParams" = {}, + params: "OutboundPaymentService.CancelParams" = {}, options: RequestOptions = {}, ) -> OutboundPayment: """ - Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment create or list response. + Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. """ return cast( OutboundPayment, await self._request_async( - "get", - "/v2/money_management/outbound_payments/{id}".format( + "post", + "/v2/money_management/outbound_payments/{id}/cancel".format( id=sanitize_id(id), ), base_address="api", diff --git a/stripe/v2/money_management/_outbound_setup_intent.py b/stripe/v2/money_management/_outbound_setup_intent.py index 00950dd62..1a57b3620 100644 --- a/stripe/v2/money_management/_outbound_setup_intent.py +++ b/stripe/v2/money_management/_outbound_setup_intent.py @@ -30,14 +30,14 @@ class ConfirmationOfPayee(StripeObject): The Confirmation of Payee status. """ - type: Literal["confirmation_of_payee"] - """ - The type of next action. - """ confirmation_of_payee: Optional[ConfirmationOfPayee] """ Confirmation of Payee details. """ + type: Literal["confirmation_of_payee"] + """ + The type of next action. + """ _inner_class_types = {"confirmation_of_payee": ConfirmationOfPayee} created: str @@ -48,6 +48,10 @@ class ConfirmationOfPayee(StripeObject): """ ID of the outbound setup intent. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ next_action: Optional[NextAction] """ Specifies which actions needs to be taken next to continue setup of the credential. @@ -70,8 +74,4 @@ class ConfirmationOfPayee(StripeObject): """ The intended money movement flow this payout method should be set up for, specified in params. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = {"next_action": NextAction} diff --git a/stripe/v2/money_management/_outbound_setup_intent_service.py b/stripe/v2/money_management/_outbound_setup_intent_service.py index be5c41510..034d2c807 100644 --- a/stripe/v2/money_management/_outbound_setup_intent_service.py +++ b/stripe/v2/money_management/_outbound_setup_intent_service.py @@ -172,44 +172,38 @@ class UpdateParamsPayoutMethodDataCard(TypedDict): The card number. This can only be passed when creating a new credential on an outbound setup intent in the requires_payout_method state. """ - def cancel( + def list( self, - id: str, - params: "OutboundSetupIntentService.CancelParams" = {}, + params: "OutboundSetupIntentService.ListParams" = {}, options: RequestOptions = {}, - ) -> OutboundSetupIntent: + ) -> ListObject[OutboundSetupIntent]: """ - Cancel an OutboundSetupIntent object. + List the OutboundSetupIntent objects. """ return cast( - OutboundSetupIntent, + ListObject[OutboundSetupIntent], self._request( - "post", - "/v2/money_management/outbound_setup_intents/{id}/cancel".format( - id=sanitize_id(id), - ), + "get", + "/v2/money_management/outbound_setup_intents", base_address="api", params=params, options=options, ), ) - async def cancel_async( + async def list_async( self, - id: str, - params: "OutboundSetupIntentService.CancelParams" = {}, + params: "OutboundSetupIntentService.ListParams" = {}, options: RequestOptions = {}, - ) -> OutboundSetupIntent: + ) -> ListObject[OutboundSetupIntent]: """ - Cancel an OutboundSetupIntent object. + List the OutboundSetupIntent objects. """ return cast( - OutboundSetupIntent, + ListObject[OutboundSetupIntent], await self._request_async( - "post", - "/v2/money_management/outbound_setup_intents/{id}/cancel".format( - id=sanitize_id(id), - ), + "get", + "/v2/money_management/outbound_setup_intents", base_address="api", params=params, options=options, @@ -254,57 +248,63 @@ async def create_async( ), ) - def list( + def retrieve( self, - params: "OutboundSetupIntentService.ListParams" = {}, + id: str, + params: "OutboundSetupIntentService.RetrieveParams" = {}, options: RequestOptions = {}, - ) -> ListObject[OutboundSetupIntent]: + ) -> OutboundSetupIntent: """ - List the OutboundSetupIntent objects. + Retrieve an OutboundSetupIntent object. """ return cast( - ListObject[OutboundSetupIntent], + OutboundSetupIntent, self._request( "get", - "/v2/money_management/outbound_setup_intents", + "/v2/money_management/outbound_setup_intents/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - async def list_async( + async def retrieve_async( self, - params: "OutboundSetupIntentService.ListParams" = {}, + id: str, + params: "OutboundSetupIntentService.RetrieveParams" = {}, options: RequestOptions = {}, - ) -> ListObject[OutboundSetupIntent]: + ) -> OutboundSetupIntent: """ - List the OutboundSetupIntent objects. + Retrieve an OutboundSetupIntent object. """ return cast( - ListObject[OutboundSetupIntent], + OutboundSetupIntent, await self._request_async( "get", - "/v2/money_management/outbound_setup_intents", + "/v2/money_management/outbound_setup_intents/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - def retrieve( + def update( self, id: str, - params: "OutboundSetupIntentService.RetrieveParams" = {}, + params: "OutboundSetupIntentService.UpdateParams" = {}, options: RequestOptions = {}, ) -> OutboundSetupIntent: """ - Retrieve an OutboundSetupIntent object. + Update an OutboundSetupIntent object. """ return cast( OutboundSetupIntent, self._request( - "get", + "post", "/v2/money_management/outbound_setup_intents/{id}".format( id=sanitize_id(id), ), @@ -314,19 +314,19 @@ def retrieve( ), ) - async def retrieve_async( + async def update_async( self, id: str, - params: "OutboundSetupIntentService.RetrieveParams" = {}, + params: "OutboundSetupIntentService.UpdateParams" = {}, options: RequestOptions = {}, ) -> OutboundSetupIntent: """ - Retrieve an OutboundSetupIntent object. + Update an OutboundSetupIntent object. """ return cast( OutboundSetupIntent, await self._request_async( - "get", + "post", "/v2/money_management/outbound_setup_intents/{id}".format( id=sanitize_id(id), ), @@ -336,20 +336,20 @@ async def retrieve_async( ), ) - def update( + def cancel( self, id: str, - params: "OutboundSetupIntentService.UpdateParams" = {}, + params: "OutboundSetupIntentService.CancelParams" = {}, options: RequestOptions = {}, ) -> OutboundSetupIntent: """ - Update an OutboundSetupIntent object. + Cancel an OutboundSetupIntent object. """ return cast( OutboundSetupIntent, self._request( "post", - "/v2/money_management/outbound_setup_intents/{id}".format( + "/v2/money_management/outbound_setup_intents/{id}/cancel".format( id=sanitize_id(id), ), base_address="api", @@ -358,20 +358,20 @@ def update( ), ) - async def update_async( + async def cancel_async( self, id: str, - params: "OutboundSetupIntentService.UpdateParams" = {}, + params: "OutboundSetupIntentService.CancelParams" = {}, options: RequestOptions = {}, ) -> OutboundSetupIntent: """ - Update an OutboundSetupIntent object. + Cancel an OutboundSetupIntent object. """ return cast( OutboundSetupIntent, await self._request_async( "post", - "/v2/money_management/outbound_setup_intents/{id}".format( + "/v2/money_management/outbound_setup_intents/{id}/cancel".format( id=sanitize_id(id), ), base_address="api", diff --git a/stripe/v2/money_management/_outbound_transfer.py b/stripe/v2/money_management/_outbound_transfer.py index 74347dd67..16d87dcca 100644 --- a/stripe/v2/money_management/_outbound_transfer.py +++ b/stripe/v2/money_management/_outbound_transfer.py @@ -152,6 +152,10 @@ class TraceId(StripeObject): """ Unique identifier for the OutboundTransfer. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ metadata: Optional[Dict[str, str]] """ Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. @@ -191,10 +195,6 @@ class TraceId(StripeObject): """ A unique identifier that can be used to track this OutboundTransfer with recipient bank. Banks might call this a “reference number” or something similar. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = { "delivery_options": DeliveryOptions, "from": From, diff --git a/stripe/v2/money_management/_outbound_transfer_service.py b/stripe/v2/money_management/_outbound_transfer_service.py index 2f5cc96ad..c222439dd 100644 --- a/stripe/v2/money_management/_outbound_transfer_service.py +++ b/stripe/v2/money_management/_outbound_transfer_service.py @@ -119,44 +119,38 @@ class ListParams(TypedDict): class RetrieveParams(TypedDict): pass - def cancel( + def list( self, - id: str, - params: "OutboundTransferService.CancelParams" = {}, + params: "OutboundTransferService.ListParams" = {}, options: RequestOptions = {}, - ) -> OutboundTransfer: + ) -> ListObject[OutboundTransfer]: """ - Cancels an OutboundTransfer. Only processing OutboundTransfers can be canceled. + Returns a list of OutboundTransfers that match the provided filters. """ return cast( - OutboundTransfer, + ListObject[OutboundTransfer], self._request( - "post", - "/v2/money_management/outbound_transfers/{id}/cancel".format( - id=sanitize_id(id), - ), + "get", + "/v2/money_management/outbound_transfers", base_address="api", params=params, options=options, ), ) - async def cancel_async( + async def list_async( self, - id: str, - params: "OutboundTransferService.CancelParams" = {}, + params: "OutboundTransferService.ListParams" = {}, options: RequestOptions = {}, - ) -> OutboundTransfer: + ) -> ListObject[OutboundTransfer]: """ - Cancels an OutboundTransfer. Only processing OutboundTransfers can be canceled. + Returns a list of OutboundTransfers that match the provided filters. """ return cast( - OutboundTransfer, + ListObject[OutboundTransfer], await self._request_async( - "post", - "/v2/money_management/outbound_transfers/{id}/cancel".format( - id=sanitize_id(id), - ), + "get", + "/v2/money_management/outbound_transfers", base_address="api", params=params, options=options, @@ -201,58 +195,64 @@ async def create_async( ), ) - def list( + def retrieve( self, - params: "OutboundTransferService.ListParams" = {}, + id: str, + params: "OutboundTransferService.RetrieveParams" = {}, options: RequestOptions = {}, - ) -> ListObject[OutboundTransfer]: + ) -> OutboundTransfer: """ - Returns a list of OutboundTransfers that match the provided filters. + Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundPayment create or list response. """ return cast( - ListObject[OutboundTransfer], + OutboundTransfer, self._request( "get", - "/v2/money_management/outbound_transfers", + "/v2/money_management/outbound_transfers/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - async def list_async( + async def retrieve_async( self, - params: "OutboundTransferService.ListParams" = {}, + id: str, + params: "OutboundTransferService.RetrieveParams" = {}, options: RequestOptions = {}, - ) -> ListObject[OutboundTransfer]: + ) -> OutboundTransfer: """ - Returns a list of OutboundTransfers that match the provided filters. + Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundPayment create or list response. """ return cast( - ListObject[OutboundTransfer], + OutboundTransfer, await self._request_async( "get", - "/v2/money_management/outbound_transfers", + "/v2/money_management/outbound_transfers/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - def retrieve( + def cancel( self, id: str, - params: "OutboundTransferService.RetrieveParams" = {}, + params: "OutboundTransferService.CancelParams" = {}, options: RequestOptions = {}, ) -> OutboundTransfer: """ - Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundPayment create or list response. + Cancels an OutboundTransfer. Only processing OutboundTransfers can be canceled. """ return cast( OutboundTransfer, self._request( - "get", - "/v2/money_management/outbound_transfers/{id}".format( + "post", + "/v2/money_management/outbound_transfers/{id}/cancel".format( id=sanitize_id(id), ), base_address="api", @@ -261,20 +261,20 @@ def retrieve( ), ) - async def retrieve_async( + async def cancel_async( self, id: str, - params: "OutboundTransferService.RetrieveParams" = {}, + params: "OutboundTransferService.CancelParams" = {}, options: RequestOptions = {}, ) -> OutboundTransfer: """ - Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundPayment create or list response. + Cancels an OutboundTransfer. Only processing OutboundTransfers can be canceled. """ return cast( OutboundTransfer, await self._request_async( - "get", - "/v2/money_management/outbound_transfers/{id}".format( + "post", + "/v2/money_management/outbound_transfers/{id}/cancel".format( id=sanitize_id(id), ), base_address="api", diff --git a/stripe/v2/money_management/_payout_method.py b/stripe/v2/money_management/_payout_method.py index 33bbb5935..a9a2cd31e 100644 --- a/stripe/v2/money_management/_payout_method.py +++ b/stripe/v2/money_management/_payout_method.py @@ -14,16 +14,6 @@ class PayoutMethod(StripeObject): "v2.money_management.payout_method" ) - class UsageStatus(StripeObject): - payments: Literal["eligible", "invalid", "requires_action"] - """ - Payments status - used when sending OutboundPayments (sending funds to recipients). - """ - transfers: Literal["eligible", "invalid", "requires_action"] - """ - Transfers status - used when making an OutboundTransfer (sending funds to yourself). - """ - class BankAccount(StripeObject): archived: bool """ @@ -76,10 +66,28 @@ class Card(StripeObject): The last 4 digits of the card number. """ + class UsageStatus(StripeObject): + payments: Literal["eligible", "invalid", "requires_action"] + """ + Payments status - used when sending OutboundPayments (sending funds to recipients). + """ + transfers: Literal["eligible", "invalid", "requires_action"] + """ + Transfers status - used when making an OutboundTransfer (sending funds to yourself). + """ + available_payout_speeds: List[Literal["instant", "standard"]] """ A set of available payout speeds for this payout method. """ + bank_account: Optional[BankAccount] + """ + The PayoutMethodBankAccount object details. + """ + card: Optional[Card] + """ + The PayoutMethodCard object details. + """ created: str """ Created timestamp. @@ -92,6 +100,10 @@ class Card(StripeObject): """ ID of the underlying active OutboundSetupIntent object, if any. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["v2.money_management.payout_method"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -104,20 +116,8 @@ class Card(StripeObject): """ Indicates whether the payout method has met the necessary requirements for outbound money movement. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ - bank_account: Optional[BankAccount] - """ - The PayoutMethodBankAccount object details. - """ - card: Optional[Card] - """ - The PayoutMethodCard object details. - """ _inner_class_types = { - "usage_status": UsageStatus, "bank_account": BankAccount, "card": Card, + "usage_status": UsageStatus, } diff --git a/stripe/v2/money_management/_payout_method_service.py b/stripe/v2/money_management/_payout_method_service.py index a67e5e36c..29d967a7b 100644 --- a/stripe/v2/money_management/_payout_method_service.py +++ b/stripe/v2/money_management/_payout_method_service.py @@ -43,104 +43,103 @@ class RetrieveParams(TypedDict): class UnarchiveParams(TypedDict): pass - def archive( + def list( self, - id: str, - params: "PayoutMethodService.ArchiveParams" = {}, + params: "PayoutMethodService.ListParams" = {}, options: RequestOptions = {}, - ) -> PayoutMethod: + ) -> ListObject[PayoutMethod]: """ - Archive a PayoutMethod object. Archived objects cannot be used as payout methods - and will not appear in the payout method list. + List objects that adhere to the PayoutMethod interface. """ return cast( - PayoutMethod, + ListObject[PayoutMethod], self._request( - "post", - "/v2/money_management/payout_methods/{id}/archive".format( - id=sanitize_id(id), - ), + "get", + "/v2/money_management/payout_methods", base_address="api", params=params, options=options, ), ) - async def archive_async( + async def list_async( self, - id: str, - params: "PayoutMethodService.ArchiveParams" = {}, + params: "PayoutMethodService.ListParams" = {}, options: RequestOptions = {}, - ) -> PayoutMethod: + ) -> ListObject[PayoutMethod]: """ - Archive a PayoutMethod object. Archived objects cannot be used as payout methods - and will not appear in the payout method list. + List objects that adhere to the PayoutMethod interface. """ return cast( - PayoutMethod, + ListObject[PayoutMethod], await self._request_async( - "post", - "/v2/money_management/payout_methods/{id}/archive".format( - id=sanitize_id(id), - ), + "get", + "/v2/money_management/payout_methods", base_address="api", params=params, options=options, ), ) - def list( + def retrieve( self, - params: "PayoutMethodService.ListParams" = {}, + id: str, + params: "PayoutMethodService.RetrieveParams" = {}, options: RequestOptions = {}, - ) -> ListObject[PayoutMethod]: + ) -> PayoutMethod: """ - List objects that adhere to the PayoutMethod interface. + Retrieve a PayoutMethod object. """ return cast( - ListObject[PayoutMethod], + PayoutMethod, self._request( "get", - "/v2/money_management/payout_methods", + "/v2/money_management/payout_methods/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - async def list_async( + async def retrieve_async( self, - params: "PayoutMethodService.ListParams" = {}, + id: str, + params: "PayoutMethodService.RetrieveParams" = {}, options: RequestOptions = {}, - ) -> ListObject[PayoutMethod]: + ) -> PayoutMethod: """ - List objects that adhere to the PayoutMethod interface. + Retrieve a PayoutMethod object. """ return cast( - ListObject[PayoutMethod], + PayoutMethod, await self._request_async( "get", - "/v2/money_management/payout_methods", + "/v2/money_management/payout_methods/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - def retrieve( + def archive( self, id: str, - params: "PayoutMethodService.RetrieveParams" = {}, + params: "PayoutMethodService.ArchiveParams" = {}, options: RequestOptions = {}, ) -> PayoutMethod: """ - Retrieve a PayoutMethod object. + Archive a PayoutMethod object. Archived objects cannot be used as payout methods + and will not appear in the payout method list. """ return cast( PayoutMethod, self._request( - "get", - "/v2/money_management/payout_methods/{id}".format( + "post", + "/v2/money_management/payout_methods/{id}/archive".format( id=sanitize_id(id), ), base_address="api", @@ -149,20 +148,21 @@ def retrieve( ), ) - async def retrieve_async( + async def archive_async( self, id: str, - params: "PayoutMethodService.RetrieveParams" = {}, + params: "PayoutMethodService.ArchiveParams" = {}, options: RequestOptions = {}, ) -> PayoutMethod: """ - Retrieve a PayoutMethod object. + Archive a PayoutMethod object. Archived objects cannot be used as payout methods + and will not appear in the payout method list. """ return cast( PayoutMethod, await self._request_async( - "get", - "/v2/money_management/payout_methods/{id}".format( + "post", + "/v2/money_management/payout_methods/{id}/archive".format( id=sanitize_id(id), ), base_address="api", diff --git a/stripe/v2/money_management/_payout_methods_bank_account_spec.py b/stripe/v2/money_management/_payout_methods_bank_account_spec.py index 2fd4e797f..9282b5bdd 100644 --- a/stripe/v2/money_management/_payout_methods_bank_account_spec.py +++ b/stripe/v2/money_management/_payout_methods_bank_account_spec.py @@ -60,12 +60,12 @@ class LocalNameHuman(StripeObject): """ The list of specs by country. """ - object: Literal["v2.money_management.payout_methods_bank_account_spec"] - """ - String representing the object's type. Objects of the same type share the same value of the object field. - """ livemode: bool """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. """ + object: Literal["v2.money_management.payout_methods_bank_account_spec"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ _inner_class_types = {"countries": Countries} diff --git a/stripe/v2/money_management/_received_credit.py b/stripe/v2/money_management/_received_credit.py index b167c4183..6d11855de 100644 --- a/stripe/v2/money_management/_received_credit.py +++ b/stripe/v2/money_management/_received_credit.py @@ -15,60 +15,11 @@ class ReceivedCredit(StripeObject): "v2.money_management.received_credit" ) - class StatusDetails(StripeObject): - class Failed(StripeObject): - reason: Literal[ - "capability_inactive", - "currency_unsupported_on_financial_address", - "financial_address_inactive", - "stripe_rejected", - ] - """ - Open Enum. The `failed` status reason. - """ - - class Returned(StripeObject): - reason: Literal["originator_initiated_reversal"] - """ - Open Enum. The `returned` status reason. - """ - - failed: Optional[Failed] - """ - Hash that provides additional information regarding the reason behind a `failed` ReceivedCredit status. It is only present when the ReceivedCredit status is `failed`. - """ - returned: Optional[Returned] - """ - Hash that provides additional information regarding the reason behind a `returned` ReceivedCredit status. It is only present when the ReceivedCredit status is `returned`. - """ - _inner_class_types = {"failed": Failed, "returned": Returned} - - class StatusTransitions(StripeObject): - failed_at: Optional[str] - """ - Timestamp describing when the ReceivedCredit was marked as `failed`. - Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. - """ - returned_at: Optional[str] - """ - Timestamp describing when the ReceivedCredit changed status to `returned`. - Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. - """ - succeeded_at: Optional[str] - """ - Timestamp describing when the ReceivedCredit was marked as `succeeded`. - Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. - """ - class BalanceTransfer(StripeObject): from_account: Optional[str] """ The ID of the account that owns the source object originated the ReceivedCredit. """ - type: Literal["outbound_payment", "outbound_transfer", "payout_v1"] - """ - Open Enum. The type of Stripe Money Movement that originated the ReceivedCredit. - """ outbound_payment: Optional[str] """ The ID of the outbound payment object that originated the ReceivedCredit. @@ -81,6 +32,10 @@ class BalanceTransfer(StripeObject): """ The ID of the payout object that originated the ReceivedCredit. """ + type: Literal["outbound_payment", "outbound_transfer", "payout_v1"] + """ + Open Enum. The type of Stripe Money Movement that originated the ReceivedCredit. + """ class BankTransfer(StripeObject): class GbBankAccount(StripeObject): @@ -127,6 +82,10 @@ class UsBankAccount(StripeObject): """ Financial Address on which funds for ReceivedCredit were received. """ + gb_bank_account: Optional[GbBankAccount] + """ + Hash containing the transaction bank details. Present if `payment_method_type` field value is `gb_bank_account`. + """ payment_method_type: Literal["gb_bank_account", "us_bank_account"] """ Open Enum. Indicates the type of source via from which external funds originated. @@ -135,10 +94,6 @@ class UsBankAccount(StripeObject): """ Freeform string set by originator of the external ReceivedCredit. """ - gb_bank_account: Optional[GbBankAccount] - """ - Hash containing the transaction bank details. Present if `payment_method_type` field value is `gb_bank_account`. - """ us_bank_account: Optional[UsBankAccount] """ Hash containing the transaction bank details. Present if `payment_method_type` field value is `us_bank_account`. @@ -148,10 +103,63 @@ class UsBankAccount(StripeObject): "us_bank_account": UsBankAccount, } + class StatusDetails(StripeObject): + class Failed(StripeObject): + reason: Literal[ + "capability_inactive", + "currency_unsupported_on_financial_address", + "financial_address_inactive", + "stripe_rejected", + ] + """ + Open Enum. The `failed` status reason. + """ + + class Returned(StripeObject): + reason: Literal["originator_initiated_reversal"] + """ + Open Enum. The `returned` status reason. + """ + + failed: Optional[Failed] + """ + Hash that provides additional information regarding the reason behind a `failed` ReceivedCredit status. It is only present when the ReceivedCredit status is `failed`. + """ + returned: Optional[Returned] + """ + Hash that provides additional information regarding the reason behind a `returned` ReceivedCredit status. It is only present when the ReceivedCredit status is `returned`. + """ + _inner_class_types = {"failed": Failed, "returned": Returned} + + class StatusTransitions(StripeObject): + failed_at: Optional[str] + """ + Timestamp describing when the ReceivedCredit was marked as `failed`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + returned_at: Optional[str] + """ + Timestamp describing when the ReceivedCredit changed status to `returned`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + succeeded_at: Optional[str] + """ + Timestamp describing when the ReceivedCredit was marked as `succeeded`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + amount: Amount """ The amount and currency of the ReceivedCredit. """ + balance_transfer: Optional[BalanceTransfer] + """ + This object stores details about the originating Stripe transaction that resulted in the ReceivedCredit. Present if `type` field value is `balance_transfer`. + """ + bank_transfer: Optional[BankTransfer] + """ + This object stores details about the originating banking transaction that resulted in the ReceivedCredit. Present if `type` field value is `external_credit`. + """ created: str """ Time at which the ReceivedCredit was created. @@ -169,6 +177,10 @@ class UsBankAccount(StripeObject): """ Unique identifier for the ReceivedCredit. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["v2.money_management.received_credit"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -193,21 +205,9 @@ class UsBankAccount(StripeObject): """ Open Enum. The type of flow that caused the ReceivedCredit. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ - balance_transfer: Optional[BalanceTransfer] - """ - This object stores details about the originating Stripe transaction that resulted in the ReceivedCredit. Present if `type` field value is `balance_transfer`. - """ - bank_transfer: Optional[BankTransfer] - """ - This object stores details about the originating banking transaction that resulted in the ReceivedCredit. Present if `type` field value is `external_credit`. - """ _inner_class_types = { - "status_details": StatusDetails, - "status_transitions": StatusTransitions, "balance_transfer": BalanceTransfer, "bank_transfer": BankTransfer, + "status_details": StatusDetails, + "status_transitions": StatusTransitions, } diff --git a/stripe/v2/money_management/_received_debit.py b/stripe/v2/money_management/_received_debit.py index 99706f4f2..b50f6b432 100644 --- a/stripe/v2/money_management/_received_debit.py +++ b/stripe/v2/money_management/_received_debit.py @@ -15,6 +15,39 @@ class ReceivedDebit(StripeObject): "v2.money_management.received_debit" ) + class BankTransfer(StripeObject): + class UsBankAccount(StripeObject): + bank_name: Optional[str] + """ + The name of the bank the debit originated from. + """ + network: Literal["ach"] + """ + Open Enum. The bank network the debit was originated on. + """ + routing_number: Optional[str] + """ + The routing number of the bank that originated the debit. + """ + + financial_address: str + """ + The Financial Address that was debited. + """ + payment_method_type: Literal["us_bank_account"] + """ + Open Enum. The type of the payment method used to originate the debit. + """ + statement_descriptor: Optional[str] + """ + The statement descriptor set by the originator of the debit. + """ + us_bank_account: UsBankAccount + """ + The payment method used to originate the debit. + """ + _inner_class_types = {"us_bank_account": UsBankAccount} + class StatusDetails(StripeObject): class Failed(StripeObject): reason: Literal[ @@ -50,43 +83,14 @@ class StatusTransitions(StripeObject): Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: `2022-09-18T13:22:18.123Z`. """ - class BankTransfer(StripeObject): - class UsBankAccount(StripeObject): - bank_name: Optional[str] - """ - The name of the bank the debit originated from. - """ - network: Literal["ach"] - """ - Open Enum. The bank network the debit was originated on. - """ - routing_number: Optional[str] - """ - The routing number of the bank that originated the debit. - """ - - financial_address: str - """ - The Financial Address that was debited. - """ - payment_method_type: Literal["us_bank_account"] - """ - Open Enum. The type of the payment method used to originate the debit. - """ - statement_descriptor: Optional[str] - """ - The statement descriptor set by the originator of the debit. - """ - us_bank_account: UsBankAccount - """ - The payment method used to originate the debit. - """ - _inner_class_types = {"us_bank_account": UsBankAccount} - amount: Amount """ Amount and currency of the ReceivedDebit. """ + bank_transfer: Optional[BankTransfer] + """ + This object stores details about the originating banking transaction that resulted in the ReceivedDebit. Present if `type` field value is `bank_transfer`. + """ created: str """ The time at which the ReceivedDebit was created. @@ -104,6 +108,10 @@ class UsBankAccount(StripeObject): """ Unique identifier for the ReceivedDebit. """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ object: Literal["v2.money_management.received_debit"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -128,16 +136,8 @@ class UsBankAccount(StripeObject): """ Open Enum. The type of the ReceivedDebit. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ - bank_transfer: Optional[BankTransfer] - """ - This object stores details about the originating banking transaction that resulted in the ReceivedDebit. Present if `type` field value is `bank_transfer`. - """ _inner_class_types = { + "bank_transfer": BankTransfer, "status_details": StatusDetails, "status_transitions": StatusTransitions, - "bank_transfer": BankTransfer, } diff --git a/stripe/v2/money_management/_transaction.py b/stripe/v2/money_management/_transaction.py index c02de945e..2548cda83 100644 --- a/stripe/v2/money_management/_transaction.py +++ b/stripe/v2/money_management/_transaction.py @@ -30,18 +30,6 @@ class BalanceImpact(StripeObject): """ class Flow(StripeObject): - type: Literal[ - "adjustment", - "fee_transaction", - "inbound_transfer", - "outbound_payment", - "outbound_transfer", - "received_credit", - "received_debit", - ] - """ - Open Enum. Type of the flow that created the Transaction. The field matching this value will contain the ID of the flow. - """ adjustment: Optional[str] """ If applicable, the ID of the Adjustment that created this Transaction. @@ -70,6 +58,18 @@ class Flow(StripeObject): """ If applicable, the ID of the ReceivedDebit that created this Transaction. """ + type: Literal[ + "adjustment", + "fee_transaction", + "inbound_transfer", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit", + ] + """ + Open Enum. Type of the flow that created the Transaction. The field matching this value will contain the ID of the flow. + """ class StatusTransitions(StripeObject): posted_at: Optional[str] @@ -119,6 +119,10 @@ class StatusTransitions(StripeObject): """ 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. + """ object: Literal["v2.money_management.transaction"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -135,10 +139,6 @@ class StatusTransitions(StripeObject): """ Timestamps for when the Transaction transitioned to a particular status. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = { "balance_impact": BalanceImpact, "flow": Flow, diff --git a/stripe/v2/money_management/_transaction_entry.py b/stripe/v2/money_management/_transaction_entry.py index cb23123bc..a055bd5bd 100644 --- a/stripe/v2/money_management/_transaction_entry.py +++ b/stripe/v2/money_management/_transaction_entry.py @@ -31,18 +31,6 @@ class BalanceImpact(StripeObject): class TransactionDetails(StripeObject): class Flow(StripeObject): - type: Literal[ - "adjustment", - "fee_transaction", - "inbound_transfer", - "outbound_payment", - "outbound_transfer", - "received_credit", - "received_debit", - ] - """ - Open Enum. Type of the flow that created the Transaction. The field matching this value will contain the ID of the flow. - """ adjustment: Optional[str] """ If applicable, the ID of the Adjustment that created this Transaction. @@ -71,6 +59,18 @@ class Flow(StripeObject): """ If applicable, the ID of the ReceivedDebit that created this Transaction. """ + type: Literal[ + "adjustment", + "fee_transaction", + "inbound_transfer", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit", + ] + """ + Open Enum. Type of the flow that created the Transaction. The field matching this value will contain the ID of the flow. + """ category: Literal[ "adjustment", @@ -111,6 +111,10 @@ class Flow(StripeObject): """ 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. + """ object: Literal["v2.money_management.transaction_entry"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -123,10 +127,6 @@ class Flow(StripeObject): """ Details copied from the transaction that this TransactionEntry belongs to. """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ _inner_class_types = { "balance_impact": BalanceImpact, "transaction_details": TransactionDetails, diff --git a/stripe/v2/payments/_off_session_payment_service.py b/stripe/v2/payments/_off_session_payment_service.py index 8e441d0b2..07a1d9ce6 100644 --- a/stripe/v2/payments/_off_session_payment_service.py +++ b/stripe/v2/payments/_off_session_payment_service.py @@ -89,44 +89,38 @@ class ListParams(TypedDict): class RetrieveParams(TypedDict): pass - def cancel( + def list( self, - id: str, - params: "OffSessionPaymentService.CancelParams" = {}, + params: "OffSessionPaymentService.ListParams" = {}, options: RequestOptions = {}, - ) -> OffSessionPayment: + ) -> ListObject[OffSessionPayment]: """ - Cancel OSP. + List OSPs matching filter. """ return cast( - OffSessionPayment, + ListObject[OffSessionPayment], self._request( - "post", - "/v2/payments/off_session_payments/{id}/cancel".format( - id=sanitize_id(id), - ), + "get", + "/v2/payments/off_session_payments", base_address="api", params=params, options=options, ), ) - async def cancel_async( + async def list_async( self, - id: str, - params: "OffSessionPaymentService.CancelParams" = {}, + params: "OffSessionPaymentService.ListParams" = {}, options: RequestOptions = {}, - ) -> OffSessionPayment: + ) -> ListObject[OffSessionPayment]: """ - Cancel OSP. + List OSPs matching filter. """ return cast( - OffSessionPayment, + ListObject[OffSessionPayment], await self._request_async( - "post", - "/v2/payments/off_session_payments/{id}/cancel".format( - id=sanitize_id(id), - ), + "get", + "/v2/payments/off_session_payments", base_address="api", params=params, options=options, @@ -171,58 +165,64 @@ async def create_async( ), ) - def list( + def retrieve( self, - params: "OffSessionPaymentService.ListParams" = {}, + id: str, + params: "OffSessionPaymentService.RetrieveParams" = {}, options: RequestOptions = {}, - ) -> ListObject[OffSessionPayment]: + ) -> OffSessionPayment: """ - List OSPs matching filter. + Retrieve OSP by ID. """ return cast( - ListObject[OffSessionPayment], + OffSessionPayment, self._request( "get", - "/v2/payments/off_session_payments", + "/v2/payments/off_session_payments/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - async def list_async( + async def retrieve_async( self, - params: "OffSessionPaymentService.ListParams" = {}, + id: str, + params: "OffSessionPaymentService.RetrieveParams" = {}, options: RequestOptions = {}, - ) -> ListObject[OffSessionPayment]: + ) -> OffSessionPayment: """ - List OSPs matching filter. + Retrieve OSP by ID. """ return cast( - ListObject[OffSessionPayment], + OffSessionPayment, await self._request_async( "get", - "/v2/payments/off_session_payments", + "/v2/payments/off_session_payments/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, ), ) - def retrieve( + def cancel( self, id: str, - params: "OffSessionPaymentService.RetrieveParams" = {}, + params: "OffSessionPaymentService.CancelParams" = {}, options: RequestOptions = {}, ) -> OffSessionPayment: """ - Retrieve OSP by ID. + Cancel OSP. """ return cast( OffSessionPayment, self._request( - "get", - "/v2/payments/off_session_payments/{id}".format( + "post", + "/v2/payments/off_session_payments/{id}/cancel".format( id=sanitize_id(id), ), base_address="api", @@ -231,20 +231,20 @@ def retrieve( ), ) - async def retrieve_async( + async def cancel_async( self, id: str, - params: "OffSessionPaymentService.RetrieveParams" = {}, + params: "OffSessionPaymentService.CancelParams" = {}, options: RequestOptions = {}, ) -> OffSessionPayment: """ - Retrieve OSP by ID. + Cancel OSP. """ return cast( OffSessionPayment, await self._request_async( - "get", - "/v2/payments/off_session_payments/{id}".format( + "post", + "/v2/payments/off_session_payments/{id}/cancel".format( id=sanitize_id(id), ), base_address="api", diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index de5fe6108..60fa7491f 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -33124,50 +33124,155 @@ async def test_webhook_endpoints_post_2_service_async( post_data="url=https%3A%2F%2Fexample.com%2Fnew_endpoint", ) - def test_v2_core_account_post_service( + def test_v2_billing_meter_event_adjustment_post_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", - "/v2/core/accounts/id_123/close", + "/v2/billing/meter_event_adjustments", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.accounts.close("id_123") + client.v2.billing.meter_event_adjustments.create( + { + "cancel": {"identifier": "identifier"}, + "event_name": "event_name", + "type": "cancel", + } + ) http_client_mock.assert_requested( "post", - path="/v2/core/accounts/id_123/close", + path="/v2/billing/meter_event_adjustments", query_string="", api_base="https://api.stripe.com", - post_data="{}", + post_data='{"cancel":{"identifier":"identifier"},"event_name":"event_name","type":"cancel"}', is_json=True, ) - def test_v2_core_account_post_2_service( + def test_v2_billing_meter_event_session_post_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", - "/v2/core/accounts", + "/v2/billing/meter_event_session", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.accounts.create() + client.v2.billing.meter_event_session.create() http_client_mock.assert_requested( "post", - path="/v2/core/accounts", + path="/v2/billing/meter_event_session", query_string="", api_base="https://api.stripe.com", post_data="{}", is_json=True, ) + def test_v2_billing_meter_event_stream_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/billing/meter_event_stream", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.billing.meter_event_stream.create( + { + "events": [ + { + "event_name": "event_name", + "identifier": "identifier", + "payload": {"undefined": "payload"}, + "timestamp": "1970-01-01T15:18:46.294Z", + }, + ], + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/billing/meter_event_stream", + query_string="", + api_base="https://meter-events.stripe.com", + post_data='{"events":[{"event_name":"event_name","identifier":"identifier","payload":{"undefined":"payload"},"timestamp":"1970-01-01T15:18:46.294Z"}]}', + is_json=True, + ) + + def test_v2_billing_meter_event_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/billing/meter_events", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.billing.meter_events.create( + { + "event_name": "event_name", + "payload": {"undefined": "payload"}, + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/billing/meter_events", + query_string="", + api_base="https://api.stripe.com", + post_data='{"event_name":"event_name","payload":{"undefined":"payload"}}', + is_json=True, + ) + + def test_v2_core_account_link_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/account_links", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.account_links.create( + { + "account": "account", + "use_case": { + "type": "account_onboarding", + "account_onboarding": { + "configurations": ["recipient"], + "refresh_url": "refresh_url", + "return_url": "return_url", + }, + "account_update": { + "configurations": ["recipient"], + "refresh_url": "refresh_url", + "return_url": "return_url", + }, + }, + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/core/account_links", + query_string="", + api_base="https://api.stripe.com", + post_data='{"account":"account","use_case":{"type":"account_onboarding","account_onboarding":{"configurations":["recipient"],"refresh_url":"refresh_url","return_url":"return_url"},"account_update":{"configurations":["recipient"],"refresh_url":"refresh_url","return_url":"return_url"}}}', + is_json=True, + ) + def test_v2_core_account_get_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -33188,6 +33293,28 @@ def test_v2_core_account_get_service( api_base="https://api.stripe.com", ) + def test_v2_core_account_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/accounts", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.accounts.create() + http_client_mock.assert_requested( + "post", + path="/v2/core/accounts", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + def test_v2_core_account_get_2_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -33208,7 +33335,7 @@ def test_v2_core_account_get_2_service( api_base="https://api.stripe.com", ) - def test_v2_core_account_post_3_service( + def test_v2_core_account_post_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( @@ -33230,56 +33357,53 @@ def test_v2_core_account_post_3_service( is_json=True, ) - def test_v2_core_accounts_person_post_service( + def test_v2_core_account_post_3_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", - "/v2/core/accounts/account_id_123/persons", + "/v2/core/accounts/id_123/close", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.accounts.persons.create("account_id_123") + client.v2.core.accounts.close("id_123") http_client_mock.assert_requested( "post", - path="/v2/core/accounts/account_id_123/persons", + path="/v2/core/accounts/id_123/close", query_string="", api_base="https://api.stripe.com", post_data="{}", is_json=True, ) - def test_v2_core_accounts_person_delete_service( + def test_v2_core_accounts_person_get_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "delete", - "/v2/core/accounts/account_id_123/persons/id_123", + "get", + "/v2/core/accounts/account_id_123/persons", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.accounts.persons.delete( - "account_id_123", - "id_123", - ) + client.v2.core.accounts.persons.list("account_id_123") http_client_mock.assert_requested( - "delete", - path="/v2/core/accounts/account_id_123/persons/id_123", + "get", + path="/v2/core/accounts/account_id_123/persons", query_string="", api_base="https://api.stripe.com", ) - def test_v2_core_accounts_person_get_service( + def test_v2_core_accounts_person_post_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "get", + "post", "/v2/core/accounts/account_id_123/persons", ) client = StripeClient( @@ -33287,12 +33411,37 @@ def test_v2_core_accounts_person_get_service( http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.accounts.persons.list("account_id_123") + client.v2.core.accounts.persons.create("account_id_123") http_client_mock.assert_requested( - "get", + "post", path="/v2/core/accounts/account_id_123/persons", query_string="", api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_core_accounts_person_delete_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "delete", + "/v2/core/accounts/account_id_123/persons/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.accounts.persons.delete( + "account_id_123", + "id_123", + ) + http_client_mock.assert_requested( + "delete", + path="/v2/core/accounts/account_id_123/persons/id_123", + query_string="", + api_base="https://api.stripe.com", ) def test_v2_core_accounts_person_get_2_service( @@ -33343,43 +33492,24 @@ def test_v2_core_accounts_person_post_2_service( is_json=True, ) - def test_v2_core_account_link_post_service( + def test_v2_core_event_destination_get_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "post", - "/v2/core/account_links", + "get", + "/v2/core/event_destinations", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.account_links.create( - { - "account": "account", - "use_case": { - "type": "account_onboarding", - "account_onboarding": { - "configurations": ["recipient"], - "refresh_url": "refresh_url", - "return_url": "return_url", - }, - "account_update": { - "configurations": ["recipient"], - "refresh_url": "refresh_url", - "return_url": "return_url", - }, - }, - } - ) + client.v2.core.event_destinations.list() http_client_mock.assert_requested( - "post", - path="/v2/core/account_links", + "get", + path="/v2/core/event_destinations", query_string="", api_base="https://api.stripe.com", - post_data='{"account":"account","use_case":{"type":"account_onboarding","account_onboarding":{"configurations":["recipient"],"refresh_url":"refresh_url","return_url":"return_url"},"account_update":{"configurations":["recipient"],"refresh_url":"refresh_url","return_url":"return_url"}}}', - is_json=True, ) def test_v2_core_event_destination_post_service( @@ -33431,68 +33561,68 @@ def test_v2_core_event_destination_delete_service( api_base="https://api.stripe.com", ) - def test_v2_core_event_destination_post_2_service( + def test_v2_core_event_destination_get_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "post", - "/v2/core/event_destinations/id_123/disable", + "get", + "/v2/core/event_destinations/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.event_destinations.disable("id_123") + client.v2.core.event_destinations.retrieve("id_123") http_client_mock.assert_requested( - "post", - path="/v2/core/event_destinations/id_123/disable", + "get", + path="/v2/core/event_destinations/id_123", query_string="", api_base="https://api.stripe.com", - post_data="{}", - is_json=True, ) - def test_v2_core_event_destination_post_3_service( + def test_v2_core_event_destination_post_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", - "/v2/core/event_destinations/id_123/enable", + "/v2/core/event_destinations/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.event_destinations.enable("id_123") + client.v2.core.event_destinations.update("id_123") http_client_mock.assert_requested( "post", - path="/v2/core/event_destinations/id_123/enable", + path="/v2/core/event_destinations/id_123", query_string="", api_base="https://api.stripe.com", post_data="{}", is_json=True, ) - def test_v2_core_event_destination_get_service( + def test_v2_core_event_destination_post_3_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "get", - "/v2/core/event_destinations", + "post", + "/v2/core/event_destinations/id_123/disable", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.event_destinations.list() + client.v2.core.event_destinations.disable("id_123") http_client_mock.assert_requested( - "get", - path="/v2/core/event_destinations", + "post", + path="/v2/core/event_destinations/id_123/disable", query_string="", api_base="https://api.stripe.com", + post_data="{}", + is_json=True, ) def test_v2_core_event_destination_post_4_service( @@ -33500,59 +33630,39 @@ def test_v2_core_event_destination_post_4_service( ) -> None: http_client_mock.stub_request( "post", - "/v2/core/event_destinations/id_123/ping", + "/v2/core/event_destinations/id_123/enable", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.event_destinations.ping("id_123") + client.v2.core.event_destinations.enable("id_123") http_client_mock.assert_requested( "post", - path="/v2/core/event_destinations/id_123/ping", + path="/v2/core/event_destinations/id_123/enable", query_string="", api_base="https://api.stripe.com", post_data="{}", is_json=True, ) - def test_v2_core_event_destination_get_2_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "get", - "/v2/core/event_destinations/id_123", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.core.event_destinations.retrieve("id_123") - http_client_mock.assert_requested( - "get", - path="/v2/core/event_destinations/id_123", - query_string="", - api_base="https://api.stripe.com", - ) - def test_v2_core_event_destination_post_5_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", - "/v2/core/event_destinations/id_123", + "/v2/core/event_destinations/id_123/ping", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.event_destinations.update("id_123") + client.v2.core.event_destinations.ping("id_123") http_client_mock.assert_requested( "post", - path="/v2/core/event_destinations/id_123", + path="/v2/core/event_destinations/id_123/ping", query_string="", api_base="https://api.stripe.com", post_data="{}", @@ -33605,141 +33715,119 @@ def test_v2_core_vault_gb_bank_account_post_service( ) -> None: http_client_mock.stub_request( "post", - "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee", + "/v2/core/vault/gb_bank_accounts", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.vault.gb_bank_accounts.acknowledge_confirmation_of_payee( - "id_123", + client.v2.core.vault.gb_bank_accounts.create( + { + "account_number": "account_number", + "sort_code": "sort_code", + } ) http_client_mock.assert_requested( "post", - path="/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee", + path="/v2/core/vault/gb_bank_accounts", query_string="", api_base="https://api.stripe.com", - post_data="{}", + post_data='{"account_number":"account_number","sort_code":"sort_code"}', is_json=True, ) - def test_v2_core_vault_gb_bank_account_post_2_service( + def test_v2_core_vault_gb_bank_account_get_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "post", - "/v2/core/vault/gb_bank_accounts/id_123/archive", + "get", + "/v2/core/vault/gb_bank_accounts/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.vault.gb_bank_accounts.archive("id_123") + client.v2.core.vault.gb_bank_accounts.retrieve("id_123") http_client_mock.assert_requested( - "post", - path="/v2/core/vault/gb_bank_accounts/id_123/archive", + "get", + path="/v2/core/vault/gb_bank_accounts/id_123", query_string="", api_base="https://api.stripe.com", - post_data="{}", - is_json=True, ) - def test_v2_core_vault_gb_bank_account_post_3_service( + def test_v2_core_vault_gb_bank_account_post_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", - "/v2/core/vault/gb_bank_accounts", + "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.vault.gb_bank_accounts.create( - { - "account_number": "account_number", - "sort_code": "sort_code", - } + client.v2.core.vault.gb_bank_accounts.acknowledge_confirmation_of_payee( + "id_123", ) http_client_mock.assert_requested( "post", - path="/v2/core/vault/gb_bank_accounts", + path="/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee", query_string="", api_base="https://api.stripe.com", - post_data='{"account_number":"account_number","sort_code":"sort_code"}', + post_data="{}", is_json=True, ) - def test_v2_core_vault_gb_bank_account_post_4_service( + def test_v2_core_vault_gb_bank_account_post_3_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", - "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee", + "/v2/core/vault/gb_bank_accounts/id_123/archive", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.vault.gb_bank_accounts.initiate_confirmation_of_payee( - "id_123", - ) + client.v2.core.vault.gb_bank_accounts.archive("id_123") http_client_mock.assert_requested( "post", - path="/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee", + path="/v2/core/vault/gb_bank_accounts/id_123/archive", query_string="", api_base="https://api.stripe.com", post_data="{}", is_json=True, ) - def test_v2_core_vault_gb_bank_account_get_service( + def test_v2_core_vault_gb_bank_account_post_4_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "get", - "/v2/core/vault/gb_bank_accounts/id_123", + "post", + "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.core.vault.gb_bank_accounts.retrieve("id_123") - http_client_mock.assert_requested( - "get", - path="/v2/core/vault/gb_bank_accounts/id_123", - query_string="", - api_base="https://api.stripe.com", - ) - - def test_v2_core_vault_us_bank_account_post_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "post", - "/v2/core/vault/us_bank_accounts/id_123/archive", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), + client.v2.core.vault.gb_bank_accounts.initiate_confirmation_of_payee( + "id_123", ) - - client.v2.core.vault.us_bank_accounts.archive("id_123") http_client_mock.assert_requested( "post", - path="/v2/core/vault/us_bank_accounts/id_123/archive", + path="/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee", query_string="", api_base="https://api.stripe.com", post_data="{}", is_json=True, ) - def test_v2_core_vault_us_bank_account_post_2_service( + def test_v2_core_vault_us_bank_account_post_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( @@ -33785,7 +33873,7 @@ def test_v2_core_vault_us_bank_account_get_service( api_base="https://api.stripe.com", ) - def test_v2_core_vault_us_bank_account_post_3_service( + def test_v2_core_vault_us_bank_account_post_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( @@ -33807,6 +33895,28 @@ def test_v2_core_vault_us_bank_account_post_3_service( is_json=True, ) + def test_v2_core_vault_us_bank_account_post_3_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts/id_123/archive", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.us_bank_accounts.archive("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts/id_123/archive", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + def test_v2_money_management_adjustment_get_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -33887,6 +33997,26 @@ def test_v2_money_management_financial_account_get_2_service( api_base="https://api.stripe.com", ) + def test_v2_money_management_financial_address_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/financial_addresses", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.financial_addresses.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/financial_addresses", + query_string="", + api_base="https://api.stripe.com", + ) + def test_v2_money_management_financial_address_post_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -33914,42 +34044,42 @@ def test_v2_money_management_financial_address_post_service( is_json=True, ) - def test_v2_money_management_financial_address_get_service( + def test_v2_money_management_financial_address_get_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "get", - "/v2/money_management/financial_addresses", + "/v2/money_management/financial_addresses/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.financial_addresses.list() + client.v2.money_management.financial_addresses.retrieve("id_123") http_client_mock.assert_requested( "get", - path="/v2/money_management/financial_addresses", + path="/v2/money_management/financial_addresses/id_123", query_string="", api_base="https://api.stripe.com", ) - def test_v2_money_management_financial_address_get_2_service( + def test_v2_money_management_inbound_transfer_get_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "get", - "/v2/money_management/financial_addresses/id_123", + "/v2/money_management/inbound_transfers", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.financial_addresses.retrieve("id_123") + client.v2.money_management.inbound_transfers.list() http_client_mock.assert_requested( "get", - path="/v2/money_management/financial_addresses/id_123", + path="/v2/money_management/inbound_transfers", query_string="", api_base="https://api.stripe.com", ) @@ -33988,26 +34118,6 @@ def test_v2_money_management_inbound_transfer_post_service( is_json=True, ) - def test_v2_money_management_inbound_transfer_get_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "get", - "/v2/money_management/inbound_transfers", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.money_management.inbound_transfers.list() - http_client_mock.assert_requested( - "get", - path="/v2/money_management/inbound_transfers", - query_string="", - api_base="https://api.stripe.com", - ) - def test_v2_money_management_inbound_transfer_get_2_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -34028,41 +34138,19 @@ def test_v2_money_management_inbound_transfer_get_2_service( api_base="https://api.stripe.com", ) - def test_v2_money_management_outbound_payment_post_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "post", - "/v2/money_management/outbound_payments/id_123/cancel", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.money_management.outbound_payments.cancel("id_123") - http_client_mock.assert_requested( - "post", - path="/v2/money_management/outbound_payments/id_123/cancel", - query_string="", - api_base="https://api.stripe.com", - post_data="{}", - is_json=True, - ) - - def test_v2_money_management_outbound_payment_post_2_service( + def test_v2_money_management_outbound_payment_quote_post_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", - "/v2/money_management/outbound_payments", + "/v2/money_management/outbound_payment_quotes", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.outbound_payments.create( + client.v2.money_management.outbound_payment_quotes.create( { "amount": {"currency": "USD", "value": 96}, "from": { @@ -34078,66 +34166,66 @@ def test_v2_money_management_outbound_payment_post_2_service( ) http_client_mock.assert_requested( "post", - path="/v2/money_management/outbound_payments", + path="/v2/money_management/outbound_payment_quotes", query_string="", api_base="https://api.stripe.com", post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"currency","financial_account":"financial_account"},"to":{"currency":"currency","payout_method":"payout_method","recipient":"recipient"}}', is_json=True, ) - def test_v2_money_management_outbound_payment_get_service( + def test_v2_money_management_outbound_payment_quote_get_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "get", - "/v2/money_management/outbound_payments", + "/v2/money_management/outbound_payment_quotes/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.outbound_payments.list() + client.v2.money_management.outbound_payment_quotes.retrieve("id_123") http_client_mock.assert_requested( "get", - path="/v2/money_management/outbound_payments", + path="/v2/money_management/outbound_payment_quotes/id_123", query_string="", api_base="https://api.stripe.com", ) - def test_v2_money_management_outbound_payment_get_2_service( + def test_v2_money_management_outbound_payment_get_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "get", - "/v2/money_management/outbound_payments/id_123", + "/v2/money_management/outbound_payments", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.outbound_payments.retrieve("id_123") + client.v2.money_management.outbound_payments.list() http_client_mock.assert_requested( "get", - path="/v2/money_management/outbound_payments/id_123", + path="/v2/money_management/outbound_payments", query_string="", api_base="https://api.stripe.com", ) - def test_v2_money_management_outbound_payment_quote_post_service( + def test_v2_money_management_outbound_payment_post_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", - "/v2/money_management/outbound_payment_quotes", + "/v2/money_management/outbound_payments", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.outbound_payment_quotes.create( + client.v2.money_management.outbound_payments.create( { "amount": {"currency": "USD", "value": 96}, "from": { @@ -34153,130 +34241,140 @@ def test_v2_money_management_outbound_payment_quote_post_service( ) http_client_mock.assert_requested( "post", - path="/v2/money_management/outbound_payment_quotes", + path="/v2/money_management/outbound_payments", query_string="", api_base="https://api.stripe.com", post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"currency","financial_account":"financial_account"},"to":{"currency":"currency","payout_method":"payout_method","recipient":"recipient"}}', is_json=True, ) - def test_v2_money_management_outbound_payment_quote_get_service( + def test_v2_money_management_outbound_payment_get_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "get", - "/v2/money_management/outbound_payment_quotes/id_123", + "/v2/money_management/outbound_payments/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.outbound_payment_quotes.retrieve("id_123") + client.v2.money_management.outbound_payments.retrieve("id_123") http_client_mock.assert_requested( "get", - path="/v2/money_management/outbound_payment_quotes/id_123", + path="/v2/money_management/outbound_payments/id_123", query_string="", api_base="https://api.stripe.com", ) - def test_v2_money_management_outbound_transfer_post_service( + def test_v2_money_management_outbound_payment_post_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", - "/v2/money_management/outbound_transfers/id_123/cancel", + "/v2/money_management/outbound_payments/id_123/cancel", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.outbound_transfers.cancel("id_123") + client.v2.money_management.outbound_payments.cancel("id_123") http_client_mock.assert_requested( "post", - path="/v2/money_management/outbound_transfers/id_123/cancel", + path="/v2/money_management/outbound_payments/id_123/cancel", query_string="", api_base="https://api.stripe.com", post_data="{}", is_json=True, ) - def test_v2_money_management_outbound_transfer_post_2_service( + def test_v2_money_management_outbound_setup_intent_get_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "post", - "/v2/money_management/outbound_transfers", + "get", + "/v2/money_management/outbound_setup_intents", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.outbound_transfers.create( - { - "amount": {"currency": "USD", "value": 96}, - "from": { - "currency": "currency", - "financial_account": "financial_account", - }, - "to": { - "currency": "currency", - "payout_method": "payout_method", - }, - } + client.v2.money_management.outbound_setup_intents.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/outbound_setup_intents", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_outbound_setup_intent_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/outbound_setup_intents", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), ) + + client.v2.money_management.outbound_setup_intents.create() http_client_mock.assert_requested( "post", - path="/v2/money_management/outbound_transfers", + path="/v2/money_management/outbound_setup_intents", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"currency","financial_account":"financial_account"},"to":{"currency":"currency","payout_method":"payout_method"}}', + post_data="{}", is_json=True, ) - def test_v2_money_management_outbound_transfer_get_service( + def test_v2_money_management_outbound_setup_intent_get_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "get", - "/v2/money_management/outbound_transfers", + "/v2/money_management/outbound_setup_intents/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.outbound_transfers.list() + client.v2.money_management.outbound_setup_intents.retrieve("id_123") http_client_mock.assert_requested( "get", - path="/v2/money_management/outbound_transfers", + path="/v2/money_management/outbound_setup_intents/id_123", query_string="", api_base="https://api.stripe.com", ) - def test_v2_money_management_outbound_transfer_get_2_service( + def test_v2_money_management_outbound_setup_intent_post_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "get", - "/v2/money_management/outbound_transfers/id_123", + "post", + "/v2/money_management/outbound_setup_intents/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.outbound_transfers.retrieve("id_123") + client.v2.money_management.outbound_setup_intents.update("id_123") http_client_mock.assert_requested( - "get", - path="/v2/money_management/outbound_transfers/id_123", + "post", + path="/v2/money_management/outbound_setup_intents/id_123", query_string="", api_base="https://api.stripe.com", + post_data="{}", + is_json=True, ) - def test_v2_money_management_outbound_setup_intent_post_service( + def test_v2_money_management_outbound_setup_intent_post_3_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( @@ -34298,150 +34396,162 @@ def test_v2_money_management_outbound_setup_intent_post_service( is_json=True, ) - def test_v2_money_management_outbound_setup_intent_post_2_service( + def test_v2_money_management_outbound_transfer_get_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "post", - "/v2/money_management/outbound_setup_intents", + "get", + "/v2/money_management/outbound_transfers", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.outbound_setup_intents.create() + client.v2.money_management.outbound_transfers.list() http_client_mock.assert_requested( - "post", - path="/v2/money_management/outbound_setup_intents", + "get", + path="/v2/money_management/outbound_transfers", query_string="", api_base="https://api.stripe.com", - post_data="{}", - is_json=True, ) - def test_v2_money_management_outbound_setup_intent_get_service( + def test_v2_money_management_outbound_transfer_post_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "get", - "/v2/money_management/outbound_setup_intents", + "post", + "/v2/money_management/outbound_transfers", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.outbound_setup_intents.list() + client.v2.money_management.outbound_transfers.create( + { + "amount": {"currency": "USD", "value": 96}, + "from": { + "currency": "currency", + "financial_account": "financial_account", + }, + "to": { + "currency": "currency", + "payout_method": "payout_method", + }, + } + ) http_client_mock.assert_requested( - "get", - path="/v2/money_management/outbound_setup_intents", + "post", + path="/v2/money_management/outbound_transfers", query_string="", api_base="https://api.stripe.com", + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"currency","financial_account":"financial_account"},"to":{"currency":"currency","payout_method":"payout_method"}}', + is_json=True, ) - def test_v2_money_management_outbound_setup_intent_get_2_service( + def test_v2_money_management_outbound_transfer_get_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "get", - "/v2/money_management/outbound_setup_intents/id_123", + "/v2/money_management/outbound_transfers/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.outbound_setup_intents.retrieve("id_123") + client.v2.money_management.outbound_transfers.retrieve("id_123") http_client_mock.assert_requested( "get", - path="/v2/money_management/outbound_setup_intents/id_123", + path="/v2/money_management/outbound_transfers/id_123", query_string="", api_base="https://api.stripe.com", ) - def test_v2_money_management_outbound_setup_intent_post_3_service( + def test_v2_money_management_outbound_transfer_post_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", - "/v2/money_management/outbound_setup_intents/id_123", + "/v2/money_management/outbound_transfers/id_123/cancel", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.outbound_setup_intents.update("id_123") + client.v2.money_management.outbound_transfers.cancel("id_123") http_client_mock.assert_requested( "post", - path="/v2/money_management/outbound_setup_intents/id_123", + path="/v2/money_management/outbound_transfers/id_123/cancel", query_string="", api_base="https://api.stripe.com", post_data="{}", is_json=True, ) - def test_v2_money_management_payout_method_post_service( + def test_v2_money_management_payout_method_get_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "post", - "/v2/money_management/payout_methods/id_123/archive", + "get", + "/v2/money_management/payout_methods", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.payout_methods.archive("id_123") + client.v2.money_management.payout_methods.list() http_client_mock.assert_requested( - "post", - path="/v2/money_management/payout_methods/id_123/archive", + "get", + path="/v2/money_management/payout_methods", query_string="", api_base="https://api.stripe.com", - post_data="{}", - is_json=True, ) - def test_v2_money_management_payout_method_get_service( + def test_v2_money_management_payout_method_get_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "get", - "/v2/money_management/payout_methods", + "/v2/money_management/payout_methods/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.payout_methods.list() + client.v2.money_management.payout_methods.retrieve("id_123") http_client_mock.assert_requested( "get", - path="/v2/money_management/payout_methods", + path="/v2/money_management/payout_methods/id_123", query_string="", api_base="https://api.stripe.com", ) - def test_v2_money_management_payout_method_get_2_service( + def test_v2_money_management_payout_method_post_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "get", - "/v2/money_management/payout_methods/id_123", + "post", + "/v2/money_management/payout_methods/id_123/archive", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.payout_methods.retrieve("id_123") + client.v2.money_management.payout_methods.archive("id_123") http_client_mock.assert_requested( - "get", - path="/v2/money_management/payout_methods/id_123", + "post", + path="/v2/money_management/payout_methods/id_123/archive", query_string="", api_base="https://api.stripe.com", + post_data="{}", + is_json=True, ) def test_v2_money_management_payout_method_post_2_service( @@ -34566,193 +34676,175 @@ def test_v2_money_management_received_debit_get_2_service( api_base="https://api.stripe.com", ) - def test_v2_money_management_transaction_get_service( + def test_v2_money_management_transaction_entry_get_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "get", - "/v2/money_management/transactions", + "/v2/money_management/transaction_entries", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.transactions.list() + client.v2.money_management.transaction_entries.list() http_client_mock.assert_requested( "get", - path="/v2/money_management/transactions", + path="/v2/money_management/transaction_entries", query_string="", api_base="https://api.stripe.com", ) - def test_v2_money_management_transaction_get_2_service( + def test_v2_money_management_transaction_entry_get_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "get", - "/v2/money_management/transactions/id_123", + "/v2/money_management/transaction_entries/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.transactions.retrieve("id_123") + client.v2.money_management.transaction_entries.retrieve("id_123") http_client_mock.assert_requested( "get", - path="/v2/money_management/transactions/id_123", + path="/v2/money_management/transaction_entries/id_123", query_string="", api_base="https://api.stripe.com", ) - def test_v2_money_management_transaction_entry_get_service( + def test_v2_money_management_transaction_get_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "get", - "/v2/money_management/transaction_entries", + "/v2/money_management/transactions", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.transaction_entries.list() + client.v2.money_management.transactions.list() http_client_mock.assert_requested( "get", - path="/v2/money_management/transaction_entries", + path="/v2/money_management/transactions", query_string="", api_base="https://api.stripe.com", ) - def test_v2_money_management_transaction_entry_get_2_service( + def test_v2_money_management_transaction_get_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "get", - "/v2/money_management/transaction_entries/id_123", + "/v2/money_management/transactions/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.money_management.transaction_entries.retrieve("id_123") + client.v2.money_management.transactions.retrieve("id_123") http_client_mock.assert_requested( "get", - path="/v2/money_management/transaction_entries/id_123", + path="/v2/money_management/transactions/id_123", query_string="", api_base="https://api.stripe.com", ) - def test_v2_billing_meter_event_session_post_service( + def test_v2_payments_off_session_payment_get_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "post", - "/v2/billing/meter_event_session", + "get", + "/v2/payments/off_session_payments", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.billing.meter_event_session.create() + client.v2.payments.off_session_payments.list() http_client_mock.assert_requested( - "post", - path="/v2/billing/meter_event_session", + "get", + path="/v2/payments/off_session_payments", query_string="", api_base="https://api.stripe.com", - post_data="{}", - is_json=True, ) - def test_v2_billing_meter_event_adjustment_post_service( + def test_v2_payments_off_session_payment_post_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", - "/v2/billing/meter_event_adjustments", + "/v2/payments/off_session_payments", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.billing.meter_event_adjustments.create( + client.v2.payments.off_session_payments.create( { - "cancel": {"identifier": "identifier"}, - "event_name": "event_name", - "type": "cancel", + "amount": {"currency": "USD", "value": 96}, + "cadence": "unscheduled", + "customer": "customer", + "metadata": {"undefined": "metadata"}, + "payment_method": "payment_method", } ) http_client_mock.assert_requested( "post", - path="/v2/billing/meter_event_adjustments", + path="/v2/payments/off_session_payments", query_string="", api_base="https://api.stripe.com", - post_data='{"cancel":{"identifier":"identifier"},"event_name":"event_name","type":"cancel"}', + post_data='{"amount":{"currency":"USD","value":96},"cadence":"unscheduled","customer":"customer","metadata":{"undefined":"metadata"},"payment_method":"payment_method"}', is_json=True, ) - def test_v2_billing_meter_event_stream_post_service( + def test_v2_payments_off_session_payment_get_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "post", - "/v2/billing/meter_event_stream", + "get", + "/v2/payments/off_session_payments/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.billing.meter_event_stream.create( - { - "events": [ - { - "event_name": "event_name", - "identifier": "identifier", - "payload": {"undefined": "payload"}, - "timestamp": "1970-01-01T15:18:46.294Z", - }, - ], - } - ) + client.v2.payments.off_session_payments.retrieve("id_123") http_client_mock.assert_requested( - "post", - path="/v2/billing/meter_event_stream", + "get", + path="/v2/payments/off_session_payments/id_123", query_string="", - api_base="https://meter-events.stripe.com", - post_data='{"events":[{"event_name":"event_name","identifier":"identifier","payload":{"undefined":"payload"},"timestamp":"1970-01-01T15:18:46.294Z"}]}', - is_json=True, + api_base="https://api.stripe.com", ) - def test_v2_billing_meter_event_post_service( + def test_v2_payments_off_session_payment_post_2_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", - "/v2/billing/meter_events", + "/v2/payments/off_session_payments/id_123/cancel", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.billing.meter_events.create( - { - "event_name": "event_name", - "payload": {"undefined": "payload"}, - } - ) + client.v2.payments.off_session_payments.cancel("id_123") http_client_mock.assert_requested( "post", - path="/v2/billing/meter_events", + path="/v2/payments/off_session_payments/id_123/cancel", query_string="", api_base="https://api.stripe.com", - post_data='{"event_name":"event_name","payload":{"undefined":"payload"}}', + post_data="{}", is_json=True, ) @@ -34805,98 +34897,6 @@ def test_v2_test_helpers_financial_address_post_2_service( is_json=True, ) - def test_v2_payments_off_session_payment_post_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "post", - "/v2/payments/off_session_payments/id_123/cancel", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.payments.off_session_payments.cancel("id_123") - http_client_mock.assert_requested( - "post", - path="/v2/payments/off_session_payments/id_123/cancel", - query_string="", - api_base="https://api.stripe.com", - post_data="{}", - is_json=True, - ) - - def test_v2_payments_off_session_payment_post_2_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "post", - "/v2/payments/off_session_payments", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.payments.off_session_payments.create( - { - "amount": {"currency": "USD", "value": 96}, - "cadence": "unscheduled", - "customer": "customer", - "metadata": {"undefined": "metadata"}, - "payment_method": "payment_method", - } - ) - http_client_mock.assert_requested( - "post", - path="/v2/payments/off_session_payments", - query_string="", - api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"cadence":"unscheduled","customer":"customer","metadata":{"undefined":"metadata"},"payment_method":"payment_method"}', - is_json=True, - ) - - def test_v2_payments_off_session_payment_get_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "get", - "/v2/payments/off_session_payments", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.payments.off_session_payments.list() - http_client_mock.assert_requested( - "get", - path="/v2/payments/off_session_payments", - query_string="", - api_base="https://api.stripe.com", - ) - - def test_v2_payments_off_session_payment_get_2_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "get", - "/v2/payments/off_session_payments/id_123", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.payments.off_session_payments.retrieve("id_123") - http_client_mock.assert_requested( - "get", - path="/v2/payments/off_session_payments/id_123", - query_string="", - api_base="https://api.stripe.com", - ) - def test_temporary_session_expired_error_service( self, http_client_mock: HTTPClientMock ) -> None: From 42c1bd0ee254e345bd778b6bc949299acf633d05 Mon Sep 17 00:00:00 2001 From: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> Date: Mon, 30 Jun 2025 15:55:55 -0700 Subject: [PATCH 28/28] Fix the link to releases page from readme (#1534) * Fix the link to releases page from readme * Simplify text --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0a9b10f98..412e800af 100644 --- a/README.md +++ b/README.md @@ -248,10 +248,10 @@ be aware that the data you see at runtime may not match the types. ### Public Preview SDKs -Stripe has features in the [public preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-beta.X` suffix like `12.2.0-beta.2`. +Stripe has features in the [public preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `-bX` suffix like `12.2.0b2`. We would love for you to try these as we incrementally release new features and improve them based on your feedback. -The public preview SDKs are different versions of the same package as the stable SDKs. They are appended with `b.X` such as `10.1.0b1`. To install, choose the version that includes support for the preview feature you are interested in by reviewing the [releases page](https://github.com/stripe/stripe-dotnet/releases/) and then use it in the `pip install` command: +To install, choose the version that includes support for the preview feature you are interested in by reviewing the [releases page](https://github.com/stripe/stripe-python/releases/) and then use it in the `pip install` command: ``` pip install stripe==