From b106d48e46e8cc3d7175397946517e1650378318 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 22:57:52 +0000 Subject: [PATCH 1/2] Update generated code (#1300) * Update generated code for v942 * Update generated code for v943 * Update generated code for v944 * Update generated code for v945 * Update generated code for v946 * Update generated code for v947 * Update generated code for v948 * Update generated code for v949 * Update generated code for v950 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_account.py | 4 +- stripe/_account_session.py | 90 +++++++++++- stripe/_account_session_service.py | 53 ++++++- stripe/_bank_account.py | 4 +- stripe/_capability.py | 4 +- stripe/_charge.py | 13 +- stripe/_charge_service.py | 4 +- stripe/_confirmation_token.py | 16 +++ stripe/_customer.py | 13 +- stripe/_customer_payment_method_service.py | 1 + stripe/_customer_service.py | 6 +- stripe/_customer_tax_id_service.py | 6 +- stripe/_invoice.py | 37 ++++- stripe/_invoice_service.py | 14 +- stripe/_invoice_upcoming_lines_service.py | 6 +- stripe/_payment_intent.py | 136 +++++++++++++++++- stripe/_payment_intent_service.py | 120 +++++++++++++++- stripe/_payment_method.py | 15 ++ stripe/_payment_method_configuration.py | 64 +++++++++ .../_payment_method_configuration_service.py | 40 ++++++ stripe/_payment_method_service.py | 9 ++ stripe/_person.py | 4 +- stripe/_refund.py | 5 + stripe/_reversal.py | 2 +- stripe/_setup_attempt.py | 4 + stripe/_setup_intent.py | 82 ++++++++++- stripe/_setup_intent_service.py | 69 ++++++++- stripe/_subscription.py | 15 +- stripe/_subscription_service.py | 8 +- stripe/_tax_id.py | 12 +- stripe/_tax_id_service.py | 6 +- stripe/_usage_record.py | 2 + stripe/billing/_meter.py | 2 +- stripe/billing/_meter_event_adjustment.py | 21 +-- .../_meter_event_adjustment_service.py | 8 +- stripe/billing_portal/_session.py | 4 +- stripe/billing_portal/_session_service.py | 2 +- stripe/checkout/_session.py | 36 ++++- stripe/checkout/_session_service.py | 21 ++- stripe/financial_connections/_account.py | 4 + stripe/tax/_calculation.py | 12 +- stripe/tax/_calculation_service.py | 6 +- stripe/tax/_transaction.py | 6 +- .../_confirmation_token_service.py | 10 ++ 45 files changed, 916 insertions(+), 82 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 33b0af258..b18a87edc 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v940 +v950 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index b6de1a7f5..a813c1bf7 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -745,7 +745,7 @@ class Error(StripeObject): """ pending_verification: Optional[List[str]] """ - Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. + Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. """ _inner_class_types = {"alternatives": Alternative, "errors": Error} @@ -893,7 +893,7 @@ class Error(StripeObject): """ pending_verification: Optional[List[str]] """ - Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. """ _inner_class_types = {"alternatives": Alternative, "errors": Error} diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 042c43bbb..f5e746ab0 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -21,9 +21,26 @@ class AccountSession(CreateableAPIResource["AccountSession"]): OBJECT_NAME: ClassVar[Literal["account_session"]] = "account_session" class Components(StripeObject): + class AccountManagement(StripeObject): + class Features(StripeObject): + external_account_collection: bool + """ + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ + + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: Features + _inner_class_types = {"features": Features} + class AccountOnboarding(StripeObject): class Features(StripeObject): - pass + external_account_collection: bool + """ + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ enabled: bool """ @@ -43,6 +60,20 @@ class Features(StripeObject): features: Features _inner_class_types = {"features": Features} + class NotificationBanner(StripeObject): + class Features(StripeObject): + external_account_collection: bool + """ + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ + + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: Features + _inner_class_types = {"features": Features} + class PaymentDetails(StripeObject): class Features(StripeObject): capture_payments: bool @@ -117,14 +148,18 @@ class Features(StripeObject): features: Features _inner_class_types = {"features": Features} + account_management: AccountManagement account_onboarding: AccountOnboarding documents: Documents + notification_banner: NotificationBanner payment_details: PaymentDetails payments: Payments payouts: Payouts _inner_class_types = { + "account_management": AccountManagement, "account_onboarding": AccountOnboarding, "documents": Documents, + "notification_banner": NotificationBanner, "payment_details": PaymentDetails, "payments": Payments, "payouts": Payouts, @@ -145,6 +180,12 @@ class CreateParams(RequestOptions): """ class CreateParamsComponents(TypedDict): + account_management: NotRequired[ + "AccountSession.CreateParamsComponentsAccountManagement" + ] + """ + Configuration for the account management embedded component. + """ account_onboarding: NotRequired[ "AccountSession.CreateParamsComponentsAccountOnboarding" ] @@ -157,6 +198,12 @@ class CreateParamsComponents(TypedDict): """ Configuration for the documents embedded component. """ + notification_banner: NotRequired[ + "AccountSession.CreateParamsComponentsNotificationBanner" + ] + """ + Configuration for the notification banner embedded component. + """ payment_details: NotRequired[ "AccountSession.CreateParamsComponentsPaymentDetails" ] @@ -172,6 +219,24 @@ class CreateParamsComponents(TypedDict): Configuration for the payouts embedded component. """ + class CreateParamsComponentsAccountManagement(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSession.CreateParamsComponentsAccountManagementFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + class CreateParamsComponentsAccountManagementFeatures(TypedDict): + 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 custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ + class CreateParamsComponentsAccountOnboarding(TypedDict): enabled: bool """ @@ -185,7 +250,10 @@ class CreateParamsComponentsAccountOnboarding(TypedDict): """ class CreateParamsComponentsAccountOnboardingFeatures(TypedDict): - pass + 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 custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ class CreateParamsComponentsDocuments(TypedDict): enabled: bool @@ -202,6 +270,24 @@ class CreateParamsComponentsDocuments(TypedDict): class CreateParamsComponentsDocumentsFeatures(TypedDict): pass + class CreateParamsComponentsNotificationBanner(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSession.CreateParamsComponentsNotificationBannerFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + class CreateParamsComponentsNotificationBannerFeatures(TypedDict): + 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 custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ + class CreateParamsComponentsPaymentDetails(TypedDict): enabled: bool """ diff --git a/stripe/_account_session_service.py b/stripe/_account_session_service.py index d3096d4f3..e8bcac6c6 100644 --- a/stripe/_account_session_service.py +++ b/stripe/_account_session_service.py @@ -23,6 +23,12 @@ class CreateParams(TypedDict): """ class CreateParamsComponents(TypedDict): + account_management: NotRequired[ + "AccountSessionService.CreateParamsComponentsAccountManagement" + ] + """ + Configuration for the account management embedded component. + """ account_onboarding: NotRequired[ "AccountSessionService.CreateParamsComponentsAccountOnboarding" ] @@ -35,6 +41,12 @@ class CreateParamsComponents(TypedDict): """ Configuration for the documents embedded component. """ + notification_banner: NotRequired[ + "AccountSessionService.CreateParamsComponentsNotificationBanner" + ] + """ + Configuration for the notification banner embedded component. + """ payment_details: NotRequired[ "AccountSessionService.CreateParamsComponentsPaymentDetails" ] @@ -54,6 +66,24 @@ class CreateParamsComponents(TypedDict): Configuration for the payouts embedded component. """ + class CreateParamsComponentsAccountManagement(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionService.CreateParamsComponentsAccountManagementFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + class CreateParamsComponentsAccountManagementFeatures(TypedDict): + 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 custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ + class CreateParamsComponentsAccountOnboarding(TypedDict): enabled: bool """ @@ -67,7 +97,10 @@ class CreateParamsComponentsAccountOnboarding(TypedDict): """ class CreateParamsComponentsAccountOnboardingFeatures(TypedDict): - pass + 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 custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ class CreateParamsComponentsDocuments(TypedDict): enabled: bool @@ -84,6 +117,24 @@ class CreateParamsComponentsDocuments(TypedDict): class CreateParamsComponentsDocumentsFeatures(TypedDict): pass + class CreateParamsComponentsNotificationBanner(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionService.CreateParamsComponentsNotificationBannerFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + class CreateParamsComponentsNotificationBannerFeatures(TypedDict): + 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 custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ + class CreateParamsComponentsPaymentDetails(TypedDict): enabled: bool """ diff --git a/stripe/_bank_account.py b/stripe/_bank_account.py index 049e0859b..39e2d806d 100644 --- a/stripe/_bank_account.py +++ b/stripe/_bank_account.py @@ -152,7 +152,7 @@ class Error(StripeObject): """ pending_verification: Optional[List[str]] """ - Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. """ _inner_class_types = {"errors": Error} @@ -274,7 +274,7 @@ class Error(StripeObject): """ pending_verification: Optional[List[str]] """ - Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. """ _inner_class_types = {"errors": Error} diff --git a/stripe/_capability.py b/stripe/_capability.py index b4846bdfa..8dc7d3185 100644 --- a/stripe/_capability.py +++ b/stripe/_capability.py @@ -162,7 +162,7 @@ class Error(StripeObject): """ pending_verification: List[str] """ - Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. + Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. """ _inner_class_types = {"alternatives": Alternative, "errors": Error} @@ -316,7 +316,7 @@ class Error(StripeObject): """ pending_verification: List[str] """ - Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. """ _inner_class_types = {"alternatives": Alternative, "errors": Error} diff --git a/stripe/_charge.py b/stripe/_charge.py index ecdd97c3e..ecb49d523 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -279,6 +279,9 @@ class Alipay(StripeObject): Transaction ID of this particular Alipay transaction. """ + class AmazonPay(StripeObject): + pass + class AuBecsDebit(StripeObject): bsb_number: Optional[str] """ @@ -1575,6 +1578,7 @@ class Zip(StripeObject): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] bancontact: Optional[Bancontact] @@ -1624,6 +1628,7 @@ class Zip(StripeObject): "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "amazon_pay": AmazonPay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, "bancontact": Bancontact, @@ -1776,7 +1781,7 @@ class CreateParams(RequestOptions): application_fee: NotRequired[int] application_fee_amount: NotRequired[int] """ - A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). + A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees). """ capture: NotRequired[bool] """ @@ -1805,7 +1810,7 @@ class CreateParams(RequestOptions): """ on_behalf_of: NotRequired[str] """ - The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). + The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). """ radar_options: NotRequired["Charge.CreateParamsRadarOptions"] """ @@ -2120,11 +2125,11 @@ class SearchParams(RequestOptions): """ application_fee: Optional[ExpandableField["ApplicationFee"]] """ - The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. + The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. """ application_fee_amount: Optional[int] """ - The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. + The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. """ authorization_code: Optional[str] """ diff --git a/stripe/_charge_service.py b/stripe/_charge_service.py index f7ffe65b6..eeb199f83 100644 --- a/stripe/_charge_service.py +++ b/stripe/_charge_service.py @@ -63,7 +63,7 @@ class CreateParams(TypedDict): application_fee: NotRequired[int] application_fee_amount: NotRequired[int] """ - A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). + A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees). """ capture: NotRequired[bool] """ @@ -92,7 +92,7 @@ class CreateParams(TypedDict): """ on_behalf_of: NotRequired[str] """ - The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). + The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). """ radar_options: NotRequired["ChargeService.CreateParamsRadarOptions"] """ diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index f00c11ace..b569a400f 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -93,6 +93,9 @@ class AfterpayClearpay(StripeObject): class Alipay(StripeObject): pass + class AmazonPay(StripeObject): + pass + class AuBecsDebit(StripeObject): bsb_number: Optional[str] """ @@ -1011,6 +1014,7 @@ class Zip(StripeObject): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] bancontact: Optional[Bancontact] @@ -1046,6 +1050,7 @@ class Zip(StripeObject): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -1090,6 +1095,7 @@ class Zip(StripeObject): "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "amazon_pay": AmazonPay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, "bancontact": Bancontact, @@ -1218,6 +1224,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired[ + "ConfirmationToken.CreateParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "ConfirmationToken.CreateParamsPaymentMethodDataAuBecsDebit" ] @@ -1393,6 +1405,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -1466,6 +1479,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): + pass + class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): account_number: str """ diff --git a/stripe/_customer.py b/stripe/_customer.py index a0675d953..0d6f32fcc 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -511,6 +511,7 @@ class CreateParamsTaxIdDatum(TypedDict): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -544,14 +545,17 @@ class CreateParamsTaxIdDatum(TypedDict): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -574,7 +578,7 @@ class CreateParamsTaxIdDatum(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -608,6 +612,7 @@ class CreateTaxIdParams(RequestOptions): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -641,14 +646,17 @@ class CreateTaxIdParams(RequestOptions): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -671,7 +679,7 @@ class CreateTaxIdParams(RequestOptions): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -818,6 +826,7 @@ class ListPaymentMethodsParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", diff --git a/stripe/_customer_payment_method_service.py b/stripe/_customer_payment_method_service.py index 0d8741e8c..2391597d0 100644 --- a/stripe/_customer_payment_method_service.py +++ b/stripe/_customer_payment_method_service.py @@ -33,6 +33,7 @@ class ListParams(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", diff --git a/stripe/_customer_service.py b/stripe/_customer_service.py index 5329693b9..c156dc5ae 100644 --- a/stripe/_customer_service.py +++ b/stripe/_customer_service.py @@ -276,6 +276,7 @@ class CreateParamsTaxIdDatum(TypedDict): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -309,14 +310,17 @@ class CreateParamsTaxIdDatum(TypedDict): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -339,7 +343,7 @@ class CreateParamsTaxIdDatum(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_customer_tax_id_service.py b/stripe/_customer_tax_id_service.py index 2b89ca5e1..5a23a05a6 100644 --- a/stripe/_customer_tax_id_service.py +++ b/stripe/_customer_tax_id_service.py @@ -22,6 +22,7 @@ class CreateParams(TypedDict): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -55,14 +56,17 @@ class CreateParams(TypedDict): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -85,7 +89,7 @@ class CreateParams(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_invoice.py b/stripe/_invoice.py index a47feeeee..da4dcf7c9 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -212,6 +212,7 @@ class CustomerTaxId(StripeObject): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -245,14 +246,17 @@ class CustomerTaxId(StripeObject): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -276,7 +280,7 @@ class CustomerTaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, or `unknown` """ value: Optional[str] """ @@ -333,6 +337,10 @@ class LastFinalizationError(StripeObject): "bank_account_unverified", "bank_account_verification_failed", "billing_invalid_mandate", + "billing_policy_remote_function_response_invalid", + "billing_policy_remote_function_timeout", + "billing_policy_remote_function_unexpected_status_code", + "billing_policy_remote_function_unreachable", "bitcoin_upgrade_required", "capture_charge_authorization_expired", "capture_unauthorized_payment", @@ -638,7 +646,10 @@ class FinancialConnections(StripeObject): permissions: Optional[ List[ Literal[ - "balances", "payment_method", "transactions" + "balances", + "ownership", + "payment_method", + "transactions", ] ] ] @@ -646,7 +657,7 @@ class FinancialConnections(StripeObject): The list of permissions to request. The `payment_method` permission must be included. """ prefetch: Optional[ - List[Literal["balances", "transactions"]] + List[Literal["balances", "ownership", "transactions"]] ] """ Data features requested to be retrieved upon account creation. @@ -1383,7 +1394,9 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ @@ -2056,7 +2069,9 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ @@ -2566,6 +2581,7 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -2599,14 +2615,17 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -2629,7 +2648,7 @@ class UpcomingLinesParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -3126,6 +3145,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -3159,14 +3179,17 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -3189,7 +3212,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 6f270532a..d21530752 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -431,7 +431,9 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ @@ -1027,6 +1029,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -1060,14 +1063,17 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -1090,7 +1096,7 @@ class UpcomingParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -1736,7 +1742,9 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ diff --git a/stripe/_invoice_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index a6d964731..a4e7d4c73 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -267,6 +267,7 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -300,14 +301,17 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -330,7 +334,7 @@ class ListParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 418a8fcaf..f940285cd 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -118,6 +118,10 @@ class LastPaymentError(StripeObject): "bank_account_unverified", "bank_account_verification_failed", "billing_invalid_mandate", + "billing_policy_remote_function_response_invalid", + "billing_policy_remote_function_timeout", + "billing_policy_remote_function_unexpected_status_code", + "billing_policy_remote_function_unreachable", "bitcoin_upgrade_required", "capture_charge_authorization_expired", "capture_unauthorized_payment", @@ -1022,6 +1026,12 @@ class Alipay(StripeObject): When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). """ + class AmazonPay(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class AuBecsDebit(StripeObject): setup_future_usage: Optional[ Literal["none", "off_session", "on_session"] @@ -1618,7 +1628,9 @@ class FinancialConnections(StripeObject): """ The list of permissions to request. The `payment_method` permission must be included. """ - prefetch: Optional[List[Literal["balances", "transactions"]]] + prefetch: Optional[ + List[Literal["balances", "ownership", "transactions"]] + ] """ Data features requested to be retrieved upon account creation. """ @@ -1694,6 +1706,7 @@ class Zip(StripeObject): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] bancontact: Optional[Bancontact] @@ -1731,6 +1744,7 @@ class Zip(StripeObject): "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "amazon_pay": AmazonPay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, "bancontact": Bancontact, @@ -2077,6 +2091,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired[ + "PaymentIntent.ConfirmParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "PaymentIntent.ConfirmParamsPaymentMethodDataAuBecsDebit" ] @@ -2242,6 +2262,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -2315,6 +2336,9 @@ class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ConfirmParamsPaymentMethodDataAlipay(TypedDict): pass + class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataAuBecsDebit(TypedDict): account_number: str """ @@ -2661,6 +2685,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + amazon_pay: NotRequired[ + "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + """ au_becs_debit: NotRequired[ "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAuBecsDebit" ] @@ -2965,6 +2995,26 @@ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + + If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ + class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" @@ -3870,7 +3920,9 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ @@ -4212,6 +4264,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired[ + "PaymentIntent.CreateParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "PaymentIntent.CreateParamsPaymentMethodDataAuBecsDebit" ] @@ -4377,6 +4435,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -4450,6 +4509,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): + pass + class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): account_number: str """ @@ -4796,6 +4858,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + amazon_pay: NotRequired[ + "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + """ au_becs_debit: NotRequired[ "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAuBecsDebit" ] @@ -5100,6 +5168,26 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + + If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" @@ -6005,7 +6093,9 @@ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ @@ -6343,6 +6433,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired[ + "PaymentIntent.ModifyParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "PaymentIntent.ModifyParamsPaymentMethodDataAuBecsDebit" ] @@ -6508,6 +6604,7 @@ class ModifyParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -6581,6 +6678,9 @@ class ModifyParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ModifyParamsPaymentMethodDataAlipay(TypedDict): pass + class ModifyParamsPaymentMethodDataAmazonPay(TypedDict): + pass + class ModifyParamsPaymentMethodDataAuBecsDebit(TypedDict): account_number: str """ @@ -6927,6 +7027,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + amazon_pay: NotRequired[ + "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + """ au_becs_debit: NotRequired[ "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAuBecsDebit" ] @@ -7231,6 +7337,26 @@ class ModifyParamsPaymentMethodOptionsAlipay(TypedDict): If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. """ + class ModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + + If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ + class ModifyParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" @@ -8136,7 +8262,9 @@ class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index cf89cb3b1..264bef1f5 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -245,6 +245,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired[ + "PaymentIntentService.ConfirmParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "PaymentIntentService.ConfirmParamsPaymentMethodDataAuBecsDebit" ] @@ -428,6 +434,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -503,6 +510,9 @@ class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ConfirmParamsPaymentMethodDataAlipay(TypedDict): pass + class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataAuBecsDebit(TypedDict): account_number: str """ @@ -849,6 +859,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + amazon_pay: NotRequired[ + "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + """ au_becs_debit: NotRequired[ "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsAuBecsDebit" ] @@ -1153,6 +1169,26 @@ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. """ + class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + + If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ + class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" @@ -2058,7 +2094,9 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ @@ -2404,6 +2442,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired[ + "PaymentIntentService.CreateParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "PaymentIntentService.CreateParamsPaymentMethodDataAuBecsDebit" ] @@ -2587,6 +2631,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -2662,6 +2707,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): + pass + class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): account_number: str """ @@ -3008,6 +3056,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + amazon_pay: NotRequired[ + "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + """ au_becs_debit: NotRequired[ "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsAuBecsDebit" ] @@ -3312,6 +3366,26 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. """ + class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + + If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" @@ -4217,7 +4291,9 @@ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ @@ -4587,6 +4663,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired[ + "PaymentIntentService.UpdateParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "PaymentIntentService.UpdateParamsPaymentMethodDataAuBecsDebit" ] @@ -4770,6 +4852,7 @@ class UpdateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -4845,6 +4928,9 @@ class UpdateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class UpdateParamsPaymentMethodDataAlipay(TypedDict): pass + class UpdateParamsPaymentMethodDataAmazonPay(TypedDict): + pass + class UpdateParamsPaymentMethodDataAuBecsDebit(TypedDict): account_number: str """ @@ -5191,6 +5277,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. """ + amazon_pay: NotRequired[ + "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + """ au_becs_debit: NotRequired[ "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsAuBecsDebit" ] @@ -5495,6 +5587,26 @@ class UpdateParamsPaymentMethodOptionsAlipay(TypedDict): If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. """ + class UpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + + If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ + class UpdateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" @@ -6400,7 +6512,9 @@ class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 5697697aa..99f07214d 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -69,6 +69,9 @@ class AfterpayClearpay(StripeObject): class Alipay(StripeObject): pass + class AmazonPay(StripeObject): + pass + class AuBecsDebit(StripeObject): bsb_number: Optional[str] """ @@ -1018,6 +1021,10 @@ class CreateParams(RequestOptions): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired["PaymentMethod.CreateParamsAmazonPay"] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired["PaymentMethod.CreateParamsAuBecsDebit"] """ If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. @@ -1166,6 +1173,7 @@ class CreateParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -1237,6 +1245,9 @@ class CreateParamsAfterpayClearpay(TypedDict): class CreateParamsAlipay(TypedDict): pass + class CreateParamsAmazonPay(TypedDict): + pass + class CreateParamsAuBecsDebit(TypedDict): account_number: str """ @@ -1623,6 +1634,7 @@ class ListParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -1778,6 +1790,7 @@ class RetrieveParams(RequestOptions): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] bancontact: Optional[Bancontact] @@ -1841,6 +1854,7 @@ class RetrieveParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -2344,6 +2358,7 @@ async def retrieve_async( "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "amazon_pay": AmazonPay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, "bancontact": Bancontact, diff --git a/stripe/_payment_method_configuration.py b/stripe/_payment_method_configuration.py index a792854c0..f37f61df1 100644 --- a/stripe/_payment_method_configuration.py +++ b/stripe/_payment_method_configuration.py @@ -125,6 +125,28 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} + class AmazonPay(StripeObject): + class DisplayPreference(StripeObject): + overridable: Optional[bool] + """ + For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + """ + preference: Literal["none", "off", "on"] + """ + The account's display preference. + """ + value: Literal["off", "on"] + """ + The effective display preference value. + """ + + available: bool + """ + Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + """ + display_preference: DisplayPreference + _inner_class_types = {"display_preference": DisplayPreference} + class ApplePay(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -828,6 +850,12 @@ class CreateParams(RequestOptions): """ Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. """ + amazon_pay: NotRequired[ + "PaymentMethodConfiguration.CreateParamsAmazonPay" + ] + """ + Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + """ apple_pay: NotRequired[ "PaymentMethodConfiguration.CreateParamsApplePay" ] @@ -1051,6 +1079,20 @@ class CreateParamsAlipayDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class CreateParamsAmazonPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.CreateParamsAmazonPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class CreateParamsAmazonPayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class CreateParamsApplePay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsApplePayDisplayPreference" @@ -1534,6 +1576,12 @@ class ModifyParams(RequestOptions): """ Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. """ + amazon_pay: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsAmazonPay" + ] + """ + Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + """ apple_pay: NotRequired[ "PaymentMethodConfiguration.ModifyParamsApplePay" ] @@ -1753,6 +1801,20 @@ class ModifyParamsAlipayDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class ModifyParamsAmazonPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfiguration.ModifyParamsAmazonPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class ModifyParamsAmazonPayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class ModifyParamsApplePay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsApplePayDisplayPreference" @@ -2215,6 +2277,7 @@ class RetrieveParams(RequestOptions): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + amazon_pay: Optional[AmazonPay] apple_pay: Optional[ApplePay] application: Optional[str] """ @@ -2418,6 +2481,7 @@ async def retrieve_async( "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "amazon_pay": AmazonPay, "apple_pay": ApplePay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, diff --git a/stripe/_payment_method_configuration_service.py b/stripe/_payment_method_configuration_service.py index ca855f523..874d0bdff 100644 --- a/stripe/_payment_method_configuration_service.py +++ b/stripe/_payment_method_configuration_service.py @@ -35,6 +35,12 @@ class CreateParams(TypedDict): """ Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. """ + amazon_pay: NotRequired[ + "PaymentMethodConfigurationService.CreateParamsAmazonPay" + ] + """ + Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + """ apple_pay: NotRequired[ "PaymentMethodConfigurationService.CreateParamsApplePay" ] @@ -278,6 +284,20 @@ class CreateParamsAlipayDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class CreateParamsAmazonPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationService.CreateParamsAmazonPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class CreateParamsAmazonPayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class CreateParamsApplePay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationService.CreateParamsApplePayDisplayPreference" @@ -771,6 +791,12 @@ class UpdateParams(TypedDict): """ Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. """ + amazon_pay: NotRequired[ + "PaymentMethodConfigurationService.UpdateParamsAmazonPay" + ] + """ + Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + """ apple_pay: NotRequired[ "PaymentMethodConfigurationService.UpdateParamsApplePay" ] @@ -1010,6 +1036,20 @@ class UpdateParamsAlipayDisplayPreference(TypedDict): The account's preference for whether or not to display this payment method. """ + class UpdateParamsAmazonPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationService.UpdateParamsAmazonPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + class UpdateParamsAmazonPayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + class UpdateParamsApplePay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationService.UpdateParamsApplePayDisplayPreference" diff --git a/stripe/_payment_method_service.py b/stripe/_payment_method_service.py index 80db60433..94d5cd2e3 100644 --- a/stripe/_payment_method_service.py +++ b/stripe/_payment_method_service.py @@ -39,6 +39,10 @@ class CreateParams(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired["PaymentMethodService.CreateParamsAmazonPay"] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "PaymentMethodService.CreateParamsAuBecsDebit" ] @@ -191,6 +195,7 @@ class CreateParams(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -264,6 +269,9 @@ class CreateParamsAfterpayClearpay(TypedDict): class CreateParamsAlipay(TypedDict): pass + class CreateParamsAmazonPay(TypedDict): + pass + class CreateParamsAuBecsDebit(TypedDict): account_number: str """ @@ -650,6 +658,7 @@ class ListParams(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", diff --git a/stripe/_person.py b/stripe/_person.py index 8f8b4031e..666320784 100644 --- a/stripe/_person.py +++ b/stripe/_person.py @@ -278,7 +278,7 @@ class Error(StripeObject): """ pending_verification: List[str] """ - Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. + Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. """ _inner_class_types = {"alternatives": Alternative, "errors": Error} @@ -474,7 +474,7 @@ class Error(StripeObject): """ pending_verification: List[str] """ - Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. """ _inner_class_types = {"alternatives": Alternative, "errors": Error} diff --git a/stripe/_refund.py b/stripe/_refund.py index eb2dd9b5f..1fc7f726c 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -51,6 +51,9 @@ class AfterpayClearpay(StripeObject): class Alipay(StripeObject): pass + class AmazonPay(StripeObject): + pass + class AuBankTransfer(StripeObject): pass @@ -214,6 +217,7 @@ class Zip(StripeObject): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + amazon_pay: Optional[AmazonPay] au_bank_transfer: Optional[AuBankTransfer] blik: Optional[Blik] br_bank_transfer: Optional[BrBankTransfer] @@ -247,6 +251,7 @@ class Zip(StripeObject): "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "amazon_pay": AmazonPay, "au_bank_transfer": AuBankTransfer, "blik": Blik, "br_bank_transfer": BrBankTransfer, diff --git a/stripe/_reversal.py b/stripe/_reversal.py index 3d8258ef4..c59ae1998 100644 --- a/stripe/_reversal.py +++ b/stripe/_reversal.py @@ -26,7 +26,7 @@ class Reversal(UpdateableAPIResource["Reversal"]): transfer only if the destination account has enough balance to cover the reversal. - Related guide: [Reversing transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reversing-transfers) + Related guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers) """ OBJECT_NAME: ClassVar[Literal["transfer_reversal"]] = "transfer_reversal" diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index 72057e124..8a62b2227 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -440,6 +440,10 @@ class SetupError(StripeObject): "bank_account_unverified", "bank_account_verification_failed", "billing_invalid_mandate", + "billing_policy_remote_function_response_invalid", + "billing_policy_remote_function_timeout", + "billing_policy_remote_function_unexpected_status_code", + "billing_policy_remote_function_unreachable", "bitcoin_upgrade_required", "capture_charge_authorization_expired", "capture_unauthorized_payment", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 6928d2f55..dd3ba242e 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -103,6 +103,10 @@ class LastSetupError(StripeObject): "bank_account_unverified", "bank_account_verification_failed", "billing_invalid_mandate", + "billing_policy_remote_function_response_invalid", + "billing_policy_remote_function_timeout", + "billing_policy_remote_function_unexpected_status_code", + "billing_policy_remote_function_unreachable", "bitcoin_upgrade_required", "capture_charge_authorization_expired", "capture_unauthorized_payment", @@ -454,6 +458,9 @@ class MandateOptions(StripeObject): """ _inner_class_types = {"mandate_options": MandateOptions} + class AmazonPay(StripeObject): + pass + class Card(StripeObject): class MandateOptions(StripeObject): amount: int @@ -564,7 +571,9 @@ class FinancialConnections(StripeObject): """ The list of permissions to request. The `payment_method` permission must be included. """ - prefetch: Optional[List[Literal["balances", "transactions"]]] + prefetch: Optional[ + List[Literal["balances", "ownership", "transactions"]] + ] """ Data features requested to be retrieved upon account creation. """ @@ -593,6 +602,7 @@ class MandateOptions(StripeObject): } acss_debit: Optional[AcssDebit] + amazon_pay: Optional[AmazonPay] card: Optional[Card] card_present: Optional[CardPresent] link: Optional[Link] @@ -601,6 +611,7 @@ class MandateOptions(StripeObject): us_bank_account: Optional[UsBankAccount] _inner_class_types = { "acss_debit": AcssDebit, + "amazon_pay": AmazonPay, "card": Card, "card_present": CardPresent, "link": Link, @@ -727,6 +738,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodDataAuBecsDebit" ] @@ -882,6 +899,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -955,6 +973,9 @@ class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ConfirmParamsPaymentMethodDataAlipay(TypedDict): pass + class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataAuBecsDebit(TypedDict): account_number: str """ @@ -1281,6 +1302,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. """ + amazon_pay: NotRequired[ + "SetupIntent.ConfirmParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + """ card: NotRequired["SetupIntent.ConfirmParamsPaymentMethodOptionsCard"] """ Configuration for any card setup attempted on this SetupIntent. @@ -1358,6 +1385,9 @@ class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): Transaction type of the mandate. """ + class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): + pass + class ConfirmParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntent.ConfirmParamsPaymentMethodOptionsCardMandateOptions" @@ -1586,7 +1616,9 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ @@ -1782,6 +1814,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "SetupIntent.CreateParamsPaymentMethodDataAuBecsDebit" ] @@ -1937,6 +1975,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -2010,6 +2049,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): + pass + class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): account_number: str """ @@ -2336,6 +2378,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. """ + amazon_pay: NotRequired[ + "SetupIntent.CreateParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + """ card: NotRequired["SetupIntent.CreateParamsPaymentMethodOptionsCard"] """ Configuration for any card setup attempted on this SetupIntent. @@ -2413,6 +2461,9 @@ class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): Transaction type of the mandate. """ + class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): + pass + class CreateParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntent.CreateParamsPaymentMethodOptionsCardMandateOptions" @@ -2641,7 +2692,9 @@ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ @@ -2806,6 +2859,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodDataAuBecsDebit" ] @@ -2961,6 +3020,7 @@ class ModifyParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -3034,6 +3094,9 @@ class ModifyParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ModifyParamsPaymentMethodDataAlipay(TypedDict): pass + class ModifyParamsPaymentMethodDataAmazonPay(TypedDict): + pass + class ModifyParamsPaymentMethodDataAuBecsDebit(TypedDict): account_number: str """ @@ -3360,6 +3423,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. """ + amazon_pay: NotRequired[ + "SetupIntent.ModifyParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + """ card: NotRequired["SetupIntent.ModifyParamsPaymentMethodOptionsCard"] """ Configuration for any card setup attempted on this SetupIntent. @@ -3437,6 +3506,9 @@ class ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): Transaction type of the mandate. """ + class ModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): + pass + class ModifyParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntent.ModifyParamsPaymentMethodOptionsCardMandateOptions" @@ -3665,7 +3737,9 @@ class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index a1ea273f5..8c7398cd6 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -132,6 +132,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodDataAuBecsDebit" ] @@ -315,6 +321,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -390,6 +397,9 @@ class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): class ConfirmParamsPaymentMethodDataAlipay(TypedDict): pass + class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): + pass + class ConfirmParamsPaymentMethodDataAuBecsDebit(TypedDict): account_number: str """ @@ -718,6 +728,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. """ + amazon_pay: NotRequired[ + "SetupIntentService.ConfirmParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + """ card: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodOptionsCard" ] @@ -799,6 +815,9 @@ class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): Transaction type of the mandate. """ + class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): + pass + class ConfirmParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntentService.ConfirmParamsPaymentMethodOptionsCardMandateOptions" @@ -1027,7 +1046,9 @@ class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ @@ -1227,6 +1248,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodDataAuBecsDebit" ] @@ -1402,6 +1429,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -1475,6 +1503,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): + pass + class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): account_number: str """ @@ -1803,6 +1834,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. """ + amazon_pay: NotRequired[ + "SetupIntentService.CreateParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + """ card: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodOptionsCard" ] @@ -1884,6 +1921,9 @@ class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): Transaction type of the mandate. """ + class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): + pass + class CreateParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntentService.CreateParamsPaymentMethodOptionsCardMandateOptions" @@ -2112,7 +2152,9 @@ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ @@ -2291,6 +2333,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodDataAuBecsDebit" ] @@ -2466,6 +2514,7 @@ class UpdateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -2539,6 +2588,9 @@ class UpdateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class UpdateParamsPaymentMethodDataAlipay(TypedDict): pass + class UpdateParamsPaymentMethodDataAmazonPay(TypedDict): + pass + class UpdateParamsPaymentMethodDataAuBecsDebit(TypedDict): account_number: str """ @@ -2867,6 +2919,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. """ + amazon_pay: NotRequired[ + "SetupIntentService.UpdateParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + """ card: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodOptionsCard" ] @@ -2948,6 +3006,9 @@ class UpdateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): Transaction type of the mandate. """ + class UpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): + pass + class UpdateParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntentService.UpdateParamsPaymentMethodOptionsCardMandateOptions" @@ -3176,7 +3237,9 @@ class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ diff --git a/stripe/_subscription.py b/stripe/_subscription.py index fa50d9b7a..933fa2450 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -253,7 +253,10 @@ class FinancialConnections(StripeObject): permissions: Optional[ List[ Literal[ - "balances", "payment_method", "transactions" + "balances", + "ownership", + "payment_method", + "transactions", ] ] ] @@ -261,7 +264,7 @@ class FinancialConnections(StripeObject): The list of permissions to request. The `payment_method` permission must be included. """ prefetch: Optional[ - List[Literal["balances", "transactions"]] + List[Literal["balances", "ownership", "transactions"]] ] """ Data features requested to be retrieved upon account creation. @@ -1088,7 +1091,9 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ @@ -1899,7 +1904,9 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index 36d33712d..a2b7c45bf 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -690,7 +690,9 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ @@ -1555,7 +1557,9 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConne """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ diff --git a/stripe/_tax_id.py b/stripe/_tax_id.py index a220f3d7a..1e481e344 100644 --- a/stripe/_tax_id.py +++ b/stripe/_tax_id.py @@ -85,6 +85,7 @@ class CreateParams(RequestOptions): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -118,14 +119,17 @@ class CreateParams(RequestOptions): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -148,7 +152,7 @@ class CreateParams(RequestOptions): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ @@ -249,6 +253,7 @@ class RetrieveParams(RequestOptions): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -282,14 +287,17 @@ class RetrieveParams(RequestOptions): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -313,7 +321,7 @@ class RetrieveParams(RequestOptions): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` """ value: str """ diff --git a/stripe/_tax_id_service.py b/stripe/_tax_id_service.py index 237ff8554..9e492e0e0 100644 --- a/stripe/_tax_id_service.py +++ b/stripe/_tax_id_service.py @@ -26,6 +26,7 @@ class CreateParams(TypedDict): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -59,14 +60,17 @@ class CreateParams(TypedDict): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -89,7 +93,7 @@ class CreateParams(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/_usage_record.py b/stripe/_usage_record.py index e9d59a621..fdd9cebd4 100644 --- a/stripe/_usage_record.py +++ b/stripe/_usage_record.py @@ -11,6 +11,8 @@ class UsageRecord(CreateableAPIResource["UsageRecord"]): metered billing of subscription prices. Related guide: [Metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing) + + This is our legacy usage-based billing API. See the [updated usage-based billing docs](https://docs.stripe.com/billing/subscriptions/usage-based). """ OBJECT_NAME: ClassVar[Literal["usage_record"]] = "usage_record" diff --git a/stripe/billing/_meter.py b/stripe/billing/_meter.py index 198797d8e..bc87cb308 100644 --- a/stripe/billing/_meter.py +++ b/stripe/billing/_meter.py @@ -28,7 +28,7 @@ class Meter( UpdateableAPIResource["Meter"], ): """ - A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then use the billing meter to charge the user for the number of API calls they make. + A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then attach the billing meter to a price and attach the price to a subscription to charge the user for the number of API calls they make. """ OBJECT_NAME: ClassVar[Literal["billing.meter"]] = "billing.meter" diff --git a/stripe/billing/_meter_event_adjustment.py b/stripe/billing/_meter_event_adjustment.py index ca57fd924..a1199b996 100644 --- a/stripe/billing/_meter_event_adjustment.py +++ b/stripe/billing/_meter_event_adjustment.py @@ -3,13 +3,13 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, cast +from typing import ClassVar, List, Optional, cast from typing_extensions import Literal, NotRequired, TypedDict, Unpack class MeterEventAdjustment(CreateableAPIResource["MeterEventAdjustment"]): """ - A billing meter event adjustment represents the status of a meter event adjustment. + A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer. """ OBJECT_NAME: ClassVar[ @@ -17,13 +17,13 @@ class MeterEventAdjustment(CreateableAPIResource["MeterEventAdjustment"]): ] = "billing.meter_event_adjustment" class Cancel(StripeObject): - identifier: str + identifier: Optional[str] """ Unique identifier for the event. """ class CreateParams(RequestOptions): - cancel: "MeterEventAdjustment.CreateParamsCancel" + cancel: NotRequired["MeterEventAdjustment.CreateParamsCancel"] """ Specifies which event to cancel. """ @@ -35,18 +35,21 @@ class CreateParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - type: NotRequired[Literal["cancel"]] + type: Literal["cancel"] """ - Specifies whether to cancel a single event or a range of events for a time period. + Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. """ class CreateParamsCancel(TypedDict): - identifier: str + identifier: NotRequired[str] """ Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. """ - cancel: Cancel + cancel: Optional[Cancel] + """ + Specifies which event to cancel. + """ event_name: str """ The name of the meter event. Corresponds with the `event_name` field on a meter. @@ -65,7 +68,7 @@ class CreateParamsCancel(TypedDict): """ type: Literal["cancel"] """ - Specifies whether to cancel a single event or a range of events for a time period. + Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. """ @classmethod diff --git a/stripe/billing/_meter_event_adjustment_service.py b/stripe/billing/_meter_event_adjustment_service.py index 4dbae5270..038c74cc6 100644 --- a/stripe/billing/_meter_event_adjustment_service.py +++ b/stripe/billing/_meter_event_adjustment_service.py @@ -9,7 +9,7 @@ class MeterEventAdjustmentService(StripeService): class CreateParams(TypedDict): - cancel: "MeterEventAdjustmentService.CreateParamsCancel" + cancel: NotRequired["MeterEventAdjustmentService.CreateParamsCancel"] """ Specifies which event to cancel. """ @@ -21,13 +21,13 @@ class CreateParams(TypedDict): """ Specifies which fields in the response should be expanded. """ - type: NotRequired[Literal["cancel"]] + type: Literal["cancel"] """ - Specifies whether to cancel a single event or a range of events for a time period. + Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. """ class CreateParamsCancel(TypedDict): - identifier: str + identifier: NotRequired[str] """ Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. """ diff --git a/stripe/billing_portal/_session.py b/stripe/billing_portal/_session.py index 201ac449c..12cacac9d 100644 --- a/stripe/billing_portal/_session.py +++ b/stripe/billing_portal/_session.py @@ -245,7 +245,7 @@ class CreateParams(RequestOptions): """ on_behalf_of: NotRequired[str] """ - The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. """ return_url: NotRequired[str] """ @@ -481,7 +481,7 @@ class CreateParamsFlowDataSubscriptionUpdateConfirmItem(TypedDict): """ on_behalf_of: Optional[str] """ - The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. """ return_url: Optional[str] """ diff --git a/stripe/billing_portal/_session_service.py b/stripe/billing_portal/_session_service.py index ef745d0a7..d34247ae0 100644 --- a/stripe/billing_portal/_session_service.py +++ b/stripe/billing_portal/_session_service.py @@ -81,7 +81,7 @@ class CreateParams(TypedDict): """ on_behalf_of: NotRequired[str] """ - The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. """ return_url: NotRequired[str] """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 303f95b8d..561a67be3 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -329,6 +329,7 @@ class TaxId(StripeObject): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -362,14 +363,17 @@ class TaxId(StripeObject): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -393,7 +397,7 @@ class TaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, or `unknown` """ value: Optional[str] """ @@ -585,6 +589,9 @@ class Alipay(StripeObject): When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). """ + class AmazonPay(StripeObject): + pass + class AuBecsDebit(StripeObject): setup_future_usage: Optional[Literal["none"]] """ @@ -925,7 +932,9 @@ class FinancialConnections(StripeObject): """ The list of permissions to request. The `payment_method` permission must be included. """ - prefetch: Optional[List[Literal["balances", "transactions"]]] + prefetch: Optional[ + List[Literal["balances", "ownership", "transactions"]] + ] """ Data features requested to be retrieved upon account creation. """ @@ -957,6 +966,7 @@ class FinancialConnections(StripeObject): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] + amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] bancontact: Optional[Bancontact] @@ -987,6 +997,7 @@ class FinancialConnections(StripeObject): "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, + "amazon_pay": AmazonPay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, "bancontact": Bancontact, @@ -1665,6 +1676,7 @@ class CreateParams(RequestOptions): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -2335,6 +2347,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Alipay payment method options. """ + amazon_pay: NotRequired[ + "Session.CreateParamsPaymentMethodOptionsAmazonPay" + ] + """ + contains details about the AmazonPay payment method options. + """ au_becs_debit: NotRequired[ "Session.CreateParamsPaymentMethodOptionsAuBecsDebit" ] @@ -2540,6 +2558,16 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -2958,7 +2986,9 @@ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index 996ee8f18..845bb21e4 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -220,6 +220,7 @@ class CreateParams(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -908,6 +909,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Alipay payment method options. """ + amazon_pay: NotRequired[ + "SessionService.CreateParamsPaymentMethodOptionsAmazonPay" + ] + """ + contains details about the AmazonPay payment method options. + """ au_becs_debit: NotRequired[ "SessionService.CreateParamsPaymentMethodOptionsAuBecsDebit" ] @@ -1141,6 +1148,16 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). """ + class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + """ + class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -1559,7 +1576,9 @@ class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. """ - prefetch: NotRequired[List[Literal["balances", "transactions"]]] + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] """ List of data features that you would like to retrieve upon account creation. """ diff --git a/stripe/financial_connections/_account.py b/stripe/financial_connections/_account.py index ecca2fe22..9ad72758d 100644 --- a/stripe/financial_connections/_account.py +++ b/stripe/financial_connections/_account.py @@ -107,6 +107,10 @@ class OwnershipRefresh(StripeObject): """ The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. """ + next_refresh_available_at: Optional[int] + """ + Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + """ status: Literal["failed", "pending", "succeeded"] """ The status of the last refresh attempt. diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index d36bbd92d..0de29d22a 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -62,6 +62,7 @@ class TaxId(StripeObject): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -95,14 +96,17 @@ class TaxId(StripeObject): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -126,7 +130,7 @@ class TaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, or `unknown` """ value: str """ @@ -435,6 +439,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -468,14 +473,17 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -498,7 +506,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/tax/_calculation_service.py b/stripe/tax/_calculation_service.py index be1ac849c..1f43d8834 100644 --- a/stripe/tax/_calculation_service.py +++ b/stripe/tax/_calculation_service.py @@ -111,6 +111,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -144,14 +145,17 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -174,7 +178,7 @@ class CreateParamsCustomerDetailsTaxId(TypedDict): "za_vat", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` """ value: str """ diff --git a/stripe/tax/_transaction.py b/stripe/tax/_transaction.py index c2aea6e9f..3d9a8fb55 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -62,6 +62,7 @@ class TaxId(StripeObject): "au_abn", "au_arn", "bg_uic", + "bh_vat", "bo_tin", "br_cnpj", "br_cpf", @@ -95,14 +96,17 @@ class TaxId(StripeObject): "jp_trn", "ke_pin", "kr_brn", + "kz_bin", "li_uid", "mx_rfc", "my_frp", "my_itn", "my_sst", + "ng_tin", "no_vat", "no_voec", "nz_gst", + "om_vat", "pe_ruc", "ph_tin", "ro_tin", @@ -126,7 +130,7 @@ class TaxId(StripeObject): "za_vat", ] """ - The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown` + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, or `unknown` """ value: str """ diff --git a/stripe/test_helpers/_confirmation_token_service.py b/stripe/test_helpers/_confirmation_token_service.py index 947094701..d4f38616a 100644 --- a/stripe/test_helpers/_confirmation_token_service.py +++ b/stripe/test_helpers/_confirmation_token_service.py @@ -63,6 +63,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ + amazon_pay: NotRequired[ + "ConfirmationTokenService.CreateParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ au_becs_debit: NotRequired[ "ConfirmationTokenService.CreateParamsPaymentMethodDataAuBecsDebit" ] @@ -246,6 +252,7 @@ class CreateParamsPaymentMethodData(TypedDict): "affirm", "afterpay_clearpay", "alipay", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -321,6 +328,9 @@ class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): class CreateParamsPaymentMethodDataAlipay(TypedDict): pass + class CreateParamsPaymentMethodDataAmazonPay(TypedDict): + pass + class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): account_number: str """ From c31658479aa2d33b797391d0136cb6470714b9ea Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Thu, 11 Apr 2024 16:01:09 -0700 Subject: [PATCH 2/2] Bump version to 9.1.0 --- CHANGELOG.md | 24 ++++++++++++++++++++++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb6b07231..15d047c40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +## 9.1.0 - 2024-04-11 +* [#1300](https://github.com/stripe/stripe-python/pull/1300) Update generated code + * Add support for `external_account_collection` on resource class `stripe.AccountSession.Components.AccountOnboarding.Features` and parameter class `stripe.AccountSession.CreateParamsComponentsAccountOnboardingFeatures` + * Add support for `account_management` on resource class `stripe.AccountSession.Components` and parameter class `stripe.AccountSession.CreateParamsComponents` + * Add support for `notification_banner` on resource class `stripe.AccountSession.Components` and parameter class `stripe.AccountSession.CreateParamsComponents` + * Add support for `amazon_pay` on resource classes `stripe.Charge.PaymentMethodDetails`, `stripe.ConfirmationToken.PaymentMethodPreview`, `stripe.PaymentIntent.PaymentMethodOptions`, `stripe.Refund.DestinationDetails`, `stripe.SetupIntent.PaymentMethodOptions`, and `stripe.checkout.Session.PaymentMethodOptions`, parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptions`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptions`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptions`, `stripe.PaymentMethod.CreateParams`, `stripe.PaymentMethodConfiguration.CreateParams`, `stripe.PaymentMethodConfiguration.ModifyParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.ConfirmParamsPaymentMethodOptions`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodOptions`, `stripe.SetupIntent.ModifyParamsPaymentMethodData`, `stripe.SetupIntent.ModifyParamsPaymentMethodOptions`, and `stripe.checkout.Session.CreateParamsPaymentMethodOptions`, and resources `stripe.PaymentMethod` and `stripe.PaymentMethodConfiguration` + * Add support for `next_refresh_available_at` on resource class `stripe.financial_connections.Account.OwnershipRefresh` + * Change type of field `stripe.billing.MeterEventAdjustment` from `Cancel` to `Optional[Cancel]` of `cancel` + * Change type of field `stripe.billing.MeterEventAdjustment.Cancel` from `str` to `Optional[str]` of `identifier` + * Change type of field `stripe.billing.MeterEventAdjustment.CreateParamsCancel` from `str` to `NotRequired[str]` of `identifier` + * Change type of field `stripe.billing.MeterEventAdjustment.CreateParams` from `MeterEventAdjustment.CreateParamsCancel` to `NotRequired[MeterEventAdjustment.CreateParamsCancel]` of `cancel` + * Change type of field `stripe.billing.MeterEventAdjustment.CreateParams` from `NotRequired[Literal['cancel']]` to `Literal['cancel']` of `type` + * Add support for `bh_vat` on enums `stripe.checkout.Session.CustomerDetails.TaxId.type`, `stripe.Customer.CreateParamsTaxIdDatum.type`, `stripe.Customer.CreateTaxIdParams.type`, `stripe.Invoice.CustomerTaxId.type`, `stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type`, `stripe.tax.Calculation.CustomerDetails.TaxId.type`, `stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type`, `stripe.tax.Transaction.CustomerDetails.TaxId.type`, `stripe.TaxId.type`, and `stripe.TaxId.CreateParams.type` + * Add support for `kz_bin` on enums `stripe.checkout.Session.CustomerDetails.TaxId.type`, `stripe.Customer.CreateParamsTaxIdDatum.type`, `stripe.Customer.CreateTaxIdParams.type`, `stripe.Invoice.CustomerTaxId.type`, `stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type`, `stripe.tax.Calculation.CustomerDetails.TaxId.type`, `stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type`, `stripe.tax.Transaction.CustomerDetails.TaxId.type`, `stripe.TaxId.type`, and `stripe.TaxId.CreateParams.type` + * Add support for `ng_tin` on enums `stripe.checkout.Session.CustomerDetails.TaxId.type`, `stripe.Customer.CreateParamsTaxIdDatum.type`, `stripe.Customer.CreateTaxIdParams.type`, `stripe.Invoice.CustomerTaxId.type`, `stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type`, `stripe.tax.Calculation.CustomerDetails.TaxId.type`, `stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type`, `stripe.tax.Transaction.CustomerDetails.TaxId.type`, `stripe.TaxId.type`, and `stripe.TaxId.CreateParams.type` + * Add support for `om_vat` on enums `stripe.checkout.Session.CustomerDetails.TaxId.type`, `stripe.Customer.CreateParamsTaxIdDatum.type`, `stripe.Customer.CreateTaxIdParams.type`, `stripe.Invoice.CustomerTaxId.type`, `stripe.Invoice.UpcomingParamsCustomerDetailsTaxId.type`, `stripe.Invoice.UpcomingLinesParamsCustomerDetailsTaxId.type`, `stripe.tax.Calculation.CustomerDetails.TaxId.type`, `stripe.tax.Calculation.CreateParamsCustomerDetailsTaxId.type`, `stripe.tax.Transaction.CustomerDetails.TaxId.type`, `stripe.TaxId.type`, and `stripe.TaxId.CreateParams.type` + * Add support for `ownership` on enums `stripe.checkout.Session.PaymentMethodOptions.UsBankAccount.FinancialConnections.prefetch`, `stripe.checkout.Session.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch`, `stripe.Invoice.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections.permissions`, `stripe.Invoice.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections.prefetch`, `stripe.Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch`, `stripe.Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch`, `stripe.PaymentIntent.PaymentMethodOptions.UsBankAccount.FinancialConnections.prefetch`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch`, `stripe.PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch`, `stripe.SetupIntent.PaymentMethodOptions.UsBankAccount.FinancialConnections.prefetch`, `stripe.SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch`, `stripe.SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch`, `stripe.SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch`, `stripe.Subscription.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections.permissions`, `stripe.Subscription.PaymentSettings.PaymentMethodOptions.UsBankAccount.FinancialConnections.prefetch`, `stripe.Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch`, and `stripe.Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections.prefetch` + * Add support for `amazon_pay` on enums `stripe.checkout.Session.CreateParams.payment_method_types`, `stripe.ConfirmationToken.PaymentMethodPreview.type`, `stripe.ConfirmationToken.CreateParamsPaymentMethodData.type`, `stripe.Customer.ListPaymentMethodsParams.type`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData.type`, `stripe.PaymentIntent.CreateParamsPaymentMethodData.type`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData.type`, `stripe.PaymentMethod.type`, `stripe.PaymentMethod.CreateParams.type`, `stripe.PaymentMethod.ListParams.type`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData.type`, `stripe.SetupIntent.CreateParamsPaymentMethodData.type`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData.type` + * Add support for `billing_policy_remote_function_response_invalid` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code` + * Add support for `billing_policy_remote_function_timeout` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code` + * Add support for `billing_policy_remote_function_unexpected_status_code` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code` + * Add support for `billing_policy_remote_function_unreachable` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code` +* [#1297](https://github.com/stripe/stripe-python/pull/1297) Use stdlib AsyncMock when available + ## 9.0.0 - 2024-04-10 * [#1286](https://github.com/stripe/stripe-python/pull/1286) diff --git a/VERSION b/VERSION index f7ee06693..47da986f8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.0.0 +9.1.0 diff --git a/stripe/_version.py b/stripe/_version.py index 6039f61e4..5845a3d39 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "9.0.0" +VERSION = "9.1.0"