diff --git a/CHANGELOG.md b/CHANGELOG.md index 48051ff32..94a22f73a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,56 @@ # Changelog +## 15.4.0 - 2026-07-29 +This release changes the pinned API version to 2026-07-29.dahlia. + +* [#1857](https://github.com/stripe/stripe-python/pull/1857) Update generated code + * Add support for new resource `financial_connections.Authorization` + * Add support for `unreject` method on resource `Account` + * Add support for `list` method on resource `PaymentRecord` + * Add support for new values `mass_transit_parking_tax` and `parking_tax` on enums `Tax.Calculation.ShippingCost.TaxBreakdown.TaxRateDetail.tax_type`, `Tax.Calculation.TaxBreakdown.TaxRateDetail.tax_type`, `Tax.CalculationLineItem.TaxBreakdown.TaxRateDetail.tax_type`, and `Tax.Transaction.ShippingCost.TaxBreakdown.TaxRateDetail.tax_type` + * Add support for new value `chaps` on enums `FundingInstructions.BankTransfer.FinancialAddress.supported_networks` and `PaymentIntent.NextAction.DisplayBankTransferInstruction.FinancialAddress.supported_networks` + * Add support for `smart_disputes_management` on `AccountSession.Component.DisputesList.Feature`, `AccountSession.Component.Payment.Feature`, `AccountSession.Component.PaymentDetail.Feature`, `AccountSession.Component.PaymentDispute.Feature`, `AccountSessionCreateParamsComponentDisputesListFeature`, `AccountSessionCreateParamsComponentPaymentDetailFeature`, `AccountSessionCreateParamsComponentPaymentDisputeFeature`, and `AccountSessionCreateParamsComponentPaymentFeature` + * Add support for `administrative_address` and `principal_place_of_business` on `Account.Company`, `AccountCreateParamsCompany`, `AccountModifyParamsCompany`, and `TokenCreateParamsAccountCompany` + * Add support for `sepa_debit_payments` on `AccountModifyParamsSetting` + * Remove support for `proof_of_registration` on `AccountCreateParamsDocument`. This field was limited-use and is being deprecated. + * Add support for `payouts_action` on `AccountRejectParams` + * Add support for new value `data_share_only` on enums `Charge.PaymentMethodDetail.Card.ThreeDSecure.result`, `PaymentAttemptRecord.PaymentMethodDetail.Card.ThreeDSecure.result`, `PaymentRecord.PaymentMethodDetail.Card.ThreeDSecure.result`, and `SetupAttempt.PaymentMethodDetail.Card.ThreeDSecure.result` + * Add support for new values `bnp_paribas`, `citibank`, and `mbsb_bank` on enums `Charge.PaymentMethodDetail.Fpx.bank`, `ConfirmationToken.PaymentMethodPreview.Fpx.bank`, `PaymentAttemptRecord.PaymentMethodDetail.Fpx.bank`, `PaymentMethod.Fpx.bank`, and `PaymentRecord.PaymentMethodDetail.Fpx.bank` + * Remove support for `dynamic_tax_rates` on `checkout.SessionCreateParamsLineItem`. This field was limited-use and is being deprecated. + * Add support for `setup_future_usage` on `Checkout.Session.PaymentMethodOption.Payco`, `Checkout.Session.PaymentMethodOption.SamsungPay`, `PaymentIntent.PaymentMethodOption.Payco`, `PaymentIntent.PaymentMethodOption.SamsungPay`, `PaymentIntentConfirmParamsPaymentMethodOptionPayco`, `PaymentIntentConfirmParamsPaymentMethodOptionSamsungPay`, `PaymentIntentCreateParamsPaymentMethodOptionPayco`, `PaymentIntentCreateParamsPaymentMethodOptionSamsungPay`, `PaymentIntentModifyParamsPaymentMethodOptionPayco`, `PaymentIntentModifyParamsPaymentMethodOptionSamsungPay`, `PaymentLinkModifyParamsPaymentIntentDatum`, `checkout.SessionCreateParamsPaymentMethodOptionPayco`, and `checkout.SessionCreateParamsPaymentMethodOptionSamsungPay` + * Add support for new value `ic_nif` on enums `Checkout.Session.CustomerDetail.TaxId.type`, `Invoice.CustomerTaxId.type`, `Tax.Calculation.CustomerDetail.TaxId.type`, `Tax.Transaction.CustomerDetail.TaxId.type`, and `TaxId.type` + * Add support for new values `bnp_paribas`, `citibank`, and `mbsb_bank` on enums `ConfirmationTokenCreateParamsPaymentMethodDatumFpx.bank`, `PaymentIntentConfirmParamsPaymentMethodDatumFpx.bank`, `PaymentIntentCreateParamsPaymentMethodDatumFpx.bank`, `PaymentIntentModifyParamsPaymentMethodDatumFpx.bank`, `PaymentMethodCreateParamsFpx.bank`, `SetupIntentConfirmParamsPaymentMethodDatumFpx.bank`, `SetupIntentCreateParamsPaymentMethodDatumFpx.bank`, and `SetupIntentModifyParamsPaymentMethodDatumFpx.bank` + * Add support for new value `ic_nif` on enums `CustomerCreateParamsTaxIdDatum.type`, `CustomerCreateTaxIdParams.type`, `InvoiceCreatePreviewParamsCustomerDetailTaxId.type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParamsCustomerDetailTaxId.type` + * Add support for `network` on `Dispute.PaymentMethodDetail.Card` + * Add support for new values `financial_connections.account.expected_deactivation_date_updated`, `financial_connections.account.supported_payment_method_types_updated`, `financial_connections.account.upcoming_deactivation`, `financial_connections.authorization.expected_deactivation_date_updated`, and `financial_connections.authorization.upcoming_deactivation` on enum `Event.type` + * Add support for `limits` and `manual_entry` on `FinancialConnections.Session` and `financial_connections.SessionCreateParams` + * Add support for `require_payment_method_support` on `FinancialConnections.Session.Filter` and `financial_connections.SessionCreateParamsFilter` + * Add support for `bank_account_token` on `FinancialConnections.Session` + * Add support for new values `alipay` and `mb_way` on enums `Invoice.PaymentSetting.payment_method_types`, `InvoiceCreateParamsPaymentSetting.payment_method_types`, `InvoiceModifyParamsPaymentSetting.payment_method_types`, `Subscription.PaymentSetting.payment_method_types`, `SubscriptionCreateParamsPaymentSetting.payment_method_types`, and `SubscriptionModifyParamsPaymentSetting.payment_method_types` + * Add support for new values `mass_transit_parking_tax` and `parking_tax` on enums `InvoiceAddLinesParamsLineTaxAmountTaxRateDatum.tax_type`, `InvoiceLineItemModifyParamsTaxAmountTaxRateDatum.tax_type`, `InvoiceUpdateLinesParamsLineTaxAmountTaxRateDatum.tax_type`, `TaxRate.tax_type`, `TaxRateCreateParams.tax_type`, and `TaxRateModifyParams.tax_type` + * Add support for `metadata` on `InvoiceCreatePreviewParamsSubscriptionDetail` + * Add support for new value `stripe_internal_error` on enum `Issuing.Authorization.RequestHistory.reason` + * Add support for `business_name` on `Issuing.Card.Shipping`, `issuing.CardCreateParamsShipping`, and `issuing.CardModifyParamsShipping` + * Add support for new value `correos` on enum `Issuing.Card.Shipping.carrier` + * Add support for `allowed_payment_method_types` on `PaymentIntentConfirmParams`, `PaymentIntentCreateParams`, `PaymentIntentModifyParams`, `PaymentIntent`, `SetupIntentConfirmParams`, `SetupIntentCreateParams`, `SetupIntentModifyParams`, and `SetupIntent` + * Add support for `referrer` on `PaymentIntentConfirmParamsRadarOption` and `PaymentIntentCreateParamsRadarOption` + * Add support for `consent_collection` and `shipping_options` on `PaymentLinkModifyParams` + * Add support for `custom_fields`, `description`, and `footer` on `Quote.InvoiceSetting`, `QuoteCreateParamsInvoiceSetting`, `QuoteModifyParamsInvoiceSetting`, `SubscriptionSchedule.DefaultSetting.InvoiceSetting`, `SubscriptionSchedule.Phase.InvoiceSetting`, `SubscriptionScheduleCreateParamsDefaultSettingInvoiceSetting`, `SubscriptionScheduleCreateParamsPhaseInvoiceSetting`, `SubscriptionScheduleModifyParamsDefaultSettingInvoiceSetting`, and `SubscriptionScheduleModifyParamsPhaseInvoiceSetting` + * Add support for `customer_account` and `customer` on `Refund` + * Add support for `payment_method` on `Refund` and `Topup` + * Add support for `trial` on `SubscriptionSchedule.Phase` + * Add support for `mass_transit_parking_tax` and `parking_tax` on `Tax.Registration.CountryOption.Me` and `tax.RegistrationCreateParamsCountryOptionMe` + * Add support for new values `mass_transit_parking_tax` and `parking_tax` on enum `tax.RegistrationCreateParamsCountryOptionMe.type` + * Add support for new values `mass_transit_parking_tax` and `parking_tax` on enum `Tax.Registration.CountryOption.Me.type` + * Add support for `initiated_by` and `payment_method_options` on `Topup` + * Add support for new values `financial_connections.account.expected_deactivation_date_updated`, `financial_connections.account.supported_payment_method_types_updated`, `financial_connections.account.upcoming_deactivation`, `financial_connections.authorization.expected_deactivation_date_updated`, and `financial_connections.authorization.upcoming_deactivation` on enums `WebhookEndpointCreateParams.enabled_events` and `WebhookEndpointModifyParams.enabled_events` + * Add support for new value `2026-07-29.dahlia` on enum `WebhookEndpointCreateParams.api_version` + * Add support for `additional_addresses` on `V2.Core.Account.Identity.BusinessDetail`, `v2.core.AccountCreateParamsIdentityBusinessDetail`, `v2.core.AccountModifyParamsIdentityBusinessDetail`, and `v2.core.AccountTokenCreateParamsIdentityBusinessDetail` + * Add support for snapshot events `financial_connections.account.expected_deactivation_date_updated`, `financial_connections.account.supported_payment_method_types_updated`, and `financial_connections.account.upcoming_deactivation` with resource `financial_connections.Account` + * Add support for snapshot events `financial_connections.authorization.expected_deactivation_date_updated` and `financial_connections.authorization.upcoming_deactivation` with resource `financial_connections.Authorization` +* [#1853](https://github.com/stripe/stripe-python/pull/1853) Fix intermittent Windows test flake in async httpx integration tests +* [#1849](https://github.com/stripe/stripe-python/pull/1849) Use ip address directly instead of localhost to speed up windows tests + ## 15.4.0a5 - 2026-07-22 * [#1852](https://github.com/stripe/stripe-python/pull/1852) Update generated code for private-preview * Add support for new resources `billing.AlertNotification` and `crypto.DepositAddress` diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 006d83779..fb2246f92 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -2ceb45f50a72455c534a54d634b015602dc55f2d \ No newline at end of file +6fc967cafa78afc6c6adb86802a26217fa770522 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 115c3a680..5928ed650 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2345 \ No newline at end of file +v2350 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index 94db2936d..bb238583d 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -73,6 +73,7 @@ from stripe.params._account_retrieve_signal_params import ( AccountRetrieveSignalParams, ) + from stripe.params._account_unreject_params import AccountUnrejectParams @nested_resource_class_methods("capability") @@ -1337,7 +1338,7 @@ class Error(StripeObject): """ currently_due: Optional[List[str]] """ - Fields that need to be resolved to keep the account enabled. If not resolved by `current_deadline`, these fields will appear in `past_due` as well, and the account is disabled. + Fields that need to be resolved to keep the account enabled. If not resolved by `current_deadline`, these fields will appear in `past_due` as well, and the account will be disabled. """ disabled_reason: Optional[ Literal[ @@ -2289,6 +2290,146 @@ async def reject_async( # pyright: ignore[reportGeneralTypeIssues] ), ) + @classmethod + def _cls_unreject( + cls, account: str, **params: Unpack["AccountUnrejectParams"] + ) -> "Account": + """ + With Connect, you can unreject accounts that you have previously rejected. + + Only accounts that were rejected by your platform can be unrejected. This API cannot be used to unreject accounts that were rejected by Stripe. + + Unreject will only enable charges and/or payouts if there are no other restrictions other than those placed by a previous rejection. If you have separately paused charges and/or payouts outside of rejection, those pauses will remain in place after unrejection. + """ + return cast( + "Account", + cls._static_request( + "post", + "/v1/accounts/{account}/unreject".format( + account=sanitize_id(account) + ), + params=params, + ), + ) + + @overload + @staticmethod + def unreject( + account: str, **params: Unpack["AccountUnrejectParams"] + ) -> "Account": + """ + With Connect, you can unreject accounts that you have previously rejected. + + Only accounts that were rejected by your platform can be unrejected. This API cannot be used to unreject accounts that were rejected by Stripe. + + Unreject will only enable charges and/or payouts if there are no other restrictions other than those placed by a previous rejection. If you have separately paused charges and/or payouts outside of rejection, those pauses will remain in place after unrejection. + """ + ... + + @overload + def unreject(self, **params: Unpack["AccountUnrejectParams"]) -> "Account": + """ + With Connect, you can unreject accounts that you have previously rejected. + + Only accounts that were rejected by your platform can be unrejected. This API cannot be used to unreject accounts that were rejected by Stripe. + + Unreject will only enable charges and/or payouts if there are no other restrictions other than those placed by a previous rejection. If you have separately paused charges and/or payouts outside of rejection, those pauses will remain in place after unrejection. + """ + ... + + @class_method_variant("_cls_unreject") + def unreject( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["AccountUnrejectParams"] + ) -> "Account": + """ + With Connect, you can unreject accounts that you have previously rejected. + + Only accounts that were rejected by your platform can be unrejected. This API cannot be used to unreject accounts that were rejected by Stripe. + + Unreject will only enable charges and/or payouts if there are no other restrictions other than those placed by a previous rejection. If you have separately paused charges and/or payouts outside of rejection, those pauses will remain in place after unrejection. + """ + return cast( + "Account", + self._request( + "post", + "/v1/accounts/{account}/unreject".format( + account=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_unreject_async( + cls, account: str, **params: Unpack["AccountUnrejectParams"] + ) -> "Account": + """ + With Connect, you can unreject accounts that you have previously rejected. + + Only accounts that were rejected by your platform can be unrejected. This API cannot be used to unreject accounts that were rejected by Stripe. + + Unreject will only enable charges and/or payouts if there are no other restrictions other than those placed by a previous rejection. If you have separately paused charges and/or payouts outside of rejection, those pauses will remain in place after unrejection. + """ + return cast( + "Account", + await cls._static_request_async( + "post", + "/v1/accounts/{account}/unreject".format( + account=sanitize_id(account) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def unreject_async( + account: str, **params: Unpack["AccountUnrejectParams"] + ) -> "Account": + """ + With Connect, you can unreject accounts that you have previously rejected. + + Only accounts that were rejected by your platform can be unrejected. This API cannot be used to unreject accounts that were rejected by Stripe. + + Unreject will only enable charges and/or payouts if there are no other restrictions other than those placed by a previous rejection. If you have separately paused charges and/or payouts outside of rejection, those pauses will remain in place after unrejection. + """ + ... + + @overload + async def unreject_async( + self, **params: Unpack["AccountUnrejectParams"] + ) -> "Account": + """ + With Connect, you can unreject accounts that you have previously rejected. + + Only accounts that were rejected by your platform can be unrejected. This API cannot be used to unreject accounts that were rejected by Stripe. + + Unreject will only enable charges and/or payouts if there are no other restrictions other than those placed by a previous rejection. If you have separately paused charges and/or payouts outside of rejection, those pauses will remain in place after unrejection. + """ + ... + + @class_method_variant("_cls_unreject_async") + async def unreject_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["AccountUnrejectParams"] + ) -> "Account": + """ + With Connect, you can unreject accounts that you have previously rejected. + + Only accounts that were rejected by your platform can be unrejected. This API cannot be used to unreject accounts that were rejected by Stripe. + + Unreject will only enable charges and/or payouts if there are no other restrictions other than those placed by a previous rejection. If you have separately paused charges and/or payouts outside of rejection, those pauses will remain in place after unrejection. + """ + return cast( + "Account", + await self._request_async( + "post", + "/v1/accounts/{account}/unreject".format( + account=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + @classmethod def retrieve(cls, id=None, **params) -> "Account": instance = cls(id, **params) diff --git a/stripe/_account_service.py b/stripe/_account_service.py index 0dcbeef3a..8e14fdfa1 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -28,6 +28,7 @@ AccountRetrieveCurrentParams, ) from stripe.params._account_retrieve_params import AccountRetrieveParams + from stripe.params._account_unreject_params import AccountUnrejectParams from stripe.params._account_update_params import AccountUpdateParams _subservices = { @@ -402,6 +403,58 @@ async def reject_async( ), ) + def unreject( + self, + account: str, + params: Optional["AccountUnrejectParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Account": + """ + With Connect, you can unreject accounts that you have previously rejected. + + Only accounts that were rejected by your platform can be unrejected. This API cannot be used to unreject accounts that were rejected by Stripe. + + Unreject will only enable charges and/or payouts if there are no other restrictions other than those placed by a previous rejection. If you have separately paused charges and/or payouts outside of rejection, those pauses will remain in place after unrejection. + """ + return cast( + "Account", + self._request( + "post", + "/v1/accounts/{account}/unreject".format( + account=sanitize_id(account), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def unreject_async( + self, + account: str, + params: Optional["AccountUnrejectParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Account": + """ + With Connect, you can unreject accounts that you have previously rejected. + + Only accounts that were rejected by your platform can be unrejected. This API cannot be used to unreject accounts that were rejected by Stripe. + + Unreject will only enable charges and/or payouts if there are no other restrictions other than those placed by a previous rejection. If you have separately paused charges and/or payouts outside of rejection, those pauses will remain in place after unrejection. + """ + return cast( + "Account", + await self._request_async( + "post", + "/v1/accounts/{account}/unreject".format( + account=sanitize_id(account), + ), + base_address="api", + params=params, + options=options, + ), + ) + def serialize_batch_delete( self, account: str, diff --git a/stripe/_api_version.py b/stripe/_api_version.py index c5e4a1ca2..5bc23ba39 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2026-07-08.preview" + CURRENT = "2026-07-29.preview" diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index bbdccd867..8423171af 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -1016,7 +1016,7 @@ class Fpx(StripeObject): """ class GiftCard(StripeObject): - brand: Literal["fiserv_valuelink", "givex", "svs"] + brand: Literal["svs"] """ The brand of the gift card. """ diff --git a/stripe/_event_notification_handler.py b/stripe/_event_notification_handler.py index 81a2542ae..0dbfb73e7 100644 --- a/stripe/_event_notification_handler.py +++ b/stripe/_event_notification_handler.py @@ -1143,12 +1143,33 @@ from stripe.events._v2_money_management_received_debit_canceled_event import ( V2MoneyManagementReceivedDebitCanceledEventNotification, ) + from stripe.events._v2_money_management_received_debit_created_event import ( + V2MoneyManagementReceivedDebitCreatedEventNotification, + ) from stripe.events._v2_money_management_received_debit_failed_event import ( V2MoneyManagementReceivedDebitFailedEventNotification, ) + from stripe.events._v2_money_management_received_debit_mandate_canceled_event import ( + V2MoneyManagementReceivedDebitMandateCanceledEventNotification, + ) + from stripe.events._v2_money_management_received_debit_mandate_created_event import ( + V2MoneyManagementReceivedDebitMandateCreatedEventNotification, + ) + from stripe.events._v2_money_management_received_debit_mandate_expired_event import ( + V2MoneyManagementReceivedDebitMandateExpiredEventNotification, + ) + from stripe.events._v2_money_management_received_debit_mandate_pending_cancellation_event import ( + V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification, + ) + from stripe.events._v2_money_management_received_debit_mandate_updated_event import ( + V2MoneyManagementReceivedDebitMandateUpdatedEventNotification, + ) from stripe.events._v2_money_management_received_debit_pending_event import ( V2MoneyManagementReceivedDebitPendingEventNotification, ) + from stripe.events._v2_money_management_received_debit_scheduled_event import ( + V2MoneyManagementReceivedDebitScheduledEventNotification, + ) from stripe.events._v2_money_management_received_debit_succeeded_event import ( V2MoneyManagementReceivedDebitSucceededEventNotification, ) @@ -1257,12 +1278,21 @@ from stripe.events._v2_reporting_report_run_updated_event import ( V2ReportingReportRunUpdatedEventNotification, ) + from stripe.events._v2_signals_account_evaluation_complete_event import ( + V2SignalsAccountEvaluationCompleteEventNotification, + ) from stripe.events._v2_signals_account_signal_fraudulent_merchant_ready_event import ( V2SignalsAccountSignalFraudulentMerchantReadyEventNotification, ) + from stripe.events._v2_signals_account_signal_fraudulent_website_ready_event import ( + V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification, + ) from stripe.events._v2_signals_account_signal_merchant_delinquency_ready_event import ( V2SignalsAccountSignalMerchantDelinquencyReadyEventNotification, ) + from stripe.events._v2_signals_account_signal_payment_delinquency_exposure_ready_event import ( + V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification, + ) # event-notification-types: The end of the section generated from our OpenAPI spec # internal type to represent any EventNotification subclass @@ -6260,6 +6290,19 @@ def on_v2_money_management_received_debit_canceled( ) return func + def on_v2_money_management_received_debit_created( + self, + func: "Callable[[V2MoneyManagementReceivedDebitCreatedEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2MoneyManagementReceivedDebitCreatedEvent` (`v2.money_management.received_debit.created`) event notification. + """ + self._register( + "v2.money_management.received_debit.created", + func, + ) + return func + def on_v2_money_management_received_debit_failed( self, func: "Callable[[V2MoneyManagementReceivedDebitFailedEventNotification, StripeClient], None]", @@ -6273,6 +6316,71 @@ def on_v2_money_management_received_debit_failed( ) return func + def on_v2_money_management_received_debit_mandate_canceled( + self, + func: "Callable[[V2MoneyManagementReceivedDebitMandateCanceledEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2MoneyManagementReceivedDebitMandateCanceledEvent` (`v2.money_management.received_debit_mandate.canceled`) event notification. + """ + self._register( + "v2.money_management.received_debit_mandate.canceled", + func, + ) + return func + + def on_v2_money_management_received_debit_mandate_created( + self, + func: "Callable[[V2MoneyManagementReceivedDebitMandateCreatedEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2MoneyManagementReceivedDebitMandateCreatedEvent` (`v2.money_management.received_debit_mandate.created`) event notification. + """ + self._register( + "v2.money_management.received_debit_mandate.created", + func, + ) + return func + + def on_v2_money_management_received_debit_mandate_expired( + self, + func: "Callable[[V2MoneyManagementReceivedDebitMandateExpiredEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2MoneyManagementReceivedDebitMandateExpiredEvent` (`v2.money_management.received_debit_mandate.expired`) event notification. + """ + self._register( + "v2.money_management.received_debit_mandate.expired", + func, + ) + return func + + def on_v2_money_management_received_debit_mandate_pending_cancellation( + self, + func: "Callable[[V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2MoneyManagementReceivedDebitMandatePendingCancellationEvent` (`v2.money_management.received_debit_mandate.pending_cancellation`) event notification. + """ + self._register( + "v2.money_management.received_debit_mandate.pending_cancellation", + func, + ) + return func + + def on_v2_money_management_received_debit_mandate_updated( + self, + func: "Callable[[V2MoneyManagementReceivedDebitMandateUpdatedEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2MoneyManagementReceivedDebitMandateUpdatedEvent` (`v2.money_management.received_debit_mandate.updated`) event notification. + """ + self._register( + "v2.money_management.received_debit_mandate.updated", + func, + ) + return func + def on_v2_money_management_received_debit_pending( self, func: "Callable[[V2MoneyManagementReceivedDebitPendingEventNotification, StripeClient], None]", @@ -6286,6 +6394,19 @@ def on_v2_money_management_received_debit_pending( ) return func + def on_v2_money_management_received_debit_scheduled( + self, + func: "Callable[[V2MoneyManagementReceivedDebitScheduledEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2MoneyManagementReceivedDebitScheduledEvent` (`v2.money_management.received_debit.scheduled`) event notification. + """ + self._register( + "v2.money_management.received_debit.scheduled", + func, + ) + return func + def on_v2_money_management_received_debit_succeeded( self, func: "Callable[[V2MoneyManagementReceivedDebitSucceededEventNotification, StripeClient], None]", @@ -6754,6 +6875,19 @@ def on_v2_reporting_report_run_updated( ) return func + def on_v2_signals_account_evaluation_complete( + self, + func: "Callable[[V2SignalsAccountEvaluationCompleteEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2SignalsAccountEvaluationCompleteEvent` (`v2.signals.account_evaluation.complete`) event notification. + """ + self._register( + "v2.signals.account_evaluation.complete", + func, + ) + return func + def on_v2_signals_account_signal_fraudulent_merchant_ready( self, func: "Callable[[V2SignalsAccountSignalFraudulentMerchantReadyEventNotification, StripeClient], None]", @@ -6767,6 +6901,19 @@ def on_v2_signals_account_signal_fraudulent_merchant_ready( ) return func + def on_v2_signals_account_signal_fraudulent_website_ready( + self, + func: "Callable[[V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2SignalsAccountSignalFraudulentWebsiteReadyEvent` (`v2.signals.account_signal.fraudulent_website_ready`) event notification. + """ + self._register( + "v2.signals.account_signal.fraudulent_website_ready", + func, + ) + return func + def on_v2_signals_account_signal_merchant_delinquency_ready( self, func: "Callable[[V2SignalsAccountSignalMerchantDelinquencyReadyEventNotification, StripeClient], None]", @@ -6780,4 +6927,17 @@ def on_v2_signals_account_signal_merchant_delinquency_ready( ) return func + def on_v2_signals_account_signal_payment_delinquency_exposure_ready( + self, + func: "Callable[[V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent` (`v2.signals.account_signal.payment_delinquency_exposure_ready`) event notification. + """ + self._register( + "v2.signals.account_signal.payment_delinquency_exposure_ready", + func, + ) + return func + # event-notification-registration-methods: The end of the section generated from our OpenAPI spec diff --git a/stripe/_fx_quote.py b/stripe/_fx_quote.py index 4c77bc310..a17b86c74 100644 --- a/stripe/_fx_quote.py +++ b/stripe/_fx_quote.py @@ -19,7 +19,7 @@ class FxQuote( """ The FX Quotes API provides three functions: - View Stripe's current exchange rate for any given currency pair. - - Extend quoted rates for a 1-hour period or a 24-hour period, minimizing uncertainty from FX fluctuations. + - Extend quoted rates for up to a 24-hour period, minimizing uncertainty from FX fluctuations. - Preview the FX fees Stripe will charge on your FX transaction, allowing you to anticipate specific settlement amounts before payment costs. [View the docs](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) @@ -106,7 +106,7 @@ class Transfer(StripeObject): """ lock_duration: Union[Literal["day", "five_minutes", "hour", "none"], str] """ - The duration the exchange rate quote remains valid from creation time. Allowed values are none, hour, and day. Note that for the test mode API available in alpha, you can request an extended quote, but it won't be usable for any transactions. + The duration that the quote is locked for, from creation time. The quote will be usable for the duration specified. """ lock_expires_at: Optional[int] """ @@ -169,7 +169,7 @@ def list( cls, **params: Unpack["FxQuoteListParams"] ) -> ListObject["FxQuote"]: """ - Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first. + Returns a list of active FX quotes. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first. """ result = cls._static_request( "get", @@ -189,7 +189,7 @@ async def list_async( cls, **params: Unpack["FxQuoteListParams"] ) -> ListObject["FxQuote"]: """ - Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first. + Returns a list of active FX quotes. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first. """ result = await cls._static_request_async( "get", diff --git a/stripe/_fx_quote_service.py b/stripe/_fx_quote_service.py index 17bca730b..ed33a3cf5 100644 --- a/stripe/_fx_quote_service.py +++ b/stripe/_fx_quote_service.py @@ -21,7 +21,7 @@ def list( options: Optional["RequestOptions"] = None, ) -> "ListObject[FxQuote]": """ - Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first. + Returns a list of active FX quotes. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first. """ return cast( "ListObject[FxQuote]", @@ -40,7 +40,7 @@ async def list_async( options: Optional["RequestOptions"] = None, ) -> "ListObject[FxQuote]": """ - Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first. + Returns a list of active FX quotes. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first. """ return cast( "ListObject[FxQuote]", diff --git a/stripe/_gift_card.py b/stripe/_gift_card.py index bdefec64b..29798326b 100644 --- a/stripe/_gift_card.py +++ b/stripe/_gift_card.py @@ -27,7 +27,7 @@ class GiftCard(CreateableAPIResource["GiftCard"]): """ OBJECT_NAME: ClassVar[Literal["gift_card"]] = "gift_card" - brand: Literal["fiserv_valuelink", "givex", "svs"] + brand: Literal["svs"] """ The brand of the gift card. """ diff --git a/stripe/_gift_card_operation.py b/stripe/_gift_card_operation.py index 13cde02b5..d468605ca 100644 --- a/stripe/_gift_card_operation.py +++ b/stripe/_gift_card_operation.py @@ -225,6 +225,7 @@ class Balance(StripeObject): "stolen_card", "suspected_fraud", "timeout", + "try_again_later", ], str, ] diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index 2921a7f09..f257e368e 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -729,6 +729,10 @@ "stripe.v2.money_management._received_debit", "ReceivedDebit", ), + "v2.money_management.received_debit_mandate": ( + "stripe.v2.money_management._received_debit_mandate", + "ReceivedDebitMandate", + ), "v2.money_management.recipient_verification": ( "stripe.v2.money_management._recipient_verification", "RecipientVerification", @@ -766,6 +770,15 @@ "stripe.v2.reporting._report_run", "ReportRun", ), + "v2.risk.inquiry": ("stripe.v2.risk._inquiry", "Inquiry"), + "v2.signals.account_activity": ( + "stripe.v2.signals._account_activity", + "AccountActivity", + ), + "v2.signals.account_evaluation": ( + "stripe.v2.signals._account_evaluation", + "AccountEvaluation", + ), "v2.signals.account_signal": ( "stripe.v2.signals._account_signal", "AccountSignal", diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 33b218c19..58b27e40a 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -995,7 +995,7 @@ class Fpx(StripeObject): """ class GiftCard(StripeObject): - brand: Literal["fiserv_valuelink", "givex", "svs"] + brand: Literal["svs"] """ The brand of the gift card. """ diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index ff8fff3cc..3b26d523f 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -2,6 +2,8 @@ # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource from stripe._expandable_field import ExpandableField +from stripe._list_object import ListObject +from stripe._listable_api_resource import ListableAPIResource from stripe._search_result_object import SearchResultObject from stripe._searchable_api_resource import SearchableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject @@ -24,6 +26,9 @@ from stripe.params._payment_record_create_params import ( PaymentRecordCreateParams, ) + from stripe.params._payment_record_list_params import ( + PaymentRecordListParams, + ) from stripe.params._payment_record_report_payment_attempt_canceled_params import ( PaymentRecordReportPaymentAttemptCanceledParams, ) @@ -55,6 +60,7 @@ class PaymentRecord( CreateableAPIResource["PaymentRecord"], + ListableAPIResource["PaymentRecord"], SearchableAPIResource["PaymentRecord"], ): """ @@ -2544,6 +2550,46 @@ async def create_async( ), ) + @classmethod + def list( + cls, **params: Unpack["PaymentRecordListParams"] + ) -> ListObject["PaymentRecord"]: + """ + List all the Payment Records for a given merchant. + """ + result = cls._static_request( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + async def list_async( + cls, **params: Unpack["PaymentRecordListParams"] + ) -> ListObject["PaymentRecord"]: + """ + List all the Payment Records for a given merchant. + """ + result = await cls._static_request_async( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + @classmethod def report_payment( cls, **params: Unpack["PaymentRecordReportPaymentParams"] diff --git a/stripe/_payment_record_service.py b/stripe/_payment_record_service.py index 5e3220f2f..7420e3433 100644 --- a/stripe/_payment_record_service.py +++ b/stripe/_payment_record_service.py @@ -6,12 +6,16 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: + from stripe._list_object import ListObject from stripe._payment_record import PaymentRecord from stripe._request_options import RequestOptions from stripe._search_result_object import SearchResultObject from stripe.params._payment_record_create_params import ( PaymentRecordCreateParams, ) + from stripe.params._payment_record_list_params import ( + PaymentRecordListParams, + ) from stripe.params._payment_record_report_payment_attempt_canceled_params import ( PaymentRecordReportPaymentAttemptCanceledParams, ) @@ -42,6 +46,44 @@ class PaymentRecordService(StripeService): + def list( + self, + params: Optional["PaymentRecordListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[PaymentRecord]": + """ + List all the Payment Records for a given merchant. + """ + return cast( + "ListObject[PaymentRecord]", + self._request( + "get", + "/v1/payment_records", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["PaymentRecordListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[PaymentRecord]": + """ + List all the Payment Records for a given merchant. + """ + return cast( + "ListObject[PaymentRecord]", + await self._request_async( + "get", + "/v1/payment_records", + base_address="api", + params=params, + options=options, + ), + ) + def retrieve( self, id: str, diff --git a/stripe/_refund.py b/stripe/_refund.py index 4b6908161..db2a57802 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -14,7 +14,9 @@ if TYPE_CHECKING: from stripe._balance_transaction import BalanceTransaction from stripe._charge import Charge + from stripe._customer import Customer from stripe._payment_intent import PaymentIntent + from stripe._payment_method import PaymentMethod from stripe._reversal import Reversal from stripe.params._refund_cancel_params import RefundCancelParams from stripe.params._refund_create_params import RefundCreateParams @@ -408,6 +410,14 @@ class PresentmentDetails(StripeObject): """ 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). """ + customer: Optional[ExpandableField["Customer"]] + """ + ID of the customer of this refund. + """ + customer_account: Optional[str] + """ + ID of the account of this refund. + """ description: Optional[str] """ An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). @@ -444,6 +454,10 @@ class PresentmentDetails(StripeObject): """ ID of the PaymentIntent that's refunded. """ + payment_method: Optional[ExpandableField["PaymentMethod"]] + """ + ID of the payment method associated with this refund. + """ pending_reason: Optional[ Union[ Literal["charge_pending", "insufficient_funds", "processing"], str diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index f571456b2..c22d79cf2 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -1021,6 +1021,114 @@ class FrMealVoucher(StripeObject): """ _inner_class_types = {"benefit": Benefit} + allowed_payment_method_types: Optional[ + List[ + Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boku_promptpay", + "boleto", + "capchase_pay", + "card", + "cashapp", + "check_scan", + "click_to_pay", + "crypto", + "customer_balance", + "demo_pay", + "duitnow", + "dummy_auth_push", + "dummy_passthrough_card", + "edenred", + "eps", + "fpx", + "gcash", + "getbalance", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "knet", + "konbini", + "kr_card", + "kr_market", + "kriya", + "link", + "mb_way", + "mobilepay", + "momo", + "mondu", + "multibanco", + "naver_pay", + "netbanking", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "nz_bank_account", + "octopus", + "oxxo", + "p24", + "paper_check", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "shop_pay", + "shopeepay", + "sofort", + "south_korea_market", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "test_pay", + "truemoney", + "twint", + "upi", + "us_bank_account", + "us_cash_voucher", + "vipps", + "wechat_pay", + "wero", + "zip", + ], + str, + ] + ] + ] + """ + The list of payment method types to allow for this SetupIntent. Stripe will only use methods in this list when determining the payment methods to offer. + """ application: Optional[ExpandableField["Application"]] """ ID of the Connect application that created the SetupIntent. diff --git a/stripe/_tax_id.py b/stripe/_tax_id.py index 57371176f..583fdb5eb 100644 --- a/stripe/_tax_id.py +++ b/stripe/_tax_id.py @@ -160,6 +160,7 @@ class Verification(StripeObject): "hk_br", "hr_oib", "hu_tin", + "ic_nif", "id_npwp", "il_vat", "in_gst", @@ -226,7 +227,7 @@ class Verification(StripeObject): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` """ value: str """ diff --git a/stripe/_tax_rate.py b/stripe/_tax_rate.py index da640e625..fa059ae69 100644 --- a/stripe/_tax_rate.py +++ b/stripe/_tax_rate.py @@ -112,21 +112,26 @@ class FlatAmount(StripeObject): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. """ tax_type: Optional[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", + Union[ + Literal[ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "mass_transit_parking_tax", + "parking_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat", + ], + str, ] ] """ diff --git a/stripe/_topup.py b/stripe/_topup.py index a10df9ac4..d601b1dae 100644 --- a/stripe/_topup.py +++ b/stripe/_topup.py @@ -4,7 +4,7 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._stripe_object import UntypedStripeObject +from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Optional, cast, overload @@ -12,6 +12,7 @@ if TYPE_CHECKING: from stripe._balance_transaction import BalanceTransaction + from stripe._payment_method import PaymentMethod from stripe._source import Source from stripe.params._topup_cancel_params import TopupCancelParams from stripe.params._topup_create_params import TopupCreateParams @@ -34,6 +35,20 @@ class Topup( """ OBJECT_NAME: ClassVar[Literal["topup"]] = "topup" + + class PaymentMethodOptions(StripeObject): + class UsBankAccount(StripeObject): + network: Literal["ach"] + """ + The US bank transfer network used for this top-up. The default is `ach`. + """ + + us_bank_account: Optional[UsBankAccount] + """ + If this top-up is to be used with a `us_bank_account` payment method, this sub-hash contains configuration for it. + """ + _inner_class_types = {"us_bank_account": UsBankAccount} + amount: int """ Amount transferred. @@ -70,6 +85,10 @@ class Topup( """ Unique identifier for the object. """ + initiated_by: Optional[Literal["stripe", "user"]] + """ + Indicates whether the top-up was initiated by Stripe or by the user. + """ livemode: bool """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. @@ -82,6 +101,14 @@ class Topup( """ String representing the object's type. Objects of the same type share the same value. """ + payment_method: Optional[ExpandableField["PaymentMethod"]] + """ + The ID of a PaymentMethod representing the payment method used for the top-up. A PaymentMethod of type `us_bank_account` can be used. + """ + payment_method_options: Optional[PaymentMethodOptions] + """ + Payment-method-specific configuration for this top-up. + """ source: Optional["Source"] """ The source field is deprecated. It might not always be present in the API response. @@ -322,3 +349,5 @@ async def retrieve_async( instance = cls(id, **params) await instance.refresh_async() return instance + + _inner_class_types = {"payment_method_options": PaymentMethodOptions} diff --git a/stripe/_v2_services.py b/stripe/_v2_services.py index f5bbc983f..31250cd2d 100644 --- a/stripe/_v2_services.py +++ b/stripe/_v2_services.py @@ -18,6 +18,7 @@ ) from stripe.v2._payments_service import PaymentsService from stripe.v2._reporting_service import ReportingService + from stripe.v2._risk_service import RiskService from stripe.v2._signals_service import SignalsService from stripe.v2._tax_service import TaxService from stripe.v2._test_helper_service import TestHelperService @@ -40,6 +41,7 @@ ], "payments": ["stripe.v2._payments_service", "PaymentsService"], "reporting": ["stripe.v2._reporting_service", "ReportingService"], + "risk": ["stripe.v2._risk_service", "RiskService"], "signals": ["stripe.v2._signals_service", "SignalsService"], "tax": ["stripe.v2._tax_service", "TaxService"], "test_helpers": ["stripe.v2._test_helper_service", "TestHelperService"], @@ -58,6 +60,7 @@ class V2Services(StripeService): orchestrated_commerce: "OrchestratedCommerceService" payments: "PaymentsService" reporting: "ReportingService" + risk: "RiskService" signals: "SignalsService" tax: "TaxService" test_helpers: "TestHelperService" diff --git a/stripe/billing/_credit_grant.py b/stripe/billing/_credit_grant.py index c4ed3a9c1..4b5e05a54 100644 --- a/stripe/billing/_credit_grant.py +++ b/stripe/billing/_credit_grant.py @@ -135,6 +135,12 @@ class Price(StripeObject): Unique identifier for the object. """ + class RateCard(StripeObject): + id: Optional[str] + """ + Unique identifier for the object. + """ + billable_items: Optional[List[BillableItem]] """ The billable items that credit grants can apply to. We currently only support metered billable items. Cannot be used in combination with `price_type` or `prices`. @@ -147,9 +153,14 @@ class Price(StripeObject): """ The prices that credit grants can apply to. We currently only support `metered` prices. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `price_type`. """ + rate_cards: Optional[List[RateCard]] + """ + The rate cards that credit grants can apply to. The credit grant applies to any metered item billed under one of these rate cards. Cannot be used in combination with `price_type`, `prices`, or `billable_items`. + """ _inner_class_types = { "billable_items": BillableItem, "prices": Price, + "rate_cards": RateCard, } scope: Scope diff --git a/stripe/crypto/_customer_consumer_wallet.py b/stripe/crypto/_customer_consumer_wallet.py index b95d3be07..239c33c8c 100644 --- a/stripe/crypto/_customer_consumer_wallet.py +++ b/stripe/crypto/_customer_consumer_wallet.py @@ -33,6 +33,7 @@ class CustomerConsumerWallet(StripeObject): "solana", "stellar", "sui", + "tempo", "worldchain", ], str, diff --git a/stripe/crypto/_deposit_address.py b/stripe/crypto/_deposit_address.py index ebe814583..0b4faaba4 100644 --- a/stripe/crypto/_deposit_address.py +++ b/stripe/crypto/_deposit_address.py @@ -25,6 +25,8 @@ class DepositAddress( ): """ A crypto deposit address is a blockchain address that can be used by a merchant for deposit mode crypto payments. + + Related guide: [Machine payments](https://docs.stripe.com/payments/machine) """ OBJECT_NAME: ClassVar[Literal["crypto.deposit_address"]] = ( @@ -42,23 +44,41 @@ class SupportedToken(StripeObject): """ address: str + """ + The on-chain address where funds can be received. + """ created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ customer: Optional[str] + """ + If set, this deposit address is scoped to a [Customer](https://docs.stripe.com/api/customers/object) and can only receive funds from that customer. Otherwise, this deposit address can receive funds from any customer. + """ id: str """ Unique identifier for the object. """ livemode: bool + """ + If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. + """ metadata: UntypedStripeObject[str] """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. """ network: Literal["base", "solana", "tempo"] + """ + The blockchain network where this address can accept funds. + """ object: Literal["crypto.deposit_address"] """ String representing the object's type. Objects of the same type share the same value. """ supported_tokens: List[SupportedToken] + """ + The tokens that can be sent to this deposit address on its network. + """ @classmethod def create( diff --git a/stripe/crypto/_onramp_session.py b/stripe/crypto/_onramp_session.py index 397614e1e..ccd78dcad 100644 --- a/stripe/crypto/_onramp_session.py +++ b/stripe/crypto/_onramp_session.py @@ -100,6 +100,10 @@ class DestinationTags(StripeObject): """ A Sui address """ + tempo: Optional[str] + """ + A Tempo address + """ worldchain: Optional[str] """ A worldchain address @@ -153,6 +157,7 @@ class DestinationTags(StripeObject): "solana", "stellar", "sui", + "tempo", "worldchain", ], str, @@ -174,6 +179,7 @@ class DestinationTags(StripeObject): "solana", "stellar", "sui", + "tempo", "worldchain", ], str, diff --git a/stripe/events/__init__.py b/stripe/events/__init__.py index ea4b0dcc8..4773310c2 100644 --- a/stripe/events/__init__.py +++ b/stripe/events/__init__.py @@ -1523,14 +1523,42 @@ V2MoneyManagementReceivedDebitCanceledEvent as V2MoneyManagementReceivedDebitCanceledEvent, V2MoneyManagementReceivedDebitCanceledEventNotification as V2MoneyManagementReceivedDebitCanceledEventNotification, ) + from stripe.events._v2_money_management_received_debit_created_event import ( + V2MoneyManagementReceivedDebitCreatedEvent as V2MoneyManagementReceivedDebitCreatedEvent, + V2MoneyManagementReceivedDebitCreatedEventNotification as V2MoneyManagementReceivedDebitCreatedEventNotification, + ) from stripe.events._v2_money_management_received_debit_failed_event import ( V2MoneyManagementReceivedDebitFailedEvent as V2MoneyManagementReceivedDebitFailedEvent, V2MoneyManagementReceivedDebitFailedEventNotification as V2MoneyManagementReceivedDebitFailedEventNotification, ) + from stripe.events._v2_money_management_received_debit_mandate_canceled_event import ( + V2MoneyManagementReceivedDebitMandateCanceledEvent as V2MoneyManagementReceivedDebitMandateCanceledEvent, + V2MoneyManagementReceivedDebitMandateCanceledEventNotification as V2MoneyManagementReceivedDebitMandateCanceledEventNotification, + ) + from stripe.events._v2_money_management_received_debit_mandate_created_event import ( + V2MoneyManagementReceivedDebitMandateCreatedEvent as V2MoneyManagementReceivedDebitMandateCreatedEvent, + V2MoneyManagementReceivedDebitMandateCreatedEventNotification as V2MoneyManagementReceivedDebitMandateCreatedEventNotification, + ) + from stripe.events._v2_money_management_received_debit_mandate_expired_event import ( + V2MoneyManagementReceivedDebitMandateExpiredEvent as V2MoneyManagementReceivedDebitMandateExpiredEvent, + V2MoneyManagementReceivedDebitMandateExpiredEventNotification as V2MoneyManagementReceivedDebitMandateExpiredEventNotification, + ) + from stripe.events._v2_money_management_received_debit_mandate_pending_cancellation_event import ( + V2MoneyManagementReceivedDebitMandatePendingCancellationEvent as V2MoneyManagementReceivedDebitMandatePendingCancellationEvent, + V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification as V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification, + ) + from stripe.events._v2_money_management_received_debit_mandate_updated_event import ( + V2MoneyManagementReceivedDebitMandateUpdatedEvent as V2MoneyManagementReceivedDebitMandateUpdatedEvent, + V2MoneyManagementReceivedDebitMandateUpdatedEventNotification as V2MoneyManagementReceivedDebitMandateUpdatedEventNotification, + ) from stripe.events._v2_money_management_received_debit_pending_event import ( V2MoneyManagementReceivedDebitPendingEvent as V2MoneyManagementReceivedDebitPendingEvent, V2MoneyManagementReceivedDebitPendingEventNotification as V2MoneyManagementReceivedDebitPendingEventNotification, ) + from stripe.events._v2_money_management_received_debit_scheduled_event import ( + V2MoneyManagementReceivedDebitScheduledEvent as V2MoneyManagementReceivedDebitScheduledEvent, + V2MoneyManagementReceivedDebitScheduledEventNotification as V2MoneyManagementReceivedDebitScheduledEventNotification, + ) from stripe.events._v2_money_management_received_debit_succeeded_event import ( V2MoneyManagementReceivedDebitSucceededEvent as V2MoneyManagementReceivedDebitSucceededEvent, V2MoneyManagementReceivedDebitSucceededEventNotification as V2MoneyManagementReceivedDebitSucceededEventNotification, @@ -1675,14 +1703,26 @@ V2ReportingReportRunUpdatedEvent as V2ReportingReportRunUpdatedEvent, V2ReportingReportRunUpdatedEventNotification as V2ReportingReportRunUpdatedEventNotification, ) + from stripe.events._v2_signals_account_evaluation_complete_event import ( + V2SignalsAccountEvaluationCompleteEvent as V2SignalsAccountEvaluationCompleteEvent, + V2SignalsAccountEvaluationCompleteEventNotification as V2SignalsAccountEvaluationCompleteEventNotification, + ) from stripe.events._v2_signals_account_signal_fraudulent_merchant_ready_event import ( V2SignalsAccountSignalFraudulentMerchantReadyEvent as V2SignalsAccountSignalFraudulentMerchantReadyEvent, V2SignalsAccountSignalFraudulentMerchantReadyEventNotification as V2SignalsAccountSignalFraudulentMerchantReadyEventNotification, ) + from stripe.events._v2_signals_account_signal_fraudulent_website_ready_event import ( + V2SignalsAccountSignalFraudulentWebsiteReadyEvent as V2SignalsAccountSignalFraudulentWebsiteReadyEvent, + V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification as V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification, + ) from stripe.events._v2_signals_account_signal_merchant_delinquency_ready_event import ( V2SignalsAccountSignalMerchantDelinquencyReadyEvent as V2SignalsAccountSignalMerchantDelinquencyReadyEvent, V2SignalsAccountSignalMerchantDelinquencyReadyEventNotification as V2SignalsAccountSignalMerchantDelinquencyReadyEventNotification, ) + from stripe.events._v2_signals_account_signal_payment_delinquency_exposure_ready_event import ( + V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent as V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent, + V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification as V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification, + ) # name -> (import_target, is_submodule) _import_map = { @@ -4592,6 +4632,14 @@ "stripe.events._v2_money_management_received_debit_canceled_event", False, ), + "V2MoneyManagementReceivedDebitCreatedEvent": ( + "stripe.events._v2_money_management_received_debit_created_event", + False, + ), + "V2MoneyManagementReceivedDebitCreatedEventNotification": ( + "stripe.events._v2_money_management_received_debit_created_event", + False, + ), "V2MoneyManagementReceivedDebitFailedEvent": ( "stripe.events._v2_money_management_received_debit_failed_event", False, @@ -4600,6 +4648,46 @@ "stripe.events._v2_money_management_received_debit_failed_event", False, ), + "V2MoneyManagementReceivedDebitMandateCanceledEvent": ( + "stripe.events._v2_money_management_received_debit_mandate_canceled_event", + False, + ), + "V2MoneyManagementReceivedDebitMandateCanceledEventNotification": ( + "stripe.events._v2_money_management_received_debit_mandate_canceled_event", + False, + ), + "V2MoneyManagementReceivedDebitMandateCreatedEvent": ( + "stripe.events._v2_money_management_received_debit_mandate_created_event", + False, + ), + "V2MoneyManagementReceivedDebitMandateCreatedEventNotification": ( + "stripe.events._v2_money_management_received_debit_mandate_created_event", + False, + ), + "V2MoneyManagementReceivedDebitMandateExpiredEvent": ( + "stripe.events._v2_money_management_received_debit_mandate_expired_event", + False, + ), + "V2MoneyManagementReceivedDebitMandateExpiredEventNotification": ( + "stripe.events._v2_money_management_received_debit_mandate_expired_event", + False, + ), + "V2MoneyManagementReceivedDebitMandatePendingCancellationEvent": ( + "stripe.events._v2_money_management_received_debit_mandate_pending_cancellation_event", + False, + ), + "V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification": ( + "stripe.events._v2_money_management_received_debit_mandate_pending_cancellation_event", + False, + ), + "V2MoneyManagementReceivedDebitMandateUpdatedEvent": ( + "stripe.events._v2_money_management_received_debit_mandate_updated_event", + False, + ), + "V2MoneyManagementReceivedDebitMandateUpdatedEventNotification": ( + "stripe.events._v2_money_management_received_debit_mandate_updated_event", + False, + ), "V2MoneyManagementReceivedDebitPendingEvent": ( "stripe.events._v2_money_management_received_debit_pending_event", False, @@ -4608,6 +4696,14 @@ "stripe.events._v2_money_management_received_debit_pending_event", False, ), + "V2MoneyManagementReceivedDebitScheduledEvent": ( + "stripe.events._v2_money_management_received_debit_scheduled_event", + False, + ), + "V2MoneyManagementReceivedDebitScheduledEventNotification": ( + "stripe.events._v2_money_management_received_debit_scheduled_event", + False, + ), "V2MoneyManagementReceivedDebitSucceededEvent": ( "stripe.events._v2_money_management_received_debit_succeeded_event", False, @@ -4896,6 +4992,14 @@ "stripe.events._v2_reporting_report_run_updated_event", False, ), + "V2SignalsAccountEvaluationCompleteEvent": ( + "stripe.events._v2_signals_account_evaluation_complete_event", + False, + ), + "V2SignalsAccountEvaluationCompleteEventNotification": ( + "stripe.events._v2_signals_account_evaluation_complete_event", + False, + ), "V2SignalsAccountSignalFraudulentMerchantReadyEvent": ( "stripe.events._v2_signals_account_signal_fraudulent_merchant_ready_event", False, @@ -4904,6 +5008,14 @@ "stripe.events._v2_signals_account_signal_fraudulent_merchant_ready_event", False, ), + "V2SignalsAccountSignalFraudulentWebsiteReadyEvent": ( + "stripe.events._v2_signals_account_signal_fraudulent_website_ready_event", + False, + ), + "V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification": ( + "stripe.events._v2_signals_account_signal_fraudulent_website_ready_event", + False, + ), "V2SignalsAccountSignalMerchantDelinquencyReadyEvent": ( "stripe.events._v2_signals_account_signal_merchant_delinquency_ready_event", False, @@ -4912,6 +5024,14 @@ "stripe.events._v2_signals_account_signal_merchant_delinquency_ready_event", False, ), + "V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent": ( + "stripe.events._v2_signals_account_signal_payment_delinquency_exposure_ready_event", + False, + ), + "V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification": ( + "stripe.events._v2_signals_account_signal_payment_delinquency_exposure_ready_event", + False, + ), } if not TYPE_CHECKING: diff --git a/stripe/events/_event_classes.py b/stripe/events/_event_classes.py index b3df984c2..eaa13a5ef 100644 --- a/stripe/events/_event_classes.py +++ b/stripe/events/_event_classes.py @@ -1138,12 +1138,33 @@ from stripe.events._v2_money_management_received_debit_canceled_event import ( V2MoneyManagementReceivedDebitCanceledEventNotification, ) + from stripe.events._v2_money_management_received_debit_created_event import ( + V2MoneyManagementReceivedDebitCreatedEventNotification, + ) from stripe.events._v2_money_management_received_debit_failed_event import ( V2MoneyManagementReceivedDebitFailedEventNotification, ) + from stripe.events._v2_money_management_received_debit_mandate_canceled_event import ( + V2MoneyManagementReceivedDebitMandateCanceledEventNotification, + ) + from stripe.events._v2_money_management_received_debit_mandate_created_event import ( + V2MoneyManagementReceivedDebitMandateCreatedEventNotification, + ) + from stripe.events._v2_money_management_received_debit_mandate_expired_event import ( + V2MoneyManagementReceivedDebitMandateExpiredEventNotification, + ) + from stripe.events._v2_money_management_received_debit_mandate_pending_cancellation_event import ( + V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification, + ) + from stripe.events._v2_money_management_received_debit_mandate_updated_event import ( + V2MoneyManagementReceivedDebitMandateUpdatedEventNotification, + ) from stripe.events._v2_money_management_received_debit_pending_event import ( V2MoneyManagementReceivedDebitPendingEventNotification, ) + from stripe.events._v2_money_management_received_debit_scheduled_event import ( + V2MoneyManagementReceivedDebitScheduledEventNotification, + ) from stripe.events._v2_money_management_received_debit_succeeded_event import ( V2MoneyManagementReceivedDebitSucceededEventNotification, ) @@ -1252,12 +1273,21 @@ from stripe.events._v2_reporting_report_run_updated_event import ( V2ReportingReportRunUpdatedEventNotification, ) + from stripe.events._v2_signals_account_evaluation_complete_event import ( + V2SignalsAccountEvaluationCompleteEventNotification, + ) from stripe.events._v2_signals_account_signal_fraudulent_merchant_ready_event import ( V2SignalsAccountSignalFraudulentMerchantReadyEventNotification, ) + from stripe.events._v2_signals_account_signal_fraudulent_website_ready_event import ( + V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification, + ) from stripe.events._v2_signals_account_signal_merchant_delinquency_ready_event import ( V2SignalsAccountSignalMerchantDelinquencyReadyEventNotification, ) + from stripe.events._v2_signals_account_signal_payment_delinquency_exposure_ready_event import ( + V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification, + ) _V2_EVENT_CLASS_LOOKUP = { @@ -2769,14 +2799,42 @@ "stripe.events._v2_money_management_received_debit_canceled_event", "V2MoneyManagementReceivedDebitCanceledEvent", ), + "v2.money_management.received_debit.created": ( + "stripe.events._v2_money_management_received_debit_created_event", + "V2MoneyManagementReceivedDebitCreatedEvent", + ), "v2.money_management.received_debit.failed": ( "stripe.events._v2_money_management_received_debit_failed_event", "V2MoneyManagementReceivedDebitFailedEvent", ), + "v2.money_management.received_debit_mandate.canceled": ( + "stripe.events._v2_money_management_received_debit_mandate_canceled_event", + "V2MoneyManagementReceivedDebitMandateCanceledEvent", + ), + "v2.money_management.received_debit_mandate.created": ( + "stripe.events._v2_money_management_received_debit_mandate_created_event", + "V2MoneyManagementReceivedDebitMandateCreatedEvent", + ), + "v2.money_management.received_debit_mandate.expired": ( + "stripe.events._v2_money_management_received_debit_mandate_expired_event", + "V2MoneyManagementReceivedDebitMandateExpiredEvent", + ), + "v2.money_management.received_debit_mandate.pending_cancellation": ( + "stripe.events._v2_money_management_received_debit_mandate_pending_cancellation_event", + "V2MoneyManagementReceivedDebitMandatePendingCancellationEvent", + ), + "v2.money_management.received_debit_mandate.updated": ( + "stripe.events._v2_money_management_received_debit_mandate_updated_event", + "V2MoneyManagementReceivedDebitMandateUpdatedEvent", + ), "v2.money_management.received_debit.pending": ( "stripe.events._v2_money_management_received_debit_pending_event", "V2MoneyManagementReceivedDebitPendingEvent", ), + "v2.money_management.received_debit.scheduled": ( + "stripe.events._v2_money_management_received_debit_scheduled_event", + "V2MoneyManagementReceivedDebitScheduledEvent", + ), "v2.money_management.received_debit.succeeded": ( "stripe.events._v2_money_management_received_debit_succeeded_event", "V2MoneyManagementReceivedDebitSucceededEvent", @@ -2921,14 +2979,26 @@ "stripe.events._v2_reporting_report_run_updated_event", "V2ReportingReportRunUpdatedEvent", ), + "v2.signals.account_evaluation.complete": ( + "stripe.events._v2_signals_account_evaluation_complete_event", + "V2SignalsAccountEvaluationCompleteEvent", + ), "v2.signals.account_signal.fraudulent_merchant_ready": ( "stripe.events._v2_signals_account_signal_fraudulent_merchant_ready_event", "V2SignalsAccountSignalFraudulentMerchantReadyEvent", ), + "v2.signals.account_signal.fraudulent_website_ready": ( + "stripe.events._v2_signals_account_signal_fraudulent_website_ready_event", + "V2SignalsAccountSignalFraudulentWebsiteReadyEvent", + ), "v2.signals.account_signal.merchant_delinquency_ready": ( "stripe.events._v2_signals_account_signal_merchant_delinquency_ready_event", "V2SignalsAccountSignalMerchantDelinquencyReadyEvent", ), + "v2.signals.account_signal.payment_delinquency_exposure_ready": ( + "stripe.events._v2_signals_account_signal_payment_delinquency_exposure_ready_event", + "V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent", + ), } @@ -4452,14 +4522,42 @@ def get_v2_event_class(type_: str): "stripe.events._v2_money_management_received_debit_canceled_event", "V2MoneyManagementReceivedDebitCanceledEventNotification", ), + "v2.money_management.received_debit.created": ( + "stripe.events._v2_money_management_received_debit_created_event", + "V2MoneyManagementReceivedDebitCreatedEventNotification", + ), "v2.money_management.received_debit.failed": ( "stripe.events._v2_money_management_received_debit_failed_event", "V2MoneyManagementReceivedDebitFailedEventNotification", ), + "v2.money_management.received_debit_mandate.canceled": ( + "stripe.events._v2_money_management_received_debit_mandate_canceled_event", + "V2MoneyManagementReceivedDebitMandateCanceledEventNotification", + ), + "v2.money_management.received_debit_mandate.created": ( + "stripe.events._v2_money_management_received_debit_mandate_created_event", + "V2MoneyManagementReceivedDebitMandateCreatedEventNotification", + ), + "v2.money_management.received_debit_mandate.expired": ( + "stripe.events._v2_money_management_received_debit_mandate_expired_event", + "V2MoneyManagementReceivedDebitMandateExpiredEventNotification", + ), + "v2.money_management.received_debit_mandate.pending_cancellation": ( + "stripe.events._v2_money_management_received_debit_mandate_pending_cancellation_event", + "V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification", + ), + "v2.money_management.received_debit_mandate.updated": ( + "stripe.events._v2_money_management_received_debit_mandate_updated_event", + "V2MoneyManagementReceivedDebitMandateUpdatedEventNotification", + ), "v2.money_management.received_debit.pending": ( "stripe.events._v2_money_management_received_debit_pending_event", "V2MoneyManagementReceivedDebitPendingEventNotification", ), + "v2.money_management.received_debit.scheduled": ( + "stripe.events._v2_money_management_received_debit_scheduled_event", + "V2MoneyManagementReceivedDebitScheduledEventNotification", + ), "v2.money_management.received_debit.succeeded": ( "stripe.events._v2_money_management_received_debit_succeeded_event", "V2MoneyManagementReceivedDebitSucceededEventNotification", @@ -4604,14 +4702,26 @@ def get_v2_event_class(type_: str): "stripe.events._v2_reporting_report_run_updated_event", "V2ReportingReportRunUpdatedEventNotification", ), + "v2.signals.account_evaluation.complete": ( + "stripe.events._v2_signals_account_evaluation_complete_event", + "V2SignalsAccountEvaluationCompleteEventNotification", + ), "v2.signals.account_signal.fraudulent_merchant_ready": ( "stripe.events._v2_signals_account_signal_fraudulent_merchant_ready_event", "V2SignalsAccountSignalFraudulentMerchantReadyEventNotification", ), + "v2.signals.account_signal.fraudulent_website_ready": ( + "stripe.events._v2_signals_account_signal_fraudulent_website_ready_event", + "V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification", + ), "v2.signals.account_signal.merchant_delinquency_ready": ( "stripe.events._v2_signals_account_signal_merchant_delinquency_ready_event", "V2SignalsAccountSignalMerchantDelinquencyReadyEventNotification", ), + "v2.signals.account_signal.payment_delinquency_exposure_ready": ( + "stripe.events._v2_signals_account_signal_payment_delinquency_exposure_ready_event", + "V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification", + ), } @@ -5004,8 +5114,15 @@ def get_v2_event_notification_class(type_: str): "V2MoneyManagementReceivedCreditReturnedEventNotification", "V2MoneyManagementReceivedCreditSucceededEventNotification", "V2MoneyManagementReceivedDebitCanceledEventNotification", + "V2MoneyManagementReceivedDebitCreatedEventNotification", "V2MoneyManagementReceivedDebitFailedEventNotification", + "V2MoneyManagementReceivedDebitMandateCanceledEventNotification", + "V2MoneyManagementReceivedDebitMandateCreatedEventNotification", + "V2MoneyManagementReceivedDebitMandateExpiredEventNotification", + "V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification", + "V2MoneyManagementReceivedDebitMandateUpdatedEventNotification", "V2MoneyManagementReceivedDebitPendingEventNotification", + "V2MoneyManagementReceivedDebitScheduledEventNotification", "V2MoneyManagementReceivedDebitSucceededEventNotification", "V2MoneyManagementReceivedDebitUpdatedEventNotification", "V2MoneyManagementRecipientVerificationCreatedEventNotification", @@ -5042,6 +5159,9 @@ def get_v2_event_notification_class(type_: str): "V2ReportingReportRunFailedEventNotification", "V2ReportingReportRunSucceededEventNotification", "V2ReportingReportRunUpdatedEventNotification", + "V2SignalsAccountEvaluationCompleteEventNotification", "V2SignalsAccountSignalFraudulentMerchantReadyEventNotification", + "V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification", "V2SignalsAccountSignalMerchantDelinquencyReadyEventNotification", + "V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification", ] diff --git a/stripe/events/_v2_money_management_received_debit_created_event.py b/stripe/events/_v2_money_management_received_debit_created_event.py new file mode 100644 index 000000000..df70b2911 --- /dev/null +++ b/stripe/events/_v2_money_management_received_debit_created_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.money_management._received_debit import ReceivedDebit + + +class V2MoneyManagementReceivedDebitCreatedEventNotification( + EventNotification +): + LOOKUP_TYPE = "v2.money_management.received_debit.created" + type: Literal["v2.money_management.received_debit.created"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementReceivedDebitCreatedEvent": + return cast( + "V2MoneyManagementReceivedDebitCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReceivedDebit": + 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( + "ReceivedDebit", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementReceivedDebitCreatedEvent": + return cast( + "V2MoneyManagementReceivedDebitCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReceivedDebit": + 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( + "ReceivedDebit", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementReceivedDebitCreatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.received_debit.created" + type: Literal["v2.money_management.received_debit.created"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ReceivedDebit": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReceivedDebit", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_received_debit_mandate_canceled_event.py b/stripe/events/_v2_money_management_received_debit_mandate_canceled_event.py new file mode 100644 index 000000000..f973c1afa --- /dev/null +++ b/stripe/events/_v2_money_management_received_debit_mandate_canceled_event.py @@ -0,0 +1,121 @@ +# -*- 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.money_management._received_debit_mandate import ( + ReceivedDebitMandate, + ) + + +class V2MoneyManagementReceivedDebitMandateCanceledEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.received_debit_mandate.canceled" + type: Literal["v2.money_management.received_debit_mandate.canceled"] + 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, + ) -> "V2MoneyManagementReceivedDebitMandateCanceledEvent": + return cast( + "V2MoneyManagementReceivedDebitMandateCanceledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReceivedDebitMandate": + 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( + "ReceivedDebitMandate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementReceivedDebitMandateCanceledEvent": + return cast( + "V2MoneyManagementReceivedDebitMandateCanceledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReceivedDebitMandate": + 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( + "ReceivedDebitMandate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementReceivedDebitMandateCanceledEvent(Event): + LOOKUP_TYPE = "v2.money_management.received_debit_mandate.canceled" + type: Literal["v2.money_management.received_debit_mandate.canceled"] + + 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) -> "ReceivedDebitMandate": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReceivedDebitMandate", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_received_debit_mandate_created_event.py b/stripe/events/_v2_money_management_received_debit_mandate_created_event.py new file mode 100644 index 000000000..5adc58ed6 --- /dev/null +++ b/stripe/events/_v2_money_management_received_debit_mandate_created_event.py @@ -0,0 +1,121 @@ +# -*- 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.money_management._received_debit_mandate import ( + ReceivedDebitMandate, + ) + + +class V2MoneyManagementReceivedDebitMandateCreatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.received_debit_mandate.created" + type: Literal["v2.money_management.received_debit_mandate.created"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2MoneyManagementReceivedDebitMandateCreatedEvent": + return cast( + "V2MoneyManagementReceivedDebitMandateCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReceivedDebitMandate": + 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( + "ReceivedDebitMandate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementReceivedDebitMandateCreatedEvent": + return cast( + "V2MoneyManagementReceivedDebitMandateCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReceivedDebitMandate": + 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( + "ReceivedDebitMandate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementReceivedDebitMandateCreatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.received_debit_mandate.created" + type: Literal["v2.money_management.received_debit_mandate.created"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ReceivedDebitMandate": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReceivedDebitMandate", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_received_debit_mandate_expired_event.py b/stripe/events/_v2_money_management_received_debit_mandate_expired_event.py new file mode 100644 index 000000000..0c63e2ec1 --- /dev/null +++ b/stripe/events/_v2_money_management_received_debit_mandate_expired_event.py @@ -0,0 +1,121 @@ +# -*- 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.money_management._received_debit_mandate import ( + ReceivedDebitMandate, + ) + + +class V2MoneyManagementReceivedDebitMandateExpiredEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.received_debit_mandate.expired" + type: Literal["v2.money_management.received_debit_mandate.expired"] + 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, + ) -> "V2MoneyManagementReceivedDebitMandateExpiredEvent": + return cast( + "V2MoneyManagementReceivedDebitMandateExpiredEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReceivedDebitMandate": + 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( + "ReceivedDebitMandate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementReceivedDebitMandateExpiredEvent": + return cast( + "V2MoneyManagementReceivedDebitMandateExpiredEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReceivedDebitMandate": + 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( + "ReceivedDebitMandate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementReceivedDebitMandateExpiredEvent(Event): + LOOKUP_TYPE = "v2.money_management.received_debit_mandate.expired" + type: Literal["v2.money_management.received_debit_mandate.expired"] + + 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) -> "ReceivedDebitMandate": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReceivedDebitMandate", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_received_debit_mandate_pending_cancellation_event.py b/stripe/events/_v2_money_management_received_debit_mandate_pending_cancellation_event.py new file mode 100644 index 000000000..55ed659ea --- /dev/null +++ b/stripe/events/_v2_money_management_received_debit_mandate_pending_cancellation_event.py @@ -0,0 +1,129 @@ +# -*- 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.money_management._received_debit_mandate import ( + ReceivedDebitMandate, + ) + + +class V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v2.money_management.received_debit_mandate.pending_cancellation" + ) + type: Literal[ + "v2.money_management.received_debit_mandate.pending_cancellation" + ] + 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, + ) -> "V2MoneyManagementReceivedDebitMandatePendingCancellationEvent": + return cast( + "V2MoneyManagementReceivedDebitMandatePendingCancellationEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReceivedDebitMandate": + 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( + "ReceivedDebitMandate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementReceivedDebitMandatePendingCancellationEvent": + return cast( + "V2MoneyManagementReceivedDebitMandatePendingCancellationEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReceivedDebitMandate": + 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( + "ReceivedDebitMandate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementReceivedDebitMandatePendingCancellationEvent(Event): + LOOKUP_TYPE = ( + "v2.money_management.received_debit_mandate.pending_cancellation" + ) + type: Literal[ + "v2.money_management.received_debit_mandate.pending_cancellation" + ] + + 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) -> "ReceivedDebitMandate": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReceivedDebitMandate", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_received_debit_mandate_updated_event.py b/stripe/events/_v2_money_management_received_debit_mandate_updated_event.py new file mode 100644 index 000000000..113e8376d --- /dev/null +++ b/stripe/events/_v2_money_management_received_debit_mandate_updated_event.py @@ -0,0 +1,121 @@ +# -*- 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.money_management._received_debit_mandate import ( + ReceivedDebitMandate, + ) + + +class V2MoneyManagementReceivedDebitMandateUpdatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.received_debit_mandate.updated" + type: Literal["v2.money_management.received_debit_mandate.updated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2MoneyManagementReceivedDebitMandateUpdatedEvent": + return cast( + "V2MoneyManagementReceivedDebitMandateUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReceivedDebitMandate": + 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( + "ReceivedDebitMandate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementReceivedDebitMandateUpdatedEvent": + return cast( + "V2MoneyManagementReceivedDebitMandateUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReceivedDebitMandate": + 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( + "ReceivedDebitMandate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementReceivedDebitMandateUpdatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.received_debit_mandate.updated" + type: Literal["v2.money_management.received_debit_mandate.updated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ReceivedDebitMandate": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReceivedDebitMandate", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_received_debit_scheduled_event.py b/stripe/events/_v2_money_management_received_debit_scheduled_event.py new file mode 100644 index 000000000..02b9e8666 --- /dev/null +++ b/stripe/events/_v2_money_management_received_debit_scheduled_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.money_management._received_debit import ReceivedDebit + + +class V2MoneyManagementReceivedDebitScheduledEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.received_debit.scheduled" + type: Literal["v2.money_management.received_debit.scheduled"] + 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) -> "V2MoneyManagementReceivedDebitScheduledEvent": + return cast( + "V2MoneyManagementReceivedDebitScheduledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReceivedDebit": + 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( + "ReceivedDebit", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementReceivedDebitScheduledEvent": + return cast( + "V2MoneyManagementReceivedDebitScheduledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReceivedDebit": + 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( + "ReceivedDebit", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementReceivedDebitScheduledEvent(Event): + LOOKUP_TYPE = "v2.money_management.received_debit.scheduled" + type: Literal["v2.money_management.received_debit.scheduled"] + + 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) -> "ReceivedDebit": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReceivedDebit", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_signals_account_evaluation_complete_event.py b/stripe/events/_v2_signals_account_evaluation_complete_event.py new file mode 100644 index 000000000..aabe1fea7 --- /dev/null +++ b/stripe/events/_v2_signals_account_evaluation_complete_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.signals._account_evaluation import AccountEvaluation + + +class V2SignalsAccountEvaluationCompleteEventNotification(EventNotification): + LOOKUP_TYPE = "v2.signals.account_evaluation.complete" + type: Literal["v2.signals.account_evaluation.complete"] + 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) -> "V2SignalsAccountEvaluationCompleteEvent": + return cast( + "V2SignalsAccountEvaluationCompleteEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "AccountEvaluation": + 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( + "AccountEvaluation", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2SignalsAccountEvaluationCompleteEvent": + return cast( + "V2SignalsAccountEvaluationCompleteEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "AccountEvaluation": + 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( + "AccountEvaluation", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2SignalsAccountEvaluationCompleteEvent(Event): + LOOKUP_TYPE = "v2.signals.account_evaluation.complete" + type: Literal["v2.signals.account_evaluation.complete"] + + 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) -> "AccountEvaluation": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "AccountEvaluation", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_signals_account_signal_fraudulent_merchant_ready_event.py b/stripe/events/_v2_signals_account_signal_fraudulent_merchant_ready_event.py index e9dd02588..dc0bbc943 100644 --- a/stripe/events/_v2_signals_account_signal_fraudulent_merchant_ready_event.py +++ b/stripe/events/_v2_signals_account_signal_fraudulent_merchant_ready_event.py @@ -4,12 +4,15 @@ from stripe._api_mode import ApiMode from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2.core._event import Event, EventNotification +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: from stripe._api_requestor import _APIRequestor + from stripe._stripe_client import StripeClient + from stripe.v2.signals._account_signal import AccountSignal class V2SignalsAccountSignalFraudulentMerchantReadyEventNotification( @@ -17,6 +20,16 @@ class V2SignalsAccountSignalFraudulentMerchantReadyEventNotification( ): LOOKUP_TYPE = "v2.signals.account_signal.fraudulent_merchant_ready" type: Literal["v2.signals.account_signal.fraudulent_merchant_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( @@ -27,6 +40,22 @@ def fetch_event( 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, @@ -36,6 +65,22 @@ async def fetch_event_async( 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 V2SignalsAccountSignalFraudulentMerchantReadyEvent(Event): LOOKUP_TYPE = "v2.signals.account_signal.fraudulent_merchant_ready" @@ -116,10 +161,6 @@ class Indicator(StripeObject): """ Fraudulent merchant signal data. Present when type is fraudulent_merchant. """ - id: str - """ - Unique identifier for this account signal. - """ type: Literal["fraudulent_merchant"] """ The type of account signal. Currently only fraudulent_merchant is supported. @@ -154,3 +195,39 @@ def _construct_from( api_mode=api_mode, ) return evt + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "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/events/_v2_signals_account_signal_fraudulent_website_ready_event.py b/stripe/events/_v2_signals_account_signal_fraudulent_website_ready_event.py new file mode 100644 index 000000000..3ecab8d01 --- /dev/null +++ b/stripe/events/_v2_signals_account_signal_fraudulent_website_ready_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.signals._account_signal import AccountSignal + + +class V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.signals.account_signal.fraudulent_website_ready" + type: Literal["v2.signals.account_signal.fraudulent_website_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, + ) -> "V2SignalsAccountSignalFraudulentWebsiteReadyEvent": + return cast( + "V2SignalsAccountSignalFraudulentWebsiteReadyEvent", + 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, + ) -> "V2SignalsAccountSignalFraudulentWebsiteReadyEvent": + return cast( + "V2SignalsAccountSignalFraudulentWebsiteReadyEvent", + 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 V2SignalsAccountSignalFraudulentWebsiteReadyEvent(Event): + LOOKUP_TYPE = "v2.signals.account_signal.fraudulent_website_ready" + type: Literal["v2.signals.account_signal.fraudulent_website_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/events/_v2_signals_account_signal_payment_delinquency_exposure_ready_event.py b/stripe/events/_v2_signals_account_signal_payment_delinquency_exposure_ready_event.py new file mode 100644 index 000000000..ad4559afd --- /dev/null +++ b/stripe/events/_v2_signals_account_signal_payment_delinquency_exposure_ready_event.py @@ -0,0 +1,127 @@ +# -*- 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 V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v2.signals.account_signal.payment_delinquency_exposure_ready" + ) + type: Literal[ + "v2.signals.account_signal.payment_delinquency_exposure_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, + ) -> "V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent": + return cast( + "V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent", + 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, + ) -> "V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent": + return cast( + "V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent", + 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 V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent(Event): + LOOKUP_TYPE = ( + "v2.signals.account_signal.payment_delinquency_exposure_ready" + ) + type: Literal[ + "v2.signals.account_signal.payment_delinquency_exposure_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/_session.py b/stripe/financial_connections/_session.py index 82e08eb27..a4bc50183 100644 --- a/stripe/financial_connections/_session.py +++ b/stripe/financial_connections/_session.py @@ -10,6 +10,7 @@ if TYPE_CHECKING: from stripe._account import Account as AccountResource from stripe._customer import Customer + from stripe._token import Token from stripe.financial_connections._account import ( Account as FinancialConnectionsAccountResource, ) @@ -144,6 +145,29 @@ class Cancelled(StripeObject): """ The accounts that were collected as part of this Session. """ + bank_account_token: Optional["Token"] + """ + Tokenization is the process Stripe uses to collect sensitive card or bank + account details, or personally identifiable information (PII), directly from + your customers in a secure manner. A token representing this information is + returned to your server to use. Use our + [recommended payments integrations](https://docs.stripe.com/payments) to perform this process + on the client-side. This guarantees that no sensitive card data touches your server, + and allows your integration to operate in a PCI-compliant way. + + If you can't use client-side tokenization, you can also create tokens using + the API with either your publishable or secret API key. If + your integration uses this method, you're responsible for any PCI compliance + that it might require, and you must keep your secret API key safe. Unlike with + client-side tokenization, your customer's information isn't sent directly to + Stripe, so we can't determine how it's handled or stored. + + You can't store or use tokens more than once. To store card or bank account + information for later use, create [Customer](https://docs.stripe.com/api#customers) + objects or [External accounts](https://docs.stripe.com/api#external_accounts). + [Radar](https://docs.stripe.com/radar), our integrated solution for automatic fraud protection, + performs best with integrations that use client-side tokenization. + """ client_secret: Optional[str] """ A value that will be passed to the client to launch the authentication flow. diff --git a/stripe/issuing/_authorization.py b/stripe/issuing/_authorization.py index 3ab88fa73..58bae5794 100644 --- a/stripe/issuing/_authorization.py +++ b/stripe/issuing/_authorization.py @@ -859,6 +859,47 @@ class Fuel(StripeObject): "unit_cost_decimal": "decimal_string", } + class Healthcare(StripeObject): + clinic_amount: Optional[int] + """ + Clinic and urgent care sub-amount for Visa only. Null if the merchant did not include this amount. + """ + 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). + """ + dental_amount: Optional[int] + """ + Dental care sub-amount for Visa only. Null if the merchant did not include this amount. + """ + prescription_amount: Optional[int] + """ + Prescription drug sub-amount. Null if the merchant did not include this amount. + """ + purchase_type: Optional[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: Optional[int] + """ + Total FSA/HSA-eligible amount in the smallest currency unit. + """ + verification_status: Optional[ + Literal[ + "iias_merchant_exempt", + "iias_merchant_not_certified", + "iias_verified", + "not_verified", + ] + ] + """ + IIAS verification status from the merchant terminal. For Visa, this value will always be iias_verified. + """ + vision_amount: Optional[int] + """ + Vision/optical sub-amount. Null if the merchant did not include this amount. + """ + class MerchantData(StripeObject): category: str """ @@ -1626,6 +1667,10 @@ class ThreeDSecure(StripeObject): """ Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. """ + healthcare: Optional[Healthcare] + """ + Details about the IIAS FSA/HSA healthcare amounts on this authorization. + """ id: str """ Unique identifier for the object. @@ -2793,6 +2838,7 @@ def test_helpers(self): "fleet": Fleet, "fraud_challenges": FraudChallenge, "fuel": Fuel, + "healthcare": Healthcare, "merchant_data": MerchantData, "network_data": NetworkData, "pending_request": PendingRequest, diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index d47faafe7..fb1fe56c7 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -72,6 +72,16 @@ class CancelAfter(StripeObject): cancel_after: CancelAfter _inner_class_types = {"cancel_after": CancelAfter} + class ProductGraduationState(StripeObject): + state: Literal["failed", "pending", "succeeded"] + """ + Status of the product graduation request. `pending` while awaiting card network confirmation, `succeeded` once confirmed, `failed` if rejected. + """ + target_product_code: Optional[str] + """ + The product code the card graduation is targeting. + """ + class Redaction(StripeObject): status: Union[Literal["processing", "redacted", "validated"], str] """ @@ -1338,6 +1348,14 @@ class GooglePay(StripeObject): """ The personalization design object belonging to this card. """ + product_code: Optional[str] + """ + The product code the card is currently enrolled under. `product_graduation_state` reflects any in-flight product graduation and whether the card network has confirmed it. + """ + product_graduation_state: Optional[ProductGraduationState] + """ + State of the product graduation request on this card. Only present when a product graduation has been requested. + """ program: Optional[str] """ The program that this card belongs to — will not be nil. @@ -2060,6 +2078,7 @@ def test_helpers(self): _inner_class_types = { "latest_fraud_warning": LatestFraudWarning, "lifecycle_controls": LifecycleControls, + "product_graduation_state": ProductGraduationState, "redaction": Redaction, "shipping": Shipping, "spending_controls": SpendingControls, diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index 5ead53808..147de54a0 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -144,8 +144,10 @@ AccountCreateParamsCompanyAddress as AccountCreateParamsCompanyAddress, AccountCreateParamsCompanyAddressKana as AccountCreateParamsCompanyAddressKana, AccountCreateParamsCompanyAddressKanji as AccountCreateParamsCompanyAddressKanji, + AccountCreateParamsCompanyAdministrativeAddress as AccountCreateParamsCompanyAdministrativeAddress, AccountCreateParamsCompanyDirectorshipDeclaration as AccountCreateParamsCompanyDirectorshipDeclaration, AccountCreateParamsCompanyOwnershipDeclaration as AccountCreateParamsCompanyOwnershipDeclaration, + AccountCreateParamsCompanyPrincipalPlaceOfBusiness as AccountCreateParamsCompanyPrincipalPlaceOfBusiness, AccountCreateParamsCompanyRegistrationDate as AccountCreateParamsCompanyRegistrationDate, AccountCreateParamsCompanyRepresentativeDeclaration as AccountCreateParamsCompanyRepresentativeDeclaration, AccountCreateParamsCompanyVerification as AccountCreateParamsCompanyVerification, @@ -164,8 +166,6 @@ AccountCreateParamsDocumentsCompanyRegistrationVerification as AccountCreateParamsDocumentsCompanyRegistrationVerification, AccountCreateParamsDocumentsCompanyTaxIdVerification as AccountCreateParamsDocumentsCompanyTaxIdVerification, AccountCreateParamsDocumentsProofOfAddress as AccountCreateParamsDocumentsProofOfAddress, - AccountCreateParamsDocumentsProofOfRegistration as AccountCreateParamsDocumentsProofOfRegistration, - AccountCreateParamsDocumentsProofOfRegistrationSigner as AccountCreateParamsDocumentsProofOfRegistrationSigner, AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnership as AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnership, AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnershipSigner as AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnershipSigner, AccountCreateParamsGroups as AccountCreateParamsGroups, @@ -494,6 +494,9 @@ from stripe.params._account_signals_retrieve_params import ( AccountSignalsRetrieveParams as AccountSignalsRetrieveParams, ) + from stripe.params._account_unreject_params import ( + AccountUnrejectParams as AccountUnrejectParams, + ) from stripe.params._account_update_params import ( AccountUpdateParams as AccountUpdateParams, AccountUpdateParamsBankAccount as AccountUpdateParamsBankAccount, @@ -589,8 +592,10 @@ AccountUpdateParamsCompanyAddress as AccountUpdateParamsCompanyAddress, AccountUpdateParamsCompanyAddressKana as AccountUpdateParamsCompanyAddressKana, AccountUpdateParamsCompanyAddressKanji as AccountUpdateParamsCompanyAddressKanji, + AccountUpdateParamsCompanyAdministrativeAddress as AccountUpdateParamsCompanyAdministrativeAddress, AccountUpdateParamsCompanyDirectorshipDeclaration as AccountUpdateParamsCompanyDirectorshipDeclaration, AccountUpdateParamsCompanyOwnershipDeclaration as AccountUpdateParamsCompanyOwnershipDeclaration, + AccountUpdateParamsCompanyPrincipalPlaceOfBusiness as AccountUpdateParamsCompanyPrincipalPlaceOfBusiness, AccountUpdateParamsCompanyRegistrationDate as AccountUpdateParamsCompanyRegistrationDate, AccountUpdateParamsCompanyRepresentativeDeclaration as AccountUpdateParamsCompanyRepresentativeDeclaration, AccountUpdateParamsCompanyVerification as AccountUpdateParamsCompanyVerification, @@ -642,6 +647,7 @@ AccountUpdateParamsSettingsPaypayPaymentsSiteAccessible as AccountUpdateParamsSettingsPaypayPaymentsSiteAccessible, AccountUpdateParamsSettingsPaypayPaymentsSiteInDevelopment as AccountUpdateParamsSettingsPaypayPaymentsSiteInDevelopment, AccountUpdateParamsSettingsPaypayPaymentsSiteRestricted as AccountUpdateParamsSettingsPaypayPaymentsSiteRestricted, + AccountUpdateParamsSettingsSepaDebitPayments as AccountUpdateParamsSettingsSepaDebitPayments, AccountUpdateParamsSettingsSmartDisputes as AccountUpdateParamsSettingsSmartDisputes, AccountUpdateParamsSettingsSmartDisputesAutoRespond as AccountUpdateParamsSettingsSmartDisputesAutoRespond, AccountUpdateParamsSettingsTaxForms as AccountUpdateParamsSettingsTaxForms, @@ -757,7 +763,7 @@ ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalDiscounts as ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalDiscounts, ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalExtraCharge as ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalExtraCharge, ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalTax as ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalTax, - ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTax as ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTax, + ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem as ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem, ChargeCaptureParamsPaymentDetailsCarRentalDatumVehicle as ChargeCaptureParamsPaymentDetailsCarRentalDatumVehicle, ChargeCaptureParamsPaymentDetailsCarRentalDelivery as ChargeCaptureParamsPaymentDetailsCarRentalDelivery, ChargeCaptureParamsPaymentDetailsCarRentalDeliveryRecipient as ChargeCaptureParamsPaymentDetailsCarRentalDeliveryRecipient, @@ -788,7 +794,7 @@ ChargeCaptureParamsPaymentDetailsFlightDatumTotalDiscounts as ChargeCaptureParamsPaymentDetailsFlightDatumTotalDiscounts, ChargeCaptureParamsPaymentDetailsFlightDatumTotalExtraCharge as ChargeCaptureParamsPaymentDetailsFlightDatumTotalExtraCharge, ChargeCaptureParamsPaymentDetailsFlightDatumTotalTax as ChargeCaptureParamsPaymentDetailsFlightDatumTotalTax, - ChargeCaptureParamsPaymentDetailsFlightDatumTotalTaxTax as ChargeCaptureParamsPaymentDetailsFlightDatumTotalTaxTax, + ChargeCaptureParamsPaymentDetailsFlightDatumTotalTaxTaxItem as ChargeCaptureParamsPaymentDetailsFlightDatumTotalTaxTaxItem, ChargeCaptureParamsPaymentDetailsFlightDelivery as ChargeCaptureParamsPaymentDetailsFlightDelivery, ChargeCaptureParamsPaymentDetailsFlightDeliveryRecipient as ChargeCaptureParamsPaymentDetailsFlightDeliveryRecipient, ChargeCaptureParamsPaymentDetailsFlightPassenger as ChargeCaptureParamsPaymentDetailsFlightPassenger, @@ -807,7 +813,7 @@ ChargeCaptureParamsPaymentDetailsLodgingDatumTotalDiscounts as ChargeCaptureParamsPaymentDetailsLodgingDatumTotalDiscounts, ChargeCaptureParamsPaymentDetailsLodgingDatumTotalExtraCharge as ChargeCaptureParamsPaymentDetailsLodgingDatumTotalExtraCharge, ChargeCaptureParamsPaymentDetailsLodgingDatumTotalTax as ChargeCaptureParamsPaymentDetailsLodgingDatumTotalTax, - ChargeCaptureParamsPaymentDetailsLodgingDatumTotalTaxTax as ChargeCaptureParamsPaymentDetailsLodgingDatumTotalTaxTax, + ChargeCaptureParamsPaymentDetailsLodgingDatumTotalTaxTaxItem as ChargeCaptureParamsPaymentDetailsLodgingDatumTotalTaxTaxItem, ChargeCaptureParamsPaymentDetailsLodgingDelivery as ChargeCaptureParamsPaymentDetailsLodgingDelivery, ChargeCaptureParamsPaymentDetailsLodgingDeliveryRecipient as ChargeCaptureParamsPaymentDetailsLodgingDeliveryRecipient, ChargeCaptureParamsPaymentDetailsLodgingPassenger as ChargeCaptureParamsPaymentDetailsLodgingPassenger, @@ -851,7 +857,7 @@ ChargeModifyParamsPaymentDetailsCarRentalDatumTotalDiscounts as ChargeModifyParamsPaymentDetailsCarRentalDatumTotalDiscounts, ChargeModifyParamsPaymentDetailsCarRentalDatumTotalExtraCharge as ChargeModifyParamsPaymentDetailsCarRentalDatumTotalExtraCharge, ChargeModifyParamsPaymentDetailsCarRentalDatumTotalTax as ChargeModifyParamsPaymentDetailsCarRentalDatumTotalTax, - ChargeModifyParamsPaymentDetailsCarRentalDatumTotalTaxTax as ChargeModifyParamsPaymentDetailsCarRentalDatumTotalTaxTax, + ChargeModifyParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem as ChargeModifyParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem, ChargeModifyParamsPaymentDetailsCarRentalDatumVehicle as ChargeModifyParamsPaymentDetailsCarRentalDatumVehicle, ChargeModifyParamsPaymentDetailsCarRentalDelivery as ChargeModifyParamsPaymentDetailsCarRentalDelivery, ChargeModifyParamsPaymentDetailsCarRentalDeliveryRecipient as ChargeModifyParamsPaymentDetailsCarRentalDeliveryRecipient, @@ -882,7 +888,7 @@ ChargeModifyParamsPaymentDetailsFlightDatumTotalDiscounts as ChargeModifyParamsPaymentDetailsFlightDatumTotalDiscounts, ChargeModifyParamsPaymentDetailsFlightDatumTotalExtraCharge as ChargeModifyParamsPaymentDetailsFlightDatumTotalExtraCharge, ChargeModifyParamsPaymentDetailsFlightDatumTotalTax as ChargeModifyParamsPaymentDetailsFlightDatumTotalTax, - ChargeModifyParamsPaymentDetailsFlightDatumTotalTaxTax as ChargeModifyParamsPaymentDetailsFlightDatumTotalTaxTax, + ChargeModifyParamsPaymentDetailsFlightDatumTotalTaxTaxItem as ChargeModifyParamsPaymentDetailsFlightDatumTotalTaxTaxItem, ChargeModifyParamsPaymentDetailsFlightDelivery as ChargeModifyParamsPaymentDetailsFlightDelivery, ChargeModifyParamsPaymentDetailsFlightDeliveryRecipient as ChargeModifyParamsPaymentDetailsFlightDeliveryRecipient, ChargeModifyParamsPaymentDetailsFlightPassenger as ChargeModifyParamsPaymentDetailsFlightPassenger, @@ -901,7 +907,7 @@ ChargeModifyParamsPaymentDetailsLodgingDatumTotalDiscounts as ChargeModifyParamsPaymentDetailsLodgingDatumTotalDiscounts, ChargeModifyParamsPaymentDetailsLodgingDatumTotalExtraCharge as ChargeModifyParamsPaymentDetailsLodgingDatumTotalExtraCharge, ChargeModifyParamsPaymentDetailsLodgingDatumTotalTax as ChargeModifyParamsPaymentDetailsLodgingDatumTotalTax, - ChargeModifyParamsPaymentDetailsLodgingDatumTotalTaxTax as ChargeModifyParamsPaymentDetailsLodgingDatumTotalTaxTax, + ChargeModifyParamsPaymentDetailsLodgingDatumTotalTaxTaxItem as ChargeModifyParamsPaymentDetailsLodgingDatumTotalTaxTaxItem, ChargeModifyParamsPaymentDetailsLodgingDelivery as ChargeModifyParamsPaymentDetailsLodgingDelivery, ChargeModifyParamsPaymentDetailsLodgingDeliveryRecipient as ChargeModifyParamsPaymentDetailsLodgingDeliveryRecipient, ChargeModifyParamsPaymentDetailsLodgingPassenger as ChargeModifyParamsPaymentDetailsLodgingPassenger, @@ -940,7 +946,7 @@ ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalDiscounts as ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalDiscounts, ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalExtraCharge as ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalExtraCharge, ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalTax as ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalTax, - ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTax as ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTax, + ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem as ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem, ChargeUpdateParamsPaymentDetailsCarRentalDatumVehicle as ChargeUpdateParamsPaymentDetailsCarRentalDatumVehicle, ChargeUpdateParamsPaymentDetailsCarRentalDelivery as ChargeUpdateParamsPaymentDetailsCarRentalDelivery, ChargeUpdateParamsPaymentDetailsCarRentalDeliveryRecipient as ChargeUpdateParamsPaymentDetailsCarRentalDeliveryRecipient, @@ -971,7 +977,7 @@ ChargeUpdateParamsPaymentDetailsFlightDatumTotalDiscounts as ChargeUpdateParamsPaymentDetailsFlightDatumTotalDiscounts, ChargeUpdateParamsPaymentDetailsFlightDatumTotalExtraCharge as ChargeUpdateParamsPaymentDetailsFlightDatumTotalExtraCharge, ChargeUpdateParamsPaymentDetailsFlightDatumTotalTax as ChargeUpdateParamsPaymentDetailsFlightDatumTotalTax, - ChargeUpdateParamsPaymentDetailsFlightDatumTotalTaxTax as ChargeUpdateParamsPaymentDetailsFlightDatumTotalTaxTax, + ChargeUpdateParamsPaymentDetailsFlightDatumTotalTaxTaxItem as ChargeUpdateParamsPaymentDetailsFlightDatumTotalTaxTaxItem, ChargeUpdateParamsPaymentDetailsFlightDelivery as ChargeUpdateParamsPaymentDetailsFlightDelivery, ChargeUpdateParamsPaymentDetailsFlightDeliveryRecipient as ChargeUpdateParamsPaymentDetailsFlightDeliveryRecipient, ChargeUpdateParamsPaymentDetailsFlightPassenger as ChargeUpdateParamsPaymentDetailsFlightPassenger, @@ -990,7 +996,7 @@ ChargeUpdateParamsPaymentDetailsLodgingDatumTotalDiscounts as ChargeUpdateParamsPaymentDetailsLodgingDatumTotalDiscounts, ChargeUpdateParamsPaymentDetailsLodgingDatumTotalExtraCharge as ChargeUpdateParamsPaymentDetailsLodgingDatumTotalExtraCharge, ChargeUpdateParamsPaymentDetailsLodgingDatumTotalTax as ChargeUpdateParamsPaymentDetailsLodgingDatumTotalTax, - ChargeUpdateParamsPaymentDetailsLodgingDatumTotalTaxTax as ChargeUpdateParamsPaymentDetailsLodgingDatumTotalTaxTax, + ChargeUpdateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem as ChargeUpdateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem, ChargeUpdateParamsPaymentDetailsLodgingDelivery as ChargeUpdateParamsPaymentDetailsLodgingDelivery, ChargeUpdateParamsPaymentDetailsLodgingDeliveryRecipient as ChargeUpdateParamsPaymentDetailsLodgingDeliveryRecipient, ChargeUpdateParamsPaymentDetailsLodgingPassenger as ChargeUpdateParamsPaymentDetailsLodgingPassenger, @@ -2330,7 +2336,7 @@ PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalDiscounts as PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalDiscounts, PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalExtraCharge as PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalExtraCharge, PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalTax as PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalTax, - PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTax as PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTax, + PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem as PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem, PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumVehicle as PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumVehicle, PaymentIntentCaptureParamsPaymentDetailsCarRentalDelivery as PaymentIntentCaptureParamsPaymentDetailsCarRentalDelivery, PaymentIntentCaptureParamsPaymentDetailsCarRentalDeliveryRecipient as PaymentIntentCaptureParamsPaymentDetailsCarRentalDeliveryRecipient, @@ -2361,7 +2367,7 @@ PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalDiscounts as PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalDiscounts, PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalExtraCharge as PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalExtraCharge, PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalTax as PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalTax, - PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalTaxTax as PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalTaxTax, + PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalTaxTaxItem as PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalTaxTaxItem, PaymentIntentCaptureParamsPaymentDetailsFlightDelivery as PaymentIntentCaptureParamsPaymentDetailsFlightDelivery, PaymentIntentCaptureParamsPaymentDetailsFlightDeliveryRecipient as PaymentIntentCaptureParamsPaymentDetailsFlightDeliveryRecipient, PaymentIntentCaptureParamsPaymentDetailsFlightPassenger as PaymentIntentCaptureParamsPaymentDetailsFlightPassenger, @@ -2380,7 +2386,7 @@ PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalDiscounts as PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalDiscounts, PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalExtraCharge as PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalExtraCharge, PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalTax as PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalTax, - PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalTaxTax as PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalTaxTax, + PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalTaxTaxItem as PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalTaxTaxItem, PaymentIntentCaptureParamsPaymentDetailsLodgingDelivery as PaymentIntentCaptureParamsPaymentDetailsLodgingDelivery, PaymentIntentCaptureParamsPaymentDetailsLodgingDeliveryRecipient as PaymentIntentCaptureParamsPaymentDetailsLodgingDeliveryRecipient, PaymentIntentCaptureParamsPaymentDetailsLodgingPassenger as PaymentIntentCaptureParamsPaymentDetailsLodgingPassenger, @@ -2432,7 +2438,7 @@ PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalDiscounts as PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalDiscounts, PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalExtraCharge as PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalExtraCharge, PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalTax as PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalTax, - PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalTaxTax as PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalTaxTax, + PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem as PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem, PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumVehicle as PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumVehicle, PaymentIntentConfirmParamsPaymentDetailsCarRentalDelivery as PaymentIntentConfirmParamsPaymentDetailsCarRentalDelivery, PaymentIntentConfirmParamsPaymentDetailsCarRentalDeliveryRecipient as PaymentIntentConfirmParamsPaymentDetailsCarRentalDeliveryRecipient, @@ -2463,7 +2469,7 @@ PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalDiscounts as PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalDiscounts, PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalExtraCharge as PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalExtraCharge, PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalTax as PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalTax, - PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalTaxTax as PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalTaxTax, + PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalTaxTaxItem as PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalTaxTaxItem, PaymentIntentConfirmParamsPaymentDetailsFlightDelivery as PaymentIntentConfirmParamsPaymentDetailsFlightDelivery, PaymentIntentConfirmParamsPaymentDetailsFlightDeliveryRecipient as PaymentIntentConfirmParamsPaymentDetailsFlightDeliveryRecipient, PaymentIntentConfirmParamsPaymentDetailsFlightPassenger as PaymentIntentConfirmParamsPaymentDetailsFlightPassenger, @@ -2482,7 +2488,7 @@ PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalDiscounts as PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalDiscounts, PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalExtraCharge as PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalExtraCharge, PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalTax as PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalTax, - PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalTaxTax as PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalTaxTax, + PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalTaxTaxItem as PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalTaxTaxItem, PaymentIntentConfirmParamsPaymentDetailsLodgingDelivery as PaymentIntentConfirmParamsPaymentDetailsLodgingDelivery, PaymentIntentConfirmParamsPaymentDetailsLodgingDeliveryRecipient as PaymentIntentConfirmParamsPaymentDetailsLodgingDeliveryRecipient, PaymentIntentConfirmParamsPaymentDetailsLodgingPassenger as PaymentIntentConfirmParamsPaymentDetailsLodgingPassenger, @@ -2760,7 +2766,7 @@ PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalDiscounts as PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalDiscounts, PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalExtraCharge as PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalExtraCharge, PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalTax as PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalTax, - PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalTaxTax as PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalTaxTax, + PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem as PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem, PaymentIntentCreateParamsPaymentDetailsCarRentalDatumVehicle as PaymentIntentCreateParamsPaymentDetailsCarRentalDatumVehicle, PaymentIntentCreateParamsPaymentDetailsCarRentalDelivery as PaymentIntentCreateParamsPaymentDetailsCarRentalDelivery, PaymentIntentCreateParamsPaymentDetailsCarRentalDeliveryRecipient as PaymentIntentCreateParamsPaymentDetailsCarRentalDeliveryRecipient, @@ -2791,7 +2797,7 @@ PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalDiscounts as PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalDiscounts, PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalExtraCharge as PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalExtraCharge, PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalTax as PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalTax, - PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalTaxTax as PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalTaxTax, + PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalTaxTaxItem as PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalTaxTaxItem, PaymentIntentCreateParamsPaymentDetailsFlightDelivery as PaymentIntentCreateParamsPaymentDetailsFlightDelivery, PaymentIntentCreateParamsPaymentDetailsFlightDeliveryRecipient as PaymentIntentCreateParamsPaymentDetailsFlightDeliveryRecipient, PaymentIntentCreateParamsPaymentDetailsFlightPassenger as PaymentIntentCreateParamsPaymentDetailsFlightPassenger, @@ -2810,7 +2816,7 @@ PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalDiscounts as PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalDiscounts, PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalExtraCharge as PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalExtraCharge, PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalTax as PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalTax, - PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalTaxTax as PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalTaxTax, + PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem as PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem, PaymentIntentCreateParamsPaymentDetailsLodgingDelivery as PaymentIntentCreateParamsPaymentDetailsLodgingDelivery, PaymentIntentCreateParamsPaymentDetailsLodgingDeliveryRecipient as PaymentIntentCreateParamsPaymentDetailsLodgingDeliveryRecipient, PaymentIntentCreateParamsPaymentDetailsLodgingPassenger as PaymentIntentCreateParamsPaymentDetailsLodgingPassenger, @@ -3142,7 +3148,7 @@ PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalDiscounts as PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalDiscounts, PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalExtraCharge as PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalExtraCharge, PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalTax as PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalTax, - PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalTaxTax as PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalTaxTax, + PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem as PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem, PaymentIntentModifyParamsPaymentDetailsCarRentalDatumVehicle as PaymentIntentModifyParamsPaymentDetailsCarRentalDatumVehicle, PaymentIntentModifyParamsPaymentDetailsCarRentalDelivery as PaymentIntentModifyParamsPaymentDetailsCarRentalDelivery, PaymentIntentModifyParamsPaymentDetailsCarRentalDeliveryRecipient as PaymentIntentModifyParamsPaymentDetailsCarRentalDeliveryRecipient, @@ -3173,7 +3179,7 @@ PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalDiscounts as PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalDiscounts, PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalExtraCharge as PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalExtraCharge, PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalTax as PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalTax, - PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalTaxTax as PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalTaxTax, + PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalTaxTaxItem as PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalTaxTaxItem, PaymentIntentModifyParamsPaymentDetailsFlightDelivery as PaymentIntentModifyParamsPaymentDetailsFlightDelivery, PaymentIntentModifyParamsPaymentDetailsFlightDeliveryRecipient as PaymentIntentModifyParamsPaymentDetailsFlightDeliveryRecipient, PaymentIntentModifyParamsPaymentDetailsFlightPassenger as PaymentIntentModifyParamsPaymentDetailsFlightPassenger, @@ -3192,7 +3198,7 @@ PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalDiscounts as PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalDiscounts, PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalExtraCharge as PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalExtraCharge, PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalTax as PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalTax, - PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalTaxTax as PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalTaxTax, + PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalTaxTaxItem as PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalTaxTaxItem, PaymentIntentModifyParamsPaymentDetailsLodgingDelivery as PaymentIntentModifyParamsPaymentDetailsLodgingDelivery, PaymentIntentModifyParamsPaymentDetailsLodgingDeliveryRecipient as PaymentIntentModifyParamsPaymentDetailsLodgingDeliveryRecipient, PaymentIntentModifyParamsPaymentDetailsLodgingPassenger as PaymentIntentModifyParamsPaymentDetailsLodgingPassenger, @@ -3488,7 +3494,7 @@ PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalDiscounts as PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalDiscounts, PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalExtraCharge as PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalExtraCharge, PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalTax as PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalTax, - PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTax as PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTax, + PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem as PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem, PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumVehicle as PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumVehicle, PaymentIntentUpdateParamsPaymentDetailsCarRentalDelivery as PaymentIntentUpdateParamsPaymentDetailsCarRentalDelivery, PaymentIntentUpdateParamsPaymentDetailsCarRentalDeliveryRecipient as PaymentIntentUpdateParamsPaymentDetailsCarRentalDeliveryRecipient, @@ -3519,7 +3525,7 @@ PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalDiscounts as PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalDiscounts, PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalExtraCharge as PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalExtraCharge, PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalTax as PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalTax, - PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalTaxTax as PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalTaxTax, + PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalTaxTaxItem as PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalTaxTaxItem, PaymentIntentUpdateParamsPaymentDetailsFlightDelivery as PaymentIntentUpdateParamsPaymentDetailsFlightDelivery, PaymentIntentUpdateParamsPaymentDetailsFlightDeliveryRecipient as PaymentIntentUpdateParamsPaymentDetailsFlightDeliveryRecipient, PaymentIntentUpdateParamsPaymentDetailsFlightPassenger as PaymentIntentUpdateParamsPaymentDetailsFlightPassenger, @@ -3538,7 +3544,7 @@ PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalDiscounts as PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalDiscounts, PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalExtraCharge as PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalExtraCharge, PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalTax as PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalTax, - PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalTaxTax as PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalTaxTax, + PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem as PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem, PaymentIntentUpdateParamsPaymentDetailsLodgingDelivery as PaymentIntentUpdateParamsPaymentDetailsLodgingDelivery, PaymentIntentUpdateParamsPaymentDetailsLodgingDeliveryRecipient as PaymentIntentUpdateParamsPaymentDetailsLodgingDeliveryRecipient, PaymentIntentUpdateParamsPaymentDetailsLodgingPassenger as PaymentIntentUpdateParamsPaymentDetailsLodgingPassenger, @@ -3847,6 +3853,8 @@ PaymentLinkModifyParamsAfterCompletionRedirect as PaymentLinkModifyParamsAfterCompletionRedirect, PaymentLinkModifyParamsAutomaticTax as PaymentLinkModifyParamsAutomaticTax, PaymentLinkModifyParamsAutomaticTaxLiability as PaymentLinkModifyParamsAutomaticTaxLiability, + PaymentLinkModifyParamsConsentCollection as PaymentLinkModifyParamsConsentCollection, + PaymentLinkModifyParamsConsentCollectionPaymentMethodReuseAgreement as PaymentLinkModifyParamsConsentCollectionPaymentMethodReuseAgreement, PaymentLinkModifyParamsCustomField as PaymentLinkModifyParamsCustomField, PaymentLinkModifyParamsCustomFieldDropdown as PaymentLinkModifyParamsCustomFieldDropdown, PaymentLinkModifyParamsCustomFieldDropdownOption as PaymentLinkModifyParamsCustomFieldDropdownOption, @@ -3878,6 +3886,7 @@ PaymentLinkModifyParamsRestrictions as PaymentLinkModifyParamsRestrictions, PaymentLinkModifyParamsRestrictionsCompletedSessions as PaymentLinkModifyParamsRestrictionsCompletedSessions, PaymentLinkModifyParamsShippingAddressCollection as PaymentLinkModifyParamsShippingAddressCollection, + PaymentLinkModifyParamsShippingOption as PaymentLinkModifyParamsShippingOption, PaymentLinkModifyParamsSubscriptionData as PaymentLinkModifyParamsSubscriptionData, PaymentLinkModifyParamsSubscriptionDataInvoiceSettings as PaymentLinkModifyParamsSubscriptionDataInvoiceSettings, PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsIssuer as PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsIssuer, @@ -3895,6 +3904,8 @@ PaymentLinkUpdateParamsAfterCompletionRedirect as PaymentLinkUpdateParamsAfterCompletionRedirect, PaymentLinkUpdateParamsAutomaticTax as PaymentLinkUpdateParamsAutomaticTax, PaymentLinkUpdateParamsAutomaticTaxLiability as PaymentLinkUpdateParamsAutomaticTaxLiability, + PaymentLinkUpdateParamsConsentCollection as PaymentLinkUpdateParamsConsentCollection, + PaymentLinkUpdateParamsConsentCollectionPaymentMethodReuseAgreement as PaymentLinkUpdateParamsConsentCollectionPaymentMethodReuseAgreement, PaymentLinkUpdateParamsCustomField as PaymentLinkUpdateParamsCustomField, PaymentLinkUpdateParamsCustomFieldDropdown as PaymentLinkUpdateParamsCustomFieldDropdown, PaymentLinkUpdateParamsCustomFieldDropdownOption as PaymentLinkUpdateParamsCustomFieldDropdownOption, @@ -3926,6 +3937,7 @@ PaymentLinkUpdateParamsRestrictions as PaymentLinkUpdateParamsRestrictions, PaymentLinkUpdateParamsRestrictionsCompletedSessions as PaymentLinkUpdateParamsRestrictionsCompletedSessions, PaymentLinkUpdateParamsShippingAddressCollection as PaymentLinkUpdateParamsShippingAddressCollection, + PaymentLinkUpdateParamsShippingOption as PaymentLinkUpdateParamsShippingOption, PaymentLinkUpdateParamsSubscriptionData as PaymentLinkUpdateParamsSubscriptionData, PaymentLinkUpdateParamsSubscriptionDataInvoiceSettings as PaymentLinkUpdateParamsSubscriptionDataInvoiceSettings, PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsIssuer as PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsIssuer, @@ -4518,6 +4530,9 @@ PaymentRecordCreateParamsProcessorDetails as PaymentRecordCreateParamsProcessorDetails, PaymentRecordCreateParamsProcessorDetailsCustom as PaymentRecordCreateParamsProcessorDetailsCustom, ) + from stripe.params._payment_record_list_params import ( + PaymentRecordListParams as PaymentRecordListParams, + ) from stripe.params._payment_record_report_payment_attempt_canceled_params import ( PaymentRecordReportPaymentAttemptCanceledParams as PaymentRecordReportPaymentAttemptCanceledParams, ) @@ -4783,6 +4798,7 @@ QuoteCreateParamsDiscountDiscountEndDuration as QuoteCreateParamsDiscountDiscountEndDuration, QuoteCreateParamsFromQuote as QuoteCreateParamsFromQuote, QuoteCreateParamsInvoiceSettings as QuoteCreateParamsInvoiceSettings, + QuoteCreateParamsInvoiceSettingsCustomField as QuoteCreateParamsInvoiceSettingsCustomField, QuoteCreateParamsInvoiceSettingsIssuer as QuoteCreateParamsInvoiceSettingsIssuer, QuoteCreateParamsLine as QuoteCreateParamsLine, QuoteCreateParamsLineAction as QuoteCreateParamsLineAction, @@ -4909,6 +4925,7 @@ QuoteModifyParamsDiscountDiscountEnd as QuoteModifyParamsDiscountDiscountEnd, QuoteModifyParamsDiscountDiscountEndDuration as QuoteModifyParamsDiscountDiscountEndDuration, QuoteModifyParamsInvoiceSettings as QuoteModifyParamsInvoiceSettings, + QuoteModifyParamsInvoiceSettingsCustomField as QuoteModifyParamsInvoiceSettingsCustomField, QuoteModifyParamsInvoiceSettingsIssuer as QuoteModifyParamsInvoiceSettingsIssuer, QuoteModifyParamsLine as QuoteModifyParamsLine, QuoteModifyParamsLineAction as QuoteModifyParamsLineAction, @@ -5012,6 +5029,7 @@ QuoteUpdateParamsDiscountDiscountEnd as QuoteUpdateParamsDiscountDiscountEnd, QuoteUpdateParamsDiscountDiscountEndDuration as QuoteUpdateParamsDiscountDiscountEndDuration, QuoteUpdateParamsInvoiceSettings as QuoteUpdateParamsInvoiceSettings, + QuoteUpdateParamsInvoiceSettingsCustomField as QuoteUpdateParamsInvoiceSettingsCustomField, QuoteUpdateParamsInvoiceSettingsIssuer as QuoteUpdateParamsInvoiceSettingsIssuer, QuoteUpdateParamsLine as QuoteUpdateParamsLine, QuoteUpdateParamsLineAction as QuoteUpdateParamsLineAction, @@ -5980,6 +5998,7 @@ SubscriptionScheduleCreateParamsDefaultSettingsAutomaticTaxLiability as SubscriptionScheduleCreateParamsDefaultSettingsAutomaticTaxLiability, SubscriptionScheduleCreateParamsDefaultSettingsBillingThresholds as SubscriptionScheduleCreateParamsDefaultSettingsBillingThresholds, SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettings as SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettings, + SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsCustomField as SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsCustomField, SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer as SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer, SubscriptionScheduleCreateParamsDefaultSettingsTransferData as SubscriptionScheduleCreateParamsDefaultSettingsTransferData, SubscriptionScheduleCreateParamsPauseSchedule as SubscriptionScheduleCreateParamsPauseSchedule, @@ -6013,6 +6032,7 @@ SubscriptionScheduleCreateParamsPhaseDiscountSettingsServicePeriodAnchorConfigCustom as SubscriptionScheduleCreateParamsPhaseDiscountSettingsServicePeriodAnchorConfigCustom, SubscriptionScheduleCreateParamsPhaseDuration as SubscriptionScheduleCreateParamsPhaseDuration, SubscriptionScheduleCreateParamsPhaseInvoiceSettings as SubscriptionScheduleCreateParamsPhaseInvoiceSettings, + SubscriptionScheduleCreateParamsPhaseInvoiceSettingsCustomField as SubscriptionScheduleCreateParamsPhaseInvoiceSettingsCustomField, SubscriptionScheduleCreateParamsPhaseInvoiceSettingsIssuer as SubscriptionScheduleCreateParamsPhaseInvoiceSettingsIssuer, SubscriptionScheduleCreateParamsPhaseItem as SubscriptionScheduleCreateParamsPhaseItem, SubscriptionScheduleCreateParamsPhaseItemBillingThresholds as SubscriptionScheduleCreateParamsPhaseItemBillingThresholds, @@ -6049,6 +6069,7 @@ SubscriptionScheduleModifyParamsDefaultSettingsAutomaticTaxLiability as SubscriptionScheduleModifyParamsDefaultSettingsAutomaticTaxLiability, SubscriptionScheduleModifyParamsDefaultSettingsBillingThresholds as SubscriptionScheduleModifyParamsDefaultSettingsBillingThresholds, SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettings as SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettings, + SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsCustomField as SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsCustomField, SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsIssuer as SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsIssuer, SubscriptionScheduleModifyParamsDefaultSettingsTransferData as SubscriptionScheduleModifyParamsDefaultSettingsTransferData, SubscriptionScheduleModifyParamsPauseSchedule as SubscriptionScheduleModifyParamsPauseSchedule, @@ -6082,6 +6103,7 @@ SubscriptionScheduleModifyParamsPhaseDiscountSettingsServicePeriodAnchorConfigCustom as SubscriptionScheduleModifyParamsPhaseDiscountSettingsServicePeriodAnchorConfigCustom, SubscriptionScheduleModifyParamsPhaseDuration as SubscriptionScheduleModifyParamsPhaseDuration, SubscriptionScheduleModifyParamsPhaseInvoiceSettings as SubscriptionScheduleModifyParamsPhaseInvoiceSettings, + SubscriptionScheduleModifyParamsPhaseInvoiceSettingsCustomField as SubscriptionScheduleModifyParamsPhaseInvoiceSettingsCustomField, SubscriptionScheduleModifyParamsPhaseInvoiceSettingsIssuer as SubscriptionScheduleModifyParamsPhaseInvoiceSettingsIssuer, SubscriptionScheduleModifyParamsPhaseItem as SubscriptionScheduleModifyParamsPhaseItem, SubscriptionScheduleModifyParamsPhaseItemBillingThresholds as SubscriptionScheduleModifyParamsPhaseItemBillingThresholds, @@ -6117,6 +6139,7 @@ SubscriptionScheduleUpdateParamsDefaultSettingsAutomaticTaxLiability as SubscriptionScheduleUpdateParamsDefaultSettingsAutomaticTaxLiability, SubscriptionScheduleUpdateParamsDefaultSettingsBillingThresholds as SubscriptionScheduleUpdateParamsDefaultSettingsBillingThresholds, SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettings as SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettings, + SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsCustomField as SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsCustomField, SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsIssuer as SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsIssuer, SubscriptionScheduleUpdateParamsDefaultSettingsTransferData as SubscriptionScheduleUpdateParamsDefaultSettingsTransferData, SubscriptionScheduleUpdateParamsPauseSchedule as SubscriptionScheduleUpdateParamsPauseSchedule, @@ -6150,6 +6173,7 @@ SubscriptionScheduleUpdateParamsPhaseDiscountSettingsServicePeriodAnchorConfigCustom as SubscriptionScheduleUpdateParamsPhaseDiscountSettingsServicePeriodAnchorConfigCustom, SubscriptionScheduleUpdateParamsPhaseDuration as SubscriptionScheduleUpdateParamsPhaseDuration, SubscriptionScheduleUpdateParamsPhaseInvoiceSettings as SubscriptionScheduleUpdateParamsPhaseInvoiceSettings, + SubscriptionScheduleUpdateParamsPhaseInvoiceSettingsCustomField as SubscriptionScheduleUpdateParamsPhaseInvoiceSettingsCustomField, SubscriptionScheduleUpdateParamsPhaseInvoiceSettingsIssuer as SubscriptionScheduleUpdateParamsPhaseInvoiceSettingsIssuer, SubscriptionScheduleUpdateParamsPhaseItem as SubscriptionScheduleUpdateParamsPhaseItem, SubscriptionScheduleUpdateParamsPhaseItemBillingThresholds as SubscriptionScheduleUpdateParamsPhaseItemBillingThresholds, @@ -6294,8 +6318,10 @@ TokenCreateParamsAccountCompanyAddress as TokenCreateParamsAccountCompanyAddress, TokenCreateParamsAccountCompanyAddressKana as TokenCreateParamsAccountCompanyAddressKana, TokenCreateParamsAccountCompanyAddressKanji as TokenCreateParamsAccountCompanyAddressKanji, + TokenCreateParamsAccountCompanyAdministrativeAddress as TokenCreateParamsAccountCompanyAdministrativeAddress, TokenCreateParamsAccountCompanyDirectorshipDeclaration as TokenCreateParamsAccountCompanyDirectorshipDeclaration, TokenCreateParamsAccountCompanyOwnershipDeclaration as TokenCreateParamsAccountCompanyOwnershipDeclaration, + TokenCreateParamsAccountCompanyPrincipalPlaceOfBusiness as TokenCreateParamsAccountCompanyPrincipalPlaceOfBusiness, TokenCreateParamsAccountCompanyRegistrationDate as TokenCreateParamsAccountCompanyRegistrationDate, TokenCreateParamsAccountCompanyRepresentativeDeclaration as TokenCreateParamsAccountCompanyRepresentativeDeclaration, TokenCreateParamsAccountCompanyVerification as TokenCreateParamsAccountCompanyVerification, @@ -6854,6 +6880,10 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsCompanyAdministrativeAddress": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsCompanyDirectorshipDeclaration": ( "stripe.params._account_create_params", False, @@ -6862,6 +6892,10 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsCompanyPrincipalPlaceOfBusiness": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsCompanyRegistrationDate": ( "stripe.params._account_create_params", False, @@ -6934,14 +6968,6 @@ "stripe.params._account_create_params", False, ), - "AccountCreateParamsDocumentsProofOfRegistration": ( - "stripe.params._account_create_params", - False, - ), - "AccountCreateParamsDocumentsProofOfRegistrationSigner": ( - "stripe.params._account_create_params", - False, - ), "AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnership": ( "stripe.params._account_create_params", False, @@ -7936,6 +7962,7 @@ "stripe.params._account_signals_retrieve_params", False, ), + "AccountUnrejectParams": ("stripe.params._account_unreject_params", False), "AccountUpdateParams": ("stripe.params._account_update_params", False), "AccountUpdateParamsBankAccount": ( "stripe.params._account_update_params", @@ -8306,6 +8333,10 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsCompanyAdministrativeAddress": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsCompanyDirectorshipDeclaration": ( "stripe.params._account_update_params", False, @@ -8314,6 +8345,10 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsCompanyPrincipalPlaceOfBusiness": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsCompanyRegistrationDate": ( "stripe.params._account_update_params", False, @@ -8518,6 +8553,10 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsSettingsSepaDebitPayments": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsSettingsSmartDisputes": ( "stripe.params._account_update_params", False, @@ -8769,7 +8808,7 @@ "stripe.params._charge_capture_params", False, ), - "ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTax": ( + "ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem": ( "stripe.params._charge_capture_params", False, ), @@ -8893,7 +8932,7 @@ "stripe.params._charge_capture_params", False, ), - "ChargeCaptureParamsPaymentDetailsFlightDatumTotalTaxTax": ( + "ChargeCaptureParamsPaymentDetailsFlightDatumTotalTaxTaxItem": ( "stripe.params._charge_capture_params", False, ), @@ -8969,7 +9008,7 @@ "stripe.params._charge_capture_params", False, ), - "ChargeCaptureParamsPaymentDetailsLodgingDatumTotalTaxTax": ( + "ChargeCaptureParamsPaymentDetailsLodgingDatumTotalTaxTaxItem": ( "stripe.params._charge_capture_params", False, ), @@ -9101,7 +9140,7 @@ "stripe.params._charge_modify_params", False, ), - "ChargeModifyParamsPaymentDetailsCarRentalDatumTotalTaxTax": ( + "ChargeModifyParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem": ( "stripe.params._charge_modify_params", False, ), @@ -9225,7 +9264,7 @@ "stripe.params._charge_modify_params", False, ), - "ChargeModifyParamsPaymentDetailsFlightDatumTotalTaxTax": ( + "ChargeModifyParamsPaymentDetailsFlightDatumTotalTaxTaxItem": ( "stripe.params._charge_modify_params", False, ), @@ -9301,7 +9340,7 @@ "stripe.params._charge_modify_params", False, ), - "ChargeModifyParamsPaymentDetailsLodgingDatumTotalTaxTax": ( + "ChargeModifyParamsPaymentDetailsLodgingDatumTotalTaxTaxItem": ( "stripe.params._charge_modify_params", False, ), @@ -9416,7 +9455,7 @@ "stripe.params._charge_update_params", False, ), - "ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTax": ( + "ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem": ( "stripe.params._charge_update_params", False, ), @@ -9540,7 +9579,7 @@ "stripe.params._charge_update_params", False, ), - "ChargeUpdateParamsPaymentDetailsFlightDatumTotalTaxTax": ( + "ChargeUpdateParamsPaymentDetailsFlightDatumTotalTaxTaxItem": ( "stripe.params._charge_update_params", False, ), @@ -9616,7 +9655,7 @@ "stripe.params._charge_update_params", False, ), - "ChargeUpdateParamsPaymentDetailsLodgingDatumTotalTaxTax": ( + "ChargeUpdateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem": ( "stripe.params._charge_update_params", False, ), @@ -13436,7 +13475,7 @@ "stripe.params._payment_intent_capture_params", False, ), - "PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTax": ( + "PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_capture_params", False, ), @@ -13560,7 +13599,7 @@ "stripe.params._payment_intent_capture_params", False, ), - "PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalTaxTax": ( + "PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_capture_params", False, ), @@ -13636,7 +13675,7 @@ "stripe.params._payment_intent_capture_params", False, ), - "PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalTaxTax": ( + "PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_capture_params", False, ), @@ -13836,7 +13875,7 @@ "stripe.params._payment_intent_confirm_params", False, ), - "PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalTaxTax": ( + "PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_confirm_params", False, ), @@ -13960,7 +13999,7 @@ "stripe.params._payment_intent_confirm_params", False, ), - "PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalTaxTax": ( + "PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_confirm_params", False, ), @@ -14036,7 +14075,7 @@ "stripe.params._payment_intent_confirm_params", False, ), - "PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalTaxTax": ( + "PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_confirm_params", False, ), @@ -15140,7 +15179,7 @@ "stripe.params._payment_intent_create_params", False, ), - "PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalTaxTax": ( + "PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_create_params", False, ), @@ -15264,7 +15303,7 @@ "stripe.params._payment_intent_create_params", False, ), - "PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalTaxTax": ( + "PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_create_params", False, ), @@ -15340,7 +15379,7 @@ "stripe.params._payment_intent_create_params", False, ), - "PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalTaxTax": ( + "PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_create_params", False, ), @@ -16628,7 +16667,7 @@ "stripe.params._payment_intent_modify_params", False, ), - "PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalTaxTax": ( + "PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_modify_params", False, ), @@ -16752,7 +16791,7 @@ "stripe.params._payment_intent_modify_params", False, ), - "PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalTaxTax": ( + "PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_modify_params", False, ), @@ -16828,7 +16867,7 @@ "stripe.params._payment_intent_modify_params", False, ), - "PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalTaxTax": ( + "PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_modify_params", False, ), @@ -17956,7 +17995,7 @@ "stripe.params._payment_intent_update_params", False, ), - "PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTax": ( + "PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_update_params", False, ), @@ -18080,7 +18119,7 @@ "stripe.params._payment_intent_update_params", False, ), - "PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalTaxTax": ( + "PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_update_params", False, ), @@ -18156,7 +18195,7 @@ "stripe.params._payment_intent_update_params", False, ), - "PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalTaxTax": ( + "PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem": ( "stripe.params._payment_intent_update_params", False, ), @@ -19344,6 +19383,14 @@ "stripe.params._payment_link_modify_params", False, ), + "PaymentLinkModifyParamsConsentCollection": ( + "stripe.params._payment_link_modify_params", + False, + ), + "PaymentLinkModifyParamsConsentCollectionPaymentMethodReuseAgreement": ( + "stripe.params._payment_link_modify_params", + False, + ), "PaymentLinkModifyParamsCustomField": ( "stripe.params._payment_link_modify_params", False, @@ -19468,6 +19515,10 @@ "stripe.params._payment_link_modify_params", False, ), + "PaymentLinkModifyParamsShippingOption": ( + "stripe.params._payment_link_modify_params", + False, + ), "PaymentLinkModifyParamsSubscriptionData": ( "stripe.params._payment_link_modify_params", False, @@ -19520,6 +19571,14 @@ "stripe.params._payment_link_update_params", False, ), + "PaymentLinkUpdateParamsConsentCollection": ( + "stripe.params._payment_link_update_params", + False, + ), + "PaymentLinkUpdateParamsConsentCollectionPaymentMethodReuseAgreement": ( + "stripe.params._payment_link_update_params", + False, + ), "PaymentLinkUpdateParamsCustomField": ( "stripe.params._payment_link_update_params", False, @@ -19644,6 +19703,10 @@ "stripe.params._payment_link_update_params", False, ), + "PaymentLinkUpdateParamsShippingOption": ( + "stripe.params._payment_link_update_params", + False, + ), "PaymentLinkUpdateParamsSubscriptionData": ( "stripe.params._payment_link_update_params", False, @@ -21768,6 +21831,10 @@ "stripe.params._payment_record_create_params", False, ), + "PaymentRecordListParams": ( + "stripe.params._payment_record_list_params", + False, + ), "PaymentRecordReportPaymentAttemptCanceledParams": ( "stripe.params._payment_record_report_payment_attempt_canceled_params", False, @@ -22302,6 +22369,10 @@ "stripe.params._quote_create_params", False, ), + "QuoteCreateParamsInvoiceSettingsCustomField": ( + "stripe.params._quote_create_params", + False, + ), "QuoteCreateParamsInvoiceSettingsIssuer": ( "stripe.params._quote_create_params", False, @@ -22675,6 +22746,10 @@ "stripe.params._quote_modify_params", False, ), + "QuoteModifyParamsInvoiceSettingsCustomField": ( + "stripe.params._quote_modify_params", + False, + ), "QuoteModifyParamsInvoiceSettingsIssuer": ( "stripe.params._quote_modify_params", False, @@ -23018,6 +23093,10 @@ "stripe.params._quote_update_params", False, ), + "QuoteUpdateParamsInvoiceSettingsCustomField": ( + "stripe.params._quote_update_params", + False, + ), "QuoteUpdateParamsInvoiceSettingsIssuer": ( "stripe.params._quote_update_params", False, @@ -26413,6 +26492,10 @@ "stripe.params._subscription_schedule_create_params", False, ), + "SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsCustomField": ( + "stripe.params._subscription_schedule_create_params", + False, + ), "SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer": ( "stripe.params._subscription_schedule_create_params", False, @@ -26545,6 +26628,10 @@ "stripe.params._subscription_schedule_create_params", False, ), + "SubscriptionScheduleCreateParamsPhaseInvoiceSettingsCustomField": ( + "stripe.params._subscription_schedule_create_params", + False, + ), "SubscriptionScheduleCreateParamsPhaseInvoiceSettingsIssuer": ( "stripe.params._subscription_schedule_create_params", False, @@ -26673,6 +26760,10 @@ "stripe.params._subscription_schedule_modify_params", False, ), + "SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsCustomField": ( + "stripe.params._subscription_schedule_modify_params", + False, + ), "SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsIssuer": ( "stripe.params._subscription_schedule_modify_params", False, @@ -26805,6 +26896,10 @@ "stripe.params._subscription_schedule_modify_params", False, ), + "SubscriptionScheduleModifyParamsPhaseInvoiceSettingsCustomField": ( + "stripe.params._subscription_schedule_modify_params", + False, + ), "SubscriptionScheduleModifyParamsPhaseInvoiceSettingsIssuer": ( "stripe.params._subscription_schedule_modify_params", False, @@ -26921,6 +27016,10 @@ "stripe.params._subscription_schedule_update_params", False, ), + "SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsCustomField": ( + "stripe.params._subscription_schedule_update_params", + False, + ), "SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsIssuer": ( "stripe.params._subscription_schedule_update_params", False, @@ -27053,6 +27152,10 @@ "stripe.params._subscription_schedule_update_params", False, ), + "SubscriptionScheduleUpdateParamsPhaseInvoiceSettingsCustomField": ( + "stripe.params._subscription_schedule_update_params", + False, + ), "SubscriptionScheduleUpdateParamsPhaseInvoiceSettingsIssuer": ( "stripe.params._subscription_schedule_update_params", False, @@ -27453,6 +27556,10 @@ "stripe.params._token_create_params", False, ), + "TokenCreateParamsAccountCompanyAdministrativeAddress": ( + "stripe.params._token_create_params", + False, + ), "TokenCreateParamsAccountCompanyDirectorshipDeclaration": ( "stripe.params._token_create_params", False, @@ -27461,6 +27568,10 @@ "stripe.params._token_create_params", False, ), + "TokenCreateParamsAccountCompanyPrincipalPlaceOfBusiness": ( + "stripe.params._token_create_params", + False, + ), "TokenCreateParamsAccountCompanyRegistrationDate": ( "stripe.params._token_create_params", False, diff --git a/stripe/params/_account_create_params.py b/stripe/params/_account_create_params.py index 6d3cba9cd..f76d362ff 100644 --- a/stripe/params/_account_create_params.py +++ b/stripe/params/_account_create_params.py @@ -1248,6 +1248,9 @@ class AccountCreateParamsCompany(TypedDict): """ The Kanji variation of the company's primary address (Japan only). """ + administrative_address: NotRequired[ + "AccountCreateParamsCompanyAdministrativeAddress" + ] directors_provided: NotRequired[bool] """ Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. @@ -1302,6 +1305,9 @@ class AccountCreateParamsCompany(TypedDict): """ The company's phone number (used for verification). """ + principal_place_of_business: NotRequired[ + "AccountCreateParamsCompanyPrincipalPlaceOfBusiness" + ] registration_date: NotRequired[ "Literal['']|AccountCreateParamsCompanyRegistrationDate" ] @@ -1433,6 +1439,33 @@ class AccountCreateParamsCompanyAddressKanji(TypedDict): """ +class AccountCreateParamsCompanyAdministrativeAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + + class AccountCreateParamsCompanyDirectorshipDeclaration(TypedDict): date: NotRequired[int] """ @@ -1463,6 +1496,33 @@ class AccountCreateParamsCompanyOwnershipDeclaration(TypedDict): """ +class AccountCreateParamsCompanyPrincipalPlaceOfBusiness(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + + class AccountCreateParamsCompanyRegistrationDate(TypedDict): day: int """ @@ -1622,12 +1682,6 @@ class AccountCreateParamsDocuments(TypedDict): """ One or more documents that demonstrate proof of address. """ - proof_of_registration: NotRequired[ - "AccountCreateParamsDocumentsProofOfRegistration" - ] - """ - One or more documents showing the company's proof of registration with the national business registry. - """ proof_of_ultimate_beneficial_ownership: NotRequired[ "AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnership" ] @@ -1685,26 +1739,6 @@ class AccountCreateParamsDocumentsProofOfAddress(TypedDict): """ -class AccountCreateParamsDocumentsProofOfRegistration(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. - """ - signer: NotRequired[ - "AccountCreateParamsDocumentsProofOfRegistrationSigner" - ] - """ - Information regarding the person signing the document if applicable. - """ - - -class AccountCreateParamsDocumentsProofOfRegistrationSigner(TypedDict): - person: NotRequired[str] - """ - The token of the person signing the document, if applicable. - """ - - class AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnership( TypedDict ): diff --git a/stripe/params/_account_reject_params.py b/stripe/params/_account_reject_params.py index d94d097b1..4e1be3a1a 100644 --- a/stripe/params/_account_reject_params.py +++ b/stripe/params/_account_reject_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from typing import List -from typing_extensions import NotRequired +from typing_extensions import Literal, NotRequired class AccountRejectParams(RequestOptions): @@ -10,6 +10,10 @@ class AccountRejectParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + payouts_action: NotRequired[Literal["none", "pause"]] + """ + Whether to pause payouts on the account as part of the rejection. Defaults to `pause`. Use `none` to leave payouts enabled. + """ reason: str """ The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. diff --git a/stripe/params/_account_session_create_params.py b/stripe/params/_account_session_create_params.py index aa36a9be9..62203dfae 100644 --- a/stripe/params/_account_session_create_params.py +++ b/stripe/params/_account_session_create_params.py @@ -514,6 +514,10 @@ class AccountSessionCreateParamsComponentsDisputesListFeatures(TypedDict): """ Whether sending refunds is enabled. This is `true` by default. """ + smart_disputes_management: NotRequired[bool] + """ + Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to the value of `dispute_management`. + """ class AccountSessionCreateParamsComponentsDocuments(TypedDict): @@ -762,6 +766,10 @@ class AccountSessionCreateParamsComponentsPaymentDetailsFeatures(TypedDict): """ Whether sending refunds is enabled. This is `true` by default. """ + smart_disputes_management: NotRequired[bool] + """ + Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to the value of `dispute_management`. + """ class AccountSessionCreateParamsComponentsPaymentDisputes(TypedDict): @@ -790,6 +798,10 @@ class AccountSessionCreateParamsComponentsPaymentDisputesFeatures(TypedDict): """ Whether sending refunds is enabled. This is `true` by default. """ + smart_disputes_management: NotRequired[bool] + """ + Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to the value of `dispute_management`. + """ class AccountSessionCreateParamsComponentsPaymentMethodSettings(TypedDict): @@ -841,6 +853,10 @@ class AccountSessionCreateParamsComponentsPaymentsFeatures(TypedDict): """ Whether sending refunds is enabled. This is `true` by default. """ + smart_disputes_management: NotRequired[bool] + """ + Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to the value of `dispute_management`. + """ class AccountSessionCreateParamsComponentsPayoutDetails(TypedDict): diff --git a/stripe/params/_account_unreject_params.py b/stripe/params/_account_unreject_params.py new file mode 100644 index 000000000..6ae328d5a --- /dev/null +++ b/stripe/params/_account_unreject_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 AccountUnrejectParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_account_update_params.py b/stripe/params/_account_update_params.py index 319f6cc99..2c23760e2 100644 --- a/stripe/params/_account_update_params.py +++ b/stripe/params/_account_update_params.py @@ -1235,6 +1235,9 @@ class AccountUpdateParamsCompany(TypedDict): """ The Kanji variation of the company's primary address (Japan only). """ + administrative_address: NotRequired[ + "AccountUpdateParamsCompanyAdministrativeAddress" + ] directors_provided: NotRequired[bool] """ Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. @@ -1289,6 +1292,9 @@ class AccountUpdateParamsCompany(TypedDict): """ The company's phone number (used for verification). """ + principal_place_of_business: NotRequired[ + "AccountUpdateParamsCompanyPrincipalPlaceOfBusiness" + ] registration_date: NotRequired[ "Literal['']|AccountUpdateParamsCompanyRegistrationDate" ] @@ -1417,6 +1423,33 @@ class AccountUpdateParamsCompanyAddressKanji(TypedDict): """ +class AccountUpdateParamsCompanyAdministrativeAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + + class AccountUpdateParamsCompanyDirectorshipDeclaration(TypedDict): date: NotRequired[int] """ @@ -1447,6 +1480,33 @@ class AccountUpdateParamsCompanyOwnershipDeclaration(TypedDict): """ +class AccountUpdateParamsCompanyPrincipalPlaceOfBusiness(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + + class AccountUpdateParamsCompanyRegistrationDate(TypedDict): day: int """ @@ -2127,6 +2187,12 @@ class AccountUpdateParamsSettings(TypedDict): """ Settings specific to the PayPay payments method. """ + sepa_debit_payments: NotRequired[ + "AccountUpdateParamsSettingsSepaDebitPayments" + ] + """ + Settings specific to SEPA Direct Debit payments. + """ smart_disputes: NotRequired["AccountUpdateParamsSettingsSmartDisputes"] """ Settings specific to the account's use of Smart Disputes. @@ -2400,6 +2466,13 @@ class AccountUpdateParamsSettingsPaypayPaymentsSiteRestricted(TypedDict): """ +class AccountUpdateParamsSettingsSepaDebitPayments(TypedDict): + creditor_id: NotRequired[str] + """ + The business creditor id for european payments. + """ + + class AccountUpdateParamsSettingsSmartDisputes(TypedDict): auto_respond: NotRequired[ "AccountUpdateParamsSettingsSmartDisputesAutoRespond" diff --git a/stripe/params/_charge_capture_params.py b/stripe/params/_charge_capture_params.py index 6efb47563..b93d10c91 100644 --- a/stripe/params/_charge_capture_params.py +++ b/stripe/params/_charge_capture_params.py @@ -670,15 +670,17 @@ class ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalTax(TypedDict): """ Indicates if the transaction is tax exempt. """ - taxes: NotRequired[ - List["ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTax"] + tax_items: NotRequired[ + List["ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem"] ] """ Array of tax details. """ -class ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTax(TypedDict): +class ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem( + TypedDict +): amount: NotRequired[int] """ Tax amount. @@ -1301,15 +1303,15 @@ class ChargeCaptureParamsPaymentDetailsFlightDatumTotalExtraCharge(TypedDict): class ChargeCaptureParamsPaymentDetailsFlightDatumTotalTax(TypedDict): - taxes: NotRequired[ - List["ChargeCaptureParamsPaymentDetailsFlightDatumTotalTaxTax"] + tax_items: NotRequired[ + List["ChargeCaptureParamsPaymentDetailsFlightDatumTotalTaxTaxItem"] ] """ Array of tax details. """ -class ChargeCaptureParamsPaymentDetailsFlightDatumTotalTaxTax(TypedDict): +class ChargeCaptureParamsPaymentDetailsFlightDatumTotalTaxTaxItem(TypedDict): amount: NotRequired[int] """ Tax amount. @@ -1765,15 +1767,15 @@ class ChargeCaptureParamsPaymentDetailsLodgingDatumTotalTax(TypedDict): """ Indicates whether the transaction is tax exempt. """ - taxes: NotRequired[ - List["ChargeCaptureParamsPaymentDetailsLodgingDatumTotalTaxTax"] + tax_items: NotRequired[ + List["ChargeCaptureParamsPaymentDetailsLodgingDatumTotalTaxTaxItem"] ] """ Tax details. """ -class ChargeCaptureParamsPaymentDetailsLodgingDatumTotalTaxTax(TypedDict): +class ChargeCaptureParamsPaymentDetailsLodgingDatumTotalTaxTaxItem(TypedDict): amount: NotRequired[int] """ Tax amount in cents. diff --git a/stripe/params/_charge_modify_params.py b/stripe/params/_charge_modify_params.py index 3a88ecc68..e5777a73a 100644 --- a/stripe/params/_charge_modify_params.py +++ b/stripe/params/_charge_modify_params.py @@ -674,15 +674,15 @@ class ChargeModifyParamsPaymentDetailsCarRentalDatumTotalTax(TypedDict): """ Indicates if the transaction is tax exempt. """ - taxes: NotRequired[ - List["ChargeModifyParamsPaymentDetailsCarRentalDatumTotalTaxTax"] + tax_items: NotRequired[ + List["ChargeModifyParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem"] ] """ Array of tax details. """ -class ChargeModifyParamsPaymentDetailsCarRentalDatumTotalTaxTax(TypedDict): +class ChargeModifyParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem(TypedDict): amount: NotRequired[int] """ Tax amount. @@ -1301,15 +1301,15 @@ class ChargeModifyParamsPaymentDetailsFlightDatumTotalExtraCharge(TypedDict): class ChargeModifyParamsPaymentDetailsFlightDatumTotalTax(TypedDict): - taxes: NotRequired[ - List["ChargeModifyParamsPaymentDetailsFlightDatumTotalTaxTax"] + tax_items: NotRequired[ + List["ChargeModifyParamsPaymentDetailsFlightDatumTotalTaxTaxItem"] ] """ Array of tax details. """ -class ChargeModifyParamsPaymentDetailsFlightDatumTotalTaxTax(TypedDict): +class ChargeModifyParamsPaymentDetailsFlightDatumTotalTaxTaxItem(TypedDict): amount: NotRequired[int] """ Tax amount. @@ -1765,15 +1765,15 @@ class ChargeModifyParamsPaymentDetailsLodgingDatumTotalTax(TypedDict): """ Indicates whether the transaction is tax exempt. """ - taxes: NotRequired[ - List["ChargeModifyParamsPaymentDetailsLodgingDatumTotalTaxTax"] + tax_items: NotRequired[ + List["ChargeModifyParamsPaymentDetailsLodgingDatumTotalTaxTaxItem"] ] """ Tax details. """ -class ChargeModifyParamsPaymentDetailsLodgingDatumTotalTaxTax(TypedDict): +class ChargeModifyParamsPaymentDetailsLodgingDatumTotalTaxTaxItem(TypedDict): amount: NotRequired[int] """ Tax amount in cents. diff --git a/stripe/params/_charge_update_params.py b/stripe/params/_charge_update_params.py index 474754318..dc401664b 100644 --- a/stripe/params/_charge_update_params.py +++ b/stripe/params/_charge_update_params.py @@ -673,15 +673,15 @@ class ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalTax(TypedDict): """ Indicates if the transaction is tax exempt. """ - taxes: NotRequired[ - List["ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTax"] + tax_items: NotRequired[ + List["ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem"] ] """ Array of tax details. """ -class ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTax(TypedDict): +class ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem(TypedDict): amount: NotRequired[int] """ Tax amount. @@ -1300,15 +1300,15 @@ class ChargeUpdateParamsPaymentDetailsFlightDatumTotalExtraCharge(TypedDict): class ChargeUpdateParamsPaymentDetailsFlightDatumTotalTax(TypedDict): - taxes: NotRequired[ - List["ChargeUpdateParamsPaymentDetailsFlightDatumTotalTaxTax"] + tax_items: NotRequired[ + List["ChargeUpdateParamsPaymentDetailsFlightDatumTotalTaxTaxItem"] ] """ Array of tax details. """ -class ChargeUpdateParamsPaymentDetailsFlightDatumTotalTaxTax(TypedDict): +class ChargeUpdateParamsPaymentDetailsFlightDatumTotalTaxTaxItem(TypedDict): amount: NotRequired[int] """ Tax amount. @@ -1764,15 +1764,15 @@ class ChargeUpdateParamsPaymentDetailsLodgingDatumTotalTax(TypedDict): """ Indicates whether the transaction is tax exempt. """ - taxes: NotRequired[ - List["ChargeUpdateParamsPaymentDetailsLodgingDatumTotalTaxTax"] + tax_items: NotRequired[ + List["ChargeUpdateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem"] ] """ Tax details. """ -class ChargeUpdateParamsPaymentDetailsLodgingDatumTotalTaxTax(TypedDict): +class ChargeUpdateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem(TypedDict): amount: NotRequired[int] """ Tax amount in cents. diff --git a/stripe/params/_confirmation_token_create_params.py b/stripe/params/_confirmation_token_create_params.py index 272c76ea6..8bb668376 100644 --- a/stripe/params/_confirmation_token_create_params.py +++ b/stripe/params/_confirmation_token_create_params.py @@ -663,14 +663,17 @@ class ConfirmationTokenCreateParamsPaymentMethodDataFpx(TypedDict): "bank_muamalat", "bank_of_china", "bank_rakyat", + "bnp_paribas", "bsn", "cimb", + "citibank", "deutsche_bank", "hong_leong_bank", "hsbc", "kfh", "maybank2e", "maybank2u", + "mbsb_bank", "ocbc", "pb_enterprise", "public_bank", diff --git a/stripe/params/_customer_create_params.py b/stripe/params/_customer_create_params.py index 1347134fa..86496478c 100644 --- a/stripe/params/_customer_create_params.py +++ b/stripe/params/_customer_create_params.py @@ -293,6 +293,7 @@ class CustomerCreateParamsTaxIdDatum(TypedDict): "hk_br", "hr_oib", "hu_tin", + "ic_nif", "id_npwp", "il_vat", "in_gst", @@ -358,7 +359,7 @@ class CustomerCreateParamsTaxIdDatum(TypedDict): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_customer_create_tax_id_params.py b/stripe/params/_customer_create_tax_id_params.py index 4bbe642f4..82165dbec 100644 --- a/stripe/params/_customer_create_tax_id_params.py +++ b/stripe/params/_customer_create_tax_id_params.py @@ -64,6 +64,7 @@ class CustomerCreateTaxIdParams(RequestOptions): "hk_br", "hr_oib", "hu_tin", + "ic_nif", "id_npwp", "il_vat", "in_gst", @@ -129,7 +130,7 @@ class CustomerCreateTaxIdParams(RequestOptions): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_customer_tax_id_create_params.py b/stripe/params/_customer_tax_id_create_params.py index e8625ba39..017ae4f32 100644 --- a/stripe/params/_customer_tax_id_create_params.py +++ b/stripe/params/_customer_tax_id_create_params.py @@ -63,6 +63,7 @@ class CustomerTaxIdCreateParams(TypedDict): "hk_br", "hr_oib", "hu_tin", + "ic_nif", "id_npwp", "il_vat", "in_gst", @@ -128,7 +129,7 @@ class CustomerTaxIdCreateParams(TypedDict): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_gift_card_create_params.py b/stripe/params/_gift_card_create_params.py index 4d68da056..67559a586 100644 --- a/stripe/params/_gift_card_create_params.py +++ b/stripe/params/_gift_card_create_params.py @@ -6,7 +6,7 @@ class GiftCardCreateParams(RequestOptions): - brand: Literal["fiserv_valuelink", "givex", "svs"] + brand: Literal["svs"] """ The brand of the gift card. """ diff --git a/stripe/params/_invoice_add_lines_params.py b/stripe/params/_invoice_add_lines_params.py index 1fe465f1e..24f8f084a 100644 --- a/stripe/params/_invoice_add_lines_params.py +++ b/stripe/params/_invoice_add_lines_params.py @@ -284,22 +284,7 @@ class InvoiceAddLinesParamsLineTaxAmountTaxRateData(TypedDict): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] + "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index 353e5bf25..3fc72df42 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -260,6 +260,7 @@ class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): "hk_br", "hr_oib", "hu_tin", + "ic_nif", "id_npwp", "il_vat", "in_gst", @@ -325,7 +326,7 @@ class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ @@ -2507,6 +2508,12 @@ class InvoiceCreatePreviewParamsSubscriptionDetails(TypedDict): """ A list of up to 20 subscription items, each with an attached price. """ + metadata: NotRequired[ + "Literal['']|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`. + """ pause: NotRequired["InvoiceCreatePreviewParamsSubscriptionDetailsPause"] """ Previews the invoice that would be generated when pausing the subscription. Passing an empty hash won't preview pausing and instead returns the next invoice. diff --git a/stripe/params/_invoice_line_item_update_params.py b/stripe/params/_invoice_line_item_update_params.py index 50acf16f6..94003923b 100644 --- a/stripe/params/_invoice_line_item_update_params.py +++ b/stripe/params/_invoice_line_item_update_params.py @@ -268,22 +268,7 @@ class InvoiceLineItemUpdateParamsTaxAmountTaxRateData(TypedDict): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] + "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_invoice_update_lines_params.py b/stripe/params/_invoice_update_lines_params.py index 1c176ed4d..4e8f1a50c 100644 --- a/stripe/params/_invoice_update_lines_params.py +++ b/stripe/params/_invoice_update_lines_params.py @@ -288,22 +288,7 @@ class InvoiceUpdateLinesParamsLineTaxAmountTaxRateData(TypedDict): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] + "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_order_create_params.py b/stripe/params/_order_create_params.py index d6f0ce849..51faf7664 100644 --- a/stripe/params/_order_create_params.py +++ b/stripe/params/_order_create_params.py @@ -2370,6 +2370,7 @@ class OrderCreateParamsTaxDetailsTaxId(TypedDict): "hk_br", "hr_oib", "hu_tin", + "ic_nif", "id_npwp", "il_vat", "in_gst", @@ -2435,7 +2436,7 @@ class OrderCreateParamsTaxDetailsTaxId(TypedDict): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_order_modify_params.py b/stripe/params/_order_modify_params.py index 3ccc4f418..2f03a0701 100644 --- a/stripe/params/_order_modify_params.py +++ b/stripe/params/_order_modify_params.py @@ -2380,6 +2380,7 @@ class OrderModifyParamsTaxDetailsTaxId(TypedDict): "hk_br", "hr_oib", "hu_tin", + "ic_nif", "id_npwp", "il_vat", "in_gst", @@ -2445,7 +2446,7 @@ class OrderModifyParamsTaxDetailsTaxId(TypedDict): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_order_update_params.py b/stripe/params/_order_update_params.py index 3a16dd380..672939aae 100644 --- a/stripe/params/_order_update_params.py +++ b/stripe/params/_order_update_params.py @@ -2379,6 +2379,7 @@ class OrderUpdateParamsTaxDetailsTaxId(TypedDict): "hk_br", "hr_oib", "hu_tin", + "ic_nif", "id_npwp", "il_vat", "in_gst", @@ -2444,7 +2445,7 @@ class OrderUpdateParamsTaxDetailsTaxId(TypedDict): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_payment_intent_capture_params.py b/stripe/params/_payment_intent_capture_params.py index 6b1965b28..ae54e6f2d 100644 --- a/stripe/params/_payment_intent_capture_params.py +++ b/stripe/params/_payment_intent_capture_params.py @@ -1096,9 +1096,9 @@ class PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalTax( """ Indicates if the transaction is tax exempt. """ - taxes: NotRequired[ + tax_items: NotRequired[ List[ - "PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTax" + "PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem" ] ] """ @@ -1106,7 +1106,7 @@ class PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalTax( """ -class PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTax( +class PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem( TypedDict, ): amount: NotRequired[int] @@ -1759,16 +1759,18 @@ class PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalExtraCharge( class PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalTax(TypedDict): - taxes: NotRequired[ - List["PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalTaxTax"] + tax_items: NotRequired[ + List[ + "PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalTaxTaxItem" + ] ] """ Array of tax details. """ -class PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalTaxTax( - TypedDict +class PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalTaxTaxItem( + TypedDict, ): amount: NotRequired[int] """ @@ -2247,15 +2249,17 @@ class PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalTax(TypedDict): """ Indicates whether the transaction is tax exempt. """ - taxes: NotRequired[ - List["PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalTaxTax"] + tax_items: NotRequired[ + List[ + "PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalTaxTaxItem" + ] ] """ Tax details. """ -class PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalTaxTax( +class PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalTaxTaxItem( TypedDict, ): amount: NotRequired[int] diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index 717ed4f6e..9201df553 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -1373,9 +1373,9 @@ class PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalTax( """ Indicates if the transaction is tax exempt. """ - taxes: NotRequired[ + tax_items: NotRequired[ List[ - "PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalTaxTax" + "PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem" ] ] """ @@ -1383,7 +1383,7 @@ class PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalTax( """ -class PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalTaxTax( +class PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem( TypedDict, ): amount: NotRequired[int] @@ -2036,16 +2036,18 @@ class PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalExtraCharge( class PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalTax(TypedDict): - taxes: NotRequired[ - List["PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalTaxTax"] + tax_items: NotRequired[ + List[ + "PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalTaxTaxItem" + ] ] """ Array of tax details. """ -class PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalTaxTax( - TypedDict +class PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalTaxTaxItem( + TypedDict, ): amount: NotRequired[int] """ @@ -2524,15 +2526,17 @@ class PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalTax(TypedDict): """ Indicates whether the transaction is tax exempt. """ - taxes: NotRequired[ - List["PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalTaxTax"] + tax_items: NotRequired[ + List[ + "PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalTaxTaxItem" + ] ] """ Tax details. """ -class PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalTaxTax( +class PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalTaxTaxItem( TypedDict, ): amount: NotRequired[int] @@ -3402,14 +3406,17 @@ class PaymentIntentConfirmParamsPaymentMethodDataFpx(TypedDict): "bank_muamalat", "bank_of_china", "bank_rakyat", + "bnp_paribas", "bsn", "cimb", + "citibank", "deutsche_bank", "hong_leong_bank", "hsbc", "kfh", "maybank2e", "maybank2u", + "mbsb_bank", "ocbc", "pb_enterprise", "public_bank", @@ -6698,6 +6705,16 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPayco(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentConfirmParamsPaymentMethodOptionsPaynow(TypedDict): @@ -7031,6 +7048,16 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsSamsungPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentConfirmParamsPaymentMethodOptionsSatispay(TypedDict): @@ -7502,6 +7529,10 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsZip(TypedDict): class PaymentIntentConfirmParamsRadarOptions(TypedDict): + referrer: NotRequired["Literal['']|str"] + """ + The referrer URL of the current checkout session. You can use this to supply session-level referrer data when a Radar Session isn't available or doesn't contain a referrer. + """ session: NotRequired[str] """ A [Radar Session](https://docs.stripe.com/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index f7ee97d5f..b2c99cf5e 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -1518,9 +1518,9 @@ class PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalTax(TypedDict): """ Indicates if the transaction is tax exempt. """ - taxes: NotRequired[ + tax_items: NotRequired[ List[ - "PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalTaxTax" + "PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem" ] ] """ @@ -1528,7 +1528,7 @@ class PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalTax(TypedDict): """ -class PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalTaxTax( +class PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem( TypedDict, ): amount: NotRequired[int] @@ -2177,15 +2177,19 @@ class PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalExtraCharge( class PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalTax(TypedDict): - taxes: NotRequired[ - List["PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalTaxTax"] + tax_items: NotRequired[ + List[ + "PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalTaxTaxItem" + ] ] """ Array of tax details. """ -class PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalTaxTax(TypedDict): +class PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalTaxTaxItem( + TypedDict, +): amount: NotRequired[int] """ Tax amount. @@ -2663,16 +2667,18 @@ class PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalTax(TypedDict): """ Indicates whether the transaction is tax exempt. """ - taxes: NotRequired[ - List["PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalTaxTax"] + tax_items: NotRequired[ + List[ + "PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem" + ] ] """ Tax details. """ -class PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalTaxTax( - TypedDict +class PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem( + TypedDict, ): amount: NotRequired[int] """ @@ -3535,14 +3541,17 @@ class PaymentIntentCreateParamsPaymentMethodDataFpx(TypedDict): "bank_muamalat", "bank_of_china", "bank_rakyat", + "bnp_paribas", "bsn", "cimb", + "citibank", "deutsche_bank", "hong_leong_bank", "hsbc", "kfh", "maybank2e", "maybank2u", + "mbsb_bank", "ocbc", "pb_enterprise", "public_bank", @@ -6823,6 +6832,16 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPayco(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentCreateParamsPaymentMethodOptionsPaynow(TypedDict): @@ -7156,6 +7175,16 @@ class PaymentIntentCreateParamsPaymentMethodOptionsSamsungPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentCreateParamsPaymentMethodOptionsSatispay(TypedDict): @@ -7638,6 +7667,10 @@ class PaymentIntentCreateParamsPaymentsOrchestration(TypedDict): class PaymentIntentCreateParamsRadarOptions(TypedDict): + referrer: NotRequired["Literal['']|str"] + """ + The referrer URL of the current checkout session. You can use this to supply session-level referrer data when a Radar Session isn't available or doesn't contain a referrer. + """ session: NotRequired[str] """ A [Radar Session](https://docs.stripe.com/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index beb18a823..25c41e1c7 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -1362,9 +1362,9 @@ class PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalTax(TypedDict): """ Indicates if the transaction is tax exempt. """ - taxes: NotRequired[ + tax_items: NotRequired[ List[ - "PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalTaxTax" + "PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem" ] ] """ @@ -1372,7 +1372,7 @@ class PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalTax(TypedDict): """ -class PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalTaxTax( +class PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem( TypedDict, ): amount: NotRequired[int] @@ -2021,15 +2021,19 @@ class PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalExtraCharge( class PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalTax(TypedDict): - taxes: NotRequired[ - List["PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalTaxTax"] + tax_items: NotRequired[ + List[ + "PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalTaxTaxItem" + ] ] """ Array of tax details. """ -class PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalTaxTax(TypedDict): +class PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalTaxTaxItem( + TypedDict, +): amount: NotRequired[int] """ Tax amount. @@ -2507,16 +2511,18 @@ class PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalTax(TypedDict): """ Indicates whether the transaction is tax exempt. """ - taxes: NotRequired[ - List["PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalTaxTax"] + tax_items: NotRequired[ + List[ + "PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalTaxTaxItem" + ] ] """ Tax details. """ -class PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalTaxTax( - TypedDict +class PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalTaxTaxItem( + TypedDict, ): amount: NotRequired[int] """ @@ -3379,14 +3385,17 @@ class PaymentIntentModifyParamsPaymentMethodDataFpx(TypedDict): "bank_muamalat", "bank_of_china", "bank_rakyat", + "bnp_paribas", "bsn", "cimb", + "citibank", "deutsche_bank", "hong_leong_bank", "hsbc", "kfh", "maybank2e", "maybank2u", + "mbsb_bank", "ocbc", "pb_enterprise", "public_bank", @@ -6667,6 +6676,16 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPayco(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentModifyParamsPaymentMethodOptionsPaynow(TypedDict): @@ -7000,6 +7019,16 @@ class PaymentIntentModifyParamsPaymentMethodOptionsSamsungPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentModifyParamsPaymentMethodOptionsSatispay(TypedDict): diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index 6e36a2a03..db5230cbe 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -1361,9 +1361,9 @@ class PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalTax(TypedDict): """ Indicates if the transaction is tax exempt. """ - taxes: NotRequired[ + tax_items: NotRequired[ List[ - "PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTax" + "PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem" ] ] """ @@ -1371,7 +1371,7 @@ class PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalTax(TypedDict): """ -class PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTax( +class PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalTaxTaxItem( TypedDict, ): amount: NotRequired[int] @@ -2020,15 +2020,19 @@ class PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalExtraCharge( class PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalTax(TypedDict): - taxes: NotRequired[ - List["PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalTaxTax"] + tax_items: NotRequired[ + List[ + "PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalTaxTaxItem" + ] ] """ Array of tax details. """ -class PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalTaxTax(TypedDict): +class PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalTaxTaxItem( + TypedDict, +): amount: NotRequired[int] """ Tax amount. @@ -2506,16 +2510,18 @@ class PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalTax(TypedDict): """ Indicates whether the transaction is tax exempt. """ - taxes: NotRequired[ - List["PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalTaxTax"] + tax_items: NotRequired[ + List[ + "PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem" + ] ] """ Tax details. """ -class PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalTaxTax( - TypedDict +class PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalTaxTaxItem( + TypedDict, ): amount: NotRequired[int] """ @@ -3378,14 +3384,17 @@ class PaymentIntentUpdateParamsPaymentMethodDataFpx(TypedDict): "bank_muamalat", "bank_of_china", "bank_rakyat", + "bnp_paribas", "bsn", "cimb", + "citibank", "deutsche_bank", "hong_leong_bank", "hsbc", "kfh", "maybank2e", "maybank2u", + "mbsb_bank", "ocbc", "pb_enterprise", "public_bank", @@ -6666,6 +6675,16 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPayco(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentUpdateParamsPaymentMethodOptionsPaynow(TypedDict): @@ -6999,6 +7018,16 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsSamsungPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentUpdateParamsPaymentMethodOptionsSatispay(TypedDict): diff --git a/stripe/params/_payment_link_modify_params.py b/stripe/params/_payment_link_modify_params.py index fce1554f8..ee799c4b0 100644 --- a/stripe/params/_payment_link_modify_params.py +++ b/stripe/params/_payment_link_modify_params.py @@ -27,6 +27,10 @@ class PaymentLinkModifyParams(RequestOptions): """ Configuration for collecting the customer's billing address. Defaults to `auto`. """ + consent_collection: NotRequired["PaymentLinkModifyParamsConsentCollection"] + """ + Configure fields to gather active consent from customers. + """ custom_fields: NotRequired[ "Literal['']|List[PaymentLinkModifyParamsCustomField]" ] @@ -123,6 +127,12 @@ class PaymentLinkModifyParams(RequestOptions): """ Configuration for collecting the customer's shipping address. """ + shipping_options: NotRequired[ + "Literal['']|List[PaymentLinkModifyParamsShippingOption]" + ] + """ + The shipping rate options to apply to [checkout sessions](https://docs.stripe.com/api/checkout/sessions) created by this payment link. + """ submit_type: NotRequired[ "Literal['auto', 'book', 'donate', 'pay', 'subscribe']|str" ] @@ -194,6 +204,36 @@ class PaymentLinkModifyParamsAutomaticTaxLiability(TypedDict): """ +class PaymentLinkModifyParamsConsentCollection(TypedDict): + payment_method_reuse_agreement: NotRequired[ + "PaymentLinkModifyParamsConsentCollectionPaymentMethodReuseAgreement" + ] + """ + Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. + """ + promotions: NotRequired["Literal['auto', 'none']|str"] + """ + If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + Session will determine whether to display an option to opt into promotional communication + from the merchant depending on the customer's locale. Only available to US merchants and US customers. + """ + terms_of_service: NotRequired["Literal['none', 'required']|str"] + """ + If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + """ + + +class PaymentLinkModifyParamsConsentCollectionPaymentMethodReuseAgreement( + TypedDict, +): + position: Union[Literal["auto", "hidden"], str] + """ + Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's + defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + """ + + class PaymentLinkModifyParamsCustomField(TypedDict): dropdown: NotRequired["PaymentLinkModifyParamsCustomFieldDropdown"] """ @@ -538,6 +578,22 @@ class PaymentLinkModifyParamsPaymentIntentData(TypedDict): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will declaratively set metadata on [Payment Intents](https://docs.stripe.com/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['off_session', 'on_session']|str" + ] + """ + Indicates that you intend to [make future payments](https://docs.stripe.com/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. + + When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. + + When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. + + If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer. + + If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. + + When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. + """ statement_descriptor: NotRequired["Literal['']|str"] """ Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). @@ -854,6 +910,13 @@ class PaymentLinkModifyParamsShippingAddressCollection(TypedDict): """ +class PaymentLinkModifyParamsShippingOption(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the Shipping Rate to use for this shipping option. + """ + + class PaymentLinkModifyParamsSubscriptionData(TypedDict): invoice_settings: NotRequired[ "PaymentLinkModifyParamsSubscriptionDataInvoiceSettings" diff --git a/stripe/params/_payment_link_update_params.py b/stripe/params/_payment_link_update_params.py index 7d573695a..245297022 100644 --- a/stripe/params/_payment_link_update_params.py +++ b/stripe/params/_payment_link_update_params.py @@ -26,6 +26,10 @@ class PaymentLinkUpdateParams(TypedDict): """ Configuration for collecting the customer's billing address. Defaults to `auto`. """ + consent_collection: NotRequired["PaymentLinkUpdateParamsConsentCollection"] + """ + Configure fields to gather active consent from customers. + """ custom_fields: NotRequired[ "Literal['']|List[PaymentLinkUpdateParamsCustomField]" ] @@ -122,6 +126,12 @@ class PaymentLinkUpdateParams(TypedDict): """ Configuration for collecting the customer's shipping address. """ + shipping_options: NotRequired[ + "Literal['']|List[PaymentLinkUpdateParamsShippingOption]" + ] + """ + The shipping rate options to apply to [checkout sessions](https://docs.stripe.com/api/checkout/sessions) created by this payment link. + """ submit_type: NotRequired[ "Literal['auto', 'book', 'donate', 'pay', 'subscribe']|str" ] @@ -193,6 +203,36 @@ class PaymentLinkUpdateParamsAutomaticTaxLiability(TypedDict): """ +class PaymentLinkUpdateParamsConsentCollection(TypedDict): + payment_method_reuse_agreement: NotRequired[ + "PaymentLinkUpdateParamsConsentCollectionPaymentMethodReuseAgreement" + ] + """ + Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. + """ + promotions: NotRequired["Literal['auto', 'none']|str"] + """ + If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + Session will determine whether to display an option to opt into promotional communication + from the merchant depending on the customer's locale. Only available to US merchants and US customers. + """ + terms_of_service: NotRequired["Literal['none', 'required']|str"] + """ + If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + """ + + +class PaymentLinkUpdateParamsConsentCollectionPaymentMethodReuseAgreement( + TypedDict, +): + position: Union[Literal["auto", "hidden"], str] + """ + Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's + defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + """ + + class PaymentLinkUpdateParamsCustomField(TypedDict): dropdown: NotRequired["PaymentLinkUpdateParamsCustomFieldDropdown"] """ @@ -537,6 +577,22 @@ class PaymentLinkUpdateParamsPaymentIntentData(TypedDict): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will declaratively set metadata on [Payment Intents](https://docs.stripe.com/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['off_session', 'on_session']|str" + ] + """ + Indicates that you intend to [make future payments](https://docs.stripe.com/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. + + When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. + + When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. + + If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer. + + If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. + + When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. + """ statement_descriptor: NotRequired["Literal['']|str"] """ Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). @@ -853,6 +909,13 @@ class PaymentLinkUpdateParamsShippingAddressCollection(TypedDict): """ +class PaymentLinkUpdateParamsShippingOption(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the Shipping Rate to use for this shipping option. + """ + + class PaymentLinkUpdateParamsSubscriptionData(TypedDict): invoice_settings: NotRequired[ "PaymentLinkUpdateParamsSubscriptionDataInvoiceSettings" diff --git a/stripe/params/_payment_method_create_params.py b/stripe/params/_payment_method_create_params.py index a198c7205..a2ea57ade 100644 --- a/stripe/params/_payment_method_create_params.py +++ b/stripe/params/_payment_method_create_params.py @@ -548,14 +548,17 @@ class PaymentMethodCreateParamsFpx(TypedDict): "bank_muamalat", "bank_of_china", "bank_rakyat", + "bnp_paribas", "bsn", "cimb", + "citibank", "deutsche_bank", "hong_leong_bank", "hsbc", "kfh", "maybank2e", "maybank2u", + "mbsb_bank", "ocbc", "pb_enterprise", "public_bank", diff --git a/stripe/params/_payment_record_list_params.py b/stripe/params/_payment_record_list_params.py new file mode 100644 index 000000000..684601dbc --- /dev/null +++ b/stripe/params/_payment_record_list_params.py @@ -0,0 +1,32 @@ +# -*- 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 PaymentRecordListParams(RequestOptions): + created_after: NotRequired[int] + """ + Only return Payment Records that were created after this unix timestamp. + """ + created_before: NotRequired[int] + """ + Only return Payment Records that were created before this unix timestamp. + """ + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + 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. + """ diff --git a/stripe/params/_quote_create_params.py b/stripe/params/_quote_create_params.py index dc6cfde08..26fcf09a1 100644 --- a/stripe/params/_quote_create_params.py +++ b/stripe/params/_quote_create_params.py @@ -189,16 +189,41 @@ class QuoteCreateParamsFromQuote(TypedDict): class QuoteCreateParamsInvoiceSettings(TypedDict): + custom_fields: NotRequired[ + "Literal['']|List[QuoteCreateParamsInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ days_until_due: NotRequired[int] """ Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["Literal['']|str"] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired["QuoteCreateParamsInvoiceSettingsIssuer"] """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ +class QuoteCreateParamsInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class QuoteCreateParamsInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ diff --git a/stripe/params/_quote_modify_params.py b/stripe/params/_quote_modify_params.py index 436c35ba2..7218d3893 100644 --- a/stripe/params/_quote_modify_params.py +++ b/stripe/params/_quote_modify_params.py @@ -170,16 +170,41 @@ class QuoteModifyParamsDiscountDiscountEndDuration(TypedDict): class QuoteModifyParamsInvoiceSettings(TypedDict): + custom_fields: NotRequired[ + "Literal['']|List[QuoteModifyParamsInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ days_until_due: NotRequired[int] """ Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["Literal['']|str"] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired["QuoteModifyParamsInvoiceSettingsIssuer"] """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ +class QuoteModifyParamsInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class QuoteModifyParamsInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ diff --git a/stripe/params/_quote_update_params.py b/stripe/params/_quote_update_params.py index e745e4482..c99b3bbf1 100644 --- a/stripe/params/_quote_update_params.py +++ b/stripe/params/_quote_update_params.py @@ -169,16 +169,41 @@ class QuoteUpdateParamsDiscountDiscountEndDuration(TypedDict): class QuoteUpdateParamsInvoiceSettings(TypedDict): + custom_fields: NotRequired[ + "Literal['']|List[QuoteUpdateParamsInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ days_until_due: NotRequired[int] """ Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["Literal['']|str"] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired["QuoteUpdateParamsInvoiceSettingsIssuer"] """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ +class QuoteUpdateParamsInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class QuoteUpdateParamsInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py index 829b2d5d7..8c63a8f0c 100644 --- a/stripe/params/_setup_intent_confirm_params.py +++ b/stripe/params/_setup_intent_confirm_params.py @@ -7,6 +7,114 @@ class SetupIntentConfirmParams(RequestOptions): + allowed_payment_method_types: NotRequired[ + List[ + Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boku_promptpay", + "boleto", + "capchase_pay", + "card", + "cashapp", + "check_scan", + "click_to_pay", + "crypto", + "customer_balance", + "demo_pay", + "duitnow", + "dummy_auth_push", + "dummy_passthrough_card", + "edenred", + "eps", + "fpx", + "gcash", + "getbalance", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "knet", + "konbini", + "kr_card", + "kr_market", + "kriya", + "link", + "mb_way", + "mobilepay", + "momo", + "mondu", + "multibanco", + "naver_pay", + "netbanking", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "nz_bank_account", + "octopus", + "oxxo", + "p24", + "paper_check", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "shop_pay", + "shopeepay", + "sofort", + "south_korea_market", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "test_pay", + "truemoney", + "twint", + "upi", + "us_bank_account", + "us_cash_voucher", + "vipps", + "wechat_pay", + "wero", + "zip", + ], + str, + ] + ] + ] + """ + The list of payment method types to allow for this SetupIntent. Stripe will only use methods in this list when determining the payment methods to offer. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + """ confirmation_token: NotRequired[str] """ ID of the ConfirmationToken used to confirm this SetupIntent. @@ -696,14 +804,17 @@ class SetupIntentConfirmParamsPaymentMethodDataFpx(TypedDict): "bank_muamalat", "bank_of_china", "bank_rakyat", + "bnp_paribas", "bsn", "cimb", + "citibank", "deutsche_bank", "hong_leong_bank", "hsbc", "kfh", "maybank2e", "maybank2u", + "mbsb_bank", "ocbc", "pb_enterprise", "public_bank", diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index 2cbb6b55c..c71ee3b7d 100644 --- a/stripe/params/_setup_intent_create_params.py +++ b/stripe/params/_setup_intent_create_params.py @@ -7,6 +7,114 @@ class SetupIntentCreateParams(RequestOptions): + allowed_payment_method_types: NotRequired[ + List[ + Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boku_promptpay", + "boleto", + "capchase_pay", + "card", + "cashapp", + "check_scan", + "click_to_pay", + "crypto", + "customer_balance", + "demo_pay", + "duitnow", + "dummy_auth_push", + "dummy_passthrough_card", + "edenred", + "eps", + "fpx", + "gcash", + "getbalance", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "knet", + "konbini", + "kr_card", + "kr_market", + "kriya", + "link", + "mb_way", + "mobilepay", + "momo", + "mondu", + "multibanco", + "naver_pay", + "netbanking", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "nz_bank_account", + "octopus", + "oxxo", + "p24", + "paper_check", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "shop_pay", + "shopeepay", + "sofort", + "south_korea_market", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "test_pay", + "truemoney", + "twint", + "upi", + "us_bank_account", + "us_cash_voucher", + "vipps", + "wechat_pay", + "wero", + "zip", + ], + str, + ] + ] + ] + """ + The list of payment method types to allow for this SetupIntent. Stripe will only use methods in this list when determining the payment methods to offer. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + """ attach_to_self: NotRequired[bool] """ If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. @@ -839,14 +947,17 @@ class SetupIntentCreateParamsPaymentMethodDataFpx(TypedDict): "bank_muamalat", "bank_of_china", "bank_rakyat", + "bnp_paribas", "bsn", "cimb", + "citibank", "deutsche_bank", "hong_leong_bank", "hsbc", "kfh", "maybank2e", "maybank2u", + "mbsb_bank", "ocbc", "pb_enterprise", "public_bank", diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index 7a8394ea9..848477419 100644 --- a/stripe/params/_setup_intent_modify_params.py +++ b/stripe/params/_setup_intent_modify_params.py @@ -7,6 +7,12 @@ class SetupIntentModifyParams(RequestOptions): + allowed_payment_method_types: NotRequired[ + "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boku_promptpay', 'boleto', 'capchase_pay', 'card', 'cashapp', 'check_scan', 'click_to_pay', 'crypto', 'customer_balance', 'demo_pay', 'duitnow', 'dummy_auth_push', 'dummy_passthrough_card', 'edenred', 'eps', 'fpx', 'gcash', 'getbalance', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'knet', 'konbini', 'kr_card', 'kr_market', 'kriya', 'link', 'mb_way', 'mobilepay', 'momo', 'mondu', 'multibanco', 'naver_pay', 'netbanking', 'ng_bank', 'ng_bank_transfer', 'ng_card', 'ng_market', 'ng_ussd', 'ng_wallet', 'nz_bank_account', 'octopus', 'oxxo', 'p24', 'paper_check', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shop_pay', 'shopeepay', 'sofort', 'south_korea_market', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'test_pay', 'truemoney', 'twint', 'upi', 'us_bank_account', 'us_cash_voucher', 'vipps', 'wechat_pay', 'wero', 'zip'], str]]" + ] + """ + The list of payment method types to allow for this SetupIntent. Stripe will only use methods in this list when determining the payment methods to offer. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + """ attach_to_self: NotRequired[bool] """ If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. @@ -672,14 +678,17 @@ class SetupIntentModifyParamsPaymentMethodDataFpx(TypedDict): "bank_muamalat", "bank_of_china", "bank_rakyat", + "bnp_paribas", "bsn", "cimb", + "citibank", "deutsche_bank", "hong_leong_bank", "hsbc", "kfh", "maybank2e", "maybank2u", + "mbsb_bank", "ocbc", "pb_enterprise", "public_bank", diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index 52cca2356..e1a6e22c4 100644 --- a/stripe/params/_setup_intent_update_params.py +++ b/stripe/params/_setup_intent_update_params.py @@ -6,6 +6,12 @@ class SetupIntentUpdateParams(TypedDict): + allowed_payment_method_types: NotRequired[ + "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boku_promptpay', 'boleto', 'capchase_pay', 'card', 'cashapp', 'check_scan', 'click_to_pay', 'crypto', 'customer_balance', 'demo_pay', 'duitnow', 'dummy_auth_push', 'dummy_passthrough_card', 'edenred', 'eps', 'fpx', 'gcash', 'getbalance', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'knet', 'konbini', 'kr_card', 'kr_market', 'kriya', 'link', 'mb_way', 'mobilepay', 'momo', 'mondu', 'multibanco', 'naver_pay', 'netbanking', 'ng_bank', 'ng_bank_transfer', 'ng_card', 'ng_market', 'ng_ussd', 'ng_wallet', 'nz_bank_account', 'octopus', 'oxxo', 'p24', 'paper_check', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shop_pay', 'shopeepay', 'sofort', 'south_korea_market', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'test_pay', 'truemoney', 'twint', 'upi', 'us_bank_account', 'us_cash_voucher', 'vipps', 'wechat_pay', 'wero', 'zip'], str]]" + ] + """ + The list of payment method types to allow for this SetupIntent. Stripe will only use methods in this list when determining the payment methods to offer. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + """ attach_to_self: NotRequired[bool] """ If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. @@ -671,14 +677,17 @@ class SetupIntentUpdateParamsPaymentMethodDataFpx(TypedDict): "bank_muamalat", "bank_of_china", "bank_rakyat", + "bnp_paribas", "bsn", "cimb", + "citibank", "deutsche_bank", "hong_leong_bank", "hsbc", "kfh", "maybank2e", "maybank2u", + "mbsb_bank", "ocbc", "pb_enterprise", "public_bank", diff --git a/stripe/params/_subscription_modify_params.py b/stripe/params/_subscription_modify_params.py index f0d93d962..ba9ef4553 100644 --- a/stripe/params/_subscription_modify_params.py +++ b/stripe/params/_subscription_modify_params.py @@ -50,7 +50,7 @@ class SubscriptionModifyParams(RequestOptions): """ cancel_at_period_end: NotRequired[bool] """ - Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). """ cancellation_details: NotRequired[ "SubscriptionModifyParamsCancellationDetails" diff --git a/stripe/params/_subscription_schedule_create_params.py b/stripe/params/_subscription_schedule_create_params.py index 765e2001a..12610523d 100644 --- a/stripe/params/_subscription_schedule_create_params.py +++ b/stripe/params/_subscription_schedule_create_params.py @@ -261,10 +261,15 @@ class SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettings( """ The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsCustomField]" + ] days_until_due: NotRequired[int] """ Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. """ + description: NotRequired["Literal['']|str"] + footer: NotRequired["Literal['']|str"] issuer: NotRequired[ "SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer" ] @@ -273,6 +278,19 @@ class SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettings( """ +class SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsCustomField( + TypedDict, +): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer( TypedDict, ): @@ -892,10 +910,24 @@ class SubscriptionScheduleCreateParamsPhaseInvoiceSettings(TypedDict): """ The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionScheduleCreateParamsPhaseInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ days_until_due: NotRequired[int] """ Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["Literal['']|str"] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired[ "SubscriptionScheduleCreateParamsPhaseInvoiceSettingsIssuer" ] @@ -904,6 +936,19 @@ class SubscriptionScheduleCreateParamsPhaseInvoiceSettings(TypedDict): """ +class SubscriptionScheduleCreateParamsPhaseInvoiceSettingsCustomField( + TypedDict, +): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class SubscriptionScheduleCreateParamsPhaseInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ diff --git a/stripe/params/_subscription_schedule_modify_params.py b/stripe/params/_subscription_schedule_modify_params.py index c214f0b5d..3d75a29ad 100644 --- a/stripe/params/_subscription_schedule_modify_params.py +++ b/stripe/params/_subscription_schedule_modify_params.py @@ -229,10 +229,15 @@ class SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettings( """ The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsCustomField]" + ] days_until_due: NotRequired[int] """ Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. """ + description: NotRequired["Literal['']|str"] + footer: NotRequired["Literal['']|str"] issuer: NotRequired[ "SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsIssuer" ] @@ -241,6 +246,19 @@ class SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettings( """ +class SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsCustomField( + TypedDict, +): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsIssuer( TypedDict, ): @@ -868,10 +886,24 @@ class SubscriptionScheduleModifyParamsPhaseInvoiceSettings(TypedDict): """ The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionScheduleModifyParamsPhaseInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ days_until_due: NotRequired[int] """ Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["Literal['']|str"] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired[ "SubscriptionScheduleModifyParamsPhaseInvoiceSettingsIssuer" ] @@ -880,6 +912,19 @@ class SubscriptionScheduleModifyParamsPhaseInvoiceSettings(TypedDict): """ +class SubscriptionScheduleModifyParamsPhaseInvoiceSettingsCustomField( + TypedDict, +): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class SubscriptionScheduleModifyParamsPhaseInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ diff --git a/stripe/params/_subscription_schedule_update_params.py b/stripe/params/_subscription_schedule_update_params.py index 0f6b69b75..8e2e2d2d4 100644 --- a/stripe/params/_subscription_schedule_update_params.py +++ b/stripe/params/_subscription_schedule_update_params.py @@ -228,10 +228,15 @@ class SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettings( """ The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsCustomField]" + ] days_until_due: NotRequired[int] """ Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. """ + description: NotRequired["Literal['']|str"] + footer: NotRequired["Literal['']|str"] issuer: NotRequired[ "SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsIssuer" ] @@ -240,6 +245,19 @@ class SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettings( """ +class SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsCustomField( + TypedDict, +): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsIssuer( TypedDict, ): @@ -867,10 +885,24 @@ class SubscriptionScheduleUpdateParamsPhaseInvoiceSettings(TypedDict): """ The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionScheduleUpdateParamsPhaseInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ days_until_due: NotRequired[int] """ Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["Literal['']|str"] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired[ "SubscriptionScheduleUpdateParamsPhaseInvoiceSettingsIssuer" ] @@ -879,6 +911,19 @@ class SubscriptionScheduleUpdateParamsPhaseInvoiceSettings(TypedDict): """ +class SubscriptionScheduleUpdateParamsPhaseInvoiceSettingsCustomField( + TypedDict, +): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class SubscriptionScheduleUpdateParamsPhaseInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ diff --git a/stripe/params/_subscription_update_params.py b/stripe/params/_subscription_update_params.py index 62bdaf1c4..2440a1594 100644 --- a/stripe/params/_subscription_update_params.py +++ b/stripe/params/_subscription_update_params.py @@ -49,7 +49,7 @@ class SubscriptionUpdateParams(TypedDict): """ cancel_at_period_end: NotRequired[bool] """ - Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). """ cancellation_details: NotRequired[ "SubscriptionUpdateParamsCancellationDetails" diff --git a/stripe/params/_tax_id_create_params.py b/stripe/params/_tax_id_create_params.py index 5b88345eb..c526f282e 100644 --- a/stripe/params/_tax_id_create_params.py +++ b/stripe/params/_tax_id_create_params.py @@ -68,6 +68,7 @@ class TaxIdCreateParams(RequestOptions): "hk_br", "hr_oib", "hu_tin", + "ic_nif", "id_npwp", "il_vat", "in_gst", @@ -133,7 +134,7 @@ class TaxIdCreateParams(RequestOptions): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_tax_rate_create_params.py b/stripe/params/_tax_rate_create_params.py index 7a8b002e3..fd468e032 100644 --- a/stripe/params/_tax_rate_create_params.py +++ b/stripe/params/_tax_rate_create_params.py @@ -48,22 +48,7 @@ class TaxRateCreateParams(RequestOptions): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] + "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_tax_rate_modify_params.py b/stripe/params/_tax_rate_modify_params.py index bea321063..f80102138 100644 --- a/stripe/params/_tax_rate_modify_params.py +++ b/stripe/params/_tax_rate_modify_params.py @@ -42,22 +42,7 @@ class TaxRateModifyParams(RequestOptions): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] + "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_tax_rate_update_params.py b/stripe/params/_tax_rate_update_params.py index 0e87ed93d..6b7fff635 100644 --- a/stripe/params/_tax_rate_update_params.py +++ b/stripe/params/_tax_rate_update_params.py @@ -41,22 +41,7 @@ class TaxRateUpdateParams(TypedDict): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] + "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_token_create_params.py b/stripe/params/_token_create_params.py index 4d3ab4d26..7e224db68 100644 --- a/stripe/params/_token_create_params.py +++ b/stripe/params/_token_create_params.py @@ -75,6 +75,9 @@ class TokenCreateParamsAccountCompany(TypedDict): """ The Kanji variation of the company's primary address (Japan only). """ + administrative_address: NotRequired[ + "TokenCreateParamsAccountCompanyAdministrativeAddress" + ] directors_provided: NotRequired[bool] """ Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. @@ -133,6 +136,9 @@ class TokenCreateParamsAccountCompany(TypedDict): """ The company's phone number (used for verification). """ + principal_place_of_business: NotRequired[ + "TokenCreateParamsAccountCompanyPrincipalPlaceOfBusiness" + ] registration_date: NotRequired[ "Literal['']|TokenCreateParamsAccountCompanyRegistrationDate" ] @@ -264,6 +270,33 @@ class TokenCreateParamsAccountCompanyAddressKanji(TypedDict): """ +class TokenCreateParamsAccountCompanyAdministrativeAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + + class TokenCreateParamsAccountCompanyDirectorshipDeclaration(TypedDict): date: NotRequired[int] """ @@ -294,6 +327,33 @@ class TokenCreateParamsAccountCompanyOwnershipDeclaration(TypedDict): """ +class TokenCreateParamsAccountCompanyPrincipalPlaceOfBusiness(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + + class TokenCreateParamsAccountCompanyRegistrationDate(TypedDict): day: int """ diff --git a/stripe/params/_webhook_endpoint_create_params.py b/stripe/params/_webhook_endpoint_create_params.py index 5a189907e..6ad1c852b 100644 --- a/stripe/params/_webhook_endpoint_create_params.py +++ b/stripe/params/_webhook_endpoint_create_params.py @@ -134,6 +134,7 @@ class WebhookEndpointCreateParams(RequestOptions): "2026-04-22.dahlia", "2026-05-27.dahlia", "2026-06-24.dahlia", + "2026-07-29.dahlia", ] ] """ diff --git a/stripe/params/billing/__init__.py b/stripe/params/billing/__init__.py index cbaf832bb..f07f676fc 100644 --- a/stripe/params/billing/__init__.py +++ b/stripe/params/billing/__init__.py @@ -54,6 +54,7 @@ CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope as CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope, CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopeBillableItem as CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopeBillableItem, CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice as CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice, + CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopeRateCard as CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopeRateCard, ) from stripe.params.billing._credit_balance_transaction_list_params import ( CreditBalanceTransactionListParams as CreditBalanceTransactionListParams, @@ -70,6 +71,7 @@ CreditGrantCreateParamsApplicabilityConfigScope as CreditGrantCreateParamsApplicabilityConfigScope, CreditGrantCreateParamsApplicabilityConfigScopeBillableItem as CreditGrantCreateParamsApplicabilityConfigScopeBillableItem, CreditGrantCreateParamsApplicabilityConfigScopePrice as CreditGrantCreateParamsApplicabilityConfigScopePrice, + CreditGrantCreateParamsApplicabilityConfigScopeRateCard as CreditGrantCreateParamsApplicabilityConfigScopeRateCard, ) from stripe.params.billing._credit_grant_expire_params import ( CreditGrantExpireParams as CreditGrantExpireParams, @@ -252,6 +254,10 @@ "stripe.params.billing._credit_balance_summary_retrieve_params", False, ), + "CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopeRateCard": ( + "stripe.params.billing._credit_balance_summary_retrieve_params", + False, + ), "CreditBalanceTransactionListParams": ( "stripe.params.billing._credit_balance_transaction_list_params", False, @@ -292,6 +298,10 @@ "stripe.params.billing._credit_grant_create_params", False, ), + "CreditGrantCreateParamsApplicabilityConfigScopeRateCard": ( + "stripe.params.billing._credit_grant_create_params", + False, + ), "CreditGrantExpireParams": ( "stripe.params.billing._credit_grant_expire_params", False, diff --git a/stripe/params/billing/_credit_balance_summary_retrieve_params.py b/stripe/params/billing/_credit_balance_summary_retrieve_params.py index 770631695..be88ad9b6 100644 --- a/stripe/params/billing/_credit_balance_summary_retrieve_params.py +++ b/stripe/params/billing/_credit_balance_summary_retrieve_params.py @@ -60,6 +60,14 @@ class CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope(TypedDict): """ A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. Limit 20 prices. """ + rate_cards: NotRequired[ + List[ + "CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopeRateCard" + ] + ] + """ + A list of rate cards that the credit grant can apply to. The credit grant applies to any metered item billed under one of these rate cards. Cannot be used in combination with `price_type`, `prices`, or `billable_items`. + """ class CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopeBillableItem( @@ -78,3 +86,12 @@ class CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice( """ The price ID this credit grant should apply to. """ + + +class CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopeRateCard( + TypedDict, +): + id: str + """ + The rate card ID this credit grant should apply to. + """ diff --git a/stripe/params/billing/_credit_grant_create_params.py b/stripe/params/billing/_credit_grant_create_params.py index cc700190b..831f4eb02 100644 --- a/stripe/params/billing/_credit_grant_create_params.py +++ b/stripe/params/billing/_credit_grant_create_params.py @@ -117,6 +117,12 @@ class CreditGrantCreateParamsApplicabilityConfigScope(TypedDict): """ A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. Limit 20 prices. """ + rate_cards: NotRequired[ + List["CreditGrantCreateParamsApplicabilityConfigScopeRateCard"] + ] + """ + A list of rate cards that the credit grant can apply to. The credit grant applies to any metered item billed under one of these rate cards. Cannot be used in combination with `price_type`, `prices`, or `billable_items`. + """ class CreditGrantCreateParamsApplicabilityConfigScopeBillableItem(TypedDict): @@ -131,3 +137,10 @@ class CreditGrantCreateParamsApplicabilityConfigScopePrice(TypedDict): """ The price ID this credit grant should apply to. """ + + +class CreditGrantCreateParamsApplicabilityConfigScopeRateCard(TypedDict): + id: str + """ + The rate card ID this credit grant should apply to. + """ diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index 240598530..bf15b88cb 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -1166,10 +1166,6 @@ class SessionCreateParamsLineItem(TypedDict): """ When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. """ - dynamic_tax_rates: NotRequired[List[str]] - """ - The [tax rates](https://docs.stripe.com/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU. You can't set this parameter if `ui_mode` is `custom`. - """ 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`. @@ -2505,6 +2501,16 @@ class SessionCreateParamsPaymentMethodOptionsPayco(TypedDict): """ Controls when the funds will be captured from the customer's account. """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class SessionCreateParamsPaymentMethodOptionsPaynow(TypedDict): @@ -2703,6 +2709,16 @@ class SessionCreateParamsPaymentMethodOptionsSamsungPay(TypedDict): """ Controls when the funds will be captured from the customer's account. """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class SessionCreateParamsPaymentMethodOptionsSatispay(TypedDict): diff --git a/stripe/params/crypto/_deposit_address_create_params.py b/stripe/params/crypto/_deposit_address_create_params.py index 3709ea705..cae8065a4 100644 --- a/stripe/params/crypto/_deposit_address_create_params.py +++ b/stripe/params/crypto/_deposit_address_create_params.py @@ -8,9 +8,18 @@ class DepositAddressCreateParams(RequestOptions): customer: NotRequired[str] + """ + If set, this deposit address is scoped to a [Customer](https://docs.stripe.com/api/customers/object) and can only receive funds from that customer. Otherwise, this deposit address can receive funds from any customer. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. """ 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. + """ network: Literal["base", "solana", "tempo"] + """ + The blockchain network to generate a deposit address for. + """ diff --git a/stripe/params/crypto/_deposit_address_list_params.py b/stripe/params/crypto/_deposit_address_list_params.py index dc37d73c1..85c1e2140 100644 --- a/stripe/params/crypto/_deposit_address_list_params.py +++ b/stripe/params/crypto/_deposit_address_list_params.py @@ -7,8 +7,17 @@ class DepositAddressListParams(RequestOptions): address: NotRequired[str] + """ + Only return the deposit address matching this on-chain address. + """ customer: NotRequired[str] + """ + Only return deposit addresses scoped to this [Customer](https://docs.stripe.com/api/customers/object). + """ customer_account: NotRequired[str] + """ + Only return deposit addresses belonging to this customer account. + """ ending_before: NotRequired[str] """ A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. @@ -22,6 +31,9 @@ class DepositAddressListParams(RequestOptions): A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. """ network: NotRequired[Literal["base", "solana", "tempo"]] + """ + Only return deposit addresses for this blockchain network. + """ starting_after: NotRequired[str] """ 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. diff --git a/stripe/params/crypto/_onramp_session_create_params.py b/stripe/params/crypto/_onramp_session_create_params.py index fb5ec6e29..8b5eff8a4 100644 --- a/stripe/params/crypto/_onramp_session_create_params.py +++ b/stripe/params/crypto/_onramp_session_create_params.py @@ -48,7 +48,7 @@ class OnrampSessionCreateParams(RequestOptions): * When set, if `destination_currencies` is also set, the value of `destination_currency` must be present in that array. To lock a `destination_currency`, specify that value as the single value for `destination_currencies`. Users can select a different cryptocurrency in the onramp UI subject to `destination_currencies` if set. """ destination_network: NotRequired[ - "Literal['avalanche', 'base', 'bitcoin', 'ethereum', 'optimism', 'polygon', 'solana', 'stellar', 'sui', 'worldchain']|str" + "Literal['avalanche', 'base', 'bitcoin', 'ethereum', 'optimism', 'polygon', 'solana', 'stellar', 'sui', 'tempo', 'worldchain']|str" ] """ The default destination crypto network. @@ -69,6 +69,7 @@ class OnrampSessionCreateParams(RequestOptions): "solana", "stellar", "sui", + "tempo", "worldchain", ], str, diff --git a/stripe/params/crypto/_onramp_session_list_params.py b/stripe/params/crypto/_onramp_session_list_params.py index a6a5bae19..fab1dbd90 100644 --- a/stripe/params/crypto/_onramp_session_list_params.py +++ b/stripe/params/crypto/_onramp_session_list_params.py @@ -17,7 +17,7 @@ class OnrampSessionListParams(RequestOptions): The destination cryptocurrency to filter by. """ destination_network: NotRequired[ - "Literal['avalanche', 'base', 'bitcoin', 'ethereum', 'optimism', 'polygon', 'solana', 'stellar', 'sui', 'worldchain']|str" + "Literal['avalanche', 'base', 'bitcoin', 'ethereum', 'optimism', 'polygon', 'solana', 'stellar', 'sui', 'tempo', 'worldchain']|str" ] """ The destination blockchain network to filter by. diff --git a/stripe/params/crypto/_onramp_transaction_limits_retrieve_params.py b/stripe/params/crypto/_onramp_transaction_limits_retrieve_params.py index ff582c65f..aa91da517 100644 --- a/stripe/params/crypto/_onramp_transaction_limits_retrieve_params.py +++ b/stripe/params/crypto/_onramp_transaction_limits_retrieve_params.py @@ -11,7 +11,7 @@ class OnrampTransactionLimitsRetrieveParams(RequestOptions): The IP address of the customer requesting transaction limits. We support IPv4 and IPv6 addresses. """ destination_network: NotRequired[ - "Literal['avalanche', 'base', 'bitcoin', 'ethereum', 'optimism', 'polygon', 'solana', 'stellar', 'sui', 'worldchain']|str" + "Literal['avalanche', 'base', 'bitcoin', 'ethereum', 'optimism', 'polygon', 'solana', 'stellar', 'sui', 'tempo', 'worldchain']|str" ] """ The destination blockchain network to use for limit calculations. diff --git a/stripe/params/financial_connections/_session_create_params.py b/stripe/params/financial_connections/_session_create_params.py index 752a55aa4..d74f466f0 100644 --- a/stripe/params/financial_connections/_session_create_params.py +++ b/stripe/params/financial_connections/_session_create_params.py @@ -113,6 +113,12 @@ class SessionCreateParamsFilters(TypedDict): """ Stripe ID of the institution with which the customer should be directed to log in. """ + require_payment_method_support: NotRequired[ + Literal["all", "at_least_one", "none"] + ] + """ + Whether the session should require payment method support and successful account number retrieval before completion. + """ class SessionCreateParamsHosted(TypedDict): @@ -130,7 +136,7 @@ class SessionCreateParamsLimits(TypedDict): class SessionCreateParamsManualEntry(TypedDict): - mode: NotRequired[Literal["automatic", "custom"]] + mode: NotRequired["Literal['automatic', 'custom', 'disabled']|str"] """ How manual entry should be handled. """ diff --git a/stripe/params/issuing/_card_create_params.py b/stripe/params/issuing/_card_create_params.py index 3b7af6972..34d166899 100644 --- a/stripe/params/issuing/_card_create_params.py +++ b/stripe/params/issuing/_card_create_params.py @@ -47,6 +47,10 @@ class CardCreateParams(RequestOptions): """ The desired PIN for this card. """ + product_code: NotRequired[str] + """ + The product code to request via product graduation. + """ replacement_for: NotRequired[str] """ The card this is meant to be a replacement for (if any). @@ -111,6 +115,10 @@ class CardCreateParamsShipping(TypedDict): """ Address validation settings. """ + business_name: NotRequired[str] + """ + The name of the business at the shipping address, used on the shipping label to ensure delivery when the card is shipped to a cardholder's workplace. Allowed characters: `A-Z`, `a-z`, `0-9`, ` `, `.`, `-`. All other characters are stripped or ASCII-normalized when printed. + """ customs: NotRequired["CardCreateParamsShippingCustoms"] """ Customs information for the shipment. diff --git a/stripe/params/issuing/_card_modify_params.py b/stripe/params/issuing/_card_modify_params.py index 0fa94b9cb..eb72afa6c 100644 --- a/stripe/params/issuing/_card_modify_params.py +++ b/stripe/params/issuing/_card_modify_params.py @@ -26,6 +26,10 @@ class CardModifyParams(RequestOptions): """ The desired new PIN for this card. """ + product_code: NotRequired[str] + """ + The product code to request via product graduation. + """ shipping: NotRequired["CardModifyParamsShipping"] """ Updated shipping information for the card. @@ -58,6 +62,10 @@ class CardModifyParamsShipping(TypedDict): """ Address validation settings. """ + business_name: NotRequired[str] + """ + The name of the business at the shipping address, used on the shipping label to ensure delivery when the card is shipped to a cardholder's workplace. Allowed characters: `A-Z`, `a-z`, `0-9`, ` `, `.`, `-`. All other characters are stripped or ASCII-normalized when printed. + """ customs: NotRequired["CardModifyParamsShippingCustoms"] """ Customs information for the shipment. diff --git a/stripe/params/issuing/_card_update_params.py b/stripe/params/issuing/_card_update_params.py index 25f5c719c..a95d34b5e 100644 --- a/stripe/params/issuing/_card_update_params.py +++ b/stripe/params/issuing/_card_update_params.py @@ -25,6 +25,10 @@ class CardUpdateParams(TypedDict): """ The desired new PIN for this card. """ + product_code: NotRequired[str] + """ + The product code to request via product graduation. + """ shipping: NotRequired["CardUpdateParamsShipping"] """ Updated shipping information for the card. @@ -57,6 +61,10 @@ class CardUpdateParamsShipping(TypedDict): """ Address validation settings. """ + business_name: NotRequired[str] + """ + The name of the business at the shipping address, used on the shipping label to ensure delivery when the card is shipped to a cardholder's workplace. Allowed characters: `A-Z`, `a-z`, `0-9`, ` `, `.`, `-`. All other characters are stripped or ASCII-normalized when printed. + """ customs: NotRequired["CardUpdateParamsShippingCustoms"] """ Customs information for the shipment. diff --git a/stripe/params/issuing/_cardholder_modify_params.py b/stripe/params/issuing/_cardholder_modify_params.py index 0688583cd..925b4bd1e 100644 --- a/stripe/params/issuing/_cardholder_modify_params.py +++ b/stripe/params/issuing/_cardholder_modify_params.py @@ -31,6 +31,10 @@ class CardholderModifyParams(RequestOptions): """ 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`. """ + name: NotRequired[str] + """ + The cardholder's name. This will be printed on cards issued to them. + """ phone_number: NotRequired[str] """ The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://docs.stripe.com/issuing/3d-secure) for more details. diff --git a/stripe/params/issuing/_cardholder_update_params.py b/stripe/params/issuing/_cardholder_update_params.py index 9a785f496..f2370ead3 100644 --- a/stripe/params/issuing/_cardholder_update_params.py +++ b/stripe/params/issuing/_cardholder_update_params.py @@ -30,6 +30,10 @@ class CardholderUpdateParams(TypedDict): """ 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`. """ + name: NotRequired[str] + """ + The cardholder's name. This will be printed on cards issued to them. + """ phone_number: NotRequired[str] """ The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://docs.stripe.com/issuing/3d-secure) for more details. diff --git a/stripe/params/product_catalog/__init__.py b/stripe/params/product_catalog/__init__.py index f07d44c67..924165051 100644 --- a/stripe/params/product_catalog/__init__.py +++ b/stripe/params/product_catalog/__init__.py @@ -11,6 +11,13 @@ TrialOfferCreateParamsEndBehavior as TrialOfferCreateParamsEndBehavior, TrialOfferCreateParamsEndBehaviorTransition as TrialOfferCreateParamsEndBehaviorTransition, ) + from stripe.params.product_catalog._trial_offer_list_params import ( + TrialOfferListParams as TrialOfferListParams, + TrialOfferListParamsCreated as TrialOfferListParamsCreated, + ) + from stripe.params.product_catalog._trial_offer_retrieve_params import ( + TrialOfferRetrieveParams as TrialOfferRetrieveParams, + ) # name -> (import_target, is_submodule) _import_map = { @@ -34,6 +41,18 @@ "stripe.params.product_catalog._trial_offer_create_params", False, ), + "TrialOfferListParams": ( + "stripe.params.product_catalog._trial_offer_list_params", + False, + ), + "TrialOfferListParamsCreated": ( + "stripe.params.product_catalog._trial_offer_list_params", + False, + ), + "TrialOfferRetrieveParams": ( + "stripe.params.product_catalog._trial_offer_retrieve_params", + False, + ), } if not TYPE_CHECKING: diff --git a/stripe/params/product_catalog/_trial_offer_list_params.py b/stripe/params/product_catalog/_trial_offer_list_params.py new file mode 100644 index 000000000..4f33248cb --- /dev/null +++ b/stripe/params/product_catalog/_trial_offer_list_params.py @@ -0,0 +1,51 @@ +# -*- 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 TrialOfferListParams(RequestOptions): + created: NotRequired["TrialOfferListParamsCreated|int"] + """ + Only return trial offers that were created during the given date interval. + """ + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + prices: NotRequired[List[str]] + """ + Only return trial offers that reference these prices (during the trial period). + """ + starting_after: NotRequired[str] + """ + 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. + """ + + +class TrialOfferListParamsCreated(TypedDict): + gt: NotRequired[int] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired[int] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired[int] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired[int] + """ + Maximum value to filter by (inclusive) + """ diff --git a/stripe/params/product_catalog/_trial_offer_retrieve_params.py b/stripe/params/product_catalog/_trial_offer_retrieve_params.py new file mode 100644 index 000000000..ea22d8d8e --- /dev/null +++ b/stripe/params/product_catalog/_trial_offer_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 TrialOfferRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/radar/_payment_evaluation_create_params.py b/stripe/params/radar/_payment_evaluation_create_params.py index 85dc07e8b..186a30852 100644 --- a/stripe/params/radar/_payment_evaluation_create_params.py +++ b/stripe/params/radar/_payment_evaluation_create_params.py @@ -170,7 +170,7 @@ class PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetails( "PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsCard" ] """ - Masked PAN card details to use as an alternative to a payment_method token. + Masked/raw PAN card details to use as an alternative to a payment_method token. """ payment_method: str """ @@ -233,6 +233,10 @@ class PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDeta class PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsCard( TypedDict, ): + cvc: NotRequired[str] + """ + The CVC of the card. + """ exp_month: int """ Two-digit number representing the card's expiration month. @@ -241,14 +245,18 @@ class PaymentEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsCard( """ Four-digit number representing the card's expiration year. """ - first6: str + first6: NotRequired[str] """ First six digits of the card number. """ - last4: str + last4: NotRequired[str] """ Last four digits of the card number. """ + number: NotRequired[str] + """ + The card number, as a string without any separators. + """ class PaymentEvaluationCreateParamsPaymentDetailsShippingDetails(TypedDict): diff --git a/stripe/params/shared_payment/_issued_token_create_params.py b/stripe/params/shared_payment/_issued_token_create_params.py index cc8850e45..3d13d18f4 100644 --- a/stripe/params/shared_payment/_issued_token_create_params.py +++ b/stripe/params/shared_payment/_issued_token_create_params.py @@ -35,6 +35,10 @@ class IssuedTokenCreateParams(RequestOptions): """ Limits on how this SharedPaymentToken can be used. """ + use_stripe_sdk: NotRequired[bool] + """ + Set to true when using Stripe.js, iOS, or Android client-side SDKs to handle next actions. + """ class IssuedTokenCreateParamsSellerDetails(TypedDict): diff --git a/stripe/params/tax/__init__.py b/stripe/params/tax/__init__.py index b68a798eb..dd4d5c35e 100644 --- a/stripe/params/tax/__init__.py +++ b/stripe/params/tax/__init__.py @@ -210,6 +210,8 @@ RegistrationCreateParamsCountryOptionsUsLocalAmusementTax as RegistrationCreateParamsCountryOptionsUsLocalAmusementTax, RegistrationCreateParamsCountryOptionsUsLocalLeaseTax as RegistrationCreateParamsCountryOptionsUsLocalLeaseTax, RegistrationCreateParamsCountryOptionsUsLuxuryTax as RegistrationCreateParamsCountryOptionsUsLuxuryTax, + RegistrationCreateParamsCountryOptionsUsMassTransitParkingTax as RegistrationCreateParamsCountryOptionsUsMassTransitParkingTax, + RegistrationCreateParamsCountryOptionsUsParkingTax as RegistrationCreateParamsCountryOptionsUsParkingTax, RegistrationCreateParamsCountryOptionsUsResortTax as RegistrationCreateParamsCountryOptionsUsResortTax, RegistrationCreateParamsCountryOptionsUsStateSalesTax as RegistrationCreateParamsCountryOptionsUsStateSalesTax, RegistrationCreateParamsCountryOptionsUsStateSalesTaxElection as RegistrationCreateParamsCountryOptionsUsStateSalesTaxElection, @@ -988,6 +990,14 @@ "stripe.params.tax._registration_create_params", False, ), + "RegistrationCreateParamsCountryOptionsUsMassTransitParkingTax": ( + "stripe.params.tax._registration_create_params", + False, + ), + "RegistrationCreateParamsCountryOptionsUsParkingTax": ( + "stripe.params.tax._registration_create_params", + False, + ), "RegistrationCreateParamsCountryOptionsUsResortTax": ( "stripe.params.tax._registration_create_params", False, diff --git a/stripe/params/tax/_calculation_create_params.py b/stripe/params/tax/_calculation_create_params.py index 3a96478c0..fae170d1b 100644 --- a/stripe/params/tax/_calculation_create_params.py +++ b/stripe/params/tax/_calculation_create_params.py @@ -37,7 +37,7 @@ class CalculationCreateParams(RequestOptions): """ tax_date: NotRequired[int] """ - Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future. + The calculation uses the tax rules and rates that are in effect at this timestamp. You can use a date up to 31 days in the past or up to 31 days in the future. If you use a future date, Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules and rate that will be in effect on that date. We deploy tax changes before their effective date, but not within a fixed window. """ @@ -148,6 +148,7 @@ class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): "hk_br", "hr_oib", "hu_tin", + "ic_nif", "id_npwp", "il_vat", "in_gst", @@ -213,7 +214,7 @@ class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): "zw_tin", ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/tax/_registration_create_params.py b/stripe/params/tax/_registration_create_params.py index 62e728e33..2c58715ca 100644 --- a/stripe/params/tax/_registration_create_params.py +++ b/stripe/params/tax/_registration_create_params.py @@ -1866,6 +1866,18 @@ class RegistrationCreateParamsCountryOptionsUs(TypedDict): """ Options for the luxury tax registration. """ + mass_transit_parking_tax: NotRequired[ + "RegistrationCreateParamsCountryOptionsUsMassTransitParkingTax" + ] + """ + Options for the mass transit parking tax registration. + """ + parking_tax: NotRequired[ + "RegistrationCreateParamsCountryOptionsUsParkingTax" + ] + """ + Options for the parking tax registration. + """ resort_tax: NotRequired[ "RegistrationCreateParamsCountryOptionsUsResortTax" ] @@ -1974,6 +1986,20 @@ class RegistrationCreateParamsCountryOptionsUsLuxuryTax(TypedDict): """ +class RegistrationCreateParamsCountryOptionsUsMassTransitParkingTax(TypedDict): + jurisdiction: str + """ + A jurisdiction code representing the [local jurisdiction](https://docs.stripe.com/tax/registering?type=mass_transit_parking_tax#registration-types). + """ + + +class RegistrationCreateParamsCountryOptionsUsParkingTax(TypedDict): + jurisdiction: str + """ + A jurisdiction code representing the [local jurisdiction](https://docs.stripe.com/tax/registering?type=parking_tax#registration-types). + """ + + class RegistrationCreateParamsCountryOptionsUsResortTax(TypedDict): jurisdiction: str """ diff --git a/stripe/params/terminal/__init__.py b/stripe/params/terminal/__init__.py index d1610dcab..6ee6272ea 100644 --- a/stripe/params/terminal/__init__.py +++ b/stripe/params/terminal/__init__.py @@ -223,6 +223,7 @@ ReaderPresentPaymentMethodParams as ReaderPresentPaymentMethodParams, ReaderPresentPaymentMethodParamsCard as ReaderPresentPaymentMethodParamsCard, ReaderPresentPaymentMethodParamsCardPresent as ReaderPresentPaymentMethodParamsCardPresent, + ReaderPresentPaymentMethodParamsGiftCard as ReaderPresentPaymentMethodParamsGiftCard, ReaderPresentPaymentMethodParamsInteracPresent as ReaderPresentPaymentMethodParamsInteracPresent, ) from stripe.params.terminal._reader_process_payment_intent_params import ( @@ -922,6 +923,10 @@ "stripe.params.terminal._reader_present_payment_method_params", False, ), + "ReaderPresentPaymentMethodParamsGiftCard": ( + "stripe.params.terminal._reader_present_payment_method_params", + False, + ), "ReaderPresentPaymentMethodParamsInteracPresent": ( "stripe.params.terminal._reader_present_payment_method_params", False, diff --git a/stripe/params/terminal/_reader_activate_gift_card_params.py b/stripe/params/terminal/_reader_activate_gift_card_params.py index 70e74fc43..b05b476f0 100644 --- a/stripe/params/terminal/_reader_activate_gift_card_params.py +++ b/stripe/params/terminal/_reader_activate_gift_card_params.py @@ -10,7 +10,7 @@ class ReaderActivateGiftCardParams(RequestOptions): """ The initial balance to set on the gift card. """ - brand: Literal["fiserv_valuelink", "givex", "svs"] + brand: Literal["svs"] """ The brand of the gift card. """ diff --git a/stripe/params/terminal/_reader_cashout_gift_card_params.py b/stripe/params/terminal/_reader_cashout_gift_card_params.py index 251126788..211d79501 100644 --- a/stripe/params/terminal/_reader_cashout_gift_card_params.py +++ b/stripe/params/terminal/_reader_cashout_gift_card_params.py @@ -6,7 +6,7 @@ class ReaderCashoutGiftCardParams(RequestOptions): - brand: Literal["fiserv_valuelink", "givex", "svs"] + brand: Literal["svs"] """ The brand of the gift card. """ diff --git a/stripe/params/terminal/_reader_check_gift_card_balance_params.py b/stripe/params/terminal/_reader_check_gift_card_balance_params.py index e883e9cc3..31a52b6af 100644 --- a/stripe/params/terminal/_reader_check_gift_card_balance_params.py +++ b/stripe/params/terminal/_reader_check_gift_card_balance_params.py @@ -6,7 +6,7 @@ class ReaderCheckGiftCardBalanceParams(RequestOptions): - brand: Literal["fiserv_valuelink", "givex", "svs"] + brand: Literal["svs"] """ The brand of the gift card. """ diff --git a/stripe/params/terminal/_reader_collect_payment_method_params.py b/stripe/params/terminal/_reader_collect_payment_method_params.py index 8fed5401f..884c0803a 100644 --- a/stripe/params/terminal/_reader_collect_payment_method_params.py +++ b/stripe/params/terminal/_reader_collect_payment_method_params.py @@ -33,7 +33,7 @@ class ReaderCollectPaymentMethodParamsCollectConfig(TypedDict): """ Enables cancel button on transaction screens. """ - gift_card_brand: NotRequired[Literal["fiserv_valuelink", "givex", "svs"]] + gift_card_brand: NotRequired[Literal["svs"]] """ The gift card brand to use in the transaction. """ diff --git a/stripe/params/terminal/_reader_present_payment_method_params.py b/stripe/params/terminal/_reader_present_payment_method_params.py index b908e1eb9..422ca46cc 100644 --- a/stripe/params/terminal/_reader_present_payment_method_params.py +++ b/stripe/params/terminal/_reader_present_payment_method_params.py @@ -22,13 +22,19 @@ class ReaderPresentPaymentMethodParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + gift_card: NotRequired["ReaderPresentPaymentMethodParamsGiftCard"] + """ + Simulated data for the gift_card payment method. + """ interac_present: NotRequired[ "ReaderPresentPaymentMethodParamsInteracPresent" ] """ Simulated data for the interac_present payment method. """ - type: NotRequired["Literal['card', 'card_present', 'interac_present']|str"] + type: NotRequired[ + "Literal['card', 'card_present', 'gift_card', 'interac_present']|str" + ] """ Simulated payment type. """ @@ -60,6 +66,17 @@ class ReaderPresentPaymentMethodParamsCardPresent(TypedDict): """ +class ReaderPresentPaymentMethodParamsGiftCard(TypedDict): + brand: Literal["svs"] + """ + The brand of the gift card. + """ + track_2: str + """ + Simulated track 2 data for the gift card payment method. + """ + + class ReaderPresentPaymentMethodParamsInteracPresent(TypedDict): number: NotRequired[str] """ diff --git a/stripe/params/terminal/_reader_process_payment_intent_params.py b/stripe/params/terminal/_reader_process_payment_intent_params.py index 290ada6d5..6397a3037 100644 --- a/stripe/params/terminal/_reader_process_payment_intent_params.py +++ b/stripe/params/terminal/_reader_process_payment_intent_params.py @@ -33,7 +33,7 @@ class ReaderProcessPaymentIntentParamsProcessConfig(TypedDict): """ Enables cancel button on transaction screens. """ - gift_card_brand: NotRequired[Literal["fiserv_valuelink", "givex", "svs"]] + gift_card_brand: NotRequired[Literal["svs"]] """ The gift card brand to use in the transaction. """ diff --git a/stripe/params/terminal/_reader_reload_gift_card_params.py b/stripe/params/terminal/_reader_reload_gift_card_params.py index 67415646f..83c20580b 100644 --- a/stripe/params/terminal/_reader_reload_gift_card_params.py +++ b/stripe/params/terminal/_reader_reload_gift_card_params.py @@ -10,7 +10,7 @@ class ReaderReloadGiftCardParams(RequestOptions): """ The amount to add to the gift card balance, in the smallest currency unit. """ - brand: Literal["fiserv_valuelink", "givex", "svs"] + brand: Literal["svs"] """ The brand of the gift card. """ diff --git a/stripe/params/test_helpers/_confirmation_token_create_params.py b/stripe/params/test_helpers/_confirmation_token_create_params.py index 4136c4bb5..073021093 100644 --- a/stripe/params/test_helpers/_confirmation_token_create_params.py +++ b/stripe/params/test_helpers/_confirmation_token_create_params.py @@ -662,14 +662,17 @@ class ConfirmationTokenCreateParamsPaymentMethodDataFpx(TypedDict): "bank_muamalat", "bank_of_china", "bank_rakyat", + "bnp_paribas", "bsn", "cimb", + "citibank", "deutsche_bank", "hong_leong_bank", "hsbc", "kfh", "maybank2e", "maybank2u", + "mbsb_bank", "ocbc", "pb_enterprise", "public_bank", diff --git a/stripe/params/test_helpers/terminal/__init__.py b/stripe/params/test_helpers/terminal/__init__.py index cc208d07a..cd1f706cb 100644 --- a/stripe/params/test_helpers/terminal/__init__.py +++ b/stripe/params/test_helpers/terminal/__init__.py @@ -8,6 +8,7 @@ ReaderPresentPaymentMethodParams as ReaderPresentPaymentMethodParams, ReaderPresentPaymentMethodParamsCard as ReaderPresentPaymentMethodParamsCard, ReaderPresentPaymentMethodParamsCardPresent as ReaderPresentPaymentMethodParamsCardPresent, + ReaderPresentPaymentMethodParamsGiftCard as ReaderPresentPaymentMethodParamsGiftCard, ReaderPresentPaymentMethodParamsInteracPresent as ReaderPresentPaymentMethodParamsInteracPresent, ) from stripe.params.test_helpers.terminal._reader_succeed_input_collection_params import ( @@ -31,6 +32,10 @@ "stripe.params.test_helpers.terminal._reader_present_payment_method_params", False, ), + "ReaderPresentPaymentMethodParamsGiftCard": ( + "stripe.params.test_helpers.terminal._reader_present_payment_method_params", + False, + ), "ReaderPresentPaymentMethodParamsInteracPresent": ( "stripe.params.test_helpers.terminal._reader_present_payment_method_params", False, diff --git a/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py b/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py index f8be0f583..0ae44d5d8 100644 --- a/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py +++ b/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py @@ -21,13 +21,19 @@ class ReaderPresentPaymentMethodParams(TypedDict): """ Specifies which fields in the response should be expanded. """ + gift_card: NotRequired["ReaderPresentPaymentMethodParamsGiftCard"] + """ + Simulated data for the gift_card payment method. + """ interac_present: NotRequired[ "ReaderPresentPaymentMethodParamsInteracPresent" ] """ Simulated data for the interac_present payment method. """ - type: NotRequired["Literal['card', 'card_present', 'interac_present']|str"] + type: NotRequired[ + "Literal['card', 'card_present', 'gift_card', 'interac_present']|str" + ] """ Simulated payment type. """ @@ -59,6 +65,17 @@ class ReaderPresentPaymentMethodParamsCardPresent(TypedDict): """ +class ReaderPresentPaymentMethodParamsGiftCard(TypedDict): + brand: Literal["svs"] + """ + The brand of the gift card. + """ + track_2: str + """ + Simulated track 2 data for the gift card payment method. + """ + + class ReaderPresentPaymentMethodParamsInteracPresent(TypedDict): number: NotRequired[str] """ diff --git a/stripe/params/v2/__init__.py b/stripe/params/v2/__init__.py index 07d776b43..fae40e2a7 100644 --- a/stripe/params/v2/__init__.py +++ b/stripe/params/v2/__init__.py @@ -14,6 +14,7 @@ orchestrated_commerce as orchestrated_commerce, payments as payments, reporting as reporting, + risk as risk, signals as signals, tax as tax, test_helpers as test_helpers, @@ -30,6 +31,7 @@ "orchestrated_commerce": ("stripe.params.v2.orchestrated_commerce", True), "payments": ("stripe.params.v2.payments", True), "reporting": ("stripe.params.v2.reporting", True), + "risk": ("stripe.params.v2.risk", True), "signals": ("stripe.params.v2.signals", True), "tax": ("stripe.params.v2.tax", True), "test_helpers": ("stripe.params.v2.test_helpers", True), diff --git a/stripe/params/v2/core/__init__.py b/stripe/params/v2/core/__init__.py index 71ac8b409..be8ee081b 100644 --- a/stripe/params/v2/core/__init__.py +++ b/stripe/params/v2/core/__init__.py @@ -222,6 +222,7 @@ AccountCreateParamsConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigration, AccountCreateParamsConfigurationMerchantCardPayments as AccountCreateParamsConfigurationMerchantCardPayments, AccountCreateParamsConfigurationMerchantCardPaymentsDeclineOn as AccountCreateParamsConfigurationMerchantCardPaymentsDeclineOn, + AccountCreateParamsConfigurationMerchantGrossSettlement as AccountCreateParamsConfigurationMerchantGrossSettlement, AccountCreateParamsConfigurationMerchantKonbiniPayments as AccountCreateParamsConfigurationMerchantKonbiniPayments, AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupport as AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupport, AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupportHours as AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupportHours, @@ -461,6 +462,7 @@ AccountCreateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager as AccountCreateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager, AccountCreateParamsIdentityAttestationsTermsOfServiceMoneyManager as AccountCreateParamsIdentityAttestationsTermsOfServiceMoneyManager, AccountCreateParamsIdentityBusinessDetails as AccountCreateParamsIdentityBusinessDetails, + AccountCreateParamsIdentityBusinessDetailsAdditionalAddress as AccountCreateParamsIdentityBusinessDetailsAdditionalAddress, AccountCreateParamsIdentityBusinessDetailsAddress as AccountCreateParamsIdentityBusinessDetailsAddress, AccountCreateParamsIdentityBusinessDetailsAnnualRevenue as AccountCreateParamsIdentityBusinessDetailsAnnualRevenue, AccountCreateParamsIdentityBusinessDetailsDocuments as AccountCreateParamsIdentityBusinessDetailsDocuments, @@ -568,6 +570,7 @@ AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager, AccountTokenCreateParamsIdentityAttestationsTermsOfServiceMoneyManager as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceMoneyManager, AccountTokenCreateParamsIdentityBusinessDetails as AccountTokenCreateParamsIdentityBusinessDetails, + AccountTokenCreateParamsIdentityBusinessDetailsAdditionalAddress as AccountTokenCreateParamsIdentityBusinessDetailsAdditionalAddress, AccountTokenCreateParamsIdentityBusinessDetailsAddress as AccountTokenCreateParamsIdentityBusinessDetailsAddress, AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenue as AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenue, AccountTokenCreateParamsIdentityBusinessDetailsDocuments as AccountTokenCreateParamsIdentityBusinessDetailsDocuments, @@ -828,6 +831,7 @@ AccountUpdateParamsConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigration, AccountUpdateParamsConfigurationMerchantCardPayments as AccountUpdateParamsConfigurationMerchantCardPayments, AccountUpdateParamsConfigurationMerchantCardPaymentsDeclineOn as AccountUpdateParamsConfigurationMerchantCardPaymentsDeclineOn, + AccountUpdateParamsConfigurationMerchantGrossSettlement as AccountUpdateParamsConfigurationMerchantGrossSettlement, AccountUpdateParamsConfigurationMerchantKonbiniPayments as AccountUpdateParamsConfigurationMerchantKonbiniPayments, AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupport as AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupport, AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupportHours as AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupportHours, @@ -1067,6 +1071,7 @@ AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager as AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager, AccountUpdateParamsIdentityAttestationsTermsOfServiceMoneyManager as AccountUpdateParamsIdentityAttestationsTermsOfServiceMoneyManager, AccountUpdateParamsIdentityBusinessDetails as AccountUpdateParamsIdentityBusinessDetails, + AccountUpdateParamsIdentityBusinessDetailsAdditionalAddress as AccountUpdateParamsIdentityBusinessDetailsAdditionalAddress, AccountUpdateParamsIdentityBusinessDetailsAddress as AccountUpdateParamsIdentityBusinessDetailsAddress, AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue as AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue, AccountUpdateParamsIdentityBusinessDetailsDocuments as AccountUpdateParamsIdentityBusinessDetailsDocuments, @@ -2051,6 +2056,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantGrossSettlement": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantKonbiniPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -3007,6 +3016,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsIdentityBusinessDetailsAdditionalAddress": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsIdentityBusinessDetailsAddress": ( "stripe.params.v2.core._account_create_params", False, @@ -3392,6 +3405,10 @@ "stripe.params.v2.core._account_token_create_params", False, ), + "AccountTokenCreateParamsIdentityBusinessDetailsAdditionalAddress": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), "AccountTokenCreateParamsIdentityBusinessDetailsAddress": ( "stripe.params.v2.core._account_token_create_params", False, @@ -4416,6 +4433,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantGrossSettlement": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantKonbiniPayments": ( "stripe.params.v2.core._account_update_params", False, @@ -5372,6 +5393,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsIdentityBusinessDetailsAdditionalAddress": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsIdentityBusinessDetailsAddress": ( "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 6ed21b222..f660bc274 100644 --- a/stripe/params/v2/core/_account_create_params.py +++ b/stripe/params/v2/core/_account_create_params.py @@ -979,6 +979,12 @@ class AccountCreateParamsConfigurationMerchant(TypedDict): """ Card payments settings. """ + gross_settlement: NotRequired[ + "AccountCreateParamsConfigurationMerchantGrossSettlement" + ] + """ + Settings for gross settlement. + """ konbini_payments: NotRequired[ "AccountCreateParamsConfigurationMerchantKonbiniPayments" ] @@ -2817,6 +2823,17 @@ class AccountCreateParamsConfigurationMerchantCardPaymentsDeclineOn(TypedDict): """ +class AccountCreateParamsConfigurationMerchantGrossSettlement(TypedDict): + payment_method: NotRequired[str] + """ + The ID of the payment method to use for gross settlement payouts. + """ + payment_method_collection: NotRequired[Literal["always", "never"]] + """ + Whether to collect a payment method for gross settlement. + """ + + class AccountCreateParamsConfigurationMerchantKonbiniPayments(TypedDict): support: NotRequired[ "AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupport" @@ -6492,6 +6509,12 @@ class AccountCreateParamsIdentityAttestationsTermsOfServiceMoneyManager( class AccountCreateParamsIdentityBusinessDetails(TypedDict): + additional_addresses: NotRequired[ + List["AccountCreateParamsIdentityBusinessDetailsAdditionalAddress"] + ] + """ + Additional addresses associated with the business. + """ address: NotRequired["AccountCreateParamsIdentityBusinessDetailsAddress"] """ The business registration address of the business entity. @@ -6562,6 +6585,41 @@ class AccountCreateParamsIdentityBusinessDetails(TypedDict): """ +class AccountCreateParamsIdentityBusinessDetailsAdditionalAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + purpose: Literal["administrative", "principal_place_of_business"] + """ + Purpose of additional address. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or district. + """ + + class AccountCreateParamsIdentityBusinessDetailsAddress(TypedDict): city: NotRequired[str] """ diff --git a/stripe/params/v2/core/_account_evaluation_create_params.py b/stripe/params/v2/core/_account_evaluation_create_params.py index f0b530ffe..5e076b391 100644 --- a/stripe/params/v2/core/_account_evaluation_create_params.py +++ b/stripe/params/v2/core/_account_evaluation_create_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -13,7 +13,16 @@ class AccountEvaluationCreateParams(TypedDict): """ Account data for entity-less evaluation. Exactly one of account or account_data must be provided. """ - signals: List[Literal["fraudulent_website"]] + signals: List[ + Union[ + Literal[ + "fraudulent_website", + "user_account_sharing", + "user_multi_accounting", + ], + str, + ] + ] """ List of signals to evaluate. """ diff --git a/stripe/params/v2/core/_account_token_create_params.py b/stripe/params/v2/core/_account_token_create_params.py index fc3742ee6..fdd2d10e8 100644 --- a/stripe/params/v2/core/_account_token_create_params.py +++ b/stripe/params/v2/core/_account_token_create_params.py @@ -465,6 +465,14 @@ class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceMoneyManager( class AccountTokenCreateParamsIdentityBusinessDetails(TypedDict): + additional_addresses: NotRequired[ + List[ + "AccountTokenCreateParamsIdentityBusinessDetailsAdditionalAddress" + ] + ] + """ + Additional addresses associated with the business. + """ address: NotRequired[ "AccountTokenCreateParamsIdentityBusinessDetailsAddress" ] @@ -537,6 +545,43 @@ class AccountTokenCreateParamsIdentityBusinessDetails(TypedDict): """ +class AccountTokenCreateParamsIdentityBusinessDetailsAdditionalAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + purpose: Literal["administrative", "principal_place_of_business"] + """ + Purpose of additional address. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or district. + """ + + class AccountTokenCreateParamsIdentityBusinessDetailsAddress(TypedDict): city: NotRequired[str] """ diff --git a/stripe/params/v2/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py index bbcd2204c..ecceac555 100644 --- a/stripe/params/v2/core/_account_update_params.py +++ b/stripe/params/v2/core/_account_update_params.py @@ -1001,6 +1001,12 @@ class AccountUpdateParamsConfigurationMerchant(TypedDict): """ Card payments settings. """ + gross_settlement: NotRequired[ + "AccountUpdateParamsConfigurationMerchantGrossSettlement" + ] + """ + Settings for gross settlement. + """ konbini_payments: NotRequired[ "AccountUpdateParamsConfigurationMerchantKonbiniPayments" ] @@ -2839,6 +2845,17 @@ class AccountUpdateParamsConfigurationMerchantCardPaymentsDeclineOn(TypedDict): """ +class AccountUpdateParamsConfigurationMerchantGrossSettlement(TypedDict): + payment_method: NotRequired[str] + """ + The ID of the payment method to use for gross settlement payouts. + """ + payment_method_collection: NotRequired[Literal["always", "never"]] + """ + Whether to collect a payment method for gross settlement. + """ + + class AccountUpdateParamsConfigurationMerchantKonbiniPayments(TypedDict): support: NotRequired[ "AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupport" @@ -6526,6 +6543,12 @@ class AccountUpdateParamsIdentityAttestationsTermsOfServiceMoneyManager( class AccountUpdateParamsIdentityBusinessDetails(TypedDict): + additional_addresses: NotRequired[ + List["AccountUpdateParamsIdentityBusinessDetailsAdditionalAddress"] + ] + """ + Additional addresses associated with the business. + """ address: NotRequired["AccountUpdateParamsIdentityBusinessDetailsAddress"] """ The business registration address of the business entity. @@ -6596,6 +6619,41 @@ class AccountUpdateParamsIdentityBusinessDetails(TypedDict): """ +class AccountUpdateParamsIdentityBusinessDetailsAdditionalAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + purpose: Literal["administrative", "principal_place_of_business"] + """ + Purpose of additional address. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or district. + """ + + class AccountUpdateParamsIdentityBusinessDetailsAddress(TypedDict): city: NotRequired[str] """ diff --git a/stripe/params/v2/money_management/__init__.py b/stripe/params/v2/money_management/__init__.py index 77696946c..3141fded4 100644 --- a/stripe/params/v2/money_management/__init__.py +++ b/stripe/params/v2/money_management/__init__.py @@ -200,6 +200,15 @@ from stripe.params.v2.money_management._received_debit_list_params import ( ReceivedDebitListParams as ReceivedDebitListParams, ) + from stripe.params.v2.money_management._received_debit_mandate_cancel_params import ( + ReceivedDebitMandateCancelParams as ReceivedDebitMandateCancelParams, + ) + from stripe.params.v2.money_management._received_debit_mandate_list_params import ( + ReceivedDebitMandateListParams as ReceivedDebitMandateListParams, + ) + from stripe.params.v2.money_management._received_debit_mandate_retrieve_params import ( + ReceivedDebitMandateRetrieveParams as ReceivedDebitMandateRetrieveParams, + ) from stripe.params.v2.money_management._received_debit_retrieve_params import ( ReceivedDebitRetrieveParams as ReceivedDebitRetrieveParams, ) @@ -624,6 +633,18 @@ "stripe.params.v2.money_management._received_debit_list_params", False, ), + "ReceivedDebitMandateCancelParams": ( + "stripe.params.v2.money_management._received_debit_mandate_cancel_params", + False, + ), + "ReceivedDebitMandateListParams": ( + "stripe.params.v2.money_management._received_debit_mandate_list_params", + False, + ), + "ReceivedDebitMandateRetrieveParams": ( + "stripe.params.v2.money_management._received_debit_mandate_retrieve_params", + False, + ), "ReceivedDebitRetrieveParams": ( "stripe.params.v2.money_management._received_debit_retrieve_params", False, diff --git a/stripe/params/v2/money_management/_outbound_payment_create_params.py b/stripe/params/v2/money_management/_outbound_payment_create_params.py index 1259ace88..ecfc2e750 100644 --- a/stripe/params/v2/money_management/_outbound_payment_create_params.py +++ b/stripe/params/v2/money_management/_outbound_payment_create_params.py @@ -32,10 +32,6 @@ class OutboundPaymentCreateParams(_OutboundPaymentCreateParamsBase): """ The quote for this OutboundPayment. Only required for countries with regulatory mandates to display fee estimates before OutboundPayment creation. """ - payout_intent: NotRequired[str] - """ - The PayoutIntent ID that triggered this OutboundPayment. - """ purpose: NotRequired[Literal["payroll"]] """ The purpose of the OutboundPayment. diff --git a/stripe/params/v2/money_management/_received_debit_list_params.py b/stripe/params/v2/money_management/_received_debit_list_params.py index 043e8e2b6..4525e0f42 100644 --- a/stripe/params/v2/money_management/_received_debit_list_params.py +++ b/stripe/params/v2/money_management/_received_debit_list_params.py @@ -8,3 +8,7 @@ class ReceivedDebitListParams(TypedDict): """ The page limit. """ + received_debit_mandate: NotRequired[str] + """ + Filter by the received debit mandate ID. + """ diff --git a/stripe/params/v2/money_management/_received_debit_mandate_cancel_params.py b/stripe/params/v2/money_management/_received_debit_mandate_cancel_params.py new file mode 100644 index 000000000..ecea8d544 --- /dev/null +++ b/stripe/params/v2/money_management/_received_debit_mandate_cancel_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ReceivedDebitMandateCancelParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_received_debit_mandate_list_params.py b/stripe/params/v2/money_management/_received_debit_mandate_list_params.py new file mode 100644 index 000000000..36d29adb0 --- /dev/null +++ b/stripe/params/v2/money_management/_received_debit_mandate_list_params.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class ReceivedDebitMandateListParams(TypedDict): + financial_account: NotRequired[str] + """ + The ID of the FinancialAccount to filter by. + """ + limit: NotRequired[int] + """ + The page limit. + """ + statuses: NotRequired[ + List[ + Union[ + Literal[ + "active", "canceled", "expired", "pending_cancellation" + ], + str, + ] + ] + ] + """ + Filter by mandate status. + """ + type: NotRequired[Literal["bank_transfer"]] + """ + The type of ReceivedDebitMandate to filter by. + """ diff --git a/stripe/params/v2/money_management/_received_debit_mandate_retrieve_params.py b/stripe/params/v2/money_management/_received_debit_mandate_retrieve_params.py new file mode 100644 index 000000000..f613d7166 --- /dev/null +++ b/stripe/params/v2/money_management/_received_debit_mandate_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ReceivedDebitMandateRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/test_helpers/_financial_address_debit_params.py b/stripe/params/v2/money_management/test_helpers/_financial_address_debit_params.py index 521b8c6d2..06309b726 100644 --- a/stripe/params/v2/money_management/test_helpers/_financial_address_debit_params.py +++ b/stripe/params/v2/money_management/test_helpers/_financial_address_debit_params.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe.v2._amount import AmountParam +from typing import Union from typing_extensions import Literal, NotRequired, TypedDict @@ -9,7 +10,7 @@ class FinancialAddressDebitParams(TypedDict): """ Object containing the amount value and currency to debit. """ - network: Literal["ach"] + network: Union[Literal["ach", "bacs"], str] """ The network to use in simulating the funds flow. This will be reflected in the resulting ReceivedDebit. """ diff --git a/stripe/params/v2/payments/_off_session_payment_create_params.py b/stripe/params/v2/payments/_off_session_payment_create_params.py index 7673e477d..483048ce8 100644 --- a/stripe/params/v2/payments/_off_session_payment_create_params.py +++ b/stripe/params/v2/payments/_off_session_payment_create_params.py @@ -90,6 +90,10 @@ class OffSessionPaymentCreateParams(TypedDict): [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ + target_date: NotRequired[str] + """ + Provides a way to schedule deferred payments for cards and debits, in YYYY-MM-DD format. + """ test_clock: NotRequired[str] """ Test clock that can be used to advance the retry attempts in a sandbox. diff --git a/stripe/params/v2/risk/__init__.py b/stripe/params/v2/risk/__init__.py new file mode 100644 index 000000000..4dda1da15 --- /dev/null +++ b/stripe/params/v2/risk/__init__.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.risk._inquiry_list_params import ( + InquiryListParams as InquiryListParams, + ) + from stripe.params.v2.risk._inquiry_retrieve_params import ( + InquiryRetrieveParams as InquiryRetrieveParams, + ) + from stripe.params.v2.risk._inquiry_update_params import ( + InquiryUpdateParams as InquiryUpdateParams, + InquiryUpdateParamsAppeal as InquiryUpdateParamsAppeal, + InquiryUpdateParamsAuthorizationDocuments as InquiryUpdateParamsAuthorizationDocuments, + InquiryUpdateParamsProductRemoval as InquiryUpdateParamsProductRemoval, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "InquiryListParams": ("stripe.params.v2.risk._inquiry_list_params", False), + "InquiryRetrieveParams": ( + "stripe.params.v2.risk._inquiry_retrieve_params", + False, + ), + "InquiryUpdateParams": ( + "stripe.params.v2.risk._inquiry_update_params", + False, + ), + "InquiryUpdateParamsAppeal": ( + "stripe.params.v2.risk._inquiry_update_params", + False, + ), + "InquiryUpdateParamsAuthorizationDocuments": ( + "stripe.params.v2.risk._inquiry_update_params", + False, + ), + "InquiryUpdateParamsProductRemoval": ( + "stripe.params.v2.risk._inquiry_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/v2/risk/_inquiry_list_params.py b/stripe/params/v2/risk/_inquiry_list_params.py new file mode 100644 index 000000000..b2df1348f --- /dev/null +++ b/stripe/params/v2/risk/_inquiry_list_params.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class InquiryListParams(TypedDict): + account: str + """ + The account to list inquiries for. + """ + limit: NotRequired[int] + """ + Maximum number of results to return. Default: 10. Valid range: 1-100. + """ diff --git a/stripe/params/v2/risk/_inquiry_retrieve_params.py b/stripe/params/v2/risk/_inquiry_retrieve_params.py new file mode 100644 index 000000000..e7ec4f734 --- /dev/null +++ b/stripe/params/v2/risk/_inquiry_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class InquiryRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/risk/_inquiry_update_params.py b/stripe/params/v2/risk/_inquiry_update_params.py new file mode 100644 index 000000000..9a9ef8880 --- /dev/null +++ b/stripe/params/v2/risk/_inquiry_update_params.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class InquiryUpdateParams(TypedDict): + appeal: NotRequired["InquiryUpdateParamsAppeal"] + """ + Provide this for appeal inquiries. + """ + authorization_documents: NotRequired[ + "InquiryUpdateParamsAuthorizationDocuments" + ] + """ + Provide this for authorization_documents inquiries. + """ + product_removal: NotRequired["InquiryUpdateParamsProductRemoval"] + """ + Provide this for product_removal inquiries. + """ + + +class InquiryUpdateParamsAppeal(TypedDict): + explanation: str + """ + A text explanation for the appeal. + """ + + +class InquiryUpdateParamsAuthorizationDocuments(TypedDict): + files: List[str] + """ + IDs of uploaded files to attach as authorization documents. + """ + + +class InquiryUpdateParamsProductRemoval(TypedDict): + items_removed_at: str + """ + The timestamp when the prohibited items were removed. + """ diff --git a/stripe/params/v2/signals/__init__.py b/stripe/params/v2/signals/__init__.py index 149d2f2a0..8e482869f 100644 --- a/stripe/params/v2/signals/__init__.py +++ b/stripe/params/v2/signals/__init__.py @@ -4,6 +4,49 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: + from stripe.params.v2.signals._account_activity_create_params import ( + AccountActivityCreateParams as AccountActivityCreateParams, + AccountActivityCreateParamsAccountDetails as AccountActivityCreateParamsAccountDetails, + AccountActivityCreateParamsAccountDetailsData as AccountActivityCreateParamsAccountDetailsData, + AccountActivityCreateParamsAccountDetailsDataDefaults as AccountActivityCreateParamsAccountDetailsDataDefaults, + AccountActivityCreateParamsAccountDetailsDataDefaultsProfile as AccountActivityCreateParamsAccountDetailsDataDefaultsProfile, + AccountActivityCreateParamsAccountDetailsDataIdentity as AccountActivityCreateParamsAccountDetailsDataIdentity, + AccountActivityCreateParamsAccountDetailsDataIdentityBusinessDetails as AccountActivityCreateParamsAccountDetailsDataIdentityBusinessDetails, + AccountActivityCreateParamsLoginAttempt as AccountActivityCreateParamsLoginAttempt, + AccountActivityCreateParamsLoginAttemptClientDetails as AccountActivityCreateParamsLoginAttemptClientDetails, + AccountActivityCreateParamsLoginAttemptClientDetailsData as AccountActivityCreateParamsLoginAttemptClientDetailsData, + AccountActivityCreateParamsLoginDecision as AccountActivityCreateParamsLoginDecision, + AccountActivityCreateParamsRegistrationAttempt as AccountActivityCreateParamsRegistrationAttempt, + AccountActivityCreateParamsRegistrationAttemptClientDetails as AccountActivityCreateParamsRegistrationAttemptClientDetails, + AccountActivityCreateParamsRegistrationAttemptClientDetailsData as AccountActivityCreateParamsRegistrationAttemptClientDetailsData, + AccountActivityCreateParamsRegistrationDecision as AccountActivityCreateParamsRegistrationDecision, + ) + from stripe.params.v2.signals._account_activity_delete_params import ( + AccountActivityDeleteParams as AccountActivityDeleteParams, + ) + from stripe.params.v2.signals._account_activity_retrieve_params import ( + AccountActivityRetrieveParams as AccountActivityRetrieveParams, + ) + from stripe.params.v2.signals._account_evaluation_create_params import ( + AccountEvaluationCreateParams as AccountEvaluationCreateParams, + AccountEvaluationCreateParamsAccountActivityDetails as AccountEvaluationCreateParamsAccountActivityDetails, + AccountEvaluationCreateParamsAccountActivityDetailsData as AccountEvaluationCreateParamsAccountActivityDetailsData, + AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttempt as AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttempt, + AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientDetails as AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientDetails, + AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientDetailsData as AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientDetailsData, + AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttempt as AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttempt, + AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttemptClientDetails as AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttemptClientDetails, + AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttemptClientDetailsData as AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttemptClientDetailsData, + AccountEvaluationCreateParamsAccountDetails as AccountEvaluationCreateParamsAccountDetails, + AccountEvaluationCreateParamsAccountDetailsData as AccountEvaluationCreateParamsAccountDetailsData, + AccountEvaluationCreateParamsAccountDetailsDataDefaults as AccountEvaluationCreateParamsAccountDetailsDataDefaults, + AccountEvaluationCreateParamsAccountDetailsDataDefaultsProfile as AccountEvaluationCreateParamsAccountDetailsDataDefaultsProfile, + AccountEvaluationCreateParamsAccountDetailsDataIdentity as AccountEvaluationCreateParamsAccountDetailsDataIdentity, + AccountEvaluationCreateParamsAccountDetailsDataIdentityBusinessDetails as AccountEvaluationCreateParamsAccountDetailsDataIdentityBusinessDetails, + ) + from stripe.params.v2.signals._account_evaluation_retrieve_params import ( + AccountEvaluationRetrieveParams as AccountEvaluationRetrieveParams, + ) from stripe.params.v2.signals._account_signal_list_params import ( AccountSignalListParams as AccountSignalListParams, AccountSignalListParamsAccountDetails as AccountSignalListParamsAccountDetails, @@ -14,6 +57,138 @@ # name -> (import_target, is_submodule) _import_map = { + "AccountActivityCreateParams": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsAccountDetails": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsAccountDetailsData": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsAccountDetailsDataDefaults": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsAccountDetailsDataDefaultsProfile": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsAccountDetailsDataIdentity": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsAccountDetailsDataIdentityBusinessDetails": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsLoginAttempt": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsLoginAttemptClientDetails": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsLoginAttemptClientDetailsData": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsLoginDecision": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsRegistrationAttempt": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsRegistrationAttemptClientDetails": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsRegistrationAttemptClientDetailsData": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityCreateParamsRegistrationDecision": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), + "AccountActivityDeleteParams": ( + "stripe.params.v2.signals._account_activity_delete_params", + False, + ), + "AccountActivityRetrieveParams": ( + "stripe.params.v2.signals._account_activity_retrieve_params", + False, + ), + "AccountEvaluationCreateParams": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountActivityDetails": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountActivityDetailsData": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttempt": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientDetails": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientDetailsData": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttempt": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttemptClientDetails": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttemptClientDetailsData": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountDetails": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountDetailsData": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountDetailsDataDefaults": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountDetailsDataDefaultsProfile": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountDetailsDataIdentity": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationCreateParamsAccountDetailsDataIdentityBusinessDetails": ( + "stripe.params.v2.signals._account_evaluation_create_params", + False, + ), + "AccountEvaluationRetrieveParams": ( + "stripe.params.v2.signals._account_evaluation_retrieve_params", + False, + ), "AccountSignalListParams": ( "stripe.params.v2.signals._account_signal_list_params", False, diff --git a/stripe/params/v2/signals/_account_activity_create_params.py b/stripe/params/v2/signals/_account_activity_create_params.py new file mode 100644 index 000000000..25ad9709f --- /dev/null +++ b/stripe/params/v2/signals/_account_activity_create_params.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountActivityCreateParams(TypedDict): + account_details: NotRequired["AccountActivityCreateParamsAccountDetails"] + """ + The account, customer, or inline account data associated with the activity. + """ + account_evaluation: NotRequired[str] + """ + The account evaluation this activity is associated with, when applicable. + """ + login_attempt: NotRequired["AccountActivityCreateParamsLoginAttempt"] + """ + Details for the login attempt. Provide only when type is login_attempt. + """ + login_decision: NotRequired["AccountActivityCreateParamsLoginDecision"] + """ + Details for the login decision. Provide only when type is login_decision. + """ + occurred_at: NotRequired[str] + """ + Timestamp at which the activity occurred. Defaults to the created time if not provided. + """ + registration_attempt: NotRequired[ + "AccountActivityCreateParamsRegistrationAttempt" + ] + """ + Details for the registration attempt. Provide only when type is registration_attempt. + """ + registration_decision: NotRequired[ + "AccountActivityCreateParamsRegistrationDecision" + ] + """ + Details for the registration decision. Provide only when type is registration_decision. + """ + type: Union[ + Literal[ + "login_attempt", + "login_decision", + "registration_attempt", + "registration_decision", + ], + str, + ] + """ + The type of activity. + """ + + +class AccountActivityCreateParamsAccountDetails(TypedDict): + account: NotRequired[str] + """ + The v2 account ID of the account. + """ + customer: NotRequired[str] + """ + The v1 customer ID of the account, for users not yet migrated to v2/accounts. + """ + data: NotRequired["AccountActivityCreateParamsAccountDetailsData"] + """ + Inline account data to evaluate without creating a v2 account. + """ + + +class AccountActivityCreateParamsAccountDetailsData(TypedDict): + defaults: NotRequired[ + "AccountActivityCreateParamsAccountDetailsDataDefaults" + ] + """ + Default account settings. + """ + identity: NotRequired[ + "AccountActivityCreateParamsAccountDetailsDataIdentity" + ] + """ + Identity data. + """ + + +class AccountActivityCreateParamsAccountDetailsDataDefaults(TypedDict): + profile: "AccountActivityCreateParamsAccountDetailsDataDefaultsProfile" + """ + Account profile data. + """ + + +class AccountActivityCreateParamsAccountDetailsDataDefaultsProfile(TypedDict): + business_url: str + """ + The business URL. + """ + doing_business_as: NotRequired[str] + """ + Doing business as (DBA) name. + """ + product_description: NotRequired[str] + """ + Description of the account's product or service. + """ + + +class AccountActivityCreateParamsAccountDetailsDataIdentity(TypedDict): + business_details: ( + "AccountActivityCreateParamsAccountDetailsDataIdentityBusinessDetails" + ) + """ + Business details for identity data. + """ + + +class AccountActivityCreateParamsAccountDetailsDataIdentityBusinessDetails( + TypedDict, +): + registered_name: NotRequired[str] + """ + Registered business name. + """ + + +class AccountActivityCreateParamsLoginAttempt(TypedDict): + client_details: "AccountActivityCreateParamsLoginAttemptClientDetails" + """ + Client details captured for the attempt. + """ + + +class AccountActivityCreateParamsLoginAttemptClientDetails(TypedDict): + data: NotRequired[ + "AccountActivityCreateParamsLoginAttemptClientDetailsData" + ] + """ + Raw client details for the activity, when a Radar session is not available. + """ + radar_session: NotRequired[str] + """ + The Radar session ID capturing client details for the activity. + """ + + +class AccountActivityCreateParamsLoginAttemptClientDetailsData(TypedDict): + ip: str + """ + The IP address associated with the activity. + """ + referrer: NotRequired[str] + """ + The referrer associated with the activity. + """ + user_agent: NotRequired[str] + """ + The user agent associated with the activity. + """ + + +class AccountActivityCreateParamsLoginDecision(TypedDict): + status: Literal["allowed", "blocked", "restricted"] + """ + The action the merchant took following the evaluation. + """ + + +class AccountActivityCreateParamsRegistrationAttempt(TypedDict): + client_details: ( + "AccountActivityCreateParamsRegistrationAttemptClientDetails" + ) + """ + Client details captured for the attempt. + """ + + +class AccountActivityCreateParamsRegistrationAttemptClientDetails(TypedDict): + data: NotRequired[ + "AccountActivityCreateParamsRegistrationAttemptClientDetailsData" + ] + """ + Raw client details for the activity, when a Radar session is not available. + """ + radar_session: NotRequired[str] + """ + The Radar session ID capturing client details for the activity. + """ + + +class AccountActivityCreateParamsRegistrationAttemptClientDetailsData( + TypedDict, +): + ip: str + """ + The IP address associated with the activity. + """ + referrer: NotRequired[str] + """ + The referrer associated with the activity. + """ + user_agent: NotRequired[str] + """ + The user agent associated with the activity. + """ + + +class AccountActivityCreateParamsRegistrationDecision(TypedDict): + status: Literal["allowed", "blocked", "restricted"] + """ + The action the merchant took following the evaluation. + """ diff --git a/stripe/params/v2/signals/_account_activity_delete_params.py b/stripe/params/v2/signals/_account_activity_delete_params.py new file mode 100644 index 000000000..60357d6bc --- /dev/null +++ b/stripe/params/v2/signals/_account_activity_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AccountActivityDeleteParams(TypedDict): + pass diff --git a/stripe/params/v2/signals/_account_activity_retrieve_params.py b/stripe/params/v2/signals/_account_activity_retrieve_params.py new file mode 100644 index 000000000..e9bf845e7 --- /dev/null +++ b/stripe/params/v2/signals/_account_activity_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AccountActivityRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/signals/_account_evaluation_create_params.py b/stripe/params/v2/signals/_account_evaluation_create_params.py new file mode 100644 index 000000000..ba4533f93 --- /dev/null +++ b/stripe/params/v2/signals/_account_evaluation_create_params.py @@ -0,0 +1,226 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountEvaluationCreateParams(TypedDict): + account_activity_details: NotRequired[ + "AccountEvaluationCreateParamsAccountActivityDetails" + ] + """ + Account activity to record alongside this evaluation. + """ + account_details: "AccountEvaluationCreateParamsAccountDetails" + """ + The account, customer, or inline account data to evaluate. + """ + requested_signals: List[ + Union[ + Literal[ + "fraudulent_website", + "user_account_sharing", + "user_multi_accounting", + ], + str, + ] + ] + """ + List of signals to evaluate. + """ + + +class AccountEvaluationCreateParamsAccountActivityDetails(TypedDict): + account_activity: NotRequired[str] + """ + The ID of an existing account activity to associate with the evaluation. + """ + data: NotRequired[ + "AccountEvaluationCreateParamsAccountActivityDetailsData" + ] + """ + Inline activity data used to create a new account activity for the evaluation. + """ + + +class AccountEvaluationCreateParamsAccountActivityDetailsData(TypedDict): + login_attempt: NotRequired[ + "AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttempt" + ] + """ + Details for the login attempt. Provide only when type is login_attempt. + """ + occurred_at: NotRequired[str] + """ + Timestamp at which the activity occurred. Defaults to the created time if not provided. + """ + registration_attempt: NotRequired[ + "AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttempt" + ] + """ + Details for the registration attempt. Provide only when type is registration_attempt. + """ + type: Union[ + Literal[ + "login_attempt", + "login_decision", + "registration_attempt", + "registration_decision", + ], + str, + ] + """ + The type of activity. Must be registration_attempt or login_attempt. + """ + + +class AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttempt( + TypedDict, +): + client_details: "AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientDetails" + """ + Client details captured for the attempt. + """ + + +class AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientDetails( + TypedDict, +): + data: NotRequired[ + "AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientDetailsData" + ] + """ + Raw client details for the activity, when a Radar session is not available. + """ + radar_session: NotRequired[str] + """ + The Radar session ID capturing client details for the activity. + """ + + +class AccountEvaluationCreateParamsAccountActivityDetailsDataLoginAttemptClientDetailsData( + TypedDict, +): + ip: str + """ + The IP address associated with the activity. + """ + referrer: NotRequired[str] + """ + The referrer associated with the activity. + """ + user_agent: NotRequired[str] + """ + The user agent associated with the activity. + """ + + +class AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttempt( + TypedDict, +): + client_details: "AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttemptClientDetails" + """ + Client details captured for the attempt. + """ + + +class AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttemptClientDetails( + TypedDict, +): + data: NotRequired[ + "AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttemptClientDetailsData" + ] + """ + Raw client details for the activity, when a Radar session is not available. + """ + radar_session: NotRequired[str] + """ + The Radar session ID capturing client details for the activity. + """ + + +class AccountEvaluationCreateParamsAccountActivityDetailsDataRegistrationAttemptClientDetailsData( + TypedDict, +): + ip: str + """ + The IP address associated with the activity. + """ + referrer: NotRequired[str] + """ + The referrer associated with the activity. + """ + user_agent: NotRequired[str] + """ + The user agent associated with the activity. + """ + + +class AccountEvaluationCreateParamsAccountDetails(TypedDict): + account: NotRequired[str] + """ + The v2 account ID of the account. + """ + customer: NotRequired[str] + """ + The v1 customer ID of the account, for users not yet migrated to v2/accounts. + """ + data: NotRequired["AccountEvaluationCreateParamsAccountDetailsData"] + """ + Inline account data to evaluate without creating a v2 account. + """ + + +class AccountEvaluationCreateParamsAccountDetailsData(TypedDict): + defaults: NotRequired[ + "AccountEvaluationCreateParamsAccountDetailsDataDefaults" + ] + """ + Default account settings. + """ + identity: NotRequired[ + "AccountEvaluationCreateParamsAccountDetailsDataIdentity" + ] + """ + Identity data. + """ + + +class AccountEvaluationCreateParamsAccountDetailsDataDefaults(TypedDict): + profile: "AccountEvaluationCreateParamsAccountDetailsDataDefaultsProfile" + """ + Account profile data. + """ + + +class AccountEvaluationCreateParamsAccountDetailsDataDefaultsProfile( + TypedDict +): + business_url: str + """ + The business URL. + """ + doing_business_as: NotRequired[str] + """ + Doing business as (DBA) name. + """ + product_description: NotRequired[str] + """ + Description of the account's product or service. + """ + + +class AccountEvaluationCreateParamsAccountDetailsDataIdentity(TypedDict): + business_details: "AccountEvaluationCreateParamsAccountDetailsDataIdentityBusinessDetails" + """ + Business details for identity data. + """ + + +class AccountEvaluationCreateParamsAccountDetailsDataIdentityBusinessDetails( + TypedDict, +): + registered_name: NotRequired[str] + """ + Registered business name. + """ diff --git a/stripe/params/v2/signals/_account_evaluation_retrieve_params.py b/stripe/params/v2/signals/_account_evaluation_retrieve_params.py new file mode 100644 index 000000000..cc1e45b78 --- /dev/null +++ b/stripe/params/v2/signals/_account_evaluation_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AccountEvaluationRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/signals/_account_signal_list_params.py b/stripe/params/v2/signals/_account_signal_list_params.py index 9c95c4936..64bc5d561 100644 --- a/stripe/params/v2/signals/_account_signal_list_params.py +++ b/stripe/params/v2/signals/_account_signal_list_params.py @@ -18,8 +18,11 @@ class AccountSignalListParams(TypedDict): Union[ Literal[ "fraudulent_merchant", + "fraudulent_website", "merchant_delinquency", "payment_delinquency_exposure", + "user_account_sharing", + "user_multi_accounting", ], str, ] diff --git a/stripe/product_catalog/_trial_offer.py b/stripe/product_catalog/_trial_offer.py index 8cecdce5a..d9e9fcf3e 100644 --- a/stripe/product_catalog/_trial_offer.py +++ b/stripe/product_catalog/_trial_offer.py @@ -2,6 +2,8 @@ # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource from stripe._expandable_field import ExpandableField +from stripe._list_object import ListObject +from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING @@ -11,9 +13,18 @@ from stripe.params.product_catalog._trial_offer_create_params import ( TrialOfferCreateParams, ) + from stripe.params.product_catalog._trial_offer_list_params import ( + TrialOfferListParams, + ) + from stripe.params.product_catalog._trial_offer_retrieve_params import ( + TrialOfferRetrieveParams, + ) -class TrialOffer(CreateableAPIResource["TrialOffer"]): +class TrialOffer( + CreateableAPIResource["TrialOffer"], + ListableAPIResource["TrialOffer"], +): """ Trial offers let you define free or paid introductory pricing for a subscription item. A TrialOffer specifies the price to charge during the trial, how long the trial lasts @@ -109,4 +120,66 @@ async def create_async( ), ) + @classmethod + def list( + cls, **params: Unpack["TrialOfferListParams"] + ) -> ListObject["TrialOffer"]: + """ + Returns a list of trial offers. + """ + result = cls._static_request( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + async def list_async( + cls, **params: Unpack["TrialOfferListParams"] + ) -> ListObject["TrialOffer"]: + """ + Returns a list of trial offers. + """ + result = await cls._static_request_async( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + def retrieve( + cls, id: str, **params: Unpack["TrialOfferRetrieveParams"] + ) -> "TrialOffer": + """ + Retrieves the trial offer with the given ID. + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["TrialOfferRetrieveParams"] + ) -> "TrialOffer": + """ + Retrieves the trial offer with the given ID. + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + _inner_class_types = {"duration": Duration, "end_behavior": EndBehavior} diff --git a/stripe/product_catalog/_trial_offer_service.py b/stripe/product_catalog/_trial_offer_service.py index 21086018e..825d14c1b 100644 --- a/stripe/product_catalog/_trial_offer_service.py +++ b/stripe/product_catalog/_trial_offer_service.py @@ -1,18 +1,64 @@ # -*- 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._list_object import ListObject from stripe._request_options import RequestOptions from stripe.params.product_catalog._trial_offer_create_params import ( TrialOfferCreateParams, ) + from stripe.params.product_catalog._trial_offer_list_params import ( + TrialOfferListParams, + ) + from stripe.params.product_catalog._trial_offer_retrieve_params import ( + TrialOfferRetrieveParams, + ) from stripe.product_catalog._trial_offer import TrialOffer class TrialOfferService(StripeService): + def list( + self, + params: Optional["TrialOfferListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[TrialOffer]": + """ + Returns a list of trial offers. + """ + return cast( + "ListObject[TrialOffer]", + self._request( + "get", + "/v1/product_catalog/trial_offers", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["TrialOfferListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[TrialOffer]": + """ + Returns a list of trial offers. + """ + return cast( + "ListObject[TrialOffer]", + await self._request_async( + "get", + "/v1/product_catalog/trial_offers", + base_address="api", + params=params, + options=options, + ), + ) + def create( self, params: "TrialOfferCreateParams", @@ -50,3 +96,47 @@ async def create_async( options=options, ), ) + + def retrieve( + self, + id: str, + params: Optional["TrialOfferRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "TrialOffer": + """ + Retrieves the trial offer with the given ID. + """ + return cast( + "TrialOffer", + self._request( + "get", + "/v1/product_catalog/trial_offers/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["TrialOfferRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "TrialOffer": + """ + Retrieves the trial offer with the given ID. + """ + return cast( + "TrialOffer", + await self._request_async( + "get", + "/v1/product_catalog/trial_offers/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/radar/_payment_evaluation.py b/stripe/radar/_payment_evaluation.py index 30ad630c5..2c9a4c310 100644 --- a/stripe/radar/_payment_evaluation.py +++ b/stripe/radar/_payment_evaluation.py @@ -420,15 +420,40 @@ class Address(StripeObject): """ _inner_class_types = {"address": Address} + class Card(StripeObject): + exp_month: int + """ + Two-digit number representing the card's expiration month. + """ + exp_year: int + """ + Four-digit number representing the card's expiration year. + """ + first6: Optional[str] + """ + First six digits of the card number. + """ + last4: Optional[str] + """ + Last four digits of the card number. + """ + billing_details: Optional[BillingDetails] """ Billing information associated with the payment evaluation. """ + card: Optional[Card] + """ + Card details associated with the payment evaluation. + """ payment_method: ExpandableField["PaymentMethod"] """ The payment method used in this payment evaluation. """ - _inner_class_types = {"billing_details": BillingDetails} + _inner_class_types = { + "billing_details": BillingDetails, + "card": Card, + } class ShippingDetails(StripeObject): class Address(StripeObject): diff --git a/stripe/shared_payment/_granted_token.py b/stripe/shared_payment/_granted_token.py index 3b33ee281..5227bee1a 100644 --- a/stripe/shared_payment/_granted_token.py +++ b/stripe/shared_payment/_granted_token.py @@ -413,9 +413,7 @@ class Link(StripeObject): card: Optional[Card] klarna: Optional[Klarna] link: Optional[Link] - type: Union[ - Literal["affirm", "card", "klarna", "link", "shop_pay"], str - ] + type: Union[Literal["affirm", "card", "klarna", "link"], str] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. """ diff --git a/stripe/shared_payment/_issued_token.py b/stripe/shared_payment/_issued_token.py index ad1edab70..57e5cb2f5 100644 --- a/stripe/shared_payment/_issued_token.py +++ b/stripe/shared_payment/_issued_token.py @@ -262,6 +262,10 @@ class UsageLimits(StripeObject): """ Usage limits of the SharedPaymentIssuedToken. """ + use_stripe_sdk: Optional[bool] + """ + Set to true when using Stripe.js, iOS, or Android client-side SDKs to handle next actions. + """ @classmethod def create( diff --git a/stripe/tax/_location.py b/stripe/tax/_location.py index 1fda99425..c304111b3 100644 --- a/stripe/tax/_location.py +++ b/stripe/tax/_location.py @@ -60,6 +60,10 @@ class Address(StripeObject): """ Unique identifier for the object. """ + livemode: bool + """ + If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. + """ object: Literal["tax.location"] """ String representing the object's type. Objects of the same type share the same value. diff --git a/stripe/v2/__init__.py b/stripe/v2/__init__.py index 0a18316b7..9265d723b 100644 --- a/stripe/v2/__init__.py +++ b/stripe/v2/__init__.py @@ -19,6 +19,7 @@ orchestrated_commerce as orchestrated_commerce, payments as payments, reporting as reporting, + risk as risk, signals as signals, tax as tax, test_helpers as test_helpers, @@ -47,6 +48,7 @@ from stripe.v2._reporting_service import ( ReportingService as ReportingService, ) + from stripe.v2._risk_service import RiskService as RiskService from stripe.v2._signals_service import SignalsService as SignalsService from stripe.v2._tax_service import TaxService as TaxService from stripe.v2._test_helper_service import ( @@ -66,6 +68,7 @@ "orchestrated_commerce": ("stripe.v2.orchestrated_commerce", True), "payments": ("stripe.v2.payments", True), "reporting": ("stripe.v2.reporting", True), + "risk": ("stripe.v2.risk", True), "signals": ("stripe.v2.signals", True), "tax": ("stripe.v2.tax", True), "test_helpers": ("stripe.v2.test_helpers", True), @@ -92,6 +95,7 @@ ), "PaymentsService": ("stripe.v2._payments_service", False), "ReportingService": ("stripe.v2._reporting_service", False), + "RiskService": ("stripe.v2._risk_service", False), "SignalsService": ("stripe.v2._signals_service", False), "TaxService": ("stripe.v2._tax_service", False), "TestHelperService": ("stripe.v2._test_helper_service", False), diff --git a/stripe/v2/_money_management_service.py b/stripe/v2/_money_management_service.py index aa4bcd4ab..905f756ec 100644 --- a/stripe/v2/_money_management_service.py +++ b/stripe/v2/_money_management_service.py @@ -47,6 +47,9 @@ from stripe.v2.money_management._received_credit_service import ( ReceivedCreditService, ) + from stripe.v2.money_management._received_debit_mandate_service import ( + ReceivedDebitMandateService, + ) from stripe.v2.money_management._received_debit_service import ( ReceivedDebitService, ) @@ -124,6 +127,10 @@ "stripe.v2.money_management._received_debit_service", "ReceivedDebitService", ], + "received_debit_mandates": [ + "stripe.v2.money_management._received_debit_mandate_service", + "ReceivedDebitMandateService", + ], "recipient_verifications": [ "stripe.v2.money_management._recipient_verification_service", "RecipientVerificationService", @@ -159,6 +166,7 @@ class MoneyManagementService(StripeService): payout_methods_bank_account_spec: "PayoutMethodsBankAccountSpecService" received_credits: "ReceivedCreditService" received_debits: "ReceivedDebitService" + received_debit_mandates: "ReceivedDebitMandateService" recipient_verifications: "RecipientVerificationService" test_helpers: "TestHelpersService" transactions: "TransactionService" diff --git a/stripe/v2/_risk_service.py b/stripe/v2/_risk_service.py new file mode 100644 index 000000000..7e33be7ed --- /dev/null +++ b/stripe/v2/_risk_service.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.risk._inquiry_service import InquiryService + +_subservices = { + "inquiries": ["stripe.v2.risk._inquiry_service", "InquiryService"], +} + + +class RiskService(StripeService): + inquiries: "InquiryService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/_signals_service.py b/stripe/v2/_signals_service.py index 7dbb49980..e1da1c8e6 100644 --- a/stripe/v2/_signals_service.py +++ b/stripe/v2/_signals_service.py @@ -5,9 +5,23 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: + from stripe.v2.signals._account_activity_service import ( + AccountActivityService, + ) + from stripe.v2.signals._account_evaluation_service import ( + AccountEvaluationService, + ) from stripe.v2.signals._account_signal_service import AccountSignalService _subservices = { + "account_activity": [ + "stripe.v2.signals._account_activity_service", + "AccountActivityService", + ], + "account_evaluations": [ + "stripe.v2.signals._account_evaluation_service", + "AccountEvaluationService", + ], "account_signals": [ "stripe.v2.signals._account_signal_service", "AccountSignalService", @@ -16,6 +30,8 @@ class SignalsService(StripeService): + account_activity: "AccountActivityService" + account_evaluations: "AccountEvaluationService" account_signals: "AccountSignalService" def __init__(self, requestor): diff --git a/stripe/v2/billing/_intent.py b/stripe/v2/billing/_intent.py index 928bfc650..50e26a7f9 100644 --- a/stripe/v2/billing/_intent.py +++ b/stripe/v2/billing/_intent.py @@ -15,10 +15,18 @@ class Intent(StripeObject): OBJECT_NAME: ClassVar[Literal["v2.billing.intent"]] = "v2.billing.intent" class AmountDetails(StripeObject): + amount_due: str + """ + The outstanding amount after discount, tax, and customer balance application. + """ currency: str """ Three-letter ISO currency code, in lowercase. Must be a supported currency. """ + customer_balance_applied: str + """ + The customer's account balance applied to the amount. + """ discount: str """ Amount of discount applied. diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index 3f8302892..935d4f7c7 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -4883,6 +4883,16 @@ class DeclineOn(StripeObject): """ _inner_class_types = {"decline_on": DeclineOn} + class GrossSettlement(StripeObject): + payment_method: Optional[str] + """ + The ID of the payment method to use for gross settlement payouts. + """ + payment_method_collection: Optional[Literal["always", "never"]] + """ + Whether to collect a payment method for gross settlement. + """ + class KonbiniPayments(StripeObject): class Support(StripeObject): class Hours(StripeObject): @@ -5048,6 +5058,10 @@ class Address(StripeObject): """ Card payments settings. """ + gross_settlement: Optional[GrossSettlement] + """ + Settings for gross settlement. + """ konbini_payments: Optional[KonbiniPayments] """ Settings specific to Konbini payments on the account. @@ -5081,6 +5095,7 @@ class Address(StripeObject): "branding": Branding, "capabilities": Capabilities, "card_payments": CardPayments, + "gross_settlement": GrossSettlement, "konbini_payments": KonbiniPayments, "script_statement_descriptor": ScriptStatementDescriptor, "sepa_debit_payments": SepaDebitPayments, @@ -10929,6 +10944,42 @@ class MoneyManager(StripeObject): } class BusinessDetails(StripeObject): + class AdditionalAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + purpose: Literal[ + "administrative", "principal_place_of_business" + ] + """ + Purpose of additional address. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + town: Optional[str] + """ + Town or district. + """ + class Address(StripeObject): city: Optional[str] """ @@ -11432,6 +11483,10 @@ class Kanji(StripeObject): """ _inner_class_types = {"kana": Kana, "kanji": Kanji} + additional_addresses: Optional[List[AdditionalAddress]] + """ + Additional addresses associated with the business. + """ address: Optional[Address] """ The company's primary address. @@ -11518,6 +11573,7 @@ class Kanji(StripeObject): The category identifying the legal structure of the business. """ _inner_class_types = { + "additional_addresses": AdditionalAddress, "address": Address, "annual_revenue": AnnualRevenue, "documents": Documents, diff --git a/stripe/v2/core/_account_evaluation.py b/stripe/v2/core/_account_evaluation.py index 432ce3021..72a5e616f 100644 --- a/stripe/v2/core/_account_evaluation.py +++ b/stripe/v2/core/_account_evaluation.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -71,7 +71,16 @@ class BusinessDetails(StripeObject): """ Timestamp at which the evaluation was created. """ - evaluations_triggered: List[Literal["fraudulent_website"]] + evaluations_triggered: List[ + Union[ + Literal[ + "fraudulent_website", + "user_account_sharing", + "user_multi_accounting", + ], + str, + ] + ] """ List of signals that were triggered for evaluation. """ diff --git a/stripe/v2/iam/_activity_log.py b/stripe/v2/iam/_activity_log.py index ccb522b4e..f400b6d85 100644 --- a/stripe/v2/iam/_activity_log.py +++ b/stripe/v2/iam/_activity_log.py @@ -117,6 +117,10 @@ class UserRoles(StripeObject): """ Roles the user had before the change. """ + source: Union[Literal["dashboard", "scim", "sso"], str] + """ + Source of the role change. + """ user_email: str """ Email address of the user whose roles were changed. diff --git a/stripe/v2/money_management/__init__.py b/stripe/v2/money_management/__init__.py index c552dcd1e..b02c326e0 100644 --- a/stripe/v2/money_management/__init__.py +++ b/stripe/v2/money_management/__init__.py @@ -99,6 +99,12 @@ from stripe.v2.money_management._received_debit import ( ReceivedDebit as ReceivedDebit, ) + from stripe.v2.money_management._received_debit_mandate import ( + ReceivedDebitMandate as ReceivedDebitMandate, + ) + from stripe.v2.money_management._received_debit_mandate_service import ( + ReceivedDebitMandateService as ReceivedDebitMandateService, + ) from stripe.v2.money_management._received_debit_service import ( ReceivedDebitService as ReceivedDebitService, ) @@ -231,6 +237,14 @@ False, ), "ReceivedDebit": ("stripe.v2.money_management._received_debit", False), + "ReceivedDebitMandate": ( + "stripe.v2.money_management._received_debit_mandate", + False, + ), + "ReceivedDebitMandateService": ( + "stripe.v2.money_management._received_debit_mandate_service", + False, + ), "ReceivedDebitService": ( "stripe.v2.money_management._received_debit_service", False, diff --git a/stripe/v2/money_management/_debit_dispute.py b/stripe/v2/money_management/_debit_dispute.py index ef7a4e7a6..3e3707cff 100644 --- a/stripe/v2/money_management/_debit_dispute.py +++ b/stripe/v2/money_management/_debit_dispute.py @@ -16,12 +16,24 @@ class DebitDispute(StripeObject): ) class BankTransfer(StripeObject): - network: Literal["ach"] + network: Union[Literal["ach", "bacs"], str] """ The bank network the dispute was originated on. """ reason: Optional[ - Union[Literal["incorrect_amount_or_date", "unauthorized"], str] + Union[ + Literal[ + "beneficiary_unrecognized", + "incorrect_amount_or_date", + "mandate_canceled", + "mandate_canceled_by_stripe", + "no_advance_notice", + "originator_requested", + "signature_invalid", + "unauthorized", + ], + str, + ] ] """ The reason for the dispute. diff --git a/stripe/v2/money_management/_financial_account.py b/stripe/v2/money_management/_financial_account.py index d4b6fcf89..3fb0ed19d 100644 --- a/stripe/v2/money_management/_financial_account.py +++ b/stripe/v2/money_management/_financial_account.py @@ -67,12 +67,6 @@ class Platform(StripeObject): """ _inner_class_types = {"funded_by": FundedBy} - class ManagedBy(StripeObject): - type: Literal["multiprocessor_settlement"] - """ - Enum describing the Stripe product that is managing this FinancialAccount. - """ - class MultiprocessorSettlement(StripeObject): settlement_currencies: List[str] """ @@ -230,11 +224,6 @@ class Storage(StripeObject): """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. """ - managed_by: Optional[ManagedBy] - """ - If this is a managed FinancialAccount, `managed_by` indicates the product that created and manages this FinancialAccount. For managed FinancialAccounts, - creation of money management resources can only be orchestrated by the managing product. - """ metadata: Optional[UntypedStripeObject[str]] """ Metadata associated with the FinancialAccount. @@ -283,7 +272,6 @@ class Storage(StripeObject): "accrued_fees": AccruedFees, "balance": Balance, "credit": Credit, - "managed_by": ManagedBy, "multiprocessor_settlement": MultiprocessorSettlement, "other": Other, "payments": Payments, diff --git a/stripe/v2/money_management/_outbound_payment.py b/stripe/v2/money_management/_outbound_payment.py index 927e05777..a66b7800e 100644 --- a/stripe/v2/money_management/_outbound_payment.py +++ b/stripe/v2/money_management/_outbound_payment.py @@ -362,6 +362,10 @@ class MailingAddress(StripeObject): """ The quote for this OutboundPayment. Only required for countries with regulatory mandates to display fee estimates before OutboundPayment creation. """ + payout_intent: Optional[str] + """ + The PayoutIntent ID that triggered this OutboundPayment. + """ purpose: Optional[Literal["payroll"]] """ The purpose of the OutboundPayment. diff --git a/stripe/v2/money_management/_received_credit.py b/stripe/v2/money_management/_received_credit.py index 03c4ba22a..4348d7007 100644 --- a/stripe/v2/money_management/_received_credit.py +++ b/stripe/v2/money_management/_received_credit.py @@ -28,7 +28,7 @@ class BalanceTransfer(StripeObject): """ The ID of the outbound transfer object that originated the ReceivedCredit. """ - payout_v1: Optional[str] + payout: Optional[str] """ The ID of the payout object that originated the ReceivedCredit. """ @@ -40,6 +40,7 @@ class BalanceTransfer(StripeObject): Literal[ "outbound_payment", "outbound_transfer", + "payout", "transfer", "payout_v1", ], diff --git a/stripe/v2/money_management/_received_debit.py b/stripe/v2/money_management/_received_debit.py index dc99ca45d..c6d77aa64 100644 --- a/stripe/v2/money_management/_received_debit.py +++ b/stripe/v2/money_management/_received_debit.py @@ -26,6 +26,32 @@ class BalanceTransfer(StripeObject): """ class BankTransfer(StripeObject): + class GbBankAccount(StripeObject): + account_holder_name: Optional[str] + """ + The name of the account holder that originated the debit. + """ + bank_name: Optional[str] + """ + The name of the bank the debit originated from. + """ + last4: Optional[str] + """ + Last 4 digits of the bank account number. + """ + network: Literal["bacs"] + """ + Open Enum. The bank network the debit was originated on. + """ + received_debit_mandate: Optional[str] + """ + The ID of the mandate associated with this debit. + """ + sort_code: Optional[str] + """ + The sort code of the bank that originated the debit. + """ + class UsBankAccount(StripeObject): bank_name: Optional[str] """ @@ -44,11 +70,18 @@ class UsBankAccount(StripeObject): """ The Financial Address that was debited. """ - origin_type: Literal["us_bank_account"] + gb_bank_account: Optional[GbBankAccount] + """ + Object containing details of the GB Bank Account that originated the debit. + Present when the debit was originated via BACS. + """ + origin_type: Union[Literal["gb_bank_account", "us_bank_account"], str] """ Open Enum. Indicates the origin type through which this debit was initiated. """ - payment_method_type: Literal["us_bank_account"] + payment_method_type: Union[ + Literal["gb_bank_account", "us_bank_account"], str + ] """ Open Enum. The type of the payment method used to originate the debit. """ @@ -56,11 +89,15 @@ class UsBankAccount(StripeObject): """ The statement descriptor set by the originator of the debit. """ - us_bank_account: UsBankAccount + us_bank_account: Optional[UsBankAccount] """ - The payment method used to originate the debit. + Object containing details of the US Bank Account that originated the debit. + Present when the debit was originated via ACH. """ - _inner_class_types = {"us_bank_account": UsBankAccount} + _inner_class_types = { + "gb_bank_account": GbBankAccount, + "us_bank_account": UsBankAccount, + } class CardSpend(StripeObject): class Authorization(StripeObject): @@ -117,6 +154,7 @@ class Failed(StripeObject): "capability_inactive", "financial_address_inactive", "insufficient_funds", + "no_mandate", "stripe_rejected", ], str, @@ -228,8 +266,22 @@ class StripeBalancePayment(StripeObject): """ A link to the Stripe-hosted receipt for this ReceivedDebit. """ + settles_at: Optional[str] + """ + The time at which the scheduled ReceivedDebit is expected to settle. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: `2022-09-18T13:22:18.123Z`. + Only present when status is `scheduled`. + """ status: Union[ - Literal["canceled", "failed", "pending", "returned", "succeeded"], str + Literal[ + "canceled", + "failed", + "pending", + "returned", + "scheduled", + "succeeded", + ], + str, ] """ Open Enum. The status of the ReceivedDebit. diff --git a/stripe/v2/money_management/_received_debit_mandate.py b/stripe/v2/money_management/_received_debit_mandate.py new file mode 100644 index 000000000..cd7d88750 --- /dev/null +++ b/stripe/v2/money_management/_received_debit_mandate.py @@ -0,0 +1,133 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional, Union +from typing_extensions import Literal + + +class ReceivedDebitMandate(StripeObject): + """ + A ReceivedDebitMandate represents an authorization from a third party to debit a financial account on a recurring basis. + """ + + OBJECT_NAME: ClassVar[ + Literal["v2.money_management.received_debit_mandate"] + ] = "v2.money_management.received_debit_mandate" + + class BankTransfer(StripeObject): + account_holder_name: Optional[str] + """ + The name of the account holder that initiated the debit. + """ + financial_address: str + """ + The financial address associated with this mandate. + """ + network: Literal["bacs"] + """ + The bank transfer network for this mandate. + """ + reference: Optional[str] + """ + The bank transfer reference provided by the bank. + """ + + class StatusDetails(StripeObject): + class Canceled(StripeObject): + reason: Union[ + Literal[ + "canceled_by_beneficiary", + "canceled_by_stripe", + "user_action", + ], + str, + ] + """ + The `canceled` status reason. + """ + + canceled: Optional[Canceled] + """ + If the mandate is canceled, this field provides more details on the cancellation reason. + """ + _inner_class_types = {"canceled": Canceled} + + class StatusTransitions(StripeObject): + activated_at: Optional[str] + """ + Timestamp describing when the ReceivedDebitMandate changed status to `active`. + Represented as a RFC 3339 date & time UTC value in millisecond precision. + """ + canceled_at: Optional[str] + """ + Timestamp describing when the ReceivedDebitMandate changed status to `canceled`. + Represented as a RFC 3339 date & time UTC value in millisecond precision for example: 2026-06-03T13:22:18.123Z. + """ + created_at: Optional[str] + """ + Timestamp describing when the ReceivedDebitMandate was created. + Represented as a RFC 3339 date & time UTC value in millisecond precision for example: 2026-06-03T13:22:18.123Z. + """ + expired_at: Optional[str] + """ + Timestamp describing when the ReceivedDebitMandate changed status to `expired`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2026-06-03T13:22:18.123Z. + """ + pending_cancellation_at: Optional[str] + """ + Timestamp describing when the ReceivedDebitMandate changed status to `pending_cancellation`. + Represented as a RFC 3339 date & time UTC value in millisecond precision. + """ + + bank_transfer: Optional[BankTransfer] + """ + This object stores details about the originating bank transfer that resulted in the ReceivedDebitMandate. Present if `type` field value is `bank_transfer`. + """ + created: str + """ + The time at which the ReceivedDebitMandate was created. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: `2026-06-03T13:22:18.123Z`. + """ + currency: str + """ + The currency of the ReceivedDebitMandate in ISO 4217 format. This is the currency that debits will be collected in. + """ + financial_account: str + """ + Financial account ID associated with this mandate. + """ + id: str + """ + The unique identifier for the ReceivedDebitMandate. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.money_management.received_debit_mandate"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + status: Union[ + Literal["active", "canceled", "expired", "pending_cancellation"], str + ] + """ + The status of the ReceivedDebitMandate. + """ + status_details: Optional[StatusDetails] + """ + Detailed information that elaborates on the specific status of the ReceivedDebitMandate. + """ + status_transitions: Optional[StatusTransitions] + """ + Timestamps describing when the mandate changed status. + """ + type: Literal["bank_transfer"] + """ + The type of the ReceivedDebitMandate. + """ + _inner_class_types = { + "bank_transfer": BankTransfer, + "status_details": StatusDetails, + "status_transitions": StatusTransitions, + } diff --git a/stripe/v2/money_management/_received_debit_mandate_service.py b/stripe/v2/money_management/_received_debit_mandate_service.py new file mode 100644 index 000000000..982515d0d --- /dev/null +++ b/stripe/v2/money_management/_received_debit_mandate_service.py @@ -0,0 +1,150 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._received_debit_mandate_cancel_params import ( + ReceivedDebitMandateCancelParams, + ) + from stripe.params.v2.money_management._received_debit_mandate_list_params import ( + ReceivedDebitMandateListParams, + ) + from stripe.params.v2.money_management._received_debit_mandate_retrieve_params import ( + ReceivedDebitMandateRetrieveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.money_management._received_debit_mandate import ( + ReceivedDebitMandate, + ) + + +class ReceivedDebitMandateService(StripeService): + def list( + self, + params: Optional["ReceivedDebitMandateListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[ReceivedDebitMandate]": + """ + Returns a list of ReceivedDebitMandates. + """ + return cast( + "ListObject[ReceivedDebitMandate]", + self._request( + "get", + "/v2/money_management/received_debit_mandates", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["ReceivedDebitMandateListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[ReceivedDebitMandate]": + """ + Returns a list of ReceivedDebitMandates. + """ + return cast( + "ListObject[ReceivedDebitMandate]", + await self._request_async( + "get", + "/v2/money_management/received_debit_mandates", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: Optional["ReceivedDebitMandateRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ReceivedDebitMandate": + """ + Retrieves the details of an existing ReceivedDebitMandate. + """ + return cast( + "ReceivedDebitMandate", + self._request( + "get", + "/v2/money_management/received_debit_mandates/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["ReceivedDebitMandateRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ReceivedDebitMandate": + """ + Retrieves the details of an existing ReceivedDebitMandate. + """ + return cast( + "ReceivedDebitMandate", + await self._request_async( + "get", + "/v2/money_management/received_debit_mandates/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def cancel( + self, + id: str, + params: Optional["ReceivedDebitMandateCancelParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ReceivedDebitMandate": + """ + Cancels an active ReceivedDebitMandate. + """ + return cast( + "ReceivedDebitMandate", + self._request( + "post", + "/v2/money_management/received_debit_mandates/{id}/cancel".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def cancel_async( + self, + id: str, + params: Optional["ReceivedDebitMandateCancelParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ReceivedDebitMandate": + """ + Cancels an active ReceivedDebitMandate. + """ + return cast( + "ReceivedDebitMandate", + await self._request_async( + "post", + "/v2/money_management/received_debit_mandates/{id}/cancel".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/payments/_off_session_payment.py b/stripe/v2/payments/_off_session_payment.py index 1b98ee7c6..785f783e9 100644 --- a/stripe/v2/payments/_off_session_payment.py +++ b/stripe/v2/payments/_off_session_payment.py @@ -321,6 +321,10 @@ class TransferData(StripeObject): Status of this OffSessionPayment, one of `pending`, `pending_retry`, `processing`, `failed`, `canceled`, `requires_capture`, or `succeeded`. """ + target_date: Optional[str] + """ + Provides a way to schedule deferred payments for cards and debits, in YYYY-MM-DD format. + """ test_clock: Optional[str] """ Test clock that can be used to advance the retry attempts in a sandbox. diff --git a/stripe/v2/risk/__init__.py b/stripe/v2/risk/__init__.py new file mode 100644 index 000000000..4bf3c33d0 --- /dev/null +++ b/stripe/v2/risk/__init__.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.risk._inquiry import Inquiry as Inquiry + from stripe.v2.risk._inquiry_service import ( + InquiryService as InquiryService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "Inquiry": ("stripe.v2.risk._inquiry", False), + "InquiryService": ("stripe.v2.risk._inquiry_service", False), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/risk/_inquiry.py b/stripe/v2/risk/_inquiry.py new file mode 100644 index 000000000..9813d8eb6 --- /dev/null +++ b/stripe/v2/risk/_inquiry.py @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class Inquiry(StripeObject): + """ + A risk inquiry represents a request from Stripe for information about a connected account. + """ + + OBJECT_NAME: ClassVar[Literal["v2.risk.inquiry"]] = "v2.risk.inquiry" + + class Appeal(StripeObject): + explanation: str + """ + A text explanation for the appeal. + """ + + class AuthorizationDocuments(StripeObject): + files: List[str] + """ + IDs of uploaded files to attach as authorization documents. + """ + + class ProductRemoval(StripeObject): + items_removed_at: str + """ + The timestamp when the prohibited items were removed. + """ + + appeal: Optional[Appeal] + """ + Data for appeal inquiries. Only present when type is appeal. + """ + authorization_documents: Optional[AuthorizationDocuments] + """ + Data for authorization_documents inquiries. Only present when type is authorization_documents. + """ + closed_at: str + """ + Time at which the inquiry was closed. + """ + created: str + """ + Time at which the inquiry was created. + """ + id: str + """ + Unique identifier for the inquiry. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.risk.inquiry"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + opened_at: str + """ + Time at which the inquiry was opened. + """ + product_removal: Optional[ProductRemoval] + """ + Data for product_removal inquiries. Only present when type is product_removal. + """ + status: Literal["closed", "open"] + """ + The current status of the inquiry. + """ + type: Union[ + Literal["appeal", "authorization_documents", "product_removal"], str + ] + """ + The type of inquiry. + """ + _inner_class_types = { + "appeal": Appeal, + "authorization_documents": AuthorizationDocuments, + "product_removal": ProductRemoval, + } diff --git a/stripe/v2/risk/_inquiry_service.py b/stripe/v2/risk/_inquiry_service.py new file mode 100644 index 000000000..fe3b2c6d8 --- /dev/null +++ b/stripe/v2/risk/_inquiry_service.py @@ -0,0 +1,138 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.risk._inquiry_list_params import InquiryListParams + from stripe.params.v2.risk._inquiry_retrieve_params import ( + InquiryRetrieveParams, + ) + from stripe.params.v2.risk._inquiry_update_params import ( + InquiryUpdateParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.risk._inquiry import Inquiry + + +class InquiryService(StripeService): + def list( + self, + params: "InquiryListParams", + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Inquiry]": + """ + Lists risk inquiries for a connected account. + """ + return cast( + "ListObject[Inquiry]", + self._request( + "get", + "/v2/risk/inquiries", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: "InquiryListParams", + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Inquiry]": + """ + Lists risk inquiries for a connected account. + """ + return cast( + "ListObject[Inquiry]", + await self._request_async( + "get", + "/v2/risk/inquiries", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: Optional["InquiryRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Inquiry": + """ + Retrieves a risk inquiry by ID. + """ + return cast( + "Inquiry", + self._request( + "get", + "/v2/risk/inquiries/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["InquiryRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Inquiry": + """ + Retrieves a risk inquiry by ID. + """ + return cast( + "Inquiry", + await self._request_async( + "get", + "/v2/risk/inquiries/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + def update( + self, + id: str, + params: Optional["InquiryUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Inquiry": + """ + Submits a response to a risk inquiry. + """ + return cast( + "Inquiry", + self._request( + "post", + "/v2/risk/inquiries/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + id: str, + params: Optional["InquiryUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Inquiry": + """ + Submits a response to a risk inquiry. + """ + return cast( + "Inquiry", + await self._request_async( + "post", + "/v2/risk/inquiries/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/signals/__init__.py b/stripe/v2/signals/__init__.py index 9ede77748..d6ff03886 100644 --- a/stripe/v2/signals/__init__.py +++ b/stripe/v2/signals/__init__.py @@ -4,6 +4,18 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: + from stripe.v2.signals._account_activity import ( + AccountActivity as AccountActivity, + ) + from stripe.v2.signals._account_activity_service import ( + AccountActivityService as AccountActivityService, + ) + from stripe.v2.signals._account_evaluation import ( + AccountEvaluation as AccountEvaluation, + ) + from stripe.v2.signals._account_evaluation_service import ( + AccountEvaluationService as AccountEvaluationService, + ) from stripe.v2.signals._account_signal import ( AccountSignal as AccountSignal, ) @@ -13,6 +25,16 @@ # name -> (import_target, is_submodule) _import_map = { + "AccountActivity": ("stripe.v2.signals._account_activity", False), + "AccountActivityService": ( + "stripe.v2.signals._account_activity_service", + False, + ), + "AccountEvaluation": ("stripe.v2.signals._account_evaluation", False), + "AccountEvaluationService": ( + "stripe.v2.signals._account_evaluation_service", + False, + ), "AccountSignal": ("stripe.v2.signals._account_signal", False), "AccountSignalService": ( "stripe.v2.signals._account_signal_service", diff --git a/stripe/v2/signals/_account_activity.py b/stripe/v2/signals/_account_activity.py new file mode 100644 index 000000000..98c04b942 --- /dev/null +++ b/stripe/v2/signals/_account_activity.py @@ -0,0 +1,215 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional, Union +from typing_extensions import Literal + + +class AccountActivity(StripeObject): + """ + Account Activity resource for the Signals API. + """ + + OBJECT_NAME: ClassVar[Literal["v2.signals.account_activity"]] = ( + "v2.signals.account_activity" + ) + + class AccountDetails(StripeObject): + class Data(StripeObject): + class Defaults(StripeObject): + class Profile(StripeObject): + business_url: str + """ + The business URL. + """ + doing_business_as: Optional[str] + """ + Doing business as (DBA) name. + """ + product_description: Optional[str] + """ + Description of the account's product or service. + """ + + profile: Profile + """ + Account profile data. + """ + _inner_class_types = {"profile": Profile} + + class Identity(StripeObject): + class BusinessDetails(StripeObject): + registered_name: Optional[str] + """ + Registered business name. + """ + + business_details: BusinessDetails + """ + Business details for identity data. + """ + _inner_class_types = {"business_details": BusinessDetails} + + defaults: Optional[Defaults] + """ + Default account settings. + """ + identity: Optional[Identity] + """ + Identity data. + """ + _inner_class_types = {"defaults": Defaults, "identity": Identity} + + account: Optional[str] + """ + The v2 account ID of the account. + """ + customer: Optional[str] + """ + The v1 customer ID of the account, for users not yet migrated to v2/accounts. + """ + data: Optional[Data] + """ + Inline account data to evaluate without creating a v2 account. + """ + _inner_class_types = {"data": Data} + + class LoginAttempt(StripeObject): + class ClientDetails(StripeObject): + class Data(StripeObject): + ip: str + """ + The IP address associated with the activity. + """ + referrer: Optional[str] + """ + The referrer associated with the activity. + """ + user_agent: Optional[str] + """ + The user agent associated with the activity. + """ + + data: Optional[Data] + """ + Raw client details for the activity, when a Radar session is not available. + """ + radar_session: Optional[str] + """ + The Radar session ID capturing client details for the activity. + """ + _inner_class_types = {"data": Data} + + client_details: ClientDetails + """ + Client details captured for the attempt. + """ + _inner_class_types = {"client_details": ClientDetails} + + class LoginDecision(StripeObject): + status: Literal["allowed", "blocked", "restricted"] + """ + The action the merchant took following the evaluation. + """ + + class RegistrationAttempt(StripeObject): + class ClientDetails(StripeObject): + class Data(StripeObject): + ip: str + """ + The IP address associated with the activity. + """ + referrer: Optional[str] + """ + The referrer associated with the activity. + """ + user_agent: Optional[str] + """ + The user agent associated with the activity. + """ + + data: Optional[Data] + """ + Raw client details for the activity, when a Radar session is not available. + """ + radar_session: Optional[str] + """ + The Radar session ID capturing client details for the activity. + """ + _inner_class_types = {"data": Data} + + client_details: ClientDetails + """ + Client details captured for the attempt. + """ + _inner_class_types = {"client_details": ClientDetails} + + class RegistrationDecision(StripeObject): + status: Literal["allowed", "blocked", "restricted"] + """ + The action the merchant took following the evaluation. + """ + + account_details: Optional[AccountDetails] + """ + The account, customer, or inline account data associated with the activity. + """ + account_evaluation: Optional[str] + """ + The account evaluation this activity is associated with, when applicable. + """ + created: str + """ + Timestamp at which the account activity was created. + """ + id: str + """ + Unique identifier for the account activity. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + login_attempt: Optional[LoginAttempt] + """ + Details for the login attempt. Present only when type is login_attempt. + """ + login_decision: Optional[LoginDecision] + """ + Details for the login decision. Present only when type is login_decision. + """ + 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. + """ + occurred_at: str + """ + Timestamp at which the activity occurred. Defaults to the created time if not provided. + """ + registration_attempt: Optional[RegistrationAttempt] + """ + Details for the registration attempt. Present only when type is registration_attempt. + """ + registration_decision: Optional[RegistrationDecision] + """ + Details for the registration decision. Present only when type is registration_decision. + """ + type: Union[ + Literal[ + "login_attempt", + "login_decision", + "registration_attempt", + "registration_decision", + ], + str, + ] + """ + The type of activity. + """ + _inner_class_types = { + "account_details": AccountDetails, + "login_attempt": LoginAttempt, + "login_decision": LoginDecision, + "registration_attempt": RegistrationAttempt, + "registration_decision": RegistrationDecision, + } diff --git a/stripe/v2/signals/_account_activity_service.py b/stripe/v2/signals/_account_activity_service.py new file mode 100644 index 000000000..29bd3fe13 --- /dev/null +++ b/stripe/v2/signals/_account_activity_service.py @@ -0,0 +1,140 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.signals._account_activity_create_params import ( + AccountActivityCreateParams, + ) + from stripe.params.v2.signals._account_activity_delete_params import ( + AccountActivityDeleteParams, + ) + from stripe.params.v2.signals._account_activity_retrieve_params import ( + AccountActivityRetrieveParams, + ) + from stripe.v2._deleted_object import DeletedObject + from stripe.v2.signals._account_activity import AccountActivity + + +class AccountActivityService(StripeService): + def create( + self, + params: "AccountActivityCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "AccountActivity": + """ + Creates a new account activity to report account registration, login, or evaluation follow-up activity. + """ + return cast( + "AccountActivity", + self._request( + "post", + "/v2/signals/account_activity", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "AccountActivityCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "AccountActivity": + """ + Creates a new account activity to report account registration, login, or evaluation follow-up activity. + """ + return cast( + "AccountActivity", + await self._request_async( + "post", + "/v2/signals/account_activity", + base_address="api", + params=params, + options=options, + ), + ) + + def delete( + self, + id: str, + params: Optional["AccountActivityDeleteParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "DeletedObject": + """ + Deletes an AccountActivity by its ID. + """ + return cast( + "DeletedObject", + self._request( + "delete", + "/v2/signals/account_activity/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def delete_async( + self, + id: str, + params: Optional["AccountActivityDeleteParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "DeletedObject": + """ + Deletes an AccountActivity by its ID. + """ + return cast( + "DeletedObject", + await self._request_async( + "delete", + "/v2/signals/account_activity/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: Optional["AccountActivityRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "AccountActivity": + """ + Retrieves an AccountActivity by its ID. + """ + return cast( + "AccountActivity", + self._request( + "get", + "/v2/signals/account_activity/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["AccountActivityRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "AccountActivity": + """ + Retrieves an AccountActivity by its ID. + """ + return cast( + "AccountActivity", + await self._request_async( + "get", + "/v2/signals/account_activity/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/signals/_account_evaluation.py b/stripe/v2/signals/_account_evaluation.py new file mode 100644 index 000000000..f65fc3a24 --- /dev/null +++ b/stripe/v2/signals/_account_evaluation.py @@ -0,0 +1,238 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from decimal import Decimal +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class AccountEvaluation(StripeObject): + """ + Account Evaluation resource for the Signals API. + """ + + OBJECT_NAME: ClassVar[Literal["v2.signals.account_evaluation"]] = ( + "v2.signals.account_evaluation" + ) + + class AccountActivityDetails(StripeObject): + account_activity: Optional[str] + """ + The ID of the account activity created or associated with the evaluation. + """ + + class AccountDetails(StripeObject): + class Data(StripeObject): + class Defaults(StripeObject): + class Profile(StripeObject): + business_url: str + """ + The business URL. + """ + doing_business_as: Optional[str] + """ + Doing business as (DBA) name. + """ + product_description: Optional[str] + """ + Description of the account's product or service. + """ + + profile: Profile + """ + Account profile data. + """ + _inner_class_types = {"profile": Profile} + + class Identity(StripeObject): + class BusinessDetails(StripeObject): + registered_name: Optional[str] + """ + Registered business name. + """ + + business_details: BusinessDetails + """ + Business details for identity data. + """ + _inner_class_types = {"business_details": BusinessDetails} + + defaults: Optional[Defaults] + """ + Default account settings. + """ + identity: Optional[Identity] + """ + Identity data. + """ + _inner_class_types = {"defaults": Defaults, "identity": Identity} + + account: Optional[str] + """ + The v2 account ID of the account. + """ + customer: Optional[str] + """ + The v1 customer ID of the account, for users not yet migrated to v2/accounts. + """ + data: Optional[Data] + """ + Inline account data to evaluate without creating a v2 account. + """ + _inner_class_types = {"data": Data} + + class EvaluatedSignals(StripeObject): + class FraudulentWebsite(StripeObject): + details: Optional[str] + """ + Human-readable details about the fraudulent website evaluation, when available. + """ + evaluated_at: Optional[str] + """ + Timestamp at which the signal was evaluated. + """ + risk_level: Literal[ + "elevated", + "highest", + "low", + "normal", + "not_assessed", + "unknown", + ] + """ + Categorical assessment of the fraudulent website risk. + """ + signal: Optional[str] + """ + The account signal ID containing the full fraudulent website signal result. + """ + + class UserAccountSharing(StripeObject): + evaluated_at: Optional[str] + """ + Timestamp at which the signal was evaluated. + """ + risk_level: Literal[ + "elevated", + "highest", + "low", + "normal", + "not_assessed", + "unknown", + ] + """ + Categorical assessment of the account-sharing risk. + """ + score: Optional[Decimal] + """ + The specific risk score for the account, between 0.00 and 100.00, when available. + """ + signal: Optional[str] + """ + The account signal ID containing the full user account-sharing signal result. + """ + _field_encodings = {"score": "decimal_string"} + + class UserMultiAccounting(StripeObject): + evaluated_at: Optional[str] + """ + Timestamp at which the signal was evaluated. + """ + risk_level: Literal[ + "elevated", + "highest", + "low", + "normal", + "not_assessed", + "unknown", + ] + """ + Categorical assessment of the multi-accounting risk. + """ + score: Optional[Decimal] + """ + The specific risk score for the account, between 0.00 and 100.00, when available. + """ + signal: Optional[str] + """ + The account signal ID containing the full user multi-accounting signal result. + """ + _field_encodings = {"score": "decimal_string"} + + fraudulent_website: Optional[FraudulentWebsite] + """ + Fraudulent website result for the evaluation, when available. + """ + user_account_sharing: Optional[UserAccountSharing] + """ + User account-sharing result for the evaluation, when available. + """ + user_multi_accounting: Optional[UserMultiAccounting] + """ + User multi-accounting result for the evaluation, when available. + """ + _inner_class_types = { + "fraudulent_website": FraudulentWebsite, + "user_account_sharing": UserAccountSharing, + "user_multi_accounting": UserMultiAccounting, + } + + account_activity_details: Optional[AccountActivityDetails] + """ + Account activity recorded alongside this evaluation, when applicable. + """ + account_details: AccountDetails + """ + The account, customer, or inline account data being evaluated. + """ + created: str + """ + Timestamp at which the evaluation was created. + """ + evaluated_signals: Optional[EvaluatedSignals] + """ + Signal results that are available for the evaluation. + """ + id: str + """ + Unique identifier for the account evaluation. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.signals.account_evaluation"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + pending_signals: List[ + Union[ + Literal[ + "fraudulent_website", + "user_account_sharing", + "user_multi_accounting", + ], + str, + ] + ] + """ + List of signals still pending evaluation. + """ + requested_signals: List[ + Union[ + Literal[ + "fraudulent_website", + "user_account_sharing", + "user_multi_accounting", + ], + str, + ] + ] + """ + List of signals requested for evaluation. + """ + _inner_class_types = { + "account_activity_details": AccountActivityDetails, + "account_details": AccountDetails, + "evaluated_signals": EvaluatedSignals, + } diff --git a/stripe/v2/signals/_account_evaluation_service.py b/stripe/v2/signals/_account_evaluation_service.py new file mode 100644 index 000000000..adbb41c8b --- /dev/null +++ b/stripe/v2/signals/_account_evaluation_service.py @@ -0,0 +1,100 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.signals._account_evaluation_create_params import ( + AccountEvaluationCreateParams, + ) + from stripe.params.v2.signals._account_evaluation_retrieve_params import ( + AccountEvaluationRetrieveParams, + ) + from stripe.v2.signals._account_evaluation import AccountEvaluation + + +class AccountEvaluationService(StripeService): + def create( + self, + params: "AccountEvaluationCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "AccountEvaluation": + """ + Creates a new account evaluation to request signal evaluations on an account, customer, or inline account data. + """ + return cast( + "AccountEvaluation", + self._request( + "post", + "/v2/signals/account_evaluations", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "AccountEvaluationCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "AccountEvaluation": + """ + Creates a new account evaluation to request signal evaluations on an account, customer, or inline account data. + """ + return cast( + "AccountEvaluation", + await self._request_async( + "post", + "/v2/signals/account_evaluations", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: Optional["AccountEvaluationRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "AccountEvaluation": + """ + Retrieves an AccountEvaluation by its ID. + """ + return cast( + "AccountEvaluation", + self._request( + "get", + "/v2/signals/account_evaluations/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["AccountEvaluationRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "AccountEvaluation": + """ + Retrieves an AccountEvaluation by its ID. + """ + return cast( + "AccountEvaluation", + await self._request_async( + "get", + "/v2/signals/account_evaluations/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/signals/_account_signal.py b/stripe/v2/signals/_account_signal.py index b3f0de0a6..4acb205bb 100644 --- a/stripe/v2/signals/_account_signal.py +++ b/stripe/v2/signals/_account_signal.py @@ -74,6 +74,18 @@ class Indicator(StripeObject): _inner_class_types = {"indicators": Indicator} _field_encodings = {"probability": "decimal_string"} + class FraudulentWebsite(StripeObject): + details: Optional[str] + """ + Human-readable details about the fraudulent website evaluation. + """ + risk_level: Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ] + """ + Categorical assessment of the fraudulent website risk. + """ + class MerchantDelinquency(StripeObject): class Indicator(StripeObject): explanation: str @@ -127,10 +139,93 @@ class Indicator(StripeObject): _inner_class_types = {"indicators": Indicator} _field_encodings = {"probability": "decimal_string"} + class PaymentDelinquencyExposure(StripeObject): + class AdditionalDetails(StripeObject): + class GrossExposureAmount(StripeObject): + currency: str + """ + ISO 4217 currency code. + """ + value: int + """ + Amount in minor units for the given currency. + """ + _field_encodings = {"value": "int64_string"} + + gross_exposure_amount: Optional[GrossExposureAmount] + """ + Total payments still exposed to dispute or refund risk in the event of delinquency. + """ + loss_given_default_in_percentages: Optional[int] + """ + Percentage of Gross Exposure expected to be disputed or refunded and materialize as a loss in the event of delinquency. + """ + predicted_dispute_window_in_days: Optional[int] + """ + Predicted window size in days until dispute is raised. + """ + _inner_class_types = {"gross_exposure_amount": GrossExposureAmount} + + class ExposureAmount(StripeObject): + currency: str + """ + ISO 4217 currency code. + """ + value: int + """ + Amount in minor units for the given currency. + """ + _field_encodings = {"value": "int64_string"} + + additional_details: AdditionalDetails + """ + Additional details about the exposure assessment. + """ + exposure_amount: ExposureAmount + """ + The exposure amount if this account becomes delinquent. + """ + _inner_class_types = { + "additional_details": AdditionalDetails, + "exposure_amount": ExposureAmount, + } + + class UserAccountSharing(StripeObject): + risk_level: Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ] + """ + Categorical assessment of the account-sharing risk. + """ + score: Optional[Decimal] + """ + The specific risk score for the account, between 0.00 and 100.00. Absent when risk level is + not_assessed or unknown, or when the user is not on a product tier that includes numeric scores. + """ + _field_encodings = {"score": "decimal_string"} + + class UserMultiAccounting(StripeObject): + risk_level: Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ] + """ + Categorical assessment of the multi-accounting risk. + """ + score: Optional[Decimal] + """ + The specific risk score for the account, between 0.00 and 100.00. Absent when risk level is + not_assessed or unknown, or when the user is not on a product tier that includes numeric scores. + """ + _field_encodings = {"score": "decimal_string"} + account_details: Optional[AccountDetails] """ The account or customer this signal is associated with. """ + account_evaluation: Optional[str] + """ + The account evaluation that produced this signal, if applicable. + """ created: str """ Timestamp at which the signal was created. @@ -139,6 +234,10 @@ class Indicator(StripeObject): """ Data for the fraudulent merchant signal. Present only when type is fraudulent_merchant. """ + fraudulent_website: Optional[FraudulentWebsite] + """ + Data for the fraudulent website signal. Present only when type is fraudulent_website. + """ id: str """ Unique identifier for the account signal. @@ -155,19 +254,38 @@ class Indicator(StripeObject): """ String representing the object's type. Objects of the same type share the same value of the object field. """ + payment_delinquency_exposure: Optional[PaymentDelinquencyExposure] + """ + Data for the payment delinquency exposure signal. Present only when type is payment_delinquency_exposure. + """ type: Union[ Literal[ "fraudulent_merchant", + "fraudulent_website", "merchant_delinquency", "payment_delinquency_exposure", + "user_account_sharing", + "user_multi_accounting", ], str, ] """ The type of signal. """ + user_account_sharing: Optional[UserAccountSharing] + """ + Data for the user account-sharing signal. Present only when type is user_account_sharing. + """ + user_multi_accounting: Optional[UserMultiAccounting] + """ + Data for the user multi-accounting signal. Present only when type is user_multi_accounting. + """ _inner_class_types = { "account_details": AccountDetails, "fraudulent_merchant": FraudulentMerchant, + "fraudulent_website": FraudulentWebsite, "merchant_delinquency": MerchantDelinquency, + "payment_delinquency_exposure": PaymentDelinquencyExposure, + "user_account_sharing": UserAccountSharing, + "user_multi_accounting": UserMultiAccounting, } diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 614a0642b..8fcff9b65 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -48980,6 +48980,68 @@ def test_v2_money_management_received_debit_get_2_service( api_base="https://api.stripe.com", ) + def test_v2_money_management_received_debit_mandate_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/received_debit_mandates", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.received_debit_mandates.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/received_debit_mandates", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_received_debit_mandate_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/received_debit_mandates/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.received_debit_mandates.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/received_debit_mandates/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_received_debit_mandate_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/received_debit_mandates/id_123/cancel", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.received_debit_mandates.cancel("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/money_management/received_debit_mandates/id_123/cancel", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + def test_v2_money_management_recipient_verification_post_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -49772,6 +49834,199 @@ def test_v2_reporting_report_run_get_service( api_base="https://api.stripe.com", ) + def test_v2_risk_inquiry_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/risk/inquiries", + "account=account", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.risk.inquiries.list({"account": "account"}) + http_client_mock.assert_requested( + "get", + path="/v2/risk/inquiries", + query_string="account=account", + api_base="https://api.stripe.com", + ) + + def test_v2_risk_inquiry_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/risk/inquiries/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.risk.inquiries.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/risk/inquiries/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_risk_inquiry_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/risk/inquiries/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.risk.inquiries.update("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/risk/inquiries/id_123", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_signals_account_activity_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/signals/account_activity", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.signals.account_activity.create( + { + "type": "registration_attempt", + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/signals/account_activity", + query_string="", + api_base="https://api.stripe.com", + post_data='{"type":"registration_attempt"}', + is_json=True, + ) + + def test_v2_signals_account_activity_delete_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "delete", + "/v2/signals/account_activity/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.signals.account_activity.delete("id_123") + http_client_mock.assert_requested( + "delete", + path="/v2/signals/account_activity/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_signals_account_activity_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/signals/account_activity/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.signals.account_activity.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/signals/account_activity/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_signals_account_evaluation_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/signals/account_evaluations", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.signals.account_evaluations.create( + { + "account_details": { + "account": "account", + "customer": "customer", + "data": { + "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_multi_accounting"], + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/signals/account_evaluations", + query_string="", + api_base="https://api.stripe.com", + post_data='{"account_details":{"account":"account","customer":"customer","data":{"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_multi_accounting"]}', + is_json=True, + ) + + def test_v2_signals_account_evaluation_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/signals/account_evaluations/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.signals.account_evaluations.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/signals/account_evaluations/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + def test_v2_signals_account_signal_get_service( self, http_client_mock: HTTPClientMock ) -> None: diff --git a/tests/test_integration.py b/tests/test_integration.py index ca1acdf1b..bf80daf9f 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -26,7 +26,23 @@ MOCK_HOST = os.environ.get("STRIPE_MOCK_HOST", "localhost") +class RequestSnapshot: + """Snapshot of request attributes, captured at handle time. + + With HTTP/1.1 keep-alive, multiple requests reuse the same handler + instance whose attributes get overwritten on each request. + """ + + def __init__(self, handler: BaseHTTPRequestHandler): + self.command = handler.command + self.path = handler.path + self.headers = handler.headers + + class MyTestHandler(BaseHTTPRequestHandler): + protocol_version = "HTTP/1.1" + timeout = 30 + num_requests = 0 requests = defaultdict(Queue) @@ -34,10 +50,10 @@ class MyTestHandler(BaseHTTPRequestHandler): @classmethod def _add_request(cls, req): q = cls.requests[id(cls)] - q.put(req) + q.put(RequestSnapshot(req)) @classmethod - def get_requests(cls, n) -> List[BaseHTTPRequestHandler]: + def get_requests(cls, n) -> List[RequestSnapshot]: reqs = [] for _ in range(n): reqs.append(cls.requests[id(cls)].get(False)) @@ -52,6 +68,12 @@ def do_POST(self): return self._do_request() def _do_request(self): + # Drain the request body so it doesn't pollute the next request + # on the keep-alive connection. + content_length = int(self.headers.get("Content-Length", 0)) + if content_length: + self.rfile.read(content_length) + n = self.__class__.num_requests self.__class__.num_requests += 1 self._add_request(self)