diff --git a/.hark/changes/2026-10-21_stripe-openapi_ec7b311e.change.md b/.hark/changes/2026-10-21_stripe-openapi_ec7b311e.change.md new file mode 100644 index 000000000..6fe6e2839 --- /dev/null +++ b/.hark/changes/2026-10-21_stripe-openapi_ec7b311e.change.md @@ -0,0 +1,54 @@ +--- +title: Update generated code +pr_url: https://github.com/stripe/stripe-python/pull/1945 +semver_level: major +is_stripe_api_change: true +--- + +* Add support for new resources `risk.Form` and `v2.data.SearchResultList` +* Add support for `modify` and `retrieve` methods on resource `risk.Form` +* Add support for `search` method on resource `v2.data.SearchResultList` +* Add support for `business_profile_management` and `reporting_chart` on `AccountSession.Component` +* 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 `subscription_pause` on `BillingPortal.Configuration.Feature` +* Change `BillingPortal.Session.Flow.subscription_pause` 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 `metronome_commit` on `Checkout.Session.Item` and `checkout.SessionCreateParamsItem` +* Add support for `adjustable_quantity` on `checkout.SessionCreateParamsItemSubscriptionItem` +* Add support for new value `metronome_commit` on enums `Checkout.Session.Item.type` and `checkout.SessionCreateParamsItem.type` +* 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 `details` on `Identity.VerificationReport.Email` +* ⚠️ Remove support for value `email` from enums `Identity.VerificationReport.type` and `Identity.VerificationSession.type` +* Add support for `merchant_amount_exchange_rate` on `issuing.AuthorizationCaptureParams`, `issuing.AuthorizationCreateParams`, and `issuing.TransactionCreateForceCaptureParams` +* Add support for `type` on `Issuing.Authorization` and `issuing.AuthorizationCreateParams` +* Add support for `settlement_details` on `issuing.AuthorizationCaptureParams` and `issuing.TransactionCreateForceCaptureParams` +* ⚠️ Remove support for `healthcare` on `issuing.AuthorizationCaptureParamsPurchaseDetail`, `issuing.TransactionCreateForceCaptureParamsPurchaseDetail`, and `issuing.TransactionCreateUnlinkedRefundParamsPurchaseDetail` +* Add support for `product_eligibility_inquiry` on `Issuing.Authorization` +* 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 `reference_status` and `reference` on `Refund.DestinationDetail.AfterpayClearpay`, `Refund.DestinationDetail.Klarna`, and `Refund.DestinationDetail.Paypal` +* 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 `czk`, `nok`, `pln`, and `sek` on `V2.Core.Account.Configuration.MoneyManager.Capability.BusinessStorage.Inbound`, `V2.Core.Account.Configuration.MoneyManager.Capability.BusinessStorage.Outbound`, `v2.core.AccountCreateParamsConfigurationMoneyManagerCapabilityBusinessStorageInbound`, `v2.core.AccountCreateParamsConfigurationMoneyManagerCapabilityBusinessStorageOutbound`, `v2.core.AccountModifyParamsConfigurationMoneyManagerCapabilityBusinessStorageInbound`, and `v2.core.AccountModifyParamsConfigurationMoneyManagerCapabilityBusinessStorageOutbound` +* Add support for `stablecoin_custodial` on `V2.Core.Account.Configuration.Recipient.Capability.StripeBalance`, `v2.core.AccountCreateParamsConfigurationRecipientCapabilityStripeBalance`, and `v2.core.AccountModifyParamsConfigurationRecipientCapabilityStripeBalance` +* Add support for new value `stripe_balance.stablecoin_custodial` on enums `V2.Core.Account.FutureRequirement.Entry.Impact.RestrictsCapability.capability` and `V2.Core.Account.Requirement.Entry.Impact.RestrictsCapability.capability` +* 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 new values `business_storage.inbound.czk`, `business_storage.inbound.nok`, `business_storage.inbound.pln`, `business_storage.inbound.sek`, `business_storage.outbound.czk`, `business_storage.outbound.nok`, `business_storage.outbound.pln`, and `business_storage.outbound.sek` on enum `EventsV2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent.updated_capability` +* Add support for new value `stripe_balance.stablecoin_custodial` on enum `EventsV2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.updated_capability` +* Add support for event notification `V2SignalsAccountSignalCustomerRiskReadyEvent` with related object `v2.signals.AccountSignal` diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 52d81e8f1..b6d3304f3 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -ee856c792d5b7bc7c9a55588bd92531c2774e744 \ No newline at end of file +3a5e392ca3f7564fd6496837a3ccc9bb5d2647cd \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 24341e773..e22bc4e25 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2562 \ No newline at end of file +v2588 \ No newline at end of file diff --git a/stripe/__init__.py b/stripe/__init__.py index 2d4c5fc72..9d2935112 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -170,6 +170,7 @@ def add_beta_version( radar as radar, reporting as reporting, reserve as reserve, + risk as risk, shared_payment as shared_payment, sigma as sigma, tax as tax, @@ -591,6 +592,7 @@ def add_beta_version( ) from stripe._review import Review as Review from stripe._review_service import ReviewService as ReviewService + from stripe._risk_service import RiskService as RiskService from stripe._risk_signals import RiskSignals as RiskSignals from stripe._search_result_object import ( SearchResultObject as SearchResultObject, @@ -727,6 +729,7 @@ def add_beta_version( "radar": ("stripe.radar", True), "reporting": ("stripe.reporting", True), "reserve": ("stripe.reserve", True), + "risk": ("stripe.risk", True), "shared_payment": ("stripe.shared_payment", True), "sigma": ("stripe.sigma", True), "tax": ("stripe.tax", True), @@ -1077,6 +1080,7 @@ def add_beta_version( "ReserveTransaction": ("stripe._reserve_transaction", False), "Review": ("stripe._review", False), "ReviewService": ("stripe._review_service", False), + "RiskService": ("stripe._risk_service", False), "RiskSignals": ("stripe._risk_signals", False), "SearchResultObject": ("stripe._search_result_object", False), "SearchableAPIResource": ("stripe._searchable_api_resource", False), diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 19c4ce1a9..5b4b8d98e 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -135,6 +135,17 @@ class Features(StripeObject): features: Features _inner_class_types = {"features": Features} + class BusinessProfileManagement(StripeObject): + class Features(StripeObject): + pass + + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: Features + _inner_class_types = {"features": Features} + class CapitalFinancing(StripeObject): class Features(StripeObject): pass @@ -634,6 +645,17 @@ class Features(StripeObject): features: Features _inner_class_types = {"features": Features} + class ReportingChart(StripeObject): + class Features(StripeObject): + pass + + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: Features + _inner_class_types = {"features": Features} + class TaxRegistrations(StripeObject): class Features(StripeObject): pass @@ -690,6 +712,10 @@ class Features(StripeObject): """ Configuration for the [Bills](https://docs.stripe.com/connect/supported-embedded-components/bills/) embedded component. """ + business_profile_management: Optional[BusinessProfileManagement] + """ + Configuration for the [Business profile management](https://docs.stripe.com/connect/supported-embedded-components/business-profile-management/) embedded component. + """ capital_financing: Optional[CapitalFinancing] capital_financing_application: Optional[CapitalFinancingApplication] capital_financing_manual_payment: Optional[ @@ -741,16 +767,11 @@ class Features(StripeObject): """ Configuration for the [recipients list](https://docs.stripe.com/connect/supported-embedded-components/recipients-list/) embedded component. """ + reporting_chart: ReportingChart 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, @@ -758,6 +779,7 @@ class Features(StripeObject): "balance_report": BalanceReport, "balances": Balances, "bills": Bills, + "business_profile_management": BusinessProfileManagement, "capital_financing": CapitalFinancing, "capital_financing_application": CapitalFinancingApplication, "capital_financing_manual_payment": CapitalFinancingManualPayment, @@ -784,6 +806,7 @@ class Features(StripeObject): "payouts": Payouts, "payouts_list": PayoutsList, "recipients_list": RecipientsList, + "reporting_chart": ReportingChart, "tax_registrations": TaxRegistrations, "tax_settings": TaxSettings, "terminal_hardware_orders": TerminalHardwareOrders, 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/_error.py b/stripe/_error.py index 5823d0b53..f7a8c4494 100644 --- a/stripe/_error.py +++ b/stripe/_error.py @@ -22,8 +22,6 @@ def __init__( headers: Optional[Dict[str, str]] = None, code: Optional[str] = None, ): - super(StripeError, self).__init__(message) - body: Optional[str] = None if http_body: # http_body can sometimes be a memoryview which must be cast @@ -46,6 +44,14 @@ def __init__( self.json_body = json_body self.headers = headers or {} self.code = code + super(StripeError, self).__init__( + message, + self.http_body, + self.http_status, + self.json_body, + self.headers, + self.code, + ) self.request_id = self.headers.get("request-id", None) self.error = self._construct_error_object() @@ -113,6 +119,7 @@ def __init__( message, http_body, http_status, json_body, headers, code ) self.should_retry = should_retry + self.args = self.args + (self.should_retry,) class StripeErrorWithParamCode(StripeError): @@ -146,6 +153,15 @@ def __init__( message, http_body, http_status, json_body, headers, code ) self.param = param + self.args = ( + self._message, + self.param, + self.code, + self.http_body, + self.http_status, + self.json_body, + self.headers, + ) class IdempotencyError(StripeError): @@ -167,6 +183,15 @@ def __init__( message, http_body, http_status, json_body, headers, code ) self.param = param + self.args = ( + self._message, + self.param, + self.code, + self.http_body, + self.http_status, + self.json_body, + self.headers, + ) class AuthenticationError(StripeError): @@ -181,6 +206,7 @@ class SignatureVerificationError(StripeError): def __init__(self, message, sig_header, http_body=None): super(SignatureVerificationError, self).__init__(message, http_body) self.sig_header = sig_header + self.args = (self._message, self.sig_header, self.http_body) class RateLimitError(StripeError): 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/_object_classes.py b/stripe/_object_classes.py index b4b791928..c2e4581c2 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -381,6 +381,7 @@ "ReserveTransaction", ), "review": ("stripe._review", "Review"), + "risk.form": ("stripe.risk._form", "Form"), "risk_signals": ("stripe._risk_signals", "RiskSignals"), "setup_attempt": ("stripe._setup_attempt", "SetupAttempt"), "setup_intent": ("stripe._setup_intent", "SetupIntent"), @@ -509,7 +510,12 @@ } V2_OBJECT_CLASSES: Dict[str, Tuple[str, str]] = { + "v2.search_result": ( + "stripe.v2._search_result_object", + "SearchResultObject", + ), # V2 Object classes: The beginning of the section generated from our OpenAPI spec + "list": ("stripe.v2._list_object", "ListObject"), "v2.billing.bill_setting": ( "stripe.v2.billing._bill_setting", "BillSetting", @@ -677,6 +683,10 @@ ), "v2.data.report_run": ("stripe.v2.data._report_run", "ReportRun"), "v2.data.schema": ("stripe.v2.data._schema", "Schema"), + "v2.data.search_result_list": ( + "stripe.v2.data._search_result_list", + "SearchResultList", + ), "v2.extend.workflow": ("stripe.v2.extend._workflow", "Workflow"), "v2.extend.workflow_run": ( "stripe.v2.extend._workflow_run", 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..2488a7fe5 100644 --- a/stripe/_quote_preview_invoice.py +++ b/stripe/_quote_preview_invoice.py @@ -33,38 +33,8 @@ class QuotePreviewInvoice(StripeObject): """ - Invoices are statements of amounts owed by a customer, and are either - generated one-off, or generated periodically from a subscription. - - They contain [invoice items](https://docs.stripe.com/api#invoiceitems), and proration adjustments - that may be caused by subscription upgrades/downgrades (if necessary). - - If your invoice is configured to be billed through automatic charges, - Stripe automatically finalizes your invoice and attempts payment. Note - that finalizing the invoice, - [when automatic](https://docs.stripe.com/invoicing/integration/automatic-advancement-collection), does - not happen immediately as the invoice is created. Stripe waits - until one hour after the last webhook was successfully sent (or the last - webhook timed out after failing). If you (and the platforms you may have - connected to) have no webhooks configured, Stripe waits one hour after - creation to finalize the invoice. - - If your invoice is configured to be billed by sending an email, then based on your - [email settings](https://dashboard.stripe.com/account/billing/automatic), - Stripe will email the invoice to your customer and await payment. These - emails can contain a link to a hosted page to pay the invoice. - - Stripe applies any customer credit on the account before determining the - amount due for the invoice (i.e., the amount that will be actually - charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge - per currency](https://docs.stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the - invoice is automatically marked paid, and we add the amount due to the - customer's credit balance which is applied to the next invoice. - - More details on the customer's credit balance are - [here](https://docs.stripe.com/billing/customer/balance). - - Related guide: [Send invoices to customers](https://docs.stripe.com/billing/invoices/sending) + Invoices are statements of amounts owed by a customer. A quote preview invoice shows the invoice + that would be generated by accepting the quote. """ OBJECT_NAME: ClassVar[Literal["quote_preview_invoice"]] = ( @@ -310,7 +280,9 @@ class CustomerTaxId(StripeObject): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -340,6 +312,7 @@ class CustomerTaxId(StripeObject): "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -349,6 +322,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 +336,7 @@ class CustomerTaxId(StripeObject): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -375,23 +352,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 +383,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 +410,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/_quote_preview_subscription_schedule.py b/stripe/_quote_preview_subscription_schedule.py index 4812c6790..631c87bc5 100644 --- a/stripe/_quote_preview_subscription_schedule.py +++ b/stripe/_quote_preview_subscription_schedule.py @@ -23,6 +23,12 @@ class QuotePreviewSubscriptionSchedule(StripeObject): + """ + A subscription schedule allows you to create and manage the lifecycle of a subscription by + predefining expected changes. A quote preview subscription schedule shows the subscription schedule + that would be created by accepting the quote. + """ + OBJECT_NAME: ClassVar[Literal["quote_preview_subscription_schedule"]] = ( "quote_preview_subscription_schedule" ) diff --git a/stripe/_refund.py b/stripe/_refund.py index a5842822e..5c4d381b9 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -46,7 +46,14 @@ class Affirm(StripeObject): pass class AfterpayClearpay(StripeObject): - pass + reference: Optional[str] + """ + The reference assigned to the refund. + """ + reference_status: Optional[str] + """ + Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + """ class Alipay(StripeObject): pass @@ -164,7 +171,14 @@ class JpBankTransfer(StripeObject): """ class Klarna(StripeObject): - pass + reference: Optional[str] + """ + The reference assigned to the refund. + """ + reference_status: Optional[str] + """ + Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + """ class MbWay(StripeObject): reference: Optional[str] @@ -217,6 +231,14 @@ class Paypal(StripeObject): """ For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. """ + reference: Optional[str] + """ + The reference assigned to the refund. + """ + reference_status: Optional[str] + """ + Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + """ class Pix(StripeObject): pass diff --git a/stripe/_risk_service.py b/stripe/_risk_service.py new file mode 100644 index 000000000..b9c9e1867 --- /dev/null +++ b/stripe/_risk_service.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.risk._form_service import FormService + +_subservices = {"forms": ["stripe.risk._form_service", "FormService"]} + + +class RiskService(StripeService): + forms: "FormService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/_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/_stripe_client.py b/stripe/_stripe_client.py index 36e3b4aca..bc0b688c0 100644 --- a/stripe/_stripe_client.py +++ b/stripe/_stripe_client.py @@ -135,6 +135,7 @@ from stripe._reporting_service import ReportingService from stripe._reserve_service import ReserveService from stripe._review_service import ReviewService + from stripe._risk_service import RiskService from stripe._setup_attempt_service import SetupAttemptService from stripe._setup_intent_service import SetupIntentService from stripe._shared_payment_service import SharedPaymentService @@ -1225,6 +1226,17 @@ def reserve(self) -> "ReserveService": def reviews(self) -> "ReviewService": return self.v1.reviews + @property + @deprecated( + """ + StripeClient.risk is deprecated, use StripeClient.v1.risk instead. + All functionality under it has been copied over to StripeClient.v1.risk. + See [migration guide](https://github.com/stripe/stripe-python/wiki/v1-namespace-in-StripeClient) for more on this and tips on migrating to the new v1 namespace. + """, + ) + def risk(self) -> "RiskService": + return self.v1.risk + @property @deprecated( """ diff --git a/stripe/_stripe_service.py b/stripe/_stripe_service.py index 174858968..1088f64b6 100644 --- a/stripe/_stripe_service.py +++ b/stripe/_stripe_service.py @@ -9,11 +9,25 @@ from stripe._request_options import RequestOptions from stripe._base_address import BaseAddress -from typing import Any, Dict, Mapping, Optional +from typing import Any, Dict, Mapping, Optional, Tuple +from urllib.parse import quote from stripe._encode import _coerce_v2_params, _SchemaNode +def _split_v2_search_params( + url: str, params: Optional[Mapping[str, Any]] +) -> Tuple[str, Optional[Mapping[str, Any]]]: + if params is None or "limit" not in params: + return url, params + body_params = dict(params) + limit = body_params.pop("limit") + if "limit=" not in url: + separator = "&" if "?" in url else "?" + url = "%s%slimit=%s" % (url, separator, quote(str(limit), safe="")) + return url, body_params + + class StripeService(object): _requestor: _APIRequestor @@ -32,6 +46,12 @@ def _request( ) -> StripeObject: if _param_encodings: params = _coerce_v2_params(params, _param_encodings) + if ( + method == "post" + and url.split("?", 1)[0].startswith("/v2/") + and url.split("?", 1)[0].endswith("/search") + ): + url, params = _split_v2_search_params(url, params) return self._requestor.request( method, url, @@ -53,6 +73,12 @@ async def _request_async( ) -> StripeObject: if _param_encodings: params = _coerce_v2_params(params, _param_encodings) + if ( + method == "post" + and url.split("?", 1)[0].startswith("/v2/") + and url.split("?", 1)[0].endswith("/search") + ): + url, params = _split_v2_search_params(url, params) return await self._requestor.request_async( method, url, 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/_util.py b/stripe/_util.py index 8b378c63c..e034b209f 100644 --- a/stripe/_util.py +++ b/stripe/_util.py @@ -288,6 +288,7 @@ def _convert_to_stripe_object( and ( (getattr(obj, "object") == "list") or (getattr(obj, "object") == "search_result") + or (getattr(obj, "object") == "v2.search_result") ) ): obj._retrieve_params = params diff --git a/stripe/_v1_services.py b/stripe/_v1_services.py index a5deebce4..eef4d5915 100644 --- a/stripe/_v1_services.py +++ b/stripe/_v1_services.py @@ -88,6 +88,7 @@ from stripe._reporting_service import ReportingService from stripe._reserve_service import ReserveService from stripe._review_service import ReviewService + from stripe._risk_service import RiskService from stripe._setup_attempt_service import SetupAttemptService from stripe._setup_intent_service import SetupIntentService from stripe._shared_payment_service import SharedPaymentService @@ -263,6 +264,7 @@ "reporting": ["stripe._reporting_service", "ReportingService"], "reserve": ["stripe._reserve_service", "ReserveService"], "reviews": ["stripe._review_service", "ReviewService"], + "risk": ["stripe._risk_service", "RiskService"], "setup_attempts": ["stripe._setup_attempt_service", "SetupAttemptService"], "setup_intents": ["stripe._setup_intent_service", "SetupIntentService"], "shared_payment": [ @@ -375,6 +377,7 @@ class V1Services(StripeService): reporting: "ReportingService" reserve: "ReserveService" reviews: "ReviewService" + risk: "RiskService" setup_attempts: "SetupAttemptService" setup_intents: "SetupIntentService" shared_payment: "SharedPaymentService" diff --git a/stripe/_webhook.py b/stripe/_webhook.py index 9fc269e69..a9a041454 100644 --- a/stripe/_webhook.py +++ b/stripe/_webhook.py @@ -150,7 +150,7 @@ def verify_header( header, payload, ) - if not secret: + if secret is None or secret.strip(" \t\r\n\f\v") == "": raise SignatureVerificationError( "No webhook secret value was provided. It should start with `whsec_`", header, diff --git a/stripe/billing/_alert_notification.py b/stripe/billing/_alert_notification.py index 8b50ad519..62c608375 100644 --- a/stripe/billing/_alert_notification.py +++ b/stripe/billing/_alert_notification.py @@ -6,6 +6,10 @@ class AlertNotification(StripeObject): + """ + A Billing Alert Notification records a notification sent when a billing alert is triggered or recovered. It identifies the alert, customer, and notification event, along with the observed value and the time the notification was sent. + """ + OBJECT_NAME: ClassVar[Literal["billing.alert_notification"]] = ( "billing.alert_notification" ) diff --git a/stripe/billing_portal/_configuration.py b/stripe/billing_portal/_configuration.py index 201d3f630..3db61c0f2 100644 --- a/stripe/billing_portal/_configuration.py +++ b/stripe/billing_portal/_configuration.py @@ -141,6 +141,37 @@ class CancellationReason(StripeObject): """ _inner_class_types = {"cancellation_reason": CancellationReason} + class SubscriptionPause(StripeObject): + class Duration(StripeObject): + class IntervalOption(StripeObject): + interval: Union[ + Literal["day", "month", "week", "year"], str + ] + """ + Specifies the pause duration unit. Either `day`, `week`, `month`, or `year`. + """ + interval_count: int + """ + The number of intervals in the pause duration. The maximum duration is three years. + """ + + interval_options: List[IntervalOption] + """ + The preset pause durations customers can choose from. + """ + type: Union[Literal["indefinite", "interval_options"], str] + """ + Whether subscriptions can be paused indefinitely or for a preset duration. + """ + _inner_class_types = {"interval_options": IntervalOption} + + duration: Duration + enabled: bool + """ + Whether the feature is enabled. Customers can only pause subscriptions in the [redesigned customer portal](https://docs.stripe.com/customer-management). + """ + _inner_class_types = {"duration": Duration} + class SubscriptionUpdate(StripeObject): class Product(StripeObject): class AdjustableQuantity(StripeObject): @@ -230,12 +261,14 @@ class Condition(StripeObject): invoice_history: InvoiceHistory payment_method_update: PaymentMethodUpdate subscription_cancel: SubscriptionCancel + subscription_pause: SubscriptionPause subscription_update: SubscriptionUpdate _inner_class_types = { "customer_update": CustomerUpdate, "invoice_history": InvoiceHistory, "payment_method_update": PaymentMethodUpdate, "subscription_cancel": SubscriptionCancel, + "subscription_pause": SubscriptionPause, "subscription_update": SubscriptionUpdate, } diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 41967ce27..d02937087 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] """ @@ -1218,6 +1248,226 @@ class RenderingOptions(StripeObject): _inner_class_types = {"invoice_data": InvoiceData} class Item(StripeObject): + class MetronomeCommit(StripeObject): + class Commit(StripeObject): + class AccessSchedule(StripeObject): + class ScheduleItem(StripeObject): + amount: Decimal + """ + The access amount in credit_type_id units. + """ + ending_before: str + """ + Hour-aligned RFC 3339 timestamp in UTC at which access to the balance amount ends (exclusive). + """ + starting_at: str + """ + Hour-aligned RFC 3339 timestamp in UTC at which access to the balance amount starts (inclusive). + """ + _field_encodings = {"amount": "decimal_string"} + + price_amount: int + """ + The fixed price the buyer pays, in minor currency units. + """ + schedule_items: List[ScheduleItem] + """ + When and how many credits become available. + """ + _inner_class_types = {"schedule_items": ScheduleItem} + + class CommitOptions(StripeObject): + class CustomAmount(StripeObject): + enabled: bool + """ + Whether custom amount input is enabled. + """ + maximum: Optional[int] + """ + Maximum `access_amount` the customer can enter. `null` means the effective maximum is `999999999999999`. + """ + minimum: Optional[int] + """ + Minimum `access_amount` the customer can enter. `null` means the effective minimum is `1`. + """ + + class DiscountTier(StripeObject): + discount_percentage: int + """ + Percentage discount applied to the full access_amount. + """ + up_to: Optional[int] + """ + Upper bound (inclusive) in credit_type_id units. Null means unbounded. + """ + + class Option(StripeObject): + access_amount: int + """ + The access amount for this option. + """ + default_option: Optional[bool] + """ + Whether this option is pre-selected in the Checkout UI. + """ + + custom_amount: Optional[CustomAmount] + """ + Custom access amount configuration. + """ + discount_tiers: Optional[List[DiscountTier]] + """ + Volume-based discount tiers. + """ + ending_before: str + """ + When access for the purchased credits ends. + """ + options: List[Option] + """ + Access-amount presets for the buyer to choose from. + """ + selected_access_amount: Optional[int] + """ + The selected access amount. It matches an `options[].access_amount` for a preset selection, but may be a custom value when `custom_amount` is enabled. New sessions initialize it from the option marked `default_option`, or from the first option when none is marked. It is not necessarily the item's monetary price; use `amount_details` for display and totals. + """ + starting_at: str + """ + When access for the purchased credits starts. + """ + _inner_class_types = { + "custom_amount": CustomAmount, + "discount_tiers": DiscountTier, + "options": Option, + } + + class Specifier(StripeObject): + presentation_group_values: Optional[ + UntypedStripeObject[str] + ] + """ + Key-value pairs for presentation group filters. + """ + pricing_group_values: Optional[UntypedStripeObject[str]] + """ + Key-value pairs for pricing group filters. + """ + product_id: Optional[str] + """ + Metronome product ID to scope this specifier to. + """ + product_tags: Optional[List[str]] + """ + Metronome product tags to scope this specifier to. Products must have all specified tags. + """ + + class TaxDetails(StripeObject): + tax_code: str + """ + Stripe [tax code](https://docs.stripe.com/tax/tax-codes) for this commit (for example, `txcd_10103000`). + """ + + access_schedule: Optional[AccessSchedule] + """ + Sets the balance amount and release schedule. Mutually exclusive with `commit_options`. + """ + applicable_metronome_product_tags: Optional[List[str]] + """ + Metronome product tags this commit can be drawn down against. Products must have all specified tags. If `applicable_metronome_products`, `applicable_metronome_product_tags`, and `specifiers` are all absent, the commit applies to all products. See Metronome's [applicable_product_tags](https://docs.metronome.com/api-reference/contracts/edit-a-contract#body-add-commits-items-applicable-product-tags). + """ + applicable_metronome_products: Optional[List[str]] + """ + Metronome product IDs this commit can be drawn down against. If `applicable_metronome_products`, `applicable_metronome_product_tags`, and `specifiers` are all absent, the commit applies to all products. See Metronome's [applicable_product_ids](https://docs.metronome.com/api-reference/contracts/edit-a-contract#body-add-commits-items-applicable-product-ids). + """ + commit_options: Optional[CommitOptions] + """ + Customer selects the balance amount to purchase. Mutually exclusive with `access_schedule`. + """ + credit_type_id: Optional[str] + """ + The Metronome Custom Pricing Unit credit type ID for this commit. Null when the commit prices in fiat. + """ + custom_fields: Optional[UntypedStripeObject[str]] + """ + Key-value pairs forwarded to the Metronome commit's [custom_fields](https://docs.metronome.com/api-reference/contracts/edit-a-contract#body-add-commits-items-custom-fields). + """ + description: Optional[str] + """ + Free-form description. Forwarded to the Metronome commit's description. + """ + metronome_commit: Optional[str] + """ + The Metronome commit ID, populated after successful activation. + """ + metronome_product: str + """ + The Metronome product ID for this commit. + """ + name: str + """ + Display name for the commit. Surfaced on the Metronome commit's name. + """ + priority: Optional[Decimal] + """ + Priority for applying the commit. Lower priority values apply first. Forwarded to Metronome as-is. + """ + rate_type: Optional[str] + """ + Specifies which rates are used to draw down the commit. Accepts `commit_rate`, `list_rate`, `COMMIT_RATE`, or `LIST_RATE`. + """ + rollover_fraction: Optional[Decimal] + """ + Fraction of unused balance that rolls over on a Metronome contract transition. Must be between `0` and `1`. Forwarded to Metronome as-is. + """ + specifiers: Optional[List[Specifier]] + """ + Usage filters that determine what draws down the commit. If `applicable_metronome_products`, `applicable_metronome_product_tags`, and `specifiers` are all absent, the commit applies to all products. See Metronome's [specifiers](https://docs.metronome.com/api-reference/contracts/edit-a-contract#body-add-commits-items-specifiers). + """ + tax_details: Optional[TaxDetails] + """ + Tax details for the Stripe product created for this commit. If provided, `tax_code` is required. + """ + _inner_class_types = { + "access_schedule": AccessSchedule, + "commit_options": CommitOptions, + "specifiers": Specifier, + "tax_details": TaxDetails, + } + _field_encodings = { + "priority": "decimal_string", + "rollover_fraction": "decimal_string", + } + + class PriceConfiguration(StripeObject): + currency: str + """ + The currency for this commit purchase, as an ISO 4217 lowercase string (for example, `usd`). + """ + tax_behavior: Optional[ + Union[Literal["exclusive", "inclusive"], str] + ] + """ + Specifies whether the price is considered inclusive or exclusive of taxes. When omitted and automatic tax is enabled, uses `tax_settings.defaults.tax_behavior`. If no default is set, the request returns an error. + """ + + commits: List[Commit] + """ + The list of commits for this Metronome contract. + """ + metronome_contract: str + """ + The Metronome contract ID associated with this checkout item. + """ + metronome_customer: Optional[str] + """ + The Metronome customer ID associated with this checkout item, resolved during validation. + """ + price_configuration: PriceConfiguration + _inner_class_types = { + "commits": Commit, + "price_configuration": PriceConfiguration, + } + class Subscription(StripeObject): class Item(StripeObject): class CurrentTrial(StripeObject): @@ -1323,12 +1573,16 @@ class EndBehavior(StripeObject): """ The key of the item. Guaranteed to be a unique ID within this checkout session's items. """ + metronome_commit: Optional[MetronomeCommit] subscription: Optional[Subscription] - type: Union[Literal["subscription"], str] + type: Union[Literal["metronome_commit", "subscription"], str] """ The type of the item. """ - _inner_class_types = {"subscription": Subscription} + _inner_class_types = { + "metronome_commit": MetronomeCommit, + "subscription": Subscription, + } class ManagedPayments(StripeObject): enabled: bool @@ -1336,6 +1590,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 +1911,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 +1987,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 +2047,7 @@ class Restrictions(StripeObject): """ _inner_class_types = { "installments": Installments, + "mandate_options": MandateOptions, "restrictions": Restrictions, } @@ -3419,6 +3764,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 +3805,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 +4414,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_core_account_including_configuration_money_manager_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_money_manager_capability_status_updated_event.py index 83892b273..db3148c81 100644 --- a/stripe/events/_v2_core_account_including_configuration_money_manager_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_money_manager_capability_status_updated_event.py @@ -101,15 +101,23 @@ class V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEven "business_custodial_storage.outbound.ousd", "business_custodial_storage.outbound.usdc", "business_storage.inbound.cad", + "business_storage.inbound.czk", "business_storage.inbound.eur", "business_storage.inbound.gbp", + "business_storage.inbound.nok", "business_storage.inbound.ousd", + "business_storage.inbound.pln", + "business_storage.inbound.sek", "business_storage.inbound.usd", "business_storage.inbound.usdc", "business_storage.outbound.cad", + "business_storage.outbound.czk", "business_storage.outbound.eur", "business_storage.outbound.gbp", + "business_storage.outbound.nok", "business_storage.outbound.ousd", + "business_storage.outbound.pln", + "business_storage.outbound.sek", "business_storage.outbound.usd", "business_storage.outbound.usdc", "consumer_storage.inbound.usd", diff --git a/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py index 25d28d6f5..7646697ce 100644 --- a/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py @@ -118,6 +118,7 @@ class V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventDa "paper_checks", "stripe_balance.payouts", "pix", + "stripe_balance.stablecoin_custodial", "stripe_balance.stripe_transfers", "stripe.transfers", ], 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..60d7f5e35 100644 --- a/stripe/identity/_verification_report.py +++ b/stripe/identity/_verification_report.py @@ -201,20 +201,6 @@ class IssuedDate(StripeObject): } class Email(StripeObject): - class Details(StripeObject): - days_since_domain_creation: Optional[float] - """ - Number of days from the time when the email domain was first observed to the time of verification. - """ - days_since_ownership_started: Optional[float] - """ - Number of days from the time when the email address was first observed to the time of verification. - """ - domain_country: Optional[str] - """ - Two-letter ISO 3166-1 alpha-2 country code of the email domain's country. - """ - class Error(StripeObject): code: Optional[ Union[ @@ -244,10 +230,6 @@ class Error(StripeObject): """ Confidence that the provided address matches the email records. """ - details: Optional[Details] - """ - Additional email verification details - """ domain_country: Optional[str] """ Two-letter country code of the email domain's country. @@ -290,7 +272,7 @@ class Error(StripeObject): """ Status of this `email` check. """ - _inner_class_types = {"details": Details, "error": Error} + _inner_class_types = {"error": Error} class IdNumber(StripeObject): class Dob(StripeObject): @@ -765,9 +747,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/issuing/_authorization.py b/stripe/issuing/_authorization.py index c810387ed..d63621c7a 100644 --- a/stripe/issuing/_authorization.py +++ b/stripe/issuing/_authorization.py @@ -1205,6 +1205,16 @@ class Reserve(StripeObject): "hold_amount_details": HoldAmountDetails, } + class ProductEligibilityInquiry(StripeObject): + anticipated_amount: Optional[int] + """ + The anticipated amount that merchants can send before a payment authorization, in the smallest currency unit. + """ + anticipated_currency: Optional[str] + """ + The currency of the anticipated amount that merchants can send before a payment authorization. + """ + class Redaction(StripeObject): status: Union[Literal["processing", "redacted", "validated"], str] """ @@ -2033,6 +2043,10 @@ class ThreeDSecure(StripeObject): """ The point-of-sale initiation condition. This is null when the card network did not provide one. """ + product_eligibility_inquiry: Optional[ProductEligibilityInquiry] + """ + Details about the authorization specific to product eligibility inquiries. This field is only populated for `product_eligibility_inquiry` type authorizations. + """ redaction: Optional[Redaction] """ Redaction status of this authorization. If the authorization is not redacted, this field will be null. @@ -2062,6 +2076,17 @@ class ThreeDSecure(StripeObject): """ [Treasury](https://docs.stripe.com/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://docs.stripe.com/api/treasury/financial_accounts). """ + type: Optional[ + Union[ + Literal[ + "balance_inquiry", "payment", "product_eligibility_inquiry" + ], + str, + ] + ] + """ + The type of the authorization, whether it is for a payment or another type. + """ verification_data: VerificationData verified_by_fraud_challenge: Optional[bool] """ @@ -3213,6 +3238,7 @@ def test_helpers(self): "merchant_data": MerchantData, "network_data": NetworkData, "pending_request": PendingRequest, + "product_eligibility_inquiry": ProductEligibilityInquiry, "redaction": Redaction, "request_history": RequestHistory, "terminal_data": TerminalData, diff --git a/stripe/oauth_error.py b/stripe/oauth_error.py index 14f75c2af..5fd0fb1e8 100644 --- a/stripe/oauth_error.py +++ b/stripe/oauth_error.py @@ -15,6 +15,14 @@ def __init__( super(OAuthError, self).__init__( description, http_body, http_status, json_body, headers, code ) + self.args = ( + self.code, + self._message, + self.http_body, + self.http_status, + self.json_body, + self.headers, + ) def _construct_error_object(self): if self.json_body is None: diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index 37a31db3b..cf5ecb6c6 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -24,6 +24,7 @@ radar as radar, reporting as reporting, reserve as reserve, + risk as risk, shared_payment as shared_payment, sigma as sigma, tax as tax, @@ -6700,6 +6701,7 @@ "radar": ("stripe.params.radar", True), "reporting": ("stripe.params.reporting", True), "reserve": ("stripe.params.reserve", True), + "risk": ("stripe.params.risk", True), "shared_payment": ("stripe.params.shared_payment", True), "sigma": ("stripe.params.sigma", True), "tax": ("stripe.params.tax", True), 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/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index f0618264b..9f4d21649 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -490,11 +490,11 @@ class InvoiceCreatePreviewParamsInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. One of `price` or `price_data` is required. + The ID of the price object. """ price_data: NotRequired["InvoiceCreatePreviewParamsInvoiceItemPriceData"] """ - 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. """ quantity: NotRequired[int] """ diff --git a/stripe/params/_subscription_schedule_modify_params.py b/stripe/params/_subscription_schedule_modify_params.py index 1d77d377d..dadbe3f80 100644 --- a/stripe/params/_subscription_schedule_modify_params.py +++ b/stripe/params/_subscription_schedule_modify_params.py @@ -46,7 +46,7 @@ class SubscriptionScheduleModifyParams(RequestOptions): "Literal['']|List[SubscriptionScheduleModifyParamsPauseSchedule]" ] """ - Configures the subscription's pause behavior and, optionally, its resume behavior. Only one entry is supported. Include a key to update an existing entry. Omit to leave an existing pause schedule unchanged, or pass "" to clear it. + The subscription's pause behavior and optional resume behavior. You can provide one entry. Include its `key` to update an existing pause schedule. Omit `pause_schedules` to leave the existing schedule unchanged, or pass an empty string (`""`) to clear it. """ phases: NotRequired[List["SubscriptionScheduleModifyParamsPhase"]] """ diff --git a/stripe/params/_subscription_schedule_update_params.py b/stripe/params/_subscription_schedule_update_params.py index d2bd1ca50..35962eee4 100644 --- a/stripe/params/_subscription_schedule_update_params.py +++ b/stripe/params/_subscription_schedule_update_params.py @@ -45,7 +45,7 @@ class SubscriptionScheduleUpdateParams(TypedDict): "Literal['']|List[SubscriptionScheduleUpdateParamsPauseSchedule]" ] """ - Configures the subscription's pause behavior and, optionally, its resume behavior. Only one entry is supported. Include a key to update an existing entry. Omit to leave an existing pause schedule unchanged, or pass "" to clear it. + The subscription's pause behavior and optional resume behavior. You can provide one entry. Include its `key` to update an existing pause schedule. Omit `pause_schedules` to leave the existing schedule unchanged, or pass an empty string (`""`) to clear it. """ phases: NotRequired[List["SubscriptionScheduleUpdateParamsPhase"]] """ diff --git a/stripe/params/checkout/__init__.py b/stripe/params/checkout/__init__.py index b74a4d537..82fa970fa 100644 --- a/stripe/params/checkout/__init__.py +++ b/stripe/params/checkout/__init__.py @@ -49,11 +49,23 @@ SessionCreateParamsInvoiceCreationInvoiceDataIssuer as SessionCreateParamsInvoiceCreationInvoiceDataIssuer, SessionCreateParamsInvoiceCreationInvoiceDataRenderingOptions as SessionCreateParamsInvoiceCreationInvoiceDataRenderingOptions, SessionCreateParamsItem as SessionCreateParamsItem, + SessionCreateParamsItemMetronomeCommit as SessionCreateParamsItemMetronomeCommit, + SessionCreateParamsItemMetronomeCommitCommit as SessionCreateParamsItemMetronomeCommitCommit, + SessionCreateParamsItemMetronomeCommitCommitAccessSchedule as SessionCreateParamsItemMetronomeCommitCommitAccessSchedule, + SessionCreateParamsItemMetronomeCommitCommitAccessScheduleScheduleItem as SessionCreateParamsItemMetronomeCommitCommitAccessScheduleScheduleItem, + SessionCreateParamsItemMetronomeCommitCommitCommitOptions as SessionCreateParamsItemMetronomeCommitCommitCommitOptions, + SessionCreateParamsItemMetronomeCommitCommitCommitOptionsCustomAmount as SessionCreateParamsItemMetronomeCommitCommitCommitOptionsCustomAmount, + SessionCreateParamsItemMetronomeCommitCommitCommitOptionsDiscountTier as SessionCreateParamsItemMetronomeCommitCommitCommitOptionsDiscountTier, + SessionCreateParamsItemMetronomeCommitCommitCommitOptionsOption as SessionCreateParamsItemMetronomeCommitCommitCommitOptionsOption, + SessionCreateParamsItemMetronomeCommitCommitSpecifier as SessionCreateParamsItemMetronomeCommitCommitSpecifier, + SessionCreateParamsItemMetronomeCommitCommitTaxDetails as SessionCreateParamsItemMetronomeCommitCommitTaxDetails, + SessionCreateParamsItemMetronomeCommitPriceConfiguration as SessionCreateParamsItemMetronomeCommitPriceConfiguration, SessionCreateParamsItemSubscription as SessionCreateParamsItemSubscription, SessionCreateParamsItemSubscriptionBillingCycleAnchorConfig as SessionCreateParamsItemSubscriptionBillingCycleAnchorConfig, SessionCreateParamsItemSubscriptionBillingMode as SessionCreateParamsItemSubscriptionBillingMode, SessionCreateParamsItemSubscriptionBillingModeFlexible as SessionCreateParamsItemSubscriptionBillingModeFlexible, SessionCreateParamsItemSubscriptionItem as SessionCreateParamsItemSubscriptionItem, + SessionCreateParamsItemSubscriptionItemAdjustableQuantity as SessionCreateParamsItemSubscriptionItemAdjustableQuantity, SessionCreateParamsItemSubscriptionItemCurrentTrial as SessionCreateParamsItemSubscriptionItemCurrentTrial, SessionCreateParamsItemSubscriptionItemPriceData as SessionCreateParamsItemSubscriptionItemPriceData, SessionCreateParamsItemSubscriptionItemPriceDataProductData as SessionCreateParamsItemSubscriptionItemPriceDataProductData, @@ -69,6 +81,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, @@ -429,6 +443,50 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsItemMetronomeCommit": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsItemMetronomeCommitCommit": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsItemMetronomeCommitCommitAccessSchedule": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsItemMetronomeCommitCommitAccessScheduleScheduleItem": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsItemMetronomeCommitCommitCommitOptions": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsItemMetronomeCommitCommitCommitOptionsCustomAmount": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsItemMetronomeCommitCommitCommitOptionsDiscountTier": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsItemMetronomeCommitCommitCommitOptionsOption": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsItemMetronomeCommitCommitSpecifier": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsItemMetronomeCommitCommitTaxDetails": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsItemMetronomeCommitPriceConfiguration": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsItemSubscription": ( "stripe.params.checkout._session_create_params", False, @@ -449,6 +507,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsItemSubscriptionItemAdjustableQuantity": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsItemSubscriptionItemCurrentTrial": ( "stripe.params.checkout._session_create_params", False, @@ -509,6 +571,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..ff0a0464e 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`. @@ -929,16 +935,249 @@ class SessionCreateParamsInvoiceCreationInvoiceDataRenderingOptions(TypedDict): class SessionCreateParamsItem(TypedDict): + metronome_commit: NotRequired["SessionCreateParamsItemMetronomeCommit"] + """ + Configuration for the Metronome commit item. + """ subscription: NotRequired["SessionCreateParamsItemSubscription"] """ Configuration for the subscription item. """ - type: Union[Literal["subscription"], str] + type: Union[Literal["metronome_commit", "subscription"], str] """ The type of item. """ +class SessionCreateParamsItemMetronomeCommit(TypedDict): + commits: List["SessionCreateParamsItemMetronomeCommitCommit"] + """ + The list of commits to create for this Metronome contract. + """ + metronome_contract: str + """ + The Metronome contract ID to associate with this checkout item. + """ + price_configuration: ( + "SessionCreateParamsItemMetronomeCommitPriceConfiguration" + ) + """ + The currency and tax behavior configuration for this commit purchase. + """ + + +class SessionCreateParamsItemMetronomeCommitCommit(TypedDict): + access_schedule: NotRequired[ + "SessionCreateParamsItemMetronomeCommitCommitAccessSchedule" + ] + """ + Sets the balance amount and release schedule. Mutually exclusive with `commit_options`. + """ + applicable_metronome_product_tags: NotRequired[List[str]] + """ + Metronome product tags this commit can be drawn down against. A product matches if it has at least one of the specified tags. Mutually exclusive with `specifiers`. If `applicable_metronome_products`, `applicable_metronome_product_tags`, and `specifiers` are all omitted, the commit applies to all products. See Metronome's [applicable_product_tags](https://docs.metronome.com/api-reference/contracts/edit-a-contract#body-add-commits-items-applicable-product-tags). + """ + applicable_metronome_products: NotRequired[List[str]] + """ + Metronome product IDs this commit can be drawn down against. Mutually exclusive with `specifiers`. If `applicable_metronome_products`, `applicable_metronome_product_tags`, and `specifiers` are all omitted, the commit applies to all products. See Metronome's [applicable_product_ids](https://docs.metronome.com/api-reference/contracts/edit-a-contract#body-add-commits-items-applicable-product-ids). + """ + commit_options: NotRequired[ + "SessionCreateParamsItemMetronomeCommitCommitCommitOptions" + ] + """ + Customer selects the balance amount to purchase. Mutually exclusive with `access_schedule`. + """ + credit_type_id: NotRequired[str] + """ + The Metronome Custom Pricing Unit credit type ID for this commit, whose access amounts are credit counts. Omit it to price in fiat, where access amounts are in the smallest unit of `price_configuration[currency]`. Fiat credit type IDs are not accepted. + """ + custom_fields: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] + """ + Key-value pairs forwarded to the Metronome commit's [custom_fields](https://docs.metronome.com/api-reference/contracts/edit-a-contract#body-add-commits-items-custom-fields). + """ + description: NotRequired[str] + """ + Free-form description. Forwarded to the Metronome commit's description. + """ + metronome_product: str + """ + The Metronome product ID for this commit. + """ + name: str + """ + Display name for the commit. Surfaced on the Metronome commit's name. + """ + priority: NotRequired[Decimal] + """ + Priority for applying the commit. Lower priority values apply first. Forwarded to Metronome as-is. + """ + rate_type: NotRequired["Literal['commit_rate', 'list_rate']|str"] + """ + Specifies which rates are used to draw down the commit. Accepts `commit_rate`, `list_rate`, `COMMIT_RATE`, or `LIST_RATE`. + """ + rollover_fraction: NotRequired[Decimal] + """ + Fraction of unused balance that rolls over on a Metronome contract transition. Must be between `0` and `1`. Forwarded to Metronome as-is. + """ + specifiers: NotRequired[ + List["SessionCreateParamsItemMetronomeCommitCommitSpecifier"] + ] + """ + Usage filters that determine what draws down the commit. If multiple specifiers are provided, a product only needs to match one. Mutually exclusive with `applicable_metronome_products` and `applicable_metronome_product_tags`. If `applicable_metronome_products`, `applicable_metronome_product_tags`, and `specifiers` are all omitted, the commit applies to all products. See Metronome's [specifiers](https://docs.metronome.com/api-reference/contracts/edit-a-contract#body-add-commits-items-specifiers). + """ + tax_details: NotRequired[ + "SessionCreateParamsItemMetronomeCommitCommitTaxDetails" + ] + """ + Tax details for this commit. If omitted, Stripe uses the tax code from the Stripe product linked to the Metronome commit product. If there is no linked Stripe product or the Stripe product has no tax code configured, the [preset tax rate on your account](https://docs.stripe.com/api/tax/settings/object#tax_settings_object-defaults-tax_code) will be used. If provided, `tax_code` is required. + """ + + +class SessionCreateParamsItemMetronomeCommitCommitAccessSchedule(TypedDict): + price_amount: int + """ + The fixed price the buyer pays, in minor currency units. + """ + schedule_items: List[ + "SessionCreateParamsItemMetronomeCommitCommitAccessScheduleScheduleItem" + ] + """ + When and how many credits become available. + """ + + +class SessionCreateParamsItemMetronomeCommitCommitAccessScheduleScheduleItem( + TypedDict, +): + amount: Decimal + """ + The access amount in credit_type_id units. + """ + ending_before: str + """ + Hour-aligned RFC 3339 timestamp in UTC at which access to the balance amount ends (exclusive). + """ + starting_at: str + """ + Hour-aligned RFC 3339 timestamp in UTC at which access to the balance amount starts (inclusive). + """ + + +class SessionCreateParamsItemMetronomeCommitCommitCommitOptions(TypedDict): + custom_amount: NotRequired[ + "SessionCreateParamsItemMetronomeCommitCommitCommitOptionsCustomAmount" + ] + """ + Optionally let the buyer enter a custom access amount. + """ + discount_tiers: NotRequired[ + List[ + "SessionCreateParamsItemMetronomeCommitCommitCommitOptionsDiscountTier" + ] + ] + """ + Volume-based discount tiers. + """ + ending_before: str + """ + When access for the purchased credits ends. Hour-aligned UTC timestamp. + """ + options: List[ + "SessionCreateParamsItemMetronomeCommitCommitCommitOptionsOption" + ] + """ + Access-amount presets for the buyer to choose from. + """ + starting_at: str + """ + When access for the purchased credits starts. Hour-aligned UTC timestamp. + """ + + +class SessionCreateParamsItemMetronomeCommitCommitCommitOptionsCustomAmount( + TypedDict, +): + enabled: bool + """ + Must be `true` when `custom_amount` is present. Omit `custom_amount` to disable custom amounts. + """ + maximum: NotRequired[int] + """ + Maximum `access_amount` the customer can enter. Defaults to `999999999999999` when omitted. + """ + minimum: NotRequired[int] + """ + Minimum `access_amount` the customer can enter. Defaults to `1` when omitted. + """ + + +class SessionCreateParamsItemMetronomeCommitCommitCommitOptionsDiscountTier( + TypedDict, +): + discount_percentage: int + """ + Percentage discount applied to the full access_amount when it falls in this tier. + """ + up_to: Union[int, Literal["inf"]] + """ + Upper bound (inclusive) in credit_type_id units. Use `inf` to define an unbounded tier. + """ + + +class SessionCreateParamsItemMetronomeCommitCommitCommitOptionsOption( + TypedDict, +): + access_amount: int + """ + The access amount for this option, in credit_type_id units. + """ + default_option: NotRequired[bool] + """ + Whether this option is pre-selected in the Checkout UI. At most one option may be marked true. + """ + + +class SessionCreateParamsItemMetronomeCommitCommitSpecifier(TypedDict): + presentation_group_values: NotRequired[ + "Dict[str, str]|UntypedStripeObject[str]" + ] + """ + Key-value pairs for presentation group filters. + """ + pricing_group_values: NotRequired[ + "Dict[str, str]|UntypedStripeObject[str]" + ] + """ + Key-value pairs for pricing group filters. + """ + product_id: NotRequired[str] + """ + Metronome product ID to scope this specifier to. + """ + product_tags: NotRequired[List[str]] + """ + Metronome product tags to scope this specifier to. A product matches this filter only if it has all specified tags. + """ + + +class SessionCreateParamsItemMetronomeCommitCommitTaxDetails(TypedDict): + tax_code: str + """ + Stripe [tax code](https://docs.stripe.com/tax/tax-codes) for this commit (for example, `txcd_10103000`). If the linked Stripe Product has a tax code, this value must match it. + """ + + +class SessionCreateParamsItemMetronomeCommitPriceConfiguration(TypedDict): + currency: str + """ + The currency for this commit purchase, as an ISO 4217 lowercase string (for example, `usd`). + """ + tax_behavior: NotRequired["Literal['exclusive', 'inclusive']|str"] + """ + Specifies whether the price is considered inclusive or exclusive of taxes. When omitted and automatic tax is enabled, uses `tax_settings.defaults.tax_behavior`. If no default is set, the request returns an error. + """ + + class SessionCreateParamsItemSubscription(TypedDict): backdate_start_date: NotRequired[int] """ @@ -1036,6 +1275,12 @@ class SessionCreateParamsItemSubscriptionBillingModeFlexible(TypedDict): class SessionCreateParamsItemSubscriptionItem(TypedDict): + adjustable_quantity: NotRequired[ + "SessionCreateParamsItemSubscriptionItemAdjustableQuantity" + ] + """ + When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. + """ current_trial: NotRequired[ "SessionCreateParamsItemSubscriptionItemCurrentTrial" ] @@ -1056,6 +1301,21 @@ class SessionCreateParamsItemSubscriptionItem(TypedDict): """ +class SessionCreateParamsItemSubscriptionItemAdjustableQuantity(TypedDict): + enabled: bool + """ + Set to true if the quantity can be adjusted to any non-negative integer. + """ + maximum: NotRequired[int] + """ + The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. + """ + minimum: NotRequired[int] + """ + The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. + """ + + class SessionCreateParamsItemSubscriptionItemCurrentTrial(TypedDict): trial_offer: str """ @@ -1205,7 +1465,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 +1589,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..5358d5083 100644 --- a/stripe/params/issuing/__init__.py +++ b/stripe/params/issuing/__init__.py @@ -20,9 +20,9 @@ AuthorizationCaptureParamsPurchaseDetailsFlight as AuthorizationCaptureParamsPurchaseDetailsFlight, AuthorizationCaptureParamsPurchaseDetailsFlightSegment as AuthorizationCaptureParamsPurchaseDetailsFlightSegment, AuthorizationCaptureParamsPurchaseDetailsFuel as AuthorizationCaptureParamsPurchaseDetailsFuel, - AuthorizationCaptureParamsPurchaseDetailsHealthcare as AuthorizationCaptureParamsPurchaseDetailsHealthcare, AuthorizationCaptureParamsPurchaseDetailsLodging as AuthorizationCaptureParamsPurchaseDetailsLodging, AuthorizationCaptureParamsPurchaseDetailsReceipt as AuthorizationCaptureParamsPurchaseDetailsReceipt, + AuthorizationCaptureParamsSettlementDetails as AuthorizationCaptureParamsSettlementDetails, ) from stripe.params.issuing._authorization_create_params import ( AuthorizationCreateParams as AuthorizationCreateParams, @@ -393,9 +393,9 @@ TransactionCreateForceCaptureParamsPurchaseDetailsFlight as TransactionCreateForceCaptureParamsPurchaseDetailsFlight, TransactionCreateForceCaptureParamsPurchaseDetailsFlightSegment as TransactionCreateForceCaptureParamsPurchaseDetailsFlightSegment, TransactionCreateForceCaptureParamsPurchaseDetailsFuel as TransactionCreateForceCaptureParamsPurchaseDetailsFuel, - TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare as TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare, TransactionCreateForceCaptureParamsPurchaseDetailsLodging as TransactionCreateForceCaptureParamsPurchaseDetailsLodging, TransactionCreateForceCaptureParamsPurchaseDetailsReceipt as TransactionCreateForceCaptureParamsPurchaseDetailsReceipt, + TransactionCreateForceCaptureParamsSettlementDetails as TransactionCreateForceCaptureParamsSettlementDetails, ) from stripe.params.issuing._transaction_create_unlinked_refund_params import ( TransactionCreateUnlinkedRefundParams as TransactionCreateUnlinkedRefundParams, @@ -410,7 +410,6 @@ TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlight as TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlight, TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlightSegment as TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlightSegment, TransactionCreateUnlinkedRefundParamsPurchaseDetailsFuel as TransactionCreateUnlinkedRefundParamsPurchaseDetailsFuel, - TransactionCreateUnlinkedRefundParamsPurchaseDetailsHealthcare as TransactionCreateUnlinkedRefundParamsPurchaseDetailsHealthcare, TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging as TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging, TransactionCreateUnlinkedRefundParamsPurchaseDetailsReceipt as TransactionCreateUnlinkedRefundParamsPurchaseDetailsReceipt, ) @@ -485,15 +484,15 @@ "stripe.params.issuing._authorization_capture_params", False, ), - "AuthorizationCaptureParamsPurchaseDetailsHealthcare": ( + "AuthorizationCaptureParamsPurchaseDetailsLodging": ( "stripe.params.issuing._authorization_capture_params", False, ), - "AuthorizationCaptureParamsPurchaseDetailsLodging": ( + "AuthorizationCaptureParamsPurchaseDetailsReceipt": ( "stripe.params.issuing._authorization_capture_params", False, ), - "AuthorizationCaptureParamsPurchaseDetailsReceipt": ( + "AuthorizationCaptureParamsSettlementDetails": ( "stripe.params.issuing._authorization_capture_params", False, ), @@ -1406,15 +1405,15 @@ "stripe.params.issuing._transaction_create_force_capture_params", False, ), - "TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare": ( + "TransactionCreateForceCaptureParamsPurchaseDetailsLodging": ( "stripe.params.issuing._transaction_create_force_capture_params", False, ), - "TransactionCreateForceCaptureParamsPurchaseDetailsLodging": ( + "TransactionCreateForceCaptureParamsPurchaseDetailsReceipt": ( "stripe.params.issuing._transaction_create_force_capture_params", False, ), - "TransactionCreateForceCaptureParamsPurchaseDetailsReceipt": ( + "TransactionCreateForceCaptureParamsSettlementDetails": ( "stripe.params.issuing._transaction_create_force_capture_params", False, ), @@ -1466,10 +1465,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..888b6a6a0 100644 --- a/stripe/params/issuing/_authorization_capture_params.py +++ b/stripe/params/issuing/_authorization_capture_params.py @@ -19,6 +19,10 @@ class AuthorizationCaptureParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + merchant_amount_exchange_rate: NotRequired[float] + """ + Exchange rate from merchant amount to capture amount, expressed in minor units. Must be finite and positive for different currencies. Matching currencies ignore the supplied numeric rate and use 1.0. The capture amount remains authoritative. + """ network_data: NotRequired["AuthorizationCaptureParamsNetworkData"] """ Details about the transaction, such as processing dates, set by the card network. @@ -27,6 +31,12 @@ class AuthorizationCaptureParams(RequestOptions): """ Additional purchase information that is optionally provided by the merchant. """ + settlement_details: NotRequired[ + "AuthorizationCaptureParamsSettlementDetails" + ] + """ + Synthetic settlement values for this purchase capture. If omitted, defaults to the final signed transaction amount, transaction currency, and effective merchant-to-cardholder exchange rate. Supply all three fields to override. This does not create a settlement or change funding. + """ class AuthorizationCaptureParamsNetworkData(TypedDict): @@ -49,12 +59,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 +260,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] """ @@ -312,3 +276,18 @@ class AuthorizationCaptureParamsPurchaseDetailsReceipt(TypedDict): quantity: NotRequired[Decimal] total: NotRequired[int] unit_cost: NotRequired[int] + + +class AuthorizationCaptureParamsSettlementDetails(TypedDict): + amount: int + """ + Positive settlement amount magnitude in the smallest currency unit. Must match the converted merchant amount and, when settlement and cardholder currencies are the same, this capture's finalized transaction amount magnitude. The transaction type determines the output sign. + """ + currency: str + """ + Settlement currency. + """ + exchange_rate: float + """ + Exchange rate from merchant amount to settlement amount, expressed in minor units. Must be finite and positive for different currencies. Matching currencies ignore the supplied numeric rate and use 1.0. + """ diff --git a/stripe/params/issuing/_authorization_create_params.py b/stripe/params/issuing/_authorization_create_params.py index 4d957dec7..132e8ef2b 100644 --- a/stripe/params/issuing/_authorization_create_params.py +++ b/stripe/params/issuing/_authorization_create_params.py @@ -59,6 +59,10 @@ class AuthorizationCreateParams(RequestOptions): """ The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). """ + merchant_amount_exchange_rate: NotRequired[float] + """ + Exchange rate from merchant amount to cardholder amount, expressed in minor units. Must be finite and positive for different currencies. Matching currencies ignore the supplied numeric rate and use 1.0. + """ merchant_currency: NotRequired[str] """ The currency of the authorization. If not provided, defaults to the currency of the card. 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). @@ -90,6 +94,10 @@ class AuthorizationCreateParams(RequestOptions): """ Stripe's assessment of the fraud risk for this authorization. """ + type: NotRequired[Literal["payment"]] + """ + The type of the authorization object, for example a payment authorization, an original credit authorization, or a refund authorization. + """ verification_data: NotRequired["AuthorizationCreateParamsVerificationData"] """ Verifications that Stripe performed on information that the cardholder provided to the merchant. diff --git a/stripe/params/issuing/_transaction_create_force_capture_params.py b/stripe/params/issuing/_transaction_create_force_capture_params.py index 73c92a93f..5d6ac87c3 100644 --- a/stripe/params/issuing/_transaction_create_force_capture_params.py +++ b/stripe/params/issuing/_transaction_create_force_capture_params.py @@ -23,6 +23,10 @@ class TransactionCreateForceCaptureParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + merchant_amount_exchange_rate: NotRequired[float] + """ + Exchange rate from merchant amount to cardholder amount, expressed in minor units. Must be finite and positive for different currencies. Matching currencies ignore the supplied numeric rate and use 1.0. The supplied amount remains the merchant amount. + """ merchant_data: NotRequired[ "TransactionCreateForceCaptureParamsMerchantData" ] @@ -39,6 +43,12 @@ class TransactionCreateForceCaptureParams(RequestOptions): """ Additional purchase information that is optionally provided by the merchant. """ + settlement_details: NotRequired[ + "TransactionCreateForceCaptureParamsSettlementDetails" + ] + """ + Synthetic settlement values for this purchase force capture. If omitted, defaults to the final signed transaction amount, transaction currency, and effective merchant-to-cardholder exchange rate. Supply all three fields to override. This does not create a settlement or change funding. + """ class TransactionCreateForceCaptureParamsMerchantData(TypedDict): @@ -114,12 +124,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 +329,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] """ @@ -381,3 +345,18 @@ class TransactionCreateForceCaptureParamsPurchaseDetailsReceipt(TypedDict): quantity: NotRequired[Decimal] total: NotRequired[int] unit_cost: NotRequired[int] + + +class TransactionCreateForceCaptureParamsSettlementDetails(TypedDict): + amount: int + """ + Positive settlement amount magnitude in the smallest currency unit. Must match the converted merchant amount and, when settlement and cardholder currencies are the same, this capture's finalized transaction amount magnitude. The transaction type determines the output sign. + """ + currency: str + """ + Settlement currency. + """ + exchange_rate: float + """ + Exchange rate from merchant amount to settlement amount, expressed in minor units. Must be finite and positive for different currencies. Matching currencies ignore the supplied numeric rate and use 1.0. + """ 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/risk/__init__.py b/stripe/params/risk/__init__.py new file mode 100644 index 000000000..1bbdada40 --- /dev/null +++ b/stripe/params/risk/__init__.py @@ -0,0 +1,157 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.risk._form_modify_params import ( + FormModifyParams as FormModifyParams, + FormModifyParamsAppeal as FormModifyParamsAppeal, + FormModifyParamsAuthorizationDocuments as FormModifyParamsAuthorizationDocuments, + FormModifyParamsPaymentProcessing as FormModifyParamsPaymentProcessing, + FormModifyParamsPaymentProcessingMultiProcessor as FormModifyParamsPaymentProcessingMultiProcessor, + FormModifyParamsPaymentProcessingMultiProcessorFile as FormModifyParamsPaymentProcessingMultiProcessorFile, + FormModifyParamsProductRemoval as FormModifyParamsProductRemoval, + FormModifyParamsReviewedFields as FormModifyParamsReviewedFields, + FormModifyParamsReviewedFieldsAttestation as FormModifyParamsReviewedFieldsAttestation, + FormModifyParamsSelfFundingContext as FormModifyParamsSelfFundingContext, + FormModifyParamsSelfFundingContextSourceOfWealth as FormModifyParamsSelfFundingContextSourceOfWealth, + FormModifyParamsTransactionContext as FormModifyParamsTransactionContext, + FormModifyParamsTransactionContextSourceOfFunds as FormModifyParamsTransactionContextSourceOfFunds, + ) + from stripe.params.risk._form_retrieve_params import ( + FormRetrieveParams as FormRetrieveParams, + ) + from stripe.params.risk._form_update_params import ( + FormUpdateParams as FormUpdateParams, + FormUpdateParamsAppeal as FormUpdateParamsAppeal, + FormUpdateParamsAuthorizationDocuments as FormUpdateParamsAuthorizationDocuments, + FormUpdateParamsPaymentProcessing as FormUpdateParamsPaymentProcessing, + FormUpdateParamsPaymentProcessingMultiProcessor as FormUpdateParamsPaymentProcessingMultiProcessor, + FormUpdateParamsPaymentProcessingMultiProcessorFile as FormUpdateParamsPaymentProcessingMultiProcessorFile, + FormUpdateParamsProductRemoval as FormUpdateParamsProductRemoval, + FormUpdateParamsReviewedFields as FormUpdateParamsReviewedFields, + FormUpdateParamsReviewedFieldsAttestation as FormUpdateParamsReviewedFieldsAttestation, + FormUpdateParamsSelfFundingContext as FormUpdateParamsSelfFundingContext, + FormUpdateParamsSelfFundingContextSourceOfWealth as FormUpdateParamsSelfFundingContextSourceOfWealth, + FormUpdateParamsTransactionContext as FormUpdateParamsTransactionContext, + FormUpdateParamsTransactionContextSourceOfFunds as FormUpdateParamsTransactionContextSourceOfFunds, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "FormModifyParams": ("stripe.params.risk._form_modify_params", False), + "FormModifyParamsAppeal": ( + "stripe.params.risk._form_modify_params", + False, + ), + "FormModifyParamsAuthorizationDocuments": ( + "stripe.params.risk._form_modify_params", + False, + ), + "FormModifyParamsPaymentProcessing": ( + "stripe.params.risk._form_modify_params", + False, + ), + "FormModifyParamsPaymentProcessingMultiProcessor": ( + "stripe.params.risk._form_modify_params", + False, + ), + "FormModifyParamsPaymentProcessingMultiProcessorFile": ( + "stripe.params.risk._form_modify_params", + False, + ), + "FormModifyParamsProductRemoval": ( + "stripe.params.risk._form_modify_params", + False, + ), + "FormModifyParamsReviewedFields": ( + "stripe.params.risk._form_modify_params", + False, + ), + "FormModifyParamsReviewedFieldsAttestation": ( + "stripe.params.risk._form_modify_params", + False, + ), + "FormModifyParamsSelfFundingContext": ( + "stripe.params.risk._form_modify_params", + False, + ), + "FormModifyParamsSelfFundingContextSourceOfWealth": ( + "stripe.params.risk._form_modify_params", + False, + ), + "FormModifyParamsTransactionContext": ( + "stripe.params.risk._form_modify_params", + False, + ), + "FormModifyParamsTransactionContextSourceOfFunds": ( + "stripe.params.risk._form_modify_params", + False, + ), + "FormRetrieveParams": ("stripe.params.risk._form_retrieve_params", False), + "FormUpdateParams": ("stripe.params.risk._form_update_params", False), + "FormUpdateParamsAppeal": ( + "stripe.params.risk._form_update_params", + False, + ), + "FormUpdateParamsAuthorizationDocuments": ( + "stripe.params.risk._form_update_params", + False, + ), + "FormUpdateParamsPaymentProcessing": ( + "stripe.params.risk._form_update_params", + False, + ), + "FormUpdateParamsPaymentProcessingMultiProcessor": ( + "stripe.params.risk._form_update_params", + False, + ), + "FormUpdateParamsPaymentProcessingMultiProcessorFile": ( + "stripe.params.risk._form_update_params", + False, + ), + "FormUpdateParamsProductRemoval": ( + "stripe.params.risk._form_update_params", + False, + ), + "FormUpdateParamsReviewedFields": ( + "stripe.params.risk._form_update_params", + False, + ), + "FormUpdateParamsReviewedFieldsAttestation": ( + "stripe.params.risk._form_update_params", + False, + ), + "FormUpdateParamsSelfFundingContext": ( + "stripe.params.risk._form_update_params", + False, + ), + "FormUpdateParamsSelfFundingContextSourceOfWealth": ( + "stripe.params.risk._form_update_params", + False, + ), + "FormUpdateParamsTransactionContext": ( + "stripe.params.risk._form_update_params", + False, + ), + "FormUpdateParamsTransactionContextSourceOfFunds": ( + "stripe.params.risk._form_update_params", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/params/risk/_form_modify_params.py b/stripe/params/risk/_form_modify_params.py new file mode 100644 index 000000000..ed3c6a970 --- /dev/null +++ b/stripe/params/risk/_form_modify_params.py @@ -0,0 +1,182 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class FormModifyParams(RequestOptions): + appeal: NotRequired["FormModifyParamsAppeal"] + """ + Provide this for Forms of type `appeal`. + """ + authorization_documents: NotRequired[ + "FormModifyParamsAuthorizationDocuments" + ] + """ + Provide this for Forms of type `authorization_documents`. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + payment_processing: NotRequired["FormModifyParamsPaymentProcessing"] + """ + Provide this for Forms of type `payment_processing`. + """ + product_removal: NotRequired["FormModifyParamsProductRemoval"] + """ + Provide this for Forms of type `product_removal`. + """ + reviewed_fields: NotRequired["FormModifyParamsReviewedFields"] + """ + Provide this for Forms of type `reviewed_fields`. + """ + self_funding_context: NotRequired["FormModifyParamsSelfFundingContext"] + """ + Provide this for Forms of type `self_funding_context`. + """ + transaction_context: NotRequired["FormModifyParamsTransactionContext"] + """ + Provide this for Forms of type `transaction_context`. + """ + + +class FormModifyParamsAppeal(TypedDict): + explanation: str + """ + A text explanation for the appeal. + """ + + +class FormModifyParamsAuthorizationDocuments(TypedDict): + files: List[str] + """ + IDs of uploaded files to attach as authorization documents. + """ + + +class FormModifyParamsPaymentProcessing(TypedDict): + multi_processor: NotRequired[ + "FormModifyParamsPaymentProcessingMultiProcessor" + ] + """ + Payments the connected account accepts outside Stripe. + """ + purpose: NotRequired[str] + """ + How the connected account uses Stripe. + """ + stripe_selection_rationale: NotRequired[str] + """ + Why the connected account chose Stripe. + """ + + +class FormModifyParamsPaymentProcessingMultiProcessor(TypedDict): + files: NotRequired[ + List["FormModifyParamsPaymentProcessingMultiProcessorFile"] + ] + """ + Files evidencing payments accepted outside Stripe. Each entry carries a tag naming the document type so a reviewer can distinguish statement types without opening the file. + """ + value: NotRequired[str] + """ + Whether the connected account accepts payments outside Stripe. + """ + + +class FormModifyParamsPaymentProcessingMultiProcessorFile(TypedDict): + file: str + """ + ID of the uploaded file. Upload using /v1/files before referencing it here. + """ + tag: NotRequired[str] + """ + What kind of document this is. One of alt_financial_statements, recent_bank_statements, or payment_receipt. + """ + + +class FormModifyParamsProductRemoval(TypedDict): + items_removed_at: int + """ + The Unix timestamp when the prohibited items were removed. + """ + + +class FormModifyParamsReviewedFields(TypedDict): + attestation: "FormModifyParamsReviewedFieldsAttestation" + """ + The connected account's attestation that the named account field values are accurate. Update inaccurate values through the Accounts API before attesting. + """ + + +class FormModifyParamsReviewedFieldsAttestation(TypedDict): + attested_at: NotRequired[int] + """ + The Unix timestamp when the connected account attested to these fields. + """ + fields: NotRequired[List[str]] + """ + Account field paths in the currently accepted v2 Accounts API format, for example `defaults.profile.product_description`. + """ + + +class FormModifyParamsSelfFundingContext(TypedDict): + source_of_wealth: NotRequired[ + "FormModifyParamsSelfFundingContextSourceOfWealth" + ] + """ + The connected account's source of wealth. + """ + + +class FormModifyParamsSelfFundingContextSourceOfWealth(TypedDict): + description: NotRequired[str] + """ + A text explanation of the connected account's source of wealth. + """ + files: NotRequired[List[str]] + """ + IDs of uploaded files evidencing the source of wealth. + """ + + +class FormModifyParamsTransactionContext(TypedDict): + frequency: NotRequired[str] + """ + How often the connected account expects transactions like this one. One of one_time_payment, recurring_subscription, repeat_customer, split_payment, or something_else. + """ + purpose: NotRequired[str] + """ + The purpose of the transaction. + """ + purpose_files: NotRequired[List[str]] + """ + IDs of uploaded files evidencing the purpose of the transaction. + """ + sender_relationship: NotRequired[str] + """ + The connected account's relationship to the sender. + """ + source_of_funds: NotRequired[ + "FormModifyParamsTransactionContextSourceOfFunds" + ] + """ + Where the funds for the transaction came from. + """ + use_of_funds: NotRequired[str] + """ + How the funds from the transaction will be used. + """ + + +class FormModifyParamsTransactionContextSourceOfFunds(TypedDict): + description: NotRequired[str] + """ + A text explanation of where the funds for the transaction came from. + """ + files: NotRequired[List[str]] + """ + IDs of uploaded files evidencing the source of funds. + """ diff --git a/stripe/params/risk/_form_retrieve_params.py b/stripe/params/risk/_form_retrieve_params.py new file mode 100644 index 000000000..ed2727b6b --- /dev/null +++ b/stripe/params/risk/_form_retrieve_params.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class FormRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/risk/_form_update_params.py b/stripe/params/risk/_form_update_params.py new file mode 100644 index 000000000..a3516b9b3 --- /dev/null +++ b/stripe/params/risk/_form_update_params.py @@ -0,0 +1,181 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class FormUpdateParams(TypedDict): + appeal: NotRequired["FormUpdateParamsAppeal"] + """ + Provide this for Forms of type `appeal`. + """ + authorization_documents: NotRequired[ + "FormUpdateParamsAuthorizationDocuments" + ] + """ + Provide this for Forms of type `authorization_documents`. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + payment_processing: NotRequired["FormUpdateParamsPaymentProcessing"] + """ + Provide this for Forms of type `payment_processing`. + """ + product_removal: NotRequired["FormUpdateParamsProductRemoval"] + """ + Provide this for Forms of type `product_removal`. + """ + reviewed_fields: NotRequired["FormUpdateParamsReviewedFields"] + """ + Provide this for Forms of type `reviewed_fields`. + """ + self_funding_context: NotRequired["FormUpdateParamsSelfFundingContext"] + """ + Provide this for Forms of type `self_funding_context`. + """ + transaction_context: NotRequired["FormUpdateParamsTransactionContext"] + """ + Provide this for Forms of type `transaction_context`. + """ + + +class FormUpdateParamsAppeal(TypedDict): + explanation: str + """ + A text explanation for the appeal. + """ + + +class FormUpdateParamsAuthorizationDocuments(TypedDict): + files: List[str] + """ + IDs of uploaded files to attach as authorization documents. + """ + + +class FormUpdateParamsPaymentProcessing(TypedDict): + multi_processor: NotRequired[ + "FormUpdateParamsPaymentProcessingMultiProcessor" + ] + """ + Payments the connected account accepts outside Stripe. + """ + purpose: NotRequired[str] + """ + How the connected account uses Stripe. + """ + stripe_selection_rationale: NotRequired[str] + """ + Why the connected account chose Stripe. + """ + + +class FormUpdateParamsPaymentProcessingMultiProcessor(TypedDict): + files: NotRequired[ + List["FormUpdateParamsPaymentProcessingMultiProcessorFile"] + ] + """ + Files evidencing payments accepted outside Stripe. Each entry carries a tag naming the document type so a reviewer can distinguish statement types without opening the file. + """ + value: NotRequired[str] + """ + Whether the connected account accepts payments outside Stripe. + """ + + +class FormUpdateParamsPaymentProcessingMultiProcessorFile(TypedDict): + file: str + """ + ID of the uploaded file. Upload using /v1/files before referencing it here. + """ + tag: NotRequired[str] + """ + What kind of document this is. One of alt_financial_statements, recent_bank_statements, or payment_receipt. + """ + + +class FormUpdateParamsProductRemoval(TypedDict): + items_removed_at: int + """ + The Unix timestamp when the prohibited items were removed. + """ + + +class FormUpdateParamsReviewedFields(TypedDict): + attestation: "FormUpdateParamsReviewedFieldsAttestation" + """ + The connected account's attestation that the named account field values are accurate. Update inaccurate values through the Accounts API before attesting. + """ + + +class FormUpdateParamsReviewedFieldsAttestation(TypedDict): + attested_at: NotRequired[int] + """ + The Unix timestamp when the connected account attested to these fields. + """ + fields: NotRequired[List[str]] + """ + Account field paths in the currently accepted v2 Accounts API format, for example `defaults.profile.product_description`. + """ + + +class FormUpdateParamsSelfFundingContext(TypedDict): + source_of_wealth: NotRequired[ + "FormUpdateParamsSelfFundingContextSourceOfWealth" + ] + """ + The connected account's source of wealth. + """ + + +class FormUpdateParamsSelfFundingContextSourceOfWealth(TypedDict): + description: NotRequired[str] + """ + A text explanation of the connected account's source of wealth. + """ + files: NotRequired[List[str]] + """ + IDs of uploaded files evidencing the source of wealth. + """ + + +class FormUpdateParamsTransactionContext(TypedDict): + frequency: NotRequired[str] + """ + How often the connected account expects transactions like this one. One of one_time_payment, recurring_subscription, repeat_customer, split_payment, or something_else. + """ + purpose: NotRequired[str] + """ + The purpose of the transaction. + """ + purpose_files: NotRequired[List[str]] + """ + IDs of uploaded files evidencing the purpose of the transaction. + """ + sender_relationship: NotRequired[str] + """ + The connected account's relationship to the sender. + """ + source_of_funds: NotRequired[ + "FormUpdateParamsTransactionContextSourceOfFunds" + ] + """ + Where the funds for the transaction came from. + """ + use_of_funds: NotRequired[str] + """ + How the funds from the transaction will be used. + """ + + +class FormUpdateParamsTransactionContextSourceOfFunds(TypedDict): + description: NotRequired[str] + """ + A text explanation of where the funds for the transaction came from. + """ + files: NotRequired[List[str]] + """ + IDs of uploaded files evidencing the source of funds. + """ diff --git a/stripe/params/test_helpers/issuing/__init__.py b/stripe/params/test_helpers/issuing/__init__.py index 1035e88a3..4bac4ea0a 100644 --- a/stripe/params/test_helpers/issuing/__init__.py +++ b/stripe/params/test_helpers/issuing/__init__.py @@ -17,9 +17,9 @@ AuthorizationCaptureParamsPurchaseDetailsFlight as AuthorizationCaptureParamsPurchaseDetailsFlight, AuthorizationCaptureParamsPurchaseDetailsFlightSegment as AuthorizationCaptureParamsPurchaseDetailsFlightSegment, AuthorizationCaptureParamsPurchaseDetailsFuel as AuthorizationCaptureParamsPurchaseDetailsFuel, - AuthorizationCaptureParamsPurchaseDetailsHealthcare as AuthorizationCaptureParamsPurchaseDetailsHealthcare, AuthorizationCaptureParamsPurchaseDetailsLodging as AuthorizationCaptureParamsPurchaseDetailsLodging, AuthorizationCaptureParamsPurchaseDetailsReceipt as AuthorizationCaptureParamsPurchaseDetailsReceipt, + AuthorizationCaptureParamsSettlementDetails as AuthorizationCaptureParamsSettlementDetails, ) from stripe.params.test_helpers.issuing._authorization_create_params import ( AuthorizationCreateParams as AuthorizationCreateParams, @@ -121,9 +121,9 @@ TransactionCreateForceCaptureParamsPurchaseDetailsFlight as TransactionCreateForceCaptureParamsPurchaseDetailsFlight, TransactionCreateForceCaptureParamsPurchaseDetailsFlightSegment as TransactionCreateForceCaptureParamsPurchaseDetailsFlightSegment, TransactionCreateForceCaptureParamsPurchaseDetailsFuel as TransactionCreateForceCaptureParamsPurchaseDetailsFuel, - TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare as TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare, TransactionCreateForceCaptureParamsPurchaseDetailsLodging as TransactionCreateForceCaptureParamsPurchaseDetailsLodging, TransactionCreateForceCaptureParamsPurchaseDetailsReceipt as TransactionCreateForceCaptureParamsPurchaseDetailsReceipt, + TransactionCreateForceCaptureParamsSettlementDetails as TransactionCreateForceCaptureParamsSettlementDetails, ) from stripe.params.test_helpers.issuing._transaction_create_unlinked_refund_params import ( TransactionCreateUnlinkedRefundParams as TransactionCreateUnlinkedRefundParams, @@ -138,7 +138,6 @@ TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlight as TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlight, TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlightSegment as TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlightSegment, TransactionCreateUnlinkedRefundParamsPurchaseDetailsFuel as TransactionCreateUnlinkedRefundParamsPurchaseDetailsFuel, - TransactionCreateUnlinkedRefundParamsPurchaseDetailsHealthcare as TransactionCreateUnlinkedRefundParamsPurchaseDetailsHealthcare, TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging as TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging, TransactionCreateUnlinkedRefundParamsPurchaseDetailsReceipt as TransactionCreateUnlinkedRefundParamsPurchaseDetailsReceipt, ) @@ -196,15 +195,15 @@ "stripe.params.test_helpers.issuing._authorization_capture_params", False, ), - "AuthorizationCaptureParamsPurchaseDetailsHealthcare": ( + "AuthorizationCaptureParamsPurchaseDetailsLodging": ( "stripe.params.test_helpers.issuing._authorization_capture_params", False, ), - "AuthorizationCaptureParamsPurchaseDetailsLodging": ( + "AuthorizationCaptureParamsPurchaseDetailsReceipt": ( "stripe.params.test_helpers.issuing._authorization_capture_params", False, ), - "AuthorizationCaptureParamsPurchaseDetailsReceipt": ( + "AuthorizationCaptureParamsSettlementDetails": ( "stripe.params.test_helpers.issuing._authorization_capture_params", False, ), @@ -452,15 +451,15 @@ "stripe.params.test_helpers.issuing._transaction_create_force_capture_params", False, ), - "TransactionCreateForceCaptureParamsPurchaseDetailsHealthcare": ( + "TransactionCreateForceCaptureParamsPurchaseDetailsLodging": ( "stripe.params.test_helpers.issuing._transaction_create_force_capture_params", False, ), - "TransactionCreateForceCaptureParamsPurchaseDetailsLodging": ( + "TransactionCreateForceCaptureParamsPurchaseDetailsReceipt": ( "stripe.params.test_helpers.issuing._transaction_create_force_capture_params", False, ), - "TransactionCreateForceCaptureParamsPurchaseDetailsReceipt": ( + "TransactionCreateForceCaptureParamsSettlementDetails": ( "stripe.params.test_helpers.issuing._transaction_create_force_capture_params", False, ), @@ -512,10 +511,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..6d989e99d 100644 --- a/stripe/params/test_helpers/issuing/_authorization_capture_params.py +++ b/stripe/params/test_helpers/issuing/_authorization_capture_params.py @@ -18,6 +18,10 @@ class AuthorizationCaptureParams(TypedDict): """ Specifies which fields in the response should be expanded. """ + merchant_amount_exchange_rate: NotRequired[float] + """ + Exchange rate from merchant amount to capture amount, expressed in minor units. Must be finite and positive for different currencies. Matching currencies ignore the supplied numeric rate and use 1.0. The capture amount remains authoritative. + """ network_data: NotRequired["AuthorizationCaptureParamsNetworkData"] """ Details about the transaction, such as processing dates, set by the card network. @@ -26,6 +30,12 @@ class AuthorizationCaptureParams(TypedDict): """ Additional purchase information that is optionally provided by the merchant. """ + settlement_details: NotRequired[ + "AuthorizationCaptureParamsSettlementDetails" + ] + """ + Synthetic settlement values for this purchase capture. If omitted, defaults to the final signed transaction amount, transaction currency, and effective merchant-to-cardholder exchange rate. Supply all three fields to override. This does not create a settlement or change funding. + """ class AuthorizationCaptureParamsNetworkData(TypedDict): @@ -48,12 +58,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 +259,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] """ @@ -311,3 +275,18 @@ class AuthorizationCaptureParamsPurchaseDetailsReceipt(TypedDict): quantity: NotRequired[Decimal] total: NotRequired[int] unit_cost: NotRequired[int] + + +class AuthorizationCaptureParamsSettlementDetails(TypedDict): + amount: int + """ + Positive settlement amount magnitude in the smallest currency unit. Must match the converted merchant amount and, when settlement and cardholder currencies are the same, this capture's finalized transaction amount magnitude. The transaction type determines the output sign. + """ + currency: str + """ + Settlement currency. + """ + exchange_rate: float + """ + Exchange rate from merchant amount to settlement amount, expressed in minor units. Must be finite and positive for different currencies. Matching currencies ignore the supplied numeric rate and use 1.0. + """ diff --git a/stripe/params/test_helpers/issuing/_authorization_create_params.py b/stripe/params/test_helpers/issuing/_authorization_create_params.py index f16215e50..315a8cf3f 100644 --- a/stripe/params/test_helpers/issuing/_authorization_create_params.py +++ b/stripe/params/test_helpers/issuing/_authorization_create_params.py @@ -58,6 +58,10 @@ class AuthorizationCreateParams(TypedDict): """ The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). """ + merchant_amount_exchange_rate: NotRequired[float] + """ + Exchange rate from merchant amount to cardholder amount, expressed in minor units. Must be finite and positive for different currencies. Matching currencies ignore the supplied numeric rate and use 1.0. + """ merchant_currency: NotRequired[str] """ The currency of the authorization. If not provided, defaults to the currency of the card. 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). @@ -89,6 +93,10 @@ class AuthorizationCreateParams(TypedDict): """ Stripe's assessment of the fraud risk for this authorization. """ + type: NotRequired[Literal["payment"]] + """ + The type of the authorization object, for example a payment authorization, an original credit authorization, or a refund authorization. + """ verification_data: NotRequired["AuthorizationCreateParamsVerificationData"] """ Verifications that Stripe performed on information that the cardholder provided to the merchant. 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..149ad4583 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 @@ -22,6 +22,10 @@ class TransactionCreateForceCaptureParams(TypedDict): """ Specifies which fields in the response should be expanded. """ + merchant_amount_exchange_rate: NotRequired[float] + """ + Exchange rate from merchant amount to cardholder amount, expressed in minor units. Must be finite and positive for different currencies. Matching currencies ignore the supplied numeric rate and use 1.0. The supplied amount remains the merchant amount. + """ merchant_data: NotRequired[ "TransactionCreateForceCaptureParamsMerchantData" ] @@ -38,6 +42,12 @@ class TransactionCreateForceCaptureParams(TypedDict): """ Additional purchase information that is optionally provided by the merchant. """ + settlement_details: NotRequired[ + "TransactionCreateForceCaptureParamsSettlementDetails" + ] + """ + Synthetic settlement values for this purchase force capture. If omitted, defaults to the final signed transaction amount, transaction currency, and effective merchant-to-cardholder exchange rate. Supply all three fields to override. This does not create a settlement or change funding. + """ class TransactionCreateForceCaptureParamsMerchantData(TypedDict): @@ -113,12 +123,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 +328,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] """ @@ -380,3 +344,18 @@ class TransactionCreateForceCaptureParamsPurchaseDetailsReceipt(TypedDict): quantity: NotRequired[Decimal] total: NotRequired[int] unit_cost: NotRequired[int] + + +class TransactionCreateForceCaptureParamsSettlementDetails(TypedDict): + amount: int + """ + Positive settlement amount magnitude in the smallest currency unit. Must match the converted merchant amount and, when settlement and cardholder currencies are the same, this capture's finalized transaction amount magnitude. The transaction type determines the output sign. + """ + currency: str + """ + Settlement currency. + """ + exchange_rate: float + """ + Exchange rate from merchant amount to settlement amount, expressed in minor units. Must be finite and positive for different currencies. Matching currencies ignore the supplied numeric rate and use 1.0. + """ 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/__init__.py b/stripe/params/v2/core/__init__.py index fa5712797..33a207776 100644 --- a/stripe/params/v2/core/__init__.py +++ b/stripe/params/v2/core/__init__.py @@ -277,15 +277,27 @@ AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCad as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCad, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCadProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCadProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCadProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCadProtectionsPspMigration, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzk as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzk, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtections, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtectionsPspMigration, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEurProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEurProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEurProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEurProtectionsPspMigration, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtectionsPspMigration, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNok as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNok, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtections, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtectionsPspMigration, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtectionsPspMigration, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPln as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPln, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtections, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtectionsPspMigration, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSek as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSek, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtections, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtectionsPspMigration, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtectionsPspMigration, @@ -299,15 +311,27 @@ AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCad as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCad, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCadProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCadProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCadProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCadProtectionsPspMigration, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzk as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzk, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtections, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtectionsPspMigration, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEurProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEurProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEurProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEurProtectionsPspMigration, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtectionsPspMigration, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNok as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNok, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtections, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtectionsPspMigration, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtectionsPspMigration, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPln as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPln, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtections, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtectionsPspMigration, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSek as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSek, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtections, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtectionsPspMigration, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtectionsPspMigration, @@ -546,6 +570,9 @@ AccountCreateParamsConfigurationRecipientCapabilitiesPixProtections as AccountCreateParamsConfigurationRecipientCapabilitiesPixProtections, AccountCreateParamsConfigurationRecipientCapabilitiesPixProtectionsPspMigration as AccountCreateParamsConfigurationRecipientCapabilitiesPixProtectionsPspMigration, AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance as AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance, + AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodial as AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodial, + AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtections as AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtections, + AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtectionsPspMigration as AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtectionsPspMigration, AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers as AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers, AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtections as AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtections, AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigration as AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigration, @@ -1048,15 +1075,27 @@ AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCad as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCad, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCadProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCadProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCadProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCadProtectionsPspMigration, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzk as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzk, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtections, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtectionsPspMigration, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEurProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEurProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEurProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEurProtectionsPspMigration, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtectionsPspMigration, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNok as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNok, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtections, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtectionsPspMigration, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtectionsPspMigration, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPln as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPln, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtections, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtectionsPspMigration, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSek as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSek, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtections, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtectionsPspMigration, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtectionsPspMigration, @@ -1070,15 +1109,27 @@ AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCad as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCad, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCadProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCadProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCadProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCadProtectionsPspMigration, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzk as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzk, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtections, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtectionsPspMigration, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEurProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEurProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEurProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEurProtectionsPspMigration, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtectionsPspMigration, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNok as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNok, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtections, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtectionsPspMigration, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtectionsPspMigration, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPln as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPln, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtections, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtectionsPspMigration, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSek as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSek, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtections, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtectionsPspMigration, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtectionsPspMigration, @@ -1317,6 +1368,9 @@ AccountUpdateParamsConfigurationRecipientCapabilitiesPixProtections as AccountUpdateParamsConfigurationRecipientCapabilitiesPixProtections, AccountUpdateParamsConfigurationRecipientCapabilitiesPixProtectionsPspMigration as AccountUpdateParamsConfigurationRecipientCapabilitiesPixProtectionsPspMigration, AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance as AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance, + AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodial as AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodial, + AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtections as AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtections, + AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtectionsPspMigration as AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtectionsPspMigration, AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers as AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers, AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtections as AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtections, AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigration as AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigration, @@ -2598,6 +2652,18 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzk": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur": ( "stripe.params.v2.core._account_create_params", False, @@ -2622,6 +2688,18 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNok": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd": ( "stripe.params.v2.core._account_create_params", False, @@ -2634,6 +2712,30 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPln": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSek": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd": ( "stripe.params.v2.core._account_create_params", False, @@ -2686,6 +2788,18 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzk": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur": ( "stripe.params.v2.core._account_create_params", False, @@ -2710,6 +2824,18 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNok": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd": ( "stripe.params.v2.core._account_create_params", False, @@ -2722,6 +2848,30 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPln": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSek": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd": ( "stripe.params.v2.core._account_create_params", False, @@ -3674,6 +3824,18 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodial": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers": ( "stripe.params.v2.core._account_create_params", False, @@ -5623,6 +5785,18 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzk": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur": ( "stripe.params.v2.core._account_update_params", False, @@ -5647,6 +5821,18 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNok": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd": ( "stripe.params.v2.core._account_update_params", False, @@ -5659,6 +5845,30 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPln": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSek": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd": ( "stripe.params.v2.core._account_update_params", False, @@ -5711,6 +5921,18 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzk": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur": ( "stripe.params.v2.core._account_update_params", False, @@ -5735,6 +5957,18 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNok": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd": ( "stripe.params.v2.core._account_update_params", False, @@ -5747,6 +5981,30 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPln": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSek": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd": ( "stripe.params.v2.core._account_update_params", False, @@ -6699,6 +6957,18 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodial": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers": ( "stripe.params.v2.core._account_update_params", False, diff --git a/stripe/params/v2/core/_account_create_params.py b/stripe/params/v2/core/_account_create_params.py index ba68db642..ff9a061fb 100644 --- a/stripe/params/v2/core/_account_create_params.py +++ b/stripe/params/v2/core/_account_create_params.py @@ -3562,6 +3562,12 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInb """ Can receive business storage-type funds on Stripe in CAD. """ + czk: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzk" + ] + """ + Can receive business storage-type funds on Stripe in CZK. + """ eur: NotRequired[ "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur" ] @@ -3574,12 +3580,30 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInb """ Can receive business storage-type funds on Stripe in GBP. """ + nok: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNok" + ] + """ + Can receive business storage-type funds on Stripe in NOK. + """ ousd: NotRequired[ "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd" ] """ Can receive business storage-type funds on Stripe in OUSD. """ + pln: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPln" + ] + """ + Can receive business storage-type funds on Stripe in PLN. + """ + sek: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSek" + ] + """ + Can receive business storage-type funds on Stripe in SEK. + """ usd: NotRequired[ "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd" ] @@ -3660,6 +3684,39 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInb """ +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzk( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur( TypedDict, ): @@ -3726,6 +3783,39 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInb """ +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNok( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd( TypedDict, ): @@ -3759,6 +3849,72 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInb """ +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPln( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSek( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd( TypedDict, ): @@ -3840,6 +3996,12 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOut """ Can send business storage-type funds on Stripe in CAD. """ + czk: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzk" + ] + """ + Can send business storage-type funds on Stripe in CZK. + """ eur: NotRequired[ "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur" ] @@ -3852,12 +4014,30 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOut """ Can send business storage-type funds on Stripe in GBP. """ + nok: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNok" + ] + """ + Can send business storage-type funds on Stripe in NOK. + """ ousd: NotRequired[ "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd" ] """ Can send business storage-type funds on Stripe in OUSD. """ + pln: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPln" + ] + """ + Can send business storage-type funds on Stripe in PLN. + """ + sek: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSek" + ] + """ + Can send business storage-type funds on Stripe in SEK. + """ usd: NotRequired[ "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd" ] @@ -3938,6 +4118,39 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOut """ +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzk( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur( TypedDict, ): @@ -4004,6 +4217,39 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOut """ +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNok( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd( TypedDict, ): @@ -4037,6 +4283,72 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOut """ +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPln( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSek( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd( TypedDict, ): @@ -7025,6 +7337,12 @@ class AccountCreateParamsConfigurationRecipientCapabilitiesPixProtectionsPspMigr class AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance( TypedDict, ): + stablecoin_custodial: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodial" + ] + """ + Enables this Account to hold USDC in their Stripe Balance via Bridge custodial wallets. + """ stripe_transfers: NotRequired[ "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers" ] @@ -7033,6 +7351,39 @@ class AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance( """ +class AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodial( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers( TypedDict, ): 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/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py index 13496d0be..849d0ab67 100644 --- a/stripe/params/v2/core/_account_update_params.py +++ b/stripe/params/v2/core/_account_update_params.py @@ -3592,6 +3592,12 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInb """ Can receive business storage-type funds on Stripe in CAD. """ + czk: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzk" + ] + """ + Can receive business storage-type funds on Stripe in CZK. + """ eur: NotRequired[ "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur" ] @@ -3604,12 +3610,30 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInb """ Can receive business storage-type funds on Stripe in GBP. """ + nok: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNok" + ] + """ + Can receive business storage-type funds on Stripe in NOK. + """ ousd: NotRequired[ "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd" ] """ Can receive business storage-type funds on Stripe in OUSD. """ + pln: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPln" + ] + """ + Can receive business storage-type funds on Stripe in PLN. + """ + sek: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSek" + ] + """ + Can receive business storage-type funds on Stripe in SEK. + """ usd: NotRequired[ "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd" ] @@ -3690,6 +3714,39 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInb """ +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzk( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCzkProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur( TypedDict, ): @@ -3756,6 +3813,39 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInb """ +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNok( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundNokProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd( TypedDict, ): @@ -3789,6 +3879,72 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInb """ +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPln( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundPlnProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSek( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundSekProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd( TypedDict, ): @@ -3870,6 +4026,12 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOut """ Can send business storage-type funds on Stripe in CAD. """ + czk: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzk" + ] + """ + Can send business storage-type funds on Stripe in CZK. + """ eur: NotRequired[ "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur" ] @@ -3882,12 +4044,30 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOut """ Can send business storage-type funds on Stripe in GBP. """ + nok: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNok" + ] + """ + Can send business storage-type funds on Stripe in NOK. + """ ousd: NotRequired[ "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd" ] """ Can send business storage-type funds on Stripe in OUSD. """ + pln: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPln" + ] + """ + Can send business storage-type funds on Stripe in PLN. + """ + sek: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSek" + ] + """ + Can send business storage-type funds on Stripe in SEK. + """ usd: NotRequired[ "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd" ] @@ -3968,6 +4148,39 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOut """ +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzk( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCzkProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur( TypedDict, ): @@ -4034,6 +4247,39 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOut """ +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNok( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundNokProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd( TypedDict, ): @@ -4067,6 +4313,72 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOut """ +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPln( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundPlnProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSek( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundSekProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd( TypedDict, ): @@ -7063,6 +7375,12 @@ class AccountUpdateParamsConfigurationRecipientCapabilitiesPixProtectionsPspMigr class AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance( TypedDict, ): + stablecoin_custodial: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodial" + ] + """ + Enables this Account to hold USDC in their Stripe Balance via Bridge custodial wallets. + """ stripe_transfers: NotRequired[ "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers" ] @@ -7071,6 +7389,39 @@ class AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance( """ +class AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodial( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStablecoinCustodialProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers( TypedDict, ): diff --git a/stripe/params/v2/data/__init__.py b/stripe/params/v2/data/__init__.py index 18d94a4ae..10dc8cc62 100644 --- a/stripe/params/v2/data/__init__.py +++ b/stripe/params/v2/data/__init__.py @@ -8,6 +8,9 @@ analytics as analytics, reporting as reporting, ) + from stripe.params.v2.data._operation_search_params import ( + OperationSearchParams as OperationSearchParams, + ) from stripe.params.v2.data._query_run_create_params import ( QueryRunCreateParams as QueryRunCreateParams, QueryRunCreateParamsQuery as QueryRunCreateParamsQuery, @@ -41,6 +44,10 @@ _import_map = { "analytics": ("stripe.params.v2.data.analytics", True), "reporting": ("stripe.params.v2.data.reporting", True), + "OperationSearchParams": ( + "stripe.params.v2.data._operation_search_params", + False, + ), "QueryRunCreateParams": ( "stripe.params.v2.data._query_run_create_params", False, diff --git a/stripe/params/v2/data/_operation_search_params.py b/stripe/params/v2/data/_operation_search_params.py new file mode 100644 index 000000000..caa9e76c0 --- /dev/null +++ b/stripe/params/v2/data/_operation_search_params.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class OperationSearchParams(TypedDict): + catalogs: NotRequired[ + List[Union[Literal["metrics", "reports", "schemas"], str]] + ] + """ + Restrict results to public resource catalogs. Defaults to all catalogs + available to the caller. + """ + limit: NotRequired[int] + """ + Maximum results. Default: 5, Max: 20. + """ + page: NotRequired[str] + """ + The page token for pagination. + """ + query: str + """ + Natural-language question. Required. + """ 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/risk/__init__.py b/stripe/risk/__init__.py new file mode 100644 index 000000000..a32875600 --- /dev/null +++ b/stripe/risk/__init__.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.risk._form import Form as Form + from stripe.risk._form_service import FormService as FormService + +# name -> (import_target, is_submodule) +_import_map = { + "Form": ("stripe.risk._form", False), + "FormService": ("stripe.risk._form_service", False), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/risk/_form.py b/stripe/risk/_form.py new file mode 100644 index 000000000..a18ffaea9 --- /dev/null +++ b/stripe/risk/_form.py @@ -0,0 +1,295 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._updateable_api_resource import UpdateableAPIResource +from stripe._util import sanitize_id +from typing import ClassVar, List, Optional, Union, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.risk._form_modify_params import FormModifyParams + from stripe.params.risk._form_retrieve_params import FormRetrieveParams + + +class Form(UpdateableAPIResource["Form"]): + """ + A risk Form represents a request from Stripe for information about a connected account. + """ + + OBJECT_NAME: ClassVar[Literal["risk.form"]] = "risk.form" + + class Appeal(StripeObject): + explanation: Optional[str] + """ + A text explanation for the appeal. + """ + + class AuthorizationDocuments(StripeObject): + files: Optional[List[str]] + """ + IDs of uploaded files attached as authorization documents. + """ + + class PaymentProcessing(StripeObject): + class MultiProcessor(StripeObject): + class File(StripeObject): + file: Optional[str] + """ + ID of the uploaded file. + """ + tag: Optional[str] + """ + The document type: `alt_financial_statements`, `recent_bank_statements`, or `payment_receipt`. + """ + + files: Optional[List[File]] + """ + Files evidencing payments accepted outside Stripe. Each entry includes a file ID and, when supplied, a document type tag. + """ + value: Optional[str] + """ + Whether the connected account accepts payments outside Stripe. + """ + _inner_class_types = {"files": File} + + multi_processor: Optional[MultiProcessor] + purpose: Optional[str] + """ + How the connected account uses Stripe. + """ + stripe_selection_rationale: Optional[str] + """ + Why the connected account chose Stripe. + """ + _inner_class_types = {"multi_processor": MultiProcessor} + + class ProductRemoval(StripeObject): + items_removed_at: Optional[int] + """ + Time when the prohibited items were removed, measured in seconds since the Unix epoch. + """ + + class ReviewedFields(StripeObject): + class Attestation(StripeObject): + attested_at: Optional[int] + """ + Time when the connected account attested to these fields, measured in seconds since the Unix epoch. + """ + fields: Optional[List[str]] + """ + Account field paths covered by this attestation. These are currently returned in v2 Accounts API format, such as `defaults.profile.product_description`. + """ + + attestation: Optional[Attestation] + _inner_class_types = {"attestation": Attestation} + + class SelfFundingContext(StripeObject): + class SourceOfWealth(StripeObject): + description: Optional[str] + """ + A text explanation of the connected account's source of wealth. + """ + files: Optional[List[str]] + """ + IDs of uploaded files evidencing the source of wealth. + """ + + source_of_wealth: Optional[SourceOfWealth] + _inner_class_types = {"source_of_wealth": SourceOfWealth} + + class Subject(StripeObject): + fields_to_review: Optional[List[str]] + """ + Account field paths the connected account must review. These are currently returned in v2 Accounts API format, such as `defaults.profile.product_description`. Present for reviewed fields Forms. + """ + transactions: Optional[List[str]] + """ + IDs of the transactions this Form is about. Present for transaction context Forms. + """ + + class TransactionContext(StripeObject): + class SourceOfFunds(StripeObject): + description: Optional[str] + """ + A text explanation of where the funds for the transaction came from. + """ + files: Optional[List[str]] + """ + IDs of uploaded files evidencing the source of funds. + """ + + frequency: Optional[str] + """ + How often the connected account expects transactions like this one. Can be `one_time_payment`, `recurring_subscription`, `repeat_customer`, `split_payment`, or `something_else`. A custom explanation can follow `something_else: `. + """ + purpose: Optional[str] + """ + The purpose of the transaction. + """ + purpose_files: Optional[List[str]] + """ + IDs of uploaded files evidencing the purpose of the transaction. + """ + sender_relationship: Optional[str] + """ + The connected account's relationship to the sender. + """ + source_of_funds: Optional[SourceOfFunds] + use_of_funds: Optional[str] + """ + How the funds from the transaction will be used. + """ + _inner_class_types = {"source_of_funds": SourceOfFunds} + + appeal: Optional[Appeal] + authorization_documents: Optional[AuthorizationDocuments] + closed_at: Optional[int] + """ + Time at which the Form closed, measured in seconds since the Unix epoch. + """ + created: Optional[int] + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + If the object exists in live mode, the value is `true`. If it exists in a sandbox, the value is `false`. + """ + object: Literal["risk.form"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + opened_at: Optional[int] + """ + Time at which the Form opened, measured in seconds since the Unix epoch. + """ + payment_processing: Optional[PaymentProcessing] + product_removal: Optional[ProductRemoval] + reviewed_fields: Optional[ReviewedFields] + self_funding_context: Optional[SelfFundingContext] + status: Literal["closed", "open"] + """ + The current status of the Form. + """ + subject: Optional[Subject] + transaction_context: Optional[TransactionContext] + type: Union[ + Literal[ + "appeal", + "authorization_documents", + "payment_processing", + "product_removal", + "reviewed_fields", + "self_funding_context", + "transaction_context", + ], + str, + ] + """ + The type of information requested by Stripe. + """ + + @classmethod + def modify( + cls, id: str, /, **params: Unpack["FormModifyParams"] + ) -> "Form": + """ + Updates a risk Form with the connected account's response. + + Error Codes + + | Code | HTTP status | Description | + | — | — | — | + | form_not_found | 400 | No Form matches the supplied ID. | + | form_closed | 400 | The Form is closed and cannot accept updates. | + | invalid_field_for_form_type | 400 | A submitted field is not supported by this Form type. | + | form_field_already_submitted | 400 | A submitted field has already been submitted. | + | form_insufficient_fields | 400 | Required fields are missing for this Form type. | + | resource_missing | 404 | A submitted file does not exist or is not accessible to the requesting account. | + """ + url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + return cast( + "Form", + cls._static_request( + "post", + url, + params=params, + ), + ) + + @classmethod + async def modify_async( + cls, id: str, /, **params: Unpack["FormModifyParams"] + ) -> "Form": + """ + Updates a risk Form with the connected account's response. + + Error Codes + + | Code | HTTP status | Description | + | — | — | — | + | form_not_found | 400 | No Form matches the supplied ID. | + | form_closed | 400 | The Form is closed and cannot accept updates. | + | invalid_field_for_form_type | 400 | A submitted field is not supported by this Form type. | + | form_field_already_submitted | 400 | A submitted field has already been submitted. | + | form_insufficient_fields | 400 | Required fields are missing for this Form type. | + | resource_missing | 404 | A submitted file does not exist or is not accessible to the requesting account. | + """ + url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + return cast( + "Form", + await cls._static_request_async( + "post", + url, + params=params, + ), + ) + + @classmethod + def retrieve( + cls, id: str, **params: Unpack["FormRetrieveParams"] + ) -> "Form": + """ + Retrieves a risk Form by ID. + + Error Codes + + | Code | HTTP status | Description | + | — | — | — | + | form_not_found | 400 | No Form matches the supplied ID. | + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["FormRetrieveParams"] + ) -> "Form": + """ + Retrieves a risk Form by ID. + + Error Codes + + | Code | HTTP status | Description | + | — | — | — | + | form_not_found | 400 | No Form matches the supplied ID. | + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + + _inner_class_types = { + "appeal": Appeal, + "authorization_documents": AuthorizationDocuments, + "payment_processing": PaymentProcessing, + "product_removal": ProductRemoval, + "reviewed_fields": ReviewedFields, + "self_funding_context": SelfFundingContext, + "subject": Subject, + "transaction_context": TransactionContext, + } diff --git a/stripe/risk/_form_service.py b/stripe/risk/_form_service.py new file mode 100644 index 000000000..e3963b18d --- /dev/null +++ b/stripe/risk/_form_service.py @@ -0,0 +1,132 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.risk._form_retrieve_params import FormRetrieveParams + from stripe.params.risk._form_update_params import FormUpdateParams + from stripe.risk._form import Form + + +class FormService(StripeService): + def retrieve( + self, + id: str, + /, + params: Optional["FormRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Form": + """ + Retrieves a risk Form by ID. + + Error Codes + + | Code | HTTP status | Description | + | — | — | — | + | form_not_found | 400 | No Form matches the supplied ID. | + """ + return cast( + "Form", + self._request( + "get", + "/v1/risk/forms/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["FormRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Form": + """ + Retrieves a risk Form by ID. + + Error Codes + + | Code | HTTP status | Description | + | — | — | — | + | form_not_found | 400 | No Form matches the supplied ID. | + """ + return cast( + "Form", + await self._request_async( + "get", + "/v1/risk/forms/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + def update( + self, + id: str, + /, + params: Optional["FormUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Form": + """ + Updates a risk Form with the connected account's response. + + Error Codes + + | Code | HTTP status | Description | + | — | — | — | + | form_not_found | 400 | No Form matches the supplied ID. | + | form_closed | 400 | The Form is closed and cannot accept updates. | + | invalid_field_for_form_type | 400 | A submitted field is not supported by this Form type. | + | form_field_already_submitted | 400 | A submitted field has already been submitted. | + | form_insufficient_fields | 400 | Required fields are missing for this Form type. | + | resource_missing | 404 | A submitted file does not exist or is not accessible to the requesting account. | + """ + return cast( + "Form", + self._request( + "post", + "/v1/risk/forms/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + id: str, + /, + params: Optional["FormUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Form": + """ + Updates a risk Form with the connected account's response. + + Error Codes + + | Code | HTTP status | Description | + | — | — | — | + | form_not_found | 400 | No Form matches the supplied ID. | + | form_closed | 400 | The Form is closed and cannot accept updates. | + | invalid_field_for_form_type | 400 | A submitted field is not supported by this Form type. | + | form_field_already_submitted | 400 | A submitted field has already been submitted. | + | form_insufficient_fields | 400 | Required fields are missing for this Form type. | + | resource_missing | 404 | A submitted file does not exist or is not accessible to the requesting account. | + """ + return cast( + "Form", + await self._request_async( + "post", + "/v1/risk/forms/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) 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/treasury/_credit_reversal.py b/stripe/treasury/_credit_reversal.py index 3fe46f7f1..1fd053e1a 100644 --- a/stripe/treasury/_credit_reversal.py +++ b/stripe/treasury/_credit_reversal.py @@ -26,6 +26,8 @@ class CreditReversal( ListableAPIResource["CreditReversal"], ): """ + Legacy CreditReversals are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits?api-version=preview) instead of building a new v1 integration. + You can reverse some [ReceivedCredits](https://docs.stripe.com/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. """ diff --git a/stripe/treasury/_debit_reversal.py b/stripe/treasury/_debit_reversal.py index 379541f5e..3632edeb9 100644 --- a/stripe/treasury/_debit_reversal.py +++ b/stripe/treasury/_debit_reversal.py @@ -26,6 +26,8 @@ class DebitReversal( ListableAPIResource["DebitReversal"], ): """ + Legacy DebitReversals are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). + You can reverse some [ReceivedDebits](https://docs.stripe.com/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. """ diff --git a/stripe/treasury/_financial_account.py b/stripe/treasury/_financial_account.py index 5311aaab0..d52ad5cef 100644 --- a/stripe/treasury/_financial_account.py +++ b/stripe/treasury/_financial_account.py @@ -42,6 +42,8 @@ class FinancialAccount( UpdateableAPIResource["FinancialAccount"], ): """ + Legacy FinancialAccounts are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Financial Accounts](https://docs.stripe.com/api/v2/money-management/financial-accounts) instead of building a new v1 integration. + Stripe Treasury for Platforms provides users with a container for money called a FinancialAccount that is separate from their Payments balance. FinancialAccounts serve as the source and destination of Treasury for Platform's money movement APIs. """ diff --git a/stripe/treasury/_inbound_transfer.py b/stripe/treasury/_inbound_transfer.py index 727f28f97..a6ddbce83 100644 --- a/stripe/treasury/_inbound_transfer.py +++ b/stripe/treasury/_inbound_transfer.py @@ -41,6 +41,8 @@ class InboundTransfer( ListableAPIResource["InboundTransfer"], ): """ + Legacy InboundTransfers are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Inbound Transfers](https://docs.stripe.com/api/v2/money-management/inbound-transfers) instead of building a new v1 integration. + Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://docs.stripe.com/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) diff --git a/stripe/treasury/_outbound_payment.py b/stripe/treasury/_outbound_payment.py index c4fedcf36..d2ef498b6 100644 --- a/stripe/treasury/_outbound_payment.py +++ b/stripe/treasury/_outbound_payment.py @@ -44,6 +44,8 @@ class OutboundPayment( ListableAPIResource["OutboundPayment"], ): """ + Legacy OutboundPayments are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Payments](https://docs.stripe.com/api/v2/money-management/outbound-payments) instead of building a new v1 integration. + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://docs.stripe.com/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://docs.stripe.com/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. diff --git a/stripe/treasury/_outbound_transfer.py b/stripe/treasury/_outbound_transfer.py index f2d5990f2..fc483a065 100644 --- a/stripe/treasury/_outbound_transfer.py +++ b/stripe/treasury/_outbound_transfer.py @@ -44,6 +44,8 @@ class OutboundTransfer( ListableAPIResource["OutboundTransfer"], ): """ + Legacy OutboundTransfers are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Transfers](https://docs.stripe.com/api/v2/money-management/outbound-transfers?api-version=preview) instead of building a new v1 integration. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://docs.stripe.com/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. diff --git a/stripe/treasury/_received_credit.py b/stripe/treasury/_received_credit.py index d6572455c..db92209b1 100644 --- a/stripe/treasury/_received_credit.py +++ b/stripe/treasury/_received_credit.py @@ -27,6 +27,8 @@ class ReceivedCredit(ListableAPIResource["ReceivedCredit"]): """ + Legacy ReceivedCredits are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits?api-version=preview) instead of building a new v1 integration. + ReceivedCredits represent funds sent to a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. """ @@ -131,10 +133,14 @@ class LinkedFlows(StripeObject): class SourceFlowDetails(StripeObject): credit_reversal: Optional["CreditReversal"] """ + Legacy CreditReversals are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits?api-version=preview) instead of building a new v1 integration. + You can reverse some [ReceivedCredits](https://docs.stripe.com/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. """ outbound_payment: Optional["OutboundPayment"] """ + Legacy OutboundPayments are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Payments](https://docs.stripe.com/api/v2/money-management/outbound-payments) instead of building a new v1 integration. + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://docs.stripe.com/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://docs.stripe.com/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. @@ -143,6 +149,8 @@ class SourceFlowDetails(StripeObject): """ outbound_transfer: Optional["OutboundTransfer"] """ + Legacy OutboundTransfers are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Transfers](https://docs.stripe.com/api/v2/money-management/outbound-transfers?api-version=preview) instead of building a new v1 integration. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://docs.stripe.com/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. diff --git a/stripe/treasury/_received_debit.py b/stripe/treasury/_received_debit.py index 4591dede1..743f02cbf 100644 --- a/stripe/treasury/_received_debit.py +++ b/stripe/treasury/_received_debit.py @@ -23,6 +23,8 @@ class ReceivedDebit(ListableAPIResource["ReceivedDebit"]): """ + Legacy ReceivedDebits are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Debits](https://docs.stripe.com/api/v2/money-management/received-debits?api-version=preview) instead of building a new v1 integration. + ReceivedDebits represent funds pulled from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts). These are not initiated from the FinancialAccount. """ diff --git a/stripe/treasury/_transaction.py b/stripe/treasury/_transaction.py index b6e0602f2..b383cb3d0 100644 --- a/stripe/treasury/_transaction.py +++ b/stripe/treasury/_transaction.py @@ -26,6 +26,8 @@ class Transaction(ListableAPIResource["Transaction"]): """ + Legacy Transactions are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Transactions](https://docs.stripe.com/api/v2/money-management/transactions) instead of building a new v1 integration. + Transactions represent changes to a [FinancialAccount's](https://docs.stripe.com/api#financial_accounts) balance. """ @@ -50,14 +52,20 @@ class BalanceImpact(StripeObject): class FlowDetails(StripeObject): credit_reversal: Optional["CreditReversal"] """ + Legacy CreditReversals are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits?api-version=preview) instead of building a new v1 integration. + You can reverse some [ReceivedCredits](https://docs.stripe.com/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. """ debit_reversal: Optional["DebitReversal"] """ + Legacy DebitReversals are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). + You can reverse some [ReceivedDebits](https://docs.stripe.com/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. """ inbound_transfer: Optional["InboundTransfer"] """ + Legacy InboundTransfers are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Inbound Transfers](https://docs.stripe.com/api/v2/money-management/inbound-transfers) instead of building a new v1 integration. + Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://docs.stripe.com/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) @@ -72,6 +80,8 @@ class FlowDetails(StripeObject): """ outbound_payment: Optional["OutboundPayment"] """ + Legacy OutboundPayments are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Payments](https://docs.stripe.com/api/v2/money-management/outbound-payments) instead of building a new v1 integration. + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://docs.stripe.com/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://docs.stripe.com/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. @@ -80,6 +90,8 @@ class FlowDetails(StripeObject): """ outbound_transfer: Optional["OutboundTransfer"] """ + Legacy OutboundTransfers are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Transfers](https://docs.stripe.com/api/v2/money-management/outbound-transfers?api-version=preview) instead of building a new v1 integration. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://docs.stripe.com/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. @@ -88,10 +100,14 @@ class FlowDetails(StripeObject): """ received_credit: Optional["ReceivedCredit"] """ + Legacy ReceivedCredits are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits?api-version=preview) instead of building a new v1 integration. + ReceivedCredits represent funds sent to a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. """ received_debit: Optional["ReceivedDebit"] """ + Legacy ReceivedDebits are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Debits](https://docs.stripe.com/api/v2/money-management/received-debits?api-version=preview) instead of building a new v1 integration. + ReceivedDebits represent funds pulled from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts). These are not initiated from the FinancialAccount. """ type: Union[ diff --git a/stripe/treasury/_transaction_entry.py b/stripe/treasury/_transaction_entry.py index 11bef2a3a..1ac4d9068 100644 --- a/stripe/treasury/_transaction_entry.py +++ b/stripe/treasury/_transaction_entry.py @@ -27,6 +27,8 @@ class TransactionEntry(ListableAPIResource["TransactionEntry"]): """ + Legacy TransactionEntries are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Transaction Entries](https://docs.stripe.com/api/v2/money-management/transaction-entries) instead of building a new v1 integration. + TransactionEntries represent individual units of money movements within a single [Transaction](https://docs.stripe.com/api#transactions). """ @@ -51,14 +53,20 @@ class BalanceImpact(StripeObject): class FlowDetails(StripeObject): credit_reversal: Optional["CreditReversal"] """ + Legacy CreditReversals are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits?api-version=preview) instead of building a new v1 integration. + You can reverse some [ReceivedCredits](https://docs.stripe.com/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. """ debit_reversal: Optional["DebitReversal"] """ + Legacy DebitReversals are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). + You can reverse some [ReceivedDebits](https://docs.stripe.com/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. """ inbound_transfer: Optional["InboundTransfer"] """ + Legacy InboundTransfers are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Inbound Transfers](https://docs.stripe.com/api/v2/money-management/inbound-transfers) instead of building a new v1 integration. + Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://docs.stripe.com/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) @@ -73,6 +81,8 @@ class FlowDetails(StripeObject): """ outbound_payment: Optional["OutboundPayment"] """ + Legacy OutboundPayments are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Payments](https://docs.stripe.com/api/v2/money-management/outbound-payments) instead of building a new v1 integration. + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://docs.stripe.com/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://docs.stripe.com/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. @@ -81,6 +91,8 @@ class FlowDetails(StripeObject): """ outbound_transfer: Optional["OutboundTransfer"] """ + Legacy OutboundTransfers are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Transfers](https://docs.stripe.com/api/v2/money-management/outbound-transfers?api-version=preview) instead of building a new v1 integration. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://docs.stripe.com/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. @@ -89,10 +101,14 @@ class FlowDetails(StripeObject): """ received_credit: Optional["ReceivedCredit"] """ + Legacy ReceivedCredits are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits?api-version=preview) instead of building a new v1 integration. + ReceivedCredits represent funds sent to a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. """ received_debit: Optional["ReceivedDebit"] """ + Legacy ReceivedDebits are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Debits](https://docs.stripe.com/api/v2/money-management/received-debits?api-version=preview) instead of building a new v1 integration. + ReceivedDebits represent funds pulled from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts). These are not initiated from the FinancialAccount. """ type: Union[ diff --git a/stripe/v2/__init__.py b/stripe/v2/__init__.py index 013767ab9..8b6275d03 100644 --- a/stripe/v2/__init__.py +++ b/stripe/v2/__init__.py @@ -1,5 +1,8 @@ from typing_extensions import TYPE_CHECKING from stripe.v2._list_object import ListObject as ListObject +from stripe.v2._search_result_object import ( + SearchResultObject as SearchResultObject, +) from stripe.v2._amount import Amount as Amount, AmountParam as AmountParam diff --git a/stripe/v2/_data_service.py b/stripe/v2/_data_service.py index 78c9a6e56..0ca02bec7 100644 --- a/stripe/v2/_data_service.py +++ b/stripe/v2/_data_service.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from stripe.v2.data._analytics_service import AnalyticsService + from stripe.v2.data._operation_service import OperationService from stripe.v2.data._query_run_service import QueryRunService from stripe.v2.data._report_run_service import ReportRunService from stripe.v2.data._report_service import ReportService @@ -14,6 +15,7 @@ _subservices = { "analytics": ["stripe.v2.data._analytics_service", "AnalyticsService"], + "operations": ["stripe.v2.data._operation_service", "OperationService"], "query_runs": ["stripe.v2.data._query_run_service", "QueryRunService"], "reports": ["stripe.v2.data._report_service", "ReportService"], "report_runs": ["stripe.v2.data._report_run_service", "ReportRunService"], @@ -24,6 +26,7 @@ class DataService(StripeService): analytics: "AnalyticsService" + operations: "OperationService" query_runs: "QueryRunService" reports: "ReportService" report_runs: "ReportRunService" diff --git a/stripe/v2/_search_result_object.py b/stripe/v2/_search_result_object.py new file mode 100644 index 000000000..972aa382a --- /dev/null +++ b/stripe/v2/_search_result_object.py @@ -0,0 +1,80 @@ +from copy import deepcopy +from typing import ( + AsyncIterator, + Generic, + Iterator, + List, + Mapping, + Any, + Optional, + TypeVar, +) + +from stripe._any_iterator import AnyIterator +from stripe._stripe_object import StripeObject + + +T = TypeVar("T", bound=StripeObject) + + +class SearchResultObject(StripeObject, Generic[T]): + """A page of API v2 search results with POST-based auto-pagination.""" + + OBJECT_NAME = "v2.search_result" + data: List[T] + next_page_url: Optional[str] + previous_page_url: Optional[str] + total_count: int + + def __iter__(self) -> Iterator[T]: + return getattr(self, "data", []).__iter__() + + def __len__(self) -> int: + return getattr(self, "data", []).__len__() + + def auto_paging_iter(self) -> AnyIterator[T]: + return AnyIterator( + self._auto_paging_iter(), self._auto_paging_iter_async() + ) + + def _original_params(self) -> Mapping[str, Any]: + return deepcopy(self._retrieve_params) + + def _body_params(self, params: Mapping[str, Any]) -> Mapping[str, Any]: + body_params = dict(params) + body_params.pop("limit", None) + return body_params + + def _auto_paging_iter(self) -> Iterator[T]: + page: SearchResultObject[T] = self + params = self._original_params() + while True: + for item in page.data: + yield item + if page.next_page_url is None: + break + result = self._request( + "post", + page.next_page_url, + params=self._body_params(params), + base_address="api", + ) + assert isinstance(result, SearchResultObject) + page = result + + async def _auto_paging_iter_async(self) -> AsyncIterator[T]: + page: SearchResultObject[T] = self + params = self._original_params() + while True: + for item in page.data: + yield item + if page.next_page_url is None: + break + result = await self._request_async( + "post", + page.next_page_url, + params=self._body_params(params), + base_address="api", + ) + assert isinstance(result, SearchResultObject) + page = result diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index fe1ccf901..017c80ce3 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -6779,6 +6779,92 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } + class Czk(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = { + "psp_migration": PspMigration, + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + class Eur(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): @@ -6865,7 +6951,668 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class Gbp(StripeObject): + class Gbp(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = { + "psp_migration": PspMigration, + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class Nok(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = { + "psp_migration": PspMigration, + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class Ousd(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = { + "psp_migration": PspMigration, + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class Pln(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = { + "psp_migration": PspMigration, + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class Sek(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = { + "psp_migration": PspMigration, + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class Usd(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = { + "psp_migration": PspMigration, + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class Usdc(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = { + "psp_migration": PspMigration, + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + aud: Optional[Aud] + """ + Can receive business storage-type funds on Stripe in AUD. + """ + cad: Optional[Cad] + """ + Can receive business storage-type funds on Stripe in CAD. + """ + czk: Optional[Czk] + """ + Can receive business storage-type funds on Stripe in CZK. + """ + eur: Optional[Eur] + """ + Can receive business storage-type funds on Stripe in EUR. + """ + gbp: Optional[Gbp] + """ + Can receive business storage-type funds on Stripe in GBP. + """ + nok: Optional[Nok] + """ + Can receive business storage-type funds on Stripe in NOK. + """ + ousd: Optional[Ousd] + """ + Can receive business storage-type funds on Stripe in OUSD. + """ + pln: Optional[Pln] + """ + Can receive business storage-type funds on Stripe in PLN. + """ + sek: Optional[Sek] + """ + Can receive business storage-type funds on Stripe in SEK. + """ + usd: Optional[Usd] + """ + Can receive business storage-type funds on Stripe in USD. + """ + usdc: Optional[Usdc] + """ + Can receive business storage-type funds on Stripe in USDC. + """ + _inner_class_types = { + "aud": Aud, + "cad": Cad, + "czk": Czk, + "eur": Eur, + "gbp": Gbp, + "nok": Nok, + "ousd": Ousd, + "pln": Pln, + "sek": Sek, + "usd": Usd, + "usdc": Usdc, + } + + class Outbound(StripeObject): + class Aud(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -6951,7 +7698,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class Ousd(StripeObject): + class Cad(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -7037,7 +7784,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class Usd(StripeObject): + class Czk(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -7123,7 +7870,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class Usdc(StripeObject): + class Eur(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -7209,46 +7956,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - aud: Optional[Aud] - """ - Can receive business storage-type funds on Stripe in AUD. - """ - cad: Optional[Cad] - """ - Can receive business storage-type funds on Stripe in CAD. - """ - eur: Optional[Eur] - """ - Can receive business storage-type funds on Stripe in EUR. - """ - gbp: Optional[Gbp] - """ - Can receive business storage-type funds on Stripe in GBP. - """ - ousd: Optional[Ousd] - """ - Can receive business storage-type funds on Stripe in OUSD. - """ - usd: Optional[Usd] - """ - Can receive business storage-type funds on Stripe in USD. - """ - usdc: Optional[Usdc] - """ - Can receive business storage-type funds on Stripe in USDC. - """ - _inner_class_types = { - "aud": Aud, - "cad": Cad, - "eur": Eur, - "gbp": Gbp, - "ousd": Ousd, - "usd": Usd, - "usdc": Usdc, - } - - class Outbound(StripeObject): - class Aud(StripeObject): + class Gbp(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -7334,7 +8042,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class Cad(StripeObject): + class Nok(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -7420,7 +8128,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class Eur(StripeObject): + class Ousd(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -7506,7 +8214,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class Gbp(StripeObject): + class Pln(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -7592,7 +8300,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class Ousd(StripeObject): + class Sek(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -7858,6 +8566,10 @@ class StatusDetail(StripeObject): """ Can send business storage-type funds on Stripe in CAD. """ + czk: Optional[Czk] + """ + Can send business storage-type funds on Stripe in CZK. + """ eur: Optional[Eur] """ Can send business storage-type funds on Stripe in EUR. @@ -7866,10 +8578,22 @@ class StatusDetail(StripeObject): """ Can send business storage-type funds on Stripe in GBP. """ + nok: Optional[Nok] + """ + Can send business storage-type funds on Stripe in NOK. + """ ousd: Optional[Ousd] """ Can send business storage-type funds on Stripe in OUSD. """ + pln: Optional[Pln] + """ + Can send business storage-type funds on Stripe in PLN. + """ + sek: Optional[Sek] + """ + Can send business storage-type funds on Stripe in SEK. + """ usd: Optional[Usd] """ Can send business storage-type funds on Stripe in USD. @@ -7881,9 +8605,13 @@ class StatusDetail(StripeObject): _inner_class_types = { "aud": Aud, "cad": Cad, + "czk": Czk, "eur": Eur, "gbp": Gbp, + "nok": Nok, "ousd": Ousd, + "pln": Pln, + "sek": Sek, "usd": Usd, "usdc": Usdc, } @@ -14527,6 +15255,92 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } + class StablecoinCustodial(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = { + "psp_migration": PspMigration + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + class StripeTransfers(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): @@ -14617,12 +15431,17 @@ class StatusDetail(StripeObject): """ Enables this Account to complete payouts from their Stripe Balance (/v1/balance). """ + stablecoin_custodial: Optional[StablecoinCustodial] + """ + Enables this Account to hold USDC in their Stripe Balance via Bridge custodial wallets. + """ stripe_transfers: Optional[StripeTransfers] """ Enables this Account to receive /v1/transfers into their Stripe Balance (/v1/balance). """ _inner_class_types = { "payouts": Payouts, + "stablecoin_custodial": StablecoinCustodial, "stripe_transfers": StripeTransfers, } @@ -15230,6 +16049,7 @@ class Deadline(StripeObject): "sepa_bank_transfer_payments", "sepa_debit_payments", "stripe_balance.payouts", + "stripe_balance.stablecoin_custodial", "stripe_balance.stripe_transfers", "swish_payments", "twint_payments", @@ -18086,6 +18906,7 @@ class Deadline(StripeObject): "sepa_bank_transfer_payments", "sepa_debit_payments", "stripe_balance.payouts", + "stripe_balance.stablecoin_custodial", "stripe_balance.stripe_transfers", "swish_payments", "twint_payments", 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/data/__init__.py b/stripe/v2/data/__init__.py index 9b91a9ac5..3e514dc8f 100644 --- a/stripe/v2/data/__init__.py +++ b/stripe/v2/data/__init__.py @@ -8,6 +8,9 @@ from stripe.v2.data._analytics_service import ( AnalyticsService as AnalyticsService, ) + from stripe.v2.data._operation_service import ( + OperationService as OperationService, + ) from stripe.v2.data._query_run import QueryRun as QueryRun from stripe.v2.data._query_run_service import ( QueryRunService as QueryRunService, @@ -23,12 +26,16 @@ ) from stripe.v2.data._schema import Schema as Schema from stripe.v2.data._schema_service import SchemaService as SchemaService + from stripe.v2.data._search_result_list import ( + SearchResultList as SearchResultList, + ) # name -> (import_target, is_submodule) _import_map = { "analytics": ("stripe.v2.data.analytics", True), "reporting": ("stripe.v2.data.reporting", True), "AnalyticsService": ("stripe.v2.data._analytics_service", False), + "OperationService": ("stripe.v2.data._operation_service", False), "QueryRun": ("stripe.v2.data._query_run", False), "QueryRunService": ("stripe.v2.data._query_run_service", False), "Report": ("stripe.v2.data._report", False), @@ -38,6 +45,7 @@ "ReportingService": ("stripe.v2.data._reporting_service", False), "Schema": ("stripe.v2.data._schema", False), "SchemaService": ("stripe.v2.data._schema_service", False), + "SearchResultList": ("stripe.v2.data._search_result_list", False), } if not TYPE_CHECKING: diff --git a/stripe/v2/data/_operation_service.py b/stripe/v2/data/_operation_service.py new file mode 100644 index 000000000..24b86824b --- /dev/null +++ b/stripe/v2/data/_operation_service.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.data._operation_search_params import ( + OperationSearchParams, + ) + from stripe.v2.data._search_result_list import SearchResultList + + +class OperationService(StripeService): + def search( + self, + params: "OperationSearchParams", + options: Optional["RequestOptions"] = None, + ) -> "SearchResultList": + """ + Resolve a natural-language query into ranked public analytical resources + (schemas, reports, and metrics) with execution context. + """ + return cast( + "SearchResultList", + self._request( + "post", + "/v2/data/operations/search", + base_address="api", + params=params, + options=options, + ), + ) + + async def search_async( + self, + params: "OperationSearchParams", + options: Optional["RequestOptions"] = None, + ) -> "SearchResultList": + """ + Resolve a natural-language query into ranked public analytical resources + (schemas, reports, and metrics) with execution context. + """ + return cast( + "SearchResultList", + await self._request_async( + "post", + "/v2/data/operations/search", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/data/_search_result_list.py b/stripe/v2/data/_search_result_list.py new file mode 100644 index 000000000..b2be4566f --- /dev/null +++ b/stripe/v2/data/_search_result_list.py @@ -0,0 +1,384 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from decimal import Decimal +from stripe._stripe_object import StripeObject, UntypedStripeObject +from typing import ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class SearchResultList(StripeObject): + """ + A ranked set of public analytical resources matching a natural-language query. + """ + + OBJECT_NAME: ClassVar[Literal["v2.data.search_result_list"]] = ( + "v2.data.search_result_list" + ) + + class Context(StripeObject): + class BusinessConcept(StripeObject): + definition: str + """ + What the term means in the context of this domain. + """ + term: str + """ + The name of the concept, for example "decline reason". + """ + + business_concepts: List[BusinessConcept] + """ + Domain vocabulary relevant to the request, so that callers interpret the + returned resources consistently with how Stripe defines these terms. + """ + domain: str + """ + The business domain the request was matched to, for example "payments". + """ + guidance: str + """ + High-level routing guidance for the agent. When `data` is empty, may + advise how to refine the request or browse canonical resources. + """ + _inner_class_types = {"business_concepts": BusinessConcept} + + class Data(StripeObject): + class ExecutionSpec(StripeObject): + execution_url: str + """ + The canonical run endpoint, e.g. "/v2/data/report_runs" or "/v2/data/query_runs". + """ + http_method: Union[Literal["GET", "POST"], str] + """ + The HTTP method for `execution_url`. + """ + id: str + """ + The identifier to submit to `execution_url`, e.g. "report_123" or "table_123". + """ + + class Metrics(StripeObject): + class Dimension(StripeObject): + description: str + """ + A description of what the dimension represents. + """ + name: str + """ + The public dimension name accepted by the metric query endpoint. + """ + + accepts_currency: bool + """ + Whether the metric query endpoint accepts a `currency` parameter for this + metric. False for pure ratios and growth rates. + """ + dimensions: List[Dimension] + """ + Dimensions the metric can be filtered and grouped by. + """ + measure_format: Union[ + Literal["currency", "number", "percent"], str + ] + """ + How the metric's value is formatted. + """ + metric_namespace: str + """ + The metric namespace. Metrics queried together in one metric query request + must share a namespace. + """ + _inner_class_types = {"dimensions": Dimension} + + class Reports(StripeObject): + class OutputColumn(StripeObject): + description: str + """ + What the column represents. + """ + name: str + """ + The name of the column in the report output. + """ + type: Union[ + Literal[ + "bigint", + "boolean", + "date", + "datetime", + "decimal", + "double", + "integer", + "timestamp", + "varchar", + ], + str, + ] + """ + The data type of the column. + """ + + class Parameters(StripeObject): + class ArrayDetails(StripeObject): + class EnumDetails(StripeObject): + allowed_values: List[str] + """ + Allowed values of the enum. + """ + + element_type: Union[ + Literal["array", "enum", "string", "timestamp"], str + ] + """ + The data type of the elements in the array. + """ + enum_details: Optional[EnumDetails] + """ + Details about enum elements in the array. + """ + _inner_class_types = {"enum_details": EnumDetails} + + class EnumDetails(StripeObject): + allowed_values: List[str] + """ + Allowed values of the enum. + """ + + array_details: Optional[ArrayDetails] + """ + For array parameters, details about the array elements. + """ + description: str + """ + Explains the purpose and usage of the parameter. + """ + enum_details: Optional[EnumDetails] + """ + For enum parameters, the list of allowed values. + """ + required: bool + """ + Indicates whether the parameter must be provided. + """ + type: Union[ + Literal["array", "enum", "string", "timestamp"], str + ] + """ + The data type of the parameter. + """ + _inner_class_types = { + "array_details": ArrayDetails, + "enum_details": EnumDetails, + } + + output_columns: List[OutputColumn] + """ + Shape of the report output when known. + """ + parameters: UntypedStripeObject[Parameters] + """ + Parameter schema, keyed by parameter name, matching the `/v2/data/reports` + resource. + """ + _inner_class_types = { + "output_columns": OutputColumn, + "parameters": Parameters, + } + _inner_class_dicts = ["parameters"] + + class Schemas(StripeObject): + class Column(StripeObject): + class ForeignKeysFrom(StripeObject): + column: str + """ + The name of the referenced column. + """ + schema: str + """ + The identifier of the referenced schema. + """ + schema_name: str + """ + The name of the referenced schema. + """ + + class ForeignKeysTo(StripeObject): + column: str + """ + The name of the referenced column. + """ + schema: str + """ + The identifier of the referenced schema. + """ + schema_name: str + """ + The name of the referenced schema. + """ + + description: str + """ + A description of what the column represents. + """ + foreign_keys_from: List[ForeignKeysFrom] + """ + Columns in other schemas that reference this column as a foreign key. + """ + foreign_keys_to: List[ForeignKeysTo] + """ + Columns in other schemas that this column references as a foreign key. + """ + is_primary_key: bool + """ + Whether the column forms part of the table's primary key. + """ + name: str + """ + The name of the column. + """ + type: Union[ + Literal[ + "bigint", + "boolean", + "date", + "datetime", + "decimal", + "double", + "integer", + "timestamp", + "varchar", + ], + str, + ] + """ + The data type of the column. + """ + _inner_class_types = { + "foreign_keys_from": ForeignKeysFrom, + "foreign_keys_to": ForeignKeysTo, + } + + class RelevantReport(StripeObject): + description: str + """ + A description of the `Report`. + """ + id: str + """ + The unique identifier of the `Report`. + """ + name: str + """ + The human-readable name of the `Report`. + """ + reference_url: str + """ + Canonical API path for the `Report`, e.g. "/v2/data/reports/report_123". + """ + + columns: List[Column] + """ + Compact schema projection. + """ + dataset: Union[Literal["analytical"], str] + """ + The dataset used when submitting an ad-hoc query run. + """ + relevant_reports: List[RelevantReport] + """ + Stripe-defined reports that are relevant to this schema. + """ + _inner_class_types = { + "columns": Column, + "relevant_reports": RelevantReport, + } + + catalog: Optional[Union[Literal["metrics", "reports", "schemas"], str]] + description: str + """ + What the canonical resource contains. + """ + execution_spec: ExecutionSpec + """ + How to execute this result. + """ + extended_description: Optional[str] + """ + Per-result additional context: constraints, interpretation rules, and gotchas. + """ + id: str + """ + Canonical resource identity. + """ + metrics: Optional[Metrics] + """ + A pre-defined measure queryable through the metric query endpoint. + """ + name: str + """ + Human-readable name of the canonical resource. + """ + object_type: str + """ + The canonical resource type this result points at, e.g. "v2.data.schema" + or "v2.data.report". May name a resource that is not yet publicly + retrievable, in which case `reference_url` is omitted. Distinct from + `object`, which identifies this result itself. + """ + reference_url: str + """ + Canonical API path for retrieving the complete resource, e.g. + "/v2/data/reports/report_123". + """ + refreshed_at: str + """ + Present for schemas when known; omitted for resource types without data + freshness. + """ + relevance_score: Decimal + """ + Relative ordering signal from the search service (0-1). Not a + calibrated guarantee; callers must not use it as a configurable cutoff. + """ + reports: Optional[Reports] + """ + A Stripe-defined report exposed by `/v2/data/reports`. + """ + schemas: Optional[Schemas] + """ + A queryable table exposed by `/v2/data/schemas`. + """ + _inner_class_types = { + "execution_spec": ExecutionSpec, + "metrics": Metrics, + "reports": Reports, + "schemas": Schemas, + } + _field_encodings = {"relevance_score": "decimal_string"} + + context: Optional[Context] + """ + Domain-level intelligence. Present when a known domain matches; omitted + when the system falls back to direct semantic search. + """ + data: List[Data] + """ + Ranked public resources. Always present, including when empty. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + next_page_url: Optional[str] + """ + Token for the next page. + """ + object: Literal["v2.data.search_result_list"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + previous_page_url: Optional[str] + """ + Token for the previous page. + """ + _inner_class_types = {"context": Context, "data": Data} diff --git a/stripe/v2/money_management/_received_debit.py b/stripe/v2/money_management/_received_debit.py index e5526bfaa..4b9a8451a 100644 --- a/stripe/v2/money_management/_received_debit.py +++ b/stripe/v2/money_management/_received_debit.py @@ -8,7 +8,7 @@ class ReceivedDebit(StripeObject): """ - ReceivedDebit resource + Use ReceivedDebits API to retrieve information on when, where, and how funds are debited from your FinancialAccount. """ OBJECT_NAME: ClassVar[Literal["v2.money_management.received_debit"]] = ( 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_error.py b/tests/test_error.py index 73de812ac..f7d386eb9 100644 --- a/tests/test_error.py +++ b/tests/test_error.py @@ -2,8 +2,37 @@ import json - -from stripe._error import StripeError, CardError, APIConnectionError +import pickle + +import pytest + +from stripe._error import ( + APIConnectionError, + APIError, + AuthenticationError, + CardError, + IdempotencyError, + InvalidRequestError, + PermissionError, + RateLimitError, + SignatureVerificationError, + StripeError, + StripeErrorWithParamCode, + TemporarySessionExpiredError, +) + + +def assert_error_round_trips(err): + json_args = json.loads(json.dumps(err.args)) + round_tripped_errors = ( + pickle.loads(pickle.dumps(err)), + type(err)(*json_args), + ) + + for round_tripped in round_tripped_errors: + assert type(round_tripped) is type(err) + assert round_tripped.args == err.args + assert vars(round_tripped) == vars(err) class TestStripeError(object): @@ -114,3 +143,66 @@ def test_default_no_retry(self): err = APIConnectionError("msg", should_retry=True) assert err.should_retry + + +@pytest.mark.parametrize( + "error_class", + [ + StripeError, + APIError, + AuthenticationError, + IdempotencyError, + PermissionError, + RateLimitError, + StripeErrorWithParamCode, + TemporarySessionExpiredError, + ], +) +def test_stripe_error_round_trips(error_class): + err = error_class( + message="message", + http_body=b"body", + http_status=400, + json_body={"error": {"code": "error_code"}}, + headers={"request-id": "req_123"}, + code="error_code", + ) + + assert_error_round_trips(err) + + +@pytest.mark.parametrize( + "err", + [ + APIConnectionError( + "message", + b"body", + 400, + {"error": {"code": "error_code"}}, + {"request-id": "req_123"}, + "error_code", + True, + ), + CardError( + "message", + "param", + "error_code", + b"body", + 402, + {"error": {"code": "error_code"}}, + {"request-id": "req_123"}, + ), + InvalidRequestError( + message="message", + param="param", + code="error_code", + http_body=b"body", + http_status=400, + json_body={"error": {"code": "error_code"}}, + headers={"request-id": "req_123"}, + ), + SignatureVerificationError("message", "signature", b"body"), + ], +) +def test_stripe_error_with_custom_constructor_round_trips(err): + assert_error_round_trips(err) diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 4db089549..a6fb18a66 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -47470,6 +47470,28 @@ def test_v2_data_analytics_metric_query_post_service( is_json=True, ) + def test_v2_data_operation_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/data/operations/search", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.data.operations.search({"query": "query"}) + http_client_mock.assert_requested( + "post", + path="/v2/data/operations/search", + query_string="", + api_base="https://api.stripe.com", + post_data='{"query":"query"}', + is_json=True, + ) + def test_v2_data_query_run_post_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -50986,13 +51008,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 +51095,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 +51103,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 +51133,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", ) diff --git a/tests/test_oauth_error.py b/tests/test_oauth_error.py index 5eee7b66e..a8bf1e68d 100644 --- a/tests/test_oauth_error.py +++ b/tests/test_oauth_error.py @@ -1,6 +1,11 @@ # -*- coding: utf-8 -*- +import json +import pickle + +import pytest + from stripe import oauth_error @@ -11,3 +16,35 @@ def test_error_object(self): ) assert err.error is not None assert err.error.error == "some_oauth_error" + + +@pytest.mark.parametrize( + "error_class", + [ + oauth_error.OAuthError, + oauth_error.InvalidClientError, + oauth_error.InvalidGrantError, + oauth_error.InvalidRequestError, + oauth_error.InvalidScopeError, + oauth_error.UnsupportedGrantTypeError, + oauth_error.UnsupportedResponseTypeError, + ], +) +def test_oauth_error_round_trips(error_class): + err = error_class( + code="oauth_code", + description="description", + http_body=b"body", + http_status=400, + json_body={"error": "oauth_code"}, + headers={"request-id": "req_123"}, + ) + json_args = json.loads(json.dumps(err.args)) + + for round_tripped in ( + pickle.loads(pickle.dumps(err)), + error_class(*json_args), + ): + assert type(round_tripped) is error_class + assert round_tripped.args == err.args + assert vars(round_tripped) == vars(err) diff --git a/tests/test_v2_event.py b/tests/test_v2_event.py index 5a16cee35..0ab98ebf8 100644 --- a/tests/test_v2_event.py +++ b/tests/test_v2_event.py @@ -23,7 +23,10 @@ ) from stripe.events._event_classes import ALL_EVENT_NOTIFICATIONS from stripe._webhook import WebhookPayload, WebhookSignature -from tests.test_webhook import DUMMY_WEBHOOK_SECRET +from tests.test_webhook import ( + ASCII_WHITESPACE_WEBHOOK_SECRETS, + DUMMY_WEBHOOK_SECRET, +) EventParser = Callable[[str], ALL_EVENT_NOTIFICATIONS] @@ -254,7 +257,28 @@ def test_rejects_missing_secret( stripe_client.parse_event_notification( v2_payload_no_data, WebhookSignature.generate_signature_header( - v2_payload_no_data, DUMMY_WEBHOOK_SECRET + v2_payload_no_data, + DUMMY_WEBHOOK_SECRET, + ), + secret, + ) + + @pytest.mark.parametrize("secret", ASCII_WHITESPACE_WEBHOOK_SECRETS) + def test_rejects_ascii_whitespace_secret( + self, + stripe_client: StripeClient, + v2_payload_no_data: str, + secret: str, + ): + with pytest.raises( + SignatureVerificationError, + match="No webhook secret value was provided", + ): + stripe_client.parse_event_notification( + v2_payload_no_data, + WebhookSignature.generate_signature_header( + v2_payload_no_data, + secret, ), secret, ) diff --git a/tests/test_v2_search_result_object.py b/tests/test_v2_search_result_object.py new file mode 100644 index 000000000..002b606d8 --- /dev/null +++ b/tests/test_v2_search_result_object.py @@ -0,0 +1,88 @@ +import pytest + +from stripe.v2._search_result_object import SearchResultObject + + +class TestSearchResult(SearchResultObject): + requests = [] + pages = [] + + def _request(self, method, url, params=None, **kwargs): + self.requests.append((method, url, params, kwargs)) + return self.pages.pop(0) + + async def _request_async(self, method, url, params=None, **kwargs): + return self._request(method, url, params=params, **kwargs) + + +def make_result(data, next_page_url): + result = TestSearchResult._construct_from( + values={ + "object": "v2.search_result", + "data": data, + "next_page_url": next_page_url, + "previous_page_url": None, + "total_count": 2, + }, + last_response=None, + requestor=None, + api_mode="V2", + ) + return result + + +def test_auto_paging_replays_original_post_body(): + params = { + "query": 'status:"active"', + "sort": ["name", "-created"], + "limit": 2, + "future_field": {"enabled": True}, + } + first = make_result(["one"], "/v2/widgets/search?page=2&limit=2") + first._retrieve_params = params + TestSearchResult.requests = [] + TestSearchResult.pages = [ + make_result([], "/v2/widgets/search?page=3&limit=2"), + make_result(["two"], None), + ] + + assert list(first.auto_paging_iter()) == ["one", "two"] + assert [ + (method, url, body) + for method, url, body, _ in TestSearchResult.requests + ] == [ + ( + "post", + "/v2/widgets/search?page=2&limit=2", + { + "query": 'status:"active"', + "sort": ["name", "-created"], + "future_field": {"enabled": True}, + }, + ), + ( + "post", + "/v2/widgets/search?page=3&limit=2", + { + "query": 'status:"active"', + "sort": ["name", "-created"], + "future_field": {"enabled": True}, + }, + ), + ] + + +@pytest.mark.anyio +async def test_async_auto_paging_replays_original_post_body(): + first = make_result(["one"], "/v2/widgets/search?page=2") + first._retrieve_params = {"query": "widgets"} + TestSearchResult.requests = [] + TestSearchResult.pages = [make_result(["two"], None)] + + results = [item async for item in first.auto_paging_iter()] + assert results == ["one", "two"] + assert TestSearchResult.requests[0][:3] == ( + "post", + "/v2/widgets/search?page=2", + {"query": "widgets"}, + ) diff --git a/tests/test_webhook.py b/tests/test_webhook.py index 08c9e20b7..2a884ef0a 100644 --- a/tests/test_webhook.py +++ b/tests/test_webhook.py @@ -23,6 +23,16 @@ DUMMY_WEBHOOK_SECRET = "whsec_test_secret" +ASCII_WHITESPACE_WEBHOOK_SECRETS = [ + pytest.param(" ", id="space"), + pytest.param("\t", id="tab"), + pytest.param("\r", id="carriage-return"), + pytest.param("\n", id="line-feed"), + pytest.param("\f", id="form-feed"), + pytest.param("\v", id="vertical-tab"), + pytest.param(" \t\r\n\f\v", id="mixed"), +] + def generate_header( payload=DUMMY_WEBHOOK_PAYLOAD, secret=DUMMY_WEBHOOK_SECRET, timestamp=None @@ -101,12 +111,24 @@ def test_construct_event_from_bytes(self): @pytest.mark.parametrize("secret", [None, ""]) def test_raise_on_missing_secret(self, secret): + header = generate_header() with pytest.raises( SignatureVerificationError, match="No webhook secret value was provided", ): stripe.Webhook.construct_event( - DUMMY_WEBHOOK_PAYLOAD, generate_header(), secret + DUMMY_WEBHOOK_PAYLOAD, header, secret + ) + + @pytest.mark.parametrize("secret", ASCII_WHITESPACE_WEBHOOK_SECRETS) + def test_raise_on_ascii_whitespace_secret(self, secret): + header = generate_header(secret=secret) + with pytest.raises( + SignatureVerificationError, + match="No webhook secret value was provided", + ): + stripe.Webhook.construct_event( + DUMMY_WEBHOOK_PAYLOAD, header, secret ) def test_raise_on_v2_payload(self): @@ -131,12 +153,24 @@ def test_raise_on_missing_header(self, header): @pytest.mark.parametrize("secret", [None, ""]) def test_raise_on_missing_secret(self, secret): + header = generate_header() + with pytest.raises( + SignatureVerificationError, + match="No webhook secret value was provided", + ): + stripe.WebhookSignature.verify_header( + DUMMY_WEBHOOK_PAYLOAD, header, secret + ) + + @pytest.mark.parametrize("secret", ASCII_WHITESPACE_WEBHOOK_SECRETS) + def test_raise_on_ascii_whitespace_secret(self, secret): + header = generate_header(secret=secret) with pytest.raises( SignatureVerificationError, match="No webhook secret value was provided", ): stripe.WebhookSignature.verify_header( - DUMMY_WEBHOOK_PAYLOAD, generate_header(), secret + DUMMY_WEBHOOK_PAYLOAD, header, secret ) @pytest.mark.parametrize( @@ -199,6 +233,17 @@ def test_valid_header_and_signature(self): DUMMY_WEBHOOK_PAYLOAD, header, DUMMY_WEBHOOK_SECRET, tolerance=10 ) + @pytest.mark.parametrize( + "secret", + [" \twhsec_test_secret\r\n", "\u00a0"], + ids=["surrounding-whitespace", "non-ascii-whitespace"], + ) + def test_preserves_nonblank_secret(self, secret): + header = generate_header(secret=secret) + assert stripe.WebhookSignature.verify_header( + DUMMY_WEBHOOK_PAYLOAD, header, secret + ) + def test_header_contains_valid_signature(self): header = generate_header() + ",v1=bad_signature" assert stripe.WebhookSignature.verify_header( @@ -276,12 +321,26 @@ def test_raise_on_v2_payload(self, stripe_mock_stripe_client): @pytest.mark.parametrize("secret", [None, ""]) def test_raise_on_missing_secret(self, stripe_mock_stripe_client, secret): + header = generate_header() + with pytest.raises( + SignatureVerificationError, + match="No webhook secret value was provided", + ): + stripe_mock_stripe_client.construct_event( + DUMMY_WEBHOOK_PAYLOAD, header, secret + ) + + @pytest.mark.parametrize("secret", ASCII_WHITESPACE_WEBHOOK_SECRETS) + def test_raise_on_ascii_whitespace_secret( + self, stripe_mock_stripe_client, secret + ): + header = generate_header(secret=secret) with pytest.raises( SignatureVerificationError, match="No webhook secret value was provided", ): stripe_mock_stripe_client.construct_event( - DUMMY_WEBHOOK_PAYLOAD, generate_header(), secret + DUMMY_WEBHOOK_PAYLOAD, header, secret ) def test_construct_event_inherits_requestor(self, http_client_mock):