From ebe9243d98ed223238d0d58a91a1a7633193d147 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2026 20:16:07 +0000 Subject: [PATCH] Update generated code for v2574 and a3f45ee54a7055c00c47faf82a2c219480b90afb --- ...26-10-15_stripe-openapi_8e222f8f.change.md | 34 +++++ CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- stripe/_account_session.py | 10 +- stripe/_card.py | 2 + stripe/_charge.py | 4 +- stripe/_confirmation_token.py | 5 +- stripe/_customer.py | 16 +-- stripe/_dispute.py | 7 +- stripe/_event_notification_handler.py | 16 +++ stripe/_invoice.py | 17 ++- stripe/_order.py | 17 ++- stripe/_payment_attempt_record.py | 4 +- stripe/_payment_link.py | 31 +++- stripe/_payment_method.py | 4 +- stripe/_payment_record.py | 4 +- stripe/_quote_preview_invoice.py | 17 ++- stripe/_setup_attempt.py | 5 +- stripe/_source.py | 4 +- stripe/_source_mandate_notification.py | 4 +- stripe/_token.py | 2 + stripe/checkout/_session.py | 132 +++++++++++++++++- stripe/events/__init__.py | 12 ++ stripe/events/_event_classes.py | 12 ++ ...ccount_signal_customer_risk_ready_event.py | 117 ++++++++++++++++ stripe/financial_connections/_account.py | 2 +- stripe/identity/_verification_report.py | 4 +- stripe/identity/_verification_session.py | 4 +- stripe/params/_account_create_params.py | 6 +- stripe/params/checkout/__init__.py | 10 ++ .../params/checkout/_session_create_params.py | 54 ++++++- .../params/checkout/_session_modify_params.py | 2 +- .../params/checkout/_session_update_params.py | 2 +- .../_verification_report_list_params.py | 2 +- .../_verification_session_create_params.py | 2 +- .../_verification_session_modify_params.py | 2 +- .../_verification_session_update_params.py | 2 +- stripe/params/issuing/__init__.py | 15 -- .../issuing/_authorization_capture_params.py | 46 ------ ...transaction_create_force_capture_params.py | 46 ------ ...ansaction_create_unlinked_refund_params.py | 48 ------- .../params/test_helpers/issuing/__init__.py | 15 -- .../issuing/_authorization_capture_params.py | 46 ------ ...transaction_create_force_capture_params.py | 46 ------ ...ansaction_create_unlinked_refund_params.py | 48 ------- .../core/_account_evaluation_create_params.py | 1 + stripe/params/v2/signals/__init__.py | 50 +++++++ .../_account_activity_create_params.py | 73 ++++++++++ .../_account_evaluation_create_params.py | 91 +++++++++++- .../v2/signals/_account_signal_list_params.py | 2 + stripe/radar/_payment_evaluation.py | 2 +- stripe/tax/_calculation.py | 17 ++- stripe/tax/_registration.py | 32 +++++ stripe/tax/_transaction.py | 17 ++- stripe/test_helpers/_customer_service.py | 4 +- stripe/v2/core/_account_evaluation.py | 1 + stripe/v2/signals/_account_activity.py | 77 ++++++++++ stripe/v2/signals/_account_evaluation.py | 23 +++ stripe/v2/signals/_account_signal.py | 24 ++++ tests/test_generated_examples.py | 22 +-- 60 files changed, 935 insertions(+), 383 deletions(-) create mode 100644 .hark/changes/2026-10-15_stripe-openapi_8e222f8f.change.md create mode 100644 stripe/events/_v2_signals_account_signal_customer_risk_ready_event.py diff --git a/.hark/changes/2026-10-15_stripe-openapi_8e222f8f.change.md b/.hark/changes/2026-10-15_stripe-openapi_8e222f8f.change.md new file mode 100644 index 000000000..0e02e0db9 --- /dev/null +++ b/.hark/changes/2026-10-15_stripe-openapi_8e222f8f.change.md @@ -0,0 +1,34 @@ +--- +title: Update generated code +pr_url: https://github.com/stripe/stripe-python/pull/1945 +semver_level: major +is_stripe_api_change: true +--- + +* Change type of `AccountSession.Component.terminal_hardware_orders` from `nullable(ConnectEmbeddedBaseConfig)` to `ConnectEmbeddedBaseConfig` +* Change type of `AccountSession.Component.terminal_hardware_shop` from `nullable(ConnectEmbeddedBaseConfig)` to `ConnectEmbeddedBaseConfig` +* Change `AccountSession.Component.terminal_hardware_orders` to be required +* Change `AccountSession.Component.terminal_hardware_shop` to be required +* Add support for new value `mandiri` on enums `Charge.PaymentMethodDetail.IdBankTransfer.bank`, `ConfirmationToken.PaymentMethodPreview.IdBankTransfer.bank`, `PaymentAttemptRecord.PaymentMethodDetail.IdBankTransfer.bank`, `PaymentMethod.IdBankTransfer.bank`, `PaymentRecord.PaymentMethodDetail.IdBankTransfer.bank`, and `SetupAttempt.PaymentMethodDetail.IdBankTransfer.bank` +* Add support for `marketing_attributions` on `Checkout.Session` and `checkout.SessionCreateParams` +* Add support for new values `au_acn`, `au_wpn`, `cz_dic`, `fr_siren`, `fr_siret`, `fr_spi`, `is_kt`, `md_cf`, `mu_vat`, `mz_nuit`, `nz_bn`, `pt_nif`, `sm_coe`, `tt_bir`, and `tt_vat` on enums `Checkout.Session.CollectedInformation.TaxId.type`, `Checkout.Session.CustomerDetail.TaxId.type`, `Invoice.CustomerTaxId.type`, `Order.TaxDetail.TaxId.type`, `QuotePreviewInvoice.CustomerTaxId.type`, `Tax.Calculation.CustomerDetail.TaxId.type`, and `Tax.Transaction.CustomerDetail.TaxId.type` +* Add support for `mandate_options` on `Checkout.Session.PaymentMethodOption.Card` +* ⚠️ Change type of `Dispute.Evidence.appeal` from `DisputeAppeal` to `nullable(DisputeAppeal)` +* Change `Dispute.EvidenceDetail.submission_method` to be required +* ⚠️ Remove support for value `email` from enums `identity.VerificationReportListParams.type`, `identity.VerificationSessionCreateParams.type`, and `identity.VerificationSessionModifyParams.type` +* ⚠️ Remove support for value `email` from enums `Identity.VerificationReport.type` and `Identity.VerificationSession.type` +* ⚠️ Remove support for `healthcare` on `issuing.AuthorizationCaptureParamsPurchaseDetail`, `issuing.TransactionCreateForceCaptureParamsPurchaseDetail`, and `issuing.TransactionCreateUnlinkedRefundParamsPurchaseDetail` +* Add support for `account_tax_ids`, `custom_fields`, `description`, and `footer` on `PaymentLink.SubscriptionDatum.InvoiceSetting` +* Change type of `Radar.PaymentEvaluation.Signal.early_fraud_warning` from `nullable(Payment Evaluation Signal)` to `Payment Evaluation Signal` +* ⚠️ Change `Radar.PaymentEvaluation.Signal.early_fraud_warning` to be optional +* Add support for `bw`, `ci`, `gh`, and `mu` on `Tax.Registration.CountryOption` +* Add support for new value `account_takeover` on enum `V2.Core.AccountEvaluation.evaluations_triggered` +* Add support for `account_takeover_confirmation`, `account_takeover_report`, `credential_change`, `mfa_addition`, and `mfa_removal` on `V2.Signals.AccountActivity`, `v2.signals.AccountActivityCreateParams`, and `v2.signals.AccountEvaluationCreateParamsAccountActivityDetailData` +* Add support for new values `account_takeover_confirmation`, `account_takeover_mitigation`, `account_takeover_report`, `credential_change`, `mfa_addition`, and `mfa_removal` on enums `V2.Signals.AccountActivity.type`, `v2.signals.AccountActivityCreateParams.type`, and `v2.signals.AccountEvaluationCreateParamsAccountActivityDetailData.type` +* Add support for `account_takeover` on `V2.Signals.AccountEvaluation.EvaluatedSignal` and `V2.Signals.AccountSignal` +* Add support for new value `account_takeover` on enum `V2.Signals.AccountEvaluation.pending_signals` +* Add support for new value `account_takeover` on enums `V2.Signals.AccountEvaluation.requested_signals` and `v2.signals.AccountEvaluationCreateParams.requested_signals` +* Add support for `customer_risk` on `V2.Signals.AccountSignal` +* Add support for new values `account_takeover` and `customer_risk` on enums `V2.Signals.AccountSignal.type` and `v2.signals.AccountSignalListParams.type` +* Add support for new value `account_takeover` on enum `v2.core.AccountEvaluationCreateParams.signals` +* Add support for event notification `V2SignalsAccountSignalCustomerRiskReadyEvent` with related object `v2.signals.AccountSignal` diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 52d81e8f1..d4e0e4286 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -ee856c792d5b7bc7c9a55588bd92531c2774e744 \ No newline at end of file +a3f45ee54a7055c00c47faf82a2c219480b90afb \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 24341e773..23778bdbf 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2562 \ No newline at end of file +v2574 \ No newline at end of file diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 19c4ce1a9..3560ce223 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -743,14 +743,8 @@ class Features(StripeObject): """ tax_registrations: TaxRegistrations tax_settings: TaxSettings - terminal_hardware_orders: Optional[TerminalHardwareOrders] - """ - Configuration for the [Terminal hardware orders](https://docs.stripe.com/connect/supported-embedded-components/terminal-hardware-orders/) embedded component. - """ - terminal_hardware_shop: Optional[TerminalHardwareShop] - """ - Configuration for the [Terminal hardware shop](https://docs.stripe.com/connect/supported-embedded-components/terminal-hardware-shop/) embedded component. - """ + terminal_hardware_orders: TerminalHardwareOrders + terminal_hardware_shop: TerminalHardwareShop _inner_class_types = { "account_management": AccountManagement, "account_onboarding": AccountOnboarding, diff --git a/stripe/_card.py b/stripe/_card.py index 1e1bdf2fc..115265cc7 100644 --- a/stripe/_card.py +++ b/stripe/_card.py @@ -22,6 +22,8 @@ class Card(DeletableAPIResource["Card"], UpdateableAPIResource["Card"]): later. You can also store multiple debit cards on a recipient in order to transfer to those cards later. + This API is deprecated. Use the [PaymentMethods API](https://docs.stripe.com/api/payment_methods) instead. + Related guide: [Card payments with Sources](https://docs.stripe.com/sources/cards) """ diff --git a/stripe/_charge.py b/stripe/_charge.py index 1f5b6dc23..78e0a2cba 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -1497,7 +1497,9 @@ class IdBankTransfer(StripeObject): """ Account number of the bank account to transfer funds to. """ - bank: Union[Literal["bca", "bni", "bri", "cimb", "permata"], str] + bank: Union[ + Literal["bca", "bni", "bri", "cimb", "mandiri", "permata"], str + ] """ Bank where the account is located. """ diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 2bb4e40f6..34c0ae160 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -1069,7 +1069,10 @@ class Grabpay(StripeObject): class IdBankTransfer(StripeObject): bank: Optional[ - Union[Literal["bca", "bni", "bri", "cimb", "permata"], str] + Union[ + Literal["bca", "bni", "bri", "cimb", "mandiri", "permata"], + str, + ] ] bank_code: Optional[str] bank_name: Optional[str] diff --git a/stripe/_customer.py b/stripe/_customer.py index c30da9072..1bd91261a 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -2119,7 +2119,7 @@ def _cls_fund_cash_balance( **params: Unpack["CustomerFundCashBalanceParams"], ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ return cast( "CustomerCashBalanceTransaction", @@ -2138,7 +2138,7 @@ def fund_cash_balance( customer: str, /, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ ... @@ -2147,7 +2147,7 @@ def fund_cash_balance( self, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ ... @@ -2156,7 +2156,7 @@ def fund_cash_balance( self, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ return cast( "CustomerCashBalanceTransaction", @@ -2177,7 +2177,7 @@ async def _cls_fund_cash_balance_async( **params: Unpack["CustomerFundCashBalanceParams"], ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ return cast( "CustomerCashBalanceTransaction", @@ -2196,7 +2196,7 @@ async def fund_cash_balance_async( customer: str, /, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ ... @@ -2205,7 +2205,7 @@ async def fund_cash_balance_async( self, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ ... @@ -2214,7 +2214,7 @@ async def fund_cash_balance_async( self, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ return cast( "CustomerCashBalanceTransaction", diff --git a/stripe/_dispute.py b/stripe/_dispute.py index 97727cbca..e2c18b140 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -213,6 +213,9 @@ class VisaCompliance(StripeObject): Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. """ appeal: Optional[Appeal] + """ + Appeal evidence submitted during the appeal stage. + """ billing_address: Optional[str] """ The billing address provided by the customer. @@ -394,8 +397,8 @@ class VisaCompliance(StripeObject): """ The number of times evidence has been submitted. Typically, you may only submit evidence once. """ - submission_method: Optional[ - Union[Literal["manual", "not_submitted", "smart_disputes"], str] + submission_method: Union[ + Literal["manual", "not_submitted", "smart_disputes"], str ] """ Whether the dispute was submitted manually, with Smart Disputes, or not submitted. diff --git a/stripe/_event_notification_handler.py b/stripe/_event_notification_handler.py index 19812068d..a922082bd 100644 --- a/stripe/_event_notification_handler.py +++ b/stripe/_event_notification_handler.py @@ -1446,6 +1446,9 @@ from stripe.events._v2_signals_account_evaluation_complete_event import ( V2SignalsAccountEvaluationCompleteEventNotification, ) + from stripe.events._v2_signals_account_signal_customer_risk_ready_event import ( + V2SignalsAccountSignalCustomerRiskReadyEventNotification, + ) from stripe.events._v2_signals_account_signal_fraudulent_merchant_ready_event import ( V2SignalsAccountSignalFraudulentMerchantReadyEventNotification, ) @@ -7694,6 +7697,19 @@ def on_v2_signals_account_evaluation_complete( ) return func + def on_v2_signals_account_signal_customer_risk_ready( + self, + func: "Callable[[V2SignalsAccountSignalCustomerRiskReadyEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2SignalsAccountSignalCustomerRiskReadyEvent` (`v2.signals.account_signal.customer_risk_ready`) event notification. + """ + self._register( + "v2.signals.account_signal.customer_risk_ready", + func, + ) + return func + def on_v2_signals_account_signal_fraudulent_merchant_ready( self, func: "Callable[[V2SignalsAccountSignalFraudulentMerchantReadyEventNotification, StripeClient], CallbackReturn]", diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 994ab2854..adbd94c95 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -355,7 +355,9 @@ class CustomerTaxId(StripeObject): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -385,6 +387,7 @@ class CustomerTaxId(StripeObject): "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -394,6 +397,9 @@ class CustomerTaxId(StripeObject): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", "gi_tin", @@ -405,6 +411,7 @@ class CustomerTaxId(StripeObject): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -420,23 +427,28 @@ class CustomerTaxId(StripeObject): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -446,12 +458,15 @@ class CustomerTaxId(StripeObject): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -470,7 +485,7 @@ class CustomerTaxId(StripeObject): str, ] """ - 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`, `ic_nif`, 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`, `au_acn`, `nz_bn`, `pt_nif`, `cz_dic`, `fr_siret`, `fr_siren`, `fr_spi`, `sm_coe`, `tt_vat`, `tt_bir`, `mu_vat`, `mz_nuit`, `au_wpn`, `md_cf`, `is_kt`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, `ic_nif`, or `unknown` """ value: Optional[str] """ diff --git a/stripe/_order.py b/stripe/_order.py index 7cdc56a52..49324ea3b 100644 --- a/stripe/_order.py +++ b/stripe/_order.py @@ -829,7 +829,9 @@ class TaxId(StripeObject): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -859,6 +861,7 @@ class TaxId(StripeObject): "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -868,6 +871,9 @@ class TaxId(StripeObject): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", "gi_tin", @@ -879,6 +885,7 @@ class TaxId(StripeObject): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -894,23 +901,28 @@ class TaxId(StripeObject): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -920,12 +932,15 @@ class TaxId(StripeObject): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -944,7 +959,7 @@ class TaxId(StripeObject): str, ] """ - 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`, `ic_nif`, 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`, `au_acn`, `nz_bn`, `pt_nif`, `cz_dic`, `fr_siret`, `fr_siren`, `fr_spi`, `sm_coe`, `tt_vat`, `tt_bir`, `mu_vat`, `mz_nuit`, `au_wpn`, `md_cf`, `is_kt`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, `ic_nif`, or `unknown` """ value: Optional[str] """ diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 52110cec7..a1482239b 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -1242,7 +1242,9 @@ class IdBankTransfer(StripeObject): """ Account number of the bank account to transfer funds to. """ - bank: Union[Literal["bca", "bni", "bri", "cimb", "permata"], str] + bank: Union[ + Literal["bca", "bni", "bri", "cimb", "mandiri", "permata"], str + ] """ Bank where the account is located. """ diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index 5c5bcc26e..1b38a6a60 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -744,6 +744,16 @@ class ShippingOption(StripeObject): class SubscriptionData(StripeObject): class InvoiceSettings(StripeObject): + class CustomField(StripeObject): + name: str + """ + The name of the custom field. + """ + value: str + """ + The value of the custom field. + """ + class Issuer(StripeObject): account: Optional[ExpandableField["Account"]] """ @@ -754,8 +764,27 @@ class Issuer(StripeObject): Type of the account referenced. """ + account_tax_ids: Optional[List[ExpandableField["TaxId"]]] + """ + The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + """ + custom_fields: Optional[List[CustomField]] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: Optional[str] + """ + Footer to be displayed on the invoice. + """ issuer: Issuer - _inner_class_types = {"issuer": Issuer} + _inner_class_types = { + "custom_fields": CustomField, + "issuer": Issuer, + } class TrialSettings(StripeObject): class EndBehavior(StripeObject): diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 45d3e5d01..dba421774 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -1048,7 +1048,9 @@ class Grabpay(StripeObject): class IdBankTransfer(StripeObject): bank: Optional[ - Union[Literal["bca", "bni", "bri", "cimb", "permata"], str] + Union[ + Literal["bca", "bni", "bri", "cimb", "mandiri", "permata"], str + ] ] bank_code: Optional[str] bank_name: Optional[str] diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 24e805fec..84d728e05 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -1257,7 +1257,9 @@ class IdBankTransfer(StripeObject): """ Account number of the bank account to transfer funds to. """ - bank: Union[Literal["bca", "bni", "bri", "cimb", "permata"], str] + bank: Union[ + Literal["bca", "bni", "bri", "cimb", "mandiri", "permata"], str + ] """ Bank where the account is located. """ diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py index 74837ce7d..2475e256b 100644 --- a/stripe/_quote_preview_invoice.py +++ b/stripe/_quote_preview_invoice.py @@ -310,7 +310,9 @@ class CustomerTaxId(StripeObject): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -340,6 +342,7 @@ class CustomerTaxId(StripeObject): "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -349,6 +352,9 @@ class CustomerTaxId(StripeObject): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", "gi_tin", @@ -360,6 +366,7 @@ class CustomerTaxId(StripeObject): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -375,23 +382,28 @@ class CustomerTaxId(StripeObject): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -401,12 +413,15 @@ class CustomerTaxId(StripeObject): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -425,7 +440,7 @@ class CustomerTaxId(StripeObject): str, ] """ - 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`, `ic_nif`, 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`, `au_acn`, `nz_bn`, `pt_nif`, `cz_dic`, `fr_siret`, `fr_siren`, `fr_spi`, `sm_coe`, `tt_vat`, `tt_bir`, `mu_vat`, `mz_nuit`, `au_wpn`, `md_cf`, `is_kt`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, `ic_nif`, or `unknown` """ value: Optional[str] """ diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index 45fd7e162..3c9bf7e17 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -284,7 +284,10 @@ class Cashapp(StripeObject): class IdBankTransfer(StripeObject): bank: Optional[ - Union[Literal["bca", "bni", "bri", "cimb", "permata"], str] + Union[ + Literal["bca", "bni", "bri", "cimb", "mandiri", "permata"], + str, + ] ] """ Bank where the account is located. diff --git a/stripe/_source.py b/stripe/_source.py index 4e2685bce..21e4ba3bd 100644 --- a/stripe/_source.py +++ b/stripe/_source.py @@ -28,9 +28,7 @@ class Source(CreateableAPIResource["Source"], UpdateableAPIResource["Source"]): just like a `Card` object: once chargeable, they can be charged, or can be attached to customers. - Stripe doesn't recommend using the deprecated [Sources API](https://docs.stripe.com/api/sources). - We recommend that you adopt the [PaymentMethods API](https://docs.stripe.com/api/payment_methods). - This newer API provides access to our latest features and payment method types. + This API is deprecated. Use the [PaymentMethods API](https://docs.stripe.com/api/payment_methods) instead. Related guides: [Sources API](https://docs.stripe.com/sources) and [Sources & Customers](https://docs.stripe.com/sources/customers). """ diff --git a/stripe/_source_mandate_notification.py b/stripe/_source_mandate_notification.py index 3f5fbae43..d0ba848f5 100644 --- a/stripe/_source_mandate_notification.py +++ b/stripe/_source_mandate_notification.py @@ -79,9 +79,7 @@ class SepaDebit(StripeObject): just like a `Card` object: once chargeable, they can be charged, or can be attached to customers. - Stripe doesn't recommend using the deprecated [Sources API](https://docs.stripe.com/api/sources). - We recommend that you adopt the [PaymentMethods API](https://docs.stripe.com/api/payment_methods). - This newer API provides access to our latest features and payment method types. + This API is deprecated. Use the [PaymentMethods API](https://docs.stripe.com/api/payment_methods) instead. Related guides: [Sources API](https://docs.stripe.com/sources) and [Sources & Customers](https://docs.stripe.com/sources/customers). """ diff --git a/stripe/_token.py b/stripe/_token.py index cb0d3c910..7424bf650 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -60,6 +60,8 @@ class Redaction(StripeObject): later. You can also store multiple debit cards on a recipient in order to transfer to those cards later. + This API is deprecated. Use the [PaymentMethods API](https://docs.stripe.com/api/payment_methods) instead. + Related guide: [Card payments with Sources](https://docs.stripe.com/sources/cards) """ client_ip: Optional[str] diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 41967ce27..b3030700f 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -349,7 +349,9 @@ class TaxId(StripeObject): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -379,6 +381,7 @@ class TaxId(StripeObject): "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -388,6 +391,9 @@ class TaxId(StripeObject): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", "gi_tin", @@ -399,6 +405,7 @@ class TaxId(StripeObject): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -414,23 +421,28 @@ class TaxId(StripeObject): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -440,12 +452,15 @@ class TaxId(StripeObject): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -464,7 +479,7 @@ class TaxId(StripeObject): str, ] """ - 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`, `ic_nif`, 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`, `au_acn`, `nz_bn`, `pt_nif`, `cz_dic`, `fr_siret`, `fr_siren`, `fr_spi`, `sm_coe`, `tt_vat`, `tt_bir`, `mu_vat`, `mz_nuit`, `au_wpn`, `md_cf`, `is_kt`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, `ic_nif`, or `unknown` """ value: Optional[str] """ @@ -977,7 +992,9 @@ class TaxId(StripeObject): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -1007,6 +1024,7 @@ class TaxId(StripeObject): "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -1016,6 +1034,9 @@ class TaxId(StripeObject): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", "gi_tin", @@ -1027,6 +1048,7 @@ class TaxId(StripeObject): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -1042,23 +1064,28 @@ class TaxId(StripeObject): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -1068,12 +1095,15 @@ class TaxId(StripeObject): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -1092,7 +1122,7 @@ class TaxId(StripeObject): str, ] """ - 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`, `ic_nif`, 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`, `au_acn`, `nz_bn`, `pt_nif`, `cz_dic`, `fr_siret`, `fr_siren`, `fr_spi`, `sm_coe`, `tt_vat`, `tt_bir`, `mu_vat`, `mz_nuit`, `au_wpn`, `md_cf`, `is_kt`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, `ic_nif`, or `unknown` """ value: Optional[str] """ @@ -1336,6 +1366,48 @@ class ManagedPayments(StripeObject): Set to `true` to enable [Managed Payments](https://docs.stripe.com/payments/managed-payments), Stripe's merchant of record solution, for this session. """ + class MarketingAttribution(StripeObject): + class AdConversion(StripeObject): + consent_collected: bool + """ + Whether the customer consented to sending conversion data to an advertising platform. + """ + + ad_conversion: AdConversion + click_id: Optional[str] + """ + The advertising platform's click identifier. + """ + occurred_at: Optional[int] + """ + The Unix timestamp when the advertising interaction occurred. + """ + utm_adgroup: Optional[str] + """ + The advertising group ID from the `utm_adgroup` parameter. + """ + utm_content: Optional[str] + """ + The advertising content identifier from the `utm_content` parameter. + """ + utm_id: Optional[str] + """ + The advertising campaign ID from the `utm_id` parameter. + """ + utm_medium: Optional[str] + """ + The marketing medium from the `utm_medium` parameter. + """ + utm_source: Optional[str] + """ + The referral source from the `utm_source` parameter. + """ + utm_term: Optional[str] + """ + The paid search term from the `utm_term` parameter. + """ + _inner_class_types = {"ad_conversion": AdConversion} + class NameCollection(StripeObject): class Business(StripeObject): enabled: bool @@ -1615,6 +1687,53 @@ class Installments(StripeObject): Indicates if installments are enabled """ + class MandateOptions(StripeObject): + amount: Optional[int] + """ + Maximum or fixed amount for future payments, in the mandate's currency. + """ + amount_type: Optional[Union[Literal["fixed", "maximum"], str]] + """ + 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. + """ + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + 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. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Optional[ + Union[ + Literal["day", "month", "sporadic", "week", "year"], + str, + ] + ] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: Optional[int] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: Optional[str] + """ + Unique identifier for the mandate or subscription. + """ + start_date: Optional[int] + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: Optional[List[Literal["india"]]] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ + class Restrictions(StripeObject): brands_blocked: Optional[ List[ @@ -1644,6 +1763,7 @@ class Restrictions(StripeObject): Controls when the funds will be captured from the customer's account. """ installments: Optional[Installments] + mandate_options: Optional[MandateOptions] request_decremental_authorization: Optional[ Union[Literal["if_available", "never"], str] ] @@ -1703,6 +1823,7 @@ class Restrictions(StripeObject): """ _inner_class_types = { "installments": Installments, + "mandate_options": MandateOptions, "restrictions": Restrictions, } @@ -3419,6 +3540,10 @@ class Link(StripeObject): """ 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). """ + marketing_attributions: Optional[List[MarketingAttribution]] + """ + Advertising attribution information for this Checkout Session. + """ 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. @@ -3456,7 +3581,7 @@ class Link(StripeObject): Union[Literal["always", "auto", "if_required"], str] ] """ - Configure whether a Checkout Session should collect a payment method for sessions with mode `payment`. Defaults to `always`. + Configure whether a Checkout Session should collect a payment method. Can only be set in `subscription` mode. Defaults to `always`. """ payment_method_configuration_details: Optional[ PaymentMethodConfigurationDetails @@ -4065,6 +4190,7 @@ async def retrieve_async( "invoice_creation": InvoiceCreation, "items": Item, "managed_payments": ManagedPayments, + "marketing_attributions": MarketingAttribution, "name_collection": NameCollection, "optional_items": OptionalItem, "payment_method_configuration_details": PaymentMethodConfigurationDetails, diff --git a/stripe/events/__init__.py b/stripe/events/__init__.py index 1ad89500b..867b650bc 100644 --- a/stripe/events/__init__.py +++ b/stripe/events/__init__.py @@ -1891,6 +1891,10 @@ V2SignalsAccountEvaluationCompleteEvent as V2SignalsAccountEvaluationCompleteEvent, V2SignalsAccountEvaluationCompleteEventNotification as V2SignalsAccountEvaluationCompleteEventNotification, ) + from stripe.events._v2_signals_account_signal_customer_risk_ready_event import ( + V2SignalsAccountSignalCustomerRiskReadyEvent as V2SignalsAccountSignalCustomerRiskReadyEvent, + V2SignalsAccountSignalCustomerRiskReadyEventNotification as V2SignalsAccountSignalCustomerRiskReadyEventNotification, + ) from stripe.events._v2_signals_account_signal_fraudulent_merchant_ready_event import ( V2SignalsAccountSignalFraudulentMerchantReadyEvent as V2SignalsAccountSignalFraudulentMerchantReadyEvent, V2SignalsAccountSignalFraudulentMerchantReadyEventNotification as V2SignalsAccountSignalFraudulentMerchantReadyEventNotification, @@ -5556,6 +5560,14 @@ "stripe.events._v2_signals_account_evaluation_complete_event", False, ), + "V2SignalsAccountSignalCustomerRiskReadyEvent": ( + "stripe.events._v2_signals_account_signal_customer_risk_ready_event", + False, + ), + "V2SignalsAccountSignalCustomerRiskReadyEventNotification": ( + "stripe.events._v2_signals_account_signal_customer_risk_ready_event", + False, + ), "V2SignalsAccountSignalFraudulentMerchantReadyEvent": ( "stripe.events._v2_signals_account_signal_fraudulent_merchant_ready_event", False, diff --git a/stripe/events/_event_classes.py b/stripe/events/_event_classes.py index a8db62d50..bbdc5df85 100644 --- a/stripe/events/_event_classes.py +++ b/stripe/events/_event_classes.py @@ -1414,6 +1414,9 @@ from stripe.events._v2_signals_account_evaluation_complete_event import ( V2SignalsAccountEvaluationCompleteEventNotification, ) + from stripe.events._v2_signals_account_signal_customer_risk_ready_event import ( + V2SignalsAccountSignalCustomerRiskReadyEventNotification, + ) from stripe.events._v2_signals_account_signal_fraudulent_merchant_ready_event import ( V2SignalsAccountSignalFraudulentMerchantReadyEventNotification, ) @@ -3308,6 +3311,10 @@ "stripe.events._v2_signals_account_evaluation_complete_event", "V2SignalsAccountEvaluationCompleteEvent", ), + "v2.signals.account_signal.customer_risk_ready": ( + "stripe.events._v2_signals_account_signal_customer_risk_ready_event", + "V2SignalsAccountSignalCustomerRiskReadyEvent", + ), "v2.signals.account_signal.fraudulent_merchant_ready": ( "stripe.events._v2_signals_account_signal_fraudulent_merchant_ready_event", "V2SignalsAccountSignalFraudulentMerchantReadyEvent", @@ -5219,6 +5226,10 @@ def get_v2_event_class(type_: str): "stripe.events._v2_signals_account_evaluation_complete_event", "V2SignalsAccountEvaluationCompleteEventNotification", ), + "v2.signals.account_signal.customer_risk_ready": ( + "stripe.events._v2_signals_account_signal_customer_risk_ready_event", + "V2SignalsAccountSignalCustomerRiskReadyEventNotification", + ), "v2.signals.account_signal.fraudulent_merchant_ready": ( "stripe.events._v2_signals_account_signal_fraudulent_merchant_ready_event", "V2SignalsAccountSignalFraudulentMerchantReadyEventNotification", @@ -5723,6 +5734,7 @@ def get_v2_event_notification_class(type_: str): "V2ReportingReportRunSucceededEventNotification", "V2ReportingReportRunUpdatedEventNotification", "V2SignalsAccountEvaluationCompleteEventNotification", + "V2SignalsAccountSignalCustomerRiskReadyEventNotification", "V2SignalsAccountSignalFraudulentMerchantReadyEventNotification", "V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification", "V2SignalsAccountSignalMerchantDelinquencyReadyEventNotification", diff --git a/stripe/events/_v2_signals_account_signal_customer_risk_ready_event.py b/stripe/events/_v2_signals_account_signal_customer_risk_ready_event.py new file mode 100644 index 000000000..73c7c36c3 --- /dev/null +++ b/stripe/events/_v2_signals_account_signal_customer_risk_ready_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.signals._account_signal import AccountSignal + + +class V2SignalsAccountSignalCustomerRiskReadyEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.signals.account_signal.customer_risk_ready" + type: Literal["v2.signals.account_signal.customer_risk_ready"] + 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) -> "V2SignalsAccountSignalCustomerRiskReadyEvent": + return cast( + "V2SignalsAccountSignalCustomerRiskReadyEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "AccountSignal": + 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( + "AccountSignal", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2SignalsAccountSignalCustomerRiskReadyEvent": + return cast( + "V2SignalsAccountSignalCustomerRiskReadyEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "AccountSignal": + 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( + "AccountSignal", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2SignalsAccountSignalCustomerRiskReadyEvent(Event): + LOOKUP_TYPE = "v2.signals.account_signal.customer_risk_ready" + type: Literal["v2.signals.account_signal.customer_risk_ready"] + + 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) -> "AccountSignal": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "AccountSignal", + 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/financial_connections/_account.py b/stripe/financial_connections/_account.py index f4a40dc19..3a8bc6096 100644 --- a/stripe/financial_connections/_account.py +++ b/stripe/financial_connections/_account.py @@ -327,7 +327,7 @@ class TransactionRefresh(StripeObject): """ ownership: Optional[ExpandableField["AccountOwnership"]] """ - The most recent information about the account's owners. + The ID of the [Financial Connections Account Ownership](https://docs.stripe.com/api/financial_connections/ownership) object associated with this account. """ ownership_refresh: Optional[OwnershipRefresh] """ diff --git a/stripe/identity/_verification_report.py b/stripe/identity/_verification_report.py index 0cd3de175..d2bc18cfd 100644 --- a/stripe/identity/_verification_report.py +++ b/stripe/identity/_verification_report.py @@ -765,9 +765,7 @@ class Indicator(StripeObject): Result from a selfie check """ signals: Optional[Signals] - type: Union[ - Literal["document", "email", "id_number", "verification_flow"], str - ] + type: Union[Literal["document", "id_number", "verification_flow"], str] """ Type of report. """ diff --git a/stripe/identity/_verification_session.py b/stripe/identity/_verification_session.py index 79b70f9dd..4d2c31b7b 100644 --- a/stripe/identity/_verification_session.py +++ b/stripe/identity/_verification_session.py @@ -345,9 +345,7 @@ class Dob(StripeObject): """ Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://docs.stripe.com/identity/how-sessions-work). """ - type: Union[ - Literal["document", "email", "id_number", "verification_flow"], str - ] + type: Union[Literal["document", "id_number", "verification_flow"], str] """ The type of [verification check](https://docs.stripe.com/identity/verification-checks) to be performed. """ diff --git a/stripe/params/_account_create_params.py b/stripe/params/_account_create_params.py index 05188a207..26b8b7cec 100644 --- a/stripe/params/_account_create_params.py +++ b/stripe/params/_account_create_params.py @@ -38,7 +38,7 @@ class AccountCreateParams(RequestOptions): """ controller: NotRequired["AccountCreateParamsController"] """ - A hash of configuration describing the account controller's attributes. + Configures the account's Dashboard access, loss liability, requirements collection, and Stripe fee responsibility. """ country: NotRequired[str] """ @@ -1657,14 +1657,14 @@ class AccountCreateParamsControllerDashboard(TypedDict): class AccountCreateParamsControllerFees(TypedDict): payer: NotRequired["Literal['account', 'application']|str"] """ - A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). + Controls who pays Stripe fees for direct charges and other pricing-control-eligible Stripe products. Setting `controller.losses.payments=application` requires `controller.fees.payer=application`. For destination charges and separate charges and transfers, Stripe bills the platform regardless of this setting. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior), including application fees and pricing considerations. """ class AccountCreateParamsControllerLosses(TypedDict): payments: NotRequired["Literal['application', 'stripe']|str"] """ - A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`. + Controls who is responsible for payment-related negative balances on this account. The platform remains liable for negative balances on its own account. To use Stripe negative balance liability, your integration must meet [Managed Risk requirements](https://docs.stripe.com/connect/risk-management/managed-risk). Defaults to `stripe`. """ diff --git a/stripe/params/checkout/__init__.py b/stripe/params/checkout/__init__.py index b74a4d537..bf1e7b1f7 100644 --- a/stripe/params/checkout/__init__.py +++ b/stripe/params/checkout/__init__.py @@ -69,6 +69,8 @@ SessionCreateParamsLineItemPriceDataProductDataTaxDetails as SessionCreateParamsLineItemPriceDataProductDataTaxDetails, SessionCreateParamsLineItemPriceDataRecurring as SessionCreateParamsLineItemPriceDataRecurring, SessionCreateParamsManagedPayments as SessionCreateParamsManagedPayments, + SessionCreateParamsMarketingAttribution as SessionCreateParamsMarketingAttribution, + SessionCreateParamsMarketingAttributionAdConversion as SessionCreateParamsMarketingAttributionAdConversion, SessionCreateParamsNameCollection as SessionCreateParamsNameCollection, SessionCreateParamsNameCollectionBusiness as SessionCreateParamsNameCollectionBusiness, SessionCreateParamsNameCollectionIndividual as SessionCreateParamsNameCollectionIndividual, @@ -509,6 +511,14 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsMarketingAttribution": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsMarketingAttributionAdConversion": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsNameCollection": ( "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 5e385cac8..463c51da6 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -309,6 +309,12 @@ class SessionCreateParams(RequestOptions): """ 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). """ + marketing_attributions: NotRequired[ + List["SessionCreateParamsMarketingAttribution"] + ] + """ + Advertising attribution information for this Checkout Session. Only one attribution is supported. + """ 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`. @@ -1205,7 +1211,7 @@ class SessionCreateParamsLineItem(TypedDict): """ price_data: NotRequired["SessionCreateParamsLineItemPriceData"] """ - Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required. + Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline, for [dynamic pricing](https://docs.stripe.com/products-prices/how-products-and-prices-work#inline-pricing) when the amount isn't known ahead of time. One of `price` or `price_data` is required when creating a new line item. """ quantity: NotRequired[int] """ @@ -1329,6 +1335,52 @@ class SessionCreateParamsManagedPayments(TypedDict): """ +class SessionCreateParamsMarketingAttribution(TypedDict): + ad_conversion: "SessionCreateParamsMarketingAttributionAdConversion" + """ + Information used when sending conversions to an advertising platform. + """ + click_id: NotRequired[str] + """ + The advertising platform's click identifier. + """ + occurred_at: NotRequired[int] + """ + The Unix timestamp when the advertising interaction occurred. + """ + utm_adgroup: NotRequired[str] + """ + The advertising group ID from the `utm_adgroup` parameter. + """ + utm_content: NotRequired[str] + """ + The advertising content identifier from the `utm_content` parameter. + """ + utm_id: NotRequired[str] + """ + The advertising campaign ID from the `utm_id` parameter. + """ + utm_medium: NotRequired[str] + """ + The marketing medium from the `utm_medium` parameter. + """ + utm_source: NotRequired[str] + """ + The referral source from the `utm_source` parameter. + """ + utm_term: NotRequired[str] + """ + The paid search term from the `utm_term` parameter. + """ + + +class SessionCreateParamsMarketingAttributionAdConversion(TypedDict): + consent_collected: bool + """ + Whether the customer consented to sending conversion data to an advertising platform. + """ + + class SessionCreateParamsNameCollection(TypedDict): business: NotRequired["SessionCreateParamsNameCollectionBusiness"] """ diff --git a/stripe/params/checkout/_session_modify_params.py b/stripe/params/checkout/_session_modify_params.py index a39a2ccb9..f61a9a083 100644 --- a/stripe/params/checkout/_session_modify_params.py +++ b/stripe/params/checkout/_session_modify_params.py @@ -225,7 +225,7 @@ class SessionModifyParamsLineItem(TypedDict): """ price_data: NotRequired["SessionModifyParamsLineItemPriceData"] """ - Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required when creating a new line item. + Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline, for [dynamic pricing](https://docs.stripe.com/products-prices/how-products-and-prices-work#inline-pricing) when the amount isn't known ahead of time. One of `price` or `price_data` is required when creating a new line item. """ quantity: NotRequired[int] """ diff --git a/stripe/params/checkout/_session_update_params.py b/stripe/params/checkout/_session_update_params.py index 2b5d920b6..dd727b460 100644 --- a/stripe/params/checkout/_session_update_params.py +++ b/stripe/params/checkout/_session_update_params.py @@ -224,7 +224,7 @@ class SessionUpdateParamsLineItem(TypedDict): """ price_data: NotRequired["SessionUpdateParamsLineItemPriceData"] """ - Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required when creating a new line item. + Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline, for [dynamic pricing](https://docs.stripe.com/products-prices/how-products-and-prices-work#inline-pricing) when the amount isn't known ahead of time. One of `price` or `price_data` is required when creating a new line item. """ quantity: NotRequired[int] """ diff --git a/stripe/params/identity/_verification_report_list_params.py b/stripe/params/identity/_verification_report_list_params.py index 3eaed8250..d29adeace 100644 --- a/stripe/params/identity/_verification_report_list_params.py +++ b/stripe/params/identity/_verification_report_list_params.py @@ -34,7 +34,7 @@ class VerificationReportListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - type: NotRequired["Literal['document', 'email', 'id_number']|str"] + type: NotRequired["Literal['document', 'id_number']|str"] """ Only return VerificationReports of this type """ diff --git a/stripe/params/identity/_verification_session_create_params.py b/stripe/params/identity/_verification_session_create_params.py index 369afd9c6..283f81ff6 100644 --- a/stripe/params/identity/_verification_session_create_params.py +++ b/stripe/params/identity/_verification_session_create_params.py @@ -49,7 +49,7 @@ class VerificationSessionCreateParams(RequestOptions): """ The URL that the user will be redirected to upon completing the verification flow. """ - type: NotRequired["Literal['document', 'email', 'id_number']|str"] + type: NotRequired["Literal['document', 'id_number']|str"] """ The type of [verification check](https://docs.stripe.com/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`. """ diff --git a/stripe/params/identity/_verification_session_modify_params.py b/stripe/params/identity/_verification_session_modify_params.py index 97493e092..6bfd89236 100644 --- a/stripe/params/identity/_verification_session_modify_params.py +++ b/stripe/params/identity/_verification_session_modify_params.py @@ -29,7 +29,7 @@ class VerificationSessionModifyParams(RequestOptions): """ Details provided about the user being verified. These details may be shown to the user. """ - type: NotRequired["Literal['document', 'email', 'id_number']|str"] + type: NotRequired["Literal['document', 'id_number']|str"] """ The type of [verification check](https://docs.stripe.com/identity/verification-checks) to be performed. """ diff --git a/stripe/params/identity/_verification_session_update_params.py b/stripe/params/identity/_verification_session_update_params.py index db66cdcb5..dc2141c50 100644 --- a/stripe/params/identity/_verification_session_update_params.py +++ b/stripe/params/identity/_verification_session_update_params.py @@ -28,7 +28,7 @@ class VerificationSessionUpdateParams(TypedDict): """ Details provided about the user being verified. These details may be shown to the user. """ - type: NotRequired["Literal['document', 'email', 'id_number']|str"] + type: NotRequired["Literal['document', 'id_number']|str"] """ The type of [verification check](https://docs.stripe.com/identity/verification-checks) to be performed. """ diff --git a/stripe/params/issuing/__init__.py b/stripe/params/issuing/__init__.py index 25fa80a7e..d1ece69e4 100644 --- a/stripe/params/issuing/__init__.py +++ b/stripe/params/issuing/__init__.py @@ -20,7 +20,6 @@ AuthorizationCaptureParamsPurchaseDetailsFlight as AuthorizationCaptureParamsPurchaseDetailsFlight, AuthorizationCaptureParamsPurchaseDetailsFlightSegment as AuthorizationCaptureParamsPurchaseDetailsFlightSegment, AuthorizationCaptureParamsPurchaseDetailsFuel as AuthorizationCaptureParamsPurchaseDetailsFuel, - AuthorizationCaptureParamsPurchaseDetailsHealthcare as AuthorizationCaptureParamsPurchaseDetailsHealthcare, AuthorizationCaptureParamsPurchaseDetailsLodging as AuthorizationCaptureParamsPurchaseDetailsLodging, AuthorizationCaptureParamsPurchaseDetailsReceipt as AuthorizationCaptureParamsPurchaseDetailsReceipt, ) @@ -393,7 +392,6 @@ TransactionCreateForceCaptureParamsPurchaseDetailsFlight as TransactionCreateForceCaptureParamsPurchaseDetailsFlight, TransactionCreateForceCaptureParamsPurchaseDetailsFlightSegment as TransactionCreateForceCaptureParamsPurchaseDetailsFlightSegment, TransactionCreateForceCaptureParamsPurchaseDetailsFuel as TransactionCreateForceCaptureParamsPurchaseDetailsFuel, - TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare as TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare, TransactionCreateForceCaptureParamsPurchaseDetailsLodging as TransactionCreateForceCaptureParamsPurchaseDetailsLodging, TransactionCreateForceCaptureParamsPurchaseDetailsReceipt as TransactionCreateForceCaptureParamsPurchaseDetailsReceipt, ) @@ -410,7 +408,6 @@ TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlight as TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlight, TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlightSegment as TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlightSegment, TransactionCreateUnlinkedRefundParamsPurchaseDetailsFuel as TransactionCreateUnlinkedRefundParamsPurchaseDetailsFuel, - TransactionCreateUnlinkedRefundParamsPurchaseDetailsHealthcare as TransactionCreateUnlinkedRefundParamsPurchaseDetailsHealthcare, TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging as TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging, TransactionCreateUnlinkedRefundParamsPurchaseDetailsReceipt as TransactionCreateUnlinkedRefundParamsPurchaseDetailsReceipt, ) @@ -485,10 +482,6 @@ "stripe.params.issuing._authorization_capture_params", False, ), - "AuthorizationCaptureParamsPurchaseDetailsHealthcare": ( - "stripe.params.issuing._authorization_capture_params", - False, - ), "AuthorizationCaptureParamsPurchaseDetailsLodging": ( "stripe.params.issuing._authorization_capture_params", False, @@ -1406,10 +1399,6 @@ "stripe.params.issuing._transaction_create_force_capture_params", False, ), - "TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare": ( - "stripe.params.issuing._transaction_create_force_capture_params", - False, - ), "TransactionCreateForceCaptureParamsPurchaseDetailsLodging": ( "stripe.params.issuing._transaction_create_force_capture_params", False, @@ -1466,10 +1455,6 @@ "stripe.params.issuing._transaction_create_unlinked_refund_params", False, ), - "TransactionCreateUnlinkedRefundParamsPurchaseDetailsHealthcare": ( - "stripe.params.issuing._transaction_create_unlinked_refund_params", - False, - ), "TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging": ( "stripe.params.issuing._transaction_create_unlinked_refund_params", False, diff --git a/stripe/params/issuing/_authorization_capture_params.py b/stripe/params/issuing/_authorization_capture_params.py index 4b3ceb325..d0061cf32 100644 --- a/stripe/params/issuing/_authorization_capture_params.py +++ b/stripe/params/issuing/_authorization_capture_params.py @@ -49,12 +49,6 @@ class AuthorizationCaptureParamsPurchaseDetails(TypedDict): """ Information about fuel that was purchased with this transaction. """ - healthcare: NotRequired[ - "AuthorizationCaptureParamsPurchaseDetailsHealthcare" - ] - """ - Healthcare sub-amounts for IIAS-eligible transactions. - """ lodging: NotRequired["AuthorizationCaptureParamsPurchaseDetailsLodging"] """ Information about lodging that was purchased with this transaction. @@ -256,46 +250,6 @@ class AuthorizationCaptureParamsPurchaseDetailsFuel(TypedDict): """ -class AuthorizationCaptureParamsPurchaseDetailsHealthcare(TypedDict): - clinic_amount: NotRequired[int] - """ - Clinic and urgent care sub-amount for Visa only. - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - dental_amount: NotRequired[int] - """ - Dental care sub-amount for Visa only. - """ - prescription_amount: NotRequired[int] - """ - Prescription drug sub-amount. Null if the merchant did not send this amount. - """ - purchase_type: NotRequired[Literal["medical", "transit_for_healthcare"]] - """ - The type of healthcare transaction. `medical` for FSA/HSA-eligible healthcare purchases; `transit_for_healthcare` for FSA/HSA-eligible transit for healthcare purchases. - """ - total_qualified_amount: int - """ - Total FSA/HSA-eligible amount in the smallest currency unit. - """ - verification_status: Literal[ - "iias_merchant_exempt", - "iias_merchant_not_certified", - "iias_verified", - "not_verified", - ] - """ - IIAS verification status from the merchant terminal. For Visa, this is always iias_verified. - """ - vision_amount: NotRequired[int] - """ - Vision/optical sub-amount. Null if the merchant did not send this amount. - """ - - class AuthorizationCaptureParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired[int] """ diff --git a/stripe/params/issuing/_transaction_create_force_capture_params.py b/stripe/params/issuing/_transaction_create_force_capture_params.py index 73c92a93f..2d394207d 100644 --- a/stripe/params/issuing/_transaction_create_force_capture_params.py +++ b/stripe/params/issuing/_transaction_create_force_capture_params.py @@ -114,12 +114,6 @@ class TransactionCreateForceCaptureParamsPurchaseDetails(TypedDict): """ Information about fuel that was purchased with this transaction. """ - healthcare: NotRequired[ - "TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare" - ] - """ - Healthcare sub-amounts for IIAS-eligible transactions. - """ lodging: NotRequired[ "TransactionCreateForceCaptureParamsPurchaseDetailsLodging" ] @@ -325,46 +319,6 @@ class TransactionCreateForceCaptureParamsPurchaseDetailsFuel(TypedDict): """ -class TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare(TypedDict): - clinic_amount: NotRequired[int] - """ - Clinic and urgent care sub-amount for Visa only. - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - dental_amount: NotRequired[int] - """ - Dental care sub-amount for Visa only. - """ - prescription_amount: NotRequired[int] - """ - Prescription drug sub-amount. Null if the merchant did not send this amount. - """ - purchase_type: NotRequired[Literal["medical", "transit_for_healthcare"]] - """ - The type of healthcare transaction. `medical` for FSA/HSA-eligible healthcare purchases; `transit_for_healthcare` for FSA/HSA-eligible transit for healthcare purchases. - """ - total_qualified_amount: int - """ - Total FSA/HSA-eligible amount in the smallest currency unit. - """ - verification_status: Literal[ - "iias_merchant_exempt", - "iias_merchant_not_certified", - "iias_verified", - "not_verified", - ] - """ - IIAS verification status from the merchant terminal. For Visa, this is always iias_verified. - """ - vision_amount: NotRequired[int] - """ - Vision/optical sub-amount. Null if the merchant did not send this amount. - """ - - class TransactionCreateForceCaptureParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired[int] """ diff --git a/stripe/params/issuing/_transaction_create_unlinked_refund_params.py b/stripe/params/issuing/_transaction_create_unlinked_refund_params.py index fc9391f73..e538921f7 100644 --- a/stripe/params/issuing/_transaction_create_unlinked_refund_params.py +++ b/stripe/params/issuing/_transaction_create_unlinked_refund_params.py @@ -105,12 +105,6 @@ class TransactionCreateUnlinkedRefundParamsPurchaseDetails(TypedDict): """ Information about fuel that was purchased with this transaction. """ - healthcare: NotRequired[ - "TransactionCreateUnlinkedRefundParamsPurchaseDetailsHealthcare" - ] - """ - Healthcare sub-amounts for IIAS-eligible transactions. - """ lodging: NotRequired[ "TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging" ] @@ -318,48 +312,6 @@ class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFuel(TypedDict): """ -class TransactionCreateUnlinkedRefundParamsPurchaseDetailsHealthcare( - TypedDict -): - clinic_amount: NotRequired[int] - """ - Clinic and urgent care sub-amount for Visa only. - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - dental_amount: NotRequired[int] - """ - Dental care sub-amount for Visa only. - """ - prescription_amount: NotRequired[int] - """ - Prescription drug sub-amount. Null if the merchant did not send this amount. - """ - purchase_type: NotRequired[Literal["medical", "transit_for_healthcare"]] - """ - The type of healthcare transaction. `medical` for FSA/HSA-eligible healthcare purchases; `transit_for_healthcare` for FSA/HSA-eligible transit for healthcare purchases. - """ - total_qualified_amount: int - """ - Total FSA/HSA-eligible amount in the smallest currency unit. - """ - verification_status: Literal[ - "iias_merchant_exempt", - "iias_merchant_not_certified", - "iias_verified", - "not_verified", - ] - """ - IIAS verification status from the merchant terminal. For Visa, this is always iias_verified. - """ - vision_amount: NotRequired[int] - """ - Vision/optical sub-amount. Null if the merchant did not send this amount. - """ - - class TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired[int] """ diff --git a/stripe/params/test_helpers/issuing/__init__.py b/stripe/params/test_helpers/issuing/__init__.py index 1035e88a3..f91edebee 100644 --- a/stripe/params/test_helpers/issuing/__init__.py +++ b/stripe/params/test_helpers/issuing/__init__.py @@ -17,7 +17,6 @@ AuthorizationCaptureParamsPurchaseDetailsFlight as AuthorizationCaptureParamsPurchaseDetailsFlight, AuthorizationCaptureParamsPurchaseDetailsFlightSegment as AuthorizationCaptureParamsPurchaseDetailsFlightSegment, AuthorizationCaptureParamsPurchaseDetailsFuel as AuthorizationCaptureParamsPurchaseDetailsFuel, - AuthorizationCaptureParamsPurchaseDetailsHealthcare as AuthorizationCaptureParamsPurchaseDetailsHealthcare, AuthorizationCaptureParamsPurchaseDetailsLodging as AuthorizationCaptureParamsPurchaseDetailsLodging, AuthorizationCaptureParamsPurchaseDetailsReceipt as AuthorizationCaptureParamsPurchaseDetailsReceipt, ) @@ -121,7 +120,6 @@ TransactionCreateForceCaptureParamsPurchaseDetailsFlight as TransactionCreateForceCaptureParamsPurchaseDetailsFlight, TransactionCreateForceCaptureParamsPurchaseDetailsFlightSegment as TransactionCreateForceCaptureParamsPurchaseDetailsFlightSegment, TransactionCreateForceCaptureParamsPurchaseDetailsFuel as TransactionCreateForceCaptureParamsPurchaseDetailsFuel, - TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare as TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare, TransactionCreateForceCaptureParamsPurchaseDetailsLodging as TransactionCreateForceCaptureParamsPurchaseDetailsLodging, TransactionCreateForceCaptureParamsPurchaseDetailsReceipt as TransactionCreateForceCaptureParamsPurchaseDetailsReceipt, ) @@ -138,7 +136,6 @@ TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlight as TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlight, TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlightSegment as TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlightSegment, TransactionCreateUnlinkedRefundParamsPurchaseDetailsFuel as TransactionCreateUnlinkedRefundParamsPurchaseDetailsFuel, - TransactionCreateUnlinkedRefundParamsPurchaseDetailsHealthcare as TransactionCreateUnlinkedRefundParamsPurchaseDetailsHealthcare, TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging as TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging, TransactionCreateUnlinkedRefundParamsPurchaseDetailsReceipt as TransactionCreateUnlinkedRefundParamsPurchaseDetailsReceipt, ) @@ -196,10 +193,6 @@ "stripe.params.test_helpers.issuing._authorization_capture_params", False, ), - "AuthorizationCaptureParamsPurchaseDetailsHealthcare": ( - "stripe.params.test_helpers.issuing._authorization_capture_params", - False, - ), "AuthorizationCaptureParamsPurchaseDetailsLodging": ( "stripe.params.test_helpers.issuing._authorization_capture_params", False, @@ -452,10 +445,6 @@ "stripe.params.test_helpers.issuing._transaction_create_force_capture_params", False, ), - "TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare": ( - "stripe.params.test_helpers.issuing._transaction_create_force_capture_params", - False, - ), "TransactionCreateForceCaptureParamsPurchaseDetailsLodging": ( "stripe.params.test_helpers.issuing._transaction_create_force_capture_params", False, @@ -512,10 +501,6 @@ "stripe.params.test_helpers.issuing._transaction_create_unlinked_refund_params", False, ), - "TransactionCreateUnlinkedRefundParamsPurchaseDetailsHealthcare": ( - "stripe.params.test_helpers.issuing._transaction_create_unlinked_refund_params", - False, - ), "TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging": ( "stripe.params.test_helpers.issuing._transaction_create_unlinked_refund_params", False, diff --git a/stripe/params/test_helpers/issuing/_authorization_capture_params.py b/stripe/params/test_helpers/issuing/_authorization_capture_params.py index ec76fa5ed..febdc69d9 100644 --- a/stripe/params/test_helpers/issuing/_authorization_capture_params.py +++ b/stripe/params/test_helpers/issuing/_authorization_capture_params.py @@ -48,12 +48,6 @@ class AuthorizationCaptureParamsPurchaseDetails(TypedDict): """ Information about fuel that was purchased with this transaction. """ - healthcare: NotRequired[ - "AuthorizationCaptureParamsPurchaseDetailsHealthcare" - ] - """ - Healthcare sub-amounts for IIAS-eligible transactions. - """ lodging: NotRequired["AuthorizationCaptureParamsPurchaseDetailsLodging"] """ Information about lodging that was purchased with this transaction. @@ -255,46 +249,6 @@ class AuthorizationCaptureParamsPurchaseDetailsFuel(TypedDict): """ -class AuthorizationCaptureParamsPurchaseDetailsHealthcare(TypedDict): - clinic_amount: NotRequired[int] - """ - Clinic and urgent care sub-amount for Visa only. - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - dental_amount: NotRequired[int] - """ - Dental care sub-amount for Visa only. - """ - prescription_amount: NotRequired[int] - """ - Prescription drug sub-amount. Null if the merchant did not send this amount. - """ - purchase_type: NotRequired[Literal["medical", "transit_for_healthcare"]] - """ - The type of healthcare transaction. `medical` for FSA/HSA-eligible healthcare purchases; `transit_for_healthcare` for FSA/HSA-eligible transit for healthcare purchases. - """ - total_qualified_amount: int - """ - Total FSA/HSA-eligible amount in the smallest currency unit. - """ - verification_status: Literal[ - "iias_merchant_exempt", - "iias_merchant_not_certified", - "iias_verified", - "not_verified", - ] - """ - IIAS verification status from the merchant terminal. For Visa, this is always iias_verified. - """ - vision_amount: NotRequired[int] - """ - Vision/optical sub-amount. Null if the merchant did not send this amount. - """ - - class AuthorizationCaptureParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired[int] """ diff --git a/stripe/params/test_helpers/issuing/_transaction_create_force_capture_params.py b/stripe/params/test_helpers/issuing/_transaction_create_force_capture_params.py index f2b75c37d..a65f0e160 100644 --- a/stripe/params/test_helpers/issuing/_transaction_create_force_capture_params.py +++ b/stripe/params/test_helpers/issuing/_transaction_create_force_capture_params.py @@ -113,12 +113,6 @@ class TransactionCreateForceCaptureParamsPurchaseDetails(TypedDict): """ Information about fuel that was purchased with this transaction. """ - healthcare: NotRequired[ - "TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare" - ] - """ - Healthcare sub-amounts for IIAS-eligible transactions. - """ lodging: NotRequired[ "TransactionCreateForceCaptureParamsPurchaseDetailsLodging" ] @@ -324,46 +318,6 @@ class TransactionCreateForceCaptureParamsPurchaseDetailsFuel(TypedDict): """ -class TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare(TypedDict): - clinic_amount: NotRequired[int] - """ - Clinic and urgent care sub-amount for Visa only. - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - dental_amount: NotRequired[int] - """ - Dental care sub-amount for Visa only. - """ - prescription_amount: NotRequired[int] - """ - Prescription drug sub-amount. Null if the merchant did not send this amount. - """ - purchase_type: NotRequired[Literal["medical", "transit_for_healthcare"]] - """ - The type of healthcare transaction. `medical` for FSA/HSA-eligible healthcare purchases; `transit_for_healthcare` for FSA/HSA-eligible transit for healthcare purchases. - """ - total_qualified_amount: int - """ - Total FSA/HSA-eligible amount in the smallest currency unit. - """ - verification_status: Literal[ - "iias_merchant_exempt", - "iias_merchant_not_certified", - "iias_verified", - "not_verified", - ] - """ - IIAS verification status from the merchant terminal. For Visa, this is always iias_verified. - """ - vision_amount: NotRequired[int] - """ - Vision/optical sub-amount. Null if the merchant did not send this amount. - """ - - class TransactionCreateForceCaptureParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired[int] """ diff --git a/stripe/params/test_helpers/issuing/_transaction_create_unlinked_refund_params.py b/stripe/params/test_helpers/issuing/_transaction_create_unlinked_refund_params.py index e54b20e7d..ff2ea80f6 100644 --- a/stripe/params/test_helpers/issuing/_transaction_create_unlinked_refund_params.py +++ b/stripe/params/test_helpers/issuing/_transaction_create_unlinked_refund_params.py @@ -104,12 +104,6 @@ class TransactionCreateUnlinkedRefundParamsPurchaseDetails(TypedDict): """ Information about fuel that was purchased with this transaction. """ - healthcare: NotRequired[ - "TransactionCreateUnlinkedRefundParamsPurchaseDetailsHealthcare" - ] - """ - Healthcare sub-amounts for IIAS-eligible transactions. - """ lodging: NotRequired[ "TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging" ] @@ -317,48 +311,6 @@ class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFuel(TypedDict): """ -class TransactionCreateUnlinkedRefundParamsPurchaseDetailsHealthcare( - TypedDict -): - clinic_amount: NotRequired[int] - """ - Clinic and urgent care sub-amount for Visa only. - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - dental_amount: NotRequired[int] - """ - Dental care sub-amount for Visa only. - """ - prescription_amount: NotRequired[int] - """ - Prescription drug sub-amount. Null if the merchant did not send this amount. - """ - purchase_type: NotRequired[Literal["medical", "transit_for_healthcare"]] - """ - The type of healthcare transaction. `medical` for FSA/HSA-eligible healthcare purchases; `transit_for_healthcare` for FSA/HSA-eligible transit for healthcare purchases. - """ - total_qualified_amount: int - """ - Total FSA/HSA-eligible amount in the smallest currency unit. - """ - verification_status: Literal[ - "iias_merchant_exempt", - "iias_merchant_not_certified", - "iias_verified", - "not_verified", - ] - """ - IIAS verification status from the merchant terminal. For Visa, this is always iias_verified. - """ - vision_amount: NotRequired[int] - """ - Vision/optical sub-amount. Null if the merchant did not send this amount. - """ - - class TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging(TypedDict): check_in_at: NotRequired[int] """ diff --git a/stripe/params/v2/core/_account_evaluation_create_params.py b/stripe/params/v2/core/_account_evaluation_create_params.py index 62021121e..bcedb379f 100644 --- a/stripe/params/v2/core/_account_evaluation_create_params.py +++ b/stripe/params/v2/core/_account_evaluation_create_params.py @@ -16,6 +16,7 @@ class AccountEvaluationCreateParams(TypedDict): signals: List[ Union[ Literal[ + "account_takeover", "fraudulent_website", "user_account_sharing", "user_merchant_fit", diff --git a/stripe/params/v2/signals/__init__.py b/stripe/params/v2/signals/__init__.py index d922417f6..8b5142e72 100644 --- a/stripe/params/v2/signals/__init__.py +++ b/stripe/params/v2/signals/__init__.py @@ -15,10 +15,15 @@ AccountActivityCreateParamsAccountRestricted as AccountActivityCreateParamsAccountRestricted, AccountActivityCreateParamsAccountReviewed as AccountActivityCreateParamsAccountReviewed, AccountActivityCreateParamsAccountSuspended as AccountActivityCreateParamsAccountSuspended, + AccountActivityCreateParamsAccountTakeoverConfirmation as AccountActivityCreateParamsAccountTakeoverConfirmation, + AccountActivityCreateParamsAccountTakeoverReport as AccountActivityCreateParamsAccountTakeoverReport, + AccountActivityCreateParamsCredentialChange as AccountActivityCreateParamsCredentialChange, AccountActivityCreateParamsLoginAttempt as AccountActivityCreateParamsLoginAttempt, AccountActivityCreateParamsLoginAttemptClientDetails as AccountActivityCreateParamsLoginAttemptClientDetails, AccountActivityCreateParamsLoginAttemptClientDetailsData as AccountActivityCreateParamsLoginAttemptClientDetailsData, AccountActivityCreateParamsLoginDecision as AccountActivityCreateParamsLoginDecision, + AccountActivityCreateParamsMfaAddition as AccountActivityCreateParamsMfaAddition, + AccountActivityCreateParamsMfaRemoval as AccountActivityCreateParamsMfaRemoval, AccountActivityCreateParamsRegistrationAttempt as AccountActivityCreateParamsRegistrationAttempt, AccountActivityCreateParamsRegistrationAttemptClientDetails as AccountActivityCreateParamsRegistrationAttemptClientDetails, AccountActivityCreateParamsRegistrationAttemptClientDetailsData as AccountActivityCreateParamsRegistrationAttemptClientDetailsData, @@ -34,9 +39,14 @@ AccountEvaluationCreateParams as AccountEvaluationCreateParams, AccountEvaluationCreateParamsAccountActivityDetails as AccountEvaluationCreateParamsAccountActivityDetails, AccountEvaluationCreateParamsAccountActivityDetailsData as AccountEvaluationCreateParamsAccountActivityDetailsData, + AccountEvaluationCreateParamsAccountActivityDetailsDataAccountTakeoverConfirmation as AccountEvaluationCreateParamsAccountActivityDetailsDataAccountTakeoverConfirmation, + AccountEvaluationCreateParamsAccountActivityDetailsDataAccountTakeoverReport as AccountEvaluationCreateParamsAccountActivityDetailsDataAccountTakeoverReport, + AccountEvaluationCreateParamsAccountActivityDetailsDataCredentialChange as AccountEvaluationCreateParamsAccountActivityDetailsDataCredentialChange, AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttempt as AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttempt, AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientDetails as AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientDetails, AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientDetailsData as AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientDetailsData, + AccountEvaluationCreateParamsAccountActivityDetailsDataMfaAddition as AccountEvaluationCreateParamsAccountActivityDetailsDataMfaAddition, + AccountEvaluationCreateParamsAccountActivityDetailsDataMfaRemoval as AccountEvaluationCreateParamsAccountActivityDetailsDataMfaRemoval, AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttempt as AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttempt, AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttemptClientDetails as AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttemptClientDetails, AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttemptClientDetailsData as AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttemptClientDetailsData, @@ -115,6 +125,18 @@ "stripe.params.v2.signals._account_activity_create_params", False, ), + "AccountActivityCreateParamsAccountTakeoverConfirmation": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsAccountTakeoverReport": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsCredentialChange": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), "AccountActivityCreateParamsLoginAttempt": ( "stripe.params.v2.signals._account_activity_create_params", False, @@ -131,6 +153,14 @@ "stripe.params.v2.signals._account_activity_create_params", False, ), + "AccountActivityCreateParamsMfaAddition": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsMfaRemoval": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), "AccountActivityCreateParamsRegistrationAttempt": ( "stripe.params.v2.signals._account_activity_create_params", False, @@ -167,6 +197,18 @@ "stripe.params.v2.signals._account_evaluation_create_params", False, ), + "AccountEvaluationCreateParamsAccountActivityDetailsDataAccountTakeoverConfirmation": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountActivityDetailsDataAccountTakeoverReport": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountActivityDetailsDataCredentialChange": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), "AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttempt": ( "stripe.params.v2.signals._account_evaluation_create_params", False, @@ -179,6 +221,14 @@ "stripe.params.v2.signals._account_evaluation_create_params", False, ), + "AccountEvaluationCreateParamsAccountActivityDetailsDataMfaAddition": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountActivityDetailsDataMfaRemoval": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), "AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttempt": ( "stripe.params.v2.signals._account_evaluation_create_params", False, diff --git a/stripe/params/v2/signals/_account_activity_create_params.py b/stripe/params/v2/signals/_account_activity_create_params.py index ff02c0b7c..eb271406f 100644 --- a/stripe/params/v2/signals/_account_activity_create_params.py +++ b/stripe/params/v2/signals/_account_activity_create_params.py @@ -33,6 +33,24 @@ class AccountActivityCreateParams(TypedDict): Details for the account suspension. Provide only when type is account_suspended. The activity requires an existing account_details.customer; account_details.account and inline data are unsupported. """ + account_takeover_confirmation: NotRequired[ + "AccountActivityCreateParamsAccountTakeoverConfirmation" + ] + """ + Required when type is account_takeover_confirmation. Requires an existing customer or account with a customer configuration. + """ + account_takeover_report: NotRequired[ + "AccountActivityCreateParamsAccountTakeoverReport" + ] + """ + Required when type is account_takeover_report. Requires an existing customer or account with a customer configuration. + """ + credential_change: NotRequired[ + "AccountActivityCreateParamsCredentialChange" + ] + """ + Required when type is credential_change. Requires an existing customer or account with a customer configuration. + """ login_attempt: NotRequired["AccountActivityCreateParamsLoginAttempt"] """ Details for the login attempt. Provide only when type is login_attempt. @@ -45,6 +63,14 @@ class AccountActivityCreateParams(TypedDict): """ Additional information about the activity. """ + mfa_addition: NotRequired["AccountActivityCreateParamsMfaAddition"] + """ + Required when type is mfa_addition. Requires an existing customer or account with a customer configuration. + """ + mfa_removal: NotRequired["AccountActivityCreateParamsMfaRemoval"] + """ + Required when type is mfa_removal. Requires an existing customer or account with a customer configuration. + """ occurred_at: NotRequired[str] """ Timestamp at which the activity occurred. Defaults to the created time if not provided. @@ -66,8 +92,14 @@ class AccountActivityCreateParams(TypedDict): "account_restricted", "account_reviewed", "account_suspended", + "account_takeover_confirmation", + "account_takeover_mitigation", + "account_takeover_report", + "credential_change", "login_attempt", "login_decision", + "mfa_addition", + "mfa_removal", "registration_attempt", "registration_decision", ], @@ -173,6 +205,27 @@ class AccountActivityCreateParamsAccountSuspended(TypedDict): """ +class AccountActivityCreateParamsAccountTakeoverConfirmation(TypedDict): + credential_type: Union[Literal["api_key", "login_password", "other"], str] + """ + The type of credential involved in the confirmed takeover. + """ + + +class AccountActivityCreateParamsAccountTakeoverReport(TypedDict): + credential_type: Union[Literal["api_key", "login_password", "other"], str] + """ + The type of credential involved in the reported takeover. + """ + + +class AccountActivityCreateParamsCredentialChange(TypedDict): + credential_type: Union[Literal["api_key", "login_password", "other"], str] + """ + The type of credential that changed. + """ + + class AccountActivityCreateParamsLoginAttempt(TypedDict): client_details: "AccountActivityCreateParamsLoginAttemptClientDetails" """ @@ -215,6 +268,26 @@ class AccountActivityCreateParamsLoginDecision(TypedDict): """ +class AccountActivityCreateParamsMfaAddition(TypedDict): + mfa_type: Union[ + Literal["authenticator_app", "email", "hardware_key", "other", "sms"], + str, + ] + """ + The authentication method added to the account. + """ + + +class AccountActivityCreateParamsMfaRemoval(TypedDict): + mfa_type: Union[ + Literal["authenticator_app", "email", "hardware_key", "other", "sms"], + str, + ] + """ + The authentication method removed from the account. + """ + + class AccountActivityCreateParamsRegistrationAttempt(TypedDict): client_details: ( "AccountActivityCreateParamsRegistrationAttemptClientDetails" diff --git a/stripe/params/v2/signals/_account_evaluation_create_params.py b/stripe/params/v2/signals/_account_evaluation_create_params.py index 9b102fed5..652147eaf 100644 --- a/stripe/params/v2/signals/_account_evaluation_create_params.py +++ b/stripe/params/v2/signals/_account_evaluation_create_params.py @@ -18,6 +18,7 @@ class AccountEvaluationCreateParams(TypedDict): requested_signals: List[ Union[ Literal[ + "account_takeover", "fraudulent_website", "user_account_sharing", "user_merchant_fit", @@ -45,12 +46,42 @@ class AccountEvaluationCreateParamsAccountActivityDetails(TypedDict): class AccountEvaluationCreateParamsAccountActivityDetailsData(TypedDict): + account_takeover_confirmation: NotRequired[ + "AccountEvaluationCreateParamsAccountActivityDetailsDataAccountTakeoverConfirmation" + ] + """ + Required when type is account_takeover_confirmation. Requires an existing customer or account with a customer configuration. + """ + account_takeover_report: NotRequired[ + "AccountEvaluationCreateParamsAccountActivityDetailsDataAccountTakeoverReport" + ] + """ + Required when type is account_takeover_report. Requires an existing customer or account with a customer configuration. + """ + credential_change: NotRequired[ + "AccountEvaluationCreateParamsAccountActivityDetailsDataCredentialChange" + ] + """ + Required when type is credential_change. Requires an existing customer or account with a customer configuration. + """ login_attempt: NotRequired[ "AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttempt" ] """ Details for the login attempt. Provide only when type is login_attempt. """ + mfa_addition: NotRequired[ + "AccountEvaluationCreateParamsAccountActivityDetailsDataMfaAddition" + ] + """ + Required when type is mfa_addition. Requires an existing customer or account with a customer configuration. + """ + mfa_removal: NotRequired[ + "AccountEvaluationCreateParamsAccountActivityDetailsDataMfaRemoval" + ] + """ + Required when type is mfa_removal. Requires an existing customer or account with a customer configuration. + """ occurred_at: NotRequired[str] """ Timestamp at which the activity occurred. Defaults to the created time if not provided. @@ -66,15 +97,49 @@ class AccountEvaluationCreateParamsAccountActivityDetailsData(TypedDict): "account_restricted", "account_reviewed", "account_suspended", + "account_takeover_confirmation", + "account_takeover_mitigation", + "account_takeover_report", + "credential_change", "login_attempt", "login_decision", + "mfa_addition", + "mfa_removal", "registration_attempt", "registration_decision", ], str, ] """ - The type of activity. Must be registration_attempt or login_attempt. + The type of activity. Supports registration_attempt, login_attempt, mfa_addition, mfa_removal, + credential_change, account_takeover_report, account_takeover_confirmation, or account_takeover_mitigation. + """ + + +class AccountEvaluationCreateParamsAccountActivityDetailsDataAccountTakeoverConfirmation( + TypedDict, +): + credential_type: Union[Literal["api_key", "login_password", "other"], str] + """ + The type of credential involved in the confirmed takeover. + """ + + +class AccountEvaluationCreateParamsAccountActivityDetailsDataAccountTakeoverReport( + TypedDict, +): + credential_type: Union[Literal["api_key", "login_password", "other"], str] + """ + The type of credential involved in the reported takeover. + """ + + +class AccountEvaluationCreateParamsAccountActivityDetailsDataCredentialChange( + TypedDict, +): + credential_type: Union[Literal["api_key", "login_password", "other"], str] + """ + The type of credential that changed. """ @@ -119,6 +184,30 @@ class AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientD """ +class AccountEvaluationCreateParamsAccountActivityDetailsDataMfaAddition( + TypedDict, +): + mfa_type: Union[ + Literal["authenticator_app", "email", "hardware_key", "other", "sms"], + str, + ] + """ + The authentication method added to the account. + """ + + +class AccountEvaluationCreateParamsAccountActivityDetailsDataMfaRemoval( + TypedDict, +): + mfa_type: Union[ + Literal["authenticator_app", "email", "hardware_key", "other", "sms"], + str, + ] + """ + The authentication method removed from the account. + """ + + class AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttempt( TypedDict, ): diff --git a/stripe/params/v2/signals/_account_signal_list_params.py b/stripe/params/v2/signals/_account_signal_list_params.py index 955c6519a..35e8a053a 100644 --- a/stripe/params/v2/signals/_account_signal_list_params.py +++ b/stripe/params/v2/signals/_account_signal_list_params.py @@ -17,6 +17,8 @@ class AccountSignalListParams(TypedDict): type: List[ Union[ Literal[ + "account_takeover", + "customer_risk", "fraudulent_merchant", "fraudulent_website", "merchant_delinquency", diff --git a/stripe/radar/_payment_evaluation.py b/stripe/radar/_payment_evaluation.py index 99df22387..2223fba56 100644 --- a/stripe/radar/_payment_evaluation.py +++ b/stripe/radar/_payment_evaluation.py @@ -670,7 +670,7 @@ class FraudulentPayment(StripeObject): """ early_fraud_warning: Optional[EarlyFraudWarning] """ - The likelihood that this `PaymentEvaluation` results in an early fraud warning. + A payment evaluation signal with evaluated_at, risk_level, and score fields. """ fraudulent_dispute: Optional[FraudulentDispute] """ diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index 359141e18..acc1810ad 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -66,7 +66,9 @@ class TaxId(StripeObject): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -96,6 +98,7 @@ class TaxId(StripeObject): "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -105,6 +108,9 @@ class TaxId(StripeObject): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", "gi_tin", @@ -116,6 +122,7 @@ class TaxId(StripeObject): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -131,23 +138,28 @@ class TaxId(StripeObject): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -157,12 +169,15 @@ class TaxId(StripeObject): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -181,7 +196,7 @@ class TaxId(StripeObject): str, ] """ - 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`, `ic_nif`, 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`, `au_acn`, `nz_bn`, `pt_nif`, `cz_dic`, `fr_siret`, `fr_siren`, `fr_spi`, `sm_coe`, `tt_vat`, `tt_bir`, `mu_vat`, `mz_nuit`, `au_wpn`, `md_cf`, `is_kt`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, `ic_nif`, or `unknown` """ value: str """ diff --git a/stripe/tax/_registration.py b/stripe/tax/_registration.py index 5809805af..76258a739 100644 --- a/stripe/tax/_registration.py +++ b/stripe/tax/_registration.py @@ -198,6 +198,12 @@ class Bs(StripeObject): Type of registration in `country`. """ + class Bw(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class By(StripeObject): type: Literal["simplified"] """ @@ -242,6 +248,12 @@ class Standard(StripeObject): """ _inner_class_types = {"standard": Standard} + class Ci(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Cl(StripeObject): type: Literal["simplified"] """ @@ -466,6 +478,12 @@ class Ge(StripeObject): Type of registration in `country`. """ + class Gh(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Gn(StripeObject): type: Literal["standard"] """ @@ -740,6 +758,12 @@ class Standard(StripeObject): """ _inner_class_types = {"standard": Standard} + class Mu(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Mx(StripeObject): type: Literal["simplified"] """ @@ -1253,10 +1277,12 @@ class Zw(StripeObject): bh: Optional[Bh] bj: Optional[Bj] bs: Optional[Bs] + bw: Optional[Bw] by: Optional[By] ca: Optional[Ca] cd: Optional[Cd] ch: Optional[Ch] + ci: Optional[Ci] cl: Optional[Cl] cm: Optional[Cm] co: Optional[Co] @@ -1275,6 +1301,7 @@ class Zw(StripeObject): fr: Optional[Fr] gb: Optional[Gb] ge: Optional[Ge] + gh: Optional[Gh] gn: Optional[Gn] gr: Optional[Gr] hr: Optional[Hr] @@ -1301,6 +1328,7 @@ class Zw(StripeObject): mk: Optional[Mk] mr: Optional[Mr] mt: Optional[Mt] + mu: Optional[Mu] mx: Optional[Mx] my: Optional[My] ng: Optional[Ng] @@ -1355,10 +1383,12 @@ class Zw(StripeObject): "bh": Bh, "bj": Bj, "bs": Bs, + "bw": Bw, "by": By, "ca": Ca, "cd": Cd, "ch": Ch, + "ci": Ci, "cl": Cl, "cm": Cm, "co": Co, @@ -1377,6 +1407,7 @@ class Zw(StripeObject): "fr": Fr, "gb": Gb, "ge": Ge, + "gh": Gh, "gn": Gn, "gr": Gr, "hr": Hr, @@ -1403,6 +1434,7 @@ class Zw(StripeObject): "mk": Mk, "mr": Mr, "mt": Mt, + "mu": Mu, "mx": Mx, "my": My, "ng": Ng, diff --git a/stripe/tax/_transaction.py b/stripe/tax/_transaction.py index d575f153e..d738e533f 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -69,7 +69,9 @@ class TaxId(StripeObject): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -99,6 +101,7 @@ class TaxId(StripeObject): "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -108,6 +111,9 @@ class TaxId(StripeObject): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", "gi_tin", @@ -119,6 +125,7 @@ class TaxId(StripeObject): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -134,23 +141,28 @@ class TaxId(StripeObject): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -160,12 +172,15 @@ class TaxId(StripeObject): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -184,7 +199,7 @@ class TaxId(StripeObject): str, ] """ - 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`, `ic_nif`, 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`, `au_acn`, `nz_bn`, `pt_nif`, `cz_dic`, `fr_siret`, `fr_siren`, `fr_spi`, `sm_coe`, `tt_vat`, `tt_bir`, `mu_vat`, `mz_nuit`, `au_wpn`, `md_cf`, `is_kt`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, `ic_nif`, or `unknown` """ value: str """ diff --git a/stripe/test_helpers/_customer_service.py b/stripe/test_helpers/_customer_service.py index e6b651ff3..2b1c58fcd 100644 --- a/stripe/test_helpers/_customer_service.py +++ b/stripe/test_helpers/_customer_service.py @@ -24,7 +24,7 @@ def fund_cash_balance( options: Optional["RequestOptions"] = None, ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ return cast( "CustomerCashBalanceTransaction", @@ -47,7 +47,7 @@ async def fund_cash_balance_async( options: Optional["RequestOptions"] = None, ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ return cast( "CustomerCashBalanceTransaction", diff --git a/stripe/v2/core/_account_evaluation.py b/stripe/v2/core/_account_evaluation.py index a03c620bb..bc4806d3a 100644 --- a/stripe/v2/core/_account_evaluation.py +++ b/stripe/v2/core/_account_evaluation.py @@ -78,6 +78,7 @@ class BusinessDetails(StripeObject): evaluations_triggered: List[ Union[ Literal[ + "account_takeover", "fraudulent_website", "user_account_sharing", "user_merchant_fit", diff --git a/stripe/v2/signals/_account_activity.py b/stripe/v2/signals/_account_activity.py index 245bb4b0a..bad69651d 100644 --- a/stripe/v2/signals/_account_activity.py +++ b/stripe/v2/signals/_account_activity.py @@ -96,6 +96,30 @@ class AccountSuspended(StripeObject): The reason the customer was suspended. """ + class AccountTakeoverConfirmation(StripeObject): + credential_type: Union[ + Literal["api_key", "login_password", "other"], str + ] + """ + The type of credential involved in the confirmed takeover. + """ + + class AccountTakeoverReport(StripeObject): + credential_type: Union[ + Literal["api_key", "login_password", "other"], str + ] + """ + The type of credential involved in the reported takeover. + """ + + class CredentialChange(StripeObject): + credential_type: Union[ + Literal["api_key", "login_password", "other"], str + ] + """ + The type of credential that changed. + """ + class LoginAttempt(StripeObject): class ClientDetails(StripeObject): class Data(StripeObject): @@ -134,6 +158,28 @@ class LoginDecision(StripeObject): The action the merchant took following the evaluation. """ + class MfaAddition(StripeObject): + mfa_type: Union[ + Literal[ + "authenticator_app", "email", "hardware_key", "other", "sms" + ], + str, + ] + """ + The authentication method added to the account. + """ + + class MfaRemoval(StripeObject): + mfa_type: Union[ + Literal[ + "authenticator_app", "email", "hardware_key", "other", "sms" + ], + str, + ] + """ + The authentication method removed from the account. + """ + class RegistrationAttempt(StripeObject): class ClientDetails(StripeObject): class Data(StripeObject): @@ -195,10 +241,22 @@ class RegistrationDecision(StripeObject): Details for the account suspension. Present only when type is account_suspended. The activity requires an existing account_details.customer; account_details.account and inline data are unsupported. """ + account_takeover_confirmation: Optional[AccountTakeoverConfirmation] + """ + Details for the merchant's takeover confirmation. Present only when type is account_takeover_confirmation. + """ + account_takeover_report: Optional[AccountTakeoverReport] + """ + Details for the account holder's takeover report. Present only when type is account_takeover_report. + """ created: str """ Timestamp at which the account activity was created. """ + credential_change: Optional[CredentialChange] + """ + Details for the credential change. Present only when type is credential_change. + """ id: str """ Unique identifier for the account activity. @@ -219,6 +277,14 @@ class RegistrationDecision(StripeObject): """ Additional information about the activity. """ + mfa_addition: Optional[MfaAddition] + """ + Details for the MFA addition. Present only when type is mfa_addition. + """ + mfa_removal: Optional[MfaRemoval] + """ + Details for the MFA removal. Present only when type is mfa_removal. + """ object: Literal["v2.signals.account_activity"] """ String representing the object's type. Objects of the same type share the same value of the object field. @@ -240,8 +306,14 @@ class RegistrationDecision(StripeObject): "account_restricted", "account_reviewed", "account_suspended", + "account_takeover_confirmation", + "account_takeover_mitigation", + "account_takeover_report", + "credential_change", "login_attempt", "login_decision", + "mfa_addition", + "mfa_removal", "registration_attempt", "registration_decision", ], @@ -255,8 +327,13 @@ class RegistrationDecision(StripeObject): "account_restricted": AccountRestricted, "account_reviewed": AccountReviewed, "account_suspended": AccountSuspended, + "account_takeover_confirmation": AccountTakeoverConfirmation, + "account_takeover_report": AccountTakeoverReport, + "credential_change": CredentialChange, "login_attempt": LoginAttempt, "login_decision": LoginDecision, + "mfa_addition": MfaAddition, + "mfa_removal": MfaRemoval, "registration_attempt": RegistrationAttempt, "registration_decision": RegistrationDecision, } diff --git a/stripe/v2/signals/_account_evaluation.py b/stripe/v2/signals/_account_evaluation.py index 00042c3a6..f49d974ff 100644 --- a/stripe/v2/signals/_account_evaluation.py +++ b/stripe/v2/signals/_account_evaluation.py @@ -86,6 +86,22 @@ class BusinessDetails(StripeObject): _inner_class_types = {"data": Data} class EvaluatedSignals(StripeObject): + class AccountTakeover(StripeObject): + evaluated_at: Optional[str] + """ + Timestamp at which the signal was evaluated. + """ + risk_level: Literal[ + "elevated", "highest", "low", "normal", "unknown" + ] + """ + Categorical assessment of the account takeover risk. + """ + signal: Optional[str] + """ + The account signal ID containing the full account takeover signal result. + """ + class FraudulentWebsite(StripeObject): details: Optional[str] """ @@ -169,6 +185,10 @@ class UserMultiAccounting(StripeObject): """ _field_encodings = {"score": "decimal_string"} + account_takeover: Optional[AccountTakeover] + """ + Synchronous account takeover result for the evaluation, when requested. + """ fraudulent_website: Optional[FraudulentWebsite] """ Fraudulent website result for the evaluation, when available. @@ -186,6 +206,7 @@ class UserMultiAccounting(StripeObject): User multi-accounting result for the evaluation, when available. """ _inner_class_types = { + "account_takeover": AccountTakeover, "fraudulent_website": FraudulentWebsite, "user_account_sharing": UserAccountSharing, "user_merchant_fit": UserMerchantFit, @@ -223,6 +244,7 @@ class UserMultiAccounting(StripeObject): pending_signals: List[ Union[ Literal[ + "account_takeover", "fraudulent_website", "user_account_sharing", "user_merchant_fit", @@ -237,6 +259,7 @@ class UserMultiAccounting(StripeObject): requested_signals: List[ Union[ Literal[ + "account_takeover", "fraudulent_website", "user_account_sharing", "user_merchant_fit", diff --git a/stripe/v2/signals/_account_signal.py b/stripe/v2/signals/_account_signal.py index 8dfd5de6f..c8d73ca60 100644 --- a/stripe/v2/signals/_account_signal.py +++ b/stripe/v2/signals/_account_signal.py @@ -28,6 +28,18 @@ class AccountDetails(StripeObject): The v1 customer ID of the account, for users not yet migrated to v2/accounts. """ + class AccountTakeover(StripeObject): + risk_level: Literal["elevated", "highest", "low", "normal", "unknown"] + """ + Categorical assessment of the account takeover risk. + """ + + class CustomerRisk(StripeObject): + risk_level: Literal["elevated", "highest", "low", "normal", "unknown"] + """ + Categorical assessment of the customer's risk of fraudulent or abusive activity. + """ + class FraudulentMerchant(StripeObject): class AdditionalDetails(StripeObject): class Indicator(StripeObject): @@ -243,10 +255,18 @@ class UserMultiAccounting(StripeObject): """ The account evaluation that produced this signal, if applicable. """ + account_takeover: Optional[AccountTakeover] + """ + Data for the account takeover signal. Present only when type is account_takeover. + """ created: str """ Timestamp at which the signal was created. """ + customer_risk: Optional[CustomerRisk] + """ + Data for the customer risk signal. Present only when type is customer_risk. + """ fraudulent_merchant: Optional[FraudulentMerchant] """ Data for the fraudulent merchant signal. Present only when type is fraudulent_merchant. @@ -277,6 +297,8 @@ class UserMultiAccounting(StripeObject): """ type: Union[ Literal[ + "account_takeover", + "customer_risk", "fraudulent_merchant", "fraudulent_website", "merchant_delinquency", @@ -304,6 +326,8 @@ class UserMultiAccounting(StripeObject): """ _inner_class_types = { "account_details": AccountDetails, + "account_takeover": AccountTakeover, + "customer_risk": CustomerRisk, "fraudulent_merchant": FraudulentMerchant, "fraudulent_website": FraudulentWebsite, "merchant_delinquency": MerchantDelinquency, diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 4db089549..ca5e6b749 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -50986,13 +50986,17 @@ def test_v2_signals_account_activity_post_service( http_client=http_client_mock.get_mock_http_client(), ) - client.v2.signals.account_activities.create({"type": "login_attempt"}) + client.v2.signals.account_activities.create( + { + "type": "registration_decision", + } + ) http_client_mock.assert_requested( "post", path="/v2/signals/account_activities", query_string="", api_base="https://api.stripe.com", - post_data='{"type":"login_attempt"}', + post_data='{"type":"registration_decision"}', is_json=True, ) @@ -51069,7 +51073,7 @@ def test_v2_signals_account_evaluation_post_service( }, }, }, - "requested_signals": ["user_merchant_fit"], + "requested_signals": ["fraudulent_website"], } ) http_client_mock.assert_requested( @@ -51077,7 +51081,7 @@ def test_v2_signals_account_evaluation_post_service( path="/v2/signals/account_evaluations", query_string="", api_base="https://api.stripe.com", - post_data='{"account_details":{"account":"account","customer":"customer","data":{"contact_email":"contact_email","defaults":{"profile":{"business_url":"business_url","doing_business_as":"doing_business_as","product_description":"product_description"}},"identity":{"business_details":{"registered_name":"registered_name"}}}},"requested_signals":["user_merchant_fit"]}', + post_data='{"account_details":{"account":"account","customer":"customer","data":{"contact_email":"contact_email","defaults":{"profile":{"business_url":"business_url","doing_business_as":"doing_business_as","product_description":"product_description"}},"identity":{"business_details":{"registered_name":"registered_name"}}}},"requested_signals":["fraudulent_website"]}', is_json=True, ) @@ -51107,22 +51111,18 @@ def test_v2_signals_account_signal_get_service( http_client_mock.stub_request( "get", "/v2/signals/account_signals", - "type[0]=payment_delinquency_exposure", + "type[0]=account_takeover", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.signals.account_signals.list( - { - "type": ["payment_delinquency_exposure"], - } - ) + client.v2.signals.account_signals.list({"type": ["account_takeover"]}) http_client_mock.assert_requested( "get", path="/v2/signals/account_signals", - query_string="type[0]=payment_delinquency_exposure", + query_string="type[0]=account_takeover", api_base="https://api.stripe.com", )