From 89bad44fc6848f1b5300f82bd3ef477ffa5b6707 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 15:39:19 -0400 Subject: [PATCH 1/3] Update generated code (#1793) * Update generated code for v2240 and * Update generated code for v2249 and * Update generated code for v2252 and * Update generated code for v2252 and --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- stripe/_account.py | 8 + stripe/_account_session.py | 26 ++ stripe/_api_version.py | 2 +- stripe/_balance_transaction.py | 7 +- stripe/_charge.py | 28 +- stripe/_confirmation_token.py | 6 + stripe/_invoice.py | 56 +++- stripe/_mandate.py | 41 ++- stripe/_payment_attempt_record.py | 30 +- stripe/_payment_intent.py | 80 ++++- stripe/_payment_link.py | 12 + stripe/_payment_method.py | 6 + stripe/_payment_method_configuration.py | 24 ++ stripe/_payment_record.py | 30 +- stripe/_setup_attempt.py | 11 + stripe/_setup_intent.py | 83 +++++ stripe/_subscription.py | 95 +++++- stripe/_subscription_service.py | 4 +- stripe/_tax_id.py | 6 +- stripe/checkout/_session.py | 63 +++- stripe/issuing/_authorization.py | 4 + stripe/issuing/_card.py | 18 +- stripe/issuing/_cardholder.py | 12 + stripe/params/__init__.py | 290 ++++++++++++++++++ ..._account_create_external_account_params.py | 4 +- stripe/params/_account_create_params.py | 34 +- ..._account_external_account_create_params.py | 4 +- .../params/_account_session_create_params.py | 50 +++ stripe/params/_account_update_params.py | 32 +- .../_balance_transaction_list_params.py | 2 +- .../_confirmation_token_create_params.py | 9 + stripe/params/_customer_create_params.py | 6 +- .../params/_customer_create_tax_id_params.py | 6 +- .../_customer_list_payment_methods_params.py | 1 + .../_customer_payment_method_list_params.py | 1 + .../params/_customer_tax_id_create_params.py | 6 +- stripe/params/_invoice_create_params.py | 55 +++- .../params/_invoice_create_preview_params.py | 6 +- stripe/params/_invoice_modify_params.py | 55 +++- stripe/params/_invoice_update_params.py | 55 +++- .../params/_payment_intent_confirm_params.py | 62 +++- .../params/_payment_intent_create_params.py | 57 +++- .../params/_payment_intent_modify_params.py | 58 +++- .../params/_payment_intent_update_params.py | 58 +++- stripe/params/_payment_link_create_params.py | 12 + stripe/params/_payment_link_modify_params.py | 2 +- stripe/params/_payment_link_update_params.py | 2 +- ...ment_method_configuration_create_params.py | 20 ++ ...ment_method_configuration_modify_params.py | 20 ++ ...ment_method_configuration_update_params.py | 20 ++ .../params/_payment_method_create_params.py | 9 + stripe/params/_payment_method_list_params.py | 1 + stripe/params/_setup_intent_confirm_params.py | 59 ++++ stripe/params/_setup_intent_create_params.py | 60 ++++ stripe/params/_setup_intent_modify_params.py | 61 +++- stripe/params/_setup_intent_update_params.py | 61 +++- stripe/params/_subscription_create_params.py | 84 ++++- stripe/params/_subscription_modify_params.py | 84 ++++- stripe/params/_subscription_update_params.py | 84 ++++- stripe/params/_tax_id_create_params.py | 6 +- .../params/_webhook_endpoint_create_params.py | 1 + stripe/params/billing/_meter_create_params.py | 2 +- .../billing/_meter_event_create_params.py | 2 +- stripe/params/checkout/__init__.py | 10 + .../params/checkout/_session_create_params.py | 58 +++- .../_verification_session_create_params.py | 4 +- stripe/params/issuing/_card_create_params.py | 12 + stripe/params/issuing/_card_modify_params.py | 12 + stripe/params/issuing/_card_update_params.py | 12 + .../issuing/_cardholder_create_params.py | 12 + .../issuing/_cardholder_modify_params.py | 12 + .../issuing/_cardholder_update_params.py | 12 + .../params/radar/_value_list_create_params.py | 3 +- .../params/tax/_calculation_create_params.py | 6 +- .../params/tax/_registration_create_params.py | 2 +- stripe/params/test_helpers/__init__.py | 5 + .../_confirmation_token_create_params.py | 9 + .../v2/core/_account_link_create_params.py | 8 +- .../core/_event_destination_create_params.py | 12 +- stripe/radar/_payment_evaluation.py | 13 +- stripe/radar/_value_list.py | 3 +- stripe/tax/_calculation.py | 8 +- stripe/tax/_transaction.py | 8 +- tests/test_generated_examples.py | 4 +- 86 files changed, 2218 insertions(+), 104 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 7d039eeb0..da5c58a23 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -97ed8f33ac148105eefc5ec2543b66a32367bc1f \ No newline at end of file +9aa5ee4ed2b929f65b7fbf7c341f938682888500 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 19b4cc885..048a4fc1a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2206 \ No newline at end of file +v2252 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index 70dfe7baf..ea14e692a 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -234,6 +234,10 @@ class Capabilities(StripeObject): """ The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. """ + app_distribution: Optional[Literal["active", "inactive", "pending"]] + """ + The status of the `app_distribution` capability of the account, or whether the platform can distribute apps to other accounts. + """ au_becs_debit_payments: Optional[ Literal["active", "inactive", "pending"] ] @@ -446,6 +450,10 @@ class Capabilities(StripeObject): """ The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. """ + sunbit_payments: Optional[Literal["active", "inactive", "pending"]] + """ + The status of the Sunbit capability of the account, or whether the account can directly process Sunbit payments. + """ swish_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the Swish capability of the account, or whether the account can directly process Swish payments. diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 1b0e409c3..eb9195c94 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -61,6 +61,17 @@ class Features(StripeObject): features: Features _inner_class_types = {"features": Features} + class BalanceReport(StripeObject): + class Features(StripeObject): + pass + + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: Features + _inner_class_types = {"features": Features} + class Balances(StripeObject): class Features(StripeObject): disable_stripe_user_authentication: bool @@ -349,6 +360,17 @@ class Features(StripeObject): features: Features _inner_class_types = {"features": Features} + class PayoutReconciliationReport(StripeObject): + class Features(StripeObject): + pass + + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: Features + _inner_class_types = {"features": Features} + class Payouts(StripeObject): class Features(StripeObject): disable_stripe_user_authentication: bool @@ -414,6 +436,7 @@ class Features(StripeObject): account_management: AccountManagement account_onboarding: AccountOnboarding + balance_report: BalanceReport balances: Balances disputes_list: DisputesList documents: Documents @@ -427,6 +450,7 @@ class Features(StripeObject): payment_disputes: PaymentDisputes payments: Payments payout_details: PayoutDetails + payout_reconciliation_report: PayoutReconciliationReport payouts: Payouts payouts_list: PayoutsList tax_registrations: TaxRegistrations @@ -434,6 +458,7 @@ class Features(StripeObject): _inner_class_types = { "account_management": AccountManagement, "account_onboarding": AccountOnboarding, + "balance_report": BalanceReport, "balances": Balances, "disputes_list": DisputesList, "documents": Documents, @@ -447,6 +472,7 @@ class Features(StripeObject): "payment_disputes": PaymentDisputes, "payments": Payments, "payout_details": PayoutDetails, + "payout_reconciliation_report": PayoutReconciliationReport, "payouts": Payouts, "payouts_list": PayoutsList, "tax_registrations": TaxRegistrations, diff --git a/stripe/_api_version.py b/stripe/_api_version.py index ca5e4670e..426060069 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2026-03-25.dahlia" + CURRENT = "2026-04-22.dahlia" CURRENT_MAJOR = "dahlia" diff --git a/stripe/_balance_transaction.py b/stripe/_balance_transaction.py index 9d2327890..2dc1b438d 100644 --- a/stripe/_balance_transaction.py +++ b/stripe/_balance_transaction.py @@ -65,7 +65,7 @@ class FeeDetail(StripeObject): """ type: str """ - Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`. + Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee`, `tax`, or `withheld_tax`. """ amount: int @@ -163,6 +163,9 @@ class FeeDetail(StripeObject): "climate_order_refund", "connect_collection_transfer", "contribution", + "fee_credit_funding", + "inbound_transfer", + "inbound_transfer_reversal", "issuing_authorization_hold", "issuing_authorization_release", "issuing_dispute", @@ -200,7 +203,7 @@ class FeeDetail(StripeObject): "transfer_refund", ] """ - Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. + Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. """ @classmethod diff --git a/stripe/_charge.py b/stripe/_charge.py index 98c764c9f..f346866b6 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -279,11 +279,11 @@ class AcssDebit(StripeObject): class Affirm(StripeObject): location: Optional[str] """ - ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to. + ID of the location that this reader is assigned to. """ reader: Optional[str] """ - ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on. + ID of the reader this transaction was made on. """ transaction_id: Optional[str] """ @@ -1117,7 +1117,9 @@ class Crypto(StripeObject): """ The blockchain network that the transaction was sent on. """ - token_currency: Optional[Literal["usdc", "usdg", "usdp"]] + token_currency: Optional[ + Literal["phantom_cash", "usdc", "usdg", "usdp", "usdt"] + ] """ The token currency that the transaction was sent with. """ @@ -1470,6 +1472,10 @@ class Address(StripeObject): """ _inner_class_types = {"address": Address} + location: Optional[str] + """ + ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to. + """ payer_details: Optional[PayerDetails] """ The payer details for this transaction. @@ -1484,6 +1490,10 @@ class Address(StripeObject): Preferred language of the Klarna authorization page that the customer is redirected to. Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` """ + reader: Optional[str] + """ + ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on. + """ _inner_class_types = {"payer_details": PayerDetails} class Konbini(StripeObject): @@ -1777,6 +1787,10 @@ class Pix(StripeObject): """ Unique transaction id generated by BCB """ + mandate: Optional[str] + """ + ID of the multi use Mandate generated by the PaymentIntent + """ class Promptpay(StripeObject): reference: Optional[str] @@ -1931,6 +1945,12 @@ class Sofort(StripeObject): class StripeAccount(StripeObject): pass + class Sunbit(StripeObject): + transaction_id: Optional[str] + """ + The Sunbit transaction ID associated with this payment. + """ + class Swish(StripeObject): fingerprint: Optional[str] """ @@ -2067,6 +2087,7 @@ class Zip(StripeObject): sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] stripe_account: Optional[StripeAccount] + sunbit: Optional[Sunbit] swish: Optional[Swish] twint: Optional[Twint] type: str @@ -2132,6 +2153,7 @@ class Zip(StripeObject): "sepa_debit": SepaDebit, "sofort": Sofort, "stripe_account": StripeAccount, + "sunbit": Sunbit, "swish": Swish, "twint": Twint, "upi": Upi, diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 4af11a634..152b895c6 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -1332,6 +1332,9 @@ class Sofort(StripeObject): Two-letter ISO code representing the country the bank account is located in. """ + class Sunbit(StripeObject): + pass + class Swish(StripeObject): pass @@ -1498,6 +1501,7 @@ class Zip(StripeObject): satispay: Optional[Satispay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] + sunbit: Optional[Sunbit] swish: Optional[Swish] twint: Optional[Twint] type: Literal[ @@ -1549,6 +1553,7 @@ class Zip(StripeObject): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -1612,6 +1617,7 @@ class Zip(StripeObject): "satispay": Satispay, "sepa_debit": SepaDebit, "sofort": Sofort, + "sunbit": Sunbit, "swish": Swish, "twint": Twint, "upi": Upi, diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 2d3d8b588..d18713b37 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -303,8 +303,10 @@ class CustomerTaxId(StripeObject): "et_tin", "eu_oss_vat", "eu_vat", + "fo_vat", "gb_vat", "ge_vat", + "gi_tin", "gn_nif", "hk_br", "hr_oib", @@ -313,6 +315,7 @@ class CustomerTaxId(StripeObject): "il_vat", "in_gst", "is_vat", + "it_cf", "jp_cn", "jp_rn", "jp_trn", @@ -343,6 +346,7 @@ class CustomerTaxId(StripeObject): "pe_ruc", "ph_tin", "pl_nip", + "py_ruc", "ro_tin", "rs_pib", "ru_inn", @@ -373,7 +377,7 @@ class CustomerTaxId(StripeObject): "zw_tin", ] """ - 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`, `hr_oib`, `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`, `pl_nip`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_vat`, `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`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, 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`, `hr_oib`, `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`, `pl_nip`, `it_cf`, `fo_vat`, `gi_tin`, `py_ruc`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_vat`, `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`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown` """ value: Optional[str] """ @@ -419,11 +423,13 @@ class LastFinalizationError(StripeObject): "account_number_invalid", "account_token_required_for_v2_account", "acss_debit_session_incomplete", + "action_blocked", "alipay_upgrade_required", "amount_too_large", "amount_too_small", "api_key_expired", "application_fees_not_allowed", + "approval_required", "authentication_required", "balance_insufficient", "balance_invalid_parameter", @@ -829,9 +835,41 @@ class MandateOptions(StripeObject): mandate_options: Optional[MandateOptions] _inner_class_types = {"mandate_options": MandateOptions} + class Pix(StripeObject): + amount_includes_iof: Optional[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. + """ + expires_after_seconds: Optional[int] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + class SepaDebit(StripeObject): pass + class Upi(StripeObject): + class MandateOptions(StripeObject): + amount: Optional[int] + """ + Amount to be charged for future payments. + """ + amount_type: Optional[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: Optional[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: Optional[int] + """ + End date of the mandate or subscription. + """ + + mandate_options: Optional[MandateOptions] + _inner_class_types = {"mandate_options": MandateOptions} + class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): @@ -899,10 +937,18 @@ class Filters(StripeObject): """ If paying by `payto`, this sub-hash contains details about the PayTo payment method options to pass to the invoice's PaymentIntent. """ + pix: Optional[Pix] + """ + If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. + """ sepa_debit: Optional[SepaDebit] """ If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. """ + upi: Optional[Upi] + """ + If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. + """ us_bank_account: Optional[UsBankAccount] """ If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. @@ -914,7 +960,9 @@ class Filters(StripeObject): "customer_balance": CustomerBalance, "konbini": Konbini, "payto": Payto, + "pix": Pix, "sepa_debit": SepaDebit, + "upi": Upi, "us_bank_account": UsBankAccount, } @@ -963,12 +1011,14 @@ class Filters(StripeObject): "paynow", "paypal", "payto", + "pix", "promptpay", "revolut_pay", "sepa_credit_transfer", "sepa_debit", "sofort", "swish", + "upi", "us_bank_account", "wechat_pay", ] @@ -1471,11 +1521,11 @@ class TaxRateDetails(StripeObject): """ period_end: int """ - End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + The latest timestamp at which invoice items can be associated with this invoice. Use the [line item period](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. """ period_start: int """ - Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. + The earliest timestamp at which invoice items can be associated with this invoice. Use the [line item period](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. """ post_payment_credit_notes_amount: int """ diff --git a/stripe/_mandate.py b/stripe/_mandate.py index 912c1a358..ff1f8b0eb 100644 --- a/stripe/_mandate.py +++ b/stripe/_mandate.py @@ -45,7 +45,14 @@ class Online(StripeObject): _inner_class_types = {"offline": Offline, "online": Online} class MultiUse(StripeObject): - pass + amount: Optional[int] + """ + The amount of the payment on a multi use mandate. + """ + currency: Optional[str] + """ + The currency of the payment on a multi use mandate. + """ class PaymentMethodDetails(StripeObject): class AcssDebit(StripeObject): @@ -198,6 +205,36 @@ class Payto(StripeObject): Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. """ + class Pix(StripeObject): + amount_includes_iof: Optional[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. + """ + amount_type: Optional[Literal["fixed", "maximum"]] + """ + Type of amount. + """ + end_date: Optional[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. + """ + payment_schedule: Optional[ + Literal[ + "halfyearly", "monthly", "quarterly", "weekly", "yearly" + ] + ] + """ + Schedule at which the future payments will be charged. + """ + reference: Optional[str] + """ + Subscription name displayed to buyers in their bank app. + """ + start_date: Optional[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. + """ + class RevolutPay(StripeObject): pass @@ -249,6 +286,7 @@ class UsBankAccount(StripeObject): nz_bank_account: Optional[NzBankAccount] paypal: Optional[Paypal] payto: Optional[Payto] + pix: Optional[Pix] revolut_pay: Optional[RevolutPay] sepa_debit: Optional[SepaDebit] type: str @@ -272,6 +310,7 @@ class UsBankAccount(StripeObject): "nz_bank_account": NzBankAccount, "paypal": Paypal, "payto": Payto, + "pix": Pix, "revolut_pay": RevolutPay, "sepa_debit": SepaDebit, "upi": Upi, diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 36ba300f7..0044b007e 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -897,7 +897,9 @@ class Crypto(StripeObject): """ The blockchain network that the transaction was sent on. """ - token_currency: Optional[Literal["usdc", "usdg", "usdp"]] + token_currency: Optional[ + Literal["phantom_cash", "usdc", "usdg", "usdp", "usdt"] + ] """ The token currency that the transaction was sent with. """ @@ -953,13 +955,11 @@ class Eps(StripeObject): ] ] """ - The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau` """ verified_name: Optional[str] """ - Owner's verified full name. Values are verified or provided by EPS directly - (if supported) at the time of authorization or settlement. They cannot be set or mutated. - EPS rarely provides this information so the attribute is usually empty. + Owner's verified full name. Values are verified or provided by EPS directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. EPS rarely provides this information so the attribute is usually empty. """ class Fpx(StripeObject): @@ -1257,6 +1257,10 @@ class Address(StripeObject): """ _inner_class_types = {"address": Address} + location: Optional[str] + """ + ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to. + """ payer_details: Optional[PayerDetails] """ The payer details for this transaction. @@ -1271,6 +1275,10 @@ class Address(StripeObject): Preferred language of the Klarna authorization page that the customer is redirected to. Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` """ + reader: Optional[str] + """ + ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on. + """ _inner_class_types = {"payer_details": PayerDetails} class Konbini(StripeObject): @@ -1564,6 +1572,10 @@ class Pix(StripeObject): """ Unique transaction id generated by BCB """ + mandate: Optional[str] + """ + ID of the multi use Mandate generated by the PaymentIntent + """ class Promptpay(StripeObject): reference: Optional[str] @@ -1716,6 +1728,12 @@ class Sofort(StripeObject): class StripeAccount(StripeObject): pass + class Sunbit(StripeObject): + transaction_id: Optional[str] + """ + The Sunbit transaction ID associated with this payment. + """ + class Swish(StripeObject): fingerprint: Optional[str] """ @@ -1869,6 +1887,7 @@ class Zip(StripeObject): sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] stripe_account: Optional[StripeAccount] + sunbit: Optional[Sunbit] swish: Optional[Swish] twint: Optional[Twint] type: str @@ -1936,6 +1955,7 @@ class Zip(StripeObject): "sepa_debit": SepaDebit, "sofort": Sofort, "stripe_account": StripeAccount, + "sunbit": Sunbit, "swish": Swish, "twint": Twint, "upi": Upi, diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 1f4fa9e69..96dff0afc 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -208,11 +208,13 @@ class LastPaymentError(StripeObject): "account_number_invalid", "account_token_required_for_v2_account", "acss_debit_session_incomplete", + "action_blocked", "alipay_upgrade_required", "amount_too_large", "amount_too_small", "api_key_expired", "application_fees_not_allowed", + "approval_required", "authentication_required", "balance_insufficient", "balance_invalid_parameter", @@ -482,6 +484,12 @@ class LastPaymentError(StripeObject): The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` """ + class ManagedPayments(StripeObject): + enabled: bool + """ + Set to `true` to enable [Managed Payments](https://docs.stripe.com/payments/managed-payments), Stripe's merchant of record solution, for this session. + """ + class NextAction(StripeObject): class AlipayHandleRedirect(StripeObject): native_data: Optional[str] @@ -1117,6 +1125,24 @@ class BankAddress(StripeObject): """ _inner_class_types = {"financial_addresses": FinancialAddress} + class KlarnaDisplayQrCode(StripeObject): + data: str + """ + The data being used to generate QR code + """ + expires_at: Optional[int] + """ + The timestamp at which the QR code expires. + """ + image_url_png: str + """ + The image_url_png string used to render QR code + """ + image_url_svg: str + """ + The image_url_svg string used to render QR code + """ + class KonbiniDisplayDetails(StripeObject): class Stores(StripeObject): class Familymart(StripeObject): @@ -1422,6 +1448,7 @@ class WechatPayRedirectToIosApp(StripeObject): display_bank_transfer_instructions: Optional[ DisplayBankTransferInstructions ] + klarna_display_qr_code: Optional[KlarnaDisplayQrCode] konbini_display_details: Optional[KonbiniDisplayDetails] multibanco_display_details: Optional[MultibancoDisplayDetails] oxxo_display_details: Optional[OxxoDisplayDetails] @@ -1455,6 +1482,7 @@ class WechatPayRedirectToIosApp(StripeObject): "card_await_notification": CardAwaitNotification, "cashapp_handle_redirect_or_display_qr_code": CashappHandleRedirectOrDisplayQrCode, "display_bank_transfer_instructions": DisplayBankTransferInstructions, + "klarna_display_qr_code": KlarnaDisplayQrCode, "konbini_display_details": KonbiniDisplayDetails, "multibanco_display_details": MultibancoDisplayDetails, "oxxo_display_details": OxxoDisplayDetails, @@ -2378,6 +2406,48 @@ class MandateOptions(StripeObject): _inner_class_types = {"mandate_options": MandateOptions} class Pix(StripeObject): + class MandateOptions(StripeObject): + amount: Optional[int] + """ + Amount to be charged for future payments. + """ + amount_includes_iof: Optional[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. + """ + amount_type: Optional[Literal["fixed", "maximum"]] + """ + Type of amount. + """ + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + """ + end_date: Optional[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. + """ + payment_schedule: Optional[ + Literal[ + "halfyearly", + "monthly", + "quarterly", + "weekly", + "yearly", + ] + ] + """ + Schedule at which the future payments will be charged. + """ + reference: Optional[str] + """ + Subscription name displayed to buyers in their bank app. + """ + start_date: Optional[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. + """ + amount_includes_iof: Optional[Literal["always", "never"]] """ Determines if the amount includes the IOF tax. @@ -2390,7 +2460,8 @@ class Pix(StripeObject): """ The timestamp at which the Pix expires. """ - setup_future_usage: Optional[Literal["none"]] + mandate_options: Optional[MandateOptions] + setup_future_usage: Optional[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2400,6 +2471,7 @@ class Pix(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + _inner_class_types = {"mandate_options": MandateOptions} class Promptpay(StripeObject): setup_future_usage: Optional[Literal["none"]] @@ -2970,6 +3042,7 @@ class TransferData(StripeObject): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -2999,6 +3072,10 @@ class TransferData(StripeObject): """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ + managed_payments: Optional[ManagedPayments] + """ + Settings for Managed Payments. + """ metadata: UntypedStripeObject[str] """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Learn more about [storing information in metadata](https://docs.stripe.com/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). @@ -4508,6 +4585,7 @@ async def list_amount_details_line_items_async( "automatic_payment_methods": AutomaticPaymentMethods, "hooks": Hooks, "last_payment_error": LastPaymentError, + "managed_payments": ManagedPayments, "next_action": NextAction, "payment_details": PaymentDetails, "payment_method_configuration_details": PaymentMethodConfigurationDetails, diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index adbff25e0..652552779 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -323,6 +323,12 @@ class RenderingOptions(StripeObject): """ _inner_class_types = {"invoice_data": InvoiceData} + class ManagedPayments(StripeObject): + enabled: bool + """ + Set to `true` to enable [Managed Payments](https://docs.stripe.com/payments/managed-payments), Stripe's merchant of record solution, for this session. + """ + class NameCollection(StripeObject): class Business(StripeObject): enabled: bool @@ -809,6 +815,10 @@ class TransferData(StripeObject): """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ + managed_payments: Optional[ManagedPayments] + """ + Settings for Managed Payments for this Payment Link and resulting [CheckoutSessions](https://docs.stripe.com/api/checkout/sessions/object), [PaymentIntents](https://docs.stripe.com/api/payment_intents/object), [Invoices](https://docs.stripe.com/api/invoices/object), and [Subscriptions](https://docs.stripe.com/api/subscriptions/object). + """ metadata: UntypedStripeObject[str] """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. @@ -871,6 +881,7 @@ class TransferData(StripeObject): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -1163,6 +1174,7 @@ async def retrieve_async( "custom_fields": CustomField, "custom_text": CustomText, "invoice_creation": InvoiceCreation, + "managed_payments": ManagedPayments, "name_collection": NameCollection, "optional_items": OptionalItem, "payment_intent_data": PaymentIntentData, diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 32c0ef057..9d98d72d0 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -1307,6 +1307,9 @@ class Sofort(StripeObject): Two-letter ISO code representing the country the bank account is located in. """ + class Sunbit(StripeObject): + pass + class Swish(StripeObject): pass @@ -1498,6 +1501,7 @@ class Zip(StripeObject): satispay: Optional[Satispay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] + sunbit: Optional[Sunbit] swish: Optional[Swish] twint: Optional[Twint] type: Literal[ @@ -1549,6 +1553,7 @@ class Zip(StripeObject): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -2063,6 +2068,7 @@ async def retrieve_async( "satispay": Satispay, "sepa_debit": SepaDebit, "sofort": Sofort, + "sunbit": Sunbit, "swish": Swish, "twint": Twint, "upi": Upi, diff --git a/stripe/_payment_method_configuration.py b/stripe/_payment_method_configuration.py index f12653e49..3297cf42a 100644 --- a/stripe/_payment_method_configuration.py +++ b/stripe/_payment_method_configuration.py @@ -1128,6 +1128,28 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} + class Sunbit(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 Swish(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -1341,6 +1363,7 @@ class DisplayPreference(StripeObject): satispay: Optional[Satispay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] + sunbit: Optional[Sunbit] swish: Optional[Swish] twint: Optional[Twint] upi: Optional[Upi] @@ -1534,6 +1557,7 @@ async def retrieve_async( "satispay": Satispay, "sepa_debit": SepaDebit, "sofort": Sofort, + "sunbit": Sunbit, "swish": Swish, "twint": Twint, "upi": Upi, diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 0e274dbb0..a62cce12a 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -913,7 +913,9 @@ class Crypto(StripeObject): """ The blockchain network that the transaction was sent on. """ - token_currency: Optional[Literal["usdc", "usdg", "usdp"]] + token_currency: Optional[ + Literal["phantom_cash", "usdc", "usdg", "usdp", "usdt"] + ] """ The token currency that the transaction was sent with. """ @@ -969,13 +971,11 @@ class Eps(StripeObject): ] ] """ - The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau` """ verified_name: Optional[str] """ - Owner's verified full name. Values are verified or provided by EPS directly - (if supported) at the time of authorization or settlement. They cannot be set or mutated. - EPS rarely provides this information so the attribute is usually empty. + Owner's verified full name. Values are verified or provided by EPS directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. EPS rarely provides this information so the attribute is usually empty. """ class Fpx(StripeObject): @@ -1273,6 +1273,10 @@ class Address(StripeObject): """ _inner_class_types = {"address": Address} + location: Optional[str] + """ + ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to. + """ payer_details: Optional[PayerDetails] """ The payer details for this transaction. @@ -1287,6 +1291,10 @@ class Address(StripeObject): Preferred language of the Klarna authorization page that the customer is redirected to. Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` """ + reader: Optional[str] + """ + ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on. + """ _inner_class_types = {"payer_details": PayerDetails} class Konbini(StripeObject): @@ -1580,6 +1588,10 @@ class Pix(StripeObject): """ Unique transaction id generated by BCB """ + mandate: Optional[str] + """ + ID of the multi use Mandate generated by the PaymentIntent + """ class Promptpay(StripeObject): reference: Optional[str] @@ -1732,6 +1744,12 @@ class Sofort(StripeObject): class StripeAccount(StripeObject): pass + class Sunbit(StripeObject): + transaction_id: Optional[str] + """ + The Sunbit transaction ID associated with this payment. + """ + class Swish(StripeObject): fingerprint: Optional[str] """ @@ -1885,6 +1903,7 @@ class Zip(StripeObject): sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] stripe_account: Optional[StripeAccount] + sunbit: Optional[Sunbit] swish: Optional[Swish] twint: Optional[Twint] type: str @@ -1952,6 +1971,7 @@ class Zip(StripeObject): "sepa_debit": SepaDebit, "sofort": Sofort, "stripe_account": StripeAccount, + "sunbit": Sunbit, "swish": Swish, "twint": Twint, "upi": Upi, diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index f91f3db63..20f0161be 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -217,6 +217,10 @@ class GooglePay(StripeObject): """ The last four digits of the card. """ + moto: Optional[bool] + """ + True if this payment was marked as MOTO and out of scope for SCA. + """ network: Optional[str] """ Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -360,6 +364,9 @@ class Paypal(StripeObject): class Payto(StripeObject): pass + class Pix(StripeObject): + pass + class RevolutPay(StripeObject): pass @@ -426,6 +433,7 @@ class UsBankAccount(StripeObject): nz_bank_account: Optional[NzBankAccount] paypal: Optional[Paypal] payto: Optional[Payto] + pix: Optional[Pix] revolut_pay: Optional[RevolutPay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] @@ -454,6 +462,7 @@ class UsBankAccount(StripeObject): "nz_bank_account": NzBankAccount, "paypal": Paypal, "payto": Payto, + "pix": Pix, "revolut_pay": RevolutPay, "sepa_debit": SepaDebit, "sofort": Sofort, @@ -480,11 +489,13 @@ class SetupError(StripeObject): "account_number_invalid", "account_token_required_for_v2_account", "acss_debit_session_incomplete", + "action_blocked", "alipay_upgrade_required", "amount_too_large", "amount_too_small", "api_key_expired", "application_fees_not_allowed", + "approval_required", "authentication_required", "balance_insufficient", "balance_invalid_parameter", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 351a13a41..a57a67487 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -104,11 +104,13 @@ class LastSetupError(StripeObject): "account_number_invalid", "account_token_required_for_v2_account", "acss_debit_session_incomplete", + "action_blocked", "alipay_upgrade_required", "amount_too_large", "amount_too_small", "api_key_expired", "application_fees_not_allowed", + "approval_required", "authentication_required", "balance_insufficient", "balance_invalid_parameter", @@ -378,6 +380,12 @@ class LastSetupError(StripeObject): The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` """ + class ManagedPayments(StripeObject): + enabled: bool + """ + Set to `true` to enable [Managed Payments](https://docs.stripe.com/payments/managed-payments), Stripe's merchant of record solution, for this session. + """ + class NextAction(StripeObject): class CashappHandleRedirectOrDisplayQrCode(StripeObject): class QrCode(StripeObject): @@ -405,6 +413,28 @@ class QrCode(StripeObject): qr_code: QrCode _inner_class_types = {"qr_code": QrCode} + class PixDisplayQrCode(StripeObject): + data: str + """ + The raw data string used to generate QR code, it should be used together with QR code library. + """ + expires_at: int + """ + The date (unix timestamp) when the PIX expires. + """ + hosted_instructions_url: str + """ + The URL to the hosted pix instructions page, which allows customers to view the pix QR code. + """ + image_url_png: str + """ + The image_url_png string used to render png QR code + """ + image_url_svg: str + """ + The image_url_svg string used to render svg QR code + """ + class RedirectToUrl(StripeObject): return_url: Optional[str] """ @@ -454,6 +484,7 @@ class VerifyWithMicrodeposits(StripeObject): cashapp_handle_redirect_or_display_qr_code: Optional[ CashappHandleRedirectOrDisplayQrCode ] + pix_display_qr_code: Optional[PixDisplayQrCode] redirect_to_url: Optional[RedirectToUrl] type: str """ @@ -469,6 +500,7 @@ class VerifyWithMicrodeposits(StripeObject): verify_with_microdeposits: Optional[VerifyWithMicrodeposits] _inner_class_types = { "cashapp_handle_redirect_or_display_qr_code": CashappHandleRedirectOrDisplayQrCode, + "pix_display_qr_code": PixDisplayQrCode, "redirect_to_url": RedirectToUrl, "upi_handle_redirect_or_display_qr_code": UpiHandleRedirectOrDisplayQrCode, "verify_with_microdeposits": VerifyWithMicrodeposits, @@ -695,6 +727,52 @@ class MandateOptions(StripeObject): mandate_options: Optional[MandateOptions] _inner_class_types = {"mandate_options": MandateOptions} + class Pix(StripeObject): + class MandateOptions(StripeObject): + amount: Optional[int] + """ + Amount to be charged for future payments. + """ + amount_includes_iof: Optional[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. + """ + amount_type: Optional[Literal["fixed", "maximum"]] + """ + Type of amount. + """ + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + """ + end_date: Optional[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. + """ + payment_schedule: Optional[ + Literal[ + "halfyearly", + "monthly", + "quarterly", + "weekly", + "yearly", + ] + ] + """ + Schedule at which the future payments will be charged. + """ + reference: Optional[str] + """ + Subscription name displayed to buyers in their bank app. + """ + start_date: Optional[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. + """ + + mandate_options: Optional[MandateOptions] + _inner_class_types = {"mandate_options": MandateOptions} + class SepaDebit(StripeObject): class MandateOptions(StripeObject): reference_prefix: Optional[str] @@ -791,6 +869,7 @@ class MandateOptions(StripeObject): link: Optional[Link] paypal: Optional[Paypal] payto: Optional[Payto] + pix: Optional[Pix] sepa_debit: Optional[SepaDebit] upi: Optional[Upi] us_bank_account: Optional[UsBankAccount] @@ -804,6 +883,7 @@ class MandateOptions(StripeObject): "link": Link, "paypal": Paypal, "payto": Payto, + "pix": Pix, "sepa_debit": SepaDebit, "upi": Upi, "us_bank_account": UsBankAccount, @@ -902,6 +982,7 @@ class MandateOptions(StripeObject): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -936,6 +1017,7 @@ class MandateOptions(StripeObject): """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ + managed_payments: Optional[ManagedPayments] mandate: Optional[ExpandableField["Mandate"]] """ ID of the multi use Mandate generated by the SetupIntent. @@ -1595,6 +1677,7 @@ async def verify_microdeposits_async( # pyright: ignore[reportGeneralTypeIssues _inner_class_types = { "automatic_payment_methods": AutomaticPaymentMethods, "last_setup_error": LastSetupError, + "managed_payments": ManagedPayments, "next_action": NextAction, "payment_method_configuration_details": PaymentMethodConfigurationDetails, "payment_method_options": PaymentMethodOptions, diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 604bb4539..07bc2c8bb 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -208,6 +208,12 @@ class Issuer(StripeObject): issuer: Issuer _inner_class_types = {"issuer": Issuer} + class ManagedPayments(StripeObject): + enabled: bool + """ + Set to `true` to enable [Managed Payments](https://docs.stripe.com/payments/managed-payments), Stripe's merchant of record solution, for this session. + """ + class PauseCollection(StripeObject): behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] """ @@ -343,9 +349,65 @@ class MandateOptions(StripeObject): mandate_options: Optional[MandateOptions] _inner_class_types = {"mandate_options": MandateOptions} + class Pix(StripeObject): + class MandateOptions(StripeObject): + amount: Optional[int] + """ + Amount to be charged for future payments. + """ + amount_includes_iof: Optional[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. + """ + end_date: Optional[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. + """ + payment_schedule: Optional[ + Literal[ + "halfyearly", + "monthly", + "quarterly", + "weekly", + "yearly", + ] + ] + """ + Schedule at which the future payments will be charged. + """ + + expires_after_seconds: Optional[int] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + mandate_options: Optional[MandateOptions] + _inner_class_types = {"mandate_options": MandateOptions} + class SepaDebit(StripeObject): pass + class Upi(StripeObject): + class MandateOptions(StripeObject): + amount: Optional[int] + """ + Amount to be charged for future payments. + """ + amount_type: Optional[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: Optional[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: Optional[int] + """ + End date of the mandate or subscription. + """ + + mandate_options: Optional[MandateOptions] + _inner_class_types = {"mandate_options": MandateOptions} + class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): @@ -413,10 +475,18 @@ class Filters(StripeObject): """ This sub-hash contains details about the PayTo payment method options to pass to invoices created by the subscription. """ + pix: Optional[Pix] + """ + This sub-hash contains details about the Pix payment method options to pass to invoices created by the subscription. + """ sepa_debit: Optional[SepaDebit] """ This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. """ + upi: Optional[Upi] + """ + This sub-hash contains details about the UPI payment method options to pass to invoices created by the subscription. + """ us_bank_account: Optional[UsBankAccount] """ This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. @@ -428,7 +498,9 @@ class Filters(StripeObject): "customer_balance": CustomerBalance, "konbini": Konbini, "payto": Payto, + "pix": Pix, "sepa_debit": SepaDebit, + "upi": Upi, "us_bank_account": UsBankAccount, } @@ -473,12 +545,14 @@ class Filters(StripeObject): "paynow", "paypal", "payto", + "pix", "promptpay", "revolut_pay", "sepa_credit_transfer", "sepa_debit", "sofort", "swish", + "upi", "us_bank_account", "wechat_pay", ] @@ -668,6 +742,10 @@ class EndBehavior(StripeObject): """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ + managed_payments: Optional[ManagedPayments] + """ + Settings for Managed Payments for this Subscription and resulting [Invoices](https://docs.stripe.com/api/invoices/object) and [PaymentIntents](https://docs.stripe.com/api/payment_intents/object). + """ metadata: UntypedStripeObject[str] """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. @@ -1302,7 +1380,7 @@ def _cls_resume( cls, subscription: str, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ - Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice is not paid by the expiration date, it is voided and the subscription remains paused. + Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice isn't paid by the expiration date, it is voided and the subscription remains paused. You can only resume subscriptions with collection_method set to charge_automatically. send_invoice subscriptions are not supported. """ return cast( "Subscription", @@ -1321,7 +1399,7 @@ def resume( subscription: str, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ - Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice is not paid by the expiration date, it is voided and the subscription remains paused. + Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice isn't paid by the expiration date, it is voided and the subscription remains paused. You can only resume subscriptions with collection_method set to charge_automatically. send_invoice subscriptions are not supported. """ ... @@ -1330,7 +1408,7 @@ def resume( self, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ - Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice is not paid by the expiration date, it is voided and the subscription remains paused. + Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice isn't paid by the expiration date, it is voided and the subscription remains paused. You can only resume subscriptions with collection_method set to charge_automatically. send_invoice subscriptions are not supported. """ ... @@ -1339,7 +1417,7 @@ def resume( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ - Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice is not paid by the expiration date, it is voided and the subscription remains paused. + Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice isn't paid by the expiration date, it is voided and the subscription remains paused. You can only resume subscriptions with collection_method set to charge_automatically. send_invoice subscriptions are not supported. """ return cast( "Subscription", @@ -1357,7 +1435,7 @@ async def _cls_resume_async( cls, subscription: str, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ - Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice is not paid by the expiration date, it is voided and the subscription remains paused. + Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice isn't paid by the expiration date, it is voided and the subscription remains paused. You can only resume subscriptions with collection_method set to charge_automatically. send_invoice subscriptions are not supported. """ return cast( "Subscription", @@ -1376,7 +1454,7 @@ async def resume_async( subscription: str, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ - Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice is not paid by the expiration date, it is voided and the subscription remains paused. + Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice isn't paid by the expiration date, it is voided and the subscription remains paused. You can only resume subscriptions with collection_method set to charge_automatically. send_invoice subscriptions are not supported. """ ... @@ -1385,7 +1463,7 @@ async def resume_async( self, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ - Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice is not paid by the expiration date, it is voided and the subscription remains paused. + Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice isn't paid by the expiration date, it is voided and the subscription remains paused. You can only resume subscriptions with collection_method set to charge_automatically. send_invoice subscriptions are not supported. """ ... @@ -1394,7 +1472,7 @@ async def resume_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ - Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice is not paid by the expiration date, it is voided and the subscription remains paused. + Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice isn't paid by the expiration date, it is voided and the subscription remains paused. You can only resume subscriptions with collection_method set to charge_automatically. send_invoice subscriptions are not supported. """ return cast( "Subscription", @@ -1476,6 +1554,7 @@ async def search_auto_paging_iter_async( "billing_thresholds": BillingThresholds, "cancellation_details": CancellationDetails, "invoice_settings": InvoiceSettings, + "managed_payments": ManagedPayments, "pause_collection": PauseCollection, "payment_settings": PaymentSettings, "pending_invoice_item_interval": PendingInvoiceItemInterval, diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index bd44c71ab..1f57420d2 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -462,7 +462,7 @@ def resume( options: Optional["RequestOptions"] = None, ) -> "Subscription": """ - Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice is not paid by the expiration date, it is voided and the subscription remains paused. + Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice isn't paid by the expiration date, it is voided and the subscription remains paused. You can only resume subscriptions with collection_method set to charge_automatically. send_invoice subscriptions are not supported. """ return cast( "Subscription", @@ -484,7 +484,7 @@ async def resume_async( options: Optional["RequestOptions"] = None, ) -> "Subscription": """ - Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice is not paid by the expiration date, it is voided and the subscription remains paused. + Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice isn't paid by the expiration date, it is voided and the subscription remains paused. You can only resume subscriptions with collection_method set to charge_automatically. send_invoice subscriptions are not supported. """ return cast( "Subscription", diff --git a/stripe/_tax_id.py b/stripe/_tax_id.py index c50ced8cc..a0e75354a 100644 --- a/stripe/_tax_id.py +++ b/stripe/_tax_id.py @@ -152,8 +152,10 @@ class Verification(StripeObject): "et_tin", "eu_oss_vat", "eu_vat", + "fo_vat", "gb_vat", "ge_vat", + "gi_tin", "gn_nif", "hk_br", "hr_oib", @@ -162,6 +164,7 @@ class Verification(StripeObject): "il_vat", "in_gst", "is_vat", + "it_cf", "jp_cn", "jp_rn", "jp_trn", @@ -192,6 +195,7 @@ class Verification(StripeObject): "pe_ruc", "ph_tin", "pl_nip", + "py_ruc", "ro_tin", "rs_pib", "ru_inn", @@ -222,7 +226,7 @@ class Verification(StripeObject): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` """ value: str """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index c49edcdad..3af1b05f0 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -514,8 +514,10 @@ class TaxId(StripeObject): "et_tin", "eu_oss_vat", "eu_vat", + "fo_vat", "gb_vat", "ge_vat", + "gi_tin", "gn_nif", "hk_br", "hr_oib", @@ -524,6 +526,7 @@ class TaxId(StripeObject): "il_vat", "in_gst", "is_vat", + "it_cf", "jp_cn", "jp_rn", "jp_trn", @@ -554,6 +557,7 @@ class TaxId(StripeObject): "pe_ruc", "ph_tin", "pl_nip", + "py_ruc", "ro_tin", "rs_pib", "ru_inn", @@ -584,7 +588,7 @@ class TaxId(StripeObject): "zw_tin", ] """ - 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`, `hr_oib`, `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`, `pl_nip`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_vat`, `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`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, 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`, `hr_oib`, `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`, `pl_nip`, `it_cf`, `fo_vat`, `gi_tin`, `py_ruc`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_vat`, `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`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown` """ value: Optional[str] """ @@ -709,6 +713,12 @@ class RenderingOptions(StripeObject): invoice_data: InvoiceData _inner_class_types = {"invoice_data": InvoiceData} + class ManagedPayments(StripeObject): + enabled: bool + """ + Set to `true` to enable [Managed Payments](https://docs.stripe.com/payments/managed-payments), Stripe's merchant of record solution, for this session. + """ + class NameCollection(StripeObject): class Business(StripeObject): enabled: bool @@ -1440,6 +1450,48 @@ class MandateOptions(StripeObject): _inner_class_types = {"mandate_options": MandateOptions} class Pix(StripeObject): + class MandateOptions(StripeObject): + amount: Optional[int] + """ + Amount to be charged for future payments. + """ + amount_includes_iof: Optional[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. + """ + amount_type: Optional[Literal["fixed", "maximum"]] + """ + Type of amount. + """ + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + """ + end_date: Optional[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. + """ + payment_schedule: Optional[ + Literal[ + "halfyearly", + "monthly", + "quarterly", + "weekly", + "yearly", + ] + ] + """ + Schedule at which the future payments will be charged. + """ + reference: Optional[str] + """ + Subscription name displayed to buyers in their bank app. + """ + start_date: Optional[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. + """ + amount_includes_iof: Optional[Literal["always", "never"]] """ Determines if the amount includes the IOF tax. @@ -1448,7 +1500,8 @@ class Pix(StripeObject): """ The number of seconds after which Pix payment will expire. """ - setup_future_usage: Optional[Literal["none"]] + mandate_options: Optional[MandateOptions] + setup_future_usage: Optional[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1458,6 +1511,7 @@ class Pix(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + _inner_class_types = {"mandate_options": MandateOptions} class RevolutPay(StripeObject): capture_method: Optional[Literal["manual"]] @@ -2370,6 +2424,10 @@ class Link(StripeObject): """ The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. """ + managed_payments: Optional[ManagedPayments] + """ + Settings for Managed Payments for this Checkout Session and resulting [PaymentIntents](https://docs.stripe.com/api/payment_intents/object), [Invoices](https://docs.stripe.com/api/invoices/object), and [Subscriptions](https://docs.stripe.com/api/subscriptions/object). + """ metadata: Optional[UntypedStripeObject[str]] """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. @@ -2883,6 +2941,7 @@ async def retrieve_async( "customer_details": CustomerDetails, "discounts": Discount, "invoice_creation": InvoiceCreation, + "managed_payments": ManagedPayments, "name_collection": NameCollection, "optional_items": OptionalItem, "payment_method_configuration_details": PaymentMethodConfigurationDetails, diff --git a/stripe/issuing/_authorization.py b/stripe/issuing/_authorization.py index 1194e6afd..f6f4e1159 100644 --- a/stripe/issuing/_authorization.py +++ b/stripe/issuing/_authorization.py @@ -524,6 +524,10 @@ class ThreeDSecure(StripeObject): """ You can [create physical or virtual cards](https://docs.stripe.com/issuing) that are issued to cardholders. """ + card_presence: Optional[Literal["not_present", "present"]] + """ + Whether the card was present at the point of sale for the authorization. + """ cardholder: Optional[ExpandableField["Cardholder"]] """ The cardholder to whom this authorization belongs. diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index 4c083786b..9746878b4 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -540,6 +540,12 @@ class SpendingLimit(StripeObject): Interval (or event) to which the amount applies. """ + allowed_card_presences: Optional[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be allowed. Possible options are `present`, `not_present`. All other statuses will be blocked. Cannot be set with `blocked_card_presences`. Provide an empty value to unset this control. + """ allowed_categories: Optional[ List[ Literal[ @@ -848,6 +854,12 @@ class SpendingLimit(StripeObject): """ Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. """ + blocked_card_presences: Optional[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be declined. Possible options are `present`, `not_present`. Cannot be set with `allowed_card_presences`. Provide an empty value to unset this control. + """ blocked_categories: Optional[ List[ Literal[ @@ -1211,7 +1223,9 @@ class GooglePay(StripeObject): """ The brand of the card. """ - cancellation_reason: Optional[Literal["design_rejected", "lost", "stolen"]] + cancellation_reason: Optional[ + Literal["design_rejected", "fulfillment_error", "lost", "stolen"] + ] """ The reason why the card was canceled. """ @@ -1290,7 +1304,7 @@ class GooglePay(StripeObject): The card this card replaces, if any. """ replacement_reason: Optional[ - Literal["damaged", "expired", "lost", "stolen"] + Literal["damaged", "expired", "fulfillment_error", "lost", "stolen"] ] """ The reason why the previous card needed to be replaced. diff --git a/stripe/issuing/_cardholder.py b/stripe/issuing/_cardholder.py index e15f7cbd7..c0ccce0e5 100644 --- a/stripe/issuing/_cardholder.py +++ b/stripe/issuing/_cardholder.py @@ -507,6 +507,12 @@ class SpendingLimit(StripeObject): Interval (or event) to which the amount applies. """ + allowed_card_presences: Optional[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be allowed. Possible options are `present`, `not_present`. All other statuses will be blocked. Cannot be set with `blocked_card_presences`. Provide an empty value to unset this control. + """ allowed_categories: Optional[ List[ Literal[ @@ -815,6 +821,12 @@ class SpendingLimit(StripeObject): """ Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. """ + blocked_card_presences: Optional[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be declined. Possible options are `present`, `not_present`. Cannot be set with `allowed_card_presences`. Provide an empty value to unset this control. + """ blocked_categories: Optional[ List[ Literal[ diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index 3a98bf711..a7a0c1961 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -54,6 +54,7 @@ AccountCreateParamsCapabilitiesAfterpayClearpayPayments as AccountCreateParamsCapabilitiesAfterpayClearpayPayments, AccountCreateParamsCapabilitiesAlmaPayments as AccountCreateParamsCapabilitiesAlmaPayments, AccountCreateParamsCapabilitiesAmazonPayPayments as AccountCreateParamsCapabilitiesAmazonPayPayments, + AccountCreateParamsCapabilitiesAppDistribution as AccountCreateParamsCapabilitiesAppDistribution, AccountCreateParamsCapabilitiesAuBecsDebitPayments as AccountCreateParamsCapabilitiesAuBecsDebitPayments, AccountCreateParamsCapabilitiesBacsDebitPayments as AccountCreateParamsCapabilitiesBacsDebitPayments, AccountCreateParamsCapabilitiesBancontactPayments as AccountCreateParamsCapabilitiesBancontactPayments, @@ -101,6 +102,7 @@ AccountCreateParamsCapabilitiesSepaBankTransferPayments as AccountCreateParamsCapabilitiesSepaBankTransferPayments, AccountCreateParamsCapabilitiesSepaDebitPayments as AccountCreateParamsCapabilitiesSepaDebitPayments, AccountCreateParamsCapabilitiesSofortPayments as AccountCreateParamsCapabilitiesSofortPayments, + AccountCreateParamsCapabilitiesSunbitPayments as AccountCreateParamsCapabilitiesSunbitPayments, AccountCreateParamsCapabilitiesSwishPayments as AccountCreateParamsCapabilitiesSwishPayments, AccountCreateParamsCapabilitiesTaxReportingUs1099K as AccountCreateParamsCapabilitiesTaxReportingUs1099K, AccountCreateParamsCapabilitiesTaxReportingUs1099Misc as AccountCreateParamsCapabilitiesTaxReportingUs1099Misc, @@ -346,6 +348,8 @@ AccountSessionCreateParamsComponentsAccountManagementFeatures as AccountSessionCreateParamsComponentsAccountManagementFeatures, AccountSessionCreateParamsComponentsAccountOnboarding as AccountSessionCreateParamsComponentsAccountOnboarding, AccountSessionCreateParamsComponentsAccountOnboardingFeatures as AccountSessionCreateParamsComponentsAccountOnboardingFeatures, + AccountSessionCreateParamsComponentsBalanceReport as AccountSessionCreateParamsComponentsBalanceReport, + AccountSessionCreateParamsComponentsBalanceReportFeatures as AccountSessionCreateParamsComponentsBalanceReportFeatures, AccountSessionCreateParamsComponentsBalances as AccountSessionCreateParamsComponentsBalances, AccountSessionCreateParamsComponentsBalancesFeatures as AccountSessionCreateParamsComponentsBalancesFeatures, AccountSessionCreateParamsComponentsDisputesList as AccountSessionCreateParamsComponentsDisputesList, @@ -372,6 +376,8 @@ AccountSessionCreateParamsComponentsPaymentsFeatures as AccountSessionCreateParamsComponentsPaymentsFeatures, AccountSessionCreateParamsComponentsPayoutDetails as AccountSessionCreateParamsComponentsPayoutDetails, AccountSessionCreateParamsComponentsPayoutDetailsFeatures as AccountSessionCreateParamsComponentsPayoutDetailsFeatures, + AccountSessionCreateParamsComponentsPayoutReconciliationReport as AccountSessionCreateParamsComponentsPayoutReconciliationReport, + AccountSessionCreateParamsComponentsPayoutReconciliationReportFeatures as AccountSessionCreateParamsComponentsPayoutReconciliationReportFeatures, AccountSessionCreateParamsComponentsPayouts as AccountSessionCreateParamsComponentsPayouts, AccountSessionCreateParamsComponentsPayoutsFeatures as AccountSessionCreateParamsComponentsPayoutsFeatures, AccountSessionCreateParamsComponentsPayoutsList as AccountSessionCreateParamsComponentsPayoutsList, @@ -394,6 +400,7 @@ AccountUpdateParamsCapabilitiesAfterpayClearpayPayments as AccountUpdateParamsCapabilitiesAfterpayClearpayPayments, AccountUpdateParamsCapabilitiesAlmaPayments as AccountUpdateParamsCapabilitiesAlmaPayments, AccountUpdateParamsCapabilitiesAmazonPayPayments as AccountUpdateParamsCapabilitiesAmazonPayPayments, + AccountUpdateParamsCapabilitiesAppDistribution as AccountUpdateParamsCapabilitiesAppDistribution, AccountUpdateParamsCapabilitiesAuBecsDebitPayments as AccountUpdateParamsCapabilitiesAuBecsDebitPayments, AccountUpdateParamsCapabilitiesBacsDebitPayments as AccountUpdateParamsCapabilitiesBacsDebitPayments, AccountUpdateParamsCapabilitiesBancontactPayments as AccountUpdateParamsCapabilitiesBancontactPayments, @@ -441,6 +448,7 @@ AccountUpdateParamsCapabilitiesSepaBankTransferPayments as AccountUpdateParamsCapabilitiesSepaBankTransferPayments, AccountUpdateParamsCapabilitiesSepaDebitPayments as AccountUpdateParamsCapabilitiesSepaDebitPayments, AccountUpdateParamsCapabilitiesSofortPayments as AccountUpdateParamsCapabilitiesSofortPayments, + AccountUpdateParamsCapabilitiesSunbitPayments as AccountUpdateParamsCapabilitiesSunbitPayments, AccountUpdateParamsCapabilitiesSwishPayments as AccountUpdateParamsCapabilitiesSwishPayments, AccountUpdateParamsCapabilitiesTaxReportingUs1099K as AccountUpdateParamsCapabilitiesTaxReportingUs1099K, AccountUpdateParamsCapabilitiesTaxReportingUs1099Misc as AccountUpdateParamsCapabilitiesTaxReportingUs1099Misc, @@ -672,6 +680,7 @@ ConfirmationTokenCreateParamsPaymentMethodDataSatispay as ConfirmationTokenCreateParamsPaymentMethodDataSatispay, ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit as ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit, ConfirmationTokenCreateParamsPaymentMethodDataSofort as ConfirmationTokenCreateParamsPaymentMethodDataSofort, + ConfirmationTokenCreateParamsPaymentMethodDataSunbit as ConfirmationTokenCreateParamsPaymentMethodDataSunbit, ConfirmationTokenCreateParamsPaymentMethodDataSwish as ConfirmationTokenCreateParamsPaymentMethodDataSwish, ConfirmationTokenCreateParamsPaymentMethodDataTwint as ConfirmationTokenCreateParamsPaymentMethodDataTwint, ConfirmationTokenCreateParamsPaymentMethodDataUpi as ConfirmationTokenCreateParamsPaymentMethodDataUpi, @@ -1089,7 +1098,10 @@ InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsKonbini as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsKonbini, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPayto as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPayto, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions, + InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPix as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPix, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit, + InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpi as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpi, + InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters, @@ -1236,7 +1248,10 @@ InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsKonbini as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsKonbini, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPayto as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPayto, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions, + InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPix as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPix, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit, + InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpi as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpi, + InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters, @@ -1321,7 +1336,10 @@ InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsKonbini as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsKonbini, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPayto as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPayto, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions, + InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPix as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPix, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit, + InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpi as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpi, + InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters, @@ -1447,6 +1465,7 @@ PaymentIntentConfirmParamsPaymentMethodDataSatispay as PaymentIntentConfirmParamsPaymentMethodDataSatispay, PaymentIntentConfirmParamsPaymentMethodDataSepaDebit as PaymentIntentConfirmParamsPaymentMethodDataSepaDebit, PaymentIntentConfirmParamsPaymentMethodDataSofort as PaymentIntentConfirmParamsPaymentMethodDataSofort, + PaymentIntentConfirmParamsPaymentMethodDataSunbit as PaymentIntentConfirmParamsPaymentMethodDataSunbit, PaymentIntentConfirmParamsPaymentMethodDataSwish as PaymentIntentConfirmParamsPaymentMethodDataSwish, PaymentIntentConfirmParamsPaymentMethodDataTwint as PaymentIntentConfirmParamsPaymentMethodDataTwint, PaymentIntentConfirmParamsPaymentMethodDataUpi as PaymentIntentConfirmParamsPaymentMethodDataUpi, @@ -1511,6 +1530,7 @@ PaymentIntentConfirmParamsPaymentMethodOptionsPayto as PaymentIntentConfirmParamsPaymentMethodOptionsPayto, PaymentIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions as PaymentIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions, PaymentIntentConfirmParamsPaymentMethodOptionsPix as PaymentIntentConfirmParamsPaymentMethodOptionsPix, + PaymentIntentConfirmParamsPaymentMethodOptionsPixMandateOptions as PaymentIntentConfirmParamsPaymentMethodOptionsPixMandateOptions, PaymentIntentConfirmParamsPaymentMethodOptionsPromptpay as PaymentIntentConfirmParamsPaymentMethodOptionsPromptpay, PaymentIntentConfirmParamsPaymentMethodOptionsRevolutPay as PaymentIntentConfirmParamsPaymentMethodOptionsRevolutPay, PaymentIntentConfirmParamsPaymentMethodOptionsSamsungPay as PaymentIntentConfirmParamsPaymentMethodOptionsSamsungPay, @@ -1604,6 +1624,7 @@ PaymentIntentCreateParamsPaymentMethodDataSatispay as PaymentIntentCreateParamsPaymentMethodDataSatispay, PaymentIntentCreateParamsPaymentMethodDataSepaDebit as PaymentIntentCreateParamsPaymentMethodDataSepaDebit, PaymentIntentCreateParamsPaymentMethodDataSofort as PaymentIntentCreateParamsPaymentMethodDataSofort, + PaymentIntentCreateParamsPaymentMethodDataSunbit as PaymentIntentCreateParamsPaymentMethodDataSunbit, PaymentIntentCreateParamsPaymentMethodDataSwish as PaymentIntentCreateParamsPaymentMethodDataSwish, PaymentIntentCreateParamsPaymentMethodDataTwint as PaymentIntentCreateParamsPaymentMethodDataTwint, PaymentIntentCreateParamsPaymentMethodDataUpi as PaymentIntentCreateParamsPaymentMethodDataUpi, @@ -1668,6 +1689,7 @@ PaymentIntentCreateParamsPaymentMethodOptionsPayto as PaymentIntentCreateParamsPaymentMethodOptionsPayto, PaymentIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions as PaymentIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions, PaymentIntentCreateParamsPaymentMethodOptionsPix as PaymentIntentCreateParamsPaymentMethodOptionsPix, + PaymentIntentCreateParamsPaymentMethodOptionsPixMandateOptions as PaymentIntentCreateParamsPaymentMethodOptionsPixMandateOptions, PaymentIntentCreateParamsPaymentMethodOptionsPromptpay as PaymentIntentCreateParamsPaymentMethodOptionsPromptpay, PaymentIntentCreateParamsPaymentMethodOptionsRevolutPay as PaymentIntentCreateParamsPaymentMethodOptionsRevolutPay, PaymentIntentCreateParamsPaymentMethodOptionsSamsungPay as PaymentIntentCreateParamsPaymentMethodOptionsSamsungPay, @@ -1782,6 +1804,7 @@ PaymentIntentModifyParamsPaymentMethodDataSatispay as PaymentIntentModifyParamsPaymentMethodDataSatispay, PaymentIntentModifyParamsPaymentMethodDataSepaDebit as PaymentIntentModifyParamsPaymentMethodDataSepaDebit, PaymentIntentModifyParamsPaymentMethodDataSofort as PaymentIntentModifyParamsPaymentMethodDataSofort, + PaymentIntentModifyParamsPaymentMethodDataSunbit as PaymentIntentModifyParamsPaymentMethodDataSunbit, PaymentIntentModifyParamsPaymentMethodDataSwish as PaymentIntentModifyParamsPaymentMethodDataSwish, PaymentIntentModifyParamsPaymentMethodDataTwint as PaymentIntentModifyParamsPaymentMethodDataTwint, PaymentIntentModifyParamsPaymentMethodDataUpi as PaymentIntentModifyParamsPaymentMethodDataUpi, @@ -1846,6 +1869,7 @@ PaymentIntentModifyParamsPaymentMethodOptionsPayto as PaymentIntentModifyParamsPaymentMethodOptionsPayto, PaymentIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions as PaymentIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions, PaymentIntentModifyParamsPaymentMethodOptionsPix as PaymentIntentModifyParamsPaymentMethodOptionsPix, + PaymentIntentModifyParamsPaymentMethodOptionsPixMandateOptions as PaymentIntentModifyParamsPaymentMethodOptionsPixMandateOptions, PaymentIntentModifyParamsPaymentMethodOptionsPromptpay as PaymentIntentModifyParamsPaymentMethodOptionsPromptpay, PaymentIntentModifyParamsPaymentMethodOptionsRevolutPay as PaymentIntentModifyParamsPaymentMethodOptionsRevolutPay, PaymentIntentModifyParamsPaymentMethodOptionsSamsungPay as PaymentIntentModifyParamsPaymentMethodOptionsSamsungPay, @@ -1940,6 +1964,7 @@ PaymentIntentUpdateParamsPaymentMethodDataSatispay as PaymentIntentUpdateParamsPaymentMethodDataSatispay, PaymentIntentUpdateParamsPaymentMethodDataSepaDebit as PaymentIntentUpdateParamsPaymentMethodDataSepaDebit, PaymentIntentUpdateParamsPaymentMethodDataSofort as PaymentIntentUpdateParamsPaymentMethodDataSofort, + PaymentIntentUpdateParamsPaymentMethodDataSunbit as PaymentIntentUpdateParamsPaymentMethodDataSunbit, PaymentIntentUpdateParamsPaymentMethodDataSwish as PaymentIntentUpdateParamsPaymentMethodDataSwish, PaymentIntentUpdateParamsPaymentMethodDataTwint as PaymentIntentUpdateParamsPaymentMethodDataTwint, PaymentIntentUpdateParamsPaymentMethodDataUpi as PaymentIntentUpdateParamsPaymentMethodDataUpi, @@ -2004,6 +2029,7 @@ PaymentIntentUpdateParamsPaymentMethodOptionsPayto as PaymentIntentUpdateParamsPaymentMethodOptionsPayto, PaymentIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions as PaymentIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions, PaymentIntentUpdateParamsPaymentMethodOptionsPix as PaymentIntentUpdateParamsPaymentMethodOptionsPix, + PaymentIntentUpdateParamsPaymentMethodOptionsPixMandateOptions as PaymentIntentUpdateParamsPaymentMethodOptionsPixMandateOptions, PaymentIntentUpdateParamsPaymentMethodOptionsPromptpay as PaymentIntentUpdateParamsPaymentMethodOptionsPromptpay, PaymentIntentUpdateParamsPaymentMethodOptionsRevolutPay as PaymentIntentUpdateParamsPaymentMethodOptionsRevolutPay, PaymentIntentUpdateParamsPaymentMethodOptionsSamsungPay as PaymentIntentUpdateParamsPaymentMethodOptionsSamsungPay, @@ -2059,6 +2085,7 @@ PaymentLinkCreateParamsLineItemPriceData as PaymentLinkCreateParamsLineItemPriceData, PaymentLinkCreateParamsLineItemPriceDataProductData as PaymentLinkCreateParamsLineItemPriceDataProductData, PaymentLinkCreateParamsLineItemPriceDataRecurring as PaymentLinkCreateParamsLineItemPriceDataRecurring, + PaymentLinkCreateParamsManagedPayments as PaymentLinkCreateParamsManagedPayments, PaymentLinkCreateParamsNameCollection as PaymentLinkCreateParamsNameCollection, PaymentLinkCreateParamsNameCollectionBusiness as PaymentLinkCreateParamsNameCollectionBusiness, PaymentLinkCreateParamsNameCollectionIndividual as PaymentLinkCreateParamsNameCollectionIndividual, @@ -2281,6 +2308,8 @@ PaymentMethodConfigurationCreateParamsSepaDebitDisplayPreference as PaymentMethodConfigurationCreateParamsSepaDebitDisplayPreference, PaymentMethodConfigurationCreateParamsSofort as PaymentMethodConfigurationCreateParamsSofort, PaymentMethodConfigurationCreateParamsSofortDisplayPreference as PaymentMethodConfigurationCreateParamsSofortDisplayPreference, + PaymentMethodConfigurationCreateParamsSunbit as PaymentMethodConfigurationCreateParamsSunbit, + PaymentMethodConfigurationCreateParamsSunbitDisplayPreference as PaymentMethodConfigurationCreateParamsSunbitDisplayPreference, PaymentMethodConfigurationCreateParamsSwish as PaymentMethodConfigurationCreateParamsSwish, PaymentMethodConfigurationCreateParamsSwishDisplayPreference as PaymentMethodConfigurationCreateParamsSwishDisplayPreference, PaymentMethodConfigurationCreateParamsTwint as PaymentMethodConfigurationCreateParamsTwint, @@ -2401,6 +2430,8 @@ PaymentMethodConfigurationModifyParamsSepaDebitDisplayPreference as PaymentMethodConfigurationModifyParamsSepaDebitDisplayPreference, PaymentMethodConfigurationModifyParamsSofort as PaymentMethodConfigurationModifyParamsSofort, PaymentMethodConfigurationModifyParamsSofortDisplayPreference as PaymentMethodConfigurationModifyParamsSofortDisplayPreference, + PaymentMethodConfigurationModifyParamsSunbit as PaymentMethodConfigurationModifyParamsSunbit, + PaymentMethodConfigurationModifyParamsSunbitDisplayPreference as PaymentMethodConfigurationModifyParamsSunbitDisplayPreference, PaymentMethodConfigurationModifyParamsSwish as PaymentMethodConfigurationModifyParamsSwish, PaymentMethodConfigurationModifyParamsSwishDisplayPreference as PaymentMethodConfigurationModifyParamsSwishDisplayPreference, PaymentMethodConfigurationModifyParamsTwint as PaymentMethodConfigurationModifyParamsTwint, @@ -2521,6 +2552,8 @@ PaymentMethodConfigurationUpdateParamsSepaDebitDisplayPreference as PaymentMethodConfigurationUpdateParamsSepaDebitDisplayPreference, PaymentMethodConfigurationUpdateParamsSofort as PaymentMethodConfigurationUpdateParamsSofort, PaymentMethodConfigurationUpdateParamsSofortDisplayPreference as PaymentMethodConfigurationUpdateParamsSofortDisplayPreference, + PaymentMethodConfigurationUpdateParamsSunbit as PaymentMethodConfigurationUpdateParamsSunbit, + PaymentMethodConfigurationUpdateParamsSunbitDisplayPreference as PaymentMethodConfigurationUpdateParamsSunbitDisplayPreference, PaymentMethodConfigurationUpdateParamsSwish as PaymentMethodConfigurationUpdateParamsSwish, PaymentMethodConfigurationUpdateParamsSwishDisplayPreference as PaymentMethodConfigurationUpdateParamsSwishDisplayPreference, PaymentMethodConfigurationUpdateParamsTwint as PaymentMethodConfigurationUpdateParamsTwint, @@ -2588,6 +2621,7 @@ PaymentMethodCreateParamsSatispay as PaymentMethodCreateParamsSatispay, PaymentMethodCreateParamsSepaDebit as PaymentMethodCreateParamsSepaDebit, PaymentMethodCreateParamsSofort as PaymentMethodCreateParamsSofort, + PaymentMethodCreateParamsSunbit as PaymentMethodCreateParamsSunbit, PaymentMethodCreateParamsSwish as PaymentMethodCreateParamsSwish, PaymentMethodCreateParamsTwint as PaymentMethodCreateParamsTwint, PaymentMethodCreateParamsUpi as PaymentMethodCreateParamsUpi, @@ -3022,6 +3056,7 @@ SetupIntentConfirmParamsPaymentMethodDataSatispay as SetupIntentConfirmParamsPaymentMethodDataSatispay, SetupIntentConfirmParamsPaymentMethodDataSepaDebit as SetupIntentConfirmParamsPaymentMethodDataSepaDebit, SetupIntentConfirmParamsPaymentMethodDataSofort as SetupIntentConfirmParamsPaymentMethodDataSofort, + SetupIntentConfirmParamsPaymentMethodDataSunbit as SetupIntentConfirmParamsPaymentMethodDataSunbit, SetupIntentConfirmParamsPaymentMethodDataSwish as SetupIntentConfirmParamsPaymentMethodDataSwish, SetupIntentConfirmParamsPaymentMethodDataTwint as SetupIntentConfirmParamsPaymentMethodDataTwint, SetupIntentConfirmParamsPaymentMethodDataUpi as SetupIntentConfirmParamsPaymentMethodDataUpi, @@ -3049,6 +3084,8 @@ SetupIntentConfirmParamsPaymentMethodOptionsPaypal as SetupIntentConfirmParamsPaymentMethodOptionsPaypal, SetupIntentConfirmParamsPaymentMethodOptionsPayto as SetupIntentConfirmParamsPaymentMethodOptionsPayto, SetupIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions as SetupIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions, + SetupIntentConfirmParamsPaymentMethodOptionsPix as SetupIntentConfirmParamsPaymentMethodOptionsPix, + SetupIntentConfirmParamsPaymentMethodOptionsPixMandateOptions as SetupIntentConfirmParamsPaymentMethodOptionsPixMandateOptions, SetupIntentConfirmParamsPaymentMethodOptionsSepaDebit as SetupIntentConfirmParamsPaymentMethodOptionsSepaDebit, SetupIntentConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions as SetupIntentConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions, SetupIntentConfirmParamsPaymentMethodOptionsUpi as SetupIntentConfirmParamsPaymentMethodOptionsUpi, @@ -3116,6 +3153,7 @@ SetupIntentCreateParamsPaymentMethodDataSatispay as SetupIntentCreateParamsPaymentMethodDataSatispay, SetupIntentCreateParamsPaymentMethodDataSepaDebit as SetupIntentCreateParamsPaymentMethodDataSepaDebit, SetupIntentCreateParamsPaymentMethodDataSofort as SetupIntentCreateParamsPaymentMethodDataSofort, + SetupIntentCreateParamsPaymentMethodDataSunbit as SetupIntentCreateParamsPaymentMethodDataSunbit, SetupIntentCreateParamsPaymentMethodDataSwish as SetupIntentCreateParamsPaymentMethodDataSwish, SetupIntentCreateParamsPaymentMethodDataTwint as SetupIntentCreateParamsPaymentMethodDataTwint, SetupIntentCreateParamsPaymentMethodDataUpi as SetupIntentCreateParamsPaymentMethodDataUpi, @@ -3143,6 +3181,8 @@ SetupIntentCreateParamsPaymentMethodOptionsPaypal as SetupIntentCreateParamsPaymentMethodOptionsPaypal, SetupIntentCreateParamsPaymentMethodOptionsPayto as SetupIntentCreateParamsPaymentMethodOptionsPayto, SetupIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions as SetupIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions, + SetupIntentCreateParamsPaymentMethodOptionsPix as SetupIntentCreateParamsPaymentMethodOptionsPix, + SetupIntentCreateParamsPaymentMethodOptionsPixMandateOptions as SetupIntentCreateParamsPaymentMethodOptionsPixMandateOptions, SetupIntentCreateParamsPaymentMethodOptionsSepaDebit as SetupIntentCreateParamsPaymentMethodOptionsSepaDebit, SetupIntentCreateParamsPaymentMethodOptionsSepaDebitMandateOptions as SetupIntentCreateParamsPaymentMethodOptionsSepaDebitMandateOptions, SetupIntentCreateParamsPaymentMethodOptionsUpi as SetupIntentCreateParamsPaymentMethodOptionsUpi, @@ -3210,6 +3250,7 @@ SetupIntentModifyParamsPaymentMethodDataSatispay as SetupIntentModifyParamsPaymentMethodDataSatispay, SetupIntentModifyParamsPaymentMethodDataSepaDebit as SetupIntentModifyParamsPaymentMethodDataSepaDebit, SetupIntentModifyParamsPaymentMethodDataSofort as SetupIntentModifyParamsPaymentMethodDataSofort, + SetupIntentModifyParamsPaymentMethodDataSunbit as SetupIntentModifyParamsPaymentMethodDataSunbit, SetupIntentModifyParamsPaymentMethodDataSwish as SetupIntentModifyParamsPaymentMethodDataSwish, SetupIntentModifyParamsPaymentMethodDataTwint as SetupIntentModifyParamsPaymentMethodDataTwint, SetupIntentModifyParamsPaymentMethodDataUpi as SetupIntentModifyParamsPaymentMethodDataUpi, @@ -3237,6 +3278,8 @@ SetupIntentModifyParamsPaymentMethodOptionsPaypal as SetupIntentModifyParamsPaymentMethodOptionsPaypal, SetupIntentModifyParamsPaymentMethodOptionsPayto as SetupIntentModifyParamsPaymentMethodOptionsPayto, SetupIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions as SetupIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions, + SetupIntentModifyParamsPaymentMethodOptionsPix as SetupIntentModifyParamsPaymentMethodOptionsPix, + SetupIntentModifyParamsPaymentMethodOptionsPixMandateOptions as SetupIntentModifyParamsPaymentMethodOptionsPixMandateOptions, SetupIntentModifyParamsPaymentMethodOptionsSepaDebit as SetupIntentModifyParamsPaymentMethodOptionsSepaDebit, SetupIntentModifyParamsPaymentMethodOptionsSepaDebitMandateOptions as SetupIntentModifyParamsPaymentMethodOptionsSepaDebitMandateOptions, SetupIntentModifyParamsPaymentMethodOptionsUpi as SetupIntentModifyParamsPaymentMethodOptionsUpi, @@ -3302,6 +3345,7 @@ SetupIntentUpdateParamsPaymentMethodDataSatispay as SetupIntentUpdateParamsPaymentMethodDataSatispay, SetupIntentUpdateParamsPaymentMethodDataSepaDebit as SetupIntentUpdateParamsPaymentMethodDataSepaDebit, SetupIntentUpdateParamsPaymentMethodDataSofort as SetupIntentUpdateParamsPaymentMethodDataSofort, + SetupIntentUpdateParamsPaymentMethodDataSunbit as SetupIntentUpdateParamsPaymentMethodDataSunbit, SetupIntentUpdateParamsPaymentMethodDataSwish as SetupIntentUpdateParamsPaymentMethodDataSwish, SetupIntentUpdateParamsPaymentMethodDataTwint as SetupIntentUpdateParamsPaymentMethodDataTwint, SetupIntentUpdateParamsPaymentMethodDataUpi as SetupIntentUpdateParamsPaymentMethodDataUpi, @@ -3329,6 +3373,8 @@ SetupIntentUpdateParamsPaymentMethodOptionsPaypal as SetupIntentUpdateParamsPaymentMethodOptionsPaypal, SetupIntentUpdateParamsPaymentMethodOptionsPayto as SetupIntentUpdateParamsPaymentMethodOptionsPayto, SetupIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions as SetupIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions, + SetupIntentUpdateParamsPaymentMethodOptionsPix as SetupIntentUpdateParamsPaymentMethodOptionsPix, + SetupIntentUpdateParamsPaymentMethodOptionsPixMandateOptions as SetupIntentUpdateParamsPaymentMethodOptionsPixMandateOptions, SetupIntentUpdateParamsPaymentMethodOptionsSepaDebit as SetupIntentUpdateParamsPaymentMethodOptionsSepaDebit, SetupIntentUpdateParamsPaymentMethodOptionsSepaDebitMandateOptions as SetupIntentUpdateParamsPaymentMethodOptionsSepaDebitMandateOptions, SetupIntentUpdateParamsPaymentMethodOptionsUpi as SetupIntentUpdateParamsPaymentMethodOptionsUpi, @@ -3462,7 +3508,11 @@ SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsKonbini as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsKonbini, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPayto as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPayto, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions, + SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPix as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPix, + SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit, + SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpi as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpi, + SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters, @@ -3550,7 +3600,11 @@ SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsKonbini as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsKonbini, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPayto as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPayto, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions, + SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPix as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPix, + SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit, + SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpi as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpi, + SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters, @@ -3710,7 +3764,11 @@ SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsKonbini as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsKonbini, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPayto as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPayto, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions, + SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPix as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPix, + SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit, + SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpi as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpi, + SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters, @@ -3981,6 +4039,10 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsCapabilitiesAppDistribution": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsCapabilitiesAuBecsDebitPayments": ( "stripe.params._account_create_params", False, @@ -4169,6 +4231,10 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsCapabilitiesSunbitPayments": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsCapabilitiesSwishPayments": ( "stripe.params._account_create_params", False, @@ -4880,6 +4946,14 @@ "stripe.params._account_session_create_params", False, ), + "AccountSessionCreateParamsComponentsBalanceReport": ( + "stripe.params._account_session_create_params", + False, + ), + "AccountSessionCreateParamsComponentsBalanceReportFeatures": ( + "stripe.params._account_session_create_params", + False, + ), "AccountSessionCreateParamsComponentsBalances": ( "stripe.params._account_session_create_params", False, @@ -4984,6 +5058,14 @@ "stripe.params._account_session_create_params", False, ), + "AccountSessionCreateParamsComponentsPayoutReconciliationReport": ( + "stripe.params._account_session_create_params", + False, + ), + "AccountSessionCreateParamsComponentsPayoutReconciliationReportFeatures": ( + "stripe.params._account_session_create_params", + False, + ), "AccountSessionCreateParamsComponentsPayouts": ( "stripe.params._account_session_create_params", False, @@ -5061,6 +5143,10 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsCapabilitiesAppDistribution": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsCapabilitiesAuBecsDebitPayments": ( "stripe.params._account_update_params", False, @@ -5249,6 +5335,10 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsCapabilitiesSunbitPayments": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsCapabilitiesSwishPayments": ( "stripe.params._account_update_params", False, @@ -5876,6 +5966,10 @@ "stripe.params._confirmation_token_create_params", False, ), + "ConfirmationTokenCreateParamsPaymentMethodDataSunbit": ( + "stripe.params._confirmation_token_create_params", + False, + ), "ConfirmationTokenCreateParamsPaymentMethodDataSwish": ( "stripe.params._confirmation_token_create_params", False, @@ -6704,10 +6798,22 @@ "stripe.params._invoice_create_params", False, ), + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPix": ( + "stripe.params._invoice_create_params", + False, + ), "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit": ( "stripe.params._invoice_create_params", False, ), + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpi": ( + "stripe.params._invoice_create_params", + False, + ), + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions": ( + "stripe.params._invoice_create_params", + False, + ), "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount": ( "stripe.params._invoice_create_params", False, @@ -7157,10 +7263,22 @@ "stripe.params._invoice_modify_params", False, ), + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPix": ( + "stripe.params._invoice_modify_params", + False, + ), "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit": ( "stripe.params._invoice_modify_params", False, ), + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpi": ( + "stripe.params._invoice_modify_params", + False, + ), + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions": ( + "stripe.params._invoice_modify_params", + False, + ), "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount": ( "stripe.params._invoice_modify_params", False, @@ -7381,10 +7499,22 @@ "stripe.params._invoice_update_params", False, ), + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPix": ( + "stripe.params._invoice_update_params", + False, + ), "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit": ( "stripe.params._invoice_update_params", False, ), + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpi": ( + "stripe.params._invoice_update_params", + False, + ), + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions": ( + "stripe.params._invoice_update_params", + False, + ), "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount": ( "stripe.params._invoice_update_params", False, @@ -7810,6 +7940,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodDataSunbit": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodDataSwish": ( "stripe.params._payment_intent_confirm_params", False, @@ -8066,6 +8200,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsPixMandateOptions": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsPromptpay": ( "stripe.params._payment_intent_confirm_params", False, @@ -8430,6 +8568,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodDataSunbit": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodDataSwish": ( "stripe.params._payment_intent_create_params", False, @@ -8686,6 +8828,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsPixMandateOptions": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsPromptpay": ( "stripe.params._payment_intent_create_params", False, @@ -9110,6 +9256,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodDataSunbit": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodDataSwish": ( "stripe.params._payment_intent_modify_params", False, @@ -9366,6 +9516,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsPixMandateOptions": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsPromptpay": ( "stripe.params._payment_intent_modify_params", False, @@ -9718,6 +9872,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodDataSunbit": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodDataSwish": ( "stripe.params._payment_intent_update_params", False, @@ -9974,6 +10132,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsPixMandateOptions": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsPromptpay": ( "stripe.params._payment_intent_update_params", False, @@ -10178,6 +10340,10 @@ "stripe.params._payment_link_create_params", False, ), + "PaymentLinkCreateParamsManagedPayments": ( + "stripe.params._payment_link_create_params", + False, + ), "PaymentLinkCreateParamsNameCollection": ( "stripe.params._payment_link_create_params", False, @@ -11002,6 +11168,14 @@ "stripe.params._payment_method_configuration_create_params", False, ), + "PaymentMethodConfigurationCreateParamsSunbit": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), + "PaymentMethodConfigurationCreateParamsSunbitDisplayPreference": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), "PaymentMethodConfigurationCreateParamsSwish": ( "stripe.params._payment_method_configuration_create_params", False, @@ -11466,6 +11640,14 @@ "stripe.params._payment_method_configuration_modify_params", False, ), + "PaymentMethodConfigurationModifyParamsSunbit": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), + "PaymentMethodConfigurationModifyParamsSunbitDisplayPreference": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), "PaymentMethodConfigurationModifyParamsSwish": ( "stripe.params._payment_method_configuration_modify_params", False, @@ -11930,6 +12112,14 @@ "stripe.params._payment_method_configuration_update_params", False, ), + "PaymentMethodConfigurationUpdateParamsSunbit": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), + "PaymentMethodConfigurationUpdateParamsSunbitDisplayPreference": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), "PaymentMethodConfigurationUpdateParamsSwish": ( "stripe.params._payment_method_configuration_update_params", False, @@ -12190,6 +12380,10 @@ "stripe.params._payment_method_create_params", False, ), + "PaymentMethodCreateParamsSunbit": ( + "stripe.params._payment_method_create_params", + False, + ), "PaymentMethodCreateParamsSwish": ( "stripe.params._payment_method_create_params", False, @@ -13074,6 +13268,10 @@ "stripe.params._setup_intent_confirm_params", False, ), + "SetupIntentConfirmParamsPaymentMethodDataSunbit": ( + "stripe.params._setup_intent_confirm_params", + False, + ), "SetupIntentConfirmParamsPaymentMethodDataSwish": ( "stripe.params._setup_intent_confirm_params", False, @@ -13182,6 +13380,14 @@ "stripe.params._setup_intent_confirm_params", False, ), + "SetupIntentConfirmParamsPaymentMethodOptionsPix": ( + "stripe.params._setup_intent_confirm_params", + False, + ), + "SetupIntentConfirmParamsPaymentMethodOptionsPixMandateOptions": ( + "stripe.params._setup_intent_confirm_params", + False, + ), "SetupIntentConfirmParamsPaymentMethodOptionsSepaDebit": ( "stripe.params._setup_intent_confirm_params", False, @@ -13442,6 +13648,10 @@ "stripe.params._setup_intent_create_params", False, ), + "SetupIntentCreateParamsPaymentMethodDataSunbit": ( + "stripe.params._setup_intent_create_params", + False, + ), "SetupIntentCreateParamsPaymentMethodDataSwish": ( "stripe.params._setup_intent_create_params", False, @@ -13550,6 +13760,14 @@ "stripe.params._setup_intent_create_params", False, ), + "SetupIntentCreateParamsPaymentMethodOptionsPix": ( + "stripe.params._setup_intent_create_params", + False, + ), + "SetupIntentCreateParamsPaymentMethodOptionsPixMandateOptions": ( + "stripe.params._setup_intent_create_params", + False, + ), "SetupIntentCreateParamsPaymentMethodOptionsSepaDebit": ( "stripe.params._setup_intent_create_params", False, @@ -13802,6 +14020,10 @@ "stripe.params._setup_intent_modify_params", False, ), + "SetupIntentModifyParamsPaymentMethodDataSunbit": ( + "stripe.params._setup_intent_modify_params", + False, + ), "SetupIntentModifyParamsPaymentMethodDataSwish": ( "stripe.params._setup_intent_modify_params", False, @@ -13910,6 +14132,14 @@ "stripe.params._setup_intent_modify_params", False, ), + "SetupIntentModifyParamsPaymentMethodOptionsPix": ( + "stripe.params._setup_intent_modify_params", + False, + ), + "SetupIntentModifyParamsPaymentMethodOptionsPixMandateOptions": ( + "stripe.params._setup_intent_modify_params", + False, + ), "SetupIntentModifyParamsPaymentMethodOptionsSepaDebit": ( "stripe.params._setup_intent_modify_params", False, @@ -14154,6 +14384,10 @@ "stripe.params._setup_intent_update_params", False, ), + "SetupIntentUpdateParamsPaymentMethodDataSunbit": ( + "stripe.params._setup_intent_update_params", + False, + ), "SetupIntentUpdateParamsPaymentMethodDataSwish": ( "stripe.params._setup_intent_update_params", False, @@ -14262,6 +14496,14 @@ "stripe.params._setup_intent_update_params", False, ), + "SetupIntentUpdateParamsPaymentMethodOptionsPix": ( + "stripe.params._setup_intent_update_params", + False, + ), + "SetupIntentUpdateParamsPaymentMethodOptionsPixMandateOptions": ( + "stripe.params._setup_intent_update_params", + False, + ), "SetupIntentUpdateParamsPaymentMethodOptionsSepaDebit": ( "stripe.params._setup_intent_update_params", False, @@ -14639,10 +14881,26 @@ "stripe.params._subscription_create_params", False, ), + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPix": ( + "stripe.params._subscription_create_params", + False, + ), + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions": ( + "stripe.params._subscription_create_params", + False, + ), "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit": ( "stripe.params._subscription_create_params", False, ), + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpi": ( + "stripe.params._subscription_create_params", + False, + ), + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions": ( + "stripe.params._subscription_create_params", + False, + ), "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount": ( "stripe.params._subscription_create_params", False, @@ -14911,10 +15169,26 @@ "stripe.params._subscription_modify_params", False, ), + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPix": ( + "stripe.params._subscription_modify_params", + False, + ), + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions": ( + "stripe.params._subscription_modify_params", + False, + ), "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit": ( "stripe.params._subscription_modify_params", False, ), + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpi": ( + "stripe.params._subscription_modify_params", + False, + ), + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions": ( + "stripe.params._subscription_modify_params", + False, + ), "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount": ( "stripe.params._subscription_modify_params", False, @@ -15463,10 +15737,26 @@ "stripe.params._subscription_update_params", False, ), + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPix": ( + "stripe.params._subscription_update_params", + False, + ), + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions": ( + "stripe.params._subscription_update_params", + False, + ), "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit": ( "stripe.params._subscription_update_params", False, ), + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpi": ( + "stripe.params._subscription_update_params", + False, + ), + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions": ( + "stripe.params._subscription_update_params", + False, + ), "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount": ( "stripe.params._subscription_update_params", False, diff --git a/stripe/params/_account_create_external_account_params.py b/stripe/params/_account_create_external_account_params.py index 6cf38179c..f6567a2b2 100644 --- a/stripe/params/_account_create_external_account_params.py +++ b/stripe/params/_account_create_external_account_params.py @@ -42,12 +42,12 @@ class AccountCreateExternalAccountParamsCard(TypedDict): cvc: NotRequired[str] exp_month: int exp_year: int - name: NotRequired[str] - number: str metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] """ Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. """ + name: NotRequired[str] + number: str class AccountCreateExternalAccountParamsBankAccount(TypedDict): diff --git a/stripe/params/_account_create_params.py b/stripe/params/_account_create_params.py index 485009a63..325208805 100644 --- a/stripe/params/_account_create_params.py +++ b/stripe/params/_account_create_params.py @@ -92,7 +92,7 @@ class AccountCreateParams(RequestOptions): """ type: NotRequired[Literal["custom", "express", "standard"]] """ - The type of Stripe account to create. May be one of `custom`, `express` or `standard`. + The `type` parameter is deprecated. Use [`controller`](https://docs.stripe.com/api/accounts/create#create_account-controller) instead to configure dashboard access, fee payer, loss liability, and requirement collection. """ @@ -245,6 +245,12 @@ class AccountCreateParamsCapabilities(TypedDict): """ The amazon_pay_payments capability. """ + app_distribution: NotRequired[ + "AccountCreateParamsCapabilitiesAppDistribution" + ] + """ + The app_distribution capability. + """ au_becs_debit_payments: NotRequired[ "AccountCreateParamsCapabilitiesAuBecsDebitPayments" ] @@ -501,6 +507,12 @@ class AccountCreateParamsCapabilities(TypedDict): """ The sofort_payments capability. """ + sunbit_payments: NotRequired[ + "AccountCreateParamsCapabilitiesSunbitPayments" + ] + """ + The sunbit_payments capability. + """ swish_payments: NotRequired["AccountCreateParamsCapabilitiesSwishPayments"] """ The swish_payments capability. @@ -586,6 +598,13 @@ class AccountCreateParamsCapabilitiesAmazonPayPayments(TypedDict): """ +class AccountCreateParamsCapabilitiesAppDistribution(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + class AccountCreateParamsCapabilitiesAuBecsDebitPayments(TypedDict): requested: NotRequired[bool] """ @@ -915,6 +934,13 @@ class AccountCreateParamsCapabilitiesSofortPayments(TypedDict): """ +class AccountCreateParamsCapabilitiesSunbitPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + class AccountCreateParamsCapabilitiesSwishPayments(TypedDict): requested: NotRequired[bool] """ @@ -1485,15 +1511,15 @@ class AccountCreateParamsCard(TypedDict): address_zip: NotRequired[str] currency: NotRequired[str] cvc: NotRequired[str] + default_for_currency: NotRequired[bool] exp_month: int exp_year: int - name: NotRequired[str] - number: str metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] """ Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. """ - default_for_currency: NotRequired[bool] + name: NotRequired[str] + number: str class AccountCreateParamsCardToken(TypedDict): diff --git a/stripe/params/_account_external_account_create_params.py b/stripe/params/_account_external_account_create_params.py index b4ccf6654..480e8a222 100644 --- a/stripe/params/_account_external_account_create_params.py +++ b/stripe/params/_account_external_account_create_params.py @@ -41,12 +41,12 @@ class AccountExternalAccountCreateParamsCard(TypedDict): cvc: NotRequired[str] exp_month: int exp_year: int - name: NotRequired[str] - number: str metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] """ Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. """ + name: NotRequired[str] + number: str class AccountExternalAccountCreateParamsBankAccount(TypedDict): diff --git a/stripe/params/_account_session_create_params.py b/stripe/params/_account_session_create_params.py index faedc62fc..b677306a4 100644 --- a/stripe/params/_account_session_create_params.py +++ b/stripe/params/_account_session_create_params.py @@ -33,6 +33,12 @@ class AccountSessionCreateParamsComponents(TypedDict): """ Configuration for the [account onboarding](https://docs.stripe.com/connect/supported-embedded-components/account-onboarding/) embedded component. """ + balance_report: NotRequired[ + "AccountSessionCreateParamsComponentsBalanceReport" + ] + """ + Configuration for the [balance report](https://docs.stripe.com/connect/supported-embedded-components/financial-reports#balance-report) embedded component. + """ balances: NotRequired["AccountSessionCreateParamsComponentsBalances"] """ Configuration for the [balances](https://docs.stripe.com/connect/supported-embedded-components/balances/) embedded component. @@ -105,6 +111,12 @@ class AccountSessionCreateParamsComponents(TypedDict): """ Configuration for the [payout details](https://docs.stripe.com/connect/supported-embedded-components/payout-details/) embedded component. """ + payout_reconciliation_report: NotRequired[ + "AccountSessionCreateParamsComponentsPayoutReconciliationReport" + ] + """ + Configuration for the [payout reconciliation report](https://docs.stripe.com/connect/supported-embedded-components/financial-reports#payout-reconciliation-report) embedded component. + """ payouts: NotRequired["AccountSessionCreateParamsComponentsPayouts"] """ Configuration for the [payouts](https://docs.stripe.com/connect/supported-embedded-components/payouts/) embedded component. @@ -177,6 +189,23 @@ class AccountSessionCreateParamsComponentsAccountOnboardingFeatures(TypedDict): """ +class AccountSessionCreateParamsComponentsBalanceReport(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsBalanceReportFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsBalanceReportFeatures(TypedDict): + pass + + class AccountSessionCreateParamsComponentsBalances(TypedDict): enabled: bool """ @@ -551,6 +580,27 @@ class AccountSessionCreateParamsComponentsPayoutDetailsFeatures(TypedDict): pass +class AccountSessionCreateParamsComponentsPayoutReconciliationReport( + TypedDict +): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsPayoutReconciliationReportFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsPayoutReconciliationReportFeatures( + TypedDict, +): + pass + + class AccountSessionCreateParamsComponentsPayouts(TypedDict): enabled: bool """ diff --git a/stripe/params/_account_update_params.py b/stripe/params/_account_update_params.py index d01f53400..884c0417d 100644 --- a/stripe/params/_account_update_params.py +++ b/stripe/params/_account_update_params.py @@ -232,6 +232,12 @@ class AccountUpdateParamsCapabilities(TypedDict): """ The amazon_pay_payments capability. """ + app_distribution: NotRequired[ + "AccountUpdateParamsCapabilitiesAppDistribution" + ] + """ + The app_distribution capability. + """ au_becs_debit_payments: NotRequired[ "AccountUpdateParamsCapabilitiesAuBecsDebitPayments" ] @@ -488,6 +494,12 @@ class AccountUpdateParamsCapabilities(TypedDict): """ The sofort_payments capability. """ + sunbit_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesSunbitPayments" + ] + """ + The sunbit_payments capability. + """ swish_payments: NotRequired["AccountUpdateParamsCapabilitiesSwishPayments"] """ The swish_payments capability. @@ -573,6 +585,13 @@ class AccountUpdateParamsCapabilitiesAmazonPayPayments(TypedDict): """ +class AccountUpdateParamsCapabilitiesAppDistribution(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + class AccountUpdateParamsCapabilitiesAuBecsDebitPayments(TypedDict): requested: NotRequired[bool] """ @@ -902,6 +921,13 @@ class AccountUpdateParamsCapabilitiesSofortPayments(TypedDict): """ +class AccountUpdateParamsCapabilitiesSunbitPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + class AccountUpdateParamsCapabilitiesSwishPayments(TypedDict): requested: NotRequired[bool] """ @@ -1427,15 +1453,15 @@ class AccountUpdateParamsCard(TypedDict): address_zip: NotRequired[str] currency: NotRequired[str] cvc: NotRequired[str] + default_for_currency: NotRequired[bool] exp_month: int exp_year: int - name: NotRequired[str] - number: str metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] """ Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. """ - default_for_currency: NotRequired[bool] + name: NotRequired[str] + number: str class AccountUpdateParamsCardToken(TypedDict): diff --git a/stripe/params/_balance_transaction_list_params.py b/stripe/params/_balance_transaction_list_params.py index aa8b17e31..9f636474c 100644 --- a/stripe/params/_balance_transaction_list_params.py +++ b/stripe/params/_balance_transaction_list_params.py @@ -40,7 +40,7 @@ class BalanceTransactionListParams(RequestOptions): """ type: NotRequired[str] """ - Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. """ diff --git a/stripe/params/_confirmation_token_create_params.py b/stripe/params/_confirmation_token_create_params.py index 5547f7247..8fb039209 100644 --- a/stripe/params/_confirmation_token_create_params.py +++ b/stripe/params/_confirmation_token_create_params.py @@ -292,6 +292,10 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. """ + sunbit: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSunbit"] + """ + If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + """ swish: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSwish"] """ If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. @@ -345,6 +349,7 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -828,6 +833,10 @@ class ConfirmationTokenCreateParamsPaymentMethodDataSofort(TypedDict): """ +class ConfirmationTokenCreateParamsPaymentMethodDataSunbit(TypedDict): + pass + + class ConfirmationTokenCreateParamsPaymentMethodDataSwish(TypedDict): pass diff --git a/stripe/params/_customer_create_params.py b/stripe/params/_customer_create_params.py index c217b38ee..98a962541 100644 --- a/stripe/params/_customer_create_params.py +++ b/stripe/params/_customer_create_params.py @@ -285,8 +285,10 @@ class CustomerCreateParamsTaxIdDatum(TypedDict): "et_tin", "eu_oss_vat", "eu_vat", + "fo_vat", "gb_vat", "ge_vat", + "gi_tin", "gn_nif", "hk_br", "hr_oib", @@ -295,6 +297,7 @@ class CustomerCreateParamsTaxIdDatum(TypedDict): "il_vat", "in_gst", "is_vat", + "it_cf", "jp_cn", "jp_rn", "jp_trn", @@ -325,6 +328,7 @@ class CustomerCreateParamsTaxIdDatum(TypedDict): "pe_ruc", "ph_tin", "pl_nip", + "py_ruc", "ro_tin", "rs_pib", "ru_inn", @@ -354,7 +358,7 @@ class CustomerCreateParamsTaxIdDatum(TypedDict): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_customer_create_tax_id_params.py b/stripe/params/_customer_create_tax_id_params.py index 65da6200c..4bbe642f4 100644 --- a/stripe/params/_customer_create_tax_id_params.py +++ b/stripe/params/_customer_create_tax_id_params.py @@ -56,8 +56,10 @@ class CustomerCreateTaxIdParams(RequestOptions): "et_tin", "eu_oss_vat", "eu_vat", + "fo_vat", "gb_vat", "ge_vat", + "gi_tin", "gn_nif", "hk_br", "hr_oib", @@ -66,6 +68,7 @@ class CustomerCreateTaxIdParams(RequestOptions): "il_vat", "in_gst", "is_vat", + "it_cf", "jp_cn", "jp_rn", "jp_trn", @@ -96,6 +99,7 @@ class CustomerCreateTaxIdParams(RequestOptions): "pe_ruc", "ph_tin", "pl_nip", + "py_ruc", "ro_tin", "rs_pib", "ru_inn", @@ -125,7 +129,7 @@ class CustomerCreateTaxIdParams(RequestOptions): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_customer_list_payment_methods_params.py b/stripe/params/_customer_list_payment_methods_params.py index aa965d839..dedcc2412 100644 --- a/stripe/params/_customer_list_payment_methods_params.py +++ b/stripe/params/_customer_list_payment_methods_params.py @@ -74,6 +74,7 @@ class CustomerListPaymentMethodsParams(RequestOptions): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", diff --git a/stripe/params/_customer_payment_method_list_params.py b/stripe/params/_customer_payment_method_list_params.py index 1f7f264bf..32e4f640e 100644 --- a/stripe/params/_customer_payment_method_list_params.py +++ b/stripe/params/_customer_payment_method_list_params.py @@ -73,6 +73,7 @@ class CustomerPaymentMethodListParams(TypedDict): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", diff --git a/stripe/params/_customer_tax_id_create_params.py b/stripe/params/_customer_tax_id_create_params.py index 7db835e16..e8625ba39 100644 --- a/stripe/params/_customer_tax_id_create_params.py +++ b/stripe/params/_customer_tax_id_create_params.py @@ -55,8 +55,10 @@ class CustomerTaxIdCreateParams(TypedDict): "et_tin", "eu_oss_vat", "eu_vat", + "fo_vat", "gb_vat", "ge_vat", + "gi_tin", "gn_nif", "hk_br", "hr_oib", @@ -65,6 +67,7 @@ class CustomerTaxIdCreateParams(TypedDict): "il_vat", "in_gst", "is_vat", + "it_cf", "jp_cn", "jp_rn", "jp_trn", @@ -95,6 +98,7 @@ class CustomerTaxIdCreateParams(TypedDict): "pe_ruc", "ph_tin", "pl_nip", + "py_ruc", "ro_tin", "rs_pib", "ru_inn", @@ -124,7 +128,7 @@ class CustomerTaxIdCreateParams(TypedDict): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_invoice_create_params.py b/stripe/params/_invoice_create_params.py index 10d8cde95..f8c6298e7 100644 --- a/stripe/params/_invoice_create_params.py +++ b/stripe/params/_invoice_create_params.py @@ -229,7 +229,7 @@ class InvoiceCreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -273,12 +273,24 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ If paying by `payto`, this sub-hash contains details about the PayTo payment method options to pass to the invoice's PaymentIntent. """ + pix: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPix" + ] + """ + If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. + """ sepa_debit: NotRequired[ "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" ] """ If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. """ + upi: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpi" + ] + """ + If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. + """ us_bank_account: NotRequired[ "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" ] @@ -452,12 +464,53 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions( """ +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + expires_after_seconds: NotRequired[int] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + + class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit( TypedDict, ): pass +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpi(TypedDict): + mandate_options: NotRequired[ + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" + ] + """ + Configuration options for setting up an eMandate + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. + """ + + class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( TypedDict, ): diff --git a/stripe/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index 4def91317..c3fb7f196 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -248,8 +248,10 @@ class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): "et_tin", "eu_oss_vat", "eu_vat", + "fo_vat", "gb_vat", "ge_vat", + "gi_tin", "gn_nif", "hk_br", "hr_oib", @@ -258,6 +260,7 @@ class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): "il_vat", "in_gst", "is_vat", + "it_cf", "jp_cn", "jp_rn", "jp_trn", @@ -288,6 +291,7 @@ class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): "pe_ruc", "ph_tin", "pl_nip", + "py_ruc", "ro_tin", "rs_pib", "ru_inn", @@ -317,7 +321,7 @@ class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_invoice_modify_params.py b/stripe/params/_invoice_modify_params.py index 881fcb503..c625f75c7 100644 --- a/stripe/params/_invoice_modify_params.py +++ b/stripe/params/_invoice_modify_params.py @@ -196,7 +196,7 @@ class InvoiceModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -240,12 +240,24 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ If paying by `payto`, this sub-hash contains details about the PayTo payment method options to pass to the invoice's PaymentIntent. """ + pix: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPix" + ] + """ + If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. + """ sepa_debit: NotRequired[ "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit" ] """ If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. """ + upi: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpi" + ] + """ + If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. + """ us_bank_account: NotRequired[ "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" ] @@ -419,12 +431,53 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions( """ +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + expires_after_seconds: NotRequired[int] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + + class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit( TypedDict, ): pass +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpi(TypedDict): + mandate_options: NotRequired[ + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" + ] + """ + Configuration options for setting up an eMandate + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. + """ + + class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( TypedDict, ): diff --git a/stripe/params/_invoice_update_params.py b/stripe/params/_invoice_update_params.py index 0bd96502a..3850c95c9 100644 --- a/stripe/params/_invoice_update_params.py +++ b/stripe/params/_invoice_update_params.py @@ -195,7 +195,7 @@ class InvoiceUpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -239,12 +239,24 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ If paying by `payto`, this sub-hash contains details about the PayTo payment method options to pass to the invoice's PaymentIntent. """ + pix: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPix" + ] + """ + If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. + """ sepa_debit: NotRequired[ "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" ] """ If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. """ + upi: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpi" + ] + """ + If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. + """ us_bank_account: NotRequired[ "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" ] @@ -418,12 +430,53 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions( """ +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + expires_after_seconds: NotRequired[int] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + + class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit( TypedDict, ): pass +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpi(TypedDict): + mandate_options: NotRequired[ + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" + ] + """ + Configuration options for setting up an eMandate + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. + """ + + class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( TypedDict, ): diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index 323de2adc..a96df9d88 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -13,6 +13,10 @@ class PaymentIntentConfirmParams(RequestOptions): """ Provides industry-specific information about the amount. """ + amount_to_confirm: NotRequired[int] + """ + Amount to confirm on the PaymentIntent. Defaults to `amount` if not provided. + """ capture_method: NotRequired[ Literal["automatic", "automatic_async", "manual"] ] @@ -30,7 +34,7 @@ class PaymentIntentConfirmParams(RequestOptions): Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://docs.stripe.com/payments/save-card-without-authentication). """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types to exclude from use with this payment. @@ -639,6 +643,10 @@ class PaymentIntentConfirmParamsPaymentMethodData(TypedDict): """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. """ + sunbit: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataSunbit"] + """ + If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + """ swish: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataSwish"] """ If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. @@ -692,6 +700,7 @@ class PaymentIntentConfirmParamsPaymentMethodData(TypedDict): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -1173,6 +1182,10 @@ class PaymentIntentConfirmParamsPaymentMethodDataSofort(TypedDict): """ +class PaymentIntentConfirmParamsPaymentMethodDataSunbit(TypedDict): + pass + + class PaymentIntentConfirmParamsPaymentMethodDataSwish(TypedDict): pass @@ -2900,7 +2913,13 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPix(TypedDict): """ The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. """ - setup_future_usage: NotRequired[Literal["none"]] + mandate_options: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2909,8 +2928,45 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPix(TypedDict): If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + +class PaymentIntentConfirmParamsPaymentMethodOptionsPixMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `monthly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. """ diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index 1994786f8..19f566827 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -120,6 +120,7 @@ class PaymentIntentCreateParams(RequestOptions): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -774,6 +775,10 @@ class PaymentIntentCreateParamsPaymentMethodData(TypedDict): """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. """ + sunbit: NotRequired["PaymentIntentCreateParamsPaymentMethodDataSunbit"] + """ + If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + """ swish: NotRequired["PaymentIntentCreateParamsPaymentMethodDataSwish"] """ If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. @@ -827,6 +832,7 @@ class PaymentIntentCreateParamsPaymentMethodData(TypedDict): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -1308,6 +1314,10 @@ class PaymentIntentCreateParamsPaymentMethodDataSofort(TypedDict): """ +class PaymentIntentCreateParamsPaymentMethodDataSunbit(TypedDict): + pass + + class PaymentIntentCreateParamsPaymentMethodDataSwish(TypedDict): pass @@ -3029,7 +3039,13 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPix(TypedDict): """ The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. """ - setup_future_usage: NotRequired[Literal["none"]] + mandate_options: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3038,8 +3054,45 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPix(TypedDict): If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + +class PaymentIntentCreateParamsPaymentMethodOptionsPixMandateOptions( + TypedDict +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `monthly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. """ diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index 8620f9d24..c9636e1e6 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -52,7 +52,7 @@ class PaymentIntentModifyParams(RequestOptions): An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types to exclude from use with this payment. @@ -612,6 +612,10 @@ class PaymentIntentModifyParamsPaymentMethodData(TypedDict): """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. """ + sunbit: NotRequired["PaymentIntentModifyParamsPaymentMethodDataSunbit"] + """ + If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + """ swish: NotRequired["PaymentIntentModifyParamsPaymentMethodDataSwish"] """ If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. @@ -665,6 +669,7 @@ class PaymentIntentModifyParamsPaymentMethodData(TypedDict): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -1146,6 +1151,10 @@ class PaymentIntentModifyParamsPaymentMethodDataSofort(TypedDict): """ +class PaymentIntentModifyParamsPaymentMethodDataSunbit(TypedDict): + pass + + class PaymentIntentModifyParamsPaymentMethodDataSwish(TypedDict): pass @@ -2867,7 +2876,13 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPix(TypedDict): """ The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. """ - setup_future_usage: NotRequired[Literal["none"]] + mandate_options: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2876,8 +2891,45 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPix(TypedDict): If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + +class PaymentIntentModifyParamsPaymentMethodOptionsPixMandateOptions( + TypedDict +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `monthly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. """ diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index be636796e..9bab2d5ab 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -51,7 +51,7 @@ class PaymentIntentUpdateParams(TypedDict): An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types to exclude from use with this payment. @@ -611,6 +611,10 @@ class PaymentIntentUpdateParamsPaymentMethodData(TypedDict): """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. """ + sunbit: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataSunbit"] + """ + If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + """ swish: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataSwish"] """ If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. @@ -664,6 +668,7 @@ class PaymentIntentUpdateParamsPaymentMethodData(TypedDict): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -1145,6 +1150,10 @@ class PaymentIntentUpdateParamsPaymentMethodDataSofort(TypedDict): """ +class PaymentIntentUpdateParamsPaymentMethodDataSunbit(TypedDict): + pass + + class PaymentIntentUpdateParamsPaymentMethodDataSwish(TypedDict): pass @@ -2866,7 +2875,13 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPix(TypedDict): """ The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. """ - setup_future_usage: NotRequired[Literal["none"]] + mandate_options: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2875,8 +2890,45 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPix(TypedDict): If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + +class PaymentIntentUpdateParamsPaymentMethodOptionsPixMandateOptions( + TypedDict +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `monthly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. """ diff --git a/stripe/params/_payment_link_create_params.py b/stripe/params/_payment_link_create_params.py index 066068704..b2747a033 100644 --- a/stripe/params/_payment_link_create_params.py +++ b/stripe/params/_payment_link_create_params.py @@ -68,6 +68,10 @@ class PaymentLinkCreateParams(RequestOptions): """ The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. """ + managed_payments: NotRequired["PaymentLinkCreateParamsManagedPayments"] + """ + Settings for Managed Payments for this Payment Link and resulting [CheckoutSessions](https://docs.stripe.com/api/checkout/sessions/object), [PaymentIntents](https://docs.stripe.com/api/payment_intents/object), [Invoices](https://docs.stripe.com/api/invoices/object), and [Subscriptions](https://docs.stripe.com/api/subscriptions/object). + """ metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://docs.stripe.com/api/checkout/sessions) created by this payment link. @@ -137,6 +141,7 @@ class PaymentLinkCreateParams(RequestOptions): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -621,6 +626,13 @@ class PaymentLinkCreateParamsLineItemPriceDataRecurring(TypedDict): """ +class PaymentLinkCreateParamsManagedPayments(TypedDict): + enabled: NotRequired[bool] + """ + Set to `true` to enable [Managed Payments](https://docs.stripe.com/payments/managed-payments), Stripe's merchant of record solution, for this session. + """ + + class PaymentLinkCreateParamsNameCollection(TypedDict): business: NotRequired["PaymentLinkCreateParamsNameCollectionBusiness"] """ diff --git a/stripe/params/_payment_link_modify_params.py b/stripe/params/_payment_link_modify_params.py index 686d41996..884ea67df 100644 --- a/stripe/params/_payment_link_modify_params.py +++ b/stripe/params/_payment_link_modify_params.py @@ -90,7 +90,7 @@ class PaymentLinkModifyParams(RequestOptions): If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://docs.stripe.com/payments/checkout/free-trials). """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'satispay', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'satispay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). diff --git a/stripe/params/_payment_link_update_params.py b/stripe/params/_payment_link_update_params.py index c2fe7977e..25fde04bb 100644 --- a/stripe/params/_payment_link_update_params.py +++ b/stripe/params/_payment_link_update_params.py @@ -89,7 +89,7 @@ class PaymentLinkUpdateParams(TypedDict): If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://docs.stripe.com/payments/checkout/free-trials). """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'satispay', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'satispay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). diff --git a/stripe/params/_payment_method_configuration_create_params.py b/stripe/params/_payment_method_configuration_create_params.py index 30e2daca7..eba0d81e2 100644 --- a/stripe/params/_payment_method_configuration_create_params.py +++ b/stripe/params/_payment_method_configuration_create_params.py @@ -240,6 +240,10 @@ class PaymentMethodConfigurationCreateParams(RequestOptions): """ Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://docs.stripe.com/payments/sofort) for more details. """ + sunbit: NotRequired["PaymentMethodConfigurationCreateParamsSunbit"] + """ + Sunbit is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers choose to pay in 3, 6, or 12 installments. Customers are redirected from your website or app, authorize the payment with Sunbit, then return to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. + """ swish: NotRequired["PaymentMethodConfigurationCreateParamsSwish"] """ Swish is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://docs.stripe.com/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://docs.stripe.com/payments/swish) for more details. @@ -1138,6 +1142,22 @@ class PaymentMethodConfigurationCreateParamsSofortDisplayPreference(TypedDict): """ +class PaymentMethodConfigurationCreateParamsSunbit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsSunbitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsSunbitDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationCreateParamsSwish(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationCreateParamsSwishDisplayPreference" diff --git a/stripe/params/_payment_method_configuration_modify_params.py b/stripe/params/_payment_method_configuration_modify_params.py index ac22ff2d7..87151caf4 100644 --- a/stripe/params/_payment_method_configuration_modify_params.py +++ b/stripe/params/_payment_method_configuration_modify_params.py @@ -240,6 +240,10 @@ class PaymentMethodConfigurationModifyParams(RequestOptions): """ Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://docs.stripe.com/payments/sofort) for more details. """ + sunbit: NotRequired["PaymentMethodConfigurationModifyParamsSunbit"] + """ + Sunbit is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers choose to pay in 3, 6, or 12 installments. Customers are redirected from your website or app, authorize the payment with Sunbit, then return to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. + """ swish: NotRequired["PaymentMethodConfigurationModifyParamsSwish"] """ Swish is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://docs.stripe.com/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://docs.stripe.com/payments/swish) for more details. @@ -1138,6 +1142,22 @@ class PaymentMethodConfigurationModifyParamsSofortDisplayPreference(TypedDict): """ +class PaymentMethodConfigurationModifyParamsSunbit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsSunbitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsSunbitDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationModifyParamsSwish(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationModifyParamsSwishDisplayPreference" diff --git a/stripe/params/_payment_method_configuration_update_params.py b/stripe/params/_payment_method_configuration_update_params.py index e43c3b12e..239cac6e0 100644 --- a/stripe/params/_payment_method_configuration_update_params.py +++ b/stripe/params/_payment_method_configuration_update_params.py @@ -239,6 +239,10 @@ class PaymentMethodConfigurationUpdateParams(TypedDict): """ Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://docs.stripe.com/payments/sofort) for more details. """ + sunbit: NotRequired["PaymentMethodConfigurationUpdateParamsSunbit"] + """ + Sunbit is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers choose to pay in 3, 6, or 12 installments. Customers are redirected from your website or app, authorize the payment with Sunbit, then return to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. + """ swish: NotRequired["PaymentMethodConfigurationUpdateParamsSwish"] """ Swish is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://docs.stripe.com/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://docs.stripe.com/payments/swish) for more details. @@ -1137,6 +1141,22 @@ class PaymentMethodConfigurationUpdateParamsSofortDisplayPreference(TypedDict): """ +class PaymentMethodConfigurationUpdateParamsSunbit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsSunbitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsSunbitDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationUpdateParamsSwish(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationUpdateParamsSwishDisplayPreference" diff --git a/stripe/params/_payment_method_create_params.py b/stripe/params/_payment_method_create_params.py index 4549374a0..177ffa5d7 100644 --- a/stripe/params/_payment_method_create_params.py +++ b/stripe/params/_payment_method_create_params.py @@ -223,6 +223,10 @@ class PaymentMethodCreateParams(RequestOptions): """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. """ + sunbit: NotRequired["PaymentMethodCreateParamsSunbit"] + """ + If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + """ swish: NotRequired["PaymentMethodCreateParamsSwish"] """ If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. @@ -279,6 +283,7 @@ class PaymentMethodCreateParams(RequestOptions): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -796,6 +801,10 @@ class PaymentMethodCreateParamsSofort(TypedDict): """ +class PaymentMethodCreateParamsSunbit(TypedDict): + pass + + class PaymentMethodCreateParamsSwish(TypedDict): pass diff --git a/stripe/params/_payment_method_list_params.py b/stripe/params/_payment_method_list_params.py index 632041d91..0a3ecbbf6 100644 --- a/stripe/params/_payment_method_list_params.py +++ b/stripe/params/_payment_method_list_params.py @@ -82,6 +82,7 @@ class PaymentMethodListParams(RequestOptions): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py index 6f07261e6..e7e4e3154 100644 --- a/stripe/params/_setup_intent_confirm_params.py +++ b/stripe/params/_setup_intent_confirm_params.py @@ -329,6 +329,10 @@ class SetupIntentConfirmParamsPaymentMethodData(TypedDict): """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. """ + sunbit: NotRequired["SetupIntentConfirmParamsPaymentMethodDataSunbit"] + """ + If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + """ swish: NotRequired["SetupIntentConfirmParamsPaymentMethodDataSwish"] """ If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. @@ -382,6 +386,7 @@ class SetupIntentConfirmParamsPaymentMethodData(TypedDict): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -863,6 +868,10 @@ class SetupIntentConfirmParamsPaymentMethodDataSofort(TypedDict): """ +class SetupIntentConfirmParamsPaymentMethodDataSunbit(TypedDict): + pass + + class SetupIntentConfirmParamsPaymentMethodDataSwish(TypedDict): pass @@ -975,6 +984,10 @@ class SetupIntentConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. """ + pix: NotRequired["SetupIntentConfirmParamsPaymentMethodOptionsPix"] + """ + If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options. + """ sepa_debit: NotRequired[ "SetupIntentConfirmParamsPaymentMethodOptionsSepaDebit" ] @@ -1428,6 +1441,52 @@ class SetupIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions( """ +class SetupIntentConfirmParamsPaymentMethodOptionsPix(TypedDict): + mandate_options: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsPixMandateOptions(TypedDict): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `monthly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. + """ + + class SetupIntentConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "SetupIntentConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index 8ab1134e1..32daeb603 100644 --- a/stripe/params/_setup_intent_create_params.py +++ b/stripe/params/_setup_intent_create_params.py @@ -92,6 +92,7 @@ class SetupIntentCreateParams(RequestOptions): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -458,6 +459,10 @@ class SetupIntentCreateParamsPaymentMethodData(TypedDict): """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. """ + sunbit: NotRequired["SetupIntentCreateParamsPaymentMethodDataSunbit"] + """ + If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + """ swish: NotRequired["SetupIntentCreateParamsPaymentMethodDataSwish"] """ If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. @@ -511,6 +516,7 @@ class SetupIntentCreateParamsPaymentMethodData(TypedDict): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -990,6 +996,10 @@ class SetupIntentCreateParamsPaymentMethodDataSofort(TypedDict): """ +class SetupIntentCreateParamsPaymentMethodDataSunbit(TypedDict): + pass + + class SetupIntentCreateParamsPaymentMethodDataSwish(TypedDict): pass @@ -1102,6 +1112,10 @@ class SetupIntentCreateParamsPaymentMethodOptions(TypedDict): """ If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. """ + pix: NotRequired["SetupIntentCreateParamsPaymentMethodOptionsPix"] + """ + If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options. + """ sepa_debit: NotRequired[ "SetupIntentCreateParamsPaymentMethodOptionsSepaDebit" ] @@ -1551,6 +1565,52 @@ class SetupIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions( """ +class SetupIntentCreateParamsPaymentMethodOptionsPix(TypedDict): + mandate_options: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `monthly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. + """ + + class SetupIntentCreateParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "SetupIntentCreateParamsPaymentMethodOptionsSepaDebitMandateOptions" diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index a47e689bb..bbbf21ae7 100644 --- a/stripe/params/_setup_intent_modify_params.py +++ b/stripe/params/_setup_intent_modify_params.py @@ -30,7 +30,7 @@ class SetupIntentModifyParams(RequestOptions): An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types to exclude from use with this SetupIntent. @@ -307,6 +307,10 @@ class SetupIntentModifyParamsPaymentMethodData(TypedDict): """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. """ + sunbit: NotRequired["SetupIntentModifyParamsPaymentMethodDataSunbit"] + """ + If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + """ swish: NotRequired["SetupIntentModifyParamsPaymentMethodDataSwish"] """ If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. @@ -360,6 +364,7 @@ class SetupIntentModifyParamsPaymentMethodData(TypedDict): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -839,6 +844,10 @@ class SetupIntentModifyParamsPaymentMethodDataSofort(TypedDict): """ +class SetupIntentModifyParamsPaymentMethodDataSunbit(TypedDict): + pass + + class SetupIntentModifyParamsPaymentMethodDataSwish(TypedDict): pass @@ -951,6 +960,10 @@ class SetupIntentModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. """ + pix: NotRequired["SetupIntentModifyParamsPaymentMethodOptionsPix"] + """ + If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options. + """ sepa_debit: NotRequired[ "SetupIntentModifyParamsPaymentMethodOptionsSepaDebit" ] @@ -1400,6 +1413,52 @@ class SetupIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions( """ +class SetupIntentModifyParamsPaymentMethodOptionsPix(TypedDict): + mandate_options: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsPixMandateOptions(TypedDict): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `monthly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. + """ + + class SetupIntentModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "SetupIntentModifyParamsPaymentMethodOptionsSepaDebitMandateOptions" diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index e00a2794b..a483715a9 100644 --- a/stripe/params/_setup_intent_update_params.py +++ b/stripe/params/_setup_intent_update_params.py @@ -29,7 +29,7 @@ class SetupIntentUpdateParams(TypedDict): An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types to exclude from use with this SetupIntent. @@ -306,6 +306,10 @@ class SetupIntentUpdateParamsPaymentMethodData(TypedDict): """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. """ + sunbit: NotRequired["SetupIntentUpdateParamsPaymentMethodDataSunbit"] + """ + If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + """ swish: NotRequired["SetupIntentUpdateParamsPaymentMethodDataSwish"] """ If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. @@ -359,6 +363,7 @@ class SetupIntentUpdateParamsPaymentMethodData(TypedDict): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -838,6 +843,10 @@ class SetupIntentUpdateParamsPaymentMethodDataSofort(TypedDict): """ +class SetupIntentUpdateParamsPaymentMethodDataSunbit(TypedDict): + pass + + class SetupIntentUpdateParamsPaymentMethodDataSwish(TypedDict): pass @@ -950,6 +959,10 @@ class SetupIntentUpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. """ + pix: NotRequired["SetupIntentUpdateParamsPaymentMethodOptionsPix"] + """ + If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options. + """ sepa_debit: NotRequired[ "SetupIntentUpdateParamsPaymentMethodOptionsSepaDebit" ] @@ -1399,6 +1412,52 @@ class SetupIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions( """ +class SetupIntentUpdateParamsPaymentMethodOptionsPix(TypedDict): + mandate_options: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `monthly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. + """ + + class SetupIntentUpdateParamsPaymentMethodOptionsSepaDebit(TypedDict): mandate_options: NotRequired[ "SetupIntentUpdateParamsPaymentMethodOptionsSepaDebitMandateOptions" diff --git a/stripe/params/_subscription_create_params.py b/stripe/params/_subscription_create_params.py index 399db4f25..1ba8dcab2 100644 --- a/stripe/params/_subscription_create_params.py +++ b/stripe/params/_subscription_create_params.py @@ -505,7 +505,7 @@ class SubscriptionCreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration @@ -553,12 +553,24 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the PayTo payment method options to pass to the invoice's PaymentIntent. """ + pix: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPix" + ] + """ + This sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. + """ sepa_debit: NotRequired[ "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" ] """ This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. """ + upi: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpi" + ] + """ + This sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. + """ us_bank_account: NotRequired[ "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" ] @@ -739,12 +751,82 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOpt """ +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPix( + TypedDict +): + expires_after_seconds: NotRequired[int] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + mandate_options: NotRequired[ + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions" + ] + """ + Configuration options for setting up a mandate + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. If not provided, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to the subscription servicing interval. + """ + + class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit( TypedDict, ): pass +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpi( + TypedDict +): + mandate_options: NotRequired[ + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" + ] + """ + Configuration options for setting up an eMandate + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. + """ + + class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( TypedDict, ): diff --git a/stripe/params/_subscription_modify_params.py b/stripe/params/_subscription_modify_params.py index 69180d498..b34f00d1c 100644 --- a/stripe/params/_subscription_modify_params.py +++ b/stripe/params/_subscription_modify_params.py @@ -488,7 +488,7 @@ class SubscriptionModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration @@ -536,12 +536,24 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the PayTo payment method options to pass to the invoice's PaymentIntent. """ + pix: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPix" + ] + """ + This sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. + """ sepa_debit: NotRequired[ "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit" ] """ This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. """ + upi: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpi" + ] + """ + This sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. + """ us_bank_account: NotRequired[ "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" ] @@ -722,12 +734,82 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOpt """ +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPix( + TypedDict +): + expires_after_seconds: NotRequired[int] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + mandate_options: NotRequired[ + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions" + ] + """ + Configuration options for setting up a mandate + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. If not provided, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to the subscription servicing interval. + """ + + class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit( TypedDict, ): pass +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpi( + TypedDict +): + mandate_options: NotRequired[ + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" + ] + """ + Configuration options for setting up an eMandate + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. + """ + + class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( TypedDict, ): diff --git a/stripe/params/_subscription_update_params.py b/stripe/params/_subscription_update_params.py index 2e8819ca4..b42611ed2 100644 --- a/stripe/params/_subscription_update_params.py +++ b/stripe/params/_subscription_update_params.py @@ -487,7 +487,7 @@ class SubscriptionUpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration @@ -535,12 +535,24 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the PayTo payment method options to pass to the invoice's PaymentIntent. """ + pix: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPix" + ] + """ + This sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. + """ sepa_debit: NotRequired[ "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" ] """ This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. """ + upi: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpi" + ] + """ + This sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. + """ us_bank_account: NotRequired[ "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" ] @@ -721,12 +733,82 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOpt """ +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPix( + TypedDict +): + expires_after_seconds: NotRequired[int] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + mandate_options: NotRequired[ + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions" + ] + """ + Configuration options for setting up a mandate + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. If not provided, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to the subscription servicing interval. + """ + + class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit( TypedDict, ): pass +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpi( + TypedDict +): + mandate_options: NotRequired[ + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" + ] + """ + Configuration options for setting up an eMandate + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. + """ + + class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( TypedDict, ): diff --git a/stripe/params/_tax_id_create_params.py b/stripe/params/_tax_id_create_params.py index 7dc4b04ac..0203eccfc 100644 --- a/stripe/params/_tax_id_create_params.py +++ b/stripe/params/_tax_id_create_params.py @@ -60,8 +60,10 @@ class TaxIdCreateParams(RequestOptions): "et_tin", "eu_oss_vat", "eu_vat", + "fo_vat", "gb_vat", "ge_vat", + "gi_tin", "gn_nif", "hk_br", "hr_oib", @@ -70,6 +72,7 @@ class TaxIdCreateParams(RequestOptions): "il_vat", "in_gst", "is_vat", + "it_cf", "jp_cn", "jp_rn", "jp_trn", @@ -100,6 +103,7 @@ class TaxIdCreateParams(RequestOptions): "pe_ruc", "ph_tin", "pl_nip", + "py_ruc", "ro_tin", "rs_pib", "ru_inn", @@ -129,7 +133,7 @@ class TaxIdCreateParams(RequestOptions): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_webhook_endpoint_create_params.py b/stripe/params/_webhook_endpoint_create_params.py index afe00b25e..2988c0b2b 100644 --- a/stripe/params/_webhook_endpoint_create_params.py +++ b/stripe/params/_webhook_endpoint_create_params.py @@ -131,6 +131,7 @@ class WebhookEndpointCreateParams(RequestOptions): "2026-01-28.clover", "2026-02-25.clover", "2026-03-25.dahlia", + "2026-04-22.dahlia", ] ] """ diff --git a/stripe/params/billing/_meter_create_params.py b/stripe/params/billing/_meter_create_params.py index d1b7aeb47..9f3b72bbe 100644 --- a/stripe/params/billing/_meter_create_params.py +++ b/stripe/params/billing/_meter_create_params.py @@ -50,7 +50,7 @@ class MeterCreateParamsCustomerMapping(TypedDict): class MeterCreateParamsDefaultAggregation(TypedDict): formula: Literal["count", "last", "sum"] """ - Specifies how events are aggregated. Allowed values are `count` to count the number of events, `sum` to sum each event's value and `last` to take the last event's value in the window. + Specifies how events are aggregated. """ diff --git a/stripe/params/billing/_meter_event_create_params.py b/stripe/params/billing/_meter_event_create_params.py index 292b66c35..af17d23bd 100644 --- a/stripe/params/billing/_meter_event_create_params.py +++ b/stripe/params/billing/_meter_event_create_params.py @@ -17,7 +17,7 @@ class MeterEventCreateParams(RequestOptions): """ identifier: NotRequired[str] """ - A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations. + A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. Stripe enforces uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations. """ payload: "Dict[str, str]|UntypedStripeObject[str]" """ diff --git a/stripe/params/checkout/__init__.py b/stripe/params/checkout/__init__.py index 8f31951db..23d56fe84 100644 --- a/stripe/params/checkout/__init__.py +++ b/stripe/params/checkout/__init__.py @@ -39,6 +39,7 @@ SessionCreateParamsLineItemPriceData as SessionCreateParamsLineItemPriceData, SessionCreateParamsLineItemPriceDataProductData as SessionCreateParamsLineItemPriceDataProductData, SessionCreateParamsLineItemPriceDataRecurring as SessionCreateParamsLineItemPriceDataRecurring, + SessionCreateParamsManagedPayments as SessionCreateParamsManagedPayments, SessionCreateParamsNameCollection as SessionCreateParamsNameCollection, SessionCreateParamsNameCollectionBusiness as SessionCreateParamsNameCollectionBusiness, SessionCreateParamsNameCollectionIndividual as SessionCreateParamsNameCollectionIndividual, @@ -96,6 +97,7 @@ SessionCreateParamsPaymentMethodOptionsPayto as SessionCreateParamsPaymentMethodOptionsPayto, SessionCreateParamsPaymentMethodOptionsPaytoMandateOptions as SessionCreateParamsPaymentMethodOptionsPaytoMandateOptions, SessionCreateParamsPaymentMethodOptionsPix as SessionCreateParamsPaymentMethodOptionsPix, + SessionCreateParamsPaymentMethodOptionsPixMandateOptions as SessionCreateParamsPaymentMethodOptionsPixMandateOptions, SessionCreateParamsPaymentMethodOptionsRevolutPay as SessionCreateParamsPaymentMethodOptionsRevolutPay, SessionCreateParamsPaymentMethodOptionsSamsungPay as SessionCreateParamsPaymentMethodOptionsSamsungPay, SessionCreateParamsPaymentMethodOptionsSatispay as SessionCreateParamsPaymentMethodOptionsSatispay, @@ -326,6 +328,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsManagedPayments": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsNameCollection": ( "stripe.params.checkout._session_create_params", False, @@ -554,6 +560,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsPaymentMethodOptionsPixMandateOptions": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsPaymentMethodOptionsRevolutPay": ( "stripe.params.checkout._session_create_params", False, diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index 291ddc519..81d58f3b0 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -151,6 +151,7 @@ class SessionCreateParams(RequestOptions): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -235,6 +236,10 @@ class SessionCreateParams(RequestOptions): """ The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. """ + managed_payments: NotRequired["SessionCreateParamsManagedPayments"] + """ + Settings for Managed Payments for this Checkout Session and resulting [PaymentIntents](https://docs.stripe.com/api/payment_intents/object), [Invoices](https://docs.stripe.com/api/invoices/object), and [Subscriptions](https://docs.stripe.com/api/subscriptions/object). + """ metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. @@ -344,6 +349,7 @@ class SessionCreateParams(RequestOptions): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -972,6 +978,13 @@ class SessionCreateParamsLineItemPriceDataRecurring(TypedDict): """ +class SessionCreateParamsManagedPayments(TypedDict): + enabled: NotRequired[bool] + """ + Set to `true` to enable [Managed Payments](https://docs.stripe.com/payments/managed-payments), Stripe's merchant of record solution, for this session. + """ + + class SessionCreateParamsNameCollection(TypedDict): business: NotRequired["SessionCreateParamsNameCollectionBusiness"] """ @@ -2235,7 +2248,13 @@ class SessionCreateParamsPaymentMethodOptionsPix(TypedDict): """ The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. """ - setup_future_usage: NotRequired[Literal["none"]] + mandate_options: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2247,6 +2266,43 @@ class SessionCreateParamsPaymentMethodOptionsPix(TypedDict): """ +class SessionCreateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `monthly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. + """ + + class SessionCreateParamsPaymentMethodOptionsRevolutPay(TypedDict): capture_method: NotRequired[Literal["manual"]] """ diff --git a/stripe/params/identity/_verification_session_create_params.py b/stripe/params/identity/_verification_session_create_params.py index 94e1af613..9cc8f3d77 100644 --- a/stripe/params/identity/_verification_session_create_params.py +++ b/stripe/params/identity/_verification_session_create_params.py @@ -27,7 +27,7 @@ class VerificationSessionCreateParams(RequestOptions): "VerificationSessionCreateParamsProvidedDetails" ] """ - Details provided about the user being verified. These details may be shown to the user. + Details provided about the user being verified. These details might be shown to the user. """ related_customer: NotRequired[str] """ @@ -39,7 +39,7 @@ class VerificationSessionCreateParams(RequestOptions): """ related_person: NotRequired["VerificationSessionCreateParamsRelatedPerson"] """ - Tokens referencing a Person resource and it's associated account. + Tokens referencing a Person resource and its associated account. """ return_url: NotRequired[str] """ diff --git a/stripe/params/issuing/_card_create_params.py b/stripe/params/issuing/_card_create_params.py index 43767541d..880b06feb 100644 --- a/stripe/params/issuing/_card_create_params.py +++ b/stripe/params/issuing/_card_create_params.py @@ -181,6 +181,12 @@ class CardCreateParamsShippingCustoms(TypedDict): class CardCreateParamsSpendingControls(TypedDict): + allowed_card_presences: NotRequired[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be allowed. Possible options are `present`, `not_present`. All other statuses will be blocked. Cannot be set with `blocked_card_presences`. Provide an empty value to unset this control. + """ allowed_categories: NotRequired[ List[ Literal[ @@ -489,6 +495,12 @@ class CardCreateParamsSpendingControls(TypedDict): """ Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. """ + blocked_card_presences: NotRequired[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be declined. Possible options are `present`, `not_present`. Cannot be set with `allowed_card_presences`. Provide an empty value to unset this control. + """ blocked_categories: NotRequired[ List[ Literal[ diff --git a/stripe/params/issuing/_card_modify_params.py b/stripe/params/issuing/_card_modify_params.py index e818aa891..db85ee9a1 100644 --- a/stripe/params/issuing/_card_modify_params.py +++ b/stripe/params/issuing/_card_modify_params.py @@ -128,6 +128,12 @@ class CardModifyParamsShippingCustoms(TypedDict): class CardModifyParamsSpendingControls(TypedDict): + allowed_card_presences: NotRequired[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be allowed. Possible options are `present`, `not_present`. All other statuses will be blocked. Cannot be set with `blocked_card_presences`. Provide an empty value to unset this control. + """ allowed_categories: NotRequired[ List[ Literal[ @@ -436,6 +442,12 @@ class CardModifyParamsSpendingControls(TypedDict): """ Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. """ + blocked_card_presences: NotRequired[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be declined. Possible options are `present`, `not_present`. Cannot be set with `allowed_card_presences`. Provide an empty value to unset this control. + """ blocked_categories: NotRequired[ List[ Literal[ diff --git a/stripe/params/issuing/_card_update_params.py b/stripe/params/issuing/_card_update_params.py index 6c4c52241..b661a8811 100644 --- a/stripe/params/issuing/_card_update_params.py +++ b/stripe/params/issuing/_card_update_params.py @@ -127,6 +127,12 @@ class CardUpdateParamsShippingCustoms(TypedDict): class CardUpdateParamsSpendingControls(TypedDict): + allowed_card_presences: NotRequired[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be allowed. Possible options are `present`, `not_present`. All other statuses will be blocked. Cannot be set with `blocked_card_presences`. Provide an empty value to unset this control. + """ allowed_categories: NotRequired[ List[ Literal[ @@ -435,6 +441,12 @@ class CardUpdateParamsSpendingControls(TypedDict): """ Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. """ + blocked_card_presences: NotRequired[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be declined. Possible options are `present`, `not_present`. Cannot be set with `allowed_card_presences`. Provide an empty value to unset this control. + """ blocked_categories: NotRequired[ List[ Literal[ diff --git a/stripe/params/issuing/_cardholder_create_params.py b/stripe/params/issuing/_cardholder_create_params.py index a0dc58cdd..416c9bd45 100644 --- a/stripe/params/issuing/_cardholder_create_params.py +++ b/stripe/params/issuing/_cardholder_create_params.py @@ -184,6 +184,12 @@ class CardholderCreateParamsIndividualVerificationDocument(TypedDict): class CardholderCreateParamsSpendingControls(TypedDict): + allowed_card_presences: NotRequired[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be allowed. Possible options are `present`, `not_present`. All other statuses will be blocked. Cannot be set with `blocked_card_presences`. Provide an empty value to unset this control. + """ allowed_categories: NotRequired[ List[ Literal[ @@ -492,6 +498,12 @@ class CardholderCreateParamsSpendingControls(TypedDict): """ Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. """ + blocked_card_presences: NotRequired[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be declined. Possible options are `present`, `not_present`. Cannot be set with `allowed_card_presences`. Provide an empty value to unset this control. + """ blocked_categories: NotRequired[ List[ Literal[ diff --git a/stripe/params/issuing/_cardholder_modify_params.py b/stripe/params/issuing/_cardholder_modify_params.py index 664cf27bf..39b80bac1 100644 --- a/stripe/params/issuing/_cardholder_modify_params.py +++ b/stripe/params/issuing/_cardholder_modify_params.py @@ -176,6 +176,12 @@ class CardholderModifyParamsIndividualVerificationDocument(TypedDict): class CardholderModifyParamsSpendingControls(TypedDict): + allowed_card_presences: NotRequired[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be allowed. Possible options are `present`, `not_present`. All other statuses will be blocked. Cannot be set with `blocked_card_presences`. Provide an empty value to unset this control. + """ allowed_categories: NotRequired[ List[ Literal[ @@ -484,6 +490,12 @@ class CardholderModifyParamsSpendingControls(TypedDict): """ Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. """ + blocked_card_presences: NotRequired[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be declined. Possible options are `present`, `not_present`. Cannot be set with `allowed_card_presences`. Provide an empty value to unset this control. + """ blocked_categories: NotRequired[ List[ Literal[ diff --git a/stripe/params/issuing/_cardholder_update_params.py b/stripe/params/issuing/_cardholder_update_params.py index e38f34766..71c0cbb54 100644 --- a/stripe/params/issuing/_cardholder_update_params.py +++ b/stripe/params/issuing/_cardholder_update_params.py @@ -175,6 +175,12 @@ class CardholderUpdateParamsIndividualVerificationDocument(TypedDict): class CardholderUpdateParamsSpendingControls(TypedDict): + allowed_card_presences: NotRequired[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be allowed. Possible options are `present`, `not_present`. All other statuses will be blocked. Cannot be set with `blocked_card_presences`. Provide an empty value to unset this control. + """ allowed_categories: NotRequired[ List[ Literal[ @@ -483,6 +489,12 @@ class CardholderUpdateParamsSpendingControls(TypedDict): """ Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. """ + blocked_card_presences: NotRequired[ + List[Literal["not_present", "present"]] + ] + """ + Array of card presence statuses from which authorizations will be declined. Possible options are `present`, `not_present`. Cannot be set with `allowed_card_presences`. Provide an empty value to unset this control. + """ blocked_categories: NotRequired[ List[ Literal[ diff --git a/stripe/params/radar/_value_list_create_params.py b/stripe/params/radar/_value_list_create_params.py index 6412874ce..b91242561 100644 --- a/stripe/params/radar/_value_list_create_params.py +++ b/stripe/params/radar/_value_list_create_params.py @@ -17,6 +17,7 @@ class ValueListCreateParams(RequestOptions): """ item_type: NotRequired[ Literal[ + "account", "card_bin", "card_fingerprint", "case_sensitive_string", @@ -31,7 +32,7 @@ class ValueListCreateParams(RequestOptions): ] ] """ - Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `crypto_fingerprint`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, `customer_id`, `sepa_debit_fingerprint`, or `us_bank_account_fingerprint`. Use `string` if the item type is unknown or mixed. + Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `crypto_fingerprint`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, `customer_id`, `account`, `sepa_debit_fingerprint`, or `us_bank_account_fingerprint`. Use `string` if the item type is unknown or mixed. """ metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] """ diff --git a/stripe/params/tax/_calculation_create_params.py b/stripe/params/tax/_calculation_create_params.py index 5b1882024..0461b952e 100644 --- a/stripe/params/tax/_calculation_create_params.py +++ b/stripe/params/tax/_calculation_create_params.py @@ -140,8 +140,10 @@ class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): "et_tin", "eu_oss_vat", "eu_vat", + "fo_vat", "gb_vat", "ge_vat", + "gi_tin", "gn_nif", "hk_br", "hr_oib", @@ -150,6 +152,7 @@ class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): "il_vat", "in_gst", "is_vat", + "it_cf", "jp_cn", "jp_rn", "jp_trn", @@ -180,6 +183,7 @@ class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): "pe_ruc", "ph_tin", "pl_nip", + "py_ruc", "ro_tin", "rs_pib", "ru_inn", @@ -209,7 +213,7 @@ class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/tax/_registration_create_params.py b/stripe/params/tax/_registration_create_params.py index 13a24f564..856564dae 100644 --- a/stripe/params/tax/_registration_create_params.py +++ b/stripe/params/tax/_registration_create_params.py @@ -1795,7 +1795,7 @@ class RegistrationCreateParamsCountryOptionsUs(TypedDict): class RegistrationCreateParamsCountryOptionsUsLocalAmusementTax(TypedDict): jurisdiction: str """ - A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `02154` (Arlington Heights), `05248` (Bensenville), `06613` (Bloomington), `10906` (Campton Hills), `14000` (Chicago), `21696` (East Dundee), `24582` (Evanston), `45421` (Lynwood), `48892` (Midlothian), `64343` (River Grove), `64421` (Riverside), `65806` (Roselle), and `68081` (Schiller Park). + A jurisdiction code representing the [local jurisdiction](https://docs.stripe.com/tax/registering?type=amusement_tax#registration-types). """ diff --git a/stripe/params/test_helpers/__init__.py b/stripe/params/test_helpers/__init__.py index 49d177c58..05b77550c 100644 --- a/stripe/params/test_helpers/__init__.py +++ b/stripe/params/test_helpers/__init__.py @@ -61,6 +61,7 @@ ConfirmationTokenCreateParamsPaymentMethodDataSatispay as ConfirmationTokenCreateParamsPaymentMethodDataSatispay, ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit as ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit, ConfirmationTokenCreateParamsPaymentMethodDataSofort as ConfirmationTokenCreateParamsPaymentMethodDataSofort, + ConfirmationTokenCreateParamsPaymentMethodDataSunbit as ConfirmationTokenCreateParamsPaymentMethodDataSunbit, ConfirmationTokenCreateParamsPaymentMethodDataSwish as ConfirmationTokenCreateParamsPaymentMethodDataSwish, ConfirmationTokenCreateParamsPaymentMethodDataTwint as ConfirmationTokenCreateParamsPaymentMethodDataTwint, ConfirmationTokenCreateParamsPaymentMethodDataUpi as ConfirmationTokenCreateParamsPaymentMethodDataUpi, @@ -306,6 +307,10 @@ "stripe.params.test_helpers._confirmation_token_create_params", False, ), + "ConfirmationTokenCreateParamsPaymentMethodDataSunbit": ( + "stripe.params.test_helpers._confirmation_token_create_params", + False, + ), "ConfirmationTokenCreateParamsPaymentMethodDataSwish": ( "stripe.params.test_helpers._confirmation_token_create_params", False, diff --git a/stripe/params/test_helpers/_confirmation_token_create_params.py b/stripe/params/test_helpers/_confirmation_token_create_params.py index 2c9ed82d3..9d6a4cf02 100644 --- a/stripe/params/test_helpers/_confirmation_token_create_params.py +++ b/stripe/params/test_helpers/_confirmation_token_create_params.py @@ -291,6 +291,10 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. """ + sunbit: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSunbit"] + """ + If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + """ swish: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSwish"] """ If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. @@ -344,6 +348,7 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): "satispay", "sepa_debit", "sofort", + "sunbit", "swish", "twint", "upi", @@ -827,6 +832,10 @@ class ConfirmationTokenCreateParamsPaymentMethodDataSofort(TypedDict): """ +class ConfirmationTokenCreateParamsPaymentMethodDataSunbit(TypedDict): + pass + + class ConfirmationTokenCreateParamsPaymentMethodDataSwish(TypedDict): pass diff --git a/stripe/params/v2/core/_account_link_create_params.py b/stripe/params/v2/core/_account_link_create_params.py index f9446fe97..2d57edb43 100644 --- a/stripe/params/v2/core/_account_link_create_params.py +++ b/stripe/params/v2/core/_account_link_create_params.py @@ -16,10 +16,6 @@ class AccountLinkCreateParams(TypedDict): class AccountLinkCreateParamsUseCase(TypedDict): - type: Literal["account_onboarding", "account_update"] - """ - Open Enum. The type of Account Link the user is requesting. - """ account_onboarding: NotRequired[ "AccountLinkCreateParamsUseCaseAccountOnboarding" ] @@ -30,6 +26,10 @@ class AccountLinkCreateParamsUseCase(TypedDict): """ Hash containing configuration options for an Account Link that updates an existing account. """ + type: Literal["account_onboarding", "account_update"] + """ + Open Enum. The type of Account Link the user is requesting. + """ class AccountLinkCreateParamsUseCaseAccountOnboarding(TypedDict): diff --git a/stripe/params/v2/core/_event_destination_create_params.py b/stripe/params/v2/core/_event_destination_create_params.py index 9dc5a292e..c8bae9b0a 100644 --- a/stripe/params/v2/core/_event_destination_create_params.py +++ b/stripe/params/v2/core/_event_destination_create_params.py @@ -6,6 +6,12 @@ class EventDestinationCreateParams(TypedDict): + amazon_eventbridge: NotRequired[ + "EventDestinationCreateParamsAmazonEventbridge" + ] + """ + Amazon EventBridge configuration. + """ description: NotRequired[str] """ An optional description of what the event destination is used for. @@ -50,12 +56,6 @@ class EventDestinationCreateParams(TypedDict): """ Event destination type. """ - amazon_eventbridge: NotRequired[ - "EventDestinationCreateParamsAmazonEventbridge" - ] - """ - Amazon EventBridge configuration. - """ webhook_endpoint: NotRequired[ "EventDestinationCreateParamsWebhookEndpoint" ] diff --git a/stripe/radar/_payment_evaluation.py b/stripe/radar/_payment_evaluation.py index 903751cc5..99b9ab19a 100644 --- a/stripe/radar/_payment_evaluation.py +++ b/stripe/radar/_payment_evaluation.py @@ -451,13 +451,20 @@ class FraudulentPayment(StripeObject): """ The time when this signal was evaluated. """ - risk_level: Literal["elevated", "highest", "normal"] + risk_level: Literal[ + "elevated", + "highest", + "low", + "normal", + "not_assessed", + "unknown", + ] """ Risk level of this signal, based on the score. """ score: float """ - Score for this insight. Possible values for evaluated payments are -1 and any value between 0 and 100. The value is returned with two decimal places. A score of -1 indicates a test integration and higher scores indicate a higher likelihood of the signal being true. + Score for this signal. Possible values for evaluated payments are between 0 and 100. The value is returned with two decimal places and higher scores indicate a higher likelihood of the signal being true. A score of -1 is returned when a model evaluation was not performed, such as requests from incomplete integrations. """ fraudulent_payment: FraudulentPayment @@ -508,7 +515,7 @@ class FraudulentPayment(StripeObject): """ recommended_action: Literal["block", "continue"] """ - Recommended action based on the score of the fraudulent_payment signal. Possible values are `block` and `continue`. + Recommended action based on the score of the `fraudulent_payment` signal. Possible values are `block` and `continue`. """ signals: Signals """ diff --git a/stripe/radar/_value_list.py b/stripe/radar/_value_list.py index 2e060b4be..d72089440 100644 --- a/stripe/radar/_value_list.py +++ b/stripe/radar/_value_list.py @@ -61,6 +61,7 @@ class ValueList( Unique identifier for the object. """ item_type: Literal[ + "account", "card_bin", "card_fingerprint", "case_sensitive_string", @@ -74,7 +75,7 @@ class ValueList( "us_bank_account_fingerprint", ] """ - The type of items in the value list. One of `card_fingerprint`, `card_bin`, `crypto_fingerprint`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, `customer_id`, `sepa_debit_fingerprint`, or `us_bank_account_fingerprint`. + The type of items in the value list. One of `card_fingerprint`, `card_bin`, `crypto_fingerprint`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, `customer_id`, `account`, `sepa_debit_fingerprint`, or `us_bank_account_fingerprint`. """ list_items: ListObject["ValueListItem"] """ diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index d16790172..573641bc7 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -103,8 +103,10 @@ class TaxId(StripeObject): "et_tin", "eu_oss_vat", "eu_vat", + "fo_vat", "gb_vat", "ge_vat", + "gi_tin", "gn_nif", "hk_br", "hr_oib", @@ -113,6 +115,7 @@ class TaxId(StripeObject): "il_vat", "in_gst", "is_vat", + "it_cf", "jp_cn", "jp_rn", "jp_trn", @@ -143,6 +146,7 @@ class TaxId(StripeObject): "pe_ruc", "ph_tin", "pl_nip", + "py_ruc", "ro_tin", "rs_pib", "ru_inn", @@ -173,7 +177,7 @@ class TaxId(StripeObject): "zw_tin", ] """ - 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`, `hr_oib`, `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`, `pl_nip`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_vat`, `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`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, 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`, `hr_oib`, `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`, `pl_nip`, `it_cf`, `fo_vat`, `gi_tin`, `py_ruc`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_vat`, `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`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown` """ value: str """ @@ -498,7 +502,7 @@ class FlatAmount(StripeObject): """ tax_date: int """ - Timestamp of date at which the tax rules and rates in effect applies for the calculation. + The calculation uses the tax rules and rates that are in effect at this timestamp. You can use a date up to 31 days in the past or up to 31 days in the future. If you use a future date, Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules and rate that will be in effect on that date. We deploy tax changes before their effective date, but not within a fixed window. """ @classmethod diff --git a/stripe/tax/_transaction.py b/stripe/tax/_transaction.py index 1811d3cc1..cd6598a72 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -106,8 +106,10 @@ class TaxId(StripeObject): "et_tin", "eu_oss_vat", "eu_vat", + "fo_vat", "gb_vat", "ge_vat", + "gi_tin", "gn_nif", "hk_br", "hr_oib", @@ -116,6 +118,7 @@ class TaxId(StripeObject): "il_vat", "in_gst", "is_vat", + "it_cf", "jp_cn", "jp_rn", "jp_trn", @@ -146,6 +149,7 @@ class TaxId(StripeObject): "pe_ruc", "ph_tin", "pl_nip", + "py_ruc", "ro_tin", "rs_pib", "ru_inn", @@ -176,7 +180,7 @@ class TaxId(StripeObject): "zw_tin", ] """ - 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`, `hr_oib`, `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`, `pl_nip`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_vat`, `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`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, 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`, `hr_oib`, `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`, `pl_nip`, `it_cf`, `fo_vat`, `gi_tin`, `py_ruc`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_vat`, `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`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown` """ value: str """ @@ -417,7 +421,7 @@ class TaxRateDetails(StripeObject): """ tax_date: int """ - Timestamp of date at which the tax rules and rates in effect applies for the calculation. + The calculation uses the tax rules and rates that are in effect at this timestamp. You can use a date up to 31 days in the past or up to 31 days in the future. If you use a future date, Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules and rate that will be in effect on that date. We deploy tax changes before their effective date, but not within a fixed window. """ type: Literal["reversal", "transaction"] """ diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index b1464557e..13ed4502c 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -43856,7 +43856,6 @@ def test_v2_core_account_link_post_service( { "account": "account", "use_case": { - "type": "account_onboarding", "account_onboarding": { "collection_options": { "fields": "eventually_due", @@ -43875,6 +43874,7 @@ def test_v2_core_account_link_post_service( "refresh_url": "refresh_url", "return_url": "return_url", }, + "type": "account_onboarding", }, } ) @@ -43883,7 +43883,7 @@ def test_v2_core_account_link_post_service( path="/v2/core/account_links", query_string="", api_base="https://api.stripe.com", - post_data='{"account":"account","use_case":{"type":"account_onboarding","account_onboarding":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["merchant"],"refresh_url":"refresh_url","return_url":"return_url"},"account_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["merchant"],"refresh_url":"refresh_url","return_url":"return_url"}}}', + post_data='{"account":"account","use_case":{"account_onboarding":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["merchant"],"refresh_url":"refresh_url","return_url":"return_url"},"account_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["merchant"],"refresh_url":"refresh_url","return_url":"return_url"},"type":"account_onboarding"}}', is_json=True, ) From 0b55db8ccb4a35e57aaceb2e1dc7bdd505e43344 Mon Sep 17 00:00:00 2001 From: Michael Broshi Date: Thu, 23 Apr 2026 20:14:51 -0400 Subject: [PATCH 2/3] Bump version to 15.1.0 --- CHANGELOG.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ VERSION | 2 +- pyproject.toml | 2 +- stripe/_version.py | 2 +- 4 files changed, 47 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddbd17c9a..edaca3353 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,47 @@ +## 15.1.0 - 2026-04-23 +This release changes the pinned API version to 2026-04-22.dahlia. + +* [#1793](https://github.com/stripe/stripe-python/pull/1793) Update generated code + * Add support for `balance_report` and `payout_reconciliation_report` on `AccountSession.Component` and `AccountSessionCreateParamsComponent` + * Add support for `app_distribution` and `sunbit_payments` on `Account.Capability`, `AccountCreateParamsCapability`, and `AccountModifyParamsCapability` + * ⚠️ Add support for new values `fee_credit_funding`, `inbound_transfer_reversal`, and `inbound_transfer` on enum `BalanceTransaction.type` + * Add support for `sunbit` on `Charge.PaymentMethodDetail`, `ConfirmationToken.PaymentMethodPreview`, `ConfirmationTokenCreateParamsPaymentMethodDatum`, `PaymentAttemptRecord.PaymentMethodDetail`, `PaymentIntentConfirmParamsPaymentMethodDatum`, `PaymentIntentCreateParamsPaymentMethodDatum`, `PaymentIntentModifyParamsPaymentMethodDatum`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationModifyParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethod`, `PaymentRecord.PaymentMethodDetail`, `SetupIntentConfirmParamsPaymentMethodDatum`, `SetupIntentCreateParamsPaymentMethodDatum`, and `SetupIntentModifyParamsPaymentMethodDatum` + * ⚠️ Add support for new values `phantom_cash` and `usdt` on enums `Charge.PaymentMethodDetail.Crypto.token_currency`, `PaymentAttemptRecord.PaymentMethodDetail.Crypto.token_currency`, and `PaymentRecord.PaymentMethodDetail.Crypto.token_currency` + * Add support for `location` and `reader` on `Charge.PaymentMethodDetail.Klarna`, `PaymentAttemptRecord.PaymentMethodDetail.Klarna`, and `PaymentRecord.PaymentMethodDetail.Klarna` + * Add support for `mandate` on `Charge.PaymentMethodDetail.Pix`, `PaymentAttemptRecord.PaymentMethodDetail.Pix`, and `PaymentRecord.PaymentMethodDetail.Pix` + * Add support for `managed_payments` on `Checkout.Session`, `PaymentIntent`, `PaymentLinkCreateParams`, `PaymentLink`, `SetupIntent`, `Subscription`, and `checkout.SessionCreateParams` + * Add support for new value `sunbit` on enums `PaymentIntentConfirmParams.excluded_payment_method_types`, `PaymentIntentCreateParams.excluded_payment_method_types`, `PaymentIntentModifyParams.excluded_payment_method_types`, `SetupIntentCreateParams.excluded_payment_method_types`, `SetupIntentModifyParams.excluded_payment_method_types`, and `checkout.SessionCreateParams.excluded_payment_method_types` + * Add support for `mandate_options` on `Checkout.Session.PaymentMethodOption.Pix`, `PaymentIntent.PaymentMethodOption.Pix`, `PaymentIntentConfirmParamsPaymentMethodOptionPix`, `PaymentIntentCreateParamsPaymentMethodOptionPix`, `PaymentIntentModifyParamsPaymentMethodOptionPix`, and `checkout.SessionCreateParamsPaymentMethodOptionPix` + * Change type of `PaymentIntentConfirmParamsPaymentMethodOptionPix.setup_future_usage`, `PaymentIntentCreateParamsPaymentMethodOptionPix.setup_future_usage`, `PaymentIntentModifyParamsPaymentMethodOptionPix.setup_future_usage`, and `checkout.SessionCreateParamsPaymentMethodOptionPix.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')` + * Add support for new value `sunbit` on enum `checkout.SessionCreateParams.payment_method_types` + * ⚠️ Add support for new values `fo_vat`, `gi_tin`, `it_cf`, and `py_ruc` on enums `Checkout.Session.CustomerDetail.TaxId.type`, `Invoice.CustomerTaxId.type`, `Tax.Calculation.CustomerDetail.TaxId.type`, `Tax.Transaction.CustomerDetail.TaxId.type`, and `TaxId.type` + * ⚠️ Change type of `Checkout.Session.PaymentMethodOption.Pix.setup_future_usage` and `PaymentIntent.PaymentMethodOption.Pix.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')` + * Add support for new value `sunbit` on enums `ConfirmationTokenCreateParamsPaymentMethodDatum.type`, `PaymentIntentConfirmParamsPaymentMethodDatum.type`, `PaymentIntentCreateParamsPaymentMethodDatum.type`, `PaymentIntentModifyParamsPaymentMethodDatum.type`, `SetupIntentConfirmParamsPaymentMethodDatum.type`, `SetupIntentCreateParamsPaymentMethodDatum.type`, and `SetupIntentModifyParamsPaymentMethodDatum.type` + * ⚠️ Add support for new value `sunbit` on enums `ConfirmationToken.PaymentMethodPreview.type` and `PaymentMethod.type` + * Add support for new values `fo_vat`, `gi_tin`, `it_cf`, and `py_ruc` on enums `CustomerCreateParamsTaxIdDatum.type`, `CustomerCreateTaxIdParams.type`, `InvoiceCreatePreviewParamsCustomerDetailTaxId.type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParamsCustomerDetailTaxId.type` + * Add support for new value `sunbit` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type` + * Add support for `pix` on `Invoice.PaymentSetting.PaymentMethodOption`, `InvoiceCreateParamsPaymentSettingPaymentMethodOption`, `InvoiceModifyParamsPaymentSettingPaymentMethodOption`, `Mandate.PaymentMethodDetail`, `SetupAttempt.PaymentMethodDetail`, `SetupIntent.PaymentMethodOption`, `SetupIntentConfirmParamsPaymentMethodOption`, `SetupIntentCreateParamsPaymentMethodOption`, `SetupIntentModifyParamsPaymentMethodOption`, `Subscription.PaymentSetting.PaymentMethodOption`, `SubscriptionCreateParamsPaymentSettingPaymentMethodOption`, and `SubscriptionModifyParamsPaymentSettingPaymentMethodOption` + * Add support for `upi` on `Invoice.PaymentSetting.PaymentMethodOption`, `InvoiceCreateParamsPaymentSettingPaymentMethodOption`, `InvoiceModifyParamsPaymentSettingPaymentMethodOption`, `Subscription.PaymentSetting.PaymentMethodOption`, `SubscriptionCreateParamsPaymentSettingPaymentMethodOption`, and `SubscriptionModifyParamsPaymentSettingPaymentMethodOption` + * Add support for new values `pix` and `upi` on enums `InvoiceCreateParamsPaymentSetting.payment_method_types`, `InvoiceModifyParamsPaymentSetting.payment_method_types`, `SubscriptionCreateParamsPaymentSetting.payment_method_types`, and `SubscriptionModifyParamsPaymentSetting.payment_method_types` + * ⚠️ Add support for new values `pix` and `upi` on enums `Invoice.PaymentSetting.payment_method_types` and `Subscription.PaymentSetting.payment_method_types` + * Add support for `card_presence` on `Issuing.Authorization` + * Add support for `allowed_card_presences` and `blocked_card_presences` on `Issuing.Card.SpendingControl`, `Issuing.Cardholder.SpendingControl`, `issuing.CardCreateParamsSpendingControl`, `issuing.CardModifyParamsSpendingControl`, `issuing.CardholderCreateParamsSpendingControl`, and `issuing.CardholderModifyParamsSpendingControl` + * ⚠️ Add support for new value `fulfillment_error` on enum `Issuing.Card.cancellation_reason` + * ⚠️ Add support for new value `fulfillment_error` on enum `Issuing.Card.replacement_reason` + * Add support for `amount` and `currency` on `Mandate.MultiUse` + * Add support for `amount_to_confirm` on `PaymentIntentConfirmParams` + * ⚠️ Add support for new value `sunbit` on enums `PaymentIntent.excluded_payment_method_types` and `SetupIntent.excluded_payment_method_types` + * Add support for `klarna_display_qr_code` on `PaymentIntent.NextAction` + * Add support for new value `sunbit` on enums `PaymentLinkCreateParams.payment_method_types` and `PaymentLinkModifyParams.payment_method_types` + * ⚠️ Add support for new value `sunbit` on enum `PaymentLink.payment_method_types` + * ⚠️ Add support for new values `low`, `not_assessed`, and `unknown` on enum `Radar.PaymentEvaluation.Signal.FraudulentPayment.risk_level` + * Add support for new value `account` on enum `radar.ValueListCreateParams.item_type` + * ⚠️ Add support for new value `account` on enum `Radar.ValueList.item_type` + * Add support for `moto` on `SetupAttempt.PaymentMethodDetail.Card` + * Add support for `pix_display_qr_code` on `SetupIntent.NextAction` + * Add support for new value `2026-04-22.dahlia` on enum `WebhookEndpointCreateParams.api_version` + * Add support for error codes `action_blocked` and `approval_required` on `Invoice.LastFinalizationError`, `PaymentIntent.LastPaymentError`, `SetupAttempt.SetupError`, `SetupIntent.LastSetupError`, and `StripeError` + ## 15.0.1 - 2026-04-01 * [#1786](https://github.com/stripe/stripe-python/pull/1786) Fix encoding two-dimensional array request params * [#1785](https://github.com/stripe/stripe-python/pull/1785) Improve types for `metadata` and other dict-like types diff --git a/VERSION b/VERSION index 2bbd2b4b4..d14dfbac3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -15.0.1 +15.1.0 diff --git a/pyproject.toml b/pyproject.toml index 87d22ca9c..ff6c7b0e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "stripe" -version = "15.0.1" +version = "15.1.0" readme = "README.md" description = "Python bindings for the Stripe API" authors = [{ name = "Stripe", email = "support@stripe.com" }] diff --git a/stripe/_version.py b/stripe/_version.py index f3c782860..6692d3f85 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "15.0.1" +VERSION = "15.1.0" From a157f5f01c4177c03ee8d57fe56b1b03a7ba6db5 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 15:22:03 +0000 Subject: [PATCH 3/3] Update generated code for v2253 and --- CODEGEN_VERSION | 2 +- stripe/__init__.py | 2 + stripe/_api_requestor.py | 5 + stripe/_error.py | 22 + stripe/_event_notification_handler.py | 240 ++++++++++ stripe/_object_classes.py | 22 + stripe/_v2_services.py | 23 + stripe/events/__init__.py | 180 +++++++ stripe/events/_event_classes.py | 180 +++++++ ...ling_meter_error_report_triggered_event.py | 1 + .../_v1_billing_meter_no_meter_found_event.py | 1 + ...ce_product_catalog_imports_failed_event.py | 117 +++++ ...roduct_catalog_imports_processing_event.py | 117 +++++ ...product_catalog_imports_succeeded_event.py | 117 +++++ ...log_imports_succeeded_with_errors_event.py | 119 +++++ ..._data_reporting_query_run_created_event.py | 113 +++++ ...2_data_reporting_query_run_failed_event.py | 113 +++++ ...ata_reporting_query_run_succeeded_event.py | 115 +++++ ..._data_reporting_query_run_updated_event.py | 113 +++++ .../_v2_extend_workflow_run_failed_event.py | 162 +++++++ .../_v2_extend_workflow_run_started_event.py | 113 +++++ ..._v2_extend_workflow_run_succeeded_event.py | 113 +++++ ...ey_management_transaction_created_event.py | 4 + ...ated_commerce_agreement_confirmed_event.py | 187 ++++++++ ...trated_commerce_agreement_created_event.py | 187 ++++++++ ...rce_agreement_partially_confirmed_event.py | 191 ++++++++ ...ted_commerce_agreement_terminated_event.py | 187 ++++++++ stripe/params/v2/__init__.py | 8 + stripe/params/v2/billing/__init__.py | 20 + .../v2/billing/_bill_setting_create_params.py | 6 +- .../v2/billing/_bill_setting_update_params.py | 8 +- .../v2/billing/_cadence_create_params.py | 32 +- .../v2/billing/_cadence_update_params.py | 10 +- .../_collection_setting_create_params.py | 25 +- .../_collection_setting_update_params.py | 27 +- .../_meter_event_adjustment_create_params.py | 4 +- .../params/v2/billing/_profile_list_params.py | 2 +- stripe/params/v2/commerce/__init__.py | 27 ++ .../v2/commerce/product_catalog/__init__.py | 46 ++ .../product_catalog/_import_create_params.py | 20 + .../product_catalog/_import_list_params.py | 51 ++ .../_import_retrieve_params.py | 7 + .../v2/core/_batch_job_create_params.py | 4 +- .../vault/_gb_bank_account_create_params.py | 4 +- stripe/params/v2/data/__init__.py | 25 + stripe/params/v2/data/reporting/__init__.py | 44 ++ .../reporting/_query_run_create_params.py | 22 + .../reporting/_query_run_retrieve_params.py | 7 + stripe/params/v2/extend/__init__.py | 60 +++ .../v2/extend/_workflow_invoke_params.py | 12 + .../params/v2/extend/_workflow_list_params.py | 18 + .../v2/extend/_workflow_retrieve_params.py | 7 + .../v2/extend/_workflow_run_list_params.py | 19 + .../extend/_workflow_run_retrieve_params.py | 7 + stripe/params/v2/iam/__init__.py | 32 ++ .../v2/iam/_activity_log_list_params.py | 35 ++ .../_outbound_setup_intent_create_params.py | 4 +- .../_outbound_setup_intent_update_params.py | 4 +- stripe/params/v2/network/__init__.py | 39 ++ .../v2/network/_business_profile_me_params.py | 7 + .../_business_profile_retrieve_params.py | 7 + .../v2/orchestrated_commerce/__init__.py | 60 +++ .../_agreement_confirm_params.py | 7 + .../_agreement_create_params.py | 10 + .../_agreement_list_params.py | 14 + .../_agreement_retrieve_params.py | 7 + .../_agreement_terminate_params.py | 7 + stripe/v2/__init__.py | 29 ++ stripe/v2/_commerce_service.py | 40 ++ stripe/v2/_datum_service.py | 35 ++ stripe/v2/_extend_service.py | 41 ++ stripe/v2/_iam_service.py | 38 ++ stripe/v2/_network_service.py | 40 ++ stripe/v2/_orchestrated_commerce_service.py | 40 ++ stripe/v2/billing/_bill_setting.py | 10 +- stripe/v2/billing/_bill_setting_version.py | 6 +- stripe/v2/billing/_cadence.py | 34 +- stripe/v2/billing/_collection_setting.py | 26 +- .../v2/billing/_collection_setting_version.py | 22 +- stripe/v2/billing/_meter_event_adjustment.py | 6 +- stripe/v2/billing/_meter_event_session.py | 6 +- .../billing/_meter_event_session_service.py | 4 +- stripe/v2/commerce/__init__.py | 41 ++ stripe/v2/commerce/_product_catalog_import.py | 204 ++++++++ .../v2/commerce/_product_catalog_service.py | 40 ++ .../v2/commerce/product_catalog/__init__.py | 32 ++ .../product_catalog/_import_service.py | 142 ++++++ stripe/v2/core/_account.py | 2 + stripe/v2/core/_batch_job.py | 42 +- .../v2/core/accounts/_person_token_service.py | 6 +- stripe/v2/core/vault/_gb_bank_account.py | 2 +- stripe/v2/data/__init__.py | 31 ++ stripe/v2/data/_reporting_service.py | 38 ++ stripe/v2/data/reporting/__init__.py | 31 ++ stripe/v2/data/reporting/_query_run.py | 116 +++++ .../v2/data/reporting/_query_run_service.py | 102 ++++ stripe/v2/extend/__init__.py | 37 ++ stripe/v2/extend/_workflow.py | 72 +++ stripe/v2/extend/_workflow_run.py | 137 ++++++ stripe/v2/extend/_workflow_run_service.py | 97 ++++ stripe/v2/extend/_workflow_service.py | 141 ++++++ stripe/v2/iam/__init__.py | 31 ++ stripe/v2/iam/_activity_log.py | 189 ++++++++ stripe/v2/iam/_activity_log_service.py | 53 +++ .../v2/money_management/_inbound_transfer.py | 22 +- .../v2/money_management/_outbound_transfer.py | 1 + stripe/v2/money_management/_payout_method.py | 2 +- stripe/v2/money_management/_transaction.py | 7 +- .../v2/money_management/_transaction_entry.py | 7 +- stripe/v2/network/__init__.py | 36 ++ stripe/v2/network/_business_profile.py | 80 ++++ .../v2/network/_business_profile_service.py | 100 ++++ stripe/v2/orchestrated_commerce/__init__.py | 36 ++ stripe/v2/orchestrated_commerce/_agreement.py | 93 ++++ .../_agreement_service.py | 236 ++++++++++ tests/test_generated_examples.py | 443 +++++++++++++++++- 116 files changed, 6396 insertions(+), 131 deletions(-) create mode 100644 stripe/events/_v2_commerce_product_catalog_imports_failed_event.py create mode 100644 stripe/events/_v2_commerce_product_catalog_imports_processing_event.py create mode 100644 stripe/events/_v2_commerce_product_catalog_imports_succeeded_event.py create mode 100644 stripe/events/_v2_commerce_product_catalog_imports_succeeded_with_errors_event.py create mode 100644 stripe/events/_v2_data_reporting_query_run_created_event.py create mode 100644 stripe/events/_v2_data_reporting_query_run_failed_event.py create mode 100644 stripe/events/_v2_data_reporting_query_run_succeeded_event.py create mode 100644 stripe/events/_v2_data_reporting_query_run_updated_event.py create mode 100644 stripe/events/_v2_extend_workflow_run_failed_event.py create mode 100644 stripe/events/_v2_extend_workflow_run_started_event.py create mode 100644 stripe/events/_v2_extend_workflow_run_succeeded_event.py create mode 100644 stripe/events/_v2_orchestrated_commerce_agreement_confirmed_event.py create mode 100644 stripe/events/_v2_orchestrated_commerce_agreement_created_event.py create mode 100644 stripe/events/_v2_orchestrated_commerce_agreement_partially_confirmed_event.py create mode 100644 stripe/events/_v2_orchestrated_commerce_agreement_terminated_event.py create mode 100644 stripe/params/v2/commerce/__init__.py create mode 100644 stripe/params/v2/commerce/product_catalog/__init__.py create mode 100644 stripe/params/v2/commerce/product_catalog/_import_create_params.py create mode 100644 stripe/params/v2/commerce/product_catalog/_import_list_params.py create mode 100644 stripe/params/v2/commerce/product_catalog/_import_retrieve_params.py create mode 100644 stripe/params/v2/data/__init__.py create mode 100644 stripe/params/v2/data/reporting/__init__.py create mode 100644 stripe/params/v2/data/reporting/_query_run_create_params.py create mode 100644 stripe/params/v2/data/reporting/_query_run_retrieve_params.py create mode 100644 stripe/params/v2/extend/__init__.py create mode 100644 stripe/params/v2/extend/_workflow_invoke_params.py create mode 100644 stripe/params/v2/extend/_workflow_list_params.py create mode 100644 stripe/params/v2/extend/_workflow_retrieve_params.py create mode 100644 stripe/params/v2/extend/_workflow_run_list_params.py create mode 100644 stripe/params/v2/extend/_workflow_run_retrieve_params.py create mode 100644 stripe/params/v2/iam/__init__.py create mode 100644 stripe/params/v2/iam/_activity_log_list_params.py create mode 100644 stripe/params/v2/network/__init__.py create mode 100644 stripe/params/v2/network/_business_profile_me_params.py create mode 100644 stripe/params/v2/network/_business_profile_retrieve_params.py create mode 100644 stripe/params/v2/orchestrated_commerce/__init__.py create mode 100644 stripe/params/v2/orchestrated_commerce/_agreement_confirm_params.py create mode 100644 stripe/params/v2/orchestrated_commerce/_agreement_create_params.py create mode 100644 stripe/params/v2/orchestrated_commerce/_agreement_list_params.py create mode 100644 stripe/params/v2/orchestrated_commerce/_agreement_retrieve_params.py create mode 100644 stripe/params/v2/orchestrated_commerce/_agreement_terminate_params.py create mode 100644 stripe/v2/_commerce_service.py create mode 100644 stripe/v2/_datum_service.py create mode 100644 stripe/v2/_extend_service.py create mode 100644 stripe/v2/_iam_service.py create mode 100644 stripe/v2/_network_service.py create mode 100644 stripe/v2/_orchestrated_commerce_service.py create mode 100644 stripe/v2/commerce/__init__.py create mode 100644 stripe/v2/commerce/_product_catalog_import.py create mode 100644 stripe/v2/commerce/_product_catalog_service.py create mode 100644 stripe/v2/commerce/product_catalog/__init__.py create mode 100644 stripe/v2/commerce/product_catalog/_import_service.py create mode 100644 stripe/v2/data/__init__.py create mode 100644 stripe/v2/data/_reporting_service.py create mode 100644 stripe/v2/data/reporting/__init__.py create mode 100644 stripe/v2/data/reporting/_query_run.py create mode 100644 stripe/v2/data/reporting/_query_run_service.py create mode 100644 stripe/v2/extend/__init__.py create mode 100644 stripe/v2/extend/_workflow.py create mode 100644 stripe/v2/extend/_workflow_run.py create mode 100644 stripe/v2/extend/_workflow_run_service.py create mode 100644 stripe/v2/extend/_workflow_service.py create mode 100644 stripe/v2/iam/__init__.py create mode 100644 stripe/v2/iam/_activity_log.py create mode 100644 stripe/v2/iam/_activity_log_service.py create mode 100644 stripe/v2/network/__init__.py create mode 100644 stripe/v2/network/_business_profile.py create mode 100644 stripe/v2/network/_business_profile_service.py create mode 100644 stripe/v2/orchestrated_commerce/__init__.py create mode 100644 stripe/v2/orchestrated_commerce/_agreement.py create mode 100644 stripe/v2/orchestrated_commerce/_agreement_service.py diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 57b376a31..4540bccf0 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -505d252427d8aaae5b38486880ba3550b08958ec \ No newline at end of file +826bf48af8bcd391512daeaf283b8486347b14c8 \ No newline at end of file diff --git a/stripe/__init__.py b/stripe/__init__.py index aab7c6eb2..e1f0e7670 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -325,6 +325,7 @@ def add_beta_version( AlreadyExistsError as AlreadyExistsError, AuthenticationError as AuthenticationError, BlockedByStripeError as BlockedByStripeError, + CannotProceedError as CannotProceedError, CardError as CardError, ControlledByAlternateResourceError as ControlledByAlternateResourceError, ControlledByDashboardError as ControlledByDashboardError, @@ -779,6 +780,7 @@ def add_beta_version( "AlreadyExistsError": ("stripe._error", False), "AuthenticationError": ("stripe._error", False), "BlockedByStripeError": ("stripe._error", False), + "CannotProceedError": ("stripe._error", False), "CardError": ("stripe._error", False), "ControlledByAlternateResourceError": ("stripe._error", False), "ControlledByDashboardError": ("stripe._error", False), diff --git a/stripe/_api_requestor.py b/stripe/_api_requestor.py index 20c789100..ae057a867 100644 --- a/stripe/_api_requestor.py +++ b/stripe/_api_requestor.py @@ -389,6 +389,11 @@ def specific_v2_api_error(self, rbody, rcode, resp, rheaders, error_data): return error.AlreadyExistsError(**error_args) elif type == "blocked_by_stripe": return error.BlockedByStripeError(**error_args) + elif type == "cannot_proceed": + return error.CannotProceedError( + **error_args, + reason=error_data.get("reason"), + ) elif type == "controlled_by_alternate_resource": return error.ControlledByAlternateResourceError(**error_args) elif type == "controlled_by_dashboard": diff --git a/stripe/_error.py b/stripe/_error.py index ecba79e36..c882414cd 100644 --- a/stripe/_error.py +++ b/stripe/_error.py @@ -200,6 +200,28 @@ class BlockedByStripeError(StripeError): pass +class CannotProceedError(StripeError): + def __init__( + self, + message=None, + http_body=None, + http_status=None, + json_body=None, + headers=None, + code=None, + reason=None, + ): + super().__init__( + message, + http_body, + http_status, + json_body, + headers, + code, + ) + self.reason = reason + + class ControlledByAlternateResourceError(StripeError): pass diff --git a/stripe/_event_notification_handler.py b/stripe/_event_notification_handler.py index 00fa531ae..9db0b9828 100644 --- a/stripe/_event_notification_handler.py +++ b/stripe/_event_notification_handler.py @@ -16,6 +16,18 @@ from stripe.events._v1_billing_meter_no_meter_found_event import ( V1BillingMeterNoMeterFoundEventNotification, ) + from stripe.events._v2_commerce_product_catalog_imports_failed_event import ( + V2CommerceProductCatalogImportsFailedEventNotification, + ) + from stripe.events._v2_commerce_product_catalog_imports_processing_event import ( + V2CommerceProductCatalogImportsProcessingEventNotification, + ) + from stripe.events._v2_commerce_product_catalog_imports_succeeded_event import ( + V2CommerceProductCatalogImportsSucceededEventNotification, + ) + from stripe.events._v2_commerce_product_catalog_imports_succeeded_with_errors_event import ( + V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification, + ) from stripe.events._v2_core_account_closed_event import ( V2CoreAccountClosedEventNotification, ) @@ -109,6 +121,27 @@ from stripe.events._v2_core_health_event_generation_failure_resolved_event import ( V2CoreHealthEventGenerationFailureResolvedEventNotification, ) + from stripe.events._v2_data_reporting_query_run_created_event import ( + V2DataReportingQueryRunCreatedEventNotification, + ) + from stripe.events._v2_data_reporting_query_run_failed_event import ( + V2DataReportingQueryRunFailedEventNotification, + ) + from stripe.events._v2_data_reporting_query_run_succeeded_event import ( + V2DataReportingQueryRunSucceededEventNotification, + ) + from stripe.events._v2_data_reporting_query_run_updated_event import ( + V2DataReportingQueryRunUpdatedEventNotification, + ) + from stripe.events._v2_extend_workflow_run_failed_event import ( + V2ExtendWorkflowRunFailedEventNotification, + ) + from stripe.events._v2_extend_workflow_run_started_event import ( + V2ExtendWorkflowRunStartedEventNotification, + ) + from stripe.events._v2_extend_workflow_run_succeeded_event import ( + V2ExtendWorkflowRunSucceededEventNotification, + ) from stripe.events._v2_money_management_adjustment_created_event import ( V2MoneyManagementAdjustmentCreatedEventNotification, ) @@ -217,6 +250,18 @@ from stripe.events._v2_money_management_transaction_updated_event import ( V2MoneyManagementTransactionUpdatedEventNotification, ) + from stripe.events._v2_orchestrated_commerce_agreement_confirmed_event import ( + V2OrchestratedCommerceAgreementConfirmedEventNotification, + ) + from stripe.events._v2_orchestrated_commerce_agreement_created_event import ( + V2OrchestratedCommerceAgreementCreatedEventNotification, + ) + from stripe.events._v2_orchestrated_commerce_agreement_partially_confirmed_event import ( + V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification, + ) + from stripe.events._v2_orchestrated_commerce_agreement_terminated_event import ( + V2OrchestratedCommerceAgreementTerminatedEventNotification, + ) # event-notification-types: The end of the section generated from our OpenAPI spec # internal type to represent any EventNotification subclass @@ -339,6 +384,58 @@ def on_v1_billing_meter_no_meter_found( ) return func + def on_v2_commerce_product_catalog_imports_failed( + self, + func: "Callable[[V2CommerceProductCatalogImportsFailedEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2CommerceProductCatalogImportsFailedEvent` (`v2.commerce.product_catalog.imports.failed`) event notification. + """ + self._register( + "v2.commerce.product_catalog.imports.failed", + func, + ) + return func + + def on_v2_commerce_product_catalog_imports_processing( + self, + func: "Callable[[V2CommerceProductCatalogImportsProcessingEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2CommerceProductCatalogImportsProcessingEvent` (`v2.commerce.product_catalog.imports.processing`) event notification. + """ + self._register( + "v2.commerce.product_catalog.imports.processing", + func, + ) + return func + + def on_v2_commerce_product_catalog_imports_succeeded( + self, + func: "Callable[[V2CommerceProductCatalogImportsSucceededEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2CommerceProductCatalogImportsSucceededEvent` (`v2.commerce.product_catalog.imports.succeeded`) event notification. + """ + self._register( + "v2.commerce.product_catalog.imports.succeeded", + func, + ) + return func + + def on_v2_commerce_product_catalog_imports_succeeded_with_errors( + self, + func: "Callable[[V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2CommerceProductCatalogImportsSucceededWithErrorsEvent` (`v2.commerce.product_catalog.imports.succeeded_with_errors`) event notification. + """ + self._register( + "v2.commerce.product_catalog.imports.succeeded_with_errors", + func, + ) + return func + def on_v2_core_account_closed( self, func: "Callable[[V2CoreAccountClosedEventNotification, StripeClient], None]", @@ -742,6 +839,97 @@ def on_v2_core_health_event_generation_failure_resolved( ) return func + def on_v2_data_reporting_query_run_created( + self, + func: "Callable[[V2DataReportingQueryRunCreatedEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2DataReportingQueryRunCreatedEvent` (`v2.data.reporting.query_run.created`) event notification. + """ + self._register( + "v2.data.reporting.query_run.created", + func, + ) + return func + + def on_v2_data_reporting_query_run_failed( + self, + func: "Callable[[V2DataReportingQueryRunFailedEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2DataReportingQueryRunFailedEvent` (`v2.data.reporting.query_run.failed`) event notification. + """ + self._register( + "v2.data.reporting.query_run.failed", + func, + ) + return func + + def on_v2_data_reporting_query_run_succeeded( + self, + func: "Callable[[V2DataReportingQueryRunSucceededEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2DataReportingQueryRunSucceededEvent` (`v2.data.reporting.query_run.succeeded`) event notification. + """ + self._register( + "v2.data.reporting.query_run.succeeded", + func, + ) + return func + + def on_v2_data_reporting_query_run_updated( + self, + func: "Callable[[V2DataReportingQueryRunUpdatedEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2DataReportingQueryRunUpdatedEvent` (`v2.data.reporting.query_run.updated`) event notification. + """ + self._register( + "v2.data.reporting.query_run.updated", + func, + ) + return func + + def on_v2_extend_workflow_run_failed( + self, + func: "Callable[[V2ExtendWorkflowRunFailedEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2ExtendWorkflowRunFailedEvent` (`v2.extend.workflow_run.failed`) event notification. + """ + self._register( + "v2.extend.workflow_run.failed", + func, + ) + return func + + def on_v2_extend_workflow_run_started( + self, + func: "Callable[[V2ExtendWorkflowRunStartedEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2ExtendWorkflowRunStartedEvent` (`v2.extend.workflow_run.started`) event notification. + """ + self._register( + "v2.extend.workflow_run.started", + func, + ) + return func + + def on_v2_extend_workflow_run_succeeded( + self, + func: "Callable[[V2ExtendWorkflowRunSucceededEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2ExtendWorkflowRunSucceededEvent` (`v2.extend.workflow_run.succeeded`) event notification. + """ + self._register( + "v2.extend.workflow_run.succeeded", + func, + ) + return func + def on_v2_money_management_adjustment_created( self, func: "Callable[[V2MoneyManagementAdjustmentCreatedEventNotification, StripeClient], None]", @@ -1210,4 +1398,56 @@ def on_v2_money_management_transaction_updated( ) return func + def on_v2_orchestrated_commerce_agreement_confirmed( + self, + func: "Callable[[V2OrchestratedCommerceAgreementConfirmedEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2OrchestratedCommerceAgreementConfirmedEvent` (`v2.orchestrated_commerce.agreement.confirmed`) event notification. + """ + self._register( + "v2.orchestrated_commerce.agreement.confirmed", + func, + ) + return func + + def on_v2_orchestrated_commerce_agreement_created( + self, + func: "Callable[[V2OrchestratedCommerceAgreementCreatedEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2OrchestratedCommerceAgreementCreatedEvent` (`v2.orchestrated_commerce.agreement.created`) event notification. + """ + self._register( + "v2.orchestrated_commerce.agreement.created", + func, + ) + return func + + def on_v2_orchestrated_commerce_agreement_partially_confirmed( + self, + func: "Callable[[V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2OrchestratedCommerceAgreementPartiallyConfirmedEvent` (`v2.orchestrated_commerce.agreement.partially_confirmed`) event notification. + """ + self._register( + "v2.orchestrated_commerce.agreement.partially_confirmed", + func, + ) + return func + + def on_v2_orchestrated_commerce_agreement_terminated( + self, + func: "Callable[[V2OrchestratedCommerceAgreementTerminatedEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2OrchestratedCommerceAgreementTerminatedEvent` (`v2.orchestrated_commerce.agreement.terminated`) event notification. + """ + self._register( + "v2.orchestrated_commerce.agreement.terminated", + func, + ) + return func + # event-notification-registration-methods: The end of the section generated from our OpenAPI spec diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index cae37f31e..d8195bf6b 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -435,6 +435,10 @@ "MeterEventSession", ), "v2.billing.profile": ("stripe.v2.billing._profile", "Profile"), + "v2.commerce.product_catalog_import": ( + "stripe.v2.commerce._product_catalog_import", + "ProductCatalogImport", + ), "v2.core.account": ("stripe.v2.core._account", "Account"), "v2.core.account_link": ("stripe.v2.core._account_link", "AccountLink"), "v2.core.account_person": ( @@ -460,6 +464,15 @@ "stripe.v2.core.vault._us_bank_account", "UsBankAccount", ), + "v2.data.reporting.query_run": ( + "stripe.v2.data.reporting._query_run", + "QueryRun", + ), + "v2.extend.workflow": ("stripe.v2.extend._workflow", "Workflow"), + "v2.extend.workflow_run": ( + "stripe.v2.extend._workflow_run", + "WorkflowRun", + ), "financial_address_credit_simulation": ( "stripe.v2._financial_address_credit_simulation", "FinancialAddressCreditSimulation", @@ -468,6 +481,7 @@ "stripe.v2._financial_address_generated_microdeposits", "FinancialAddressGeneratedMicrodeposits", ), + "v2.iam.activity_log": ("stripe.v2.iam._activity_log", "ActivityLog"), "v2.money_management.adjustment": ( "stripe.v2.money_management._adjustment", "Adjustment", @@ -524,6 +538,14 @@ "stripe.v2.money_management._transaction_entry", "TransactionEntry", ), + "v2.network.business_profile": ( + "stripe.v2.network._business_profile", + "BusinessProfile", + ), + "v2.orchestrated_commerce.agreement": ( + "stripe.v2.orchestrated_commerce._agreement", + "Agreement", + ), # V2 Object classes: The end of the section generated from our OpenAPI spec } diff --git a/stripe/_v2_services.py b/stripe/_v2_services.py index ed6b5e4c6..de23db423 100644 --- a/stripe/_v2_services.py +++ b/stripe/_v2_services.py @@ -6,25 +6,48 @@ if TYPE_CHECKING: from stripe.v2._billing_service import BillingService + from stripe.v2._commerce_service import CommerceService from stripe.v2._core_service import CoreService + from stripe.v2._datum_service import DatumService + from stripe.v2._extend_service import ExtendService + from stripe.v2._iam_service import IamService from stripe.v2._money_management_service import MoneyManagementService + from stripe.v2._network_service import NetworkService + from stripe.v2._orchestrated_commerce_service import ( + OrchestratedCommerceService, + ) from stripe.v2._test_helper_service import TestHelperService _subservices = { "billing": ["stripe.v2._billing_service", "BillingService"], + "commerce": ["stripe.v2._commerce_service", "CommerceService"], "core": ["stripe.v2._core_service", "CoreService"], + "data": ["stripe.v2._datum_service", "DatumService"], + "extend": ["stripe.v2._extend_service", "ExtendService"], + "iam": ["stripe.v2._iam_service", "IamService"], "money_management": [ "stripe.v2._money_management_service", "MoneyManagementService", ], + "network": ["stripe.v2._network_service", "NetworkService"], + "orchestrated_commerce": [ + "stripe.v2._orchestrated_commerce_service", + "OrchestratedCommerceService", + ], "test_helpers": ["stripe.v2._test_helper_service", "TestHelperService"], } class V2Services(StripeService): billing: "BillingService" + commerce: "CommerceService" core: "CoreService" + data: "DatumService" + extend: "ExtendService" + iam: "IamService" money_management: "MoneyManagementService" + network: "NetworkService" + orchestrated_commerce: "OrchestratedCommerceService" test_helpers: "TestHelperService" def __init__(self, requestor): diff --git a/stripe/events/__init__.py b/stripe/events/__init__.py index 021864e71..357157b38 100644 --- a/stripe/events/__init__.py +++ b/stripe/events/__init__.py @@ -21,6 +21,22 @@ V1BillingMeterNoMeterFoundEvent as V1BillingMeterNoMeterFoundEvent, V1BillingMeterNoMeterFoundEventNotification as V1BillingMeterNoMeterFoundEventNotification, ) + from stripe.events._v2_commerce_product_catalog_imports_failed_event import ( + V2CommerceProductCatalogImportsFailedEvent as V2CommerceProductCatalogImportsFailedEvent, + V2CommerceProductCatalogImportsFailedEventNotification as V2CommerceProductCatalogImportsFailedEventNotification, + ) + from stripe.events._v2_commerce_product_catalog_imports_processing_event import ( + V2CommerceProductCatalogImportsProcessingEvent as V2CommerceProductCatalogImportsProcessingEvent, + V2CommerceProductCatalogImportsProcessingEventNotification as V2CommerceProductCatalogImportsProcessingEventNotification, + ) + from stripe.events._v2_commerce_product_catalog_imports_succeeded_event import ( + V2CommerceProductCatalogImportsSucceededEvent as V2CommerceProductCatalogImportsSucceededEvent, + V2CommerceProductCatalogImportsSucceededEventNotification as V2CommerceProductCatalogImportsSucceededEventNotification, + ) + from stripe.events._v2_commerce_product_catalog_imports_succeeded_with_errors_event import ( + V2CommerceProductCatalogImportsSucceededWithErrorsEvent as V2CommerceProductCatalogImportsSucceededWithErrorsEvent, + V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification as V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification, + ) from stripe.events._v2_core_account_closed_event import ( V2CoreAccountClosedEvent as V2CoreAccountClosedEvent, V2CoreAccountClosedEventNotification as V2CoreAccountClosedEventNotification, @@ -145,6 +161,34 @@ V2CoreHealthEventGenerationFailureResolvedEvent as V2CoreHealthEventGenerationFailureResolvedEvent, V2CoreHealthEventGenerationFailureResolvedEventNotification as V2CoreHealthEventGenerationFailureResolvedEventNotification, ) + from stripe.events._v2_data_reporting_query_run_created_event import ( + V2DataReportingQueryRunCreatedEvent as V2DataReportingQueryRunCreatedEvent, + V2DataReportingQueryRunCreatedEventNotification as V2DataReportingQueryRunCreatedEventNotification, + ) + from stripe.events._v2_data_reporting_query_run_failed_event import ( + V2DataReportingQueryRunFailedEvent as V2DataReportingQueryRunFailedEvent, + V2DataReportingQueryRunFailedEventNotification as V2DataReportingQueryRunFailedEventNotification, + ) + from stripe.events._v2_data_reporting_query_run_succeeded_event import ( + V2DataReportingQueryRunSucceededEvent as V2DataReportingQueryRunSucceededEvent, + V2DataReportingQueryRunSucceededEventNotification as V2DataReportingQueryRunSucceededEventNotification, + ) + from stripe.events._v2_data_reporting_query_run_updated_event import ( + V2DataReportingQueryRunUpdatedEvent as V2DataReportingQueryRunUpdatedEvent, + V2DataReportingQueryRunUpdatedEventNotification as V2DataReportingQueryRunUpdatedEventNotification, + ) + from stripe.events._v2_extend_workflow_run_failed_event import ( + V2ExtendWorkflowRunFailedEvent as V2ExtendWorkflowRunFailedEvent, + V2ExtendWorkflowRunFailedEventNotification as V2ExtendWorkflowRunFailedEventNotification, + ) + from stripe.events._v2_extend_workflow_run_started_event import ( + V2ExtendWorkflowRunStartedEvent as V2ExtendWorkflowRunStartedEvent, + V2ExtendWorkflowRunStartedEventNotification as V2ExtendWorkflowRunStartedEventNotification, + ) + from stripe.events._v2_extend_workflow_run_succeeded_event import ( + V2ExtendWorkflowRunSucceededEvent as V2ExtendWorkflowRunSucceededEvent, + V2ExtendWorkflowRunSucceededEventNotification as V2ExtendWorkflowRunSucceededEventNotification, + ) from stripe.events._v2_money_management_adjustment_created_event import ( V2MoneyManagementAdjustmentCreatedEvent as V2MoneyManagementAdjustmentCreatedEvent, V2MoneyManagementAdjustmentCreatedEventNotification as V2MoneyManagementAdjustmentCreatedEventNotification, @@ -289,6 +333,22 @@ V2MoneyManagementTransactionUpdatedEvent as V2MoneyManagementTransactionUpdatedEvent, V2MoneyManagementTransactionUpdatedEventNotification as V2MoneyManagementTransactionUpdatedEventNotification, ) + from stripe.events._v2_orchestrated_commerce_agreement_confirmed_event import ( + V2OrchestratedCommerceAgreementConfirmedEvent as V2OrchestratedCommerceAgreementConfirmedEvent, + V2OrchestratedCommerceAgreementConfirmedEventNotification as V2OrchestratedCommerceAgreementConfirmedEventNotification, + ) + from stripe.events._v2_orchestrated_commerce_agreement_created_event import ( + V2OrchestratedCommerceAgreementCreatedEvent as V2OrchestratedCommerceAgreementCreatedEvent, + V2OrchestratedCommerceAgreementCreatedEventNotification as V2OrchestratedCommerceAgreementCreatedEventNotification, + ) + from stripe.events._v2_orchestrated_commerce_agreement_partially_confirmed_event import ( + V2OrchestratedCommerceAgreementPartiallyConfirmedEvent as V2OrchestratedCommerceAgreementPartiallyConfirmedEvent, + V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification as V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification, + ) + from stripe.events._v2_orchestrated_commerce_agreement_terminated_event import ( + V2OrchestratedCommerceAgreementTerminatedEvent as V2OrchestratedCommerceAgreementTerminatedEvent, + V2OrchestratedCommerceAgreementTerminatedEventNotification as V2OrchestratedCommerceAgreementTerminatedEventNotification, + ) # name -> (import_target, is_submodule) _import_map = { @@ -309,6 +369,38 @@ "stripe.events._v1_billing_meter_no_meter_found_event", False, ), + "V2CommerceProductCatalogImportsFailedEvent": ( + "stripe.events._v2_commerce_product_catalog_imports_failed_event", + False, + ), + "V2CommerceProductCatalogImportsFailedEventNotification": ( + "stripe.events._v2_commerce_product_catalog_imports_failed_event", + False, + ), + "V2CommerceProductCatalogImportsProcessingEvent": ( + "stripe.events._v2_commerce_product_catalog_imports_processing_event", + False, + ), + "V2CommerceProductCatalogImportsProcessingEventNotification": ( + "stripe.events._v2_commerce_product_catalog_imports_processing_event", + False, + ), + "V2CommerceProductCatalogImportsSucceededEvent": ( + "stripe.events._v2_commerce_product_catalog_imports_succeeded_event", + False, + ), + "V2CommerceProductCatalogImportsSucceededEventNotification": ( + "stripe.events._v2_commerce_product_catalog_imports_succeeded_event", + False, + ), + "V2CommerceProductCatalogImportsSucceededWithErrorsEvent": ( + "stripe.events._v2_commerce_product_catalog_imports_succeeded_with_errors_event", + False, + ), + "V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification": ( + "stripe.events._v2_commerce_product_catalog_imports_succeeded_with_errors_event", + False, + ), "V2CoreAccountClosedEvent": ( "stripe.events._v2_core_account_closed_event", False, @@ -557,6 +649,62 @@ "stripe.events._v2_core_health_event_generation_failure_resolved_event", False, ), + "V2DataReportingQueryRunCreatedEvent": ( + "stripe.events._v2_data_reporting_query_run_created_event", + False, + ), + "V2DataReportingQueryRunCreatedEventNotification": ( + "stripe.events._v2_data_reporting_query_run_created_event", + False, + ), + "V2DataReportingQueryRunFailedEvent": ( + "stripe.events._v2_data_reporting_query_run_failed_event", + False, + ), + "V2DataReportingQueryRunFailedEventNotification": ( + "stripe.events._v2_data_reporting_query_run_failed_event", + False, + ), + "V2DataReportingQueryRunSucceededEvent": ( + "stripe.events._v2_data_reporting_query_run_succeeded_event", + False, + ), + "V2DataReportingQueryRunSucceededEventNotification": ( + "stripe.events._v2_data_reporting_query_run_succeeded_event", + False, + ), + "V2DataReportingQueryRunUpdatedEvent": ( + "stripe.events._v2_data_reporting_query_run_updated_event", + False, + ), + "V2DataReportingQueryRunUpdatedEventNotification": ( + "stripe.events._v2_data_reporting_query_run_updated_event", + False, + ), + "V2ExtendWorkflowRunFailedEvent": ( + "stripe.events._v2_extend_workflow_run_failed_event", + False, + ), + "V2ExtendWorkflowRunFailedEventNotification": ( + "stripe.events._v2_extend_workflow_run_failed_event", + False, + ), + "V2ExtendWorkflowRunStartedEvent": ( + "stripe.events._v2_extend_workflow_run_started_event", + False, + ), + "V2ExtendWorkflowRunStartedEventNotification": ( + "stripe.events._v2_extend_workflow_run_started_event", + False, + ), + "V2ExtendWorkflowRunSucceededEvent": ( + "stripe.events._v2_extend_workflow_run_succeeded_event", + False, + ), + "V2ExtendWorkflowRunSucceededEventNotification": ( + "stripe.events._v2_extend_workflow_run_succeeded_event", + False, + ), "V2MoneyManagementAdjustmentCreatedEvent": ( "stripe.events._v2_money_management_adjustment_created_event", False, @@ -845,6 +993,38 @@ "stripe.events._v2_money_management_transaction_updated_event", False, ), + "V2OrchestratedCommerceAgreementConfirmedEvent": ( + "stripe.events._v2_orchestrated_commerce_agreement_confirmed_event", + False, + ), + "V2OrchestratedCommerceAgreementConfirmedEventNotification": ( + "stripe.events._v2_orchestrated_commerce_agreement_confirmed_event", + False, + ), + "V2OrchestratedCommerceAgreementCreatedEvent": ( + "stripe.events._v2_orchestrated_commerce_agreement_created_event", + False, + ), + "V2OrchestratedCommerceAgreementCreatedEventNotification": ( + "stripe.events._v2_orchestrated_commerce_agreement_created_event", + False, + ), + "V2OrchestratedCommerceAgreementPartiallyConfirmedEvent": ( + "stripe.events._v2_orchestrated_commerce_agreement_partially_confirmed_event", + False, + ), + "V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification": ( + "stripe.events._v2_orchestrated_commerce_agreement_partially_confirmed_event", + False, + ), + "V2OrchestratedCommerceAgreementTerminatedEvent": ( + "stripe.events._v2_orchestrated_commerce_agreement_terminated_event", + False, + ), + "V2OrchestratedCommerceAgreementTerminatedEventNotification": ( + "stripe.events._v2_orchestrated_commerce_agreement_terminated_event", + False, + ), } if not TYPE_CHECKING: diff --git a/stripe/events/_event_classes.py b/stripe/events/_event_classes.py index 58729a23a..f54d6ee4e 100644 --- a/stripe/events/_event_classes.py +++ b/stripe/events/_event_classes.py @@ -13,6 +13,18 @@ from stripe.events._v1_billing_meter_no_meter_found_event import ( V1BillingMeterNoMeterFoundEventNotification, ) + from stripe.events._v2_commerce_product_catalog_imports_failed_event import ( + V2CommerceProductCatalogImportsFailedEventNotification, + ) + from stripe.events._v2_commerce_product_catalog_imports_processing_event import ( + V2CommerceProductCatalogImportsProcessingEventNotification, + ) + from stripe.events._v2_commerce_product_catalog_imports_succeeded_event import ( + V2CommerceProductCatalogImportsSucceededEventNotification, + ) + from stripe.events._v2_commerce_product_catalog_imports_succeeded_with_errors_event import ( + V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification, + ) from stripe.events._v2_core_account_closed_event import ( V2CoreAccountClosedEventNotification, ) @@ -106,6 +118,27 @@ from stripe.events._v2_core_health_event_generation_failure_resolved_event import ( V2CoreHealthEventGenerationFailureResolvedEventNotification, ) + from stripe.events._v2_data_reporting_query_run_created_event import ( + V2DataReportingQueryRunCreatedEventNotification, + ) + from stripe.events._v2_data_reporting_query_run_failed_event import ( + V2DataReportingQueryRunFailedEventNotification, + ) + from stripe.events._v2_data_reporting_query_run_succeeded_event import ( + V2DataReportingQueryRunSucceededEventNotification, + ) + from stripe.events._v2_data_reporting_query_run_updated_event import ( + V2DataReportingQueryRunUpdatedEventNotification, + ) + from stripe.events._v2_extend_workflow_run_failed_event import ( + V2ExtendWorkflowRunFailedEventNotification, + ) + from stripe.events._v2_extend_workflow_run_started_event import ( + V2ExtendWorkflowRunStartedEventNotification, + ) + from stripe.events._v2_extend_workflow_run_succeeded_event import ( + V2ExtendWorkflowRunSucceededEventNotification, + ) from stripe.events._v2_money_management_adjustment_created_event import ( V2MoneyManagementAdjustmentCreatedEventNotification, ) @@ -214,6 +247,18 @@ from stripe.events._v2_money_management_transaction_updated_event import ( V2MoneyManagementTransactionUpdatedEventNotification, ) + from stripe.events._v2_orchestrated_commerce_agreement_confirmed_event import ( + V2OrchestratedCommerceAgreementConfirmedEventNotification, + ) + from stripe.events._v2_orchestrated_commerce_agreement_created_event import ( + V2OrchestratedCommerceAgreementCreatedEventNotification, + ) + from stripe.events._v2_orchestrated_commerce_agreement_partially_confirmed_event import ( + V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification, + ) + from stripe.events._v2_orchestrated_commerce_agreement_terminated_event import ( + V2OrchestratedCommerceAgreementTerminatedEventNotification, + ) _V2_EVENT_CLASS_LOOKUP = { @@ -225,6 +270,22 @@ "stripe.events._v1_billing_meter_no_meter_found_event", "V1BillingMeterNoMeterFoundEvent", ), + "v2.commerce.product_catalog.imports.failed": ( + "stripe.events._v2_commerce_product_catalog_imports_failed_event", + "V2CommerceProductCatalogImportsFailedEvent", + ), + "v2.commerce.product_catalog.imports.processing": ( + "stripe.events._v2_commerce_product_catalog_imports_processing_event", + "V2CommerceProductCatalogImportsProcessingEvent", + ), + "v2.commerce.product_catalog.imports.succeeded": ( + "stripe.events._v2_commerce_product_catalog_imports_succeeded_event", + "V2CommerceProductCatalogImportsSucceededEvent", + ), + "v2.commerce.product_catalog.imports.succeeded_with_errors": ( + "stripe.events._v2_commerce_product_catalog_imports_succeeded_with_errors_event", + "V2CommerceProductCatalogImportsSucceededWithErrorsEvent", + ), "v2.core.account.closed": ( "stripe.events._v2_core_account_closed_event", "V2CoreAccountClosedEvent", @@ -349,6 +410,34 @@ "stripe.events._v2_core_health_event_generation_failure_resolved_event", "V2CoreHealthEventGenerationFailureResolvedEvent", ), + "v2.data.reporting.query_run.created": ( + "stripe.events._v2_data_reporting_query_run_created_event", + "V2DataReportingQueryRunCreatedEvent", + ), + "v2.data.reporting.query_run.failed": ( + "stripe.events._v2_data_reporting_query_run_failed_event", + "V2DataReportingQueryRunFailedEvent", + ), + "v2.data.reporting.query_run.succeeded": ( + "stripe.events._v2_data_reporting_query_run_succeeded_event", + "V2DataReportingQueryRunSucceededEvent", + ), + "v2.data.reporting.query_run.updated": ( + "stripe.events._v2_data_reporting_query_run_updated_event", + "V2DataReportingQueryRunUpdatedEvent", + ), + "v2.extend.workflow_run.failed": ( + "stripe.events._v2_extend_workflow_run_failed_event", + "V2ExtendWorkflowRunFailedEvent", + ), + "v2.extend.workflow_run.started": ( + "stripe.events._v2_extend_workflow_run_started_event", + "V2ExtendWorkflowRunStartedEvent", + ), + "v2.extend.workflow_run.succeeded": ( + "stripe.events._v2_extend_workflow_run_succeeded_event", + "V2ExtendWorkflowRunSucceededEvent", + ), "v2.money_management.adjustment.created": ( "stripe.events._v2_money_management_adjustment_created_event", "V2MoneyManagementAdjustmentCreatedEvent", @@ -493,6 +582,22 @@ "stripe.events._v2_money_management_transaction_updated_event", "V2MoneyManagementTransactionUpdatedEvent", ), + "v2.orchestrated_commerce.agreement.confirmed": ( + "stripe.events._v2_orchestrated_commerce_agreement_confirmed_event", + "V2OrchestratedCommerceAgreementConfirmedEvent", + ), + "v2.orchestrated_commerce.agreement.created": ( + "stripe.events._v2_orchestrated_commerce_agreement_created_event", + "V2OrchestratedCommerceAgreementCreatedEvent", + ), + "v2.orchestrated_commerce.agreement.partially_confirmed": ( + "stripe.events._v2_orchestrated_commerce_agreement_partially_confirmed_event", + "V2OrchestratedCommerceAgreementPartiallyConfirmedEvent", + ), + "v2.orchestrated_commerce.agreement.terminated": ( + "stripe.events._v2_orchestrated_commerce_agreement_terminated_event", + "V2OrchestratedCommerceAgreementTerminatedEvent", + ), } @@ -516,6 +621,22 @@ def get_v2_event_class(type_: str): "stripe.events._v1_billing_meter_no_meter_found_event", "V1BillingMeterNoMeterFoundEventNotification", ), + "v2.commerce.product_catalog.imports.failed": ( + "stripe.events._v2_commerce_product_catalog_imports_failed_event", + "V2CommerceProductCatalogImportsFailedEventNotification", + ), + "v2.commerce.product_catalog.imports.processing": ( + "stripe.events._v2_commerce_product_catalog_imports_processing_event", + "V2CommerceProductCatalogImportsProcessingEventNotification", + ), + "v2.commerce.product_catalog.imports.succeeded": ( + "stripe.events._v2_commerce_product_catalog_imports_succeeded_event", + "V2CommerceProductCatalogImportsSucceededEventNotification", + ), + "v2.commerce.product_catalog.imports.succeeded_with_errors": ( + "stripe.events._v2_commerce_product_catalog_imports_succeeded_with_errors_event", + "V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification", + ), "v2.core.account.closed": ( "stripe.events._v2_core_account_closed_event", "V2CoreAccountClosedEventNotification", @@ -640,6 +761,34 @@ def get_v2_event_class(type_: str): "stripe.events._v2_core_health_event_generation_failure_resolved_event", "V2CoreHealthEventGenerationFailureResolvedEventNotification", ), + "v2.data.reporting.query_run.created": ( + "stripe.events._v2_data_reporting_query_run_created_event", + "V2DataReportingQueryRunCreatedEventNotification", + ), + "v2.data.reporting.query_run.failed": ( + "stripe.events._v2_data_reporting_query_run_failed_event", + "V2DataReportingQueryRunFailedEventNotification", + ), + "v2.data.reporting.query_run.succeeded": ( + "stripe.events._v2_data_reporting_query_run_succeeded_event", + "V2DataReportingQueryRunSucceededEventNotification", + ), + "v2.data.reporting.query_run.updated": ( + "stripe.events._v2_data_reporting_query_run_updated_event", + "V2DataReportingQueryRunUpdatedEventNotification", + ), + "v2.extend.workflow_run.failed": ( + "stripe.events._v2_extend_workflow_run_failed_event", + "V2ExtendWorkflowRunFailedEventNotification", + ), + "v2.extend.workflow_run.started": ( + "stripe.events._v2_extend_workflow_run_started_event", + "V2ExtendWorkflowRunStartedEventNotification", + ), + "v2.extend.workflow_run.succeeded": ( + "stripe.events._v2_extend_workflow_run_succeeded_event", + "V2ExtendWorkflowRunSucceededEventNotification", + ), "v2.money_management.adjustment.created": ( "stripe.events._v2_money_management_adjustment_created_event", "V2MoneyManagementAdjustmentCreatedEventNotification", @@ -784,6 +933,22 @@ def get_v2_event_class(type_: str): "stripe.events._v2_money_management_transaction_updated_event", "V2MoneyManagementTransactionUpdatedEventNotification", ), + "v2.orchestrated_commerce.agreement.confirmed": ( + "stripe.events._v2_orchestrated_commerce_agreement_confirmed_event", + "V2OrchestratedCommerceAgreementConfirmedEventNotification", + ), + "v2.orchestrated_commerce.agreement.created": ( + "stripe.events._v2_orchestrated_commerce_agreement_created_event", + "V2OrchestratedCommerceAgreementCreatedEventNotification", + ), + "v2.orchestrated_commerce.agreement.partially_confirmed": ( + "stripe.events._v2_orchestrated_commerce_agreement_partially_confirmed_event", + "V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification", + ), + "v2.orchestrated_commerce.agreement.terminated": ( + "stripe.events._v2_orchestrated_commerce_agreement_terminated_event", + "V2OrchestratedCommerceAgreementTerminatedEventNotification", + ), } @@ -801,6 +966,10 @@ def get_v2_event_notification_class(type_: str): ALL_EVENT_NOTIFICATIONS = Union[ "V1BillingMeterErrorReportTriggeredEventNotification", "V1BillingMeterNoMeterFoundEventNotification", + "V2CommerceProductCatalogImportsFailedEventNotification", + "V2CommerceProductCatalogImportsProcessingEventNotification", + "V2CommerceProductCatalogImportsSucceededEventNotification", + "V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification", "V2CoreAccountClosedEventNotification", "V2CoreAccountCreatedEventNotification", "V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification", @@ -832,6 +1001,13 @@ def get_v2_event_notification_class(type_: str): "V2CoreBatchJobValidationFailedEventNotification", "V2CoreEventDestinationPingEventNotification", "V2CoreHealthEventGenerationFailureResolvedEventNotification", + "V2DataReportingQueryRunCreatedEventNotification", + "V2DataReportingQueryRunFailedEventNotification", + "V2DataReportingQueryRunSucceededEventNotification", + "V2DataReportingQueryRunUpdatedEventNotification", + "V2ExtendWorkflowRunFailedEventNotification", + "V2ExtendWorkflowRunStartedEventNotification", + "V2ExtendWorkflowRunSucceededEventNotification", "V2MoneyManagementAdjustmentCreatedEventNotification", "V2MoneyManagementFinancialAccountCreatedEventNotification", "V2MoneyManagementFinancialAccountUpdatedEventNotification", @@ -868,4 +1044,8 @@ def get_v2_event_notification_class(type_: str): "V2MoneyManagementReceivedDebitUpdatedEventNotification", "V2MoneyManagementTransactionCreatedEventNotification", "V2MoneyManagementTransactionUpdatedEventNotification", + "V2OrchestratedCommerceAgreementConfirmedEventNotification", + "V2OrchestratedCommerceAgreementCreatedEventNotification", + "V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification", + "V2OrchestratedCommerceAgreementTerminatedEventNotification", ] diff --git a/stripe/events/_v1_billing_meter_error_report_triggered_event.py b/stripe/events/_v1_billing_meter_error_report_triggered_event.py index 4162d1af4..1005073d5 100644 --- a/stripe/events/_v1_billing_meter_error_report_triggered_event.py +++ b/stripe/events/_v1_billing_meter_error_report_triggered_event.py @@ -107,6 +107,7 @@ class Request(StripeObject): "meter_event_dimension_count_too_high", "meter_event_invalid_value", "meter_event_no_customer_defined", + "meter_event_value_too_many_digits", "missing_dimension_payload_keys", "no_meter", "timestamp_in_future", diff --git a/stripe/events/_v1_billing_meter_no_meter_found_event.py b/stripe/events/_v1_billing_meter_no_meter_found_event.py index 32b79f0e6..9e4363394 100644 --- a/stripe/events/_v1_billing_meter_no_meter_found_event.py +++ b/stripe/events/_v1_billing_meter_no_meter_found_event.py @@ -60,6 +60,7 @@ class Request(StripeObject): "meter_event_dimension_count_too_high", "meter_event_invalid_value", "meter_event_no_customer_defined", + "meter_event_value_too_many_digits", "missing_dimension_payload_keys", "no_meter", "timestamp_in_future", diff --git a/stripe/events/_v2_commerce_product_catalog_imports_failed_event.py b/stripe/events/_v2_commerce_product_catalog_imports_failed_event.py new file mode 100644 index 000000000..94c429c27 --- /dev/null +++ b/stripe/events/_v2_commerce_product_catalog_imports_failed_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.commerce._product_catalog_import import ProductCatalogImport + + +class V2CommerceProductCatalogImportsFailedEventNotification( + EventNotification +): + LOOKUP_TYPE = "v2.commerce.product_catalog.imports.failed" + type: Literal["v2.commerce.product_catalog.imports.failed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2CommerceProductCatalogImportsFailedEvent": + return cast( + "V2CommerceProductCatalogImportsFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ProductCatalogImport": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ProductCatalogImport", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2CommerceProductCatalogImportsFailedEvent": + return cast( + "V2CommerceProductCatalogImportsFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ProductCatalogImport": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ProductCatalogImport", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2CommerceProductCatalogImportsFailedEvent(Event): + LOOKUP_TYPE = "v2.commerce.product_catalog.imports.failed" + type: Literal["v2.commerce.product_catalog.imports.failed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ProductCatalogImport": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ProductCatalogImport", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_commerce_product_catalog_imports_processing_event.py b/stripe/events/_v2_commerce_product_catalog_imports_processing_event.py new file mode 100644 index 000000000..195c2bad5 --- /dev/null +++ b/stripe/events/_v2_commerce_product_catalog_imports_processing_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.commerce._product_catalog_import import ProductCatalogImport + + +class V2CommerceProductCatalogImportsProcessingEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.commerce.product_catalog.imports.processing" + type: Literal["v2.commerce.product_catalog.imports.processing"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2CommerceProductCatalogImportsProcessingEvent": + return cast( + "V2CommerceProductCatalogImportsProcessingEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ProductCatalogImport": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ProductCatalogImport", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2CommerceProductCatalogImportsProcessingEvent": + return cast( + "V2CommerceProductCatalogImportsProcessingEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ProductCatalogImport": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ProductCatalogImport", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2CommerceProductCatalogImportsProcessingEvent(Event): + LOOKUP_TYPE = "v2.commerce.product_catalog.imports.processing" + type: Literal["v2.commerce.product_catalog.imports.processing"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ProductCatalogImport": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ProductCatalogImport", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_commerce_product_catalog_imports_succeeded_event.py b/stripe/events/_v2_commerce_product_catalog_imports_succeeded_event.py new file mode 100644 index 000000000..ddafcdcdd --- /dev/null +++ b/stripe/events/_v2_commerce_product_catalog_imports_succeeded_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.commerce._product_catalog_import import ProductCatalogImport + + +class V2CommerceProductCatalogImportsSucceededEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.commerce.product_catalog.imports.succeeded" + type: Literal["v2.commerce.product_catalog.imports.succeeded"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2CommerceProductCatalogImportsSucceededEvent": + return cast( + "V2CommerceProductCatalogImportsSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ProductCatalogImport": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ProductCatalogImport", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2CommerceProductCatalogImportsSucceededEvent": + return cast( + "V2CommerceProductCatalogImportsSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ProductCatalogImport": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ProductCatalogImport", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2CommerceProductCatalogImportsSucceededEvent(Event): + LOOKUP_TYPE = "v2.commerce.product_catalog.imports.succeeded" + type: Literal["v2.commerce.product_catalog.imports.succeeded"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ProductCatalogImport": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ProductCatalogImport", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_commerce_product_catalog_imports_succeeded_with_errors_event.py b/stripe/events/_v2_commerce_product_catalog_imports_succeeded_with_errors_event.py new file mode 100644 index 000000000..fb53a3833 --- /dev/null +++ b/stripe/events/_v2_commerce_product_catalog_imports_succeeded_with_errors_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.commerce._product_catalog_import import ProductCatalogImport + + +class V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.commerce.product_catalog.imports.succeeded_with_errors" + type: Literal["v2.commerce.product_catalog.imports.succeeded_with_errors"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2CommerceProductCatalogImportsSucceededWithErrorsEvent": + return cast( + "V2CommerceProductCatalogImportsSucceededWithErrorsEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ProductCatalogImport": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ProductCatalogImport", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2CommerceProductCatalogImportsSucceededWithErrorsEvent": + return cast( + "V2CommerceProductCatalogImportsSucceededWithErrorsEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ProductCatalogImport": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ProductCatalogImport", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2CommerceProductCatalogImportsSucceededWithErrorsEvent(Event): + LOOKUP_TYPE = "v2.commerce.product_catalog.imports.succeeded_with_errors" + type: Literal["v2.commerce.product_catalog.imports.succeeded_with_errors"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ProductCatalogImport": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ProductCatalogImport", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_data_reporting_query_run_created_event.py b/stripe/events/_v2_data_reporting_query_run_created_event.py new file mode 100644 index 000000000..392e47573 --- /dev/null +++ b/stripe/events/_v2_data_reporting_query_run_created_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.data.reporting._query_run import QueryRun + + +class V2DataReportingQueryRunCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.data.reporting.query_run.created" + type: Literal["v2.data.reporting.query_run.created"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2DataReportingQueryRunCreatedEvent": + return cast( + "V2DataReportingQueryRunCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "QueryRun": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V2DataReportingQueryRunCreatedEvent": + return cast( + "V2DataReportingQueryRunCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "QueryRun": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2DataReportingQueryRunCreatedEvent(Event): + LOOKUP_TYPE = "v2.data.reporting.query_run.created" + type: Literal["v2.data.reporting.query_run.created"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "QueryRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "QueryRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_data_reporting_query_run_failed_event.py b/stripe/events/_v2_data_reporting_query_run_failed_event.py new file mode 100644 index 000000000..7b974d96f --- /dev/null +++ b/stripe/events/_v2_data_reporting_query_run_failed_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.data.reporting._query_run import QueryRun + + +class V2DataReportingQueryRunFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.data.reporting.query_run.failed" + type: Literal["v2.data.reporting.query_run.failed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2DataReportingQueryRunFailedEvent": + return cast( + "V2DataReportingQueryRunFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "QueryRun": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V2DataReportingQueryRunFailedEvent": + return cast( + "V2DataReportingQueryRunFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "QueryRun": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2DataReportingQueryRunFailedEvent(Event): + LOOKUP_TYPE = "v2.data.reporting.query_run.failed" + type: Literal["v2.data.reporting.query_run.failed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "QueryRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "QueryRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_data_reporting_query_run_succeeded_event.py b/stripe/events/_v2_data_reporting_query_run_succeeded_event.py new file mode 100644 index 000000000..6416e8424 --- /dev/null +++ b/stripe/events/_v2_data_reporting_query_run_succeeded_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.data.reporting._query_run import QueryRun + + +class V2DataReportingQueryRunSucceededEventNotification(EventNotification): + LOOKUP_TYPE = "v2.data.reporting.query_run.succeeded" + type: Literal["v2.data.reporting.query_run.succeeded"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2DataReportingQueryRunSucceededEvent": + return cast( + "V2DataReportingQueryRunSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "QueryRun": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2DataReportingQueryRunSucceededEvent": + return cast( + "V2DataReportingQueryRunSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "QueryRun": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2DataReportingQueryRunSucceededEvent(Event): + LOOKUP_TYPE = "v2.data.reporting.query_run.succeeded" + type: Literal["v2.data.reporting.query_run.succeeded"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "QueryRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "QueryRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_data_reporting_query_run_updated_event.py b/stripe/events/_v2_data_reporting_query_run_updated_event.py new file mode 100644 index 000000000..a8b08a38c --- /dev/null +++ b/stripe/events/_v2_data_reporting_query_run_updated_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.data.reporting._query_run import QueryRun + + +class V2DataReportingQueryRunUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.data.reporting.query_run.updated" + type: Literal["v2.data.reporting.query_run.updated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2DataReportingQueryRunUpdatedEvent": + return cast( + "V2DataReportingQueryRunUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "QueryRun": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V2DataReportingQueryRunUpdatedEvent": + return cast( + "V2DataReportingQueryRunUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "QueryRun": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2DataReportingQueryRunUpdatedEvent(Event): + LOOKUP_TYPE = "v2.data.reporting.query_run.updated" + type: Literal["v2.data.reporting.query_run.updated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "QueryRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "QueryRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_extend_workflow_run_failed_event.py b/stripe/events/_v2_extend_workflow_run_failed_event.py new file mode 100644 index 000000000..f3da7af8f --- /dev/null +++ b/stripe/events/_v2_extend_workflow_run_failed_event.py @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + from stripe._stripe_client import StripeClient + from stripe.v2.extend._workflow_run import WorkflowRun + + +class V2ExtendWorkflowRunFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.extend.workflow_run.failed" + type: Literal["v2.extend.workflow_run.failed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2ExtendWorkflowRunFailedEvent": + return cast( + "V2ExtendWorkflowRunFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "WorkflowRun": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "WorkflowRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V2ExtendWorkflowRunFailedEvent": + return cast( + "V2ExtendWorkflowRunFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "WorkflowRun": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "WorkflowRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2ExtendWorkflowRunFailedEvent(Event): + LOOKUP_TYPE = "v2.extend.workflow_run.failed" + type: Literal["v2.extend.workflow_run.failed"] + + class V2ExtendWorkflowRunFailedEventData(StripeObject): + class FailureDetails(StripeObject): + error_message: Optional[str] + """ + Optional details about the failure result. + """ + + dashboard_url: str + """ + A Stripe dashboard URL with more information about the Workflow Run failure. + """ + failure_details: FailureDetails + """ + Details about the Workflow Run's transition into the FAILED state. + """ + _inner_class_types = {"failure_details": FailureDetails} + + data: V2ExtendWorkflowRunFailedEventData + """ + Data for the v2.extend.workflow_run.failed event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2ExtendWorkflowRunFailedEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2ExtendWorkflowRunFailedEvent.V2ExtendWorkflowRunFailedEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "WorkflowRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "WorkflowRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_extend_workflow_run_started_event.py b/stripe/events/_v2_extend_workflow_run_started_event.py new file mode 100644 index 000000000..7bd0ea3f7 --- /dev/null +++ b/stripe/events/_v2_extend_workflow_run_started_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.extend._workflow_run import WorkflowRun + + +class V2ExtendWorkflowRunStartedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.extend.workflow_run.started" + type: Literal["v2.extend.workflow_run.started"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2ExtendWorkflowRunStartedEvent": + return cast( + "V2ExtendWorkflowRunStartedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "WorkflowRun": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "WorkflowRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V2ExtendWorkflowRunStartedEvent": + return cast( + "V2ExtendWorkflowRunStartedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "WorkflowRun": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "WorkflowRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2ExtendWorkflowRunStartedEvent(Event): + LOOKUP_TYPE = "v2.extend.workflow_run.started" + type: Literal["v2.extend.workflow_run.started"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "WorkflowRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "WorkflowRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_extend_workflow_run_succeeded_event.py b/stripe/events/_v2_extend_workflow_run_succeeded_event.py new file mode 100644 index 000000000..27be0e345 --- /dev/null +++ b/stripe/events/_v2_extend_workflow_run_succeeded_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.extend._workflow_run import WorkflowRun + + +class V2ExtendWorkflowRunSucceededEventNotification(EventNotification): + LOOKUP_TYPE = "v2.extend.workflow_run.succeeded" + type: Literal["v2.extend.workflow_run.succeeded"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2ExtendWorkflowRunSucceededEvent": + return cast( + "V2ExtendWorkflowRunSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "WorkflowRun": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "WorkflowRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V2ExtendWorkflowRunSucceededEvent": + return cast( + "V2ExtendWorkflowRunSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "WorkflowRun": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "WorkflowRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2ExtendWorkflowRunSucceededEvent(Event): + LOOKUP_TYPE = "v2.extend.workflow_run.succeeded" + type: Literal["v2.extend.workflow_run.succeeded"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "WorkflowRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "WorkflowRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_transaction_created_event.py b/stripe/events/_v2_money_management_transaction_created_event.py index 45ff9b3c1..dac212315 100644 --- a/stripe/events/_v2_money_management_transaction_created_event.py +++ b/stripe/events/_v2_money_management_transaction_created_event.py @@ -82,6 +82,10 @@ class V2MoneyManagementTransactionCreatedEvent(Event): type: Literal["v2.money_management.transaction.created"] class V2MoneyManagementTransactionCreatedEventData(StripeObject): + treasury_transaction: Optional[str] + """ + Id of the v1 Treasury Transaction corresponding to this Transaction. + """ v1_id: Optional[str] """ Id of the v1 Transaction corresponding to this Transaction. diff --git a/stripe/events/_v2_orchestrated_commerce_agreement_confirmed_event.py b/stripe/events/_v2_orchestrated_commerce_agreement_confirmed_event.py new file mode 100644 index 000000000..22baf95bf --- /dev/null +++ b/stripe/events/_v2_orchestrated_commerce_agreement_confirmed_event.py @@ -0,0 +1,187 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + from stripe._stripe_client import StripeClient + from stripe.v2.orchestrated_commerce._agreement import Agreement + + +class V2OrchestratedCommerceAgreementConfirmedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.orchestrated_commerce.agreement.confirmed" + type: Literal["v2.orchestrated_commerce.agreement.confirmed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2OrchestratedCommerceAgreementConfirmedEvent": + return cast( + "V2OrchestratedCommerceAgreementConfirmedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Agreement": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Agreement", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2OrchestratedCommerceAgreementConfirmedEvent": + return cast( + "V2OrchestratedCommerceAgreementConfirmedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Agreement": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Agreement", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2OrchestratedCommerceAgreementConfirmedEvent(Event): + LOOKUP_TYPE = "v2.orchestrated_commerce.agreement.confirmed" + type: Literal["v2.orchestrated_commerce.agreement.confirmed"] + + class V2OrchestratedCommerceAgreementConfirmedEventData(StripeObject): + class OrchestratorDetails(StripeObject): + name: str + """ + The name of the orchestrator. This can be the name of the agent or the name of the business. + """ + network_business_profile: str + """ + The Network ID of the orchestrator. + """ + + class SellerDetails(StripeObject): + network_business_profile: str + """ + The Network ID of the seller. + """ + + orchestrator_confirmed_at: str + """ + The time at which the orchestrator confirmed the agreement. + """ + orchestrator_details: OrchestratorDetails + """ + Details about the orchestrator. + """ + seller_confirmed_at: str + """ + The time at which the seller confirmed the agreement. + """ + seller_details: SellerDetails + """ + Details about the seller. + """ + _inner_class_types = { + "orchestrator_details": OrchestratorDetails, + "seller_details": SellerDetails, + } + + data: V2OrchestratedCommerceAgreementConfirmedEventData + """ + Data for the v2.orchestrated_commerce.agreement.confirmed event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2OrchestratedCommerceAgreementConfirmedEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2OrchestratedCommerceAgreementConfirmedEvent.V2OrchestratedCommerceAgreementConfirmedEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Agreement": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Agreement", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_orchestrated_commerce_agreement_created_event.py b/stripe/events/_v2_orchestrated_commerce_agreement_created_event.py new file mode 100644 index 000000000..754e220ea --- /dev/null +++ b/stripe/events/_v2_orchestrated_commerce_agreement_created_event.py @@ -0,0 +1,187 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + from stripe._stripe_client import StripeClient + from stripe.v2.orchestrated_commerce._agreement import Agreement + + +class V2OrchestratedCommerceAgreementCreatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.orchestrated_commerce.agreement.created" + type: Literal["v2.orchestrated_commerce.agreement.created"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2OrchestratedCommerceAgreementCreatedEvent": + return cast( + "V2OrchestratedCommerceAgreementCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Agreement": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Agreement", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2OrchestratedCommerceAgreementCreatedEvent": + return cast( + "V2OrchestratedCommerceAgreementCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Agreement": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Agreement", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2OrchestratedCommerceAgreementCreatedEvent(Event): + LOOKUP_TYPE = "v2.orchestrated_commerce.agreement.created" + type: Literal["v2.orchestrated_commerce.agreement.created"] + + class V2OrchestratedCommerceAgreementCreatedEventData(StripeObject): + class OrchestratorDetails(StripeObject): + name: str + """ + The name of the orchestrator. This can be the name of the agent or the name of the business. + """ + network_business_profile: str + """ + The Network ID of the orchestrator. + """ + + class SellerDetails(StripeObject): + network_business_profile: str + """ + The Network ID of the seller. + """ + + created: str + """ + The time at which the agreement was created. + """ + initiated_by: Literal["orchestrator", "seller"] + """ + The party that initiated the agreement. + """ + orchestrator_details: OrchestratorDetails + """ + Details about the orchestrator. + """ + seller_details: SellerDetails + """ + Details about the seller. + """ + _inner_class_types = { + "orchestrator_details": OrchestratorDetails, + "seller_details": SellerDetails, + } + + data: V2OrchestratedCommerceAgreementCreatedEventData + """ + Data for the v2.orchestrated_commerce.agreement.created event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2OrchestratedCommerceAgreementCreatedEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2OrchestratedCommerceAgreementCreatedEvent.V2OrchestratedCommerceAgreementCreatedEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Agreement": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Agreement", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_orchestrated_commerce_agreement_partially_confirmed_event.py b/stripe/events/_v2_orchestrated_commerce_agreement_partially_confirmed_event.py new file mode 100644 index 000000000..01664bd41 --- /dev/null +++ b/stripe/events/_v2_orchestrated_commerce_agreement_partially_confirmed_event.py @@ -0,0 +1,191 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + from stripe._stripe_client import StripeClient + from stripe.v2.orchestrated_commerce._agreement import Agreement + + +class V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.orchestrated_commerce.agreement.partially_confirmed" + type: Literal["v2.orchestrated_commerce.agreement.partially_confirmed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2OrchestratedCommerceAgreementPartiallyConfirmedEvent": + return cast( + "V2OrchestratedCommerceAgreementPartiallyConfirmedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Agreement": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Agreement", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2OrchestratedCommerceAgreementPartiallyConfirmedEvent": + return cast( + "V2OrchestratedCommerceAgreementPartiallyConfirmedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Agreement": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Agreement", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2OrchestratedCommerceAgreementPartiallyConfirmedEvent(Event): + LOOKUP_TYPE = "v2.orchestrated_commerce.agreement.partially_confirmed" + type: Literal["v2.orchestrated_commerce.agreement.partially_confirmed"] + + class V2OrchestratedCommerceAgreementPartiallyConfirmedEventData( + StripeObject, + ): + class OrchestratorDetails(StripeObject): + name: str + """ + The name of the orchestrator. This can be the name of the agent or the name of the business. + """ + network_business_profile: str + """ + The Network ID of the orchestrator. + """ + + class SellerDetails(StripeObject): + network_business_profile: str + """ + The Network ID of the seller. + """ + + orchestrator_confirmed_at: str + """ + The time at which the orchestrator confirmed the agreement. + """ + orchestrator_details: OrchestratorDetails + """ + Details about the orchestrator. + """ + seller_confirmed_at: str + """ + The time at which the seller confirmed the agreement. + """ + seller_details: SellerDetails + """ + Details about the seller. + """ + _inner_class_types = { + "orchestrator_details": OrchestratorDetails, + "seller_details": SellerDetails, + } + + data: V2OrchestratedCommerceAgreementPartiallyConfirmedEventData + """ + Data for the v2.orchestrated_commerce.agreement.partially_confirmed event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2OrchestratedCommerceAgreementPartiallyConfirmedEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2OrchestratedCommerceAgreementPartiallyConfirmedEvent.V2OrchestratedCommerceAgreementPartiallyConfirmedEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Agreement": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Agreement", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_orchestrated_commerce_agreement_terminated_event.py b/stripe/events/_v2_orchestrated_commerce_agreement_terminated_event.py new file mode 100644 index 000000000..ac0382dce --- /dev/null +++ b/stripe/events/_v2_orchestrated_commerce_agreement_terminated_event.py @@ -0,0 +1,187 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + from stripe._stripe_client import StripeClient + from stripe.v2.orchestrated_commerce._agreement import Agreement + + +class V2OrchestratedCommerceAgreementTerminatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.orchestrated_commerce.agreement.terminated" + type: Literal["v2.orchestrated_commerce.agreement.terminated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2OrchestratedCommerceAgreementTerminatedEvent": + return cast( + "V2OrchestratedCommerceAgreementTerminatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Agreement": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Agreement", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2OrchestratedCommerceAgreementTerminatedEvent": + return cast( + "V2OrchestratedCommerceAgreementTerminatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Agreement": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Agreement", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2OrchestratedCommerceAgreementTerminatedEvent(Event): + LOOKUP_TYPE = "v2.orchestrated_commerce.agreement.terminated" + type: Literal["v2.orchestrated_commerce.agreement.terminated"] + + class V2OrchestratedCommerceAgreementTerminatedEventData(StripeObject): + class OrchestratorDetails(StripeObject): + name: str + """ + The name of the orchestrator. This can be the name of the agent or the name of the business. + """ + network_business_profile: str + """ + The Network ID of the orchestrator. + """ + + class SellerDetails(StripeObject): + network_business_profile: str + """ + The Network ID of the seller. + """ + + orchestrator_details: OrchestratorDetails + """ + Details about the orchestrator. + """ + seller_details: SellerDetails + """ + Details about the seller. + """ + terminated_at: str + """ + The time at which the agreement was terminated. + """ + terminated_by: Literal["orchestrator", "seller"] + """ + The party that terminated the agreement. + """ + _inner_class_types = { + "orchestrator_details": OrchestratorDetails, + "seller_details": SellerDetails, + } + + data: V2OrchestratedCommerceAgreementTerminatedEventData + """ + Data for the v2.orchestrated_commerce.agreement.terminated event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2OrchestratedCommerceAgreementTerminatedEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2OrchestratedCommerceAgreementTerminatedEvent.V2OrchestratedCommerceAgreementTerminatedEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Agreement": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Agreement", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/params/v2/__init__.py b/stripe/params/v2/__init__.py index e7d4a7938..4043decab 100644 --- a/stripe/params/v2/__init__.py +++ b/stripe/params/v2/__init__.py @@ -7,7 +7,11 @@ from stripe.params.v2 import ( billing as billing, core as core, + extend as extend, + iam as iam, money_management as money_management, + network as network, + orchestrated_commerce as orchestrated_commerce, test_helpers as test_helpers, ) @@ -15,7 +19,11 @@ _import_map = { "billing": ("stripe.params.v2.billing", True), "core": ("stripe.params.v2.core", True), + "extend": ("stripe.params.v2.extend", True), + "iam": ("stripe.params.v2.iam", True), "money_management": ("stripe.params.v2.money_management", True), + "network": ("stripe.params.v2.network", True), + "orchestrated_commerce": ("stripe.params.v2.orchestrated_commerce", True), "test_helpers": ("stripe.params.v2.test_helpers", True), } if not TYPE_CHECKING: diff --git a/stripe/params/v2/billing/__init__.py b/stripe/params/v2/billing/__init__.py index 548db152e..e62691214 100644 --- a/stripe/params/v2/billing/__init__.py +++ b/stripe/params/v2/billing/__init__.py @@ -74,6 +74,8 @@ CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalance as CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalance, CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer as CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer, CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer as CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer, + CollectionSettingCreateParamsPaymentMethodOptionsKonbini as CollectionSettingCreateParamsPaymentMethodOptionsKonbini, + CollectionSettingCreateParamsPaymentMethodOptionsSepaDebit as CollectionSettingCreateParamsPaymentMethodOptionsSepaDebit, CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccount as CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccount, CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections as CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections, CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters as CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters, @@ -97,6 +99,8 @@ CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalance as CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalance, CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer as CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer, CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer as CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer, + CollectionSettingUpdateParamsPaymentMethodOptionsKonbini as CollectionSettingUpdateParamsPaymentMethodOptionsKonbini, + CollectionSettingUpdateParamsPaymentMethodOptionsSepaDebit as CollectionSettingUpdateParamsPaymentMethodOptionsSepaDebit, CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccount as CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccount, CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections as CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections, CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters as CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters, @@ -323,6 +327,14 @@ "stripe.params.v2.billing._collection_setting_create_params", False, ), + "CollectionSettingCreateParamsPaymentMethodOptionsKonbini": ( + "stripe.params.v2.billing._collection_setting_create_params", + False, + ), + "CollectionSettingCreateParamsPaymentMethodOptionsSepaDebit": ( + "stripe.params.v2.billing._collection_setting_create_params", + False, + ), "CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccount": ( "stripe.params.v2.billing._collection_setting_create_params", False, @@ -391,6 +403,14 @@ "stripe.params.v2.billing._collection_setting_update_params", False, ), + "CollectionSettingUpdateParamsPaymentMethodOptionsKonbini": ( + "stripe.params.v2.billing._collection_setting_update_params", + False, + ), + "CollectionSettingUpdateParamsPaymentMethodOptionsSepaDebit": ( + "stripe.params.v2.billing._collection_setting_update_params", + False, + ), "CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccount": ( "stripe.params.v2.billing._collection_setting_update_params", False, diff --git a/stripe/params/v2/billing/_bill_setting_create_params.py b/stripe/params/v2/billing/_bill_setting_create_params.py index 809fee5b1..b6f1a4c7d 100644 --- a/stripe/params/v2/billing/_bill_setting_create_params.py +++ b/stripe/params/v2/billing/_bill_setting_create_params.py @@ -38,14 +38,14 @@ class BillSettingCreateParamsCalculation(TypedDict): class BillSettingCreateParamsCalculationTax(TypedDict): type: Literal["automatic", "manual"] """ - Determines if tax will be calculated automatically based on a PTC or manually based on rules defined by the merchant. Defaults to "manual". + Determines if tax is calculated automatically based on a PTC or manually based on rules defined by the business. Defaults to "manual". """ class BillSettingCreateParamsInvoice(TypedDict): time_until_due: NotRequired["BillSettingCreateParamsInvoiceTimeUntilDue"] """ - The amount of time until the invoice will be overdue for payment. + The amount of time until the invoice is overdue for payment. """ @@ -57,5 +57,5 @@ class BillSettingCreateParamsInvoiceTimeUntilDue(TypedDict): interval_count: int """ The number of interval units. For example, if interval=day and interval_count=30, - the invoice will be due in 30 days. + the invoice is due in 30 days. """ diff --git a/stripe/params/v2/billing/_bill_setting_update_params.py b/stripe/params/v2/billing/_bill_setting_update_params.py index 60a6cd9aa..ac65afc99 100644 --- a/stripe/params/v2/billing/_bill_setting_update_params.py +++ b/stripe/params/v2/billing/_bill_setting_update_params.py @@ -24,7 +24,7 @@ class BillSettingUpdateParams(TypedDict): """ live_version: NotRequired[str] """ - Optionally change the live version of the BillSetting. Providing `live_version = "latest"` will set the + Optionally change the live version of the BillSetting. Providing `live_version = "latest"` sets the BillSetting' `live_version` to its latest version. """ lookup_key: NotRequired[str] @@ -44,14 +44,14 @@ class BillSettingUpdateParamsCalculation(TypedDict): class BillSettingUpdateParamsCalculationTax(TypedDict): type: Literal["automatic", "manual"] """ - Determines if tax will be calculated automatically based on a PTC or manually based on rules defined by the merchant. Defaults to "manual". + Determines if tax is calculated automatically based on a PTC or manually based on rules defined by the business. Defaults to "manual". """ class BillSettingUpdateParamsInvoice(TypedDict): time_until_due: NotRequired["BillSettingUpdateParamsInvoiceTimeUntilDue"] """ - The amount of time until the invoice will be overdue for payment. + The amount of time until the invoice is overdue for payment. """ @@ -63,5 +63,5 @@ class BillSettingUpdateParamsInvoiceTimeUntilDue(TypedDict): interval_count: int """ The number of interval units. For example, if interval=day and interval_count=30, - the invoice will be due in 30 days. + the invoice is due in 30 days. """ diff --git a/stripe/params/v2/billing/_cadence_create_params.py b/stripe/params/v2/billing/_cadence_create_params.py index 8a0038501..da28dd617 100644 --- a/stripe/params/v2/billing/_cadence_create_params.py +++ b/stripe/params/v2/billing/_cadence_create_params.py @@ -37,7 +37,7 @@ class CadenceCreateParamsBillingCycle(TypedDict): """ The number of intervals (specified in the interval attribute) between cadence billings. For example, type=month and interval_count=3 bills every - 3 months. If this is not provided, it will default to 1. + 3 months. If not provided, this defaults to 1. """ month: NotRequired["CadenceCreateParamsBillingCycleMonth"] """ @@ -61,7 +61,7 @@ class CadenceCreateParamsBillingCycleDay(TypedDict): time: NotRequired["CadenceCreateParamsBillingCycleDayTime"] """ The time at which the billing cycle ends. - This field is optional, and if not provided, it will default to + This field is optional, and if not provided, it defaults to the time at which the cadence was created in UTC timezone. """ @@ -90,20 +90,20 @@ class CadenceCreateParamsBillingCycleMonth(TypedDict): """ The day to anchor the billing on for a type="month" billing cycle from 1-31. If this number is greater than the number of days in the month being - billed, this will anchor to the last day of the month. If not provided, - this will default to the day the cadence was created. + billed, this anchors to the last day of the month. If not provided, + this defaults to the day the cadence was created. """ month_of_year: NotRequired[int] """ The month to anchor the billing on for a type="month" billing cycle from - 1-12. If not provided, this will default to the month the cadence was created. + 1-12. If not provided, this defaults to the month the cadence was created. This setting can only be used for monthly billing cycles with `interval_count` of 2, 3, 4 or 6. - All occurrences will be calculated from month provided. + All occurrences are calculated from the month provided. """ time: NotRequired["CadenceCreateParamsBillingCycleMonthTime"] """ The time at which the billing cycle ends. - This field is optional, and if not provided, it will default to + This field is optional, and if not provided, it defaults to the time at which the cadence was created in UTC timezone. """ @@ -132,13 +132,13 @@ class CadenceCreateParamsBillingCycleWeek(TypedDict): """ The day of the week to bill the type=week billing cycle on. Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601 - week day numbering. If not provided, this will default to the day the + week day numbering. If not provided, this defaults to the day the cadence was created. """ time: NotRequired["CadenceCreateParamsBillingCycleWeekTime"] """ The time at which the billing cycle ends. - This field is optional, and if not provided, it will default to + This field is optional, and if not provided, it defaults to the time at which the cadence was created in UTC timezone. """ @@ -167,18 +167,18 @@ class CadenceCreateParamsBillingCycleYear(TypedDict): """ The day to anchor the billing on for a type="month" billing cycle from 1-31. If this number is greater than the number of days in the month being - billed, this will anchor to the last day of the month. If not provided, - this will default to the day the cadence was created. + billed, this anchors to the last day of the month. If not provided, + this defaults to the day the cadence was created. """ month_of_year: NotRequired[int] """ - The month to bill on from 1-12. If not provided, this will default to the + The month to bill on from 1-12. If not provided, this defaults to the month the cadence was created. """ time: NotRequired["CadenceCreateParamsBillingCycleYearTime"] """ The time at which the billing cycle ends. - This field is optional, and if not provided, it will default to + This field is optional, and if not provided, it defaults to the time at which the cadence was created in UTC timezone. """ @@ -205,7 +205,7 @@ class CadenceCreateParamsBillingCycleYearTime(TypedDict): class CadenceCreateParamsPayer(TypedDict): billing_profile: str """ - The ID of the Billing Profile object which determines how a bill will be paid. + The ID of the Billing Profile object which determines how a bill is paid. """ @@ -232,7 +232,7 @@ class CadenceCreateParamsSettingsBill(TypedDict): version: NotRequired[str] """ An optional field to specify the version of the Settings to use. - If not provided, this will always default to the live version any time the settings are used. + If not provided, this defaults to the live version any time the settings are used. """ @@ -244,5 +244,5 @@ class CadenceCreateParamsSettingsCollection(TypedDict): version: NotRequired[str] """ An optional field to specify the version of the Settings to use. - If not provided, this will always default to the live version any time the settings are used. + If not provided, this defaults to the live version any time the settings are used. """ diff --git a/stripe/params/v2/billing/_cadence_update_params.py b/stripe/params/v2/billing/_cadence_update_params.py index 291c36542..e4c91722f 100644 --- a/stripe/params/v2/billing/_cadence_update_params.py +++ b/stripe/params/v2/billing/_cadence_update_params.py @@ -29,7 +29,7 @@ class CadenceUpdateParams(TypedDict): class CadenceUpdateParamsPayer(TypedDict): billing_profile: NotRequired[str] """ - The ID of the Billing Profile object which determines how a bill will be paid. + The ID of the Billing Profile object which determines how a bill is paid. """ @@ -52,8 +52,8 @@ class CadenceUpdateParamsSettingsBill(TypedDict): version: NotRequired[str] """ An optional field to specify the version of Settings to use. - If not provided, this will always default to the `live_version` specified on the setting, any time the settings are used. - Using a specific version here will prevent the settings from updating, and is discouraged for cadences. + If not provided, this defaults to the `live_version` specified on the setting, any time the settings are used. + Using a specific version here prevents the settings from updating, and is discouraged for cadences. To clear a pinned version, set the version to null. """ @@ -66,7 +66,7 @@ class CadenceUpdateParamsSettingsCollection(TypedDict): version: NotRequired[str] """ An optional field to specify the version of Settings to use. - If not provided, this will always default to the `live_version` specified on the setting, any time the settings are used. - Using a specific version here will prevent the settings from updating, and is discouraged for cadences. + If not provided, this defaults to the `live_version` specified on the setting, any time the settings are used. + Using a specific version here prevents the settings from updating, and is discouraged for cadences. To clear a pinned version, set the version to null. """ diff --git a/stripe/params/v2/billing/_collection_setting_create_params.py b/stripe/params/v2/billing/_collection_setting_create_params.py index acb05913c..9ce026b00 100644 --- a/stripe/params/v2/billing/_collection_setting_create_params.py +++ b/stripe/params/v2/billing/_collection_setting_create_params.py @@ -1,16 +1,15 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe._stripe_object import UntypedStripeObject -from typing import Any, Dict, List +from typing import List from typing_extensions import Literal, NotRequired, TypedDict class CollectionSettingCreateParams(TypedDict): collection_method: NotRequired[Literal["automatic", "send_invoice"]] """ - Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this - bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, - Stripe will email your payer profile an invoice with payment instructions. + Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay this + bill at the end of the period using the payment method attached to the billing profile. When sending an invoice, + Stripe emails your billing profile an invoice with payment instructions. Defaults to automatic. """ display_name: NotRequired[str] @@ -82,11 +81,15 @@ class CollectionSettingCreateParamsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the Bank transfer payment method options. """ - konbini: NotRequired["Dict[str, Any]|UntypedStripeObject[Any]"] + konbini: NotRequired[ + "CollectionSettingCreateParamsPaymentMethodOptionsKonbini" + ] """ This sub-hash contains details about the Konbini payment method options. """ - sepa_debit: NotRequired["Dict[str, Any]|UntypedStripeObject[Any]"] + sepa_debit: NotRequired[ + "CollectionSettingCreateParamsPaymentMethodOptionsSepaDebit" + ] """ This sub-hash contains details about the SEPA Direct Debit payment method options. """ @@ -215,6 +218,14 @@ class CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalanceBankTransf """ +class CollectionSettingCreateParamsPaymentMethodOptionsKonbini(TypedDict): + pass + + +class CollectionSettingCreateParamsPaymentMethodOptionsSepaDebit(TypedDict): + pass + + class CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccount( TypedDict ): diff --git a/stripe/params/v2/billing/_collection_setting_update_params.py b/stripe/params/v2/billing/_collection_setting_update_params.py index 2486c3e6a..cce3b132a 100644 --- a/stripe/params/v2/billing/_collection_setting_update_params.py +++ b/stripe/params/v2/billing/_collection_setting_update_params.py @@ -1,16 +1,15 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe._stripe_object import UntypedStripeObject -from typing import Any, Dict, List +from typing import List from typing_extensions import Literal, NotRequired, TypedDict class CollectionSettingUpdateParams(TypedDict): collection_method: NotRequired[Literal["automatic", "send_invoice"]] """ - Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this - bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, - Stripe will email your payer profile an invoice with payment instructions. + Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay this + bill at the end of the period using the payment method attached to the billing profile. When sending an invoice, + Stripe emails your billing profile an invoice with payment instructions. """ display_name: NotRequired[str] """ @@ -25,7 +24,7 @@ class CollectionSettingUpdateParams(TypedDict): live_version: NotRequired[str] """ Optionally change the live version of the CollectionSetting. Billing Cadences and other objects that refer to this - CollectionSetting will use this version when no overrides are set. Providing `live_version = "latest"` will set the + CollectionSetting uses this version when no overrides are set. Providing `live_version = "latest"` sets the CollectionSetting's `live_version` to its latest version. """ lookup_key: NotRequired[str] @@ -88,11 +87,15 @@ class CollectionSettingUpdateParamsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the Bank transfer payment method options. """ - konbini: NotRequired["Dict[str, Any]|UntypedStripeObject[Any]"] + konbini: NotRequired[ + "CollectionSettingUpdateParamsPaymentMethodOptionsKonbini" + ] """ This sub-hash contains details about the Konbini payment method options. """ - sepa_debit: NotRequired["Dict[str, Any]|UntypedStripeObject[Any]"] + sepa_debit: NotRequired[ + "CollectionSettingUpdateParamsPaymentMethodOptionsSepaDebit" + ] """ This sub-hash contains details about the SEPA Direct Debit payment method options. """ @@ -221,6 +224,14 @@ class CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransf """ +class CollectionSettingUpdateParamsPaymentMethodOptionsKonbini(TypedDict): + pass + + +class CollectionSettingUpdateParamsPaymentMethodOptionsSepaDebit(TypedDict): + pass + + class CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccount( TypedDict ): diff --git a/stripe/params/v2/billing/_meter_event_adjustment_create_params.py b/stripe/params/v2/billing/_meter_event_adjustment_create_params.py index ee1dd55e6..b39cc81f2 100644 --- a/stripe/params/v2/billing/_meter_event_adjustment_create_params.py +++ b/stripe/params/v2/billing/_meter_event_adjustment_create_params.py @@ -14,12 +14,12 @@ class MeterEventAdjustmentCreateParams(TypedDict): """ type: Literal["cancel"] """ - Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + Specifies the type of cancellation. Currently supports canceling a single event. """ class MeterEventAdjustmentCreateParamsCancel(TypedDict): identifier: str """ - Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. + The identifier that was originally assigned to the meter event. You can only cancel events within 24 hours of Stripe receiving them. """ diff --git a/stripe/params/v2/billing/_profile_list_params.py b/stripe/params/v2/billing/_profile_list_params.py index 56d9c6222..3c69dad24 100644 --- a/stripe/params/v2/billing/_profile_list_params.py +++ b/stripe/params/v2/billing/_profile_list_params.py @@ -28,5 +28,5 @@ class ProfileListParams(TypedDict): status: NotRequired[Literal["active", "inactive"]] """ Filter billing profiles by status. Can be combined - with all other filters. If not provided, all billing profiles will be returned. + with all other filters. If not provided, all billing profiles are returned. """ diff --git a/stripe/params/v2/commerce/__init__.py b/stripe/params/v2/commerce/__init__.py new file mode 100644 index 000000000..69b7a23f3 --- /dev/null +++ b/stripe/params/v2/commerce/__init__.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.commerce import product_catalog as product_catalog + +# name -> (import_target, is_submodule) +_import_map = { + "product_catalog": ("stripe.params.v2.commerce.product_catalog", True), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/params/v2/commerce/product_catalog/__init__.py b/stripe/params/v2/commerce/product_catalog/__init__.py new file mode 100644 index 000000000..6f1e2545d --- /dev/null +++ b/stripe/params/v2/commerce/product_catalog/__init__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.commerce.product_catalog._import_create_params import ( + ImportCreateParams as ImportCreateParams, + ) + from stripe.params.v2.commerce.product_catalog._import_list_params import ( + ImportListParams as ImportListParams, + ) + from stripe.params.v2.commerce.product_catalog._import_retrieve_params import ( + ImportRetrieveParams as ImportRetrieveParams, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "ImportCreateParams": ( + "stripe.params.v2.commerce.product_catalog._import_create_params", + False, + ), + "ImportListParams": ( + "stripe.params.v2.commerce.product_catalog._import_list_params", + False, + ), + "ImportRetrieveParams": ( + "stripe.params.v2.commerce.product_catalog._import_retrieve_params", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/params/v2/commerce/product_catalog/_import_create_params.py b/stripe/params/v2/commerce/product_catalog/_import_create_params.py new file mode 100644 index 000000000..8549de060 --- /dev/null +++ b/stripe/params/v2/commerce/product_catalog/_import_create_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import UntypedStripeObject +from typing import Dict +from typing_extensions import Literal, TypedDict + + +class ImportCreateParams(TypedDict): + feed_type: Literal["inventory", "pricing", "product"] + """ + The type of catalog data to import. + """ + metadata: "Dict[str, str]|UntypedStripeObject[str]" + """ + Additional information about the import in a structured format. + """ + mode: Literal["replace", "upsert"] + """ + The strategy for handling existing catalog data during import. + """ diff --git a/stripe/params/v2/commerce/product_catalog/_import_list_params.py b/stripe/params/v2/commerce/product_catalog/_import_list_params.py new file mode 100644 index 000000000..fecbc23da --- /dev/null +++ b/stripe/params/v2/commerce/product_catalog/_import_list_params.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class ImportListParams(TypedDict): + created: NotRequired[str] + """ + Filter for objects created at the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_gt: NotRequired[str] + """ + Filter for objects created after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_gte: NotRequired[str] + """ + Filter for objects created on or after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_lt: NotRequired[str] + """ + Filter for objects created before the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_lte: NotRequired[str] + """ + Filter for objects created on or before the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + feed_type: NotRequired[Literal["inventory", "pricing", "product"]] + """ + Filter by the type of feed data being imported. + """ + limit: NotRequired[int] + """ + The maximum number of results per page. + """ + status: NotRequired[ + Literal[ + "awaiting_upload", + "failed", + "processing", + "succeeded", + "succeeded_with_errors", + ] + ] + """ + Filter by import status. + """ diff --git a/stripe/params/v2/commerce/product_catalog/_import_retrieve_params.py b/stripe/params/v2/commerce/product_catalog/_import_retrieve_params.py new file mode 100644 index 000000000..d49d1d1f8 --- /dev/null +++ b/stripe/params/v2/commerce/product_catalog/_import_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ImportRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/_batch_job_create_params.py b/stripe/params/v2/core/_batch_job_create_params.py index 0afc053d7..6b642227a 100644 --- a/stripe/params/v2/core/_batch_job_create_params.py +++ b/stripe/params/v2/core/_batch_job_create_params.py @@ -17,7 +17,7 @@ class BatchJobCreateParams(TypedDict): """ metadata: "Dict[str, str]|UntypedStripeObject[str]" """ - The metadata of the `BatchJob` object. + The metadata of the `batch_job`. """ notification_suppression: NotRequired[ "BatchJobCreateParamsNotificationSuppression" @@ -32,7 +32,7 @@ class BatchJobCreateParams(TypedDict): class BatchJobCreateParamsEndpoint(TypedDict): - http_method: Literal["post"] + http_method: Literal["delete", "post"] """ The HTTP method to use when calling the endpoint. """ diff --git a/stripe/params/v2/core/vault/_gb_bank_account_create_params.py b/stripe/params/v2/core/vault/_gb_bank_account_create_params.py index da013f908..943faf0a9 100644 --- a/stripe/params/v2/core/vault/_gb_bank_account_create_params.py +++ b/stripe/params/v2/core/vault/_gb_bank_account_create_params.py @@ -8,7 +8,9 @@ class GbBankAccountCreateParams(TypedDict): """ The Account Number of the bank account. """ - bank_account_type: NotRequired[Literal["checking", "savings"]] + bank_account_type: NotRequired[ + Literal["checking", "futsu", "savings", "toza"] + ] """ Closed Enum. The type of the bank account (checking or savings). """ diff --git a/stripe/params/v2/data/__init__.py b/stripe/params/v2/data/__init__.py new file mode 100644 index 000000000..622c49d3c --- /dev/null +++ b/stripe/params/v2/data/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.data import reporting as reporting + +# name -> (import_target, is_submodule) +_import_map = {"reporting": ("stripe.params.v2.data.reporting", True)} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/params/v2/data/reporting/__init__.py b/stripe/params/v2/data/reporting/__init__.py new file mode 100644 index 000000000..bdbed9507 --- /dev/null +++ b/stripe/params/v2/data/reporting/__init__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.data.reporting._query_run_create_params import ( + QueryRunCreateParams as QueryRunCreateParams, + QueryRunCreateParamsResultOptions as QueryRunCreateParamsResultOptions, + ) + from stripe.params.v2.data.reporting._query_run_retrieve_params import ( + QueryRunRetrieveParams as QueryRunRetrieveParams, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "QueryRunCreateParams": ( + "stripe.params.v2.data.reporting._query_run_create_params", + False, + ), + "QueryRunCreateParamsResultOptions": ( + "stripe.params.v2.data.reporting._query_run_create_params", + False, + ), + "QueryRunRetrieveParams": ( + "stripe.params.v2.data.reporting._query_run_retrieve_params", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/params/v2/data/reporting/_query_run_create_params.py b/stripe/params/v2/data/reporting/_query_run_create_params.py new file mode 100644 index 000000000..75d2319f8 --- /dev/null +++ b/stripe/params/v2/data/reporting/_query_run_create_params.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class QueryRunCreateParams(TypedDict): + result_options: NotRequired["QueryRunCreateParamsResultOptions"] + """ + Optional settings to customize the results of the `QueryRun`. + """ + sql: str + """ + The SQL to execute. + """ + + +class QueryRunCreateParamsResultOptions(TypedDict): + compress_file: NotRequired[bool] + """ + If set, the generated results file will be compressed into a ZIP folder. + This is useful for reducing file size and download time for large results. + """ diff --git a/stripe/params/v2/data/reporting/_query_run_retrieve_params.py b/stripe/params/v2/data/reporting/_query_run_retrieve_params.py new file mode 100644 index 000000000..663751e2b --- /dev/null +++ b/stripe/params/v2/data/reporting/_query_run_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class QueryRunRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/extend/__init__.py b/stripe/params/v2/extend/__init__.py new file mode 100644 index 000000000..767d9f05e --- /dev/null +++ b/stripe/params/v2/extend/__init__.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.extend._workflow_invoke_params import ( + WorkflowInvokeParams as WorkflowInvokeParams, + ) + from stripe.params.v2.extend._workflow_list_params import ( + WorkflowListParams as WorkflowListParams, + ) + from stripe.params.v2.extend._workflow_retrieve_params import ( + WorkflowRetrieveParams as WorkflowRetrieveParams, + ) + from stripe.params.v2.extend._workflow_run_list_params import ( + WorkflowRunListParams as WorkflowRunListParams, + ) + from stripe.params.v2.extend._workflow_run_retrieve_params import ( + WorkflowRunRetrieveParams as WorkflowRunRetrieveParams, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "WorkflowInvokeParams": ( + "stripe.params.v2.extend._workflow_invoke_params", + False, + ), + "WorkflowListParams": ( + "stripe.params.v2.extend._workflow_list_params", + False, + ), + "WorkflowRetrieveParams": ( + "stripe.params.v2.extend._workflow_retrieve_params", + False, + ), + "WorkflowRunListParams": ( + "stripe.params.v2.extend._workflow_run_list_params", + False, + ), + "WorkflowRunRetrieveParams": ( + "stripe.params.v2.extend._workflow_run_retrieve_params", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/params/v2/extend/_workflow_invoke_params.py b/stripe/params/v2/extend/_workflow_invoke_params.py new file mode 100644 index 000000000..678dac4c1 --- /dev/null +++ b/stripe/params/v2/extend/_workflow_invoke_params.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import UntypedStripeObject +from typing import Any, Dict +from typing_extensions import TypedDict + + +class WorkflowInvokeParams(TypedDict): + input_parameters: "Dict[str, Any]|UntypedStripeObject[Any]" + """ + Parameters used to invoke the Workflow Run. + """ diff --git a/stripe/params/v2/extend/_workflow_list_params.py b/stripe/params/v2/extend/_workflow_list_params.py new file mode 100644 index 000000000..2bfaad998 --- /dev/null +++ b/stripe/params/v2/extend/_workflow_list_params.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class WorkflowListParams(TypedDict): + limit: NotRequired[int] + """ + Restrict page size to no more than this number. + """ + status: NotRequired[ + List[Literal["active", "archived", "draft", "inactive"]] + ] + """ + When retrieving Workflows, include only those with the specified status values. + If not specified, all Workflows in active and inactive status are returned. + """ diff --git a/stripe/params/v2/extend/_workflow_retrieve_params.py b/stripe/params/v2/extend/_workflow_retrieve_params.py new file mode 100644 index 000000000..0d4b7887a --- /dev/null +++ b/stripe/params/v2/extend/_workflow_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class WorkflowRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/extend/_workflow_run_list_params.py b/stripe/params/v2/extend/_workflow_run_list_params.py new file mode 100644 index 000000000..61a6afd17 --- /dev/null +++ b/stripe/params/v2/extend/_workflow_run_list_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class WorkflowRunListParams(TypedDict): + limit: NotRequired[int] + """ + Restrict page size to no more than this number. + """ + status: NotRequired[List[Literal["failed", "started", "succeeded"]]] + """ + When retrieving Workflow Runs, include only those with the specified status values. If not specified, all Runs are returned. + """ + workflow: NotRequired[List[str]] + """ + When retrieving Workflow Runs, include only those associated with the Workflows specified. If not specified, all Runs are returned. + """ diff --git a/stripe/params/v2/extend/_workflow_run_retrieve_params.py b/stripe/params/v2/extend/_workflow_run_retrieve_params.py new file mode 100644 index 000000000..3d531350e --- /dev/null +++ b/stripe/params/v2/extend/_workflow_run_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class WorkflowRunRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/iam/__init__.py b/stripe/params/v2/iam/__init__.py new file mode 100644 index 000000000..2d9912b4f --- /dev/null +++ b/stripe/params/v2/iam/__init__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.iam._activity_log_list_params import ( + ActivityLogListParams as ActivityLogListParams, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "ActivityLogListParams": ( + "stripe.params.v2.iam._activity_log_list_params", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/params/v2/iam/_activity_log_list_params.py b/stripe/params/v2/iam/_activity_log_list_params.py new file mode 100644 index 000000000..92128a2ea --- /dev/null +++ b/stripe/params/v2/iam/_activity_log_list_params.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ActivityLogListParams(TypedDict): + action_groups: NotRequired[ + List[Literal["api_key", "user_invite", "user_roles"]] + ] + """ + Filter results to only include activity logs for the specified action group types. + """ + actions: NotRequired[ + List[ + Literal[ + "api_key_created", + "api_key_deleted", + "api_key_updated", + "api_key_viewed", + "user_invite_accepted", + "user_invite_created", + "user_invite_deleted", + "user_roles_deleted", + "user_roles_updated", + ] + ] + ] + """ + Filter results to only include activity logs for the specified action types. + """ + limit: NotRequired[int] + """ + Maximum number of results to return per page. + """ diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py index 2535e2cc1..f5178ae85 100644 --- a/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py +++ b/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py @@ -45,7 +45,9 @@ class OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount(TypedDict): """ The account number or IBAN of the bank account. """ - bank_account_type: NotRequired[Literal["checking", "savings"]] + bank_account_type: NotRequired[ + Literal["checking", "futsu", "savings", "toza"] + ] """ Closed Enum. The type of the bank account (checking or savings). """ diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py index 860c21abf..2fa84d36f 100644 --- a/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py +++ b/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py @@ -39,7 +39,9 @@ class OutboundSetupIntentUpdateParamsPayoutMethodDataBankAccount(TypedDict): """ The account number or IBAN of the bank account. """ - bank_account_type: NotRequired[Literal["checking", "savings"]] + bank_account_type: NotRequired[ + Literal["checking", "futsu", "savings", "toza"] + ] """ Closed Enum. The type of the bank account (checking or savings). """ diff --git a/stripe/params/v2/network/__init__.py b/stripe/params/v2/network/__init__.py new file mode 100644 index 000000000..d8b3e6772 --- /dev/null +++ b/stripe/params/v2/network/__init__.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.network._business_profile_me_params import ( + BusinessProfileMeParams as BusinessProfileMeParams, + ) + from stripe.params.v2.network._business_profile_retrieve_params import ( + BusinessProfileRetrieveParams as BusinessProfileRetrieveParams, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "BusinessProfileMeParams": ( + "stripe.params.v2.network._business_profile_me_params", + False, + ), + "BusinessProfileRetrieveParams": ( + "stripe.params.v2.network._business_profile_retrieve_params", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/params/v2/network/_business_profile_me_params.py b/stripe/params/v2/network/_business_profile_me_params.py new file mode 100644 index 000000000..5c77fd60e --- /dev/null +++ b/stripe/params/v2/network/_business_profile_me_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class BusinessProfileMeParams(TypedDict): + pass diff --git a/stripe/params/v2/network/_business_profile_retrieve_params.py b/stripe/params/v2/network/_business_profile_retrieve_params.py new file mode 100644 index 000000000..5698bf63b --- /dev/null +++ b/stripe/params/v2/network/_business_profile_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class BusinessProfileRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/orchestrated_commerce/__init__.py b/stripe/params/v2/orchestrated_commerce/__init__.py new file mode 100644 index 000000000..9a35ce8d0 --- /dev/null +++ b/stripe/params/v2/orchestrated_commerce/__init__.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.orchestrated_commerce._agreement_confirm_params import ( + AgreementConfirmParams as AgreementConfirmParams, + ) + from stripe.params.v2.orchestrated_commerce._agreement_create_params import ( + AgreementCreateParams as AgreementCreateParams, + ) + from stripe.params.v2.orchestrated_commerce._agreement_list_params import ( + AgreementListParams as AgreementListParams, + ) + from stripe.params.v2.orchestrated_commerce._agreement_retrieve_params import ( + AgreementRetrieveParams as AgreementRetrieveParams, + ) + from stripe.params.v2.orchestrated_commerce._agreement_terminate_params import ( + AgreementTerminateParams as AgreementTerminateParams, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "AgreementConfirmParams": ( + "stripe.params.v2.orchestrated_commerce._agreement_confirm_params", + False, + ), + "AgreementCreateParams": ( + "stripe.params.v2.orchestrated_commerce._agreement_create_params", + False, + ), + "AgreementListParams": ( + "stripe.params.v2.orchestrated_commerce._agreement_list_params", + False, + ), + "AgreementRetrieveParams": ( + "stripe.params.v2.orchestrated_commerce._agreement_retrieve_params", + False, + ), + "AgreementTerminateParams": ( + "stripe.params.v2.orchestrated_commerce._agreement_terminate_params", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/params/v2/orchestrated_commerce/_agreement_confirm_params.py b/stripe/params/v2/orchestrated_commerce/_agreement_confirm_params.py new file mode 100644 index 000000000..9a5118f6d --- /dev/null +++ b/stripe/params/v2/orchestrated_commerce/_agreement_confirm_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AgreementConfirmParams(TypedDict): + pass diff --git a/stripe/params/v2/orchestrated_commerce/_agreement_create_params.py b/stripe/params/v2/orchestrated_commerce/_agreement_create_params.py new file mode 100644 index 000000000..7a6e93b74 --- /dev/null +++ b/stripe/params/v2/orchestrated_commerce/_agreement_create_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AgreementCreateParams(TypedDict): + orchestrator: str + """ + The Network ID of the orchestrator to create an agreement with. + """ diff --git a/stripe/params/v2/orchestrated_commerce/_agreement_list_params.py b/stripe/params/v2/orchestrated_commerce/_agreement_list_params.py new file mode 100644 index 000000000..167d153a8 --- /dev/null +++ b/stripe/params/v2/orchestrated_commerce/_agreement_list_params.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class AgreementListParams(TypedDict): + limit: NotRequired[int] + """ + The limit for the number of results per page. + """ + network_business_profile: NotRequired[str] + """ + Filter list to Orchestrated Commerce Agreements with a specific counterparty. + """ diff --git a/stripe/params/v2/orchestrated_commerce/_agreement_retrieve_params.py b/stripe/params/v2/orchestrated_commerce/_agreement_retrieve_params.py new file mode 100644 index 000000000..dc2818f65 --- /dev/null +++ b/stripe/params/v2/orchestrated_commerce/_agreement_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AgreementRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/orchestrated_commerce/_agreement_terminate_params.py b/stripe/params/v2/orchestrated_commerce/_agreement_terminate_params.py new file mode 100644 index 000000000..85ebcc249 --- /dev/null +++ b/stripe/params/v2/orchestrated_commerce/_agreement_terminate_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AgreementTerminateParams(TypedDict): + pass diff --git a/stripe/v2/__init__.py b/stripe/v2/__init__.py index 7db5e2fda..fe5cdea9c 100644 --- a/stripe/v2/__init__.py +++ b/stripe/v2/__init__.py @@ -9,22 +9,36 @@ if TYPE_CHECKING: from stripe.v2 import ( billing as billing, + commerce as commerce, core as core, + data as data, + extend as extend, + iam as iam, money_management as money_management, + network as network, + orchestrated_commerce as orchestrated_commerce, test_helpers as test_helpers, ) from stripe.v2._billing_service import BillingService as BillingService + from stripe.v2._commerce_service import CommerceService as CommerceService from stripe.v2._core_service import CoreService as CoreService + from stripe.v2._datum_service import DatumService as DatumService from stripe.v2._deleted_object import DeletedObject as DeletedObject + from stripe.v2._extend_service import ExtendService as ExtendService from stripe.v2._financial_address_credit_simulation import ( FinancialAddressCreditSimulation as FinancialAddressCreditSimulation, ) from stripe.v2._financial_address_generated_microdeposits import ( FinancialAddressGeneratedMicrodeposits as FinancialAddressGeneratedMicrodeposits, ) + from stripe.v2._iam_service import IamService as IamService from stripe.v2._money_management_service import ( MoneyManagementService as MoneyManagementService, ) + from stripe.v2._network_service import NetworkService as NetworkService + from stripe.v2._orchestrated_commerce_service import ( + OrchestratedCommerceService as OrchestratedCommerceService, + ) from stripe.v2._test_helper_service import ( TestHelperService as TestHelperService, ) @@ -32,12 +46,21 @@ # name -> (import_target, is_submodule) _import_map = { "billing": ("stripe.v2.billing", True), + "commerce": ("stripe.v2.commerce", True), "core": ("stripe.v2.core", True), + "data": ("stripe.v2.data", True), + "extend": ("stripe.v2.extend", True), + "iam": ("stripe.v2.iam", True), "money_management": ("stripe.v2.money_management", True), + "network": ("stripe.v2.network", True), + "orchestrated_commerce": ("stripe.v2.orchestrated_commerce", True), "test_helpers": ("stripe.v2.test_helpers", True), "BillingService": ("stripe.v2._billing_service", False), + "CommerceService": ("stripe.v2._commerce_service", False), "CoreService": ("stripe.v2._core_service", False), + "DatumService": ("stripe.v2._datum_service", False), "DeletedObject": ("stripe.v2._deleted_object", False), + "ExtendService": ("stripe.v2._extend_service", False), "FinancialAddressCreditSimulation": ( "stripe.v2._financial_address_credit_simulation", False, @@ -46,7 +69,13 @@ "stripe.v2._financial_address_generated_microdeposits", False, ), + "IamService": ("stripe.v2._iam_service", False), "MoneyManagementService": ("stripe.v2._money_management_service", False), + "NetworkService": ("stripe.v2._network_service", False), + "OrchestratedCommerceService": ( + "stripe.v2._orchestrated_commerce_service", + False, + ), "TestHelperService": ("stripe.v2._test_helper_service", False), } if not TYPE_CHECKING: diff --git a/stripe/v2/_commerce_service.py b/stripe/v2/_commerce_service.py new file mode 100644 index 000000000..cc40db470 --- /dev/null +++ b/stripe/v2/_commerce_service.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.commerce._product_catalog_service import ( + ProductCatalogService, + ) + +_subservices = { + "product_catalog": [ + "stripe.v2.commerce._product_catalog_service", + "ProductCatalogService", + ], +} + + +class CommerceService(StripeService): + product_catalog: "ProductCatalogService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/_datum_service.py b/stripe/v2/_datum_service.py new file mode 100644 index 000000000..e654d27ed --- /dev/null +++ b/stripe/v2/_datum_service.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.data._reporting_service import ReportingService + +_subservices = { + "reporting": ["stripe.v2.data._reporting_service", "ReportingService"], +} + + +class DatumService(StripeService): + reporting: "ReportingService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/_extend_service.py b/stripe/v2/_extend_service.py new file mode 100644 index 000000000..40811697b --- /dev/null +++ b/stripe/v2/_extend_service.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.extend._workflow_run_service import WorkflowRunService + from stripe.v2.extend._workflow_service import WorkflowService + +_subservices = { + "workflows": ["stripe.v2.extend._workflow_service", "WorkflowService"], + "workflow_runs": [ + "stripe.v2.extend._workflow_run_service", + "WorkflowRunService", + ], +} + + +class ExtendService(StripeService): + workflows: "WorkflowService" + workflow_runs: "WorkflowRunService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/_iam_service.py b/stripe/v2/_iam_service.py new file mode 100644 index 000000000..9272865a0 --- /dev/null +++ b/stripe/v2/_iam_service.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.iam._activity_log_service import ActivityLogService + +_subservices = { + "activity_logs": [ + "stripe.v2.iam._activity_log_service", + "ActivityLogService", + ], +} + + +class IamService(StripeService): + activity_logs: "ActivityLogService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/_network_service.py b/stripe/v2/_network_service.py new file mode 100644 index 000000000..f36d3336b --- /dev/null +++ b/stripe/v2/_network_service.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.network._business_profile_service import ( + BusinessProfileService, + ) + +_subservices = { + "business_profiles": [ + "stripe.v2.network._business_profile_service", + "BusinessProfileService", + ], +} + + +class NetworkService(StripeService): + business_profiles: "BusinessProfileService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/_orchestrated_commerce_service.py b/stripe/v2/_orchestrated_commerce_service.py new file mode 100644 index 000000000..fb845ba6a --- /dev/null +++ b/stripe/v2/_orchestrated_commerce_service.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.orchestrated_commerce._agreement_service import ( + AgreementService, + ) + +_subservices = { + "agreements": [ + "stripe.v2.orchestrated_commerce._agreement_service", + "AgreementService", + ], +} + + +class OrchestratedCommerceService(StripeService): + agreements: "AgreementService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/billing/_bill_setting.py b/stripe/v2/billing/_bill_setting.py index c48dda04e..0f3921468 100644 --- a/stripe/v2/billing/_bill_setting.py +++ b/stripe/v2/billing/_bill_setting.py @@ -18,7 +18,7 @@ class Calculation(StripeObject): class Tax(StripeObject): type: Literal["automatic", "manual"] """ - Determines if tax will be calculated automatically based on a PTC or manually based on rules defined by the merchant. Defaults to "manual". + Determines if tax is calculated automatically based on a PTC or manually based on rules defined by the business. Defaults to "manual". """ tax: Optional[Tax] @@ -36,12 +36,12 @@ class TimeUntilDue(StripeObject): interval_count: int """ The number of interval units. For example, if interval=day and interval_count=30, - the invoice will be due in 30 days. + the invoice is due in 30 days. """ time_until_due: Optional[TimeUntilDue] """ - The amount of time until the invoice will be overdue for payment. + The amount of time until the invoice is overdue for payment. """ _inner_class_types = {"time_until_due": TimeUntilDue} @@ -71,8 +71,8 @@ class TimeUntilDue(StripeObject): """ latest_version: str """ - The latest version of the current settings object. This will be - Updated every time an attribute of the settings is updated. + The latest version of the current settings object. This is + updated every time an attribute of the settings is updated. """ live_version: str """ diff --git a/stripe/v2/billing/_bill_setting_version.py b/stripe/v2/billing/_bill_setting_version.py index e0a1c3d4a..602aaf9fa 100644 --- a/stripe/v2/billing/_bill_setting_version.py +++ b/stripe/v2/billing/_bill_setting_version.py @@ -18,7 +18,7 @@ class Calculation(StripeObject): class Tax(StripeObject): type: Literal["automatic", "manual"] """ - Determines if tax will be calculated automatically based on a PTC or manually based on rules defined by the merchant. Defaults to "manual". + Determines if tax is calculated automatically based on a PTC or manually based on rules defined by the business. Defaults to "manual". """ tax: Optional[Tax] @@ -36,12 +36,12 @@ class TimeUntilDue(StripeObject): interval_count: int """ The number of interval units. For example, if interval=day and interval_count=30, - the invoice will be due in 30 days. + the invoice is due in 30 days. """ time_until_due: Optional[TimeUntilDue] """ - The amount of time until the invoice will be overdue for payment. + The amount of time until the invoice is overdue for payment. """ _inner_class_types = {"time_until_due": TimeUntilDue} diff --git a/stripe/v2/billing/_cadence.py b/stripe/v2/billing/_cadence.py index a4b90e197..743c29222 100644 --- a/stripe/v2/billing/_cadence.py +++ b/stripe/v2/billing/_cadence.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import Any, ClassVar, List, Optional +from typing import ClassVar, List, Optional from typing_extensions import Literal @@ -61,7 +61,7 @@ class Time(StripeObject): """ The day to anchor the billing on for a type="month" billing cycle from 1-31. If this number is greater than the number of days in the month being billed, - this will anchor to the last day of the month. + this anchors to the last day of the month. """ month_of_year: Optional[int] """ @@ -127,11 +127,11 @@ class Time(StripeObject): """ The day to anchor the billing on for a type="month" billing cycle from 1-31. If this number is greater than the number of days in the month being billed, - this will anchor to the last day of the month. + this anchors to the last day of the month. """ month_of_year: int """ - The month to bill on from 1-12. If not provided, this will default to the month the cadence was created. + The month to bill on from 1-12. If not provided, this defaults to the month the cadence was created. """ time: Time """ @@ -173,7 +173,7 @@ class Time(StripeObject): class Payer(StripeObject): billing_profile: str """ - The ID of the Billing Profile object which determines how a bill will be paid. + The ID of the Billing Profile object which determines how a bill is paid. """ customer: Optional[str] """ @@ -221,7 +221,7 @@ class Calculation(StripeObject): class Tax(StripeObject): type: Literal["automatic", "manual"] """ - Determines if tax will be calculated automatically based on a PTC or manually based on rules defined by the merchant. Defaults to "manual". + Determines if tax is calculated automatically based on a PTC or manually based on rules defined by the business. Defaults to "manual". """ tax: Optional[Tax] @@ -239,12 +239,12 @@ class TimeUntilDue(StripeObject): interval_count: int """ The number of interval units. For example, if interval=day and interval_count=30, - the invoice will be due in 30 days. + the invoice is due in 30 days. """ time_until_due: Optional[TimeUntilDue] """ - The amount of time until the invoice will be overdue for payment. + The amount of time until the invoice is overdue for payment. """ _inner_class_types = {"time_until_due": TimeUntilDue} @@ -388,6 +388,12 @@ class EuBankTransfer(StripeObject): """ _inner_class_types = {"bank_transfer": BankTransfer} + class Konbini(StripeObject): + pass + + class SepaDebit(StripeObject): + pass + class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): @@ -451,11 +457,11 @@ class Filters(StripeObject): """ This sub-hash contains details about the Bank transfer payment method options. """ - konbini: Optional[UntypedStripeObject[Any]] + konbini: Optional[Konbini] """ This sub-hash contains details about the Konbini payment method options. """ - sepa_debit: Optional[UntypedStripeObject[Any]] + sepa_debit: Optional[SepaDebit] """ This sub-hash contains details about the SEPA Direct Debit payment method options. """ @@ -468,14 +474,16 @@ class Filters(StripeObject): "bancontact": Bancontact, "card": Card, "customer_balance": CustomerBalance, + "konbini": Konbini, + "sepa_debit": SepaDebit, "us_bank_account": UsBankAccount, } collection_method: Literal["automatic", "send_invoice"] """ - Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this - bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, - Stripe will email your payer profile an invoice with payment instructions. + Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay this + bill at the end of the period using the payment method attached to the billing profile. When sending an invoice, + Stripe emails your billing profile an invoice with payment instructions. Defaults to automatic. """ email_delivery: EmailDelivery diff --git a/stripe/v2/billing/_collection_setting.py b/stripe/v2/billing/_collection_setting.py index 39dfb26ba..74b8fd9f9 100644 --- a/stripe/v2/billing/_collection_setting.py +++ b/stripe/v2/billing/_collection_setting.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import Any, ClassVar, List, Optional +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional from typing_extensions import Literal @@ -128,6 +128,12 @@ class EuBankTransfer(StripeObject): """ _inner_class_types = {"bank_transfer": BankTransfer} + class Konbini(StripeObject): + pass + + class SepaDebit(StripeObject): + pass + class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): @@ -189,11 +195,11 @@ class Filters(StripeObject): """ This sub-hash contains details about the Bank transfer payment method options. """ - konbini: Optional[UntypedStripeObject[Any]] + konbini: Optional[Konbini] """ This sub-hash contains details about the Konbini payment method options. """ - sepa_debit: Optional[UntypedStripeObject[Any]] + sepa_debit: Optional[SepaDebit] """ This sub-hash contains details about the SEPA Direct Debit payment method options. """ @@ -206,14 +212,16 @@ class Filters(StripeObject): "bancontact": Bancontact, "card": Card, "customer_balance": CustomerBalance, + "konbini": Konbini, + "sepa_debit": SepaDebit, "us_bank_account": UsBankAccount, } collection_method: Optional[Literal["automatic", "send_invoice"]] """ - Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this - bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, - Stripe will email your payer profile an invoice with payment instructions. + Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay this + bill at the end of the period using the payment method attached to the billing profile. When sending an invoice, + Stripe emails your billing profile an invoice with payment instructions. Defaults to automatic. """ created: str @@ -234,8 +242,8 @@ class Filters(StripeObject): """ latest_version: str """ - The latest version of the current settings object. This will be - Updated every time an attribute of the settings is updated. + The latest version of the current settings object. This is + updated every time an attribute of the settings is updated. """ live_version: str """ diff --git a/stripe/v2/billing/_collection_setting_version.py b/stripe/v2/billing/_collection_setting_version.py index 194a54b94..1b9e9efe2 100644 --- a/stripe/v2/billing/_collection_setting_version.py +++ b/stripe/v2/billing/_collection_setting_version.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import Any, ClassVar, List, Optional +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional from typing_extensions import Literal @@ -128,6 +128,12 @@ class EuBankTransfer(StripeObject): """ _inner_class_types = {"bank_transfer": BankTransfer} + class Konbini(StripeObject): + pass + + class SepaDebit(StripeObject): + pass + class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): @@ -189,11 +195,11 @@ class Filters(StripeObject): """ This sub-hash contains details about the Bank transfer payment method options. """ - konbini: Optional[UntypedStripeObject[Any]] + konbini: Optional[Konbini] """ This sub-hash contains details about the Konbini payment method options. """ - sepa_debit: Optional[UntypedStripeObject[Any]] + sepa_debit: Optional[SepaDebit] """ This sub-hash contains details about the SEPA Direct Debit payment method options. """ @@ -206,14 +212,16 @@ class Filters(StripeObject): "bancontact": Bancontact, "card": Card, "customer_balance": CustomerBalance, + "konbini": Konbini, + "sepa_debit": SepaDebit, "us_bank_account": UsBankAccount, } collection_method: Optional[Literal["automatic", "send_invoice"]] """ - Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this - bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, - Stripe will email your payer profile an invoice with payment instructions. + Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay this + bill at the end of the period using the payment method attached to the billing profile. When sending an invoice, + Stripe emails your billing profile an invoice with payment instructions. Defaults to automatic. """ created: str diff --git a/stripe/v2/billing/_meter_event_adjustment.py b/stripe/v2/billing/_meter_event_adjustment.py index 603e75d50..a8bdf3068 100644 --- a/stripe/v2/billing/_meter_event_adjustment.py +++ b/stripe/v2/billing/_meter_event_adjustment.py @@ -17,7 +17,7 @@ class MeterEventAdjustment(StripeObject): class Cancel(StripeObject): identifier: str """ - Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. + The identifier that was originally assigned to the meter event. You can only cancel events within 24 hours of Stripe receiving them. """ cancel: Cancel @@ -34,7 +34,7 @@ class Cancel(StripeObject): """ id: str """ - The unique id of this meter event adjustment. + The unique ID of this meter event adjustment. """ livemode: bool """ @@ -50,6 +50,6 @@ class Cancel(StripeObject): """ type: Literal["cancel"] """ - Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + Open Enum. Specifies the type of cancellation. Currently supports canceling a single event. """ _inner_class_types = {"cancel": Cancel} diff --git a/stripe/v2/billing/_meter_event_session.py b/stripe/v2/billing/_meter_event_session.py index 90364bb1a..86fb237f1 100644 --- a/stripe/v2/billing/_meter_event_session.py +++ b/stripe/v2/billing/_meter_event_session.py @@ -15,7 +15,7 @@ class MeterEventSession(StripeObject): ) authentication_token: str """ - The authentication token for this session. Use this token when calling the + The authentication token for this session. Use this token when calling the high-throughput meter event API. """ created: str @@ -24,11 +24,11 @@ class MeterEventSession(StripeObject): """ expires_at: str """ - The time at which this session will expire. + The time at which this session expires. """ id: str """ - The unique id of this auth session. + The unique ID of this auth session. """ livemode: bool """ diff --git a/stripe/v2/billing/_meter_event_session_service.py b/stripe/v2/billing/_meter_event_session_service.py index 5bf06cd0b..348939f69 100644 --- a/stripe/v2/billing/_meter_event_session_service.py +++ b/stripe/v2/billing/_meter_event_session_service.py @@ -19,7 +19,7 @@ def create( options: Optional["RequestOptions"] = None, ) -> "MeterEventSession": """ - Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you will need to create a new meter event session when your token expires. + Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you need to create a new meter event session when your token expires. """ return cast( "MeterEventSession", @@ -38,7 +38,7 @@ async def create_async( options: Optional["RequestOptions"] = None, ) -> "MeterEventSession": """ - Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you will need to create a new meter event session when your token expires. + Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you need to create a new meter event session when your token expires. """ return cast( "MeterEventSession", diff --git a/stripe/v2/commerce/__init__.py b/stripe/v2/commerce/__init__.py new file mode 100644 index 000000000..fc4dea39e --- /dev/null +++ b/stripe/v2/commerce/__init__.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.commerce import product_catalog as product_catalog + from stripe.v2.commerce._product_catalog_import import ( + ProductCatalogImport as ProductCatalogImport, + ) + from stripe.v2.commerce._product_catalog_service import ( + ProductCatalogService as ProductCatalogService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "product_catalog": ("stripe.v2.commerce.product_catalog", True), + "ProductCatalogImport": ( + "stripe.v2.commerce._product_catalog_import", + False, + ), + "ProductCatalogService": ( + "stripe.v2.commerce._product_catalog_service", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/commerce/_product_catalog_import.py b/stripe/v2/commerce/_product_catalog_import.py new file mode 100644 index 000000000..e5562955f --- /dev/null +++ b/stripe/v2/commerce/_product_catalog_import.py @@ -0,0 +1,204 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject, UntypedStripeObject +from typing import ClassVar, List, Optional +from typing_extensions import Literal + + +class ProductCatalogImport(StripeObject): + """ + The product catalog import object tracks the long-running background process that handles uploading, processing and validation. + """ + + OBJECT_NAME: ClassVar[Literal["v2.commerce.product_catalog_import"]] = ( + "v2.commerce.product_catalog_import" + ) + + class StatusDetails(StripeObject): + class AwaitingUpload(StripeObject): + class UploadUrl(StripeObject): + expires_at: str + """ + The timestamp when the upload URL expires. + """ + url: str + """ + The pre-signed URL for uploading the catalog file. + """ + + upload_url: UploadUrl + """ + The pre-signed URL information for uploading the catalog file. + """ + _inner_class_types = {"upload_url": UploadUrl} + + class Failed(StripeObject): + code: Literal["file_not_found", "internal_error", "invalid_file"] + """ + The error code for this product catalog processing failure. + """ + failure_message: str + """ + A message explaining why the import failed. + """ + type: Literal["cannot_proceed", "transient_failure"] + """ + The error type for this product catalog processing failure. + """ + + class Processing(StripeObject): + error_count: int + """ + The number of records that failed to process so far. + """ + success_count: int + """ + The number of records processed so far. + """ + _field_encodings = { + "error_count": "int64_string", + "success_count": "int64_string", + } + + class Succeeded(StripeObject): + success_count: int + """ + The total number of records processed. + """ + _field_encodings = {"success_count": "int64_string"} + + class SucceededWithErrors(StripeObject): + class ErrorFile(StripeObject): + class DownloadUrl(StripeObject): + expires_at: str + """ + The timestamp when the download URL expires. + """ + url: str + """ + The pre-signed URL for downloading the error file. + """ + + content_type: str + """ + The MIME type of the error file. + """ + download_url: DownloadUrl + """ + The pre-signed URL information for downloading the error file. + """ + size: int + """ + The size of the error file in bytes. + """ + _inner_class_types = {"download_url": DownloadUrl} + _field_encodings = {"size": "int64_string"} + + class Sample(StripeObject): + error_message: str + """ + A description of what went wrong with this record. + """ + field: str + """ + The name of the field that caused the error. + """ + id: str + """ + The identifier of the record that failed to process. + """ + row: int + """ + The row number in the import file where the error occurred. + """ + _field_encodings = {"row": "int64_string"} + + error_count: int + """ + The total number of records that failed to process. + """ + error_file: ErrorFile + """ + A file containing details about all errors that occurred. + """ + samples: List[Sample] + """ + A sample of errors that occurred during processing. + """ + success_count: int + """ + The total number of records processed. + """ + _inner_class_types = {"error_file": ErrorFile, "samples": Sample} + _field_encodings = { + "error_count": "int64_string", + "success_count": "int64_string", + } + + awaiting_upload: Optional[AwaitingUpload] + """ + Details when the import is awaiting file upload. + """ + failed: Optional[Failed] + """ + Details when the import didn't complete. + """ + processing: Optional[Processing] + """ + Details when the import is processing. + """ + succeeded: Optional[Succeeded] + """ + Details when the import has succeeded. + """ + succeeded_with_errors: Optional[SucceededWithErrors] + """ + Details when the import completed but some records failed to process. + """ + _inner_class_types = { + "awaiting_upload": AwaitingUpload, + "failed": Failed, + "processing": Processing, + "succeeded": Succeeded, + "succeeded_with_errors": SucceededWithErrors, + } + + created: str + """ + The time this ProductCatalogImport was created. + """ + feed_type: Literal["inventory", "pricing", "product"] + """ + The type of feed data being imported into the product catalog. + """ + id: str + """ + The unique identifier for this ProductCatalogImport. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + metadata: UntypedStripeObject[str] + """ + Additional information about the object in a structured format. + """ + object: Literal["v2.commerce.product_catalog_import"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + status: Literal[ + "awaiting_upload", + "failed", + "processing", + "succeeded", + "succeeded_with_errors", + ] + """ + The current status of this ProductCatalogImport. + """ + status_details: Optional[StatusDetails] + """ + Details about the current import status. + """ + _inner_class_types = {"status_details": StatusDetails} diff --git a/stripe/v2/commerce/_product_catalog_service.py b/stripe/v2/commerce/_product_catalog_service.py new file mode 100644 index 000000000..9c9c4e0b9 --- /dev/null +++ b/stripe/v2/commerce/_product_catalog_service.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.commerce.product_catalog._import_service import ( + ImportService, + ) + +_subservices = { + "imports": [ + "stripe.v2.commerce.product_catalog._import_service", + "ImportService", + ], +} + + +class ProductCatalogService(StripeService): + imports: "ImportService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/commerce/product_catalog/__init__.py b/stripe/v2/commerce/product_catalog/__init__.py new file mode 100644 index 000000000..bad6e9107 --- /dev/null +++ b/stripe/v2/commerce/product_catalog/__init__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.commerce.product_catalog._import_service import ( + ImportService as ImportService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "ImportService": ( + "stripe.v2.commerce.product_catalog._import_service", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/commerce/product_catalog/_import_service.py b/stripe/v2/commerce/product_catalog/_import_service.py new file mode 100644 index 000000000..cc5f28bcd --- /dev/null +++ b/stripe/v2/commerce/product_catalog/_import_service.py @@ -0,0 +1,142 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.commerce.product_catalog._import_create_params import ( + ImportCreateParams, + ) + from stripe.params.v2.commerce.product_catalog._import_list_params import ( + ImportListParams, + ) + from stripe.params.v2.commerce.product_catalog._import_retrieve_params import ( + ImportRetrieveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.commerce._product_catalog_import import ProductCatalogImport + + +class ImportService(StripeService): + def list( + self, + params: Optional["ImportListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[ProductCatalogImport]": + """ + Returns a list of ProductCatalogImport objects. + """ + return cast( + "ListObject[ProductCatalogImport]", + self._request( + "get", + "/v2/commerce/product_catalog/imports", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["ImportListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[ProductCatalogImport]": + """ + Returns a list of ProductCatalogImport objects. + """ + return cast( + "ListObject[ProductCatalogImport]", + await self._request_async( + "get", + "/v2/commerce/product_catalog/imports", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "ImportCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "ProductCatalogImport": + """ + Creates a ProductCatalogImport. + """ + return cast( + "ProductCatalogImport", + self._request( + "post", + "/v2/commerce/product_catalog/imports", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "ImportCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "ProductCatalogImport": + """ + Creates a ProductCatalogImport. + """ + return cast( + "ProductCatalogImport", + await self._request_async( + "post", + "/v2/commerce/product_catalog/imports", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: Optional["ImportRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ProductCatalogImport": + """ + Retrieves a ProductCatalogImport by ID. + """ + return cast( + "ProductCatalogImport", + self._request( + "get", + "/v2/commerce/product_catalog/imports/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["ImportRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ProductCatalogImport": + """ + Retrieves a ProductCatalogImport by ID. + """ + return cast( + "ProductCatalogImport", + await self._request_async( + "get", + "/v2/commerce/product_catalog/imports/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index eae17fd07..5ffbc2f45 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -2446,6 +2446,7 @@ class DefaultOutboundDestination(StripeObject): "ca_bank_account", "ch_bank_account", "ci_bank_account", + "cn_bank_account", "co_bank_account", "crypto_wallet", "cr_bank_account", @@ -2478,6 +2479,7 @@ class DefaultOutboundDestination(StripeObject): "it_bank_account", "jm_bank_account", "jo_bank_account", + "jp_bank_account", "ke_bank_account", "kh_bank_account", "kw_bank_account", diff --git a/stripe/v2/core/_batch_job.py b/stripe/v2/core/_batch_job.py index b1c71dd8f..5ad626ad4 100644 --- a/stripe/v2/core/_batch_job.py +++ b/stripe/v2/core/_batch_job.py @@ -7,7 +7,7 @@ class BatchJob(StripeObject): """ - BatchJob resource. + A batch job allows you to perform an API operation on a large set of records asynchronously. """ OBJECT_NAME: ClassVar[Literal["v2.core.batch_job"]] = "v2.core.batch_job" @@ -16,7 +16,7 @@ class StatusDetails(StripeObject): class BatchFailed(StripeObject): error: str """ - Details about the `BatchJob` failure. + Details about the `batch_job` failure. """ class Canceled(StripeObject): @@ -52,7 +52,7 @@ class DownloadUrl(StripeObject): """ output_file: OutputFile """ - The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + The output file details. If the `batch_job` is canceled, this is provided only if there is already output at this point. """ success_count: int """ @@ -97,7 +97,7 @@ class DownloadUrl(StripeObject): """ output_file: OutputFile """ - The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + The output file details. If the `batch_job` is canceled, this is provided only if there is already output at this point. """ success_count: int """ @@ -173,7 +173,7 @@ class DownloadUrl(StripeObject): """ output_file: OutputFile """ - The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + The output file details. If the `batch_job` is canceled, this is provided only if there is already output at this point. """ success_count: int """ @@ -226,7 +226,7 @@ class DownloadUrl(StripeObject): """ output_file: OutputFile """ - The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + The output file details. If the `batch_job` is canceled, this is provided only if there is already output at this point. """ success_count: int """ @@ -240,35 +240,35 @@ class DownloadUrl(StripeObject): batch_failed: Optional[BatchFailed] """ - Additional details for the `BATCH_FAILED` status of the `BatchJob`. + Additional details for the `BATCH_FAILED` status of the `batch_job`. """ canceled: Optional[Canceled] """ - Additional details for the `CANCELED` status of the `BatchJob`. + Additional details for the `CANCELED` status of the `batch_job`. """ complete: Optional[Complete] """ - Additional details for the `COMPLETE` status of the `BatchJob`. + Additional details for the `COMPLETE` status of the `batch_job`. """ in_progress: Optional[InProgress] """ - Additional details for the `IN_PROGRESS` status of the `BatchJob`. + Additional details for the `IN_PROGRESS` status of the `batch_job`. """ ready_for_upload: Optional[ReadyForUpload] """ - Additional details for the `READY_FOR_UPLOAD` status of the `BatchJob`. + Additional details for the `READY_FOR_UPLOAD` status of the `batch_job`. """ timeout: Optional[Timeout] """ - Additional details for the `TIMEOUT` status of the `BatchJob`. + Additional details for the `TIMEOUT` status of the `batch_job`. """ validating: Optional[Validating] """ - Additional details for the `VALIDATING` status of the `BatchJob`. + Additional details for the `VALIDATING` status of the `batch_job`. """ validation_failed: Optional[ValidationFailed] """ - Additional details for the `VALIDATION_FAILED` status of the `BatchJob`. + Additional details for the `VALIDATION_FAILED` status of the `batch_job`. """ _inner_class_types = { "batch_failed": BatchFailed, @@ -283,11 +283,11 @@ class DownloadUrl(StripeObject): created: str """ - Timestamp at which BatchJob was created. + Timestamp at which the `batch_job` was created. """ id: str """ - Unique identifier for the BatchJob. + Unique identifier for the `batch_job`. """ livemode: bool """ @@ -295,11 +295,11 @@ class DownloadUrl(StripeObject): """ maximum_rps: int """ - The maximum rps defined for the `BatchJob`. + The maximum requests per second defined for the `batch_job`. """ metadata: UntypedStripeObject[str] """ - The metadata of the `BatchJob` object. + The metadata of the `batch_job`. """ object: Literal["v2.core.batch_job"] """ @@ -307,7 +307,7 @@ class DownloadUrl(StripeObject): """ skip_validation: bool """ - If the validation will be run previous to the execution of the `BatchJob`. + Whether validation runs before executing the `batch_job`. """ status: Literal[ "batch_failed", @@ -322,10 +322,10 @@ class DownloadUrl(StripeObject): "validation_failed", ] """ - The current status of the `BatchJob`. + The current status of the `batch_job`. """ status_details: Optional[StatusDetails] """ - Additional details about the current state of the `BatchJob`. + Additional details about the current state of the `batch_job`. """ _inner_class_types = {"status_details": StatusDetails} diff --git a/stripe/v2/core/accounts/_person_token_service.py b/stripe/v2/core/accounts/_person_token_service.py index 0868da342..66d9498e8 100644 --- a/stripe/v2/core/accounts/_person_token_service.py +++ b/stripe/v2/core/accounts/_person_token_service.py @@ -24,7 +24,8 @@ def create( options: Optional["RequestOptions"] = None, ) -> "AccountPersonToken": """ - Creates a Person Token associated with an Account. + Creates a single-use token that represents the details for a person. Use this when you create or update persons associated with an Account v2. Learn more about [account tokens](https://docs.stripe.com/connect/account-tokens). + You can only create person tokens with your application's publishable key and in live mode. You can use your application's secret key to create person tokens only in test mode. """ return cast( "AccountPersonToken", @@ -46,7 +47,8 @@ async def create_async( options: Optional["RequestOptions"] = None, ) -> "AccountPersonToken": """ - Creates a Person Token associated with an Account. + Creates a single-use token that represents the details for a person. Use this when you create or update persons associated with an Account v2. Learn more about [account tokens](https://docs.stripe.com/connect/account-tokens). + You can only create person tokens with your application's publishable key and in live mode. You can use your application's secret key to create person tokens only in test mode. """ return cast( "AccountPersonToken", diff --git a/stripe/v2/core/vault/_gb_bank_account.py b/stripe/v2/core/vault/_gb_bank_account.py index 36545b39d..ae69da68b 100644 --- a/stripe/v2/core/vault/_gb_bank_account.py +++ b/stripe/v2/core/vault/_gb_bank_account.py @@ -91,7 +91,7 @@ class Provided(StripeObject): the /archive API, and they will not be automatically archived by Stripe. Archived bank account objects cannot be used as outbound destinations and will not appear in the outbound destination list. """ - bank_account_type: Literal["checking", "savings"] + bank_account_type: Literal["checking", "futsu", "savings", "toza"] """ Closed Enum. The type of the bank account (checking or savings). """ diff --git a/stripe/v2/data/__init__.py b/stripe/v2/data/__init__.py new file mode 100644 index 000000000..6adc76009 --- /dev/null +++ b/stripe/v2/data/__init__.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.data import reporting as reporting + from stripe.v2.data._reporting_service import ( + ReportingService as ReportingService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "reporting": ("stripe.v2.data.reporting", True), + "ReportingService": ("stripe.v2.data._reporting_service", False), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/data/_reporting_service.py b/stripe/v2/data/_reporting_service.py new file mode 100644 index 000000000..3dcf06c1e --- /dev/null +++ b/stripe/v2/data/_reporting_service.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.data.reporting._query_run_service import QueryRunService + +_subservices = { + "query_runs": [ + "stripe.v2.data.reporting._query_run_service", + "QueryRunService", + ], +} + + +class ReportingService(StripeService): + query_runs: "QueryRunService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/data/reporting/__init__.py b/stripe/v2/data/reporting/__init__.py new file mode 100644 index 000000000..684b5c556 --- /dev/null +++ b/stripe/v2/data/reporting/__init__.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.data.reporting._query_run import QueryRun as QueryRun + from stripe.v2.data.reporting._query_run_service import ( + QueryRunService as QueryRunService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "QueryRun": ("stripe.v2.data.reporting._query_run", False), + "QueryRunService": ("stripe.v2.data.reporting._query_run_service", False), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/data/reporting/_query_run.py b/stripe/v2/data/reporting/_query_run.py new file mode 100644 index 000000000..859da3711 --- /dev/null +++ b/stripe/v2/data/reporting/_query_run.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject, UntypedStripeObject +from typing import ClassVar, Optional +from typing_extensions import Literal + + +class QueryRun(StripeObject): + """ + The `QueryRun` object represents an ad-hoc SQL execution. Once created, Stripe processes the query. When + the query has finished running, the object provides a reference to the results. + """ + + OBJECT_NAME: ClassVar[Literal["v2.data.reporting.query_run"]] = ( + "v2.data.reporting.query_run" + ) + + class Result(StripeObject): + class File(StripeObject): + class DownloadUrl(StripeObject): + expires_at: Optional[str] + """ + The time that the URL expires. + """ + url: str + """ + The URL that can be used for accessing the file. + """ + + content_type: Literal["csv", "zip"] + """ + The content type of the file. + """ + download_url: DownloadUrl + """ + A pre-signed URL that allows secure, time-limited access to download the file. + """ + size: int + """ + The total size of the file in bytes. + """ + _inner_class_types = {"download_url": DownloadUrl} + _field_encodings = {"size": "int64_string"} + + file: Optional[File] + """ + Contains metadata about the file produced by the `ReportRun` or `QueryRun`, including + its content type, size, and a URL to download its contents. + """ + type: Literal["file"] + """ + The type of the `ReportRun` or `QueryRun` result. + """ + _inner_class_types = {"file": File} + + class ResultOptions(StripeObject): + compress_file: Optional[bool] + """ + If set, the generated results file will be compressed into a ZIP folder. + This is useful for reducing file size and download time for large results. + """ + + class StatusDetails(StripeObject): + error_code: Optional[ + Literal["file_size_above_limit", "internal_error"] + ] + """ + Error code categorizing the reason the `QueryRun` failed. + """ + error_message: Optional[str] + """ + Error message with additional details about the failure. + """ + + created: str + """ + Time at which the object was created. + """ + id: str + """ + The unique identifier of the `QueryRun` object. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.data.reporting.query_run"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + result: Optional[Result] + """ + Details how to retrieve the results of a successfully completed `QueryRun`. + """ + result_options: Optional[ResultOptions] + """ + The options specified for customizing the output of the `QueryRun`. + """ + sql: str + """ + The SQL that was executed. + """ + status: Literal["failed", "running", "succeeded"] + """ + The current status of the `QueryRun`. + """ + status_details: UntypedStripeObject[StatusDetails] + """ + Additional details about the current state of the `QueryRun`. Populated when the `QueryRun` + is in the `failed` state, providing more information about why the query failed. + """ + _inner_class_types = { + "result": Result, + "result_options": ResultOptions, + "status_details": StatusDetails, + } diff --git a/stripe/v2/data/reporting/_query_run_service.py b/stripe/v2/data/reporting/_query_run_service.py new file mode 100644 index 000000000..99149658c --- /dev/null +++ b/stripe/v2/data/reporting/_query_run_service.py @@ -0,0 +1,102 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.data.reporting._query_run_create_params import ( + QueryRunCreateParams, + ) + from stripe.params.v2.data.reporting._query_run_retrieve_params import ( + QueryRunRetrieveParams, + ) + from stripe.v2.data.reporting._query_run import QueryRun + + +class QueryRunService(StripeService): + def create( + self, + params: "QueryRunCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "QueryRun": + """ + Creates a query run to execute ad-hoc SQL and returns a `QueryRun` object to track progress and retrieve results. + """ + return cast( + "QueryRun", + self._request( + "post", + "/v2/data/reporting/query_runs", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "QueryRunCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "QueryRun": + """ + Creates a query run to execute ad-hoc SQL and returns a `QueryRun` object to track progress and retrieve results. + """ + return cast( + "QueryRun", + await self._request_async( + "post", + "/v2/data/reporting/query_runs", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: Optional["QueryRunRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "QueryRun": + """ + Fetches the current state and details of a previously created `QueryRun`. If the `QueryRun` + has succeeded, the endpoint will provide details for how to retrieve the results. + """ + return cast( + "QueryRun", + self._request( + "get", + "/v2/data/reporting/query_runs/{id}".format( + id=sanitize_id(id) + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["QueryRunRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "QueryRun": + """ + Fetches the current state and details of a previously created `QueryRun`. If the `QueryRun` + has succeeded, the endpoint will provide details for how to retrieve the results. + """ + return cast( + "QueryRun", + await self._request_async( + "get", + "/v2/data/reporting/query_runs/{id}".format( + id=sanitize_id(id) + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/extend/__init__.py b/stripe/v2/extend/__init__.py new file mode 100644 index 000000000..ccf21fc05 --- /dev/null +++ b/stripe/v2/extend/__init__.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.extend._workflow import Workflow as Workflow + from stripe.v2.extend._workflow_run import WorkflowRun as WorkflowRun + from stripe.v2.extend._workflow_run_service import ( + WorkflowRunService as WorkflowRunService, + ) + from stripe.v2.extend._workflow_service import ( + WorkflowService as WorkflowService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "Workflow": ("stripe.v2.extend._workflow", False), + "WorkflowRun": ("stripe.v2.extend._workflow_run", False), + "WorkflowRunService": ("stripe.v2.extend._workflow_run_service", False), + "WorkflowService": ("stripe.v2.extend._workflow_service", False), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/extend/_workflow.py b/stripe/v2/extend/_workflow.py new file mode 100644 index 000000000..ad325b2ff --- /dev/null +++ b/stripe/v2/extend/_workflow.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional +from typing_extensions import Literal + + +class Workflow(StripeObject): + """ + A Stripe Workflow is a sequence of actions, like Stripe API calls, that are taken in response to an initiating trigger. + A trigger can be a Stripe API event, or a manual invocation. + """ + + OBJECT_NAME: ClassVar[Literal["v2.extend.workflow"]] = "v2.extend.workflow" + + class Trigger(StripeObject): + class EventTrigger(StripeObject): + events_from: List[str] + """ + Specifies which accounts' events will trigger this Workflow. + """ + type: str + """ + The Stripe event type that will trigger this Workflow. + """ + + class Manual(StripeObject): + pass + + event_trigger: Optional[EventTrigger] + """ + The Workflow can be launched when Stripe emits a certain event. + """ + manual: Optional[Manual] + """ + The Workflow can be launched through a direct call, using either the Dashboard or the Stripe API. + """ + type: Literal["event_trigger", "manual"] + """ + Which type of trigger this is. + """ + _inner_class_types = {"event_trigger": EventTrigger, "manual": Manual} + + created: str + """ + When the Workflow was created. + """ + id: str + """ + The unique ID of the Workflow. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.extend.workflow"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + status: Literal["active", "archived", "draft", "inactive"] + """ + Whether this Workflow is active, inactive, or in some other state. Only active Workflows may be invoked. + """ + title: str + """ + Workflow title. + """ + triggers: List[Trigger] + """ + Under what conditions will this Workflow launch. + """ + _inner_class_types = {"triggers": Trigger} diff --git a/stripe/v2/extend/_workflow_run.py b/stripe/v2/extend/_workflow_run.py new file mode 100644 index 000000000..c2e377b4d --- /dev/null +++ b/stripe/v2/extend/_workflow_run.py @@ -0,0 +1,137 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject, UntypedStripeObject +from typing import Any, ClassVar, Optional +from typing_extensions import Literal + + +class WorkflowRun(StripeObject): + """ + An execution of a Workflow in response to a triggering event. + """ + + OBJECT_NAME: ClassVar[Literal["v2.extend.workflow_run"]] = ( + "v2.extend.workflow_run" + ) + + class StatusDetails(StripeObject): + class Failed(StripeObject): + error_message: Optional[str] + """ + Optional details about the failure result. + """ + + class Started(StripeObject): + pass + + class Succeeded(StripeObject): + pass + + failed: Optional[Failed] + """ + Details about the Workflow Run's transition into the FAILED state. + """ + started: Optional[Started] + """ + Details about the Workflow Run's transition in to the STARTED state. + """ + succeeded: Optional[Succeeded] + """ + Details about the Workflow Run's transition into the SUCCEEDED state. + """ + _inner_class_types = { + "failed": Failed, + "started": Started, + "succeeded": Succeeded, + } + + class StatusTransitions(StripeObject): + failed_at: Optional[str] + """ + When the Workflow Run failed. + """ + started_at: Optional[str] + """ + When the Workflow Run was started. + """ + succeeded_at: Optional[str] + """ + When the Workflow Run succeeded. + """ + + class Trigger(StripeObject): + class EventTrigger(StripeObject): + context: str + """ + The account that generated the triggering event. + """ + id: str + """ + The Stripe event that triggered this Run. + """ + type: str + """ + The Stripe event type triggered this Run. + """ + + class Manual(StripeObject): + input_parameters: UntypedStripeObject[Any] + """ + The input parameters used when launching the Run. + """ + + event_trigger: Optional[EventTrigger] + """ + The Workflow Run was launched when Stripe emitted a certain event. + """ + manual: Optional[Manual] + """ + The Workflow Run was launched through a direct call, using either the Dashboard or the Stripe API. + """ + type: Literal["event_trigger", "manual"] + """ + Which type of trigger this is. + """ + _inner_class_types = {"event_trigger": EventTrigger, "manual": Manual} + + created: str + """ + When the Workflow Run was created. + """ + id: str + """ + The unique ID of the Workflow Run. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.extend.workflow_run"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + status: Literal["failed", "started", "succeeded"] + """ + The current Workflow Run execution status. + """ + status_details: Optional[StatusDetails] + """ + Details about the Workflow Run's status transitions. + """ + status_transitions: StatusTransitions + """ + Summary information about the Workflow Run's status transitions. + """ + trigger: Trigger + """ + A record of the trigger that launched this Workflow Run. + """ + workflow: str + """ + The Workflow this Run belongs to. + """ + _inner_class_types = { + "status_details": StatusDetails, + "status_transitions": StatusTransitions, + "trigger": Trigger, + } diff --git a/stripe/v2/extend/_workflow_run_service.py b/stripe/v2/extend/_workflow_run_service.py new file mode 100644 index 000000000..d636ea261 --- /dev/null +++ b/stripe/v2/extend/_workflow_run_service.py @@ -0,0 +1,97 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.extend._workflow_run_list_params import ( + WorkflowRunListParams, + ) + from stripe.params.v2.extend._workflow_run_retrieve_params import ( + WorkflowRunRetrieveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.extend._workflow_run import WorkflowRun + + +class WorkflowRunService(StripeService): + def list( + self, + params: Optional["WorkflowRunListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[WorkflowRun]": + """ + List all Workflow Runs. + """ + return cast( + "ListObject[WorkflowRun]", + self._request( + "get", + "/v2/extend/workflow_runs", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["WorkflowRunListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[WorkflowRun]": + """ + List all Workflow Runs. + """ + return cast( + "ListObject[WorkflowRun]", + await self._request_async( + "get", + "/v2/extend/workflow_runs", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: Optional["WorkflowRunRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "WorkflowRun": + """ + Retrieves the details of a Workflow Run by ID. + """ + return cast( + "WorkflowRun", + self._request( + "get", + "/v2/extend/workflow_runs/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["WorkflowRunRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "WorkflowRun": + """ + Retrieves the details of a Workflow Run by ID. + """ + return cast( + "WorkflowRun", + await self._request_async( + "get", + "/v2/extend/workflow_runs/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/extend/_workflow_service.py b/stripe/v2/extend/_workflow_service.py new file mode 100644 index 000000000..e95c51466 --- /dev/null +++ b/stripe/v2/extend/_workflow_service.py @@ -0,0 +1,141 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.extend._workflow_invoke_params import ( + WorkflowInvokeParams, + ) + from stripe.params.v2.extend._workflow_list_params import ( + WorkflowListParams, + ) + from stripe.params.v2.extend._workflow_retrieve_params import ( + WorkflowRetrieveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.extend._workflow import Workflow + from stripe.v2.extend._workflow_run import WorkflowRun + + +class WorkflowService(StripeService): + def list( + self, + params: Optional["WorkflowListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Workflow]": + """ + List all Workflows. + """ + return cast( + "ListObject[Workflow]", + self._request( + "get", + "/v2/extend/workflows", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["WorkflowListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Workflow]": + """ + List all Workflows. + """ + return cast( + "ListObject[Workflow]", + await self._request_async( + "get", + "/v2/extend/workflows", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: Optional["WorkflowRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Workflow": + """ + Retrieves the details of a Workflow by ID. + """ + return cast( + "Workflow", + self._request( + "get", + "/v2/extend/workflows/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["WorkflowRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Workflow": + """ + Retrieves the details of a Workflow by ID. + """ + return cast( + "Workflow", + await self._request_async( + "get", + "/v2/extend/workflows/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + def invoke( + self, + id: str, + params: "WorkflowInvokeParams", + options: Optional["RequestOptions"] = None, + ) -> "WorkflowRun": + """ + Invokes an on-demand Workflow with parameters, to launch a new Workflow Run. + """ + return cast( + "WorkflowRun", + self._request( + "post", + "/v2/extend/workflows/{id}/invoke".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def invoke_async( + self, + id: str, + params: "WorkflowInvokeParams", + options: Optional["RequestOptions"] = None, + ) -> "WorkflowRun": + """ + Invokes an on-demand Workflow with parameters, to launch a new Workflow Run. + """ + return cast( + "WorkflowRun", + await self._request_async( + "post", + "/v2/extend/workflows/{id}/invoke".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/iam/__init__.py b/stripe/v2/iam/__init__.py new file mode 100644 index 000000000..a7df58928 --- /dev/null +++ b/stripe/v2/iam/__init__.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.iam._activity_log import ActivityLog as ActivityLog + from stripe.v2.iam._activity_log_service import ( + ActivityLogService as ActivityLogService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "ActivityLog": ("stripe.v2.iam._activity_log", False), + "ActivityLogService": ("stripe.v2.iam._activity_log_service", False), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/iam/_activity_log.py b/stripe/v2/iam/_activity_log.py new file mode 100644 index 000000000..b136cd457 --- /dev/null +++ b/stripe/v2/iam/_activity_log.py @@ -0,0 +1,189 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional +from typing_extensions import Literal + + +class ActivityLog(StripeObject): + """ + An activity log records a single action performed on an account. + """ + + OBJECT_NAME: ClassVar[Literal["v2.iam.activity_log"]] = ( + "v2.iam.activity_log" + ) + + class Actor(StripeObject): + class ApiKey(StripeObject): + id: str + """ + Unique identifier of the API key. + """ + + class User(StripeObject): + email: str + """ + Email address of the user. + """ + + api_key: Optional[ApiKey] + """ + Set when the actor is an API key. + """ + type: Literal["api_key", "user"] + """ + The type of actor. + """ + user: Optional[User] + """ + Set when the actor is a user. + """ + _inner_class_types = {"api_key": ApiKey, "user": User} + + class Details(StripeObject): + class ApiKey(StripeObject): + class ManagedBy(StripeObject): + class Application(StripeObject): + id: str + """ + Identifier of the application. + """ + + application: Optional[Application] + """ + An application. + """ + type: Literal["application"] + """ + The type of entity. + """ + _inner_class_types = {"application": Application} + + created: str + """ + Timestamp when the API key was created. + """ + expires_at: Optional[str] + """ + Timestamp when the API key expires. + """ + id: str + """ + Unique identifier of the API key. + """ + ip_allowlist: List[str] + """ + List of IP addresses allowed to use this API key. + """ + managed_by: Optional[ManagedBy] + """ + Information about the entity managing this API key. + """ + name: Optional[str] + """ + Name of the API key. + """ + new_key: Optional[str] + """ + Unique identifier of the new API key, set when this key was rotated. + """ + note: Optional[str] + """ + Note or description for the API key. + """ + type: Literal["publishable_key", "secret_key"] + """ + Type of the API key. + """ + _inner_class_types = {"managed_by": ManagedBy} + + class UserInvite(StripeObject): + invited_user_email: str + """ + Email address of the invited user. + """ + roles: List[str] + """ + Roles assigned to the invited user. + """ + + class UserRoles(StripeObject): + new_roles: List[str] + """ + Roles the user has after the change. + """ + old_roles: List[str] + """ + Roles the user had before the change. + """ + user_email: str + """ + Email address of the user whose roles were changed. + """ + + api_key: Optional[ApiKey] + """ + Details of an API key action. + """ + type: Literal["api_key", "user_invite", "user_roles"] + """ + The action group type of the activity log entry. + """ + user_invite: Optional[UserInvite] + """ + Details of a user invite action. + """ + user_roles: Optional[UserRoles] + """ + Details of a user role change action. + """ + _inner_class_types = { + "api_key": ApiKey, + "user_invite": UserInvite, + "user_roles": UserRoles, + } + + actor: Actor + """ + The actor that performed the action. + """ + context: str + """ + The account on which the action was performed. + """ + created: str + """ + Timestamp when the activity log entry was created. + """ + details: Details + """ + Action-specific details of the activity log entry. + """ + id: str + """ + Unique identifier of the activity log entry. + """ + livemode: bool + """ + Whether the action was performed in live mode. + """ + object: Literal["v2.iam.activity_log"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + type: Literal[ + "api_key_created", + "api_key_deleted", + "api_key_updated", + "api_key_viewed", + "user_invite_accepted", + "user_invite_created", + "user_invite_deleted", + "user_roles_deleted", + "user_roles_updated", + ] + """ + The type of action that was performed. + """ + _inner_class_types = {"actor": Actor, "details": Details} diff --git a/stripe/v2/iam/_activity_log_service.py b/stripe/v2/iam/_activity_log_service.py new file mode 100644 index 000000000..67ab2c604 --- /dev/null +++ b/stripe/v2/iam/_activity_log_service.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.iam._activity_log_list_params import ( + ActivityLogListParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.iam._activity_log import ActivityLog + + +class ActivityLogService(StripeService): + def list( + self, + params: Optional["ActivityLogListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[ActivityLog]": + """ + List activity logs of an account. + """ + return cast( + "ListObject[ActivityLog]", + self._request( + "get", + "/v2/iam/activity_logs", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["ActivityLogListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[ActivityLog]": + """ + List activity logs of an account. + """ + return cast( + "ListObject[ActivityLog]", + await self._request_async( + "get", + "/v2/iam/activity_logs", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_inbound_transfer.py b/stripe/v2/money_management/_inbound_transfer.py index db2e8db8a..f1e3b62bf 100644 --- a/stripe/v2/money_management/_inbound_transfer.py +++ b/stripe/v2/money_management/_inbound_transfer.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject, UntypedStripeObject +from stripe._stripe_object import StripeObject from stripe.v2._amount import Amount -from typing import Any, ClassVar, List, Optional +from typing import ClassVar, List, Optional from typing_extensions import Literal @@ -60,6 +60,12 @@ class BankDebitFailed(StripeObject): Open Enum. The return reason for the failed InboundTransfer. """ + class BankDebitProcessing(StripeObject): + pass + + class BankDebitQueued(StripeObject): + pass + class BankDebitReturned(StripeObject): return_reason: Literal[ "bank_account_closed", @@ -72,15 +78,18 @@ class BankDebitReturned(StripeObject): Open Enum. The return reason for the returned InboundTransfer. """ + class BankDebitSucceeded(StripeObject): + pass + bank_debit_failed: Optional[BankDebitFailed] """ The history entry for a failed InboundTransfer. """ - bank_debit_processing: Optional[UntypedStripeObject[Any]] + bank_debit_processing: Optional[BankDebitProcessing] """ The history entry for a processing InboundTransfer. """ - bank_debit_queued: Optional[UntypedStripeObject[Any]] + bank_debit_queued: Optional[BankDebitQueued] """ The history entry for a queued InboundTransfer. """ @@ -88,7 +97,7 @@ class BankDebitReturned(StripeObject): """ The history entry for a returned InboundTransfer. """ - bank_debit_succeeded: Optional[UntypedStripeObject[Any]] + bank_debit_succeeded: Optional[BankDebitSucceeded] """ The history entry for a succeeded InboundTransfer. """ @@ -120,7 +129,10 @@ class BankDebitReturned(StripeObject): """ _inner_class_types = { "bank_debit_failed": BankDebitFailed, + "bank_debit_processing": BankDebitProcessing, + "bank_debit_queued": BankDebitQueued, "bank_debit_returned": BankDebitReturned, + "bank_debit_succeeded": BankDebitSucceeded, } amount: Amount diff --git a/stripe/v2/money_management/_outbound_transfer.py b/stripe/v2/money_management/_outbound_transfer.py index 748fdb95f..9164b7bcc 100644 --- a/stripe/v2/money_management/_outbound_transfer.py +++ b/stripe/v2/money_management/_outbound_transfer.py @@ -34,6 +34,7 @@ class From(StripeObject): class StatusDetails(StripeObject): class Failed(StripeObject): reason: Literal[ + "payout_method_amount_limit_exceeded", "payout_method_declined", "payout_method_does_not_exist", "payout_method_expired", diff --git a/stripe/v2/money_management/_payout_method.py b/stripe/v2/money_management/_payout_method.py index baf4381b3..336b31fb5 100644 --- a/stripe/v2/money_management/_payout_method.py +++ b/stripe/v2/money_management/_payout_method.py @@ -31,7 +31,7 @@ class BankAccount(StripeObject): the /archive API, and they will not be automatically archived by Stripe. Archived PayoutMethodBankAccount objects cannot be used as payout methods and will not appear in the payout method list. """ - bank_account_type: Literal["checking", "savings"] + bank_account_type: Literal["checking", "futsu", "savings", "toza"] """ The type of bank account (checking or savings). """ diff --git a/stripe/v2/money_management/_transaction.py b/stripe/v2/money_management/_transaction.py index abcd7e4ee..5005d8fd6 100644 --- a/stripe/v2/money_management/_transaction.py +++ b/stripe/v2/money_management/_transaction.py @@ -105,12 +105,17 @@ class StatusTransitions(StripeObject): "adjustment", "currency_conversion", "inbound_transfer", + "inbound_transfer_reversal", "outbound_payment", + "outbound_payment_reversal", "outbound_transfer", + "outbound_transfer_reversal", "received_credit", + "received_credit_reversal", "received_debit", - "return", + "received_debit_reversal", "stripe_fee", + "stripe_fee_tax", ] """ Open Enum. A descriptive category used to classify the Transaction. diff --git a/stripe/v2/money_management/_transaction_entry.py b/stripe/v2/money_management/_transaction_entry.py index 9ddf572ce..5f7532fe0 100644 --- a/stripe/v2/money_management/_transaction_entry.py +++ b/stripe/v2/money_management/_transaction_entry.py @@ -81,12 +81,17 @@ class Flow(StripeObject): "adjustment", "currency_conversion", "inbound_transfer", + "inbound_transfer_reversal", "outbound_payment", + "outbound_payment_reversal", "outbound_transfer", + "outbound_transfer_reversal", "received_credit", + "received_credit_reversal", "received_debit", - "return", + "received_debit_reversal", "stripe_fee", + "stripe_fee_tax", ] """ Closed Enum for now, and will be turned into an Open Enum soon. A descriptive category used to classify the Transaction. diff --git a/stripe/v2/network/__init__.py b/stripe/v2/network/__init__.py new file mode 100644 index 000000000..4ac4b5d31 --- /dev/null +++ b/stripe/v2/network/__init__.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.network._business_profile import ( + BusinessProfile as BusinessProfile, + ) + from stripe.v2.network._business_profile_service import ( + BusinessProfileService as BusinessProfileService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "BusinessProfile": ("stripe.v2.network._business_profile", False), + "BusinessProfileService": ( + "stripe.v2.network._business_profile_service", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/network/_business_profile.py b/stripe/v2/network/_business_profile.py new file mode 100644 index 000000000..e4fdaf557 --- /dev/null +++ b/stripe/v2/network/_business_profile.py @@ -0,0 +1,80 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional +from typing_extensions import Literal + + +class BusinessProfile(StripeObject): + """ + The Stripe profile represents a business' public identity on the Stripe network. + """ + + OBJECT_NAME: ClassVar[Literal["v2.network.business_profile"]] = ( + "v2.network.business_profile" + ) + + class Branding(StripeObject): + class Icon(StripeObject): + original: str + """ + The URL of the image in its original size. + """ + + class Logo(StripeObject): + original: str + """ + The URL of the image in its original size. + """ + + icon: Optional[Icon] + """ + URL of the icon for the business. The image will be square and at least 128px x 128px. + """ + logo: Optional[Logo] + """ + URL of the logo for the business. The image will be at least 128px x 128px. + """ + primary_color: Optional[str] + """ + A CSS hex color value representing the primary branding color for this business. + """ + secondary_color: Optional[str] + """ + A CSS hex color value representing the secondary branding color for this business. + """ + _inner_class_types = {"icon": Icon, "logo": Logo} + + branding: Optional[Branding] + """ + Branding data for the business. + """ + description: Optional[str] + """ + The description of the business. + """ + display_name: str + """ + The display name of the Stripe profile. + """ + id: str + """ + The ID of the Stripe business profile; also known as the Network ID. This is the ID used to identify the business on the Stripe network. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.network.business_profile"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + url: Optional[str] + """ + The URL of the business. + """ + username: str + """ + The username of the Stripe profile. + """ + _inner_class_types = {"branding": Branding} diff --git a/stripe/v2/network/_business_profile_service.py b/stripe/v2/network/_business_profile_service.py new file mode 100644 index 000000000..50b7f7f57 --- /dev/null +++ b/stripe/v2/network/_business_profile_service.py @@ -0,0 +1,100 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.network._business_profile_me_params import ( + BusinessProfileMeParams, + ) + from stripe.params.v2.network._business_profile_retrieve_params import ( + BusinessProfileRetrieveParams, + ) + from stripe.v2.network._business_profile import BusinessProfile + + +class BusinessProfileService(StripeService): + def me( + self, + params: Optional["BusinessProfileMeParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "BusinessProfile": + """ + Retrieve the Stripe profile associated with the requesting merchant and livemode. + """ + return cast( + "BusinessProfile", + self._request( + "get", + "/v2/network/business_profiles/me", + base_address="api", + params=params, + options=options, + ), + ) + + async def me_async( + self, + params: Optional["BusinessProfileMeParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "BusinessProfile": + """ + Retrieve the Stripe profile associated with the requesting merchant and livemode. + """ + return cast( + "BusinessProfile", + await self._request_async( + "get", + "/v2/network/business_profiles/me", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: Optional["BusinessProfileRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "BusinessProfile": + """ + Retrieve a Stripe profile by its Network ID. + """ + return cast( + "BusinessProfile", + self._request( + "get", + "/v2/network/business_profiles/{id}".format( + id=sanitize_id(id) + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["BusinessProfileRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "BusinessProfile": + """ + Retrieve a Stripe profile by its Network ID. + """ + return cast( + "BusinessProfile", + await self._request_async( + "get", + "/v2/network/business_profiles/{id}".format( + id=sanitize_id(id) + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/orchestrated_commerce/__init__.py b/stripe/v2/orchestrated_commerce/__init__.py new file mode 100644 index 000000000..12a9ea3f1 --- /dev/null +++ b/stripe/v2/orchestrated_commerce/__init__.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.orchestrated_commerce._agreement import ( + Agreement as Agreement, + ) + from stripe.v2.orchestrated_commerce._agreement_service import ( + AgreementService as AgreementService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "Agreement": ("stripe.v2.orchestrated_commerce._agreement", False), + "AgreementService": ( + "stripe.v2.orchestrated_commerce._agreement_service", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/orchestrated_commerce/_agreement.py b/stripe/v2/orchestrated_commerce/_agreement.py new file mode 100644 index 000000000..56f073d40 --- /dev/null +++ b/stripe/v2/orchestrated_commerce/_agreement.py @@ -0,0 +1,93 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional +from typing_extensions import Literal + + +class Agreement(StripeObject): + """ + An Orchestrated Commerce Agreement represents a mutual agreement between a seller and an orchestrator/agent on the Stripe network. + """ + + OBJECT_NAME: ClassVar[Literal["v2.orchestrated_commerce.agreement"]] = ( + "v2.orchestrated_commerce.agreement" + ) + + class OrchestratorDetails(StripeObject): + name: str + """ + The name of the orchestrator. This can be the name of the agent or the name of the business. + """ + network_business_profile: str + """ + The Network ID of the orchestrator. + """ + + class SellerDetails(StripeObject): + network_business_profile: str + """ + The Network ID of the seller. + """ + + class StatusTransitions(StripeObject): + orchestrator_confirmed_at: Optional[str] + """ + The time at which the orchestrator confirmed the agreement. + """ + seller_confirmed_at: Optional[str] + """ + The time at which the seller confirmed the agreement. + """ + terminated_at: Optional[str] + """ + The time at which the agreement was terminated. + """ + + created: str + """ + The time at which the agreement was created. + """ + id: str + """ + The unique identifier for the agreement. + """ + initiated_by: Literal["orchestrator", "seller"] + """ + The party that initiated the agreement. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.orchestrated_commerce.agreement"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + orchestrator_details: OrchestratorDetails + """ + Details about the orchestrator. + """ + seller_details: SellerDetails + """ + Details about the seller. + """ + status: Literal[ + "confirmed", "initiated", "partially_confirmed", "terminated" + ] + """ + The current status of the agreement. + """ + status_transitions: StatusTransitions + """ + Timestamps of key status transitions for the agreement. + """ + terminated_by: Optional[Literal["orchestrator", "seller"]] + """ + The party that terminated the agreement, if applicable. + """ + _inner_class_types = { + "orchestrator_details": OrchestratorDetails, + "seller_details": SellerDetails, + "status_transitions": StatusTransitions, + } diff --git a/stripe/v2/orchestrated_commerce/_agreement_service.py b/stripe/v2/orchestrated_commerce/_agreement_service.py new file mode 100644 index 000000000..f9d442497 --- /dev/null +++ b/stripe/v2/orchestrated_commerce/_agreement_service.py @@ -0,0 +1,236 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.orchestrated_commerce._agreement_confirm_params import ( + AgreementConfirmParams, + ) + from stripe.params.v2.orchestrated_commerce._agreement_create_params import ( + AgreementCreateParams, + ) + from stripe.params.v2.orchestrated_commerce._agreement_list_params import ( + AgreementListParams, + ) + from stripe.params.v2.orchestrated_commerce._agreement_retrieve_params import ( + AgreementRetrieveParams, + ) + from stripe.params.v2.orchestrated_commerce._agreement_terminate_params import ( + AgreementTerminateParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.orchestrated_commerce._agreement import Agreement + + +class AgreementService(StripeService): + def list( + self, + params: Optional["AgreementListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Agreement]": + """ + List Agreements for the profile associated with the authenticated merchant. + """ + return cast( + "ListObject[Agreement]", + self._request( + "get", + "/v2/orchestrated_commerce/agreements", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["AgreementListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Agreement]": + """ + List Agreements for the profile associated with the authenticated merchant. + """ + return cast( + "ListObject[Agreement]", + await self._request_async( + "get", + "/v2/orchestrated_commerce/agreements", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "AgreementCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "Agreement": + """ + Create a new Agreement. + """ + return cast( + "Agreement", + self._request( + "post", + "/v2/orchestrated_commerce/agreements", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "AgreementCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "Agreement": + """ + Create a new Agreement. + """ + return cast( + "Agreement", + await self._request_async( + "post", + "/v2/orchestrated_commerce/agreements", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: Optional["AgreementRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Agreement": + """ + Retrieve an Agreement by ID. + """ + return cast( + "Agreement", + self._request( + "get", + "/v2/orchestrated_commerce/agreements/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["AgreementRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Agreement": + """ + Retrieve an Agreement by ID. + """ + return cast( + "Agreement", + await self._request_async( + "get", + "/v2/orchestrated_commerce/agreements/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def confirm( + self, + id: str, + params: Optional["AgreementConfirmParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Agreement": + """ + Confirm an Agreement. + """ + return cast( + "Agreement", + self._request( + "post", + "/v2/orchestrated_commerce/agreements/{id}/confirm".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def confirm_async( + self, + id: str, + params: Optional["AgreementConfirmParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Agreement": + """ + Confirm an Agreement. + """ + return cast( + "Agreement", + await self._request_async( + "post", + "/v2/orchestrated_commerce/agreements/{id}/confirm".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def terminate( + self, + id: str, + params: Optional["AgreementTerminateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Agreement": + """ + Terminate an Agreement. + """ + return cast( + "Agreement", + self._request( + "post", + "/v2/orchestrated_commerce/agreements/{id}/terminate".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def terminate_async( + self, + id: str, + params: Optional["AgreementTerminateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Agreement": + """ + Terminate an Agreement. + """ + return cast( + "Agreement", + await self._request_async( + "post", + "/v2/orchestrated_commerce/agreements/{id}/terminate".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 760159d7e..6096f08f1 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -44241,6 +44241,74 @@ def test_v2_billing_profile_post_2_service( is_json=True, ) + def test_v2_commerce_product_catalog_import_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/commerce/product_catalog/imports", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.commerce.product_catalog.imports.list() + http_client_mock.assert_requested( + "get", + path="/v2/commerce/product_catalog/imports", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_commerce_product_catalog_import_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/commerce/product_catalog/imports", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.commerce.product_catalog.imports.create( + { + "feed_type": "pricing", + "metadata": {"key": "metadata"}, + "mode": "upsert", + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/commerce/product_catalog/imports", + query_string="", + api_base="https://api.stripe.com", + post_data='{"feed_type":"pricing","metadata":{"key":"metadata"},"mode":"upsert"}', + is_json=True, + ) + + def test_v2_commerce_product_catalog_import_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/commerce/product_catalog/imports/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.commerce.product_catalog.imports.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/commerce/product_catalog/imports/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + def test_v2_core_account_get_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -44609,7 +44677,7 @@ def test_v2_core_batch_job_post_service( client.v2.core.batch_jobs.create( { "endpoint": { - "http_method": "post", + "http_method": "delete", "path": "/v1/subscription_schedules", }, "metadata": {"key": "metadata"}, @@ -44621,7 +44689,7 @@ def test_v2_core_batch_job_post_service( path="/v2/core/batch_jobs", query_string="", api_base="https://api.stripe.com", - post_data='{"endpoint":{"http_method":"post","path":"/v1/subscription_schedules"},"metadata":{"key":"metadata"},"skip_validation":true}', + post_data='{"endpoint":{"http_method":"delete","path":"/v1/subscription_schedules"},"metadata":{"key":"metadata"},"skip_validation":true}', is_json=True, ) @@ -45171,6 +45239,185 @@ def test_v2_core_vault_us_bank_account_post_5_service( is_json=True, ) + def test_v2_data_reporting_query_run_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/data/reporting/query_runs", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.data.reporting.query_runs.create({"sql": "sql"}) + http_client_mock.assert_requested( + "post", + path="/v2/data/reporting/query_runs", + query_string="", + api_base="https://api.stripe.com", + post_data='{"sql":"sql"}', + is_json=True, + ) + + def test_v2_data_reporting_query_run_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/data/reporting/query_runs/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.data.reporting.query_runs.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/data/reporting/query_runs/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_extend_workflow_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/extend/workflows", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.extend.workflows.list() + http_client_mock.assert_requested( + "get", + path="/v2/extend/workflows", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_extend_workflow_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/extend/workflows/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.extend.workflows.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/extend/workflows/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_extend_workflow_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/extend/workflows/id_123/invoke", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.extend.workflows.invoke( + "id_123", + { + "input_parameters": { + "int_key": 123, + "string_key": "value", + "boolean_key": True, + "object_key": { + "object_int_key": 123, + "object_string_key": "value", + "object_boolean_key": True, + }, + "array_key": [1, 2, 3], + }, + }, + ) + http_client_mock.assert_requested( + "post", + path="/v2/extend/workflows/id_123/invoke", + query_string="", + api_base="https://api.stripe.com", + post_data='{"input_parameters":{"int_key":123,"string_key":"value","boolean_key":true,"object_key":{"object_int_key":123,"object_string_key":"value","object_boolean_key":true},"array_key":[1,2,3]}}', + is_json=True, + ) + + def test_v2_extend_workflow_run_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/extend/workflow_runs", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.extend.workflow_runs.list() + http_client_mock.assert_requested( + "get", + path="/v2/extend/workflow_runs", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_extend_workflow_run_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/extend/workflow_runs/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.extend.workflow_runs.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/extend/workflow_runs/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_iam_activity_log_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/iam/activity_logs", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.iam.activity_logs.list() + http_client_mock.assert_requested( + "get", + path="/v2/iam/activity_logs", + query_string="", + api_base="https://api.stripe.com", + ) + def test_v2_money_management_adjustment_get_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -46077,6 +46324,156 @@ def test_v2_money_management_transaction_entry_get_2_service( api_base="https://api.stripe.com", ) + def test_v2_network_business_profile_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/network/business_profiles/me", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.network.business_profiles.me() + http_client_mock.assert_requested( + "get", + path="/v2/network/business_profiles/me", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_network_business_profile_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/network/business_profiles/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.network.business_profiles.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/network/business_profiles/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_orchestrated_commerce_agreement_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/orchestrated_commerce/agreements", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.orchestrated_commerce.agreements.list() + http_client_mock.assert_requested( + "get", + path="/v2/orchestrated_commerce/agreements", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_orchestrated_commerce_agreement_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/orchestrated_commerce/agreements", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.orchestrated_commerce.agreements.create( + { + "orchestrator": "orchestrator", + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/orchestrated_commerce/agreements", + query_string="", + api_base="https://api.stripe.com", + post_data='{"orchestrator":"orchestrator"}', + is_json=True, + ) + + def test_v2_orchestrated_commerce_agreement_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/orchestrated_commerce/agreements/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.orchestrated_commerce.agreements.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/orchestrated_commerce/agreements/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_orchestrated_commerce_agreement_post_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/orchestrated_commerce/agreements/id_123/confirm", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.orchestrated_commerce.agreements.confirm("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/orchestrated_commerce/agreements/id_123/confirm", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_orchestrated_commerce_agreement_post_3_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/orchestrated_commerce/agreements/id_123/terminate", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.orchestrated_commerce.agreements.terminate("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/orchestrated_commerce/agreements/id_123/terminate", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + def test_v2_test_helpers_financial_address_post_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -46216,6 +46613,48 @@ def test_blocked_by_stripe_error_service( is_json=True, ) + def test_cannot_proceed_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/extend/workflows/id_123/invoke", + rbody='{"error":{"type":"cannot_proceed","code":"default_payout_method_cannot_be_archived"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.extend.workflows.invoke( + "id_123", + { + "input_parameters": { + "int_key": 123, + "string_key": "value", + "boolean_key": True, + "object_key": { + "object_int_key": 123, + "object_string_key": "value", + "object_boolean_key": True, + }, + "array_key": [1, 2, 3], + }, + }, + ) + except _error.CannotProceedError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/extend/workflows/id_123/invoke", + query_string="", + api_base="https://api.stripe.com", + post_data='{"input_parameters":{"int_key":123,"string_key":"value","boolean_key":true,"object_key":{"object_int_key":123,"object_string_key":"value","object_boolean_key":true},"array_key":[1,2,3]}}', + is_json=True, + ) + def test_controlled_by_alternate_resource_error_service( self, http_client_mock: HTTPClientMock ) -> None: