diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index b65b38505..b9e11f38e 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -28,7 +28,7 @@ ## Conventions -- Uses `requests` library by default for sync HTTP, `httpx` for async +- Uses `requests` library by default for sync HTTP, `httpx2` (falling back to `httpx`) for async - Type hints throughout - Virtual env managed in `.venv/`; `just` recipes handle setup automatically - Work is not complete until `just test`, `just lint` and `just typecheck` complete successfully. diff --git a/.hark/changes/2026-11-19_stripe-openapi_f73a4635.change.md b/.hark/changes/2026-11-19_stripe-openapi_f73a4635.change.md new file mode 100644 index 000000000..420565061 --- /dev/null +++ b/.hark/changes/2026-11-19_stripe-openapi_f73a4635.change.md @@ -0,0 +1,101 @@ +--- +title: Update generated code +pr_url: https://github.com/stripe/stripe-python/pull/1989 +semver_level: major +is_stripe_api_change: true +--- + +* Add support for new resources `v2.billing.GroupInvoice`, `v2.billing.GroupSpendModifier`, and `v2.billing.Group` +* ⚠️ Remove support for resources `v2.billing.CadenceSpendModifier` and `v2.billing.ContractPricingLineQuantityChange` +* Add support for `create` and `modify` methods on resource `InvoiceRenderingTemplate` +* Add support for `cancel`, `create`, `list`, `modify`, and `retrieve` methods on resource `v2.billing.Group` +* Add support for `retrieve` method on resource `v2.billing.GroupSpendModifier` +* Add support for `create` method on resource `v2.billing.GroupInvoice` +* ⚠️ Remove support for `retrieve` method on resource `v2.billing.CadenceSpendModifier` +* ⚠️ Remove support for `billing_cadence` on `Billing.Alert.SpendThreshold.Filter`, `Billing.AlertTriggered.GroupBy`, `InvoiceCreatePreviewParams`, `InvoiceListParams`, `SubscriptionCreateParams`, `SubscriptionListParams`, `SubscriptionModifyParams`, `Subscription`, `V2.Billing.PricingPlanSubscription`, `V2.Billing.RateCardSubscription`, `billing.AlertCreateParamsSpendThresholdFilter`, `v2.billing.PricingPlanSubscriptionListParams`, `v2.billing.RateCardSubscriptionCreateParams`, and `v2.billing.RateCardSubscriptionListParams` +* ⚠️ Add support for new value `billing_group` on enum `Billing.AlertTriggered.GroupBy.type` +* ⚠️ Remove support for value `billing_cadence` from enum `Billing.AlertTriggered.GroupBy.type` +* Add support for `scheduled_fee` on `V2.Billing.ContractTerm`, `v2.billing.ContractCreateParamsTerm`, `v2.billing.ContractModifyParamsActionAddTerm`, and `v2.billing.ContractModifyParamsActionUpdateTerm` +* ⚠️ Remove support for `ad_hoc_product` on `V2.Billing.ContractTerm`, `v2.billing.ContractCreateParamsTerm`, `v2.billing.ContractModifyParamsActionAddTerm`, and `v2.billing.ContractModifyParamsActionUpdateTerm` +* ⚠️ Add support for new value `scheduled_fee` on enums `V2.Billing.ContractTerm.type`, `v2.billing.ContractCreateParamsTerm.type`, `v2.billing.ContractModifyParamsActionAddTerm.type`, and `v2.billing.ContractTermListContractTermsParams.type` +* ⚠️ Remove support for value `ad_hoc_product` from enums `V2.Billing.ContractTerm.type`, `v2.billing.ContractCreateParamsTerm.type`, `v2.billing.ContractModifyParamsActionAddTerm.type`, and `v2.billing.ContractTermListContractTermsParams.type` +* ⚠️ Add support for new value `billing_group` on enums `Billing.Alert.SpendThreshold.group_by` and `billing.AlertCreateParamsSpendThreshold.group_by` +* ⚠️ Remove support for value `billing_cadence` from enums `Billing.Alert.SpendThreshold.group_by` and `billing.AlertCreateParamsSpendThreshold.group_by` +* ⚠️ Remove support for `cadence` on `Billing.AlertNotification`, `V2.Billing.Intent`, `billing.BillingAlertListAlertNotificationParams`, and `v2.billing.IntentCreateParams` +* ⚠️ Remove support for `pricing_token` on `checkout.SessionCreateParams` +* Add support for `pass_through_fee_cost` on `Checkout.Session` +* Add support for new value `dealerfx` on enums `Checkout.Session.AutomaticSurcharge.provider` and `PaymentLink.AutomaticSurcharge.provider` +* Add support for `amount_pass_through_fee` on `Checkout.Session.TotalDetail` +* ⚠️ Change `GiftCardOperation.Activation.balance` and `GiftCardOperation.Reload.balance` to be optional +* Add support for `link_shared_data` on `identity.VerificationSessionCreateParams` +* Add support for `line_item_policy`, `rendering_settings`, and `summary_item_policies` on `InvoiceRenderingTemplate` +* Add support for `billing_group` on `InvoiceCreatePreviewParams`, `InvoiceListParams`, `V2.Billing.Intent`, `V2.Billing.PricingPlanSubscription`, `V2.Billing.RateCardSubscription`, `v2.billing.IntentCreateParams`, `v2.billing.PricingPlanSubscriptionListParams`, and `v2.billing.RateCardSubscriptionListParams` +* Add support for `applied_credit_memos` on `Invoice` and `QuotePreviewInvoice` +* Add support for `billing_group_details` on `Invoice.Parent` and `QuotePreviewInvoice.Parent` +* ⚠️ Remove support for `billing_cadence_details` on `Invoice.Parent` and `QuotePreviewInvoice.Parent` +* ⚠️ Add support for new value `billing_group_details` on enums `Invoice.Parent.type` and `QuotePreviewInvoice.Parent.type` +* ⚠️ Remove support for value `billing_cadence_details` from enums `Invoice.Parent.type` and `QuotePreviewInvoice.Parent.type` +* Add support for `token_service_provider_id` on `Issuing.Authorization.TokenDetail.NetworkDatum.Visa` and `Issuing.Token.NetworkDatum.Visa` +* Add support for `amount_type`, `amount`, `currency`, `description`, `end_date`, `interval_count`, `interval`, `reference`, and `start_date` on `Mandate.PaymentMethodDetail.Card.India` +* Add support for `three_d_secure` on `PaymentAttemptRecordReportFailedParamsPaymentMethodDetailCard` and `PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailCard` +* Add support for `provider_signature_data` and `provider_signature` on `PaymentIntent.PaymentMethodOption.CardPresent.AadeDatum`, `PaymentIntentConfirmParamsPaymentMethodOptionCardPresentAadeDatum`, `PaymentIntentCreateParamsPaymentMethodOptionCardPresentAadeDatum`, and `PaymentIntentModifyParamsPaymentMethodOptionCardPresentAadeDatum` +* ⚠️ Remove support for `mark_data` and `signed_mark` on `PaymentIntent.PaymentMethodOption.CardPresent.AadeDatum`, `PaymentIntentConfirmParamsPaymentMethodOptionCardPresentAadeDatum`, `PaymentIntentCreateParamsPaymentMethodOptionCardPresentAadeDatum`, and `PaymentIntentModifyParamsPaymentMethodOptionCardPresentAadeDatum` +* Add support for `request_multicapture` on `PaymentIntent.PaymentMethodOption.Vipp`, `PaymentIntentConfirmParamsPaymentMethodOptionVipp`, `PaymentIntentCreateParamsPaymentMethodOptionVipp`, and `PaymentIntentModifyParamsPaymentMethodOptionVipp` +* Add support for `is_free_trial_transaction` on `PaymentIntentConfirmParamsRadarOption` and `PaymentIntentCreateParamsRadarOption` +* Add support for new value `tron` on enum `PaymentIntentUpdateCryptoRefundAddressParams.network` +* Add support for `radar_options` on `PaymentIntent` +* Add support for `aeon_pay`, `au_pay`, `dbarai`, and `merpay` on `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationModifyParams`, and `PaymentMethodConfiguration` +* Add support for `requested_signals` on `Radar.PaymentEvaluation` and `radar.PaymentEvaluationCreateParams` +* Add support for `gift_card` on `Refund.DestinationDetail` +* Add support for `days_after_fulfillment` on `Reserve.Plan.RollingRelease` +* Add support for `rendering` on `SubscriptionScheduleCreateParamsDefaultSettingInvoiceSetting` and `SubscriptionScheduleModifyParamsDefaultSettingInvoiceSetting` +* Add support for `debit_behavior` on `Subscription.PaymentSetting.PaymentMethodOption.Card`, `Subscription.PaymentSetting.PaymentMethodOption.Pix`, `Subscription.PaymentSetting.PaymentMethodOption.Upi`, `SubscriptionCreateParamsPaymentSettingPaymentMethodOptionCard`, `SubscriptionCreateParamsPaymentSettingPaymentMethodOptionPix`, `SubscriptionCreateParamsPaymentSettingPaymentMethodOptionUpi`, `SubscriptionModifyParamsPaymentSettingPaymentMethodOptionCard`, `SubscriptionModifyParamsPaymentSettingPaymentMethodOptionPix`, and `SubscriptionModifyParamsPaymentSettingPaymentMethodOptionUpi` +* Add support for `presentment_details` on `Subscription.PendingUpdate` +* ⚠️ Remove support for `device_health_details` and `device_health` on `Terminal.Reader` +* Add support for `billing_group_data` on `V2.Billing.Intent` and `v2.billing.IntentCreateParams` +* ⚠️ Remove support for `cadence_data` on `V2.Billing.Intent` and `v2.billing.IntentCreateParams` +* Add support for new value `group` on enums `V2.Billing.IntentAction.Apply.InvoiceDiscountRule.applies_to` and `v2.billing.IntentCreateParamsActionApplyInvoiceDiscountRule.applies_to` +* Add support for new value `account_dashboard` on enums `V2.Core.AccountLink.UseCase.type` and `v2.core.AccountLinkCreateParamsUseCase.type` +* Add support for `touch_n_go_payments`, `truemoney_payments`, `wechat_pay_mobile_web_payments`, `wechat_pay_payments`, and `wero_payments` on `V2.Core.Account.Configuration.Merchant.Capability`, `v2.core.AccountCreateParamsConfigurationMerchantCapability`, and `v2.core.AccountModifyParamsConfigurationMerchantCapability` +* Add support for `business_demand_deposit_account_fifth_third_storage` on `V2.Core.Account.Configuration.MoneyManager.Capability`, `v2.core.AccountCreateParamsConfigurationMoneyManagerCapability`, and `v2.core.AccountModifyParamsConfigurationMoneyManagerCapability` +* Add support for `tips` on `V2.Core.Account.Configuration.Recipient.Capability.BankAccount`, `v2.core.AccountCreateParamsConfigurationRecipientCapabilityBankAccount`, and `v2.core.AccountModifyParamsConfigurationRecipientCapabilityBankAccount` +* Add support for `business_demand_deposit_account_fifth_third` on `V2.Core.Account.Identity.Attestation.TermsOfService`, `v2.core.AccountCreateParamsIdentityAttestationTermsOfService`, and `v2.core.AccountModifyParamsIdentityAttestationTermsOfService` +* Add support for `channel` on `V2.Core.ClaimableSandbox` and `v2.core.ClaimableSandboxCreateParams` +* ⚠️ Remove support for `app_channel` on `V2.Core.ClaimableSandbox` and `v2.core.ClaimableSandboxCreateParams` +* Add support for `return_url` on `V2.Core.ClaimableSandbox.OnboardingLinkDetail`, `v2.core.ClaimableSandboxCreateParamsOnboardingLinkDetail`, and `v2.core.ClaimableSandboxRenewOnboardingLinkParamsOnboardingLinkDetail` +* ⚠️ Change type of `V2.Core.ClaimableSandbox.SandboxDetail.ApiKey.mcp` from `string` to `an object` +* ⚠️ Change type of `V2.Core.ClaimableSandbox.SandboxDetail.ApiKey.publishable` from `string` to `an object` +* ⚠️ Change type of `V2.Core.ClaimableSandbox.SandboxDetail.ApiKey.secret` from `string` to `an object` +* ⚠️ Change `V2.Core.ClaimableSandbox.onboarding_link_details` to be optional +* ⚠️ Change `V2.Core.ClaimableSandbox.OwnerDetail.app_install_status` to be optional +* Add support for `custom_payment_method_adapter_degraded` on `V2.Core.Health.AlertHistoryEntry` and `V2.Core.Health.Alert` +* Add support for new value `custom_payment_method_adapter_degraded` on enums `V2.Core.Health.Alert.type` and `V2.Core.Health.AlertHistoryEntry.type` +* Add support for `funds_holding_structure` on `V2.MoneyManagement.FinancialAccount.Storage` and `v2.money_management.FinancialAccountCreateParamsStorage` +* Add support for `au_becs_debit` on `V2.MoneyManagement.InboundTransfer.From.PaymentMethod` +* Add support for new value `tips` on enums `V2.MoneyManagement.OutboundPaymentQuote.EstimatedFee.NetworkFeeDetail.network` and `V2.MoneyManagement.PayoutIntent.EstimatedFee.NetworkFeeDetail.network` +* Add support for new value `tips` on enums `V2.MoneyManagement.OutboundPayment.To.PayoutMethodOption.BankAccount.preferred_networks`, `V2.MoneyManagement.OutboundPaymentQuote.To.PayoutMethodOption.BankAccount.preferred_networks`, `V2.MoneyManagement.OutboundTransfer.To.PayoutMethodOption.BankAccount.preferred_networks`, `V2.MoneyManagement.PayoutIntent.To.PayoutMethodOption.BankAccount.preferred_networks`, `v2.money_management.OutboundPaymentCreateParamsToPayoutMethodOptionBankAccount.preferred_networks`, `v2.money_management.OutboundPaymentQuoteCreateParamsToPayoutMethodOptionBankAccount.preferred_networks`, `v2.money_management.OutboundTransferCreateParamsToPayoutMethodOptionBankAccount.preferred_networks`, `v2.money_management.PayoutIntentCreateParamsToPayoutMethodOptionBankAccount.preferred_networks`, and `v2.money_management.PayoutIntentModifyParamsToPayoutMethodOptionBankAccount.preferred_networks` +* Add support for `network` on `V2.MoneyManagement.ReceivedDebit.BankTransfer` +* Add support for new values `inbound_funding_reversal` and `inbound_funding` on enums `V2.MoneyManagement.Transaction.category` and `V2.MoneyManagement.TransactionEntry.TransactionDetail.category` +* Add support for new value `inbound_funding` on enums `V2.MoneyManagement.Transaction.Flow.type` and `V2.MoneyManagement.TransactionEntry.TransactionDetail.Flow.type` +* Add support for `settlement_timing` on `v2.money_management.FundingIntentModifyParams` +* Add support for new value `custom_payment_method_adapter_degraded` on enum `v2.core.health.AlertListParams.types` +* Add support for `include` on `v2.core.ClaimableSandboxRetrieveParams` +* Change `v2.core.ClaimableSandboxRenewOnboardingLinkParamsOnboardingLinkDetail.refresh_url` to be optional +* ⚠️ Add support for `billing_group` on `v2.billing.RateCardSubscriptionCreateParams` +* ⚠️ Remove support for `one_time_fees`, `pricing_lines`, and `pricing_overrides` on `v2.billing.ContractCreateParams` +* Add support for new value `now` on enums `v2.billing.ContractCreateParamsTermPricingOverrideEndsAt.type`, `v2.billing.ContractCreateParamsTermRecurringPriceEndsAt.type`, `v2.billing.ContractModifyParamsActionAddTermPricingOverrideEndsAt.type`, `v2.billing.ContractModifyParamsActionAddTermRecurringPriceEndsAt.type`, `v2.billing.ContractModifyParamsActionUpdateTermPricingOverrideEndsAt.type`, and `v2.billing.ContractModifyParamsActionUpdateTermRecurringPriceEndsAt.type` +* Add support for new value `now` on enums `v2.billing.ContractCreateParamsTermPricingOverrideStartsAt.type`, `v2.billing.ContractCreateParamsTermRecurringPriceStartsAt.type`, `v2.billing.ContractModifyParamsActionAddTermPricingOverrideStartsAt.type`, `v2.billing.ContractModifyParamsActionAddTermRecurringPriceStartsAt.type`, `v2.billing.ContractModifyParamsActionUpdateTermPricingOverrideStartsAt.type`, and `v2.billing.ContractModifyParamsActionUpdateTermRecurringPriceStartsAt.type` +* Add support for `contract_number` on `v2.billing.ContractModifyParams` +* ⚠️ Remove support for `one_time_fee_actions`, `pricing_line_actions`, and `pricing_override_actions` on `v2.billing.ContractModifyParams` +* ⚠️ Remove support for `cancel_pricing_lines` on `v2.billing.ContractCancelParams` +* Add support for new values `business_demand_deposit_account_fifth_third_storage.inbound.usd` and `business_demand_deposit_account_fifth_third_storage.outbound.usd` on enum `EventsV2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent.updated_capability` +* Add support for new value `bank_accounts.tips` on enum `EventsV2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.updated_capability` +* Add support for `charge` on `EventsV2PaymentsOffSessionPaymentAttemptFailedEvent`, `EventsV2PaymentsOffSessionPaymentFailedEvent`, and `EventsV2PaymentsOffSessionPaymentSucceededEvent` +* Add support for `last_attempt_error` on `EventsV2PaymentsOffSessionPaymentAttemptFailedEvent` and `EventsV2PaymentsOffSessionPaymentFailedEvent` +* Add support for `payment_attempt_record` on `EventsV2PaymentsOffSessionPaymentSucceededEvent` +* Add support for event notifications `V2BillingContractTermPricingOverrideEndedEvent`, `V2BillingContractTermPricingOverrideStartedEvent`, `V2BillingContractTermRecurringPriceEndedEvent`, `V2BillingContractTermRecurringPriceStartedEvent`, `V2BillingContractTermScheduledFeeServicePeriodEndedEvent`, and `V2BillingContractTermScheduledFeeServicePeriodStartedEvent` with related object `v2.billing.ContractTerm` +* Add support for event notifications `V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEvent` and `V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEvent` +* Add support for event notifications `V2SignalsPaymentRetryEvaluationCanceledEvent`, `V2SignalsPaymentRetryEvaluationCompletedEvent`, `V2SignalsPaymentRetryEvaluationCreatedEvent`, `V2SignalsPaymentRetryEvaluationExpiredEvent`, and `V2SignalsPaymentRetryEvaluationUpdatedEvent` with related object `v2.signals.PaymentRetryEvaluation` +* ⚠️ Remove support for event notifications `V2BillingCadenceBilledEvent`, `V2BillingCadenceCanceledEvent`, and `V2BillingCadenceCreatedEvent` with related object `v2.billing.Cadence` +* ⚠️ Add error type `RateLimitError` on `v2.core.ClaimableSandbox#create` +* Add support for error code `scheduled_cancellation_conflicts_with_updated_terms` on `CannotProceedError` diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 6e0b23f57..06a01d0ea 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -5b1e713ce463b45ef5e0d44fe81667a61fd28115 \ No newline at end of file +f3581f76eec818aa658fd9635eaf0107d13e3441 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 71a784933..d313855f3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2600 \ No newline at end of file +v2602 \ No newline at end of file diff --git a/README.md b/README.md index c40ed3e96..6dd63449e 100644 --- a/README.md +++ b/README.md @@ -370,9 +370,12 @@ async for c in await stripe.Customer.list_async().auto_paging_iter(): There is no `.save_async` as `.save` is [deprecated since stripe-python v5](https://github.com/stripe/stripe-python/wiki/Migration-guide-for-v5#deprecated). Please migrate to `.modify_async`. The default HTTP client uses `requests` for making synchronous requests but -`httpx` for making async requests. If you're migrating to async, we recommend -you to explicitly initialize your own http client and pass it to StripeClient -or set it as the global default. +`httpx2` for making async requests, falling back to `httpx` if `httpx2` isn't +installed (and to `aiohttp` if neither is). We recommend `pip install httpx2` +for async use, since `httpx` is no longer actively maintained. `httpx` support +is deprecated and will be removed in the next major version of stripe-python. +If you're migrating to async, we recommend you to explicitly initialize your own +http client and pass it to StripeClient or set it as the global default. If you don't already have a dependency on an async-compatible HTTP library, `pip install stripe[async]` will install one for you (new in `v13.0.1`). @@ -382,7 +385,7 @@ If you don't already have a dependency on an async-compatible HTTP library, `pip # make sure you don't unintentionally make a synchronous request. my_http_client = stripe.HTTPXClient() -# If you want to use httpx to make sync requests, you can disable this +# If you want to use httpx2 to make sync requests, you can disable this # behavior. my_http_client = stripe.HTTPXClient(allow_sync_methods=True) diff --git a/deps/test-requirements.txt b/deps/test-requirements.txt index e8ab486b2..24fffcb55 100644 --- a/deps/test-requirements.txt +++ b/deps/test-requirements.txt @@ -1,17 +1,14 @@ # packages needed to run unit tests (including extra supported http libraries) -# version requirements: all supported versions (currently 3.6-3.12) +# version requirements: all supported versions (currently 3.9-3.14) -# This is the last version of httpx compatible with Python 3.6 -httpx == 0.22.0; python_version == "3.6" -httpx >= 0.24.1; python_version == "3.7" -httpx >= 0.27.0; python_version >= "3.8" -aiohttp == 3.8.6; python_version <= "3.7" -aiohttp == 3.10.11; python_version == "3.8" -aiohttp == 3.12.15; python_version >= "3.9" -anyio[trio] == 3.6.2; python_version < "3.13" -anyio[trio] == 4.11.0; python_version >= "3.13" +httpx2 >= 2.0.0 +# fallback when httpx2 isn't installed +# TODO: (DEVSDK-3427) remove httpx in the next major version +httpx >= 0.27.0 +aiohttp == 3.12.15 +# httpx2 requires anyio >= 4.10 since 2.9.0 +anyio[trio] == 4.10.0 pytest-mock >= 2.0.0 -mock >= 4.0; python_version < "3.8" pytest-xdist >= 1.31.0 pytest >= 6.0.0,<9.0.0 diff --git a/pyproject.toml b/pyproject.toml index f8ea90dc4..d2261b6ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,12 +15,12 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", diff --git a/stripe/_api_requestor.py b/stripe/_api_requestor.py index 3cd1fc391..13100771e 100644 --- a/stripe/_api_requestor.py +++ b/stripe/_api_requestor.py @@ -61,6 +61,7 @@ from stripe._base_address import BaseAddress from stripe._api_mode import ApiMode +from stripe._stripe_object import API_KEY_SERIALIZATION_CONSTANT if TYPE_CHECKING: from stripe._app_info import AppInfo @@ -166,6 +167,12 @@ def _new_requestor_with_options( """ Returns a new _APIRequestor instance with the same HTTP client but a (potentially) updated set of options. Useful for ensuring the original isn't modified, but any options the original had are still used. """ + if self.api_key == API_KEY_SERIALIZATION_CONSTANT: + raise error.AuthenticationError( + "This object was unpickled without API credentials. " + "Call reattach_api_key(api_key) on the object before making requests." + ) + options = options or {} new_options = self._options.to_dict() for key in PERSISTENT_OPTIONS_KEYS: @@ -702,6 +709,12 @@ def _args_for_request_with_retries( """ Mechanism for issuing an API call. Used by request_raw and request_raw_async. """ + if self.api_key == API_KEY_SERIALIZATION_CONSTANT: + raise error.AuthenticationError( + "This object was unpickled without API credentials. " + "Call reattach_api_key(api_key) on the object before making requests." + ) + request_options = merge_options(self._options, options) # Special stripe_version handling for v2 requests: diff --git a/stripe/_api_version.py b/stripe/_api_version.py index 09cb8e4ec..57c285085 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2026-10-28.preview" + CURRENT = "2026-11-18.preview" CURRENT_MAJOR = "" diff --git a/stripe/_charge.py b/stripe/_charge.py index ba4db8167..db87e2c87 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -1570,7 +1570,13 @@ class Crypto(StripeObject): network: Optional[ Union[ Literal[ - "base", "ethereum", "polygon", "solana", "sui", "tempo" + "base", + "ethereum", + "polygon", + "solana", + "sui", + "tempo", + "tron", ], str, ] diff --git a/stripe/_coupon.py b/stripe/_coupon.py index 6a57020d2..f39c8117c 100644 --- a/stripe/_coupon.py +++ b/stripe/_coupon.py @@ -47,6 +47,24 @@ class CurrencyOptions(StripeObject): Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. """ + class Custom(StripeObject): + class Extension(StripeObject): + id: str + """ + The Extension Prototype ID. + """ + version: str + """ + The semantic version of the extension. + """ + + configuration: UntypedStripeObject[Any] + """ + The configuration supplied to the extension. + """ + extension: Extension + _inner_class_types = {"extension": Extension} + class Script(StripeObject): configuration: UntypedStripeObject[Any] """ @@ -100,6 +118,7 @@ class Iterations(StripeObject): """ Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). """ + custom: Optional[Custom] deleted: Optional[Literal[True]] """ Always true for a deleted object @@ -155,7 +174,9 @@ class Iterations(StripeObject): """ Number of times this coupon has been applied to a customer. """ - type: Optional[Union[Literal["amount_off", "percent_off", "script"], str]] + type: Optional[ + Union[Literal["amount_off", "custom", "percent_off", "script"], str] + ] """ The type of coupon logic used to calculate the discount. """ @@ -391,6 +412,7 @@ async def retrieve_async( _inner_class_types = { "applies_to": AppliesTo, "currency_options": CurrencyOptions, + "custom": Custom, "script": Script, "service_period": ServicePeriod, } diff --git a/stripe/_dispute.py b/stripe/_dispute.py index 3ae86b329..d3df39ab0 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -496,7 +496,7 @@ class SmartDisputes(StripeObject): """ balance_transactions: List["BalanceTransaction"] """ - List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. + List of balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. """ charge: ExpandableField["Charge"] """ diff --git a/stripe/_event.py b/stripe/_event.py index 5f409a5ba..91e18fe1a 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -131,7 +131,7 @@ class Request(StripeObject): """ pending_webhooks: int """ - Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. + Number of webhooks that haven't been successfully delivered (for example, to return a 20x response). This count can include deliveries to endpoints that belong to Connect platforms or apps with access to your account. These endpoints don't appear when you list your account's webhook endpoints or event destinations. To see the delivery status for each endpoint, view the event in [Workbench](https://docs.stripe.com/workbench/overview#events). """ reason: Optional[Reason] """ @@ -472,7 +472,7 @@ class Request(StripeObject): @classmethod def list(cls, **params: Unpack["EventListParams"]) -> ListObject["Event"]: """ - List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). + List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object api_version attribute (not according to your current Stripe API version or Stripe-Version header). The list includes only events for the account that makes the request. A platform's list doesn't include events from its connected accounts. To list a connected account's events, make the request as the connected account](https://docs.stripe.com/api/events/object) using the Stripe-Account header. """ result = cls._static_request( "get", @@ -492,7 +492,7 @@ async def list_async( cls, **params: Unpack["EventListParams"] ) -> ListObject["Event"]: """ - List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). + List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object api_version attribute (not according to your current Stripe API version or Stripe-Version header). The list includes only events for the account that makes the request. A platform's list doesn't include events from its connected accounts. To list a connected account's events, make the request as the connected account](https://docs.stripe.com/api/events/object) using the Stripe-Account header. """ result = await cls._static_request_async( "get", diff --git a/stripe/_event_notification_handler.py b/stripe/_event_notification_handler.py index b7f9927d6..2cd3326e1 100644 --- a/stripe/_event_notification_handler.py +++ b/stripe/_event_notification_handler.py @@ -840,15 +840,6 @@ from stripe.events._v1_transfer_updated_event import ( V1TransferUpdatedEventNotification, ) - from stripe.events._v2_billing_cadence_billed_event import ( - V2BillingCadenceBilledEventNotification, - ) - from stripe.events._v2_billing_cadence_canceled_event import ( - V2BillingCadenceCanceledEventNotification, - ) - from stripe.events._v2_billing_cadence_created_event import ( - V2BillingCadenceCreatedEventNotification, - ) from stripe.events._v2_billing_contract_activated_event import ( V2BillingContractActivatedEventNotification, ) @@ -879,6 +870,24 @@ from stripe.events._v2_billing_contract_term_deleted_event import ( V2BillingContractTermDeletedEventNotification, ) + from stripe.events._v2_billing_contract_term_pricing_override_ended_event import ( + V2BillingContractTermPricingOverrideEndedEventNotification, + ) + from stripe.events._v2_billing_contract_term_pricing_override_started_event import ( + V2BillingContractTermPricingOverrideStartedEventNotification, + ) + from stripe.events._v2_billing_contract_term_recurring_price_ended_event import ( + V2BillingContractTermRecurringPriceEndedEventNotification, + ) + from stripe.events._v2_billing_contract_term_recurring_price_started_event import ( + V2BillingContractTermRecurringPriceStartedEventNotification, + ) + from stripe.events._v2_billing_contract_term_scheduled_fee_service_period_ended_event import ( + V2BillingContractTermScheduledFeeServicePeriodEndedEventNotification, + ) + from stripe.events._v2_billing_contract_term_scheduled_fee_service_period_started_event import ( + V2BillingContractTermScheduledFeeServicePeriodStartedEventNotification, + ) from stripe.events._v2_billing_contract_term_updated_event import ( V2BillingContractTermUpdatedEventNotification, ) @@ -1155,6 +1164,12 @@ from stripe.events._v2_core_health_authorization_rate_drop_resolved_event import ( V2CoreHealthAuthorizationRateDropResolvedEventNotification, ) + from stripe.events._v2_core_health_custom_payment_method_adapter_degraded_firing_event import ( + V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEventNotification, + ) + from stripe.events._v2_core_health_custom_payment_method_adapter_degraded_resolved_event import ( + V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEventNotification, + ) from stripe.events._v2_core_health_elements_error_firing_event import ( V2CoreHealthElementsErrorFiringEventNotification, ) @@ -1698,9 +1713,24 @@ from stripe.events._v2_signals_account_signal_payment_delinquency_exposure_ready_event import ( V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification, ) + from stripe.events._v2_signals_payment_retry_evaluation_canceled_event import ( + V2SignalsPaymentRetryEvaluationCanceledEventNotification, + ) + from stripe.events._v2_signals_payment_retry_evaluation_completed_event import ( + V2SignalsPaymentRetryEvaluationCompletedEventNotification, + ) + from stripe.events._v2_signals_payment_retry_evaluation_created_event import ( + V2SignalsPaymentRetryEvaluationCreatedEventNotification, + ) + from stripe.events._v2_signals_payment_retry_evaluation_expired_event import ( + V2SignalsPaymentRetryEvaluationExpiredEventNotification, + ) from stripe.events._v2_signals_payment_retry_evaluations_retry_recommended_event import ( V2SignalsPaymentRetryEvaluationsRetryRecommendedEventNotification, ) + from stripe.events._v2_signals_payment_retry_evaluation_updated_event import ( + V2SignalsPaymentRetryEvaluationUpdatedEventNotification, + ) # event-notification-types: The end of the section generated from our OpenAPI spec # internal type to represent any EventNotification subclass @@ -5308,45 +5338,6 @@ def on_v1_transfer_updated( ) return func - def on_v2_billing_cadence_billed( - self, - func: "Callable[[V2BillingCadenceBilledEventNotification, StripeClient], CallbackReturn]", - ): - """ - Registers a callback for the `V2BillingCadenceBilledEvent` (`v2.billing.cadence.billed`) event notification. - """ - self._register( - "v2.billing.cadence.billed", - func, - ) - return func - - def on_v2_billing_cadence_canceled( - self, - func: "Callable[[V2BillingCadenceCanceledEventNotification, StripeClient], CallbackReturn]", - ): - """ - Registers a callback for the `V2BillingCadenceCanceledEvent` (`v2.billing.cadence.canceled`) event notification. - """ - self._register( - "v2.billing.cadence.canceled", - func, - ) - return func - - def on_v2_billing_cadence_created( - self, - func: "Callable[[V2BillingCadenceCreatedEventNotification, StripeClient], CallbackReturn]", - ): - """ - Registers a callback for the `V2BillingCadenceCreatedEvent` (`v2.billing.cadence.created`) event notification. - """ - self._register( - "v2.billing.cadence.created", - func, - ) - return func - def on_v2_billing_contract_activated( self, func: "Callable[[V2BillingContractActivatedEventNotification, StripeClient], CallbackReturn]", @@ -5477,6 +5468,84 @@ def on_v2_billing_contract_term_deleted( ) return func + def on_v2_billing_contract_term_pricing_override_ended( + self, + func: "Callable[[V2BillingContractTermPricingOverrideEndedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2BillingContractTermPricingOverrideEndedEvent` (`v2.billing.contract_term.pricing_override_ended`) event notification. + """ + self._register( + "v2.billing.contract_term.pricing_override_ended", + func, + ) + return func + + def on_v2_billing_contract_term_pricing_override_started( + self, + func: "Callable[[V2BillingContractTermPricingOverrideStartedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2BillingContractTermPricingOverrideStartedEvent` (`v2.billing.contract_term.pricing_override_started`) event notification. + """ + self._register( + "v2.billing.contract_term.pricing_override_started", + func, + ) + return func + + def on_v2_billing_contract_term_recurring_price_ended( + self, + func: "Callable[[V2BillingContractTermRecurringPriceEndedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2BillingContractTermRecurringPriceEndedEvent` (`v2.billing.contract_term.recurring_price_ended`) event notification. + """ + self._register( + "v2.billing.contract_term.recurring_price_ended", + func, + ) + return func + + def on_v2_billing_contract_term_recurring_price_started( + self, + func: "Callable[[V2BillingContractTermRecurringPriceStartedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2BillingContractTermRecurringPriceStartedEvent` (`v2.billing.contract_term.recurring_price_started`) event notification. + """ + self._register( + "v2.billing.contract_term.recurring_price_started", + func, + ) + return func + + def on_v2_billing_contract_term_scheduled_fee_service_period_ended( + self, + func: "Callable[[V2BillingContractTermScheduledFeeServicePeriodEndedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2BillingContractTermScheduledFeeServicePeriodEndedEvent` (`v2.billing.contract_term.scheduled_fee_service_period_ended`) event notification. + """ + self._register( + "v2.billing.contract_term.scheduled_fee_service_period_ended", + func, + ) + return func + + def on_v2_billing_contract_term_scheduled_fee_service_period_started( + self, + func: "Callable[[V2BillingContractTermScheduledFeeServicePeriodStartedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2BillingContractTermScheduledFeeServicePeriodStartedEvent` (`v2.billing.contract_term.scheduled_fee_service_period_started`) event notification. + """ + self._register( + "v2.billing.contract_term.scheduled_fee_service_period_started", + func, + ) + return func + def on_v2_billing_contract_term_updated( self, func: "Callable[[V2BillingContractTermUpdatedEventNotification, StripeClient], CallbackReturn]", @@ -6673,6 +6742,32 @@ def on_v2_core_health_authorization_rate_drop_resolved( ) return func + def on_v2_core_health_custom_payment_method_adapter_degraded_firing( + self, + func: "Callable[[V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEvent` (`v2.core.health.custom_payment_method_adapter_degraded.firing`) event notification. + """ + self._register( + "v2.core.health.custom_payment_method_adapter_degraded.firing", + func, + ) + return func + + def on_v2_core_health_custom_payment_method_adapter_degraded_resolved( + self, + func: "Callable[[V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEvent` (`v2.core.health.custom_payment_method_adapter_degraded.resolved`) event notification. + """ + self._register( + "v2.core.health.custom_payment_method_adapter_degraded.resolved", + func, + ) + return func + def on_v2_core_health_elements_error_firing( self, func: "Callable[[V2CoreHealthElementsErrorFiringEventNotification, StripeClient], CallbackReturn]", @@ -9026,6 +9121,58 @@ def on_v2_signals_account_signal_payment_delinquency_exposure_ready( ) return func + def on_v2_signals_payment_retry_evaluation_canceled( + self, + func: "Callable[[V2SignalsPaymentRetryEvaluationCanceledEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2SignalsPaymentRetryEvaluationCanceledEvent` (`v2.signals.payment_retry_evaluation.canceled`) event notification. + """ + self._register( + "v2.signals.payment_retry_evaluation.canceled", + func, + ) + return func + + def on_v2_signals_payment_retry_evaluation_completed( + self, + func: "Callable[[V2SignalsPaymentRetryEvaluationCompletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2SignalsPaymentRetryEvaluationCompletedEvent` (`v2.signals.payment_retry_evaluation.completed`) event notification. + """ + self._register( + "v2.signals.payment_retry_evaluation.completed", + func, + ) + return func + + def on_v2_signals_payment_retry_evaluation_created( + self, + func: "Callable[[V2SignalsPaymentRetryEvaluationCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2SignalsPaymentRetryEvaluationCreatedEvent` (`v2.signals.payment_retry_evaluation.created`) event notification. + """ + self._register( + "v2.signals.payment_retry_evaluation.created", + func, + ) + return func + + def on_v2_signals_payment_retry_evaluation_expired( + self, + func: "Callable[[V2SignalsPaymentRetryEvaluationExpiredEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2SignalsPaymentRetryEvaluationExpiredEvent` (`v2.signals.payment_retry_evaluation.expired`) event notification. + """ + self._register( + "v2.signals.payment_retry_evaluation.expired", + func, + ) + return func + def on_v2_signals_payment_retry_evaluations_retry_recommended( self, func: "Callable[[V2SignalsPaymentRetryEvaluationsRetryRecommendedEventNotification, StripeClient], CallbackReturn]", @@ -9039,6 +9186,19 @@ def on_v2_signals_payment_retry_evaluations_retry_recommended( ) return func + def on_v2_signals_payment_retry_evaluation_updated( + self, + func: "Callable[[V2SignalsPaymentRetryEvaluationUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2SignalsPaymentRetryEvaluationUpdatedEvent` (`v2.signals.payment_retry_evaluation.updated`) event notification. + """ + self._register( + "v2.signals.payment_retry_evaluation.updated", + func, + ) + return func + # event-notification-registration-methods: The end of the section generated from our OpenAPI spec diff --git a/stripe/_event_service.py b/stripe/_event_service.py index 2ea67cd99..d83997cc1 100644 --- a/stripe/_event_service.py +++ b/stripe/_event_service.py @@ -20,7 +20,7 @@ def list( options: Optional["RequestOptions"] = None, ) -> "ListObject[Event]": """ - List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). + List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object api_version attribute (not according to your current Stripe API version or Stripe-Version header). The list includes only events for the account that makes the request. A platform's list doesn't include events from its connected accounts. To list a connected account's events, make the request as the connected account](https://docs.stripe.com/api/events/object) using the Stripe-Account header. """ return cast( "ListObject[Event]", @@ -39,7 +39,7 @@ async def list_async( options: Optional["RequestOptions"] = None, ) -> "ListObject[Event]": """ - List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). + List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object api_version attribute (not according to your current Stripe API version or Stripe-Version header). The list includes only events for the account that makes the request. A platform's list doesn't include events from its connected accounts. To list a connected account's events, make the request as the connected account](https://docs.stripe.com/api/events/object) using the Stripe-Account header. """ return cast( "ListObject[Event]", diff --git a/stripe/_fx_quote.py b/stripe/_fx_quote.py index 82a909615..e06a3d2f1 100644 --- a/stripe/_fx_quote.py +++ b/stripe/_fx_quote.py @@ -91,8 +91,6 @@ class Transfer(StripeObject): type: Union[Literal["payment", "transfer"], str] """ The transaction type for which the FX Quote will be used. - - Can be 'payment' or 'transfer'. """ _inner_class_types = {"payment": Payment, "transfer": Transfer} diff --git a/stripe/_gift_card_operation.py b/stripe/_gift_card_operation.py index f430f37af..9ccb49202 100644 --- a/stripe/_gift_card_operation.py +++ b/stripe/_gift_card_operation.py @@ -34,7 +34,7 @@ class Balance(StripeObject): The currency of the balance. """ - balance: Balance + balance: Optional[Balance] """ The balance amount of a gift card, including currency and amount. """ @@ -139,7 +139,7 @@ class PreviousBalance(StripeObject): The currency of the balance. """ - balance: Balance + balance: Optional[Balance] """ The balance amount of a gift card, including currency and amount. """ diff --git a/stripe/_http_client.py b/stripe/_http_client.py index 6f0815e91..75f8d35bd 100644 --- a/stripe/_http_client.py +++ b/stripe/_http_client.py @@ -48,8 +48,10 @@ pass try: - from httpx import Timeout as HTTPXTimeout - from httpx import Client as HTTPXClientType + from httpx2 import Timeout as HTTPXTimeout + from httpx2 import Client as HTTPXClientType + from httpx2 import AsyncBaseTransport as HTTPXAsyncTransport + from httpx2 import BaseTransport as HTTPXSyncTransport except ImportError: pass @@ -858,12 +860,17 @@ def __init__( proxy: Optional[HTTPClient._Proxy] = None, async_fallback_client: Optional[HTTPClient] = None, _lib=None, # used for internal unit testing + *, + timeout: int = 80, + connect_timeout: int = 30, ): super(PycurlClient, self).__init__( verify_ssl_certs=verify_ssl_certs, proxy=proxy, async_fallback_client=async_fallback_client, ) + self._timeout = timeout + self._connect_timeout = connect_timeout if _lib is None: import pycurl # pyright: ignore[reportMissingModuleSource] @@ -871,8 +878,6 @@ def __init__( _lib = pycurl self.pycurl = _lib - # Initialize this within the object so that we can reuse connections. - self._curl = _lib.Curl() self._parsed_proxy = {} # need to urlparse the proxy, since PyCurl @@ -886,6 +891,20 @@ def __init__( # but we know value to be a string because all the value types on Proxy_ are strings. self._parsed_proxy[scheme] = urlparse(cast(str, value)) + def _get_curl(self): + """ + Returns this thread's Curl handle, creating it on first use. + + A libcurl easy handle must never be used by more than one thread at a + time, so each thread gets its own. Reusing a handle within a thread + lets us keep its established connections. + """ + curl = getattr(self._thread_local, "curl", None) + if curl is None: + curl = self.pycurl.Curl() + self._thread_local.curl = curl + return curl + def parse_headers(self, data): if "\r\n" not in data: return {} @@ -944,48 +963,49 @@ def _request_internal( # pristine state, but notably reset() doesn't reset connections, so we # still get to take advantage of those by virtue of re-using the same # object. - self._curl.reset() + curl = self._get_curl() + curl.reset() proxy = self._get_proxy(url) if proxy: if proxy.hostname: - self._curl.setopt(self.pycurl.PROXY, proxy.hostname) + curl.setopt(self.pycurl.PROXY, proxy.hostname) if proxy.port: - self._curl.setopt(self.pycurl.PROXYPORT, proxy.port) + curl.setopt(self.pycurl.PROXYPORT, proxy.port) if proxy.username or proxy.password: - self._curl.setopt( + curl.setopt( self.pycurl.PROXYUSERPWD, "%s:%s" % (proxy.username, proxy.password), ) if method == "get": - self._curl.setopt(self.pycurl.HTTPGET, 1) + curl.setopt(self.pycurl.HTTPGET, 1) elif method == "post": - self._curl.setopt(self.pycurl.POST, 1) - self._curl.setopt(self.pycurl.POSTFIELDS, post_data) + curl.setopt(self.pycurl.POST, 1) + curl.setopt(self.pycurl.POSTFIELDS, post_data) else: - self._curl.setopt(self.pycurl.CUSTOMREQUEST, method.upper()) + curl.setopt(self.pycurl.CUSTOMREQUEST, method.upper()) # pycurl doesn't like unicode URLs - self._curl.setopt(self.pycurl.URL, url) + curl.setopt(self.pycurl.URL, url) - self._curl.setopt(self.pycurl.WRITEFUNCTION, b.write) - self._curl.setopt(self.pycurl.HEADERFUNCTION, rheaders.write) - self._curl.setopt(self.pycurl.NOSIGNAL, 1) - self._curl.setopt(self.pycurl.CONNECTTIMEOUT, 30) - self._curl.setopt(self.pycurl.TIMEOUT, 80) + curl.setopt(self.pycurl.WRITEFUNCTION, b.write) + curl.setopt(self.pycurl.HEADERFUNCTION, rheaders.write) + curl.setopt(self.pycurl.NOSIGNAL, 1) + curl.setopt(self.pycurl.CONNECTTIMEOUT, self._connect_timeout) + curl.setopt(self.pycurl.TIMEOUT, self._timeout) _assert_no_header_injection(headers) - self._curl.setopt( + curl.setopt( self.pycurl.HTTPHEADER, ["%s: %s" % (k, v) for k, v in dict(headers).items()], ) if self._verify_ssl_certs: - self._curl.setopt(self.pycurl.CAINFO, stripe.ca_bundle_path) + curl.setopt(self.pycurl.CAINFO, stripe.ca_bundle_path) else: - self._curl.setopt(self.pycurl.SSL_VERIFYHOST, False) + curl.setopt(self.pycurl.SSL_VERIFYHOST, False) try: - self._curl.perform() + curl.perform() except self.pycurl.error as e: self._handle_request_error(e) @@ -995,7 +1015,7 @@ def _request_internal( else: rcontent = b.getvalue().decode("utf-8") - rcode = self._curl.getinfo(self.pycurl.RESPONSE_CODE) + rcode = curl.getinfo(self.pycurl.RESPONSE_CODE) headers = self.parse_headers(rheaders.getvalue().decode("utf-8")) return rcontent, rcode, headers @@ -1044,7 +1064,10 @@ def _get_proxy(self, url) -> Optional["ParseResult"]: return None def close(self): - pass + curl = getattr(self._thread_local, "curl", None) + if curl is not None: + curl.close() + self._thread_local.curl = None class UrllibClient(HTTPClient): @@ -1172,6 +1195,67 @@ def close(self): pass +def _get_httpx_async_mounts( + httpx: Any, + proxy: Optional[HTTPClient._Proxy], + verify: Union[ssl.SSLContext, bool], +) -> Optional[Dict[str, "HTTPXAsyncTransport"]]: + """ + Returns the `mounts` option that routes an `httpx.AsyncClient` (or the + `httpx2` equivalent) through `proxy`, or `None` when there's no proxy. + + httpx only accepts proxies at the client level, and needs a transport + mounted per URL scheme to use a different proxy for each one. + """ + if not proxy: + return None + + return { + f"{scheme}://": httpx.AsyncHTTPTransport( + proxy=proxy_url, verify=verify + ) + for scheme, proxy_url in proxy.items() + if proxy_url + } + + +def _get_httpx_sync_mounts( + httpx: Any, + proxy: Optional[HTTPClient._Proxy], + verify: Union[ssl.SSLContext, bool], +) -> Optional[Dict[str, "HTTPXSyncTransport"]]: + """ + The sync `Client` counterpart of `_get_httpx_async_mounts`, since sync + and async clients can't share transports. + """ + if not proxy: + return None + + return { + f"{scheme}://": httpx.HTTPTransport(proxy=proxy_url, verify=verify) + for scheme, proxy_url in proxy.items() + if proxy_url + } + + +# TODO: (DEVSDK-3427) No longer necessary in the next major version. +def _coerce_httpx_timeout(httpx_lib: Any, timeout: Any) -> Any: + """ + `httpx` and `httpx2` each define their own `Timeout` class and neither + recognizes the other's, so a `Timeout` from the library that isn't in use + is rebuilt as one from the library that is. + """ + if timeout is None or isinstance(timeout, (int, float, httpx_lib.Timeout)): + return timeout + + return httpx_lib.Timeout( + connect=timeout.connect, + read=timeout.read, + write=timeout.write, + pool=timeout.pool, + ) + + class HTTPXClient(HTTPClient): name = "httpx" @@ -1187,28 +1271,32 @@ def __init__( super(HTTPXClient, self).__init__(**kwargs) if _lib is None: - import httpx - - _lib = httpx - self.httpx = _lib + # TODO: (DEVSDK-3427) drop the httpx fallback in the next major version. + try: + import httpx2 as _lib + except ImportError: + import httpx as _lib + self.httpx: Any = _lib import anyio self.anyio = anyio - kwargs = {} + verify: Union[ssl.SSLContext, Literal[False]] = False if self._verify_ssl_certs: - kwargs["verify"] = ssl.create_default_context( - cafile=stripe.ca_bundle_path - ) - else: - kwargs["verify"] = False + verify = ssl.create_default_context(cafile=stripe.ca_bundle_path) - self._client_async = self.httpx.AsyncClient(**kwargs) + self._client_async = self.httpx.AsyncClient( + verify=verify, + mounts=_get_httpx_async_mounts(self.httpx, self._proxy, verify), + ) self._client = None if allow_sync_methods: - self._client = self.httpx.Client(**kwargs) - self._timeout = timeout + self._client = self.httpx.Client( + verify=verify, + mounts=_get_httpx_sync_mounts(self.httpx, self._proxy, verify), + ) + self._timeout = _coerce_httpx_timeout(self.httpx, timeout) def sleep_async(self, secs): return self.anyio.sleep(secs) @@ -1218,14 +1306,13 @@ def _get_request_args_kwargs( ): kwargs = {} - if self._proxy: - kwargs["proxies"] = self._proxy - if self._timeout: kwargs["timeout"] = self._timeout + # `post_data` is an already-encoded body, which httpx takes as + # `content`; passing it as `data` is deprecated. return [ (method, url), - {"headers": headers, "data": post_data or {}, **kwargs}, + {"headers": headers, "content": post_data or None, **kwargs}, ] def request( @@ -1477,9 +1564,9 @@ def __init__(self, **kwargs): def raise_async_client_import_error() -> Never: raise ImportError( ( - "Import httpx not found. To make async http requests," - "You must either install httpx or define your own" - "async http client by subclassing stripe.HTTPClient" + "Import httpx2 not found. To make async http requests, " + "you must either install httpx2 or define your own " + "async http client by subclassing stripe.HTTPClient " "and setting stripe.default_http_client to an instance of it." ) ) @@ -1500,7 +1587,7 @@ async def close_async(self): # --- Client resolution --- # Detect available HTTP libraries at module load time so the expensive imports -# (e.g. requests, httpx) happen during Python's init phase rather than when +# (e.g. requests, httpx2) happen during Python's init phase rather than when # StripeClient() is constructed. This matters in environments like AWS Lambda # where module loading has a generous timeout (10s) but handler invocation # does not (often 3s). @@ -1512,9 +1599,14 @@ async def close_async(self): # 4. urllib (stdlib fallback, basically always present) # # Async client precedence: -# 1. httpx + anyio (both required) -# 2. aiohttp -# 3. NoImportFoundAsyncClient (raises on use) +# 1. httpx2 + anyio (both required) +# 2. (deprecated, see note) httpx + anyio (both required) +# 3. aiohttp +# 4. NoImportFoundAsyncClient (raises on use) +# +# Note: httpx is no longer maintained, so we only fall back to it for users who +# haven't installed httpx2 yet. That fallback is deprecated and will be removed +# in the next major version (DEVSDK-3427). # # To add a new client: define the class above, then add it to the appropriate # cascade below. The resolved class is stored directly — new_default_http_client() @@ -1548,9 +1640,14 @@ def _resolve_sync_client(): def _resolve_async_client(): try: - import httpx # noqa: F401 import anyio # noqa: F401 + # TODO: (DEVSDK-3427) drop the httpx fallback in the next major version. + try: + import httpx2 # noqa: F401 + except ImportError: + import httpx # noqa: F401 + return HTTPXClient except ImportError: pass diff --git a/stripe/_invoice.py b/stripe/_invoice.py index ef76e5bc5..30398d6dd 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -164,6 +164,23 @@ class AmountsDue(StripeObject): The status of the payment, one of `open`, `paid`, or `past_due` """ + class AppliedCreditMemos(StripeObject): + class Data(StripeObject): + applied_amount: int + """ + The credit currently applied to this invoice from the Credit Memo, in cents (or local equivalent). Applying credit reduces `amount_due` and `amount_remaining` without changing `amount_paid`. + """ + credit_memo: str + """ + The ID of the Credit Memo whose credit is applied to this invoice. + """ + + data: List[Data] + """ + The Credit Memos with credit currently applied to this invoice, with one entry per Credit Memo. An invoice can have credit applied from at most 10 Credit Memos, so the list is returned in full. + """ + _inner_class_types = {"data": Data} + class AutomaticTax(StripeObject): class EnablementDetails(StripeObject): class IntegrationConfigurationDisabledReason(StripeObject): @@ -601,6 +618,7 @@ class LastFinalizationError(StripeObject): "forwarding_api_upstream_connection_timeout", "forwarding_api_upstream_error", "idempotency_key_in_use", + "inactive_api_operation_confirmation_required", "incorrect_address", "incorrect_cvc", "incorrect_number", @@ -854,10 +872,10 @@ class ManagedPayments(StripeObject): """ class Parent(StripeObject): - class BillingCadenceDetails(StripeObject): - billing_cadence: str + class BillingGroupDetails(StripeObject): + billing_group: str """ - The billing cadence that generated this invoice + The billing group that generated this invoice """ class QuoteDetails(StripeObject): @@ -911,9 +929,9 @@ class PauseCollection(StripeObject): """ _inner_class_types = {"pause_collection": PauseCollection} - billing_cadence_details: Optional[BillingCadenceDetails] + billing_group_details: Optional[BillingGroupDetails] """ - Details about the billing cadence that generated this invoice + Details about the billing group that generated this invoice """ quote_details: Optional[QuoteDetails] """ @@ -929,7 +947,7 @@ class PauseCollection(StripeObject): """ type: Union[ Literal[ - "billing_cadence_details", + "billing_group_details", "quote_details", "schedule_details", "subscription_details", @@ -940,7 +958,7 @@ class PauseCollection(StripeObject): The type of parent that generated this invoice """ _inner_class_types = { - "billing_cadence_details": BillingCadenceDetails, + "billing_group_details": BillingGroupDetails, "quote_details": QuoteDetails, "schedule_details": ScheduleDetails, "subscription_details": SubscriptionDetails, @@ -1777,6 +1795,7 @@ class TaxRateDetails(StripeObject): """ ID of the Connect Application that created the invoice. """ + applied_credit_memos: Optional[AppliedCreditMemos] attempt_count: int """ Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. @@ -3652,6 +3671,7 @@ async def list_lines_async( _inner_class_types = { "amounts_due": AmountsDue, + "applied_credit_memos": AppliedCreditMemos, "automatic_tax": AutomaticTax, "confirmation_secret": ConfirmationSecret, "custom_fields": CustomField, diff --git a/stripe/_invoice_rendering_template.py b/stripe/_invoice_rendering_template.py index f4516581d..312f5f7eb 100644 --- a/stripe/_invoice_rendering_template.py +++ b/stripe/_invoice_rendering_template.py @@ -1,19 +1,27 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe._createable_api_resource import CreateableAPIResource 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, Union, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe.params._invoice_rendering_template_archive_params import ( InvoiceRenderingTemplateArchiveParams, ) + from stripe.params._invoice_rendering_template_create_params import ( + InvoiceRenderingTemplateCreateParams, + ) from stripe.params._invoice_rendering_template_list_params import ( InvoiceRenderingTemplateListParams, ) + from stripe.params._invoice_rendering_template_modify_params import ( + InvoiceRenderingTemplateModifyParams, + ) from stripe.params._invoice_rendering_template_retrieve_params import ( InvoiceRenderingTemplateRetrieveParams, ) @@ -23,7 +31,9 @@ class InvoiceRenderingTemplate( - ListableAPIResource["InvoiceRenderingTemplate"] + CreateableAPIResource["InvoiceRenderingTemplate"], + ListableAPIResource["InvoiceRenderingTemplate"], + UpdateableAPIResource["InvoiceRenderingTemplate"], ): """ Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates @@ -33,6 +43,73 @@ class InvoiceRenderingTemplate( OBJECT_NAME: ClassVar[Literal["invoice_rendering_template"]] = ( "invoice_rendering_template" ) + + class LineItemPolicy(StripeObject): + display: Optional[str] + """ + A CEL expression that takes in a line item and returns a string indicating whether the line item should be 'hidden_if_zero' or 'visible'. + If 'hidden_if_zero', the line item will be hidden if the line item's amount is zero on the invoice. + If 'visible', the line item will be shown regardless of the line item's amount. + """ + + class RenderingSettings(StripeObject): + class InvoicePdf(StripeObject): + class Block(StripeObject): + class CustomPlainTextCel(StripeObject): + cel_expression: str + """ + A CEL expression that returns text using the invoice context. + """ + + custom_plain_text_cel: Optional[CustomPlainTextCel] + key: str + """ + The key of this block in the template. + """ + type: Union[ + Literal[ + "custom_plain_text_cel", + "footer_content", + "invoice_details", + "line_items", + "parties", + "payment_remittance_instructions", + "status_and_memo", + "tax_footnotes", + "title_and_logo", + ], + str, + ] + """ + The type of content block + """ + _inner_class_types = { + "custom_plain_text_cel": CustomPlainTextCel, + } + + blocks: List[Block] + """ + The ordered invoice PDF blocks. + """ + _inner_class_types = {"blocks": Block} + + invoice_pdf: InvoicePdf + _inner_class_types = {"invoice_pdf": InvoicePdf} + + class SummaryItemPolicy(StripeObject): + display_items: Optional[str] + """ + Either `all` or `none`. For all summary items created from this policy, if `all`, every line item will be shown under the summary item header. If `none`, the line items will be hidden and only the summary item header will be shown. + """ + filter: Optional[str] + """ + A CEL expression that takes in a line item and returns a boolean indicating whether the line item should be considered when grouping. + """ + group_by: Optional[str] + """ + A CEL expression that takes in a line item and returns a string. Line items with the same string results are put in the same summary items. The string result will become the description of the summary item. + """ + created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -41,6 +118,10 @@ class InvoiceRenderingTemplate( """ Unique identifier for the object. """ + line_item_policy: Optional[LineItemPolicy] + """ + The policy that controls how individual line items are rendered + """ livemode: bool """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. @@ -57,10 +138,15 @@ class InvoiceRenderingTemplate( """ String representing the object's type. Objects of the same type share the same value. """ + rendering_settings: Optional[RenderingSettings] status: Union[Literal["active", "archived"], str] """ The status of the template, one of `active` or `archived`. """ + summary_item_policies: Optional[List[SummaryItemPolicy]] + """ + The policies that control how line items are grouped into summary items + """ version: int """ Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering @@ -186,6 +272,38 @@ async def archive_async( ), ) + @classmethod + def create( + cls, **params: Unpack["InvoiceRenderingTemplateCreateParams"] + ) -> "InvoiceRenderingTemplate": + """ + Creates an invoice rendering template. + """ + return cast( + "InvoiceRenderingTemplate", + cls._static_request( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + async def create_async( + cls, **params: Unpack["InvoiceRenderingTemplateCreateParams"] + ) -> "InvoiceRenderingTemplate": + """ + Creates an invoice rendering template. + """ + return cast( + "InvoiceRenderingTemplate", + await cls._static_request_async( + "post", + cls.class_url(), + params=params, + ), + ) + @classmethod def list( cls, **params: Unpack["InvoiceRenderingTemplateListParams"] @@ -226,6 +344,46 @@ async def list_async( return result + @classmethod + def modify( + cls, + id: str, + /, + **params: Unpack["InvoiceRenderingTemplateModifyParams"], + ) -> "InvoiceRenderingTemplate": + """ + Updates an existing invoice rendering template. + """ + url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + return cast( + "InvoiceRenderingTemplate", + cls._static_request( + "post", + url, + params=params, + ), + ) + + @classmethod + async def modify_async( + cls, + id: str, + /, + **params: Unpack["InvoiceRenderingTemplateModifyParams"], + ) -> "InvoiceRenderingTemplate": + """ + Updates an existing invoice rendering template. + """ + url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + return cast( + "InvoiceRenderingTemplate", + await cls._static_request_async( + "post", + url, + params=params, + ), + ) + @classmethod def retrieve( cls, @@ -371,3 +529,9 @@ async def unarchive_async( params=params, ), ) + + _inner_class_types = { + "line_item_policy": LineItemPolicy, + "rendering_settings": RenderingSettings, + "summary_item_policies": SummaryItemPolicy, + } diff --git a/stripe/_invoice_rendering_template_service.py b/stripe/_invoice_rendering_template_service.py index 1570f0c2d..7610df75f 100644 --- a/stripe/_invoice_rendering_template_service.py +++ b/stripe/_invoice_rendering_template_service.py @@ -15,6 +15,9 @@ from stripe.params._invoice_rendering_template_archive_params import ( InvoiceRenderingTemplateArchiveParams, ) + from stripe.params._invoice_rendering_template_create_params import ( + InvoiceRenderingTemplateCreateParams, + ) from stripe.params._invoice_rendering_template_list_params import ( InvoiceRenderingTemplateListParams, ) @@ -24,6 +27,9 @@ from stripe.params._invoice_rendering_template_unarchive_params import ( InvoiceRenderingTemplateUnarchiveParams, ) + from stripe.params._invoice_rendering_template_update_params import ( + InvoiceRenderingTemplateUpdateParams, + ) class InvoiceRenderingTemplateService(StripeService): @@ -65,6 +71,44 @@ async def list_async( ), ) + def create( + self, + params: Optional["InvoiceRenderingTemplateCreateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "InvoiceRenderingTemplate": + """ + Creates an invoice rendering template. + """ + return cast( + "InvoiceRenderingTemplate", + self._request( + "post", + "/v1/invoice_rendering_templates", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: Optional["InvoiceRenderingTemplateCreateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "InvoiceRenderingTemplate": + """ + Creates an invoice rendering template. + """ + return cast( + "InvoiceRenderingTemplate", + await self._request_async( + "post", + "/v1/invoice_rendering_templates", + base_address="api", + params=params, + options=options, + ), + ) + def retrieve( self, template: str, @@ -111,6 +155,52 @@ async def retrieve_async( ), ) + def update( + self, + template: str, + /, + params: Optional["InvoiceRenderingTemplateUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "InvoiceRenderingTemplate": + """ + Updates an existing invoice rendering template. + """ + return cast( + "InvoiceRenderingTemplate", + self._request( + "post", + "/v1/invoice_rendering_templates/{template}".format( + template=sanitize_id(template), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + template: str, + /, + params: Optional["InvoiceRenderingTemplateUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "InvoiceRenderingTemplate": + """ + Updates an existing invoice rendering template. + """ + return cast( + "InvoiceRenderingTemplate", + await self._request_async( + "post", + "/v1/invoice_rendering_templates/{template}".format( + template=sanitize_id(template), + ), + base_address="api", + params=params, + options=options, + ), + ) + def archive( self, template: str, diff --git a/stripe/_mandate.py b/stripe/_mandate.py index abbe75f01..76febdc00 100644 --- a/stripe/_mandate.py +++ b/stripe/_mandate.py @@ -139,6 +139,26 @@ class Blik(StripeObject): class Card(StripeObject): class India(StripeObject): + amount: Optional[int] + """ + The registered amount in the smallest currency unit. For a maximum amount mandate, this is the authorized ceiling. + """ + amount_type: Optional[Union[Literal["fixed", "maximum"], str]] + """ + Whether the registered amount is fixed or a maximum. + """ + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + description: Optional[str] + """ + The stored mandate description, before SIHub registration removes non-alphanumeric characters. + """ + end_date: Optional[int] + """ + The registered end date, represented as midnight in India Standard Time, if specified. + """ inactive_reason: Optional[ Union[ Literal[ @@ -156,6 +176,27 @@ class India(StripeObject): """ The reason why the mandate has an `inactive` status. This field is only populated if the mandate is inactive. """ + interval: Optional[ + Union[ + Literal["day", "month", "sporadic", "week", "year"], + str, + ] + ] + """ + The registered payment interval. This can differ from the interval originally requested. + """ + interval_count: Optional[int] + """ + The number of intervals between registered payments. Null for sporadic mandates. + """ + reference: Optional[str] + """ + The reference registered for this mandate. + """ + start_date: Optional[int] + """ + The registered start date, represented as midnight in India Standard Time. + """ india: Optional[India] _inner_class_types = {"india": India} diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index 9d313717e..826645a42 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -526,11 +526,6 @@ "stripe.v2.billing._bill_setting_version", "BillSettingVersion", ), - "v2.billing.cadence": ("stripe.v2.billing._cadence", "Cadence"), - "v2.billing.cadence_spend_modifier": ( - "stripe.v2.billing._cadence_spend_modifier", - "CadenceSpendModifier", - ), "v2.billing.collection_setting": ( "stripe.v2.billing._collection_setting", "CollectionSetting", @@ -540,10 +535,6 @@ "CollectionSettingVersion", ), "v2.billing.contract": ("stripe.v2.billing._contract", "Contract"), - "v2.billing.contract_pricing_line_quantity_change": ( - "stripe.v2.billing._contract_pricing_line_quantity_change", - "ContractPricingLineQuantityChange", - ), "v2.billing.contract_term": ( "stripe.v2.billing._contract_term", "ContractTerm", @@ -556,6 +547,15 @@ "stripe.v2.billing._custom_pricing_unit", "CustomPricingUnit", ), + "v2.billing.group": ("stripe.v2.billing._group", "Group"), + "v2.billing.group_invoice": ( + "stripe.v2.billing._group_invoice", + "GroupInvoice", + ), + "v2.billing.group_spend_modifier": ( + "stripe.v2.billing._group_spend_modifier", + "GroupSpendModifier", + ), "v2.billing.intent": ("stripe.v2.billing._intent", "Intent"), "v2.billing.intent_action": ( "stripe.v2.billing._intent_action", diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 7a27eb253..f69b69f2b 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -1124,7 +1124,13 @@ class Crypto(StripeObject): network: Optional[ Union[ Literal[ - "base", "ethereum", "polygon", "solana", "sui", "tempo" + "base", + "ethereum", + "polygon", + "solana", + "sui", + "tempo", + "tron", ], str, ] diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index ae39b40a8..f4e7773ca 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -405,6 +405,7 @@ class LastPaymentError(StripeObject): "forwarding_api_upstream_connection_timeout", "forwarding_api_upstream_error", "idempotency_key_in_use", + "inactive_api_operation_confirmation_required", "incorrect_address", "incorrect_cvc", "incorrect_number", @@ -1695,7 +1696,7 @@ class QrCode(StripeObject): _inner_class_types = {"qr_code": QrCode} class VerifyWithMicrodeposits(StripeObject): - arrival_date: int + arrival_date: Optional[int] """ The timestamp when the microdeposits are expected to land. Null for instant microdeposits. """ @@ -4105,22 +4106,22 @@ class Address(StripeObject): class CardPresent(StripeObject): class AadeData(StripeObject): - mark_data: Optional[str] - """ - The canonical string that was signed by the e-invoicing provider to produce `signed_mark`, formatted per Appendix A of A.1155/2023. Required when `mode` is `standard`. - """ mode: Literal["autonomous", "standard"] """ - The e-invoicing mode under which the mark was generated. + The e-invoicing mode under which the provider signature was generated. """ provider_id: Optional[int] """ - The AADE-assigned approval number of the e-invoicing provider that generated the mark. Required when `mode` is `standard`. + The AADE-assigned approval number of the e-invoicing provider that generated the provider signature. Required when `mode` is `standard`. """ - signed_mark: Optional[str] + provider_signature: Optional[str] """ The cryptographic signature returned by the e-invoicing provider for this transaction, hex-encoded. Required when `mode` is `standard`. """ + provider_signature_data: Optional[str] + """ + The canonical string that was signed by the e-invoicing provider to produce `provider_signature`, formatted per Appendix A of A.1155/2023. Required when `mode` is `standard`. + """ unbound_pos: Optional[ Literal[ "interconnection_loss", @@ -5484,6 +5485,12 @@ class AccountFunding(StripeObject): Controls when the funds will be captured from the customer's account. """ payment_details: Optional[PaymentDetails] + request_multicapture: Optional[ + Union[Literal["if_available", "never"], str] + ] + """ + Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. + """ setup_future_usage: Optional[Literal["none"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5717,6 +5724,12 @@ class CustomerNotification(StripeObject): """ _inner_class_types = {"card": Card} + class RadarOptions(StripeObject): + is_free_trial_transaction: Optional[bool] + """ + The value you provided for whether this transaction starts a free trial. This is null if you haven't explicitly set it. + """ + class Redaction(StripeObject): status: Union[Literal["processing", "redacted", "validated"], str] """ @@ -6187,6 +6200,10 @@ class PaymentData(StripeObject): """ If present, this property tells you about the processing state of the payment. """ + radar_options: Optional[RadarOptions] + """ + Options to configure Radar. + """ receipt_email: Optional[str] """ Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). @@ -8485,6 +8502,7 @@ def test_helpers(self): "payments_orchestration": PaymentsOrchestration, "presentment_details": PresentmentDetails, "processing": Processing, + "radar_options": RadarOptions, "redaction": Redaction, "shipping": Shipping, "transfer_data": TransferData, diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index 9e1b1464f..942c5be0d 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -82,7 +82,12 @@ class AutomaticSurcharge(StripeObject): Indicates whether automatic surcharge is enabled for the payment link. """ provider: Optional[ - Union[Literal["daikin", "interpayments", "proserv", "yeeld"], str] + Union[ + Literal[ + "daikin", "dealerfx", "interpayments", "proserv", "yeeld" + ], + str, + ] ] """ The surcharge provider used for this payment link. diff --git a/stripe/_payment_method_configuration.py b/stripe/_payment_method_configuration.py index 01680bbc9..cd5544218 100644 --- a/stripe/_payment_method_configuration.py +++ b/stripe/_payment_method_configuration.py @@ -72,6 +72,28 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} + class AeonPay(StripeObject): + class DisplayPreference(StripeObject): + overridable: Optional[bool] + """ + For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + """ + preference: Union[Literal["none", "off", "on"], str] + """ + The account's display preference. + """ + value: Union[Literal["off", "on"], str] + """ + The effective display preference value. + """ + + available: bool + """ + Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + """ + display_preference: DisplayPreference + _inner_class_types = {"display_preference": DisplayPreference} + class Affirm(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -226,6 +248,28 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} + class AuPay(StripeObject): + class DisplayPreference(StripeObject): + overridable: Optional[bool] + """ + For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + """ + preference: Union[Literal["none", "off", "on"], str] + """ + The account's display preference. + """ + value: Union[Literal["off", "on"], str] + """ + The effective display preference value. + """ + + available: bool + """ + Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + """ + display_preference: DisplayPreference + _inner_class_types = {"display_preference": DisplayPreference} + class BacsDebit(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -468,6 +512,28 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} + class Dbarai(StripeObject): + class DisplayPreference(StripeObject): + overridable: Optional[bool] + """ + For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + """ + preference: Union[Literal["none", "off", "on"], str] + """ + The account's display preference. + """ + value: Union[Literal["off", "on"], str] + """ + The effective display preference value. + """ + + available: bool + """ + Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + """ + display_preference: DisplayPreference + _inner_class_types = {"display_preference": DisplayPreference} + class Eps(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -798,6 +864,28 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} + class Merpay(StripeObject): + class DisplayPreference(StripeObject): + overridable: Optional[bool] + """ + For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + """ + preference: Union[Literal["none", "off", "on"], str] + """ + The account's display preference. + """ + value: Union[Literal["off", "on"], str] + """ + The effective display preference value. + """ + + available: bool + """ + Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + """ + display_preference: DisplayPreference + _inner_class_types = {"display_preference": DisplayPreference} + class Mobilepay(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -1529,6 +1617,7 @@ class DisplayPreference(StripeObject): """ Whether the configuration can be used for new payments. """ + aeon_pay: Optional[AeonPay] affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] @@ -1540,6 +1629,7 @@ class DisplayPreference(StripeObject): For child configs, the Connect application associated with the configuration. """ au_becs_debit: Optional[AuBecsDebit] + au_pay: Optional[AuPay] bacs_debit: Optional[BacsDebit] bancontact: Optional[Bancontact] billie: Optional[Billie] @@ -1551,6 +1641,7 @@ class DisplayPreference(StripeObject): cashapp: Optional[Cashapp] crypto: Optional[Crypto] customer_balance: Optional[CustomerBalance] + dbarai: Optional[Dbarai] eps: Optional[Eps] fpx: Optional[Fpx] giropay: Optional[Giropay] @@ -1578,6 +1669,7 @@ class DisplayPreference(StripeObject): If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ mb_way: Optional[MbWay] + merpay: Optional[Merpay] mobilepay: Optional[Mobilepay] multibanco: Optional[Multibanco] name: str @@ -1764,6 +1856,7 @@ async def retrieve_async( _inner_class_types = { "acss_debit": AcssDebit, + "aeon_pay": AeonPay, "affirm": Affirm, "afterpay_clearpay": AfterpayClearpay, "alipay": Alipay, @@ -1771,6 +1864,7 @@ async def retrieve_async( "amazon_pay": AmazonPay, "apple_pay": ApplePay, "au_becs_debit": AuBecsDebit, + "au_pay": AuPay, "bacs_debit": BacsDebit, "bancontact": Bancontact, "billie": Billie, @@ -1782,6 +1876,7 @@ async def retrieve_async( "cashapp": Cashapp, "crypto": Crypto, "customer_balance": CustomerBalance, + "dbarai": Dbarai, "eps": Eps, "fpx": Fpx, "giropay": Giropay, @@ -1797,6 +1892,7 @@ async def retrieve_async( "kr_card": KrCard, "link": Link, "mb_way": MbWay, + "merpay": Merpay, "mobilepay": Mobilepay, "multibanco": Multibanco, "naver_pay": NaverPay, diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 0213aa2c1..36b469a36 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -1139,7 +1139,13 @@ class Crypto(StripeObject): network: Optional[ Union[ Literal[ - "base", "ethereum", "polygon", "solana", "sui", "tempo" + "base", + "ethereum", + "polygon", + "solana", + "sui", + "tempo", + "tron", ], str, ] diff --git a/stripe/_product.py b/stripe/_product.py index 65118c990..f9e3d7711 100644 --- a/stripe/_product.py +++ b/stripe/_product.py @@ -125,6 +125,10 @@ class IneligibilityReason(StripeObject): _inner_class_types = {"ineligibility_reasons": IneligibilityReason} class MarketingFeature(StripeObject): + loss_message: Optional[str] + """ + Optional text that describes what a customer loses by canceling, shown for this marketing feature in the Customer Portal cancellation flow. Up to 80 characters long. If you omit it when you update `marketing_features`, Stripe keeps the message stored for the feature with the same name. Duplicate names are matched in order. Set it to an empty string to remove the override. When no override is stored, eligible cancellation flows use the marketing feature name. A renamed feature is treated as a new feature, so send the message again to keep it. + """ name: Optional[str] """ The marketing feature name. Up to 80 characters long. diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py index 2de711cb0..d21ce8e4a 100644 --- a/stripe/_quote_preview_invoice.py +++ b/stripe/_quote_preview_invoice.py @@ -75,6 +75,23 @@ class AmountsDue(StripeObject): The status of the payment, one of `open`, `paid`, or `past_due` """ + class AppliedCreditMemos(StripeObject): + class Data(StripeObject): + applied_amount: int + """ + The credit currently applied to this invoice from the Credit Memo, in cents (or local equivalent). Applying credit reduces `amount_due` and `amount_remaining` without changing `amount_paid`. + """ + credit_memo: str + """ + The ID of the Credit Memo whose credit is applied to this invoice. + """ + + data: List[Data] + """ + The Credit Memos with credit currently applied to this invoice, with one entry per Credit Memo. An invoice can have credit applied from at most 10 Credit Memos, so the list is returned in full. + """ + _inner_class_types = {"data": Data} + class AppliesTo(StripeObject): new_reference: Optional[str] """ @@ -526,6 +543,7 @@ class LastFinalizationError(StripeObject): "forwarding_api_upstream_connection_timeout", "forwarding_api_upstream_error", "idempotency_key_in_use", + "inactive_api_operation_confirmation_required", "incorrect_address", "incorrect_cvc", "incorrect_number", @@ -779,10 +797,10 @@ class ManagedPayments(StripeObject): """ class Parent(StripeObject): - class BillingCadenceDetails(StripeObject): - billing_cadence: str + class BillingGroupDetails(StripeObject): + billing_group: str """ - The billing cadence that generated this invoice + The billing group that generated this invoice """ class QuoteDetails(StripeObject): @@ -836,9 +854,9 @@ class PauseCollection(StripeObject): """ _inner_class_types = {"pause_collection": PauseCollection} - billing_cadence_details: Optional[BillingCadenceDetails] + billing_group_details: Optional[BillingGroupDetails] """ - Details about the billing cadence that generated this invoice + Details about the billing group that generated this invoice """ quote_details: Optional[QuoteDetails] """ @@ -854,7 +872,7 @@ class PauseCollection(StripeObject): """ type: Union[ Literal[ - "billing_cadence_details", + "billing_group_details", "quote_details", "schedule_details", "subscription_details", @@ -865,7 +883,7 @@ class PauseCollection(StripeObject): The type of parent that generated this invoice """ _inner_class_types = { - "billing_cadence_details": BillingCadenceDetails, + "billing_group_details": BillingGroupDetails, "quote_details": QuoteDetails, "schedule_details": ScheduleDetails, "subscription_details": SubscriptionDetails, @@ -1699,6 +1717,7 @@ class TaxRateDetails(StripeObject): """ ID of the Connect Application that created the invoice. """ + applied_credit_memos: Optional[AppliedCreditMemos] applies_to: AppliesTo attempt_count: int """ @@ -1991,6 +2010,7 @@ class TaxRateDetails(StripeObject): """ _inner_class_types = { "amounts_due": AmountsDue, + "applied_credit_memos": AppliedCreditMemos, "applies_to": AppliesTo, "automatic_tax": AutomaticTax, "confirmation_secret": ConfirmationSecret, diff --git a/stripe/_refund.py b/stripe/_refund.py index 21db8bf5d..4c9e40ac6 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -12,6 +12,7 @@ from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: + from stripe._application import Application from stripe._balance_transaction import BalanceTransaction from stripe._charge import Charge from stripe._customer import Customer @@ -154,6 +155,12 @@ class GbBankTransfer(StripeObject): Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. """ + class GiftCard(StripeObject): + gift_card_operation: Optional[str] + """ + ID of the reload or activation GiftCardOperation created for this refund. + """ + class Giropay(StripeObject): pass @@ -331,6 +338,7 @@ class Zip(StripeObject): eps: Optional[Eps] eu_bank_transfer: Optional[EuBankTransfer] gb_bank_transfer: Optional[GbBankTransfer] + gift_card: Optional[GiftCard] giropay: Optional[Giropay] grabpay: Optional[Grabpay] id_bank_transfer: Optional[IdBankTransfer] @@ -375,6 +383,7 @@ class Zip(StripeObject): "eps": Eps, "eu_bank_transfer": EuBankTransfer, "gb_bank_transfer": GbBankTransfer, + "gift_card": GiftCard, "giropay": Giropay, "grabpay": Grabpay, "id_bank_transfer": IdBankTransfer, @@ -440,6 +449,10 @@ class PresentmentDetails(StripeObject): """ Amount, in cents (or local equivalent). """ + application: Optional[ExpandableField["Application"]] + """ + ID of the Connect application that created the refund. This can differ from the application on the associated Charge or PaymentIntent. A null value does not necessarily mean the refund was created without a Connect application. + """ balance_transaction: Optional[ExpandableField["BalanceTransaction"]] """ Balance transaction that describes the impact on your account balance. diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index 42d18c959..e01b52c88 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -644,6 +644,7 @@ class SetupError(StripeObject): "forwarding_api_upstream_connection_timeout", "forwarding_api_upstream_error", "idempotency_key_in_use", + "inactive_api_operation_confirmation_required", "incorrect_address", "incorrect_cvc", "incorrect_number", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index b8dd21335..e0d228997 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -172,6 +172,7 @@ class LastSetupError(StripeObject): "forwarding_api_upstream_connection_timeout", "forwarding_api_upstream_error", "idempotency_key_in_use", + "inactive_api_operation_confirmation_required", "incorrect_address", "incorrect_cvc", "incorrect_number", @@ -509,7 +510,7 @@ class QrCode(StripeObject): _inner_class_types = {"qr_code": QrCode} class VerifyWithMicrodeposits(StripeObject): - arrival_date: int + arrival_date: Optional[int] """ The timestamp when the microdeposits are expected to land. Null for instant microdeposits. """ diff --git a/stripe/_stripe_object.py b/stripe/_stripe_object.py index 8fe6d87d7..56ac30eb8 100644 --- a/stripe/_stripe_object.py +++ b/stripe/_stripe_object.py @@ -49,6 +49,9 @@ from stripe._api_requestor import _APIRequestor # pyright: ignore[reportPrivateUsage] +API_KEY_SERIALIZATION_CONSTANT = "API_KEY_SERIALIZATION_CONSTANT" + + @overload def _compute_diff( current: Dict[str, Any], previous: Optional[Dict[str, Any]] @@ -156,6 +159,50 @@ def stripe_account(self): def stripe_version(self): return self._requestor.stripe_version + def reattach_api_key(self, api_key: str) -> None: + """Attach credentials to an unpickled object and its nested objects. + + Each object retains its saved API version and connected account. + Objects that already have credentials cannot be reattached. + """ + if self.api_key != API_KEY_SERIALIZATION_CONSTANT: + raise ValueError( + "API credentials can only be reattached to an unpickled " + "object that has not already been reattached." + ) + if ( + not isinstance(cast(object, api_key), str) + or not api_key.strip() + or api_key == API_KEY_SERIALIZATION_CONSTANT + ): + raise ValueError("api_key must be a non-empty, valid API key.") + + from stripe._api_requestor import _APIRequestor # pyright: ignore[reportPrivateUsage] + + seen: Set[int] = set() + + def reattach(value: Any) -> None: + if id(value) in seen: + return + seen.add(id(value)) + if isinstance(value, StripeObject): + if value.api_key == API_KEY_SERIALIZATION_CONSTANT: + value._requestor = _APIRequestor._global_with_options( # pyright: ignore[reportPrivateUsage] + api_key=api_key, + stripe_version=value.stripe_version, + stripe_account=value.stripe_account, + ) + for nested in value._data.values(): + reattach(nested) + elif isinstance(value, dict): + for nested in cast(Dict[Any, Any], value).values(): + reattach(nested) + elif isinstance(value, (list, tuple)): + for nested in cast(Union[List[Any], Tuple[Any, ...]], value): + reattach(nested) + + reattach(self) + @property def last_response(self) -> Optional[StripeResponse]: return self._last_response @@ -298,7 +345,7 @@ def __reduce__(self) -> Tuple[Any, ...]: type(self), # callable ( # args getattr(self, "id", None), - self.api_key, + API_KEY_SERIALIZATION_CONSTANT, self.stripe_version, self.stripe_account, ), diff --git a/stripe/_subscription.py b/stripe/_subscription.py index d8b825d74..16a615826 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -529,6 +529,10 @@ class MandateOptions(StripeObject): A description of the mandate or subscription that is meant to be displayed to the customer. """ + debit_behavior: Optional[str] + """ + Controls early collection for eligible recurring payments on India-issued cards. Target-date billing aims to debit on the billing-cycle date but does not guarantee that date. + """ mandate_options: Optional[MandateOptions] network: Optional[ Union[ @@ -663,6 +667,10 @@ class MandateOptions(StripeObject): Schedule at which the future payments will be charged. """ + debit_behavior: Optional[str] + """ + Timing configuration for collecting funds from the customer's account. + """ expires_after_seconds: Optional[int] """ The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). @@ -697,6 +705,10 @@ class MandateOptions(StripeObject): End date of the mandate or subscription. """ + debit_behavior: Optional[str] + """ + Controls when the funds will be captured from the customer's account. Defaults to `not_specified`. Omitting this parameter on an update preserves the saved value; passing `not_specified` clears it. Early collection is best effort and doesn't guarantee an exact debit date. + """ mandate_options: Optional[MandateOptions] _inner_class_types = {"mandate_options": MandateOptions} @@ -961,6 +973,12 @@ class PendingInvoiceItemInterval(StripeObject): """ class PendingUpdate(StripeObject): + class PresentmentDetails(StripeObject): + presentment_currency: str + """ + Currency used for customer payments. + """ + billing_cycle_anchor: Optional[int] """ If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. @@ -989,6 +1007,7 @@ class PendingUpdate(StripeObject): """ The number of iterations of prebilling to apply. """ + presentment_details: Optional[PresentmentDetails] subscription_items: Optional[List["SubscriptionItem"]] """ List of subscription items, each with an attached plan, that will be set if the update is applied. @@ -1001,6 +1020,7 @@ class PendingUpdate(StripeObject): """ Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://docs.stripe.com/billing/subscriptions/trials/free-trials) to learn more. """ + _inner_class_types = {"presentment_details": PresentmentDetails} class Prebilling(StripeObject): invoice: ExpandableField["Invoice"] @@ -1103,10 +1123,6 @@ class EndBehavior(StripeObject): A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. """ automatic_tax: AutomaticTax - billing_cadence: Optional[str] - """ - The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. - """ billing_cycle_anchor: int """ The reference point that aligns future [billing cycle](https://docs.stripe.com/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format. diff --git a/stripe/apps/_install.py b/stripe/apps/_install.py index d4e6db483..4dc31c64f 100644 --- a/stripe/apps/_install.py +++ b/stripe/apps/_install.py @@ -165,7 +165,7 @@ def list( cls, **params: Unpack["InstallListParams"] ) -> ListObject["Install"]: """ - Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. + Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox, and also that app's legacy test mode installs when the developer has no legacy test mode. """ result = cls._static_request( "get", @@ -185,7 +185,7 @@ async def list_async( cls, **params: Unpack["InstallListParams"] ) -> ListObject["Install"]: """ - Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. + Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox, and also that app's legacy test mode installs when the developer has no legacy test mode. """ result = await cls._static_request_async( "get", diff --git a/stripe/apps/_install_service.py b/stripe/apps/_install_service.py index 07ff26625..e4efb1694 100644 --- a/stripe/apps/_install_service.py +++ b/stripe/apps/_install_service.py @@ -27,7 +27,7 @@ def list( options: Optional["RequestOptions"] = None, ) -> "ListObject[Install]": """ - Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. + Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox, and also that app's legacy test mode installs when the developer has no legacy test mode. """ return cast( "ListObject[Install]", @@ -46,7 +46,7 @@ async def list_async( options: Optional["RequestOptions"] = None, ) -> "ListObject[Install]": """ - Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. + Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox, and also that app's legacy test mode installs when the developer has no legacy test mode. """ return cast( "ListObject[Install]", diff --git a/stripe/billing/_alert.py b/stripe/billing/_alert.py index 8f258b583..0123f261a 100644 --- a/stripe/billing/_alert.py +++ b/stripe/billing/_alert.py @@ -131,10 +131,6 @@ class Monetary(StripeObject): class SpendThreshold(StripeObject): class Filters(StripeObject): - billing_cadence: Optional[str] - """ - Filter by billing cadence ID. - """ billing_group: Optional[str] """ Filter by billing group ID. @@ -229,7 +225,7 @@ class CustomPricingUnitDetails(StripeObject): Filters to scope the spend calculation. """ group_by: Optional[ - Union[Literal["billing_cadence", "pricing_plan_subscription"], str] + Union[Literal["billing_group", "pricing_plan_subscription"], str] ] """ Defines the granularity of spend aggregation. diff --git a/stripe/billing/_alert_notification.py b/stripe/billing/_alert_notification.py index 9d39bbf88..6722e246f 100644 --- a/stripe/billing/_alert_notification.py +++ b/stripe/billing/_alert_notification.py @@ -42,10 +42,6 @@ class AlertNotification(StripeObject): """ The billing group associated with this notification. Only present for spend threshold alerts grouped by billing group. """ - cadence: Optional[str] - """ - The cadence associated with this notification. Only present for spend threshold alerts grouped by cadence. - """ currency: Optional[str] """ Three-letter ISO currency code for the value, in lowercase. Only present for spend and credit balance threshold alerts. diff --git a/stripe/billing/_alert_triggered.py b/stripe/billing/_alert_triggered.py index 0fefb8e15..a9f8e81a5 100644 --- a/stripe/billing/_alert_triggered.py +++ b/stripe/billing/_alert_triggered.py @@ -25,10 +25,6 @@ class AggregationPeriod(StripeObject): """ class GroupBy(StripeObject): - billing_cadence: Optional[str] - """ - The billing cadence ID, populated when type is `billing_cadence` - """ billing_group: Optional[str] """ The billing group ID, populated when type is `billing_group` @@ -37,9 +33,7 @@ class GroupBy(StripeObject): """ The pricing plan subscription ID, populated when type is `pricing_plan_subscription` """ - type: Union[ - Literal["billing_cadence", "pricing_plan_subscription"], str - ] + type: Union[Literal["billing_group", "pricing_plan_subscription"], str] """ The type of grouping used for this alert notification """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index b93513e36..5f22a7d91 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -144,7 +144,12 @@ class AutomaticSurcharge(StripeObject): Indicates whether automatic surcharge is enabled for the session. """ provider: Optional[ - Union[Literal["daikin", "interpayments", "proserv", "yeeld"], str] + Union[ + Literal[ + "daikin", "dealerfx", "interpayments", "proserv", "yeeld" + ], + str, + ] ] """ The surcharge provider used for this session. @@ -1730,6 +1735,24 @@ class AdjustableQuantity(StripeObject): quantity: int _inner_class_types = {"adjustable_quantity": AdjustableQuantity} + class PassThroughFeeCost(StripeObject): + amount_subtotal: int + """ + The pass-through fee before tax. + """ + amount_tax: int + """ + The tax on the pass-through fee. Pass-through fees aren't taxed, so this is always 0. + """ + amount_total: int + """ + The pass-through fee after tax. + """ + calculation_basis_amount: int + """ + The amount the provider calculated the fee on. + """ + class PaymentMethodConfigurationDetails(StripeObject): id: str """ @@ -3613,6 +3636,10 @@ class Tax(StripeObject): """ This is the sum of all the discounts. """ + amount_pass_through_fee: Optional[int] + """ + The pass-through fee added to the Checkout Session, before tax. + """ amount_shipping: Optional[int] """ This is the sum of all the shipping amounts. @@ -3887,6 +3914,7 @@ class Link(StripeObject): """ Where the user is coming from. This informs the optimizations that are applied to the session. """ + pass_through_fee_cost: Optional[PassThroughFeeCost] payment_intent: Optional[ExpandableField["PaymentIntent"]] """ The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://docs.stripe.com/api/checkout/sessions/expire) instead. @@ -4516,6 +4544,7 @@ async def retrieve_async( "marketing_attributions": MarketingAttribution, "name_collection": NameCollection, "optional_items": OptionalItem, + "pass_through_fee_cost": PassThroughFeeCost, "payment_method_configuration_details": PaymentMethodConfigurationDetails, "payment_method_options": PaymentMethodOptions, "payment_settings": PaymentSettings, diff --git a/stripe/events/__init__.py b/stripe/events/__init__.py index b01dd1fca..a0af22867 100644 --- a/stripe/events/__init__.py +++ b/stripe/events/__init__.py @@ -1083,18 +1083,6 @@ V1TransferUpdatedEvent as V1TransferUpdatedEvent, V1TransferUpdatedEventNotification as V1TransferUpdatedEventNotification, ) - from stripe.events._v2_billing_cadence_billed_event import ( - V2BillingCadenceBilledEvent as V2BillingCadenceBilledEvent, - V2BillingCadenceBilledEventNotification as V2BillingCadenceBilledEventNotification, - ) - from stripe.events._v2_billing_cadence_canceled_event import ( - V2BillingCadenceCanceledEvent as V2BillingCadenceCanceledEvent, - V2BillingCadenceCanceledEventNotification as V2BillingCadenceCanceledEventNotification, - ) - from stripe.events._v2_billing_cadence_created_event import ( - V2BillingCadenceCreatedEvent as V2BillingCadenceCreatedEvent, - V2BillingCadenceCreatedEventNotification as V2BillingCadenceCreatedEventNotification, - ) from stripe.events._v2_billing_contract_activated_event import ( V2BillingContractActivatedEvent as V2BillingContractActivatedEvent, V2BillingContractActivatedEventNotification as V2BillingContractActivatedEventNotification, @@ -1135,6 +1123,30 @@ V2BillingContractTermDeletedEvent as V2BillingContractTermDeletedEvent, V2BillingContractTermDeletedEventNotification as V2BillingContractTermDeletedEventNotification, ) + from stripe.events._v2_billing_contract_term_pricing_override_ended_event import ( + V2BillingContractTermPricingOverrideEndedEvent as V2BillingContractTermPricingOverrideEndedEvent, + V2BillingContractTermPricingOverrideEndedEventNotification as V2BillingContractTermPricingOverrideEndedEventNotification, + ) + from stripe.events._v2_billing_contract_term_pricing_override_started_event import ( + V2BillingContractTermPricingOverrideStartedEvent as V2BillingContractTermPricingOverrideStartedEvent, + V2BillingContractTermPricingOverrideStartedEventNotification as V2BillingContractTermPricingOverrideStartedEventNotification, + ) + from stripe.events._v2_billing_contract_term_recurring_price_ended_event import ( + V2BillingContractTermRecurringPriceEndedEvent as V2BillingContractTermRecurringPriceEndedEvent, + V2BillingContractTermRecurringPriceEndedEventNotification as V2BillingContractTermRecurringPriceEndedEventNotification, + ) + from stripe.events._v2_billing_contract_term_recurring_price_started_event import ( + V2BillingContractTermRecurringPriceStartedEvent as V2BillingContractTermRecurringPriceStartedEvent, + V2BillingContractTermRecurringPriceStartedEventNotification as V2BillingContractTermRecurringPriceStartedEventNotification, + ) + from stripe.events._v2_billing_contract_term_scheduled_fee_service_period_ended_event import ( + V2BillingContractTermScheduledFeeServicePeriodEndedEvent as V2BillingContractTermScheduledFeeServicePeriodEndedEvent, + V2BillingContractTermScheduledFeeServicePeriodEndedEventNotification as V2BillingContractTermScheduledFeeServicePeriodEndedEventNotification, + ) + from stripe.events._v2_billing_contract_term_scheduled_fee_service_period_started_event import ( + V2BillingContractTermScheduledFeeServicePeriodStartedEvent as V2BillingContractTermScheduledFeeServicePeriodStartedEvent, + V2BillingContractTermScheduledFeeServicePeriodStartedEventNotification as V2BillingContractTermScheduledFeeServicePeriodStartedEventNotification, + ) from stripe.events._v2_billing_contract_term_updated_event import ( V2BillingContractTermUpdatedEvent as V2BillingContractTermUpdatedEvent, V2BillingContractTermUpdatedEventNotification as V2BillingContractTermUpdatedEventNotification, @@ -1503,6 +1515,14 @@ V2CoreHealthAuthorizationRateDropResolvedEvent as V2CoreHealthAuthorizationRateDropResolvedEvent, V2CoreHealthAuthorizationRateDropResolvedEventNotification as V2CoreHealthAuthorizationRateDropResolvedEventNotification, ) + from stripe.events._v2_core_health_custom_payment_method_adapter_degraded_firing_event import ( + V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEvent as V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEvent, + V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEventNotification as V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEventNotification, + ) + from stripe.events._v2_core_health_custom_payment_method_adapter_degraded_resolved_event import ( + V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEvent as V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEvent, + V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEventNotification as V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEventNotification, + ) from stripe.events._v2_core_health_elements_error_firing_event import ( V2CoreHealthElementsErrorFiringEvent as V2CoreHealthElementsErrorFiringEvent, V2CoreHealthElementsErrorFiringEventNotification as V2CoreHealthElementsErrorFiringEventNotification, @@ -2227,6 +2247,26 @@ V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent as V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent, V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification as V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification, ) + from stripe.events._v2_signals_payment_retry_evaluation_canceled_event import ( + V2SignalsPaymentRetryEvaluationCanceledEvent as V2SignalsPaymentRetryEvaluationCanceledEvent, + V2SignalsPaymentRetryEvaluationCanceledEventNotification as V2SignalsPaymentRetryEvaluationCanceledEventNotification, + ) + from stripe.events._v2_signals_payment_retry_evaluation_completed_event import ( + V2SignalsPaymentRetryEvaluationCompletedEvent as V2SignalsPaymentRetryEvaluationCompletedEvent, + V2SignalsPaymentRetryEvaluationCompletedEventNotification as V2SignalsPaymentRetryEvaluationCompletedEventNotification, + ) + from stripe.events._v2_signals_payment_retry_evaluation_created_event import ( + V2SignalsPaymentRetryEvaluationCreatedEvent as V2SignalsPaymentRetryEvaluationCreatedEvent, + V2SignalsPaymentRetryEvaluationCreatedEventNotification as V2SignalsPaymentRetryEvaluationCreatedEventNotification, + ) + from stripe.events._v2_signals_payment_retry_evaluation_expired_event import ( + V2SignalsPaymentRetryEvaluationExpiredEvent as V2SignalsPaymentRetryEvaluationExpiredEvent, + V2SignalsPaymentRetryEvaluationExpiredEventNotification as V2SignalsPaymentRetryEvaluationExpiredEventNotification, + ) + from stripe.events._v2_signals_payment_retry_evaluation_updated_event import ( + V2SignalsPaymentRetryEvaluationUpdatedEvent as V2SignalsPaymentRetryEvaluationUpdatedEvent, + V2SignalsPaymentRetryEvaluationUpdatedEventNotification as V2SignalsPaymentRetryEvaluationUpdatedEventNotification, + ) from stripe.events._v2_signals_payment_retry_evaluations_retry_recommended_event import ( V2SignalsPaymentRetryEvaluationsRetryRecommendedEvent as V2SignalsPaymentRetryEvaluationsRetryRecommendedEvent, V2SignalsPaymentRetryEvaluationsRetryRecommendedEventNotification as V2SignalsPaymentRetryEvaluationsRetryRecommendedEventNotification, @@ -4260,30 +4300,6 @@ "stripe.events._v1_transfer_updated_event", False, ), - "V2BillingCadenceBilledEvent": ( - "stripe.events._v2_billing_cadence_billed_event", - False, - ), - "V2BillingCadenceBilledEventNotification": ( - "stripe.events._v2_billing_cadence_billed_event", - False, - ), - "V2BillingCadenceCanceledEvent": ( - "stripe.events._v2_billing_cadence_canceled_event", - False, - ), - "V2BillingCadenceCanceledEventNotification": ( - "stripe.events._v2_billing_cadence_canceled_event", - False, - ), - "V2BillingCadenceCreatedEvent": ( - "stripe.events._v2_billing_cadence_created_event", - False, - ), - "V2BillingCadenceCreatedEventNotification": ( - "stripe.events._v2_billing_cadence_created_event", - False, - ), "V2BillingContractActivatedEvent": ( "stripe.events._v2_billing_contract_activated_event", False, @@ -4364,6 +4380,54 @@ "stripe.events._v2_billing_contract_term_deleted_event", False, ), + "V2BillingContractTermPricingOverrideEndedEvent": ( + "stripe.events._v2_billing_contract_term_pricing_override_ended_event", + False, + ), + "V2BillingContractTermPricingOverrideEndedEventNotification": ( + "stripe.events._v2_billing_contract_term_pricing_override_ended_event", + False, + ), + "V2BillingContractTermPricingOverrideStartedEvent": ( + "stripe.events._v2_billing_contract_term_pricing_override_started_event", + False, + ), + "V2BillingContractTermPricingOverrideStartedEventNotification": ( + "stripe.events._v2_billing_contract_term_pricing_override_started_event", + False, + ), + "V2BillingContractTermRecurringPriceEndedEvent": ( + "stripe.events._v2_billing_contract_term_recurring_price_ended_event", + False, + ), + "V2BillingContractTermRecurringPriceEndedEventNotification": ( + "stripe.events._v2_billing_contract_term_recurring_price_ended_event", + False, + ), + "V2BillingContractTermRecurringPriceStartedEvent": ( + "stripe.events._v2_billing_contract_term_recurring_price_started_event", + False, + ), + "V2BillingContractTermRecurringPriceStartedEventNotification": ( + "stripe.events._v2_billing_contract_term_recurring_price_started_event", + False, + ), + "V2BillingContractTermScheduledFeeServicePeriodEndedEvent": ( + "stripe.events._v2_billing_contract_term_scheduled_fee_service_period_ended_event", + False, + ), + "V2BillingContractTermScheduledFeeServicePeriodEndedEventNotification": ( + "stripe.events._v2_billing_contract_term_scheduled_fee_service_period_ended_event", + False, + ), + "V2BillingContractTermScheduledFeeServicePeriodStartedEvent": ( + "stripe.events._v2_billing_contract_term_scheduled_fee_service_period_started_event", + False, + ), + "V2BillingContractTermScheduledFeeServicePeriodStartedEventNotification": ( + "stripe.events._v2_billing_contract_term_scheduled_fee_service_period_started_event", + False, + ), "V2BillingContractTermUpdatedEvent": ( "stripe.events._v2_billing_contract_term_updated_event", False, @@ -5100,6 +5164,22 @@ "stripe.events._v2_core_health_authorization_rate_drop_resolved_event", False, ), + "V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEvent": ( + "stripe.events._v2_core_health_custom_payment_method_adapter_degraded_firing_event", + False, + ), + "V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEventNotification": ( + "stripe.events._v2_core_health_custom_payment_method_adapter_degraded_firing_event", + False, + ), + "V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEvent": ( + "stripe.events._v2_core_health_custom_payment_method_adapter_degraded_resolved_event", + False, + ), + "V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEventNotification": ( + "stripe.events._v2_core_health_custom_payment_method_adapter_degraded_resolved_event", + False, + ), "V2CoreHealthElementsErrorFiringEvent": ( "stripe.events._v2_core_health_elements_error_firing_event", False, @@ -6548,6 +6628,46 @@ "stripe.events._v2_signals_account_signal_payment_delinquency_exposure_ready_event", False, ), + "V2SignalsPaymentRetryEvaluationCanceledEvent": ( + "stripe.events._v2_signals_payment_retry_evaluation_canceled_event", + False, + ), + "V2SignalsPaymentRetryEvaluationCanceledEventNotification": ( + "stripe.events._v2_signals_payment_retry_evaluation_canceled_event", + False, + ), + "V2SignalsPaymentRetryEvaluationCompletedEvent": ( + "stripe.events._v2_signals_payment_retry_evaluation_completed_event", + False, + ), + "V2SignalsPaymentRetryEvaluationCompletedEventNotification": ( + "stripe.events._v2_signals_payment_retry_evaluation_completed_event", + False, + ), + "V2SignalsPaymentRetryEvaluationCreatedEvent": ( + "stripe.events._v2_signals_payment_retry_evaluation_created_event", + False, + ), + "V2SignalsPaymentRetryEvaluationCreatedEventNotification": ( + "stripe.events._v2_signals_payment_retry_evaluation_created_event", + False, + ), + "V2SignalsPaymentRetryEvaluationExpiredEvent": ( + "stripe.events._v2_signals_payment_retry_evaluation_expired_event", + False, + ), + "V2SignalsPaymentRetryEvaluationExpiredEventNotification": ( + "stripe.events._v2_signals_payment_retry_evaluation_expired_event", + False, + ), + "V2SignalsPaymentRetryEvaluationUpdatedEvent": ( + "stripe.events._v2_signals_payment_retry_evaluation_updated_event", + False, + ), + "V2SignalsPaymentRetryEvaluationUpdatedEventNotification": ( + "stripe.events._v2_signals_payment_retry_evaluation_updated_event", + False, + ), "V2SignalsPaymentRetryEvaluationsRetryRecommendedEvent": ( "stripe.events._v2_signals_payment_retry_evaluations_retry_recommended_event", False, diff --git a/stripe/events/_event_classes.py b/stripe/events/_event_classes.py index 9958a0c8c..229893e39 100644 --- a/stripe/events/_event_classes.py +++ b/stripe/events/_event_classes.py @@ -808,15 +808,6 @@ from stripe.events._v1_transfer_updated_event import ( V1TransferUpdatedEventNotification, ) - from stripe.events._v2_billing_cadence_billed_event import ( - V2BillingCadenceBilledEventNotification, - ) - from stripe.events._v2_billing_cadence_canceled_event import ( - V2BillingCadenceCanceledEventNotification, - ) - from stripe.events._v2_billing_cadence_created_event import ( - V2BillingCadenceCreatedEventNotification, - ) from stripe.events._v2_billing_contract_activated_event import ( V2BillingContractActivatedEventNotification, ) @@ -847,6 +838,24 @@ from stripe.events._v2_billing_contract_term_deleted_event import ( V2BillingContractTermDeletedEventNotification, ) + from stripe.events._v2_billing_contract_term_pricing_override_ended_event import ( + V2BillingContractTermPricingOverrideEndedEventNotification, + ) + from stripe.events._v2_billing_contract_term_pricing_override_started_event import ( + V2BillingContractTermPricingOverrideStartedEventNotification, + ) + from stripe.events._v2_billing_contract_term_recurring_price_ended_event import ( + V2BillingContractTermRecurringPriceEndedEventNotification, + ) + from stripe.events._v2_billing_contract_term_recurring_price_started_event import ( + V2BillingContractTermRecurringPriceStartedEventNotification, + ) + from stripe.events._v2_billing_contract_term_scheduled_fee_service_period_ended_event import ( + V2BillingContractTermScheduledFeeServicePeriodEndedEventNotification, + ) + from stripe.events._v2_billing_contract_term_scheduled_fee_service_period_started_event import ( + V2BillingContractTermScheduledFeeServicePeriodStartedEventNotification, + ) from stripe.events._v2_billing_contract_term_updated_event import ( V2BillingContractTermUpdatedEventNotification, ) @@ -1123,6 +1132,12 @@ from stripe.events._v2_core_health_authorization_rate_drop_resolved_event import ( V2CoreHealthAuthorizationRateDropResolvedEventNotification, ) + from stripe.events._v2_core_health_custom_payment_method_adapter_degraded_firing_event import ( + V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEventNotification, + ) + from stripe.events._v2_core_health_custom_payment_method_adapter_degraded_resolved_event import ( + V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEventNotification, + ) from stripe.events._v2_core_health_elements_error_firing_event import ( V2CoreHealthElementsErrorFiringEventNotification, ) @@ -1666,9 +1681,24 @@ from stripe.events._v2_signals_account_signal_payment_delinquency_exposure_ready_event import ( V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification, ) + from stripe.events._v2_signals_payment_retry_evaluation_canceled_event import ( + V2SignalsPaymentRetryEvaluationCanceledEventNotification, + ) + from stripe.events._v2_signals_payment_retry_evaluation_completed_event import ( + V2SignalsPaymentRetryEvaluationCompletedEventNotification, + ) + from stripe.events._v2_signals_payment_retry_evaluation_created_event import ( + V2SignalsPaymentRetryEvaluationCreatedEventNotification, + ) + from stripe.events._v2_signals_payment_retry_evaluation_expired_event import ( + V2SignalsPaymentRetryEvaluationExpiredEventNotification, + ) from stripe.events._v2_signals_payment_retry_evaluations_retry_recommended_event import ( V2SignalsPaymentRetryEvaluationsRetryRecommendedEventNotification, ) + from stripe.events._v2_signals_payment_retry_evaluation_updated_event import ( + V2SignalsPaymentRetryEvaluationUpdatedEventNotification, + ) _V2_EVENT_CLASS_LOOKUP = { @@ -2740,18 +2770,6 @@ "stripe.events._v1_transfer_updated_event", "V1TransferUpdatedEvent", ), - "v2.billing.cadence.billed": ( - "stripe.events._v2_billing_cadence_billed_event", - "V2BillingCadenceBilledEvent", - ), - "v2.billing.cadence.canceled": ( - "stripe.events._v2_billing_cadence_canceled_event", - "V2BillingCadenceCanceledEvent", - ), - "v2.billing.cadence.created": ( - "stripe.events._v2_billing_cadence_created_event", - "V2BillingCadenceCreatedEvent", - ), "v2.billing.contract.activated": ( "stripe.events._v2_billing_contract_activated_event", "V2BillingContractActivatedEvent", @@ -2792,6 +2810,30 @@ "stripe.events._v2_billing_contract_term_deleted_event", "V2BillingContractTermDeletedEvent", ), + "v2.billing.contract_term.pricing_override_ended": ( + "stripe.events._v2_billing_contract_term_pricing_override_ended_event", + "V2BillingContractTermPricingOverrideEndedEvent", + ), + "v2.billing.contract_term.pricing_override_started": ( + "stripe.events._v2_billing_contract_term_pricing_override_started_event", + "V2BillingContractTermPricingOverrideStartedEvent", + ), + "v2.billing.contract_term.recurring_price_ended": ( + "stripe.events._v2_billing_contract_term_recurring_price_ended_event", + "V2BillingContractTermRecurringPriceEndedEvent", + ), + "v2.billing.contract_term.recurring_price_started": ( + "stripe.events._v2_billing_contract_term_recurring_price_started_event", + "V2BillingContractTermRecurringPriceStartedEvent", + ), + "v2.billing.contract_term.scheduled_fee_service_period_ended": ( + "stripe.events._v2_billing_contract_term_scheduled_fee_service_period_ended_event", + "V2BillingContractTermScheduledFeeServicePeriodEndedEvent", + ), + "v2.billing.contract_term.scheduled_fee_service_period_started": ( + "stripe.events._v2_billing_contract_term_scheduled_fee_service_period_started_event", + "V2BillingContractTermScheduledFeeServicePeriodStartedEvent", + ), "v2.billing.contract_term.updated": ( "stripe.events._v2_billing_contract_term_updated_event", "V2BillingContractTermUpdatedEvent", @@ -3160,6 +3202,14 @@ "stripe.events._v2_core_health_authorization_rate_drop_resolved_event", "V2CoreHealthAuthorizationRateDropResolvedEvent", ), + "v2.core.health.custom_payment_method_adapter_degraded.firing": ( + "stripe.events._v2_core_health_custom_payment_method_adapter_degraded_firing_event", + "V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEvent", + ), + "v2.core.health.custom_payment_method_adapter_degraded.resolved": ( + "stripe.events._v2_core_health_custom_payment_method_adapter_degraded_resolved_event", + "V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEvent", + ), "v2.core.health.elements_error.firing": ( "stripe.events._v2_core_health_elements_error_firing_event", "V2CoreHealthElementsErrorFiringEvent", @@ -3884,10 +3934,30 @@ "stripe.events._v2_signals_account_signal_payment_delinquency_exposure_ready_event", "V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent", ), + "v2.signals.payment_retry_evaluation.canceled": ( + "stripe.events._v2_signals_payment_retry_evaluation_canceled_event", + "V2SignalsPaymentRetryEvaluationCanceledEvent", + ), + "v2.signals.payment_retry_evaluation.completed": ( + "stripe.events._v2_signals_payment_retry_evaluation_completed_event", + "V2SignalsPaymentRetryEvaluationCompletedEvent", + ), + "v2.signals.payment_retry_evaluation.created": ( + "stripe.events._v2_signals_payment_retry_evaluation_created_event", + "V2SignalsPaymentRetryEvaluationCreatedEvent", + ), + "v2.signals.payment_retry_evaluation.expired": ( + "stripe.events._v2_signals_payment_retry_evaluation_expired_event", + "V2SignalsPaymentRetryEvaluationExpiredEvent", + ), "v2.signals.payment_retry_evaluations.retry_recommended": ( "stripe.events._v2_signals_payment_retry_evaluations_retry_recommended_event", "V2SignalsPaymentRetryEvaluationsRetryRecommendedEvent", ), + "v2.signals.payment_retry_evaluation.updated": ( + "stripe.events._v2_signals_payment_retry_evaluation_updated_event", + "V2SignalsPaymentRetryEvaluationUpdatedEvent", + ), } @@ -4971,18 +5041,6 @@ def get_v2_event_class(type_: str): "stripe.events._v1_transfer_updated_event", "V1TransferUpdatedEventNotification", ), - "v2.billing.cadence.billed": ( - "stripe.events._v2_billing_cadence_billed_event", - "V2BillingCadenceBilledEventNotification", - ), - "v2.billing.cadence.canceled": ( - "stripe.events._v2_billing_cadence_canceled_event", - "V2BillingCadenceCanceledEventNotification", - ), - "v2.billing.cadence.created": ( - "stripe.events._v2_billing_cadence_created_event", - "V2BillingCadenceCreatedEventNotification", - ), "v2.billing.contract.activated": ( "stripe.events._v2_billing_contract_activated_event", "V2BillingContractActivatedEventNotification", @@ -5023,6 +5081,30 @@ def get_v2_event_class(type_: str): "stripe.events._v2_billing_contract_term_deleted_event", "V2BillingContractTermDeletedEventNotification", ), + "v2.billing.contract_term.pricing_override_ended": ( + "stripe.events._v2_billing_contract_term_pricing_override_ended_event", + "V2BillingContractTermPricingOverrideEndedEventNotification", + ), + "v2.billing.contract_term.pricing_override_started": ( + "stripe.events._v2_billing_contract_term_pricing_override_started_event", + "V2BillingContractTermPricingOverrideStartedEventNotification", + ), + "v2.billing.contract_term.recurring_price_ended": ( + "stripe.events._v2_billing_contract_term_recurring_price_ended_event", + "V2BillingContractTermRecurringPriceEndedEventNotification", + ), + "v2.billing.contract_term.recurring_price_started": ( + "stripe.events._v2_billing_contract_term_recurring_price_started_event", + "V2BillingContractTermRecurringPriceStartedEventNotification", + ), + "v2.billing.contract_term.scheduled_fee_service_period_ended": ( + "stripe.events._v2_billing_contract_term_scheduled_fee_service_period_ended_event", + "V2BillingContractTermScheduledFeeServicePeriodEndedEventNotification", + ), + "v2.billing.contract_term.scheduled_fee_service_period_started": ( + "stripe.events._v2_billing_contract_term_scheduled_fee_service_period_started_event", + "V2BillingContractTermScheduledFeeServicePeriodStartedEventNotification", + ), "v2.billing.contract_term.updated": ( "stripe.events._v2_billing_contract_term_updated_event", "V2BillingContractTermUpdatedEventNotification", @@ -5391,6 +5473,14 @@ def get_v2_event_class(type_: str): "stripe.events._v2_core_health_authorization_rate_drop_resolved_event", "V2CoreHealthAuthorizationRateDropResolvedEventNotification", ), + "v2.core.health.custom_payment_method_adapter_degraded.firing": ( + "stripe.events._v2_core_health_custom_payment_method_adapter_degraded_firing_event", + "V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEventNotification", + ), + "v2.core.health.custom_payment_method_adapter_degraded.resolved": ( + "stripe.events._v2_core_health_custom_payment_method_adapter_degraded_resolved_event", + "V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEventNotification", + ), "v2.core.health.elements_error.firing": ( "stripe.events._v2_core_health_elements_error_firing_event", "V2CoreHealthElementsErrorFiringEventNotification", @@ -6115,10 +6205,30 @@ def get_v2_event_class(type_: str): "stripe.events._v2_signals_account_signal_payment_delinquency_exposure_ready_event", "V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification", ), + "v2.signals.payment_retry_evaluation.canceled": ( + "stripe.events._v2_signals_payment_retry_evaluation_canceled_event", + "V2SignalsPaymentRetryEvaluationCanceledEventNotification", + ), + "v2.signals.payment_retry_evaluation.completed": ( + "stripe.events._v2_signals_payment_retry_evaluation_completed_event", + "V2SignalsPaymentRetryEvaluationCompletedEventNotification", + ), + "v2.signals.payment_retry_evaluation.created": ( + "stripe.events._v2_signals_payment_retry_evaluation_created_event", + "V2SignalsPaymentRetryEvaluationCreatedEventNotification", + ), + "v2.signals.payment_retry_evaluation.expired": ( + "stripe.events._v2_signals_payment_retry_evaluation_expired_event", + "V2SignalsPaymentRetryEvaluationExpiredEventNotification", + ), "v2.signals.payment_retry_evaluations.retry_recommended": ( "stripe.events._v2_signals_payment_retry_evaluations_retry_recommended_event", "V2SignalsPaymentRetryEvaluationsRetryRecommendedEventNotification", ), + "v2.signals.payment_retry_evaluation.updated": ( + "stripe.events._v2_signals_payment_retry_evaluation_updated_event", + "V2SignalsPaymentRetryEvaluationUpdatedEventNotification", + ), } @@ -6401,9 +6511,6 @@ def get_v2_event_notification_class(type_: str): "V1TransferCreatedEventNotification", "V1TransferReversedEventNotification", "V1TransferUpdatedEventNotification", - "V2BillingCadenceBilledEventNotification", - "V2BillingCadenceCanceledEventNotification", - "V2BillingCadenceCreatedEventNotification", "V2BillingContractActivatedEventNotification", "V2BillingContractCanceledEventNotification", "V2BillingContractCollectionBlockedEventNotification", @@ -6414,6 +6521,12 @@ def get_v2_event_notification_class(type_: str): "V2BillingContractEndedEventNotification", "V2BillingContractTermCreatedEventNotification", "V2BillingContractTermDeletedEventNotification", + "V2BillingContractTermPricingOverrideEndedEventNotification", + "V2BillingContractTermPricingOverrideStartedEventNotification", + "V2BillingContractTermRecurringPriceEndedEventNotification", + "V2BillingContractTermRecurringPriceStartedEventNotification", + "V2BillingContractTermScheduledFeeServicePeriodEndedEventNotification", + "V2BillingContractTermScheduledFeeServicePeriodStartedEventNotification", "V2BillingContractTermUpdatedEventNotification", "V2BillingContractUpdatedEventNotification", "V2BillingLicensedItemCreatedEventNotification", @@ -6506,6 +6619,8 @@ def get_v2_event_notification_class(type_: str): "V2CoreHealthApiLatencyResolvedEventNotification", "V2CoreHealthAuthorizationRateDropFiringEventNotification", "V2CoreHealthAuthorizationRateDropResolvedEventNotification", + "V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEventNotification", + "V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEventNotification", "V2CoreHealthElementsErrorFiringEventNotification", "V2CoreHealthElementsErrorResolvedEventNotification", "V2CoreHealthEventGenerationFailureResolvedEventNotification", @@ -6687,5 +6802,10 @@ def get_v2_event_notification_class(type_: str): "V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification", "V2SignalsAccountSignalMerchantDelinquencyReadyEventNotification", "V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification", + "V2SignalsPaymentRetryEvaluationCanceledEventNotification", + "V2SignalsPaymentRetryEvaluationCompletedEventNotification", + "V2SignalsPaymentRetryEvaluationCreatedEventNotification", + "V2SignalsPaymentRetryEvaluationExpiredEventNotification", "V2SignalsPaymentRetryEvaluationsRetryRecommendedEventNotification", + "V2SignalsPaymentRetryEvaluationUpdatedEventNotification", ] diff --git a/stripe/events/_v2_billing_contract_term_pricing_override_ended_event.py b/stripe/events/_v2_billing_contract_term_pricing_override_ended_event.py new file mode 100644 index 000000000..bc9b26aff --- /dev/null +++ b/stripe/events/_v2_billing_contract_term_pricing_override_ended_event.py @@ -0,0 +1,155 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + from stripe._stripe_client import StripeClient + from stripe.v2.billing._contract_term import ContractTerm + + +class V2BillingContractTermPricingOverrideEndedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.billing.contract_term.pricing_override_ended" + type: Literal["v2.billing.contract_term.pricing_override_ended"] + 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) -> "V2BillingContractTermPricingOverrideEndedEvent": + return cast( + "V2BillingContractTermPricingOverrideEndedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ContractTerm": + 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( + "ContractTerm", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2BillingContractTermPricingOverrideEndedEvent": + return cast( + "V2BillingContractTermPricingOverrideEndedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ContractTerm": + 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( + "ContractTerm", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2BillingContractTermPricingOverrideEndedEvent(Event): + LOOKUP_TYPE = "v2.billing.contract_term.pricing_override_ended" + type: Literal["v2.billing.contract_term.pricing_override_ended"] + + class V2BillingContractTermPricingOverrideEndedEventData(StripeObject): + contract: str + """ + The Contract containing this term. + """ + + data: V2BillingContractTermPricingOverrideEndedEventData + """ + Data for the v2.billing.contract_term.pricing_override_ended event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2BillingContractTermPricingOverrideEndedEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2BillingContractTermPricingOverrideEndedEvent.V2BillingContractTermPricingOverrideEndedEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ContractTerm": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ContractTerm", + 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_billing_contract_term_pricing_override_started_event.py b/stripe/events/_v2_billing_contract_term_pricing_override_started_event.py new file mode 100644 index 000000000..6773efdae --- /dev/null +++ b/stripe/events/_v2_billing_contract_term_pricing_override_started_event.py @@ -0,0 +1,157 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + from stripe._stripe_client import StripeClient + from stripe.v2.billing._contract_term import ContractTerm + + +class V2BillingContractTermPricingOverrideStartedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.billing.contract_term.pricing_override_started" + type: Literal["v2.billing.contract_term.pricing_override_started"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2BillingContractTermPricingOverrideStartedEvent": + return cast( + "V2BillingContractTermPricingOverrideStartedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ContractTerm": + 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( + "ContractTerm", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2BillingContractTermPricingOverrideStartedEvent": + return cast( + "V2BillingContractTermPricingOverrideStartedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ContractTerm": + 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( + "ContractTerm", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2BillingContractTermPricingOverrideStartedEvent(Event): + LOOKUP_TYPE = "v2.billing.contract_term.pricing_override_started" + type: Literal["v2.billing.contract_term.pricing_override_started"] + + class V2BillingContractTermPricingOverrideStartedEventData(StripeObject): + contract: str + """ + The Contract containing this term. + """ + + data: V2BillingContractTermPricingOverrideStartedEventData + """ + Data for the v2.billing.contract_term.pricing_override_started event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2BillingContractTermPricingOverrideStartedEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2BillingContractTermPricingOverrideStartedEvent.V2BillingContractTermPricingOverrideStartedEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ContractTerm": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ContractTerm", + 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_billing_cadence_created_event.py b/stripe/events/_v2_billing_contract_term_recurring_price_ended_event.py similarity index 69% rename from stripe/events/_v2_billing_cadence_created_event.py rename to stripe/events/_v2_billing_contract_term_recurring_price_ended_event.py index 367236a2a..5f389be90 100644 --- a/stripe/events/_v2_billing_cadence_created_event.py +++ b/stripe/events/_v2_billing_contract_term_recurring_price_ended_event.py @@ -11,12 +11,14 @@ if TYPE_CHECKING: from stripe._api_requestor import _APIRequestor from stripe._stripe_client import StripeClient - from stripe.v2.billing._cadence import Cadence + from stripe.v2.billing._contract_term import ContractTerm -class V2BillingCadenceCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v2.billing.cadence.created" - type: Literal["v2.billing.cadence.created"] +class V2BillingContractTermRecurringPriceEndedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.billing.contract_term.recurring_price_ended" + type: Literal["v2.billing.contract_term.recurring_price_ended"] related_object: RelatedObject def __init__( @@ -29,13 +31,13 @@ def __init__( self.related_object = RelatedObject(parsed_body["related_object"]) @override - def fetch_event(self) -> "V2BillingCadenceCreatedEvent": + def fetch_event(self) -> "V2BillingContractTermRecurringPriceEndedEvent": return cast( - "V2BillingCadenceCreatedEvent", + "V2BillingContractTermRecurringPriceEndedEvent", super().fetch_event(), ) - def fetch_related_object(self) -> "Cadence": + def fetch_related_object(self) -> "ContractTerm": response = self._client.raw_request( "get", self.related_object.url, @@ -44,7 +46,7 @@ def fetch_related_object(self) -> "Cadence": usage=["fetch_related_object"], ) return cast( - "Cadence", + "ContractTerm", self._client.deserialize( response, api_mode=get_api_mode(self.related_object.url), @@ -52,13 +54,15 @@ def fetch_related_object(self) -> "Cadence": ) @override - async def fetch_event_async(self) -> "V2BillingCadenceCreatedEvent": + async def fetch_event_async( + self, + ) -> "V2BillingContractTermRecurringPriceEndedEvent": return cast( - "V2BillingCadenceCreatedEvent", + "V2BillingContractTermRecurringPriceEndedEvent", await super().fetch_event_async(), ) - async def fetch_related_object_async(self) -> "Cadence": + async def fetch_related_object_async(self) -> "ContractTerm": response = await self._client.raw_request_async( "get", self.related_object.url, @@ -67,7 +71,7 @@ async def fetch_related_object_async(self) -> "Cadence": usage=["fetch_related_object"], ) return cast( - "Cadence", + "ContractTerm", self._client.deserialize( response, api_mode=get_api_mode(self.related_object.url), @@ -75,19 +79,19 @@ async def fetch_related_object_async(self) -> "Cadence": ) -class V2BillingCadenceCreatedEvent(Event): - LOOKUP_TYPE = "v2.billing.cadence.created" - type: Literal["v2.billing.cadence.created"] +class V2BillingContractTermRecurringPriceEndedEvent(Event): + LOOKUP_TYPE = "v2.billing.contract_term.recurring_price_ended" + type: Literal["v2.billing.contract_term.recurring_price_ended"] - class V2BillingCadenceCreatedEventData(StripeObject): - created: str + class V2BillingContractTermRecurringPriceEndedEventData(StripeObject): + contract: str """ - Timestamp of when the object was created. + The Contract containing this term. """ - data: V2BillingCadenceCreatedEventData + data: V2BillingContractTermRecurringPriceEndedEventData """ - Data for the v2.billing.cadence.created event + Data for the v2.billing.contract_term.recurring_price_ended event """ @classmethod @@ -98,7 +102,7 @@ def _construct_from( last_response: Optional[StripeResponse] = None, requestor: "_APIRequestor", api_mode: ApiMode, - ) -> "V2BillingCadenceCreatedEvent": + ) -> "V2BillingContractTermRecurringPriceEndedEvent": evt = super()._construct_from( values=values, last_response=last_response, @@ -106,7 +110,7 @@ def _construct_from( api_mode=api_mode, ) if hasattr(evt, "data"): - evt.data = V2BillingCadenceCreatedEvent.V2BillingCadenceCreatedEventData._construct_from( + evt.data = V2BillingContractTermRecurringPriceEndedEvent.V2BillingContractTermRecurringPriceEndedEventData._construct_from( values=evt.data, last_response=last_response, requestor=requestor, @@ -133,12 +137,12 @@ class RelatedObject(StripeObject): Object containing the reference to API resource relevant to the event """ - def fetch_related_object(self) -> "Cadence": + def fetch_related_object(self) -> "ContractTerm": """ Retrieves the related object from the API. Makes an API request on every call. """ return cast( - "Cadence", + "ContractTerm", self._requestor.request( "get", self.related_object.url, diff --git a/stripe/events/_v2_billing_cadence_billed_event.py b/stripe/events/_v2_billing_contract_term_recurring_price_started_event.py similarity index 70% rename from stripe/events/_v2_billing_cadence_billed_event.py rename to stripe/events/_v2_billing_contract_term_recurring_price_started_event.py index 28a4a61b5..72556a5d0 100644 --- a/stripe/events/_v2_billing_cadence_billed_event.py +++ b/stripe/events/_v2_billing_contract_term_recurring_price_started_event.py @@ -5,18 +5,20 @@ from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, Optional, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: from stripe._api_requestor import _APIRequestor from stripe._stripe_client import StripeClient - from stripe.v2.billing._cadence import Cadence + from stripe.v2.billing._contract_term import ContractTerm -class V2BillingCadenceBilledEventNotification(EventNotification): - LOOKUP_TYPE = "v2.billing.cadence.billed" - type: Literal["v2.billing.cadence.billed"] +class V2BillingContractTermRecurringPriceStartedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.billing.contract_term.recurring_price_started" + type: Literal["v2.billing.contract_term.recurring_price_started"] related_object: RelatedObject def __init__( @@ -29,13 +31,13 @@ def __init__( self.related_object = RelatedObject(parsed_body["related_object"]) @override - def fetch_event(self) -> "V2BillingCadenceBilledEvent": + def fetch_event(self) -> "V2BillingContractTermRecurringPriceStartedEvent": return cast( - "V2BillingCadenceBilledEvent", + "V2BillingContractTermRecurringPriceStartedEvent", super().fetch_event(), ) - def fetch_related_object(self) -> "Cadence": + def fetch_related_object(self) -> "ContractTerm": response = self._client.raw_request( "get", self.related_object.url, @@ -44,7 +46,7 @@ def fetch_related_object(self) -> "Cadence": usage=["fetch_related_object"], ) return cast( - "Cadence", + "ContractTerm", self._client.deserialize( response, api_mode=get_api_mode(self.related_object.url), @@ -52,13 +54,15 @@ def fetch_related_object(self) -> "Cadence": ) @override - async def fetch_event_async(self) -> "V2BillingCadenceBilledEvent": + async def fetch_event_async( + self, + ) -> "V2BillingContractTermRecurringPriceStartedEvent": return cast( - "V2BillingCadenceBilledEvent", + "V2BillingContractTermRecurringPriceStartedEvent", await super().fetch_event_async(), ) - async def fetch_related_object_async(self) -> "Cadence": + async def fetch_related_object_async(self) -> "ContractTerm": response = await self._client.raw_request_async( "get", self.related_object.url, @@ -67,7 +71,7 @@ async def fetch_related_object_async(self) -> "Cadence": usage=["fetch_related_object"], ) return cast( - "Cadence", + "ContractTerm", self._client.deserialize( response, api_mode=get_api_mode(self.related_object.url), @@ -75,19 +79,19 @@ async def fetch_related_object_async(self) -> "Cadence": ) -class V2BillingCadenceBilledEvent(Event): - LOOKUP_TYPE = "v2.billing.cadence.billed" - type: Literal["v2.billing.cadence.billed"] +class V2BillingContractTermRecurringPriceStartedEvent(Event): + LOOKUP_TYPE = "v2.billing.contract_term.recurring_price_started" + type: Literal["v2.billing.contract_term.recurring_price_started"] - class V2BillingCadenceBilledEventData(StripeObject): - invoices: List[str] + class V2BillingContractTermRecurringPriceStartedEventData(StripeObject): + contract: str """ - The IDs of the invoices that were generated by the tick for this Cadence. + The Contract containing this term. """ - data: V2BillingCadenceBilledEventData + data: V2BillingContractTermRecurringPriceStartedEventData """ - Data for the v2.billing.cadence.billed event + Data for the v2.billing.contract_term.recurring_price_started event """ @classmethod @@ -98,7 +102,7 @@ def _construct_from( last_response: Optional[StripeResponse] = None, requestor: "_APIRequestor", api_mode: ApiMode, - ) -> "V2BillingCadenceBilledEvent": + ) -> "V2BillingContractTermRecurringPriceStartedEvent": evt = super()._construct_from( values=values, last_response=last_response, @@ -106,7 +110,7 @@ def _construct_from( api_mode=api_mode, ) if hasattr(evt, "data"): - evt.data = V2BillingCadenceBilledEvent.V2BillingCadenceBilledEventData._construct_from( + evt.data = V2BillingContractTermRecurringPriceStartedEvent.V2BillingContractTermRecurringPriceStartedEventData._construct_from( values=evt.data, last_response=last_response, requestor=requestor, @@ -133,12 +137,12 @@ class RelatedObject(StripeObject): Object containing the reference to API resource relevant to the event """ - def fetch_related_object(self) -> "Cadence": + def fetch_related_object(self) -> "ContractTerm": """ Retrieves the related object from the API. Makes an API request on every call. """ return cast( - "Cadence", + "ContractTerm", self._requestor.request( "get", self.related_object.url, diff --git a/stripe/events/_v2_billing_contract_term_scheduled_fee_service_period_ended_event.py b/stripe/events/_v2_billing_contract_term_scheduled_fee_service_period_ended_event.py new file mode 100644 index 000000000..5038f95e5 --- /dev/null +++ b/stripe/events/_v2_billing_contract_term_scheduled_fee_service_period_ended_event.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + from stripe._stripe_client import StripeClient + from stripe.v2.billing._contract_term import ContractTerm + + +class V2BillingContractTermScheduledFeeServicePeriodEndedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.billing.contract_term.scheduled_fee_service_period_ended" + type: Literal[ + "v2.billing.contract_term.scheduled_fee_service_period_ended" + ] + 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, + ) -> "V2BillingContractTermScheduledFeeServicePeriodEndedEvent": + return cast( + "V2BillingContractTermScheduledFeeServicePeriodEndedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ContractTerm": + 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( + "ContractTerm", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2BillingContractTermScheduledFeeServicePeriodEndedEvent": + return cast( + "V2BillingContractTermScheduledFeeServicePeriodEndedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ContractTerm": + 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( + "ContractTerm", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2BillingContractTermScheduledFeeServicePeriodEndedEvent(Event): + LOOKUP_TYPE = "v2.billing.contract_term.scheduled_fee_service_period_ended" + type: Literal[ + "v2.billing.contract_term.scheduled_fee_service_period_ended" + ] + + class V2BillingContractTermScheduledFeeServicePeriodEndedEventData( + StripeObject, + ): + contract: str + """ + The Contract containing this term. + """ + + data: V2BillingContractTermScheduledFeeServicePeriodEndedEventData + """ + Data for the v2.billing.contract_term.scheduled_fee_service_period_ended event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2BillingContractTermScheduledFeeServicePeriodEndedEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2BillingContractTermScheduledFeeServicePeriodEndedEvent.V2BillingContractTermScheduledFeeServicePeriodEndedEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ContractTerm": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ContractTerm", + 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_billing_contract_term_scheduled_fee_service_period_started_event.py b/stripe/events/_v2_billing_contract_term_scheduled_fee_service_period_started_event.py new file mode 100644 index 000000000..795ceb9ac --- /dev/null +++ b/stripe/events/_v2_billing_contract_term_scheduled_fee_service_period_started_event.py @@ -0,0 +1,167 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + from stripe._stripe_client import StripeClient + from stripe.v2.billing._contract_term import ContractTerm + + +class V2BillingContractTermScheduledFeeServicePeriodStartedEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v2.billing.contract_term.scheduled_fee_service_period_started" + ) + type: Literal[ + "v2.billing.contract_term.scheduled_fee_service_period_started" + ] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2BillingContractTermScheduledFeeServicePeriodStartedEvent": + return cast( + "V2BillingContractTermScheduledFeeServicePeriodStartedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ContractTerm": + 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( + "ContractTerm", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2BillingContractTermScheduledFeeServicePeriodStartedEvent": + return cast( + "V2BillingContractTermScheduledFeeServicePeriodStartedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ContractTerm": + 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( + "ContractTerm", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2BillingContractTermScheduledFeeServicePeriodStartedEvent(Event): + LOOKUP_TYPE = ( + "v2.billing.contract_term.scheduled_fee_service_period_started" + ) + type: Literal[ + "v2.billing.contract_term.scheduled_fee_service_period_started" + ] + + class V2BillingContractTermScheduledFeeServicePeriodStartedEventData( + StripeObject, + ): + contract: str + """ + The Contract containing this term. + """ + + data: V2BillingContractTermScheduledFeeServicePeriodStartedEventData + """ + Data for the v2.billing.contract_term.scheduled_fee_service_period_started event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2BillingContractTermScheduledFeeServicePeriodStartedEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2BillingContractTermScheduledFeeServicePeriodStartedEvent.V2BillingContractTermScheduledFeeServicePeriodStartedEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ContractTerm": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ContractTerm", + 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_core_account_including_configuration_merchant_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py index e573d0a83..b922eb614 100644 --- a/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py @@ -110,6 +110,7 @@ class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventDat "au_becs_debit_payments", "bacs_debit_payments", "bancontact_payments", + "billie_payments", "blik_payments", "blik_recurring_payments", "boleto_payments", @@ -128,16 +129,20 @@ class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventDat "konbini_payments", "kr_card_payments", "link_payments", + "mb_way_payments", "mobilepay_payments", "multibanco_payments", "mx_bank_transfer_payments", "naver_pay_payments", + "nz_bank_account_becs_debit_payments", "oxxo_payments", "p24_payments", "payco_payments", "paynow_payments", "stripe_balance.payouts", + "paypay_payments", "pay_by_bank_payments", + "pix_payments", "promptpay_payments", "revolut_pay_payments", "samsung_pay_payments", @@ -148,10 +153,15 @@ class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventDat "sequra_payments", "sunbit_payments", "swish_payments", + "touch_n_go_payments", + "truemoney_payments", "twint_payments", "upi_payments", "us_bank_transfer_payments", "vipps_payments", + "wechat_pay_mobile_web_payments", + "wechat_pay_payments", + "wero_payments", "zip_payments", ], str, diff --git a/stripe/events/_v2_core_account_including_configuration_money_manager_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_money_manager_capability_status_updated_event.py index 74f919fe3..9d3b1596b 100644 --- a/stripe/events/_v2_core_account_including_configuration_money_manager_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_money_manager_capability_status_updated_event.py @@ -100,6 +100,8 @@ class V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEven "business_custodial_storage.inbound.usdc", "business_custodial_storage.outbound.ousd", "business_custodial_storage.outbound.usdc", + "business_demand_deposit_account_fifth_third_storage.inbound.usd", + "business_demand_deposit_account_fifth_third_storage.outbound.usd", "business_storage.inbound.cad", "business_storage.inbound.czk", "business_storage.inbound.eur", diff --git a/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py index 64c7ab602..65f876d71 100644 --- a/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py @@ -113,6 +113,7 @@ class V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventDa "bank_accounts.sepa_credit", "bank_accounts.sepa_instant", "bank_accounts.swift", + "bank_accounts.tips", "bank_accounts.wire", "cards", "crypto_wallets_v2", diff --git a/stripe/events/_v2_core_health_custom_payment_method_adapter_degraded_firing_event.py b/stripe/events/_v2_core_health_custom_payment_method_adapter_degraded_firing_event.py new file mode 100644 index 000000000..deeca06e6 --- /dev/null +++ b/stripe/events/_v2_core_health_custom_payment_method_adapter_degraded_firing_event.py @@ -0,0 +1,142 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe.v2.core._event import Event, EventNotification +from typing import Any, Dict, Optional, Union, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + + +class V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v2.core.health.custom_payment_method_adapter_degraded.firing" + ) + type: Literal[ + "v2.core.health.custom_payment_method_adapter_degraded.firing" + ] + + @override + def fetch_event( + self, + ) -> "V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEvent": + return cast( + "V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEvent", + super().fetch_event(), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEvent": + return cast( + "V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEvent", + await super().fetch_event_async(), + ) + + +class V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEvent(Event): + LOOKUP_TYPE = ( + "v2.core.health.custom_payment_method_adapter_degraded.firing" + ) + type: Literal[ + "v2.core.health.custom_payment_method_adapter_degraded.firing" + ] + + class V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEventData( + StripeObject, + ): + class Impact(StripeObject): + class CustomPaymentMethodTypeDetails(StripeObject): + auto_disabled_at: Optional[str] + """ + The time when the custom payment method was automatically disabled. Null when it is enabled. + """ + display_name: str + """ + The display name of the custom payment method type. + """ + reverse_api_url: str + """ + The URL of the user's self-hosted adapter endpoint. + """ + type: str + """ + The identifier of the custom payment method type (e.g., "cpmt_..."). + """ + + custom_payment_method_disabled_from_checkout: bool + """ + Whether the custom payment method was disabled in Checkout as a result of the degradation. True while the alert is open and false when it is resolved. + """ + custom_payment_method_type_details: CustomPaymentMethodTypeDetails + """ + The custom payment method type whose adapter is unhealthy. + """ + degraded_health_reason: str + """ + The reason the adapter's health is degraded. + """ + _inner_class_types = { + "custom_payment_method_type_details": CustomPaymentMethodTypeDetails, + } + + alert_id: str + """ + The alert ID. + """ + grouping_key: str + """ + The grouping key for the alert. + """ + impact: Impact + """ + The user impact. + """ + severity: Union[Literal["critical", "non_critical"], str] + """ + The severity of the alert. + """ + started_at: str + """ + The time when impact on the user experience was first detected. + """ + summary: str + """ + A short description of the alert. + """ + _inner_class_types = {"impact": Impact} + + data: V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEventData + """ + Data for the v2.core.health.custom_payment_method_adapter_degraded.firing event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEvent.V2CoreHealthCustomPaymentMethodAdapterDegradedFiringEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt diff --git a/stripe/events/_v2_core_health_custom_payment_method_adapter_degraded_resolved_event.py b/stripe/events/_v2_core_health_custom_payment_method_adapter_degraded_resolved_event.py new file mode 100644 index 000000000..7fb2f56f2 --- /dev/null +++ b/stripe/events/_v2_core_health_custom_payment_method_adapter_degraded_resolved_event.py @@ -0,0 +1,146 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe.v2.core._event import Event, EventNotification +from typing import Any, Dict, Optional, Union, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + + +class V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v2.core.health.custom_payment_method_adapter_degraded.resolved" + ) + type: Literal[ + "v2.core.health.custom_payment_method_adapter_degraded.resolved" + ] + + @override + def fetch_event( + self, + ) -> "V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEvent": + return cast( + "V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEvent", + super().fetch_event(), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEvent": + return cast( + "V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEvent", + await super().fetch_event_async(), + ) + + +class V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEvent(Event): + LOOKUP_TYPE = ( + "v2.core.health.custom_payment_method_adapter_degraded.resolved" + ) + type: Literal[ + "v2.core.health.custom_payment_method_adapter_degraded.resolved" + ] + + class V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEventData( + StripeObject, + ): + class Impact(StripeObject): + class CustomPaymentMethodTypeDetails(StripeObject): + auto_disabled_at: Optional[str] + """ + The time when the custom payment method was automatically disabled. Null when it is enabled. + """ + display_name: str + """ + The display name of the custom payment method type. + """ + reverse_api_url: str + """ + The URL of the user's self-hosted adapter endpoint. + """ + type: str + """ + The identifier of the custom payment method type (e.g., "cpmt_..."). + """ + + custom_payment_method_disabled_from_checkout: bool + """ + Whether the custom payment method was disabled in Checkout as a result of the degradation. True while the alert is open and false when it is resolved. + """ + custom_payment_method_type_details: CustomPaymentMethodTypeDetails + """ + The custom payment method type whose adapter is unhealthy. + """ + degraded_health_reason: str + """ + The reason the adapter's health is degraded. + """ + _inner_class_types = { + "custom_payment_method_type_details": CustomPaymentMethodTypeDetails, + } + + alert_id: str + """ + The alert ID. + """ + grouping_key: str + """ + The grouping key for the alert. + """ + impact: Impact + """ + The user impact. + """ + resolved_at: str + """ + The time when the user experience has returned to expected levels. + """ + severity: Union[Literal["critical", "non_critical"], str] + """ + The severity of the alert. + """ + started_at: str + """ + The time when impact on the user experience was first detected. + """ + summary: str + """ + A short description of the alert. + """ + _inner_class_types = {"impact": Impact} + + data: V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEventData + """ + Data for the v2.core.health.custom_payment_method_adapter_degraded.resolved event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEvent.V2CoreHealthCustomPaymentMethodAdapterDegradedResolvedEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt diff --git a/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py b/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py index 12c4163a6..4c62bcd0f 100644 --- a/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py +++ b/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, Optional, cast +from typing import Any, Dict, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -84,6 +84,10 @@ class RelatedObject(StripeObject): """ The time when the user experience has returned to expected levels. """ + severity: Union[Literal["critical", "non_critical"], str] + """ + The severity of the alert. + """ summary: str """ A short description of the alert. diff --git a/stripe/events/_v2_payments_off_session_payment_attempt_failed_event.py b/stripe/events/_v2_payments_off_session_payment_attempt_failed_event.py index da7ba44d6..d92faef66 100644 --- a/stripe/events/_v2_payments_off_session_payment_attempt_failed_event.py +++ b/stripe/events/_v2_payments_off_session_payment_attempt_failed_event.py @@ -84,6 +84,14 @@ class V2PaymentsOffSessionPaymentAttemptFailedEvent(Event): type: Literal["v2.payments.off_session_payment.attempt_failed"] class V2PaymentsOffSessionPaymentAttemptFailedEventData(StripeObject): + charge: Optional[str] + """ + The ID of the Charge associated with this attempt. + """ + last_attempt_error: str + """ + The payment error from the failed attempt. + """ payment_attempt_record: str """ The ID of the payment attempt record associated with this failed attempt. diff --git a/stripe/events/_v2_payments_off_session_payment_failed_event.py b/stripe/events/_v2_payments_off_session_payment_failed_event.py index a5812e752..8037e7840 100644 --- a/stripe/events/_v2_payments_off_session_payment_failed_event.py +++ b/stripe/events/_v2_payments_off_session_payment_failed_event.py @@ -82,6 +82,14 @@ class V2PaymentsOffSessionPaymentFailedEvent(Event): type: Literal["v2.payments.off_session_payment.failed"] class V2PaymentsOffSessionPaymentFailedEventData(StripeObject): + charge: Optional[str] + """ + The ID of the Charge associated with this attempt. + """ + last_attempt_error: str + """ + The payment error from the failed attempt. + """ payment_attempt_record: str """ The ID of the payment attempt record associated with this terminal failure. Equal to the `latest_payment_attempt_record` on the Off-Session Payment object. diff --git a/stripe/events/_v2_payments_off_session_payment_succeeded_event.py b/stripe/events/_v2_payments_off_session_payment_succeeded_event.py index 9c51ee290..a799ff860 100644 --- a/stripe/events/_v2_payments_off_session_payment_succeeded_event.py +++ b/stripe/events/_v2_payments_off_session_payment_succeeded_event.py @@ -1,12 +1,15 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe._api_mode import ApiMode from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast +from typing import Any, Dict, Optional, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor from stripe._stripe_client import StripeClient from stripe.v2.payments._off_session_payment import OffSessionPayment @@ -78,6 +81,45 @@ class V2PaymentsOffSessionPaymentSucceededEvent(Event): LOOKUP_TYPE = "v2.payments.off_session_payment.succeeded" type: Literal["v2.payments.off_session_payment.succeeded"] + class V2PaymentsOffSessionPaymentSucceededEventData(StripeObject): + charge: Optional[str] + """ + The ID of the Charge associated with this attempt. + """ + payment_attempt_record: str + """ + The ID of the payment attempt record associated with this successful attempt. + """ + + data: V2PaymentsOffSessionPaymentSucceededEventData + """ + Data for the v2.payments.off_session_payment.succeeded event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2PaymentsOffSessionPaymentSucceededEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2PaymentsOffSessionPaymentSucceededEvent.V2PaymentsOffSessionPaymentSucceededEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + class RelatedObject(StripeObject): id: str """ diff --git a/stripe/events/_v2_signals_payment_retry_evaluation_canceled_event.py b/stripe/events/_v2_signals_payment_retry_evaluation_canceled_event.py new file mode 100644 index 000000000..d66e08ad0 --- /dev/null +++ b/stripe/events/_v2_signals_payment_retry_evaluation_canceled_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._payment_retry_evaluation import ( + PaymentRetryEvaluation, + ) + + +class V2SignalsPaymentRetryEvaluationCanceledEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.signals.payment_retry_evaluation.canceled" + type: Literal["v2.signals.payment_retry_evaluation.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) -> "V2SignalsPaymentRetryEvaluationCanceledEvent": + return cast( + "V2SignalsPaymentRetryEvaluationCanceledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentRetryEvaluation": + 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( + "PaymentRetryEvaluation", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2SignalsPaymentRetryEvaluationCanceledEvent": + return cast( + "V2SignalsPaymentRetryEvaluationCanceledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentRetryEvaluation": + 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( + "PaymentRetryEvaluation", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2SignalsPaymentRetryEvaluationCanceledEvent(Event): + LOOKUP_TYPE = "v2.signals.payment_retry_evaluation.canceled" + type: Literal["v2.signals.payment_retry_evaluation.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) -> "PaymentRetryEvaluation": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentRetryEvaluation", + 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_payment_retry_evaluation_completed_event.py b/stripe/events/_v2_signals_payment_retry_evaluation_completed_event.py new file mode 100644 index 000000000..8aa337a58 --- /dev/null +++ b/stripe/events/_v2_signals_payment_retry_evaluation_completed_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._payment_retry_evaluation import ( + PaymentRetryEvaluation, + ) + + +class V2SignalsPaymentRetryEvaluationCompletedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.signals.payment_retry_evaluation.completed" + type: Literal["v2.signals.payment_retry_evaluation.completed"] + 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) -> "V2SignalsPaymentRetryEvaluationCompletedEvent": + return cast( + "V2SignalsPaymentRetryEvaluationCompletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentRetryEvaluation": + 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( + "PaymentRetryEvaluation", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2SignalsPaymentRetryEvaluationCompletedEvent": + return cast( + "V2SignalsPaymentRetryEvaluationCompletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentRetryEvaluation": + 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( + "PaymentRetryEvaluation", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2SignalsPaymentRetryEvaluationCompletedEvent(Event): + LOOKUP_TYPE = "v2.signals.payment_retry_evaluation.completed" + type: Literal["v2.signals.payment_retry_evaluation.completed"] + + 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) -> "PaymentRetryEvaluation": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentRetryEvaluation", + 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_billing_cadence_canceled_event.py b/stripe/events/_v2_signals_payment_retry_evaluation_created_event.py similarity index 70% rename from stripe/events/_v2_billing_cadence_canceled_event.py rename to stripe/events/_v2_signals_payment_retry_evaluation_created_event.py index ac0e7b52e..6ceb8a9df 100644 --- a/stripe/events/_v2_billing_cadence_canceled_event.py +++ b/stripe/events/_v2_signals_payment_retry_evaluation_created_event.py @@ -8,12 +8,16 @@ if TYPE_CHECKING: from stripe._stripe_client import StripeClient - from stripe.v2.billing._cadence import Cadence + from stripe.v2.signals._payment_retry_evaluation import ( + PaymentRetryEvaluation, + ) -class V2BillingCadenceCanceledEventNotification(EventNotification): - LOOKUP_TYPE = "v2.billing.cadence.canceled" - type: Literal["v2.billing.cadence.canceled"] +class V2SignalsPaymentRetryEvaluationCreatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.signals.payment_retry_evaluation.created" + type: Literal["v2.signals.payment_retry_evaluation.created"] related_object: RelatedObject def __init__( @@ -26,13 +30,13 @@ def __init__( self.related_object = RelatedObject(parsed_body["related_object"]) @override - def fetch_event(self) -> "V2BillingCadenceCanceledEvent": + def fetch_event(self) -> "V2SignalsPaymentRetryEvaluationCreatedEvent": return cast( - "V2BillingCadenceCanceledEvent", + "V2SignalsPaymentRetryEvaluationCreatedEvent", super().fetch_event(), ) - def fetch_related_object(self) -> "Cadence": + def fetch_related_object(self) -> "PaymentRetryEvaluation": response = self._client.raw_request( "get", self.related_object.url, @@ -41,7 +45,7 @@ def fetch_related_object(self) -> "Cadence": usage=["fetch_related_object"], ) return cast( - "Cadence", + "PaymentRetryEvaluation", self._client.deserialize( response, api_mode=get_api_mode(self.related_object.url), @@ -49,13 +53,15 @@ def fetch_related_object(self) -> "Cadence": ) @override - async def fetch_event_async(self) -> "V2BillingCadenceCanceledEvent": + async def fetch_event_async( + self, + ) -> "V2SignalsPaymentRetryEvaluationCreatedEvent": return cast( - "V2BillingCadenceCanceledEvent", + "V2SignalsPaymentRetryEvaluationCreatedEvent", await super().fetch_event_async(), ) - async def fetch_related_object_async(self) -> "Cadence": + async def fetch_related_object_async(self) -> "PaymentRetryEvaluation": response = await self._client.raw_request_async( "get", self.related_object.url, @@ -64,7 +70,7 @@ async def fetch_related_object_async(self) -> "Cadence": usage=["fetch_related_object"], ) return cast( - "Cadence", + "PaymentRetryEvaluation", self._client.deserialize( response, api_mode=get_api_mode(self.related_object.url), @@ -72,9 +78,9 @@ async def fetch_related_object_async(self) -> "Cadence": ) -class V2BillingCadenceCanceledEvent(Event): - LOOKUP_TYPE = "v2.billing.cadence.canceled" - type: Literal["v2.billing.cadence.canceled"] +class V2SignalsPaymentRetryEvaluationCreatedEvent(Event): + LOOKUP_TYPE = "v2.signals.payment_retry_evaluation.created" + type: Literal["v2.signals.payment_retry_evaluation.created"] class RelatedObject(StripeObject): id: str @@ -95,12 +101,12 @@ class RelatedObject(StripeObject): Object containing the reference to API resource relevant to the event """ - def fetch_related_object(self) -> "Cadence": + def fetch_related_object(self) -> "PaymentRetryEvaluation": """ Retrieves the related object from the API. Makes an API request on every call. """ return cast( - "Cadence", + "PaymentRetryEvaluation", self._requestor.request( "get", self.related_object.url, diff --git a/stripe/events/_v2_signals_payment_retry_evaluation_expired_event.py b/stripe/events/_v2_signals_payment_retry_evaluation_expired_event.py new file mode 100644 index 000000000..241322af5 --- /dev/null +++ b/stripe/events/_v2_signals_payment_retry_evaluation_expired_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._payment_retry_evaluation import ( + PaymentRetryEvaluation, + ) + + +class V2SignalsPaymentRetryEvaluationExpiredEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.signals.payment_retry_evaluation.expired" + type: Literal["v2.signals.payment_retry_evaluation.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) -> "V2SignalsPaymentRetryEvaluationExpiredEvent": + return cast( + "V2SignalsPaymentRetryEvaluationExpiredEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentRetryEvaluation": + 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( + "PaymentRetryEvaluation", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2SignalsPaymentRetryEvaluationExpiredEvent": + return cast( + "V2SignalsPaymentRetryEvaluationExpiredEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentRetryEvaluation": + 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( + "PaymentRetryEvaluation", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2SignalsPaymentRetryEvaluationExpiredEvent(Event): + LOOKUP_TYPE = "v2.signals.payment_retry_evaluation.expired" + type: Literal["v2.signals.payment_retry_evaluation.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) -> "PaymentRetryEvaluation": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentRetryEvaluation", + 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_payment_retry_evaluation_updated_event.py b/stripe/events/_v2_signals_payment_retry_evaluation_updated_event.py new file mode 100644 index 000000000..d45fa402b --- /dev/null +++ b/stripe/events/_v2_signals_payment_retry_evaluation_updated_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._payment_retry_evaluation import ( + PaymentRetryEvaluation, + ) + + +class V2SignalsPaymentRetryEvaluationUpdatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.signals.payment_retry_evaluation.updated" + type: Literal["v2.signals.payment_retry_evaluation.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) -> "V2SignalsPaymentRetryEvaluationUpdatedEvent": + return cast( + "V2SignalsPaymentRetryEvaluationUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentRetryEvaluation": + 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( + "PaymentRetryEvaluation", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2SignalsPaymentRetryEvaluationUpdatedEvent": + return cast( + "V2SignalsPaymentRetryEvaluationUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentRetryEvaluation": + 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( + "PaymentRetryEvaluation", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2SignalsPaymentRetryEvaluationUpdatedEvent(Event): + LOOKUP_TYPE = "v2.signals.payment_retry_evaluation.updated" + type: Literal["v2.signals.payment_retry_evaluation.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) -> "PaymentRetryEvaluation": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentRetryEvaluation", + 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/issuing/_authorization.py b/stripe/issuing/_authorization.py index d63621c7a..f2c62d370 100644 --- a/stripe/issuing/_authorization.py +++ b/stripe/issuing/_authorization.py @@ -1716,6 +1716,10 @@ class Visa(StripeObject): """ Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa. """ + token_service_provider_id: Optional[str] + """ + The ID of the token service provider, specific to Visa. + """ class WalletProvider(StripeObject): account_trust_score: Optional[int] diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index 90f5c1994..70fed83f7 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -1360,7 +1360,7 @@ class GooglePay(StripeObject): """ latest_fraud_warning: Optional[LatestFraudWarning] """ - Stripe's assessment of whether this card's details have been compromised. If this property isn't null, cancel and reissue the card to prevent fraudulent activity risk. + Stripe's assessment of whether this card's details have been compromised. If this property isn't null, cancel and reissue the card to reduce the risk of fraudulent activity. Stripe may remove a fraud warning if the cardholder confirms that the activity on the card is legitimate. """ lifecycle_controls: Optional[LifecycleControls] """ diff --git a/stripe/issuing/_token.py b/stripe/issuing/_token.py index 41d933488..06521301e 100644 --- a/stripe/issuing/_token.py +++ b/stripe/issuing/_token.py @@ -290,6 +290,10 @@ class Visa(StripeObject): """ Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa. """ + token_service_provider_id: Optional[str] + """ + The ID of the token service provider, specific to Visa. + """ class WalletProvider(StripeObject): class CardholderAddress(StripeObject): diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index 6cff6e423..06102b7a9 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -1141,6 +1141,8 @@ CouponCreateParams as CouponCreateParams, CouponCreateParamsAppliesTo as CouponCreateParamsAppliesTo, CouponCreateParamsCurrencyOptions as CouponCreateParamsCurrencyOptions, + CouponCreateParamsCustom as CouponCreateParamsCustom, + CouponCreateParamsCustomExtension as CouponCreateParamsCustomExtension, CouponCreateParamsScript as CouponCreateParamsScript, CouponCreateParamsServicePeriod as CouponCreateParamsServicePeriod, CouponCreateParamsServicePeriodIterations as CouponCreateParamsServicePeriodIterations, @@ -1975,15 +1977,42 @@ from stripe.params._invoice_rendering_template_archive_params import ( InvoiceRenderingTemplateArchiveParams as InvoiceRenderingTemplateArchiveParams, ) + from stripe.params._invoice_rendering_template_create_params import ( + InvoiceRenderingTemplateCreateParams as InvoiceRenderingTemplateCreateParams, + InvoiceRenderingTemplateCreateParamsLineItemPolicy as InvoiceRenderingTemplateCreateParamsLineItemPolicy, + InvoiceRenderingTemplateCreateParamsRenderingSettings as InvoiceRenderingTemplateCreateParamsRenderingSettings, + InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdf as InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdf, + InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdfBlock as InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdfBlock, + InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel as InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel, + InvoiceRenderingTemplateCreateParamsSummaryItemPolicy as InvoiceRenderingTemplateCreateParamsSummaryItemPolicy, + ) from stripe.params._invoice_rendering_template_list_params import ( InvoiceRenderingTemplateListParams as InvoiceRenderingTemplateListParams, ) + from stripe.params._invoice_rendering_template_modify_params import ( + InvoiceRenderingTemplateModifyParams as InvoiceRenderingTemplateModifyParams, + InvoiceRenderingTemplateModifyParamsLineItemPolicy as InvoiceRenderingTemplateModifyParamsLineItemPolicy, + InvoiceRenderingTemplateModifyParamsRenderingSettings as InvoiceRenderingTemplateModifyParamsRenderingSettings, + InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdf as InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdf, + InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdfBlock as InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdfBlock, + InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel as InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel, + InvoiceRenderingTemplateModifyParamsSummaryItemPolicy as InvoiceRenderingTemplateModifyParamsSummaryItemPolicy, + ) from stripe.params._invoice_rendering_template_retrieve_params import ( InvoiceRenderingTemplateRetrieveParams as InvoiceRenderingTemplateRetrieveParams, ) from stripe.params._invoice_rendering_template_unarchive_params import ( InvoiceRenderingTemplateUnarchiveParams as InvoiceRenderingTemplateUnarchiveParams, ) + from stripe.params._invoice_rendering_template_update_params import ( + InvoiceRenderingTemplateUpdateParams as InvoiceRenderingTemplateUpdateParams, + InvoiceRenderingTemplateUpdateParamsLineItemPolicy as InvoiceRenderingTemplateUpdateParamsLineItemPolicy, + InvoiceRenderingTemplateUpdateParamsRenderingSettings as InvoiceRenderingTemplateUpdateParamsRenderingSettings, + InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdf as InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdf, + InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdfBlock as InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdfBlock, + InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel as InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel, + InvoiceRenderingTemplateUpdateParamsSummaryItemPolicy as InvoiceRenderingTemplateUpdateParamsSummaryItemPolicy, + ) from stripe.params._invoice_retrieve_params import ( InvoiceRetrieveParams as InvoiceRetrieveParams, ) @@ -2386,6 +2415,7 @@ PaymentAttemptRecordReportFailedParamsPaymentMethodDetails as PaymentAttemptRecordReportFailedParamsPaymentMethodDetails, PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCard as PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCard, PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardChecks as PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardChecks, + PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardThreeDSecure as PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardThreeDSecure, PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsUsBankAccount as PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsUsBankAccount, PaymentAttemptRecordReportFailedParamsProcessorDetails as PaymentAttemptRecordReportFailedParamsProcessorDetails, PaymentAttemptRecordReportFailedParamsProcessorDetailsCustom as PaymentAttemptRecordReportFailedParamsProcessorDetailsCustom, @@ -4227,6 +4257,8 @@ PaymentMethodConfigurationCreateParams as PaymentMethodConfigurationCreateParams, PaymentMethodConfigurationCreateParamsAcssDebit as PaymentMethodConfigurationCreateParamsAcssDebit, PaymentMethodConfigurationCreateParamsAcssDebitDisplayPreference as PaymentMethodConfigurationCreateParamsAcssDebitDisplayPreference, + PaymentMethodConfigurationCreateParamsAeonPay as PaymentMethodConfigurationCreateParamsAeonPay, + PaymentMethodConfigurationCreateParamsAeonPayDisplayPreference as PaymentMethodConfigurationCreateParamsAeonPayDisplayPreference, PaymentMethodConfigurationCreateParamsAffirm as PaymentMethodConfigurationCreateParamsAffirm, PaymentMethodConfigurationCreateParamsAffirmDisplayPreference as PaymentMethodConfigurationCreateParamsAffirmDisplayPreference, PaymentMethodConfigurationCreateParamsAfterpayClearpay as PaymentMethodConfigurationCreateParamsAfterpayClearpay, @@ -4243,6 +4275,8 @@ PaymentMethodConfigurationCreateParamsApplePayLaterDisplayPreference as PaymentMethodConfigurationCreateParamsApplePayLaterDisplayPreference, PaymentMethodConfigurationCreateParamsAuBecsDebit as PaymentMethodConfigurationCreateParamsAuBecsDebit, PaymentMethodConfigurationCreateParamsAuBecsDebitDisplayPreference as PaymentMethodConfigurationCreateParamsAuBecsDebitDisplayPreference, + PaymentMethodConfigurationCreateParamsAuPay as PaymentMethodConfigurationCreateParamsAuPay, + PaymentMethodConfigurationCreateParamsAuPayDisplayPreference as PaymentMethodConfigurationCreateParamsAuPayDisplayPreference, PaymentMethodConfigurationCreateParamsBacsDebit as PaymentMethodConfigurationCreateParamsBacsDebit, PaymentMethodConfigurationCreateParamsBacsDebitDisplayPreference as PaymentMethodConfigurationCreateParamsBacsDebitDisplayPreference, PaymentMethodConfigurationCreateParamsBancontact as PaymentMethodConfigurationCreateParamsBancontact, @@ -4265,6 +4299,8 @@ PaymentMethodConfigurationCreateParamsCryptoDisplayPreference as PaymentMethodConfigurationCreateParamsCryptoDisplayPreference, PaymentMethodConfigurationCreateParamsCustomerBalance as PaymentMethodConfigurationCreateParamsCustomerBalance, PaymentMethodConfigurationCreateParamsCustomerBalanceDisplayPreference as PaymentMethodConfigurationCreateParamsCustomerBalanceDisplayPreference, + PaymentMethodConfigurationCreateParamsDbarai as PaymentMethodConfigurationCreateParamsDbarai, + PaymentMethodConfigurationCreateParamsDbaraiDisplayPreference as PaymentMethodConfigurationCreateParamsDbaraiDisplayPreference, PaymentMethodConfigurationCreateParamsEps as PaymentMethodConfigurationCreateParamsEps, PaymentMethodConfigurationCreateParamsEpsDisplayPreference as PaymentMethodConfigurationCreateParamsEpsDisplayPreference, PaymentMethodConfigurationCreateParamsFpx as PaymentMethodConfigurationCreateParamsFpx, @@ -4297,6 +4333,8 @@ PaymentMethodConfigurationCreateParamsLinkDisplayPreference as PaymentMethodConfigurationCreateParamsLinkDisplayPreference, PaymentMethodConfigurationCreateParamsMbWay as PaymentMethodConfigurationCreateParamsMbWay, PaymentMethodConfigurationCreateParamsMbWayDisplayPreference as PaymentMethodConfigurationCreateParamsMbWayDisplayPreference, + PaymentMethodConfigurationCreateParamsMerpay as PaymentMethodConfigurationCreateParamsMerpay, + PaymentMethodConfigurationCreateParamsMerpayDisplayPreference as PaymentMethodConfigurationCreateParamsMerpayDisplayPreference, PaymentMethodConfigurationCreateParamsMobilepay as PaymentMethodConfigurationCreateParamsMobilepay, PaymentMethodConfigurationCreateParamsMobilepayDisplayPreference as PaymentMethodConfigurationCreateParamsMobilepayDisplayPreference, PaymentMethodConfigurationCreateParamsMultibanco as PaymentMethodConfigurationCreateParamsMultibanco, @@ -4371,6 +4409,8 @@ PaymentMethodConfigurationModifyParams as PaymentMethodConfigurationModifyParams, PaymentMethodConfigurationModifyParamsAcssDebit as PaymentMethodConfigurationModifyParamsAcssDebit, PaymentMethodConfigurationModifyParamsAcssDebitDisplayPreference as PaymentMethodConfigurationModifyParamsAcssDebitDisplayPreference, + PaymentMethodConfigurationModifyParamsAeonPay as PaymentMethodConfigurationModifyParamsAeonPay, + PaymentMethodConfigurationModifyParamsAeonPayDisplayPreference as PaymentMethodConfigurationModifyParamsAeonPayDisplayPreference, PaymentMethodConfigurationModifyParamsAffirm as PaymentMethodConfigurationModifyParamsAffirm, PaymentMethodConfigurationModifyParamsAffirmDisplayPreference as PaymentMethodConfigurationModifyParamsAffirmDisplayPreference, PaymentMethodConfigurationModifyParamsAfterpayClearpay as PaymentMethodConfigurationModifyParamsAfterpayClearpay, @@ -4387,6 +4427,8 @@ PaymentMethodConfigurationModifyParamsApplePayLaterDisplayPreference as PaymentMethodConfigurationModifyParamsApplePayLaterDisplayPreference, PaymentMethodConfigurationModifyParamsAuBecsDebit as PaymentMethodConfigurationModifyParamsAuBecsDebit, PaymentMethodConfigurationModifyParamsAuBecsDebitDisplayPreference as PaymentMethodConfigurationModifyParamsAuBecsDebitDisplayPreference, + PaymentMethodConfigurationModifyParamsAuPay as PaymentMethodConfigurationModifyParamsAuPay, + PaymentMethodConfigurationModifyParamsAuPayDisplayPreference as PaymentMethodConfigurationModifyParamsAuPayDisplayPreference, PaymentMethodConfigurationModifyParamsBacsDebit as PaymentMethodConfigurationModifyParamsBacsDebit, PaymentMethodConfigurationModifyParamsBacsDebitDisplayPreference as PaymentMethodConfigurationModifyParamsBacsDebitDisplayPreference, PaymentMethodConfigurationModifyParamsBancontact as PaymentMethodConfigurationModifyParamsBancontact, @@ -4409,6 +4451,8 @@ PaymentMethodConfigurationModifyParamsCryptoDisplayPreference as PaymentMethodConfigurationModifyParamsCryptoDisplayPreference, PaymentMethodConfigurationModifyParamsCustomerBalance as PaymentMethodConfigurationModifyParamsCustomerBalance, PaymentMethodConfigurationModifyParamsCustomerBalanceDisplayPreference as PaymentMethodConfigurationModifyParamsCustomerBalanceDisplayPreference, + PaymentMethodConfigurationModifyParamsDbarai as PaymentMethodConfigurationModifyParamsDbarai, + PaymentMethodConfigurationModifyParamsDbaraiDisplayPreference as PaymentMethodConfigurationModifyParamsDbaraiDisplayPreference, PaymentMethodConfigurationModifyParamsEps as PaymentMethodConfigurationModifyParamsEps, PaymentMethodConfigurationModifyParamsEpsDisplayPreference as PaymentMethodConfigurationModifyParamsEpsDisplayPreference, PaymentMethodConfigurationModifyParamsFpx as PaymentMethodConfigurationModifyParamsFpx, @@ -4441,6 +4485,8 @@ PaymentMethodConfigurationModifyParamsLinkDisplayPreference as PaymentMethodConfigurationModifyParamsLinkDisplayPreference, PaymentMethodConfigurationModifyParamsMbWay as PaymentMethodConfigurationModifyParamsMbWay, PaymentMethodConfigurationModifyParamsMbWayDisplayPreference as PaymentMethodConfigurationModifyParamsMbWayDisplayPreference, + PaymentMethodConfigurationModifyParamsMerpay as PaymentMethodConfigurationModifyParamsMerpay, + PaymentMethodConfigurationModifyParamsMerpayDisplayPreference as PaymentMethodConfigurationModifyParamsMerpayDisplayPreference, PaymentMethodConfigurationModifyParamsMobilepay as PaymentMethodConfigurationModifyParamsMobilepay, PaymentMethodConfigurationModifyParamsMobilepayDisplayPreference as PaymentMethodConfigurationModifyParamsMobilepayDisplayPreference, PaymentMethodConfigurationModifyParamsMultibanco as PaymentMethodConfigurationModifyParamsMultibanco, @@ -4515,6 +4561,8 @@ PaymentMethodConfigurationUpdateParams as PaymentMethodConfigurationUpdateParams, PaymentMethodConfigurationUpdateParamsAcssDebit as PaymentMethodConfigurationUpdateParamsAcssDebit, PaymentMethodConfigurationUpdateParamsAcssDebitDisplayPreference as PaymentMethodConfigurationUpdateParamsAcssDebitDisplayPreference, + PaymentMethodConfigurationUpdateParamsAeonPay as PaymentMethodConfigurationUpdateParamsAeonPay, + PaymentMethodConfigurationUpdateParamsAeonPayDisplayPreference as PaymentMethodConfigurationUpdateParamsAeonPayDisplayPreference, PaymentMethodConfigurationUpdateParamsAffirm as PaymentMethodConfigurationUpdateParamsAffirm, PaymentMethodConfigurationUpdateParamsAffirmDisplayPreference as PaymentMethodConfigurationUpdateParamsAffirmDisplayPreference, PaymentMethodConfigurationUpdateParamsAfterpayClearpay as PaymentMethodConfigurationUpdateParamsAfterpayClearpay, @@ -4531,6 +4579,8 @@ PaymentMethodConfigurationUpdateParamsApplePayLaterDisplayPreference as PaymentMethodConfigurationUpdateParamsApplePayLaterDisplayPreference, PaymentMethodConfigurationUpdateParamsAuBecsDebit as PaymentMethodConfigurationUpdateParamsAuBecsDebit, PaymentMethodConfigurationUpdateParamsAuBecsDebitDisplayPreference as PaymentMethodConfigurationUpdateParamsAuBecsDebitDisplayPreference, + PaymentMethodConfigurationUpdateParamsAuPay as PaymentMethodConfigurationUpdateParamsAuPay, + PaymentMethodConfigurationUpdateParamsAuPayDisplayPreference as PaymentMethodConfigurationUpdateParamsAuPayDisplayPreference, PaymentMethodConfigurationUpdateParamsBacsDebit as PaymentMethodConfigurationUpdateParamsBacsDebit, PaymentMethodConfigurationUpdateParamsBacsDebitDisplayPreference as PaymentMethodConfigurationUpdateParamsBacsDebitDisplayPreference, PaymentMethodConfigurationUpdateParamsBancontact as PaymentMethodConfigurationUpdateParamsBancontact, @@ -4553,6 +4603,8 @@ PaymentMethodConfigurationUpdateParamsCryptoDisplayPreference as PaymentMethodConfigurationUpdateParamsCryptoDisplayPreference, PaymentMethodConfigurationUpdateParamsCustomerBalance as PaymentMethodConfigurationUpdateParamsCustomerBalance, PaymentMethodConfigurationUpdateParamsCustomerBalanceDisplayPreference as PaymentMethodConfigurationUpdateParamsCustomerBalanceDisplayPreference, + PaymentMethodConfigurationUpdateParamsDbarai as PaymentMethodConfigurationUpdateParamsDbarai, + PaymentMethodConfigurationUpdateParamsDbaraiDisplayPreference as PaymentMethodConfigurationUpdateParamsDbaraiDisplayPreference, PaymentMethodConfigurationUpdateParamsEps as PaymentMethodConfigurationUpdateParamsEps, PaymentMethodConfigurationUpdateParamsEpsDisplayPreference as PaymentMethodConfigurationUpdateParamsEpsDisplayPreference, PaymentMethodConfigurationUpdateParamsFpx as PaymentMethodConfigurationUpdateParamsFpx, @@ -4585,6 +4637,8 @@ PaymentMethodConfigurationUpdateParamsLinkDisplayPreference as PaymentMethodConfigurationUpdateParamsLinkDisplayPreference, PaymentMethodConfigurationUpdateParamsMbWay as PaymentMethodConfigurationUpdateParamsMbWay, PaymentMethodConfigurationUpdateParamsMbWayDisplayPreference as PaymentMethodConfigurationUpdateParamsMbWayDisplayPreference, + PaymentMethodConfigurationUpdateParamsMerpay as PaymentMethodConfigurationUpdateParamsMerpay, + PaymentMethodConfigurationUpdateParamsMerpayDisplayPreference as PaymentMethodConfigurationUpdateParamsMerpayDisplayPreference, PaymentMethodConfigurationUpdateParamsMobilepay as PaymentMethodConfigurationUpdateParamsMobilepay, PaymentMethodConfigurationUpdateParamsMobilepayDisplayPreference as PaymentMethodConfigurationUpdateParamsMobilepayDisplayPreference, PaymentMethodConfigurationUpdateParamsMultibanco as PaymentMethodConfigurationUpdateParamsMultibanco, @@ -4839,6 +4893,7 @@ PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetails as PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetails, PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCard as PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCard, PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardChecks as PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardChecks, + PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardThreeDSecure as PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardThreeDSecure, PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsUsBankAccount as PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsUsBankAccount, PaymentRecordReportPaymentAttemptFailedParamsProcessorDetails as PaymentRecordReportPaymentAttemptFailedParamsProcessorDetails, PaymentRecordReportPaymentAttemptFailedParamsProcessorDetailsCustom as PaymentRecordReportPaymentAttemptFailedParamsProcessorDetailsCustom, @@ -6380,6 +6435,7 @@ SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettings as SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettings, SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsCustomField as SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsCustomField, SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer as SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer, + SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsRendering as SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsRendering, SubscriptionScheduleCreateParamsDefaultSettingsTransferData as SubscriptionScheduleCreateParamsDefaultSettingsTransferData, SubscriptionScheduleCreateParamsPauseSchedule as SubscriptionScheduleCreateParamsPauseSchedule, SubscriptionScheduleCreateParamsPauseSchedulePause as SubscriptionScheduleCreateParamsPauseSchedulePause, @@ -6451,6 +6507,7 @@ SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettings as SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettings, SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsCustomField as SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsCustomField, SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsIssuer as SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsIssuer, + SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsRendering as SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsRendering, SubscriptionScheduleModifyParamsDefaultSettingsTransferData as SubscriptionScheduleModifyParamsDefaultSettingsTransferData, SubscriptionScheduleModifyParamsPauseSchedule as SubscriptionScheduleModifyParamsPauseSchedule, SubscriptionScheduleModifyParamsPauseSchedulePause as SubscriptionScheduleModifyParamsPauseSchedulePause, @@ -6521,6 +6578,7 @@ SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettings as SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettings, SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsCustomField as SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsCustomField, SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsIssuer as SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsIssuer, + SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsRendering as SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsRendering, SubscriptionScheduleUpdateParamsDefaultSettingsTransferData as SubscriptionScheduleUpdateParamsDefaultSettingsTransferData, SubscriptionScheduleUpdateParamsPauseSchedule as SubscriptionScheduleUpdateParamsPauseSchedule, SubscriptionScheduleUpdateParamsPauseSchedulePause as SubscriptionScheduleUpdateParamsPauseSchedulePause, @@ -10572,6 +10630,11 @@ "stripe.params._coupon_create_params", False, ), + "CouponCreateParamsCustom": ("stripe.params._coupon_create_params", False), + "CouponCreateParamsCustomExtension": ( + "stripe.params._coupon_create_params", + False, + ), "CouponCreateParamsScript": ("stripe.params._coupon_create_params", False), "CouponCreateParamsServicePeriod": ( "stripe.params._coupon_create_params", @@ -12706,10 +12769,66 @@ "stripe.params._invoice_rendering_template_archive_params", False, ), + "InvoiceRenderingTemplateCreateParams": ( + "stripe.params._invoice_rendering_template_create_params", + False, + ), + "InvoiceRenderingTemplateCreateParamsLineItemPolicy": ( + "stripe.params._invoice_rendering_template_create_params", + False, + ), + "InvoiceRenderingTemplateCreateParamsRenderingSettings": ( + "stripe.params._invoice_rendering_template_create_params", + False, + ), + "InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdf": ( + "stripe.params._invoice_rendering_template_create_params", + False, + ), + "InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdfBlock": ( + "stripe.params._invoice_rendering_template_create_params", + False, + ), + "InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel": ( + "stripe.params._invoice_rendering_template_create_params", + False, + ), + "InvoiceRenderingTemplateCreateParamsSummaryItemPolicy": ( + "stripe.params._invoice_rendering_template_create_params", + False, + ), "InvoiceRenderingTemplateListParams": ( "stripe.params._invoice_rendering_template_list_params", False, ), + "InvoiceRenderingTemplateModifyParams": ( + "stripe.params._invoice_rendering_template_modify_params", + False, + ), + "InvoiceRenderingTemplateModifyParamsLineItemPolicy": ( + "stripe.params._invoice_rendering_template_modify_params", + False, + ), + "InvoiceRenderingTemplateModifyParamsRenderingSettings": ( + "stripe.params._invoice_rendering_template_modify_params", + False, + ), + "InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdf": ( + "stripe.params._invoice_rendering_template_modify_params", + False, + ), + "InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdfBlock": ( + "stripe.params._invoice_rendering_template_modify_params", + False, + ), + "InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel": ( + "stripe.params._invoice_rendering_template_modify_params", + False, + ), + "InvoiceRenderingTemplateModifyParamsSummaryItemPolicy": ( + "stripe.params._invoice_rendering_template_modify_params", + False, + ), "InvoiceRenderingTemplateRetrieveParams": ( "stripe.params._invoice_rendering_template_retrieve_params", False, @@ -12718,6 +12837,34 @@ "stripe.params._invoice_rendering_template_unarchive_params", False, ), + "InvoiceRenderingTemplateUpdateParams": ( + "stripe.params._invoice_rendering_template_update_params", + False, + ), + "InvoiceRenderingTemplateUpdateParamsLineItemPolicy": ( + "stripe.params._invoice_rendering_template_update_params", + False, + ), + "InvoiceRenderingTemplateUpdateParamsRenderingSettings": ( + "stripe.params._invoice_rendering_template_update_params", + False, + ), + "InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdf": ( + "stripe.params._invoice_rendering_template_update_params", + False, + ), + "InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdfBlock": ( + "stripe.params._invoice_rendering_template_update_params", + False, + ), + "InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel": ( + "stripe.params._invoice_rendering_template_update_params", + False, + ), + "InvoiceRenderingTemplateUpdateParamsSummaryItemPolicy": ( + "stripe.params._invoice_rendering_template_update_params", + False, + ), "InvoiceRetrieveParams": ("stripe.params._invoice_retrieve_params", False), "InvoiceSearchParams": ("stripe.params._invoice_search_params", False), "InvoiceSendInvoiceParams": ( @@ -14055,6 +14202,10 @@ "stripe.params._payment_attempt_record_report_failed_params", False, ), + "PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardThreeDSecure": ( + "stripe.params._payment_attempt_record_report_failed_params", + False, + ), "PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsUsBankAccount": ( "stripe.params._payment_attempt_record_report_failed_params", False, @@ -21075,6 +21226,14 @@ "stripe.params._payment_method_configuration_create_params", False, ), + "PaymentMethodConfigurationCreateParamsAeonPay": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), + "PaymentMethodConfigurationCreateParamsAeonPayDisplayPreference": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), "PaymentMethodConfigurationCreateParamsAffirm": ( "stripe.params._payment_method_configuration_create_params", False, @@ -21139,6 +21298,14 @@ "stripe.params._payment_method_configuration_create_params", False, ), + "PaymentMethodConfigurationCreateParamsAuPay": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), + "PaymentMethodConfigurationCreateParamsAuPayDisplayPreference": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), "PaymentMethodConfigurationCreateParamsBacsDebit": ( "stripe.params._payment_method_configuration_create_params", False, @@ -21227,6 +21394,14 @@ "stripe.params._payment_method_configuration_create_params", False, ), + "PaymentMethodConfigurationCreateParamsDbarai": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), + "PaymentMethodConfigurationCreateParamsDbaraiDisplayPreference": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), "PaymentMethodConfigurationCreateParamsEps": ( "stripe.params._payment_method_configuration_create_params", False, @@ -21355,6 +21530,14 @@ "stripe.params._payment_method_configuration_create_params", False, ), + "PaymentMethodConfigurationCreateParamsMerpay": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), + "PaymentMethodConfigurationCreateParamsMerpayDisplayPreference": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), "PaymentMethodConfigurationCreateParamsMobilepay": ( "stripe.params._payment_method_configuration_create_params", False, @@ -21635,6 +21818,14 @@ "stripe.params._payment_method_configuration_modify_params", False, ), + "PaymentMethodConfigurationModifyParamsAeonPay": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), + "PaymentMethodConfigurationModifyParamsAeonPayDisplayPreference": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), "PaymentMethodConfigurationModifyParamsAffirm": ( "stripe.params._payment_method_configuration_modify_params", False, @@ -21699,6 +21890,14 @@ "stripe.params._payment_method_configuration_modify_params", False, ), + "PaymentMethodConfigurationModifyParamsAuPay": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), + "PaymentMethodConfigurationModifyParamsAuPayDisplayPreference": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), "PaymentMethodConfigurationModifyParamsBacsDebit": ( "stripe.params._payment_method_configuration_modify_params", False, @@ -21787,6 +21986,14 @@ "stripe.params._payment_method_configuration_modify_params", False, ), + "PaymentMethodConfigurationModifyParamsDbarai": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), + "PaymentMethodConfigurationModifyParamsDbaraiDisplayPreference": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), "PaymentMethodConfigurationModifyParamsEps": ( "stripe.params._payment_method_configuration_modify_params", False, @@ -21915,6 +22122,14 @@ "stripe.params._payment_method_configuration_modify_params", False, ), + "PaymentMethodConfigurationModifyParamsMerpay": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), + "PaymentMethodConfigurationModifyParamsMerpayDisplayPreference": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), "PaymentMethodConfigurationModifyParamsMobilepay": ( "stripe.params._payment_method_configuration_modify_params", False, @@ -22195,6 +22410,14 @@ "stripe.params._payment_method_configuration_update_params", False, ), + "PaymentMethodConfigurationUpdateParamsAeonPay": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), + "PaymentMethodConfigurationUpdateParamsAeonPayDisplayPreference": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), "PaymentMethodConfigurationUpdateParamsAffirm": ( "stripe.params._payment_method_configuration_update_params", False, @@ -22259,6 +22482,14 @@ "stripe.params._payment_method_configuration_update_params", False, ), + "PaymentMethodConfigurationUpdateParamsAuPay": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), + "PaymentMethodConfigurationUpdateParamsAuPayDisplayPreference": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), "PaymentMethodConfigurationUpdateParamsBacsDebit": ( "stripe.params._payment_method_configuration_update_params", False, @@ -22347,6 +22578,14 @@ "stripe.params._payment_method_configuration_update_params", False, ), + "PaymentMethodConfigurationUpdateParamsDbarai": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), + "PaymentMethodConfigurationUpdateParamsDbaraiDisplayPreference": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), "PaymentMethodConfigurationUpdateParamsEps": ( "stripe.params._payment_method_configuration_update_params", False, @@ -22475,6 +22714,14 @@ "stripe.params._payment_method_configuration_update_params", False, ), + "PaymentMethodConfigurationUpdateParamsMerpay": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), + "PaymentMethodConfigurationUpdateParamsMerpayDisplayPreference": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), "PaymentMethodConfigurationUpdateParamsMobilepay": ( "stripe.params._payment_method_configuration_update_params", False, @@ -23323,6 +23570,10 @@ "stripe.params._payment_record_report_payment_attempt_failed_params", False, ), + "PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardThreeDSecure": ( + "stripe.params._payment_record_report_payment_attempt_failed_params", + False, + ), "PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsUsBankAccount": ( "stripe.params._payment_record_report_payment_attempt_failed_params", False, @@ -28296,6 +28547,10 @@ "stripe.params._subscription_schedule_create_params", False, ), + "SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsRendering": ( + "stripe.params._subscription_schedule_create_params", + False, + ), "SubscriptionScheduleCreateParamsDefaultSettingsTransferData": ( "stripe.params._subscription_schedule_create_params", False, @@ -28564,6 +28819,10 @@ "stripe.params._subscription_schedule_modify_params", False, ), + "SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsRendering": ( + "stripe.params._subscription_schedule_modify_params", + False, + ), "SubscriptionScheduleModifyParamsDefaultSettingsTransferData": ( "stripe.params._subscription_schedule_modify_params", False, @@ -28820,6 +29079,10 @@ "stripe.params._subscription_schedule_update_params", False, ), + "SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsRendering": ( + "stripe.params._subscription_schedule_update_params", + False, + ), "SubscriptionScheduleUpdateParamsDefaultSettingsTransferData": ( "stripe.params._subscription_schedule_update_params", False, diff --git a/stripe/params/_coupon_create_params.py b/stripe/params/_coupon_create_params.py index ef0785f51..0f6a23367 100644 --- a/stripe/params/_coupon_create_params.py +++ b/stripe/params/_coupon_create_params.py @@ -25,6 +25,10 @@ class CouponCreateParams(RequestOptions): """ Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). """ + custom: NotRequired["CouponCreateParamsCustom"] + """ + The custom coupon calculation configuration. + """ duration: NotRequired[ "Literal['forever', 'once', 'repeating', 'service_period']|str" ] @@ -73,12 +77,16 @@ class CouponCreateParams(RequestOptions): """ A hash specifying the service period for the coupon. """ + type: NotRequired[Literal["custom"]] + """ + The coupon calculation type. Must be `custom` when `custom` is provided. + """ class CouponCreateParamsAppliesTo(TypedDict): products: NotRequired[List[str]] """ - An array of Product IDs that this Coupon will apply to. + An array of up to 100 Product IDs that this Coupon will apply to. """ @@ -89,6 +97,28 @@ class CouponCreateParamsCurrencyOptions(TypedDict): """ +class CouponCreateParamsCustom(TypedDict): + configuration: NotRequired["Dict[str, Any]|UntypedStripeObject[Any]"] + """ + The configuration values of the extension. The keys and values are specific to the extension implementation. May be omitted for extensions that have no configuration schema, in which case an empty configuration is used. + """ + extension: "CouponCreateParamsCustomExtension" + """ + The extension used to calculate the coupon. + """ + + +class CouponCreateParamsCustomExtension(TypedDict): + id: str + """ + The Extension Prototype ID. + """ + version: NotRequired[str] + """ + The semantic version of the extension. + """ + + class CouponCreateParamsScript(TypedDict): configuration: "Dict[str, Any]|UntypedStripeObject[Any]" """ diff --git a/stripe/params/_fx_quote_create_params.py b/stripe/params/_fx_quote_create_params.py index 068a6b7e6..7711a72f9 100644 --- a/stripe/params/_fx_quote_create_params.py +++ b/stripe/params/_fx_quote_create_params.py @@ -40,8 +40,6 @@ class FxQuoteCreateParamsUsage(TypedDict): type: Union[Literal["payment", "transfer"], str] """ Which transaction the FX Quote will be used for - - Can be “payment” | “transfer” """ diff --git a/stripe/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index 63b5d0018..e07356cf8 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -12,9 +12,9 @@ class InvoiceCreatePreviewParams(RequestOptions): """ Settings for automatic tax lookup for this invoice preview. """ - billing_cadence: NotRequired[str] + billing_group: NotRequired[str] """ - The identifier of the billing cadence for which you'd like to retrieve the upcoming invoice. Cannot be provided when `subscription`, `schedule`, `subscription_details` or `schedule_details` are provided. + The identifier of the billing group for which you'd like to retrieve the upcoming invoice. Cannot be provided when `subscription`, `schedule`, `subscription_details` or `schedule_details` are provided. """ currency: NotRequired[str] """ diff --git a/stripe/params/_invoice_item_create_params.py b/stripe/params/_invoice_item_create_params.py index cd92a3765..dd7468a42 100644 --- a/stripe/params/_invoice_item_create_params.py +++ b/stripe/params/_invoice_item_create_params.py @@ -80,7 +80,7 @@ class InvoiceItemCreateParams(RequestOptions): """ subscription: NotRequired[str] """ - The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. + The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. You can use this parameter with either `customer` or `customer_account`. The subscription must belong to the customer you specify. """ tax_behavior: NotRequired[ "Literal['exclusive', 'inclusive', 'unspecified']|str" diff --git a/stripe/params/_invoice_list_params.py b/stripe/params/_invoice_list_params.py index 43d99151d..f9b891d02 100644 --- a/stripe/params/_invoice_list_params.py +++ b/stripe/params/_invoice_list_params.py @@ -6,9 +6,9 @@ class InvoiceListParams(RequestOptions): - billing_cadence: NotRequired[str] + billing_group: NotRequired[str] """ - Only return invoices for the cadence specified by this billing cadence ID. + Only return invoices for the billing group specified by this billing group ID. """ collection_method: NotRequired[ "Literal['charge_automatically', 'send_invoice']|str" diff --git a/stripe/params/_invoice_rendering_template_create_params.py b/stripe/params/_invoice_rendering_template_create_params.py new file mode 100644 index 000000000..1199c2e87 --- /dev/null +++ b/stripe/params/_invoice_rendering_template_create_params.py @@ -0,0 +1,122 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from stripe._stripe_object import UntypedStripeObject +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceRenderingTemplateCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + line_item_policy: NotRequired[ + "InvoiceRenderingTemplateCreateParamsLineItemPolicy" + ] + """ + Controls how individual line items are displayed on the invoice, visible to customers. + """ + 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. + """ + nickname: NotRequired[str] + """ + Nickname for the template that is hidden from customers + """ + rendering_settings: NotRequired[ + "InvoiceRenderingTemplateCreateParamsRenderingSettings" + ] + """ + Rendering settings for invoices using this template. + """ + summary_item_policies: NotRequired[ + List["InvoiceRenderingTemplateCreateParamsSummaryItemPolicy"] + ] + """ + Controls the grouping of line items into summary items which are displayed on the invoice, visible to customers. The policies are applied in order - only ungrouped line items from the previous policy are considered by the following policies. + """ + + +class InvoiceRenderingTemplateCreateParamsLineItemPolicy(TypedDict): + display: NotRequired[str] + """ + A CEL expression that takes a line item and returns a boolean indicating whether to display it on the invoice. + """ + + +class InvoiceRenderingTemplateCreateParamsRenderingSettings(TypedDict): + invoice_pdf: NotRequired[ + "InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdf" + ] + """ + Rendering settings for the invoice PDF. + """ + + +class InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdf( + TypedDict, +): + blocks: NotRequired[ + "Literal['']|List[InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdfBlock]" + ] + """ + Ordered invoice PDF blocks. A maximum of 20 blocks is allowed. + """ + + +class InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdfBlock( + TypedDict, +): + custom_plain_text_cel: NotRequired[ + "InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel" + ] + """ + Configuration for a custom CEL text block. + """ + key: NotRequired[str] + """ + A unique key within this template's blocks. Generated when omitted. + """ + type: Union[ + Literal[ + "custom_plain_text_cel", + "footer_content", + "invoice_details", + "line_items", + "parties", + "payment_remittance_instructions", + "status_and_memo", + "tax_footnotes", + "title_and_logo", + ], + str, + ] + """ + The type of content block. + """ + + +class InvoiceRenderingTemplateCreateParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel( + TypedDict, +): + cel_expression: str + """ + A CEL expression that returns text using the invoice context. + """ + + +class InvoiceRenderingTemplateCreateParamsSummaryItemPolicy(TypedDict): + display_items: NotRequired["Literal['all', 'none']|str"] + """ + Controls how each summary group is rendered on the invoice. `all` displays the summary line item, its constituent line items, and a group subtotal. `none` displays only the summary line item. Defaults to `all`. + """ + filter: NotRequired[str] + """ + A CEL expression that takes a line item and returns a boolean indicating whether to include it in this grouping policy. If omitted, includes all ungrouped line items. + """ + group_by: NotRequired[str] + """ + A CEL expression that takes a line item and returns a string. Line items with the same result are grouped into a summary item, using that result as its group title. + """ diff --git a/stripe/params/_invoice_rendering_template_modify_params.py b/stripe/params/_invoice_rendering_template_modify_params.py new file mode 100644 index 000000000..628e3847f --- /dev/null +++ b/stripe/params/_invoice_rendering_template_modify_params.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from stripe._stripe_object import UntypedStripeObject +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceRenderingTemplateModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + line_item_policy: NotRequired[ + "Literal['']|InvoiceRenderingTemplateModifyParamsLineItemPolicy" + ] + """ + Controls how individual line items are displayed on the invoice, visible to customers. + """ + 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. + """ + nickname: NotRequired[str] + """ + Nickname for the template that is hidden from customers + """ + rendering_settings: NotRequired[ + "InvoiceRenderingTemplateModifyParamsRenderingSettings" + ] + """ + Rendering settings for invoices using this template. + """ + summary_item_policies: NotRequired[ + "Literal['']|List[InvoiceRenderingTemplateModifyParamsSummaryItemPolicy]" + ] + """ + Controls the grouping of line items into summary items which are displayed on the invoice, visible to customers. The policies are applied in order - only ungrouped line items from the previous policy are considered by the following policies. + """ + + +class InvoiceRenderingTemplateModifyParamsLineItemPolicy(TypedDict): + display: NotRequired[str] + """ + A CEL expression that takes a line item and returns a boolean indicating whether to display it on the invoice. + """ + + +class InvoiceRenderingTemplateModifyParamsRenderingSettings(TypedDict): + invoice_pdf: NotRequired[ + "InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdf" + ] + """ + Rendering settings for the invoice PDF. + """ + + +class InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdf( + TypedDict, +): + blocks: NotRequired[ + "Literal['']|List[InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdfBlock]" + ] + """ + Ordered invoice PDF blocks. A maximum of 20 blocks is allowed. + """ + + +class InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdfBlock( + TypedDict, +): + custom_plain_text_cel: NotRequired[ + "InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel" + ] + """ + Configuration for a custom CEL text block. + """ + key: NotRequired[str] + """ + A unique key within this template's blocks. Generated when omitted. + """ + type: NotRequired[ + "Literal['custom_plain_text_cel', 'footer_content', 'invoice_details', 'line_items', 'parties', 'payment_remittance_instructions', 'status_and_memo', 'tax_footnotes', 'title_and_logo']|str" + ] + """ + The type of content block. Required when updating a block without a key matching an existing block in the current template version. For a matching key, omit type to retain the existing type; if supplied, it must match. + """ + + +class InvoiceRenderingTemplateModifyParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel( + TypedDict, +): + cel_expression: str + """ + A CEL expression that returns text using the invoice context. + """ + + +class InvoiceRenderingTemplateModifyParamsSummaryItemPolicy(TypedDict): + display_items: NotRequired["Literal['all', 'none']|str"] + """ + Controls how each summary group is rendered on the invoice. `all` displays the summary line item, its constituent line items, and a group subtotal. `none` displays only the summary line item. Defaults to `all`. + """ + filter: NotRequired[str] + """ + A CEL expression that takes a line item and returns a boolean indicating whether to include it in this grouping policy. If omitted, includes all ungrouped line items. + """ + group_by: NotRequired[str] + """ + A CEL expression that takes a line item and returns a string. Line items with the same result are grouped into a summary item, using that result as its group title. + """ diff --git a/stripe/params/_invoice_rendering_template_update_params.py b/stripe/params/_invoice_rendering_template_update_params.py new file mode 100644 index 000000000..7fcf8e88d --- /dev/null +++ b/stripe/params/_invoice_rendering_template_update_params.py @@ -0,0 +1,112 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import UntypedStripeObject +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceRenderingTemplateUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + line_item_policy: NotRequired[ + "Literal['']|InvoiceRenderingTemplateUpdateParamsLineItemPolicy" + ] + """ + Controls how individual line items are displayed on the invoice, visible to customers. + """ + 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. + """ + nickname: NotRequired[str] + """ + Nickname for the template that is hidden from customers + """ + rendering_settings: NotRequired[ + "InvoiceRenderingTemplateUpdateParamsRenderingSettings" + ] + """ + Rendering settings for invoices using this template. + """ + summary_item_policies: NotRequired[ + "Literal['']|List[InvoiceRenderingTemplateUpdateParamsSummaryItemPolicy]" + ] + """ + Controls the grouping of line items into summary items which are displayed on the invoice, visible to customers. The policies are applied in order - only ungrouped line items from the previous policy are considered by the following policies. + """ + + +class InvoiceRenderingTemplateUpdateParamsLineItemPolicy(TypedDict): + display: NotRequired[str] + """ + A CEL expression that takes a line item and returns a boolean indicating whether to display it on the invoice. + """ + + +class InvoiceRenderingTemplateUpdateParamsRenderingSettings(TypedDict): + invoice_pdf: NotRequired[ + "InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdf" + ] + """ + Rendering settings for the invoice PDF. + """ + + +class InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdf( + TypedDict, +): + blocks: NotRequired[ + "Literal['']|List[InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdfBlock]" + ] + """ + Ordered invoice PDF blocks. A maximum of 20 blocks is allowed. + """ + + +class InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdfBlock( + TypedDict, +): + custom_plain_text_cel: NotRequired[ + "InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel" + ] + """ + Configuration for a custom CEL text block. + """ + key: NotRequired[str] + """ + A unique key within this template's blocks. Generated when omitted. + """ + type: NotRequired[ + "Literal['custom_plain_text_cel', 'footer_content', 'invoice_details', 'line_items', 'parties', 'payment_remittance_instructions', 'status_and_memo', 'tax_footnotes', 'title_and_logo']|str" + ] + """ + The type of content block. Required when updating a block without a key matching an existing block in the current template version. For a matching key, omit type to retain the existing type; if supplied, it must match. + """ + + +class InvoiceRenderingTemplateUpdateParamsRenderingSettingsInvoicePdfBlockCustomPlainTextCel( + TypedDict, +): + cel_expression: str + """ + A CEL expression that returns text using the invoice context. + """ + + +class InvoiceRenderingTemplateUpdateParamsSummaryItemPolicy(TypedDict): + display_items: NotRequired["Literal['all', 'none']|str"] + """ + Controls how each summary group is rendered on the invoice. `all` displays the summary line item, its constituent line items, and a group subtotal. `none` displays only the summary line item. Defaults to `all`. + """ + filter: NotRequired[str] + """ + A CEL expression that takes a line item and returns a boolean indicating whether to include it in this grouping policy. If omitted, includes all ungrouped line items. + """ + group_by: NotRequired[str] + """ + A CEL expression that takes a line item and returns a string. Line items with the same result are grouped into a summary item, using that result as its group title. + """ diff --git a/stripe/params/_payment_attempt_record_report_failed_params.py b/stripe/params/_payment_attempt_record_report_failed_params.py index 6a298c7f0..8e39992cb 100644 --- a/stripe/params/_payment_attempt_record_report_failed_params.py +++ b/stripe/params/_payment_attempt_record_report_failed_params.py @@ -77,6 +77,12 @@ class PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCard( """ Decline code from the card network for the failed payment. """ + three_d_secure: NotRequired[ + "PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardThreeDSecure" + ] + """ + Populated if this transaction used 3D Secure authentication. + """ class PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardChecks( @@ -102,6 +108,51 @@ class PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardChecks( """ +class PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardThreeDSecure( + TypedDict, +): + authentication_flow: NotRequired[ + "Literal['challenge', 'frictionless']|str" + ] + """ + For authenticated transactions: Indicates how the issuing bank authenticated the customer. + """ + electronic_commerce_indicator: NotRequired[ + "Literal['01', '02', '05', '06', '07']|str" + ] + """ + The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of authentication was performed. + """ + exemption_indicator: NotRequired["Literal['low_risk', 'none']|str"] + """ + The exemption requested via 3DS and accepted by the issuer at authentication time. + """ + result: Union[ + Literal[ + "attempt_acknowledged", + "authenticated", + "exempted", + "failed", + "not_supported", + "processing_error", + ], + str, + ] + """ + Indicates the outcome of 3D Secure authentication. + """ + result_reason: NotRequired[ + "Literal['abandoned', 'canceled', 'card_not_enrolled', 'network_not_supported', 'protocol_error', 'rejected']|str" + ] + """ + Additional information about why 3D Secure succeeded or failed, based on the `result`. + """ + version: Union[Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"], str] + """ + The version of 3D Secure that was used. + """ + + class PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsUsBankAccount( TypedDict, ): diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index 77ca14261..409481dd2 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -5549,22 +5549,22 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentAadeData( TypedDict, ): - mark_data: NotRequired[str] - """ - The canonical string that was signed by the e-invoicing provider to produce `signed_mark`, formatted per Appendix A of A.1155/2023. Required when `mode` is `standard`. - """ mode: Literal["autonomous", "standard"] """ - The e-invoicing mode under which the mark was generated. + The e-invoicing mode under which the provider signature was generated. """ provider_id: NotRequired[int] """ - The AADE-assigned approval number of the e-invoicing provider that generated the mark. Required when `mode` is `standard`. + The AADE-assigned approval number of the e-invoicing provider that generated the provider signature. Required when `mode` is `standard`. """ - signed_mark: NotRequired[str] + provider_signature: NotRequired[str] """ The cryptographic signature returned by the e-invoicing provider for this transaction, hex-encoded. Required when `mode` is `standard`. """ + provider_signature_data: NotRequired[str] + """ + The canonical string that was signed by the e-invoicing provider to produce `provider_signature`, formatted per Appendix A of A.1155/2023. Required when `mode` is `standard`. + """ unbound_pos: NotRequired[ Literal["interconnection_loss", "lock", "replacement_cash_system"] ] @@ -8231,6 +8231,10 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsVipps(TypedDict): """ Payment details for payment method specific funding transaction fields. """ + request_multicapture: NotRequired["Literal['if_available', 'never']|str"] + """ + Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. + """ setup_future_usage: NotRequired[Literal["none"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -8321,6 +8325,10 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsZip(TypedDict): class PaymentIntentConfirmParamsRadarOptions(TypedDict): + is_free_trial_transaction: NotRequired[bool] + """ + Whether this transaction starts a free trial. Set to `true` for a free trial or `false` otherwise. If omitted, retains the previously set value. If never set, Stripe uses Billing or metadata to determine trial status. + """ 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. diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index 96caab62f..53c96241b 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -390,7 +390,7 @@ class PaymentIntentCreateParams(RequestOptions): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [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. + Provides information about a card charge. Concatenated to the account's [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. A suffix longer than 22 characters returns an error. If a valid suffix makes the complete statement descriptor longer than 22 characters, Stripe truncates the descriptor instead of returning an error. Learn how to [fit the suffix in the complete descriptor](https://docs.stripe.com/get-started/account/statement-descriptors#suffix-length). """ transfer_data: NotRequired["PaymentIntentCreateParamsTransferData"] """ @@ -5686,22 +5686,22 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardPresent(TypedDict): class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentAadeData( TypedDict, ): - mark_data: NotRequired[str] - """ - The canonical string that was signed by the e-invoicing provider to produce `signed_mark`, formatted per Appendix A of A.1155/2023. Required when `mode` is `standard`. - """ mode: Literal["autonomous", "standard"] """ - The e-invoicing mode under which the mark was generated. + The e-invoicing mode under which the provider signature was generated. """ provider_id: NotRequired[int] """ - The AADE-assigned approval number of the e-invoicing provider that generated the mark. Required when `mode` is `standard`. + The AADE-assigned approval number of the e-invoicing provider that generated the provider signature. Required when `mode` is `standard`. """ - signed_mark: NotRequired[str] + provider_signature: NotRequired[str] """ The cryptographic signature returned by the e-invoicing provider for this transaction, hex-encoded. Required when `mode` is `standard`. """ + provider_signature_data: NotRequired[str] + """ + The canonical string that was signed by the e-invoicing provider to produce `provider_signature`, formatted per Appendix A of A.1155/2023. Required when `mode` is `standard`. + """ unbound_pos: NotRequired[ Literal["interconnection_loss", "lock", "replacement_cash_system"] ] @@ -8366,6 +8366,10 @@ class PaymentIntentCreateParamsPaymentMethodOptionsVipps(TypedDict): """ Payment details for payment method specific funding transaction fields. """ + request_multicapture: NotRequired["Literal['if_available', 'never']|str"] + """ + Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. + """ setup_future_usage: NotRequired[Literal["none"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -8467,6 +8471,10 @@ class PaymentIntentCreateParamsPaymentsOrchestration(TypedDict): class PaymentIntentCreateParamsRadarOptions(TypedDict): + is_free_trial_transaction: NotRequired[bool] + """ + Whether this transaction starts a free trial. Set to `true` for a free trial or `false` otherwise. If omitted, retains the previously set value. If never set, Stripe uses Billing or metadata to determine trial status. + """ 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. diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index 5dd0e75c1..d92d78da7 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -258,7 +258,7 @@ class PaymentIntentModifyParams(RequestOptions): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [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. + Provides information about a card charge. Concatenated to the account's [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. A suffix longer than 22 characters returns an error. If a valid suffix makes the complete statement descriptor longer than 22 characters, Stripe truncates the descriptor instead of returning an error. Learn how to [fit the suffix in the complete descriptor](https://docs.stripe.com/get-started/account/statement-descriptors#suffix-length). """ transfer_data: NotRequired["PaymentIntentModifyParamsTransferData"] """ @@ -5520,22 +5520,22 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardPresent(TypedDict): class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentAadeData( TypedDict, ): - mark_data: NotRequired[str] - """ - The canonical string that was signed by the e-invoicing provider to produce `signed_mark`, formatted per Appendix A of A.1155/2023. Required when `mode` is `standard`. - """ mode: Literal["autonomous", "standard"] """ - The e-invoicing mode under which the mark was generated. + The e-invoicing mode under which the provider signature was generated. """ provider_id: NotRequired[int] """ - The AADE-assigned approval number of the e-invoicing provider that generated the mark. Required when `mode` is `standard`. + The AADE-assigned approval number of the e-invoicing provider that generated the provider signature. Required when `mode` is `standard`. """ - signed_mark: NotRequired[str] + provider_signature: NotRequired[str] """ The cryptographic signature returned by the e-invoicing provider for this transaction, hex-encoded. Required when `mode` is `standard`. """ + provider_signature_data: NotRequired[str] + """ + The canonical string that was signed by the e-invoicing provider to produce `provider_signature`, formatted per Appendix A of A.1155/2023. Required when `mode` is `standard`. + """ unbound_pos: NotRequired[ Literal["interconnection_loss", "lock", "replacement_cash_system"] ] @@ -8200,6 +8200,10 @@ class PaymentIntentModifyParamsPaymentMethodOptionsVipps(TypedDict): """ Payment details for payment method specific funding transaction fields. """ + request_multicapture: NotRequired["Literal['if_available', 'never']|str"] + """ + Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. + """ setup_future_usage: NotRequired[Literal["none"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/stripe/params/_payment_intent_update_crypto_refund_address_params.py b/stripe/params/_payment_intent_update_crypto_refund_address_params.py index 0c9a5ef7a..6d89f50b6 100644 --- a/stripe/params/_payment_intent_update_crypto_refund_address_params.py +++ b/stripe/params/_payment_intent_update_crypto_refund_address_params.py @@ -11,7 +11,10 @@ class PaymentIntentUpdateCryptoRefundAddressParams(RequestOptions): Specifies which fields in the response should be expanded. """ network: Union[ - Literal["base", "ethereum", "polygon", "solana", "sui", "tempo"], str + Literal[ + "base", "ethereum", "polygon", "solana", "sui", "tempo", "tron" + ], + str, ] """ The blockchain network for the refund address. diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index 9e4d10dc3..e0c40ae5a 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -257,7 +257,7 @@ class PaymentIntentUpdateParams(TypedDict): """ statement_descriptor_suffix: NotRequired[str] """ - Provides information about a card charge. Concatenated to the account's [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. + Provides information about a card charge. Concatenated to the account's [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. A suffix longer than 22 characters returns an error. If a valid suffix makes the complete statement descriptor longer than 22 characters, Stripe truncates the descriptor instead of returning an error. Learn how to [fit the suffix in the complete descriptor](https://docs.stripe.com/get-started/account/statement-descriptors#suffix-length). """ transfer_data: NotRequired["PaymentIntentUpdateParamsTransferData"] """ @@ -5519,22 +5519,22 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent(TypedDict): class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentAadeData( TypedDict, ): - mark_data: NotRequired[str] - """ - The canonical string that was signed by the e-invoicing provider to produce `signed_mark`, formatted per Appendix A of A.1155/2023. Required when `mode` is `standard`. - """ mode: Literal["autonomous", "standard"] """ - The e-invoicing mode under which the mark was generated. + The e-invoicing mode under which the provider signature was generated. """ provider_id: NotRequired[int] """ - The AADE-assigned approval number of the e-invoicing provider that generated the mark. Required when `mode` is `standard`. + The AADE-assigned approval number of the e-invoicing provider that generated the provider signature. Required when `mode` is `standard`. """ - signed_mark: NotRequired[str] + provider_signature: NotRequired[str] """ The cryptographic signature returned by the e-invoicing provider for this transaction, hex-encoded. Required when `mode` is `standard`. """ + provider_signature_data: NotRequired[str] + """ + The canonical string that was signed by the e-invoicing provider to produce `provider_signature`, formatted per Appendix A of A.1155/2023. Required when `mode` is `standard`. + """ unbound_pos: NotRequired[ Literal["interconnection_loss", "lock", "replacement_cash_system"] ] @@ -8199,6 +8199,10 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsVipps(TypedDict): """ Payment details for payment method specific funding transaction fields. """ + request_multicapture: NotRequired["Literal['if_available', 'never']|str"] + """ + Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. + """ setup_future_usage: NotRequired[Literal["none"]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/stripe/params/_payment_link_create_params.py b/stripe/params/_payment_link_create_params.py index 114b93350..f89a6abdd 100644 --- a/stripe/params/_payment_link_create_params.py +++ b/stripe/params/_payment_link_create_params.py @@ -764,7 +764,7 @@ class PaymentLinkCreateParamsOptionalItemAdjustableQuantity(TypedDict): class PaymentLinkCreateParamsPaymentIntentData(TypedDict): capture_method: NotRequired[ - "Literal['automatic', 'automatic_async', 'manual']|str" + "Literal['']|Literal['automatic', 'automatic_async', 'manual']|str" ] """ Controls when the funds will be captured from the customer's account. diff --git a/stripe/params/_payment_link_modify_params.py b/stripe/params/_payment_link_modify_params.py index 690ccf1d7..82c34601a 100644 --- a/stripe/params/_payment_link_modify_params.py +++ b/stripe/params/_payment_link_modify_params.py @@ -586,6 +586,12 @@ class PaymentLinkModifyParamsOptionalItemAdjustableQuantity(TypedDict): class PaymentLinkModifyParamsPaymentIntentData(TypedDict): + capture_method: NotRequired[ + "Literal['']|Literal['automatic', 'automatic_async', 'manual']|str" + ] + """ + Controls when the funds will be captured from the customer's account. + """ description: NotRequired["Literal['']|str"] """ An arbitrary string attached to the object. Often useful for displaying to users. diff --git a/stripe/params/_payment_link_update_params.py b/stripe/params/_payment_link_update_params.py index 37b35ca5d..1c22ecad5 100644 --- a/stripe/params/_payment_link_update_params.py +++ b/stripe/params/_payment_link_update_params.py @@ -585,6 +585,12 @@ class PaymentLinkUpdateParamsOptionalItemAdjustableQuantity(TypedDict): class PaymentLinkUpdateParamsPaymentIntentData(TypedDict): + capture_method: NotRequired[ + "Literal['']|Literal['automatic', 'automatic_async', 'manual']|str" + ] + """ + Controls when the funds will be captured from the customer's account. + """ description: NotRequired["Literal['']|str"] """ An arbitrary string attached to the object. Often useful for displaying to users. diff --git a/stripe/params/_payment_method_configuration_create_params.py b/stripe/params/_payment_method_configuration_create_params.py index 36d6b095e..c3056ec74 100644 --- a/stripe/params/_payment_method_configuration_create_params.py +++ b/stripe/params/_payment_method_configuration_create_params.py @@ -10,6 +10,10 @@ class PaymentMethodConfigurationCreateParams(RequestOptions): """ Canadian pre-authorized debit payments, check this [page](https://docs.stripe.com/payments/acss-debit) for more details like country availability. """ + aeon_pay: NotRequired["PaymentMethodConfigurationCreateParamsAeonPay"] + """ + AEON Pay is a single-use payment method that requires customers to authenticate their payment. Customers pay by being redirected from your website or app, authorizing the payment with AEON Pay, then returning to your website or app. You get immediate notification of whether the payment succeeded or failed. + """ affirm: NotRequired["PaymentMethodConfigurationCreateParamsAffirm"] """ [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://docs.stripe.com/payments/affirm) for more details like country availability. @@ -48,6 +52,10 @@ class PaymentMethodConfigurationCreateParams(RequestOptions): """ Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://docs.stripe.com/payments/au-becs-debit) for more details. """ + au_pay: NotRequired["PaymentMethodConfigurationCreateParamsAuPay"] + """ + au PAY is a single-use payment method that requires customers to authenticate their payment. Customers pay by being redirected from your website or app, authorizing the payment with au PAY, then returning to your website or app. You get immediate notification of whether the payment succeeded or failed. + """ bacs_debit: NotRequired["PaymentMethodConfigurationCreateParamsBacsDebit"] """ Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://docs.stripe.com/payments/payment-methods/bacs-debit) for more details. @@ -96,6 +104,10 @@ class PaymentMethodConfigurationCreateParams(RequestOptions): """ Uses a customer's [cash balance](https://docs.stripe.com/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://docs.stripe.com/payments/bank-transfers) for more details. """ + dbarai: NotRequired["PaymentMethodConfigurationCreateParamsDbarai"] + """ + d-Barai is a single-use payment method that requires customers to authenticate their payment. Customers pay by being redirected from your website or app, authorizing the payment with d-Barai, then returning to your website or app. You get immediate notification of whether the payment succeeded or failed. + """ eps: NotRequired["PaymentMethodConfigurationCreateParamsEps"] """ EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://docs.stripe.com/payments/eps) for more details. @@ -168,6 +180,10 @@ class PaymentMethodConfigurationCreateParams(RequestOptions): """ MB WAY is the most popular wallet in Portugal. After entering their phone number in your checkout, customers approve the payment directly in their MB WAY app. Check this [page](https://docs.stripe.com/payments/mb-way) for more details. """ + merpay: NotRequired["PaymentMethodConfigurationCreateParamsMerpay"] + """ + Merpay is a single-use payment method that requires customers to authenticate their payment. Customers pay by being redirected from your website or app, authorizing the payment with Merpay, then returning to your website or app. You get immediate notification of whether the payment succeeded or failed. + """ mobilepay: NotRequired["PaymentMethodConfigurationCreateParamsMobilepay"] """ MobilePay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://docs.stripe.com/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://docs.stripe.com/payments/mobilepay) for more details. @@ -338,6 +354,24 @@ class PaymentMethodConfigurationCreateParamsAcssDebitDisplayPreference( """ +class PaymentMethodConfigurationCreateParamsAeonPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsAeonPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsAeonPayDisplayPreference( + TypedDict +): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationCreateParamsAffirm(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationCreateParamsAffirmDisplayPreference" @@ -476,6 +510,22 @@ class PaymentMethodConfigurationCreateParamsAuBecsDebitDisplayPreference( """ +class PaymentMethodConfigurationCreateParamsAuPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsAuPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsAuPayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationCreateParamsBacsDebit(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationCreateParamsBacsDebitDisplayPreference" @@ -662,6 +712,22 @@ class PaymentMethodConfigurationCreateParamsCustomerBalanceDisplayPreference( """ +class PaymentMethodConfigurationCreateParamsDbarai(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsDbaraiDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsDbaraiDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationCreateParamsEps(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationCreateParamsEpsDisplayPreference" @@ -932,6 +998,22 @@ class PaymentMethodConfigurationCreateParamsMbWayDisplayPreference(TypedDict): """ +class PaymentMethodConfigurationCreateParamsMerpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsMerpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsMerpayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationCreateParamsMobilepay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationCreateParamsMobilepayDisplayPreference" diff --git a/stripe/params/_payment_method_configuration_modify_params.py b/stripe/params/_payment_method_configuration_modify_params.py index cad4c35ef..316f7a04f 100644 --- a/stripe/params/_payment_method_configuration_modify_params.py +++ b/stripe/params/_payment_method_configuration_modify_params.py @@ -14,6 +14,10 @@ class PaymentMethodConfigurationModifyParams(RequestOptions): """ Whether the configuration can be used for new payments. """ + aeon_pay: NotRequired["PaymentMethodConfigurationModifyParamsAeonPay"] + """ + AEON Pay is a single-use payment method that requires customers to authenticate their payment. Customers pay by being redirected from your website or app, authorizing the payment with AEON Pay, then returning to your website or app. You get immediate notification of whether the payment succeeded or failed. + """ affirm: NotRequired["PaymentMethodConfigurationModifyParamsAffirm"] """ [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://docs.stripe.com/payments/affirm) for more details like country availability. @@ -52,6 +56,10 @@ class PaymentMethodConfigurationModifyParams(RequestOptions): """ Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://docs.stripe.com/payments/au-becs-debit) for more details. """ + au_pay: NotRequired["PaymentMethodConfigurationModifyParamsAuPay"] + """ + au PAY is a single-use payment method that requires customers to authenticate their payment. Customers pay by being redirected from your website or app, authorizing the payment with au PAY, then returning to your website or app. You get immediate notification of whether the payment succeeded or failed. + """ bacs_debit: NotRequired["PaymentMethodConfigurationModifyParamsBacsDebit"] """ Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://docs.stripe.com/payments/payment-methods/bacs-debit) for more details. @@ -100,6 +108,10 @@ class PaymentMethodConfigurationModifyParams(RequestOptions): """ Uses a customer's [cash balance](https://docs.stripe.com/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://docs.stripe.com/payments/bank-transfers) for more details. """ + dbarai: NotRequired["PaymentMethodConfigurationModifyParamsDbarai"] + """ + d-Barai is a single-use payment method that requires customers to authenticate their payment. Customers pay by being redirected from your website or app, authorizing the payment with d-Barai, then returning to your website or app. You get immediate notification of whether the payment succeeded or failed. + """ eps: NotRequired["PaymentMethodConfigurationModifyParamsEps"] """ EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://docs.stripe.com/payments/eps) for more details. @@ -172,6 +184,10 @@ class PaymentMethodConfigurationModifyParams(RequestOptions): """ MB WAY is the most popular wallet in Portugal. After entering their phone number in your checkout, customers approve the payment directly in their MB WAY app. Check this [page](https://docs.stripe.com/payments/mb-way) for more details. """ + merpay: NotRequired["PaymentMethodConfigurationModifyParamsMerpay"] + """ + Merpay is a single-use payment method that requires customers to authenticate their payment. Customers pay by being redirected from your website or app, authorizing the payment with Merpay, then returning to your website or app. You get immediate notification of whether the payment succeeded or failed. + """ mobilepay: NotRequired["PaymentMethodConfigurationModifyParamsMobilepay"] """ MobilePay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://docs.stripe.com/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://docs.stripe.com/payments/mobilepay) for more details. @@ -338,6 +354,24 @@ class PaymentMethodConfigurationModifyParamsAcssDebitDisplayPreference( """ +class PaymentMethodConfigurationModifyParamsAeonPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsAeonPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsAeonPayDisplayPreference( + TypedDict +): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationModifyParamsAffirm(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationModifyParamsAffirmDisplayPreference" @@ -476,6 +510,22 @@ class PaymentMethodConfigurationModifyParamsAuBecsDebitDisplayPreference( """ +class PaymentMethodConfigurationModifyParamsAuPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsAuPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsAuPayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationModifyParamsBacsDebit(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationModifyParamsBacsDebitDisplayPreference" @@ -662,6 +712,22 @@ class PaymentMethodConfigurationModifyParamsCustomerBalanceDisplayPreference( """ +class PaymentMethodConfigurationModifyParamsDbarai(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsDbaraiDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsDbaraiDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationModifyParamsEps(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationModifyParamsEpsDisplayPreference" @@ -932,6 +998,22 @@ class PaymentMethodConfigurationModifyParamsMbWayDisplayPreference(TypedDict): """ +class PaymentMethodConfigurationModifyParamsMerpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsMerpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsMerpayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationModifyParamsMobilepay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationModifyParamsMobilepayDisplayPreference" diff --git a/stripe/params/_payment_method_configuration_update_params.py b/stripe/params/_payment_method_configuration_update_params.py index 995db4cdd..f316ce71d 100644 --- a/stripe/params/_payment_method_configuration_update_params.py +++ b/stripe/params/_payment_method_configuration_update_params.py @@ -13,6 +13,10 @@ class PaymentMethodConfigurationUpdateParams(TypedDict): """ Whether the configuration can be used for new payments. """ + aeon_pay: NotRequired["PaymentMethodConfigurationUpdateParamsAeonPay"] + """ + AEON Pay is a single-use payment method that requires customers to authenticate their payment. Customers pay by being redirected from your website or app, authorizing the payment with AEON Pay, then returning to your website or app. You get immediate notification of whether the payment succeeded or failed. + """ affirm: NotRequired["PaymentMethodConfigurationUpdateParamsAffirm"] """ [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://docs.stripe.com/payments/affirm) for more details like country availability. @@ -51,6 +55,10 @@ class PaymentMethodConfigurationUpdateParams(TypedDict): """ Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://docs.stripe.com/payments/au-becs-debit) for more details. """ + au_pay: NotRequired["PaymentMethodConfigurationUpdateParamsAuPay"] + """ + au PAY is a single-use payment method that requires customers to authenticate their payment. Customers pay by being redirected from your website or app, authorizing the payment with au PAY, then returning to your website or app. You get immediate notification of whether the payment succeeded or failed. + """ bacs_debit: NotRequired["PaymentMethodConfigurationUpdateParamsBacsDebit"] """ Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://docs.stripe.com/payments/payment-methods/bacs-debit) for more details. @@ -99,6 +107,10 @@ class PaymentMethodConfigurationUpdateParams(TypedDict): """ Uses a customer's [cash balance](https://docs.stripe.com/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://docs.stripe.com/payments/bank-transfers) for more details. """ + dbarai: NotRequired["PaymentMethodConfigurationUpdateParamsDbarai"] + """ + d-Barai is a single-use payment method that requires customers to authenticate their payment. Customers pay by being redirected from your website or app, authorizing the payment with d-Barai, then returning to your website or app. You get immediate notification of whether the payment succeeded or failed. + """ eps: NotRequired["PaymentMethodConfigurationUpdateParamsEps"] """ EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://docs.stripe.com/payments/eps) for more details. @@ -171,6 +183,10 @@ class PaymentMethodConfigurationUpdateParams(TypedDict): """ MB WAY is the most popular wallet in Portugal. After entering their phone number in your checkout, customers approve the payment directly in their MB WAY app. Check this [page](https://docs.stripe.com/payments/mb-way) for more details. """ + merpay: NotRequired["PaymentMethodConfigurationUpdateParamsMerpay"] + """ + Merpay is a single-use payment method that requires customers to authenticate their payment. Customers pay by being redirected from your website or app, authorizing the payment with Merpay, then returning to your website or app. You get immediate notification of whether the payment succeeded or failed. + """ mobilepay: NotRequired["PaymentMethodConfigurationUpdateParamsMobilepay"] """ MobilePay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://docs.stripe.com/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://docs.stripe.com/payments/mobilepay) for more details. @@ -337,6 +353,24 @@ class PaymentMethodConfigurationUpdateParamsAcssDebitDisplayPreference( """ +class PaymentMethodConfigurationUpdateParamsAeonPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsAeonPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsAeonPayDisplayPreference( + TypedDict +): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationUpdateParamsAffirm(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationUpdateParamsAffirmDisplayPreference" @@ -475,6 +509,22 @@ class PaymentMethodConfigurationUpdateParamsAuBecsDebitDisplayPreference( """ +class PaymentMethodConfigurationUpdateParamsAuPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsAuPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsAuPayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationUpdateParamsBacsDebit(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationUpdateParamsBacsDebitDisplayPreference" @@ -661,6 +711,22 @@ class PaymentMethodConfigurationUpdateParamsCustomerBalanceDisplayPreference( """ +class PaymentMethodConfigurationUpdateParamsDbarai(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsDbaraiDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsDbaraiDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationUpdateParamsEps(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationUpdateParamsEpsDisplayPreference" @@ -931,6 +997,22 @@ class PaymentMethodConfigurationUpdateParamsMbWayDisplayPreference(TypedDict): """ +class PaymentMethodConfigurationUpdateParamsMerpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsMerpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsMerpayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationUpdateParamsMobilepay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationUpdateParamsMobilepayDisplayPreference" diff --git a/stripe/params/_payment_record_report_payment_attempt_failed_params.py b/stripe/params/_payment_record_report_payment_attempt_failed_params.py index b1063affc..c15046789 100644 --- a/stripe/params/_payment_record_report_payment_attempt_failed_params.py +++ b/stripe/params/_payment_record_report_payment_attempt_failed_params.py @@ -79,6 +79,12 @@ class PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCard( """ Decline code from the card network for the failed payment. """ + three_d_secure: NotRequired[ + "PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardThreeDSecure" + ] + """ + Populated if this transaction used 3D Secure authentication. + """ class PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardChecks( @@ -104,6 +110,51 @@ class PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardCheck """ +class PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardThreeDSecure( + TypedDict, +): + authentication_flow: NotRequired[ + "Literal['challenge', 'frictionless']|str" + ] + """ + For authenticated transactions: Indicates how the issuing bank authenticated the customer. + """ + electronic_commerce_indicator: NotRequired[ + "Literal['01', '02', '05', '06', '07']|str" + ] + """ + The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of authentication was performed. + """ + exemption_indicator: NotRequired["Literal['low_risk', 'none']|str"] + """ + The exemption requested via 3DS and accepted by the issuer at authentication time. + """ + result: Union[ + Literal[ + "attempt_acknowledged", + "authenticated", + "exempted", + "failed", + "not_supported", + "processing_error", + ], + str, + ] + """ + Indicates the outcome of 3D Secure authentication. + """ + result_reason: NotRequired[ + "Literal['abandoned', 'canceled', 'card_not_enrolled', 'network_not_supported', 'protocol_error', 'rejected']|str" + ] + """ + Additional information about why 3D Secure succeeded or failed, based on the `result`. + """ + version: Union[Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"], str] + """ + The version of 3D Secure that was used. + """ + + class PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsUsBankAccount( TypedDict, ): diff --git a/stripe/params/_product_create_params.py b/stripe/params/_product_create_params.py index 219506454..8952cbb48 100644 --- a/stripe/params/_product_create_params.py +++ b/stripe/params/_product_create_params.py @@ -263,6 +263,10 @@ class ProductCreateParamsIdentifiers(TypedDict): class ProductCreateParamsMarketingFeature(TypedDict): + loss_message: NotRequired["Literal['']|str"] + """ + Optional text that describes what a customer loses by canceling, shown for this marketing feature in the Customer Portal cancellation flow. Up to 80 characters long. If you omit it when you update `marketing_features`, Stripe keeps the message stored for the feature with the same name. Duplicate names are matched in order. Set it to an empty string to remove the override. When no override is stored, eligible cancellation flows use the marketing feature name. A renamed feature is treated as a new feature, so send the message again to keep it. + """ name: str """ The marketing feature name. Up to 80 characters long. diff --git a/stripe/params/_product_modify_params.py b/stripe/params/_product_modify_params.py index eec882356..6e02afc75 100644 --- a/stripe/params/_product_modify_params.py +++ b/stripe/params/_product_modify_params.py @@ -114,6 +114,10 @@ class ProductModifyParamsIdentifiers(TypedDict): class ProductModifyParamsMarketingFeature(TypedDict): + loss_message: NotRequired["Literal['']|str"] + """ + Optional text that describes what a customer loses by canceling, shown for this marketing feature in the Customer Portal cancellation flow. Up to 80 characters long. If you omit it when you update `marketing_features`, Stripe keeps the message stored for the feature with the same name. Duplicate names are matched in order. Set it to an empty string to remove the override. When no override is stored, eligible cancellation flows use the marketing feature name. A renamed feature is treated as a new feature, so send the message again to keep it. + """ name: str """ The marketing feature name. Up to 80 characters long. diff --git a/stripe/params/_product_update_params.py b/stripe/params/_product_update_params.py index b9f0aebd5..1323715df 100644 --- a/stripe/params/_product_update_params.py +++ b/stripe/params/_product_update_params.py @@ -113,6 +113,10 @@ class ProductUpdateParamsIdentifiers(TypedDict): class ProductUpdateParamsMarketingFeature(TypedDict): + loss_message: NotRequired["Literal['']|str"] + """ + Optional text that describes what a customer loses by canceling, shown for this marketing feature in the Customer Portal cancellation flow. Up to 80 characters long. If you omit it when you update `marketing_features`, Stripe keeps the message stored for the feature with the same name. Duplicate names are matched in order. Set it to an empty string to remove the override. When no override is stored, eligible cancellation flows use the marketing feature name. A renamed feature is treated as a new feature, so send the message again to keep it. + """ name: str """ The marketing feature name. Up to 80 characters long. diff --git a/stripe/params/_subscription_create_params.py b/stripe/params/_subscription_create_params.py index 4c96a8cc4..2119a7d86 100644 --- a/stripe/params/_subscription_create_params.py +++ b/stripe/params/_subscription_create_params.py @@ -26,10 +26,6 @@ class SubscriptionCreateParams(RequestOptions): """ A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. """ - billing_cadence: NotRequired[str] - """ - The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. - """ billing_cycle_anchor: NotRequired[int] """ A future timestamp in UTC format to anchor the subscription's [billing cycle](https://docs.stripe.com/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. @@ -1138,6 +1134,10 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlikMandateOpti class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCard( TypedDict, ): + debit_behavior: NotRequired[str] + """ + Controls early collection for eligible recurring payments on India-issued cards. Target-date billing aims to debit on the billing-cycle date but does not guarantee that date. + """ mandate_options: NotRequired[ "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions" ] @@ -1261,6 +1261,10 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOpt class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPix( TypedDict ): + debit_behavior: NotRequired[str] + """ + Timing configuration for collecting funds from the customer's account. + """ expires_after_seconds: NotRequired[int] """ The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). @@ -1308,6 +1312,10 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit( class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpi( TypedDict ): + debit_behavior: NotRequired[str] + """ + Controls when the funds will be captured from the customer's account. Defaults to `not_specified`. Omit this parameter on an update to preserve the saved value; pass `not_specified` to clear it. Early collection is best effort and doesn't guarantee an exact debit date. + """ mandate_options: NotRequired[ "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" ] diff --git a/stripe/params/_subscription_list_params.py b/stripe/params/_subscription_list_params.py index 915e0dc9c..342a6c4eb 100644 --- a/stripe/params/_subscription_list_params.py +++ b/stripe/params/_subscription_list_params.py @@ -10,10 +10,6 @@ class SubscriptionListParams(RequestOptions): """ Filter subscriptions by their automatic tax settings. """ - billing_cadence: NotRequired[str] - """ - The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. - """ billing_group: NotRequired[str] """ Filter for subscriptions that have the specified billing group. diff --git a/stripe/params/_subscription_modify_params.py b/stripe/params/_subscription_modify_params.py index 384c03e24..e25fe75ed 100644 --- a/stripe/params/_subscription_modify_params.py +++ b/stripe/params/_subscription_modify_params.py @@ -22,10 +22,6 @@ class SubscriptionModifyParams(RequestOptions): """ Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. """ - billing_cadence: NotRequired[str] - """ - The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. - """ billing_cycle_anchor: NotRequired[ "SubscriptionModifyParamsBillingCycleAnchor" ] @@ -1131,6 +1127,10 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlikMandateOpti class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCard( TypedDict, ): + debit_behavior: NotRequired[str] + """ + Controls early collection for eligible recurring payments on India-issued cards. Target-date billing aims to debit on the billing-cycle date but does not guarantee that date. + """ mandate_options: NotRequired[ "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions" ] @@ -1254,6 +1254,10 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOpt class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPix( TypedDict ): + debit_behavior: NotRequired[str] + """ + Timing configuration for collecting funds from the customer's account. + """ expires_after_seconds: NotRequired[int] """ The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). @@ -1301,6 +1305,10 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit( class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpi( TypedDict ): + debit_behavior: NotRequired[str] + """ + Controls when the funds will be captured from the customer's account. Defaults to `not_specified`. Omit this parameter on an update to preserve the saved value; pass `not_specified` to clear it. Early collection is best effort and doesn't guarantee an exact debit date. + """ mandate_options: NotRequired[ "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" ] diff --git a/stripe/params/_subscription_schedule_create_params.py b/stripe/params/_subscription_schedule_create_params.py index e46a8ad36..9f22132e0 100644 --- a/stripe/params/_subscription_schedule_create_params.py +++ b/stripe/params/_subscription_schedule_create_params.py @@ -278,6 +278,12 @@ class SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettings( """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ + rendering: NotRequired[ + "Literal['']|SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsRendering" + ] + """ + Settings that control how invoices render in customer-facing interfaces such as the PDF or hosted invoice page. + """ class SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsCustomField( @@ -306,6 +312,19 @@ class SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer( """ +class SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsRendering( + TypedDict, +): + template: NotRequired[str] + """ + ID of the invoice rendering template to use for future invoices. + """ + template_version: NotRequired["Literal['']|int"] + """ + The specific version of invoice rendering template to use for future invoices. If set to null, the latest version of the template will be used. + """ + + class SubscriptionScheduleCreateParamsDefaultSettingsTransferData(TypedDict): amount_percent: NotRequired[float] """ diff --git a/stripe/params/_subscription_schedule_modify_params.py b/stripe/params/_subscription_schedule_modify_params.py index dadbe3f80..fdc1e53bb 100644 --- a/stripe/params/_subscription_schedule_modify_params.py +++ b/stripe/params/_subscription_schedule_modify_params.py @@ -246,6 +246,12 @@ class SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettings( """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ + rendering: NotRequired[ + "Literal['']|SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsRendering" + ] + """ + Settings that control how invoices render in customer-facing interfaces such as the PDF or hosted invoice page. + """ class SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsCustomField( @@ -274,6 +280,19 @@ class SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsIssuer( """ +class SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsRendering( + TypedDict, +): + template: NotRequired[str] + """ + ID of the invoice rendering template to use for future invoices. + """ + template_version: NotRequired["Literal['']|int"] + """ + The specific version of invoice rendering template to use for future invoices. If set to null, the latest version of the template will be used. + """ + + class SubscriptionScheduleModifyParamsDefaultSettingsTransferData(TypedDict): amount_percent: NotRequired[float] """ diff --git a/stripe/params/_subscription_schedule_update_params.py b/stripe/params/_subscription_schedule_update_params.py index 35962eee4..02ee16dcf 100644 --- a/stripe/params/_subscription_schedule_update_params.py +++ b/stripe/params/_subscription_schedule_update_params.py @@ -245,6 +245,12 @@ class SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettings( """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ + rendering: NotRequired[ + "Literal['']|SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsRendering" + ] + """ + Settings that control how invoices render in customer-facing interfaces such as the PDF or hosted invoice page. + """ class SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsCustomField( @@ -273,6 +279,19 @@ class SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsIssuer( """ +class SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsRendering( + TypedDict, +): + template: NotRequired[str] + """ + ID of the invoice rendering template to use for future invoices. + """ + template_version: NotRequired["Literal['']|int"] + """ + The specific version of invoice rendering template to use for future invoices. If set to null, the latest version of the template will be used. + """ + + class SubscriptionScheduleUpdateParamsDefaultSettingsTransferData(TypedDict): amount_percent: NotRequired[float] """ diff --git a/stripe/params/_subscription_update_params.py b/stripe/params/_subscription_update_params.py index 803660733..7816f97e9 100644 --- a/stripe/params/_subscription_update_params.py +++ b/stripe/params/_subscription_update_params.py @@ -21,10 +21,6 @@ class SubscriptionUpdateParams(TypedDict): """ Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. """ - billing_cadence: NotRequired[str] - """ - The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. - """ billing_cycle_anchor: NotRequired[ "SubscriptionUpdateParamsBillingCycleAnchor" ] @@ -1130,6 +1126,10 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlikMandateOpti class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCard( TypedDict, ): + debit_behavior: NotRequired[str] + """ + Controls early collection for eligible recurring payments on India-issued cards. Target-date billing aims to debit on the billing-cycle date but does not guarantee that date. + """ mandate_options: NotRequired[ "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions" ] @@ -1253,6 +1253,10 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOpt class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPix( TypedDict ): + debit_behavior: NotRequired[str] + """ + Timing configuration for collecting funds from the customer's account. + """ expires_after_seconds: NotRequired[int] """ The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). @@ -1300,6 +1304,10 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit( class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpi( TypedDict ): + debit_behavior: NotRequired[str] + """ + Controls when the funds will be captured from the customer's account. Defaults to `not_specified`. Omit this parameter on an update to preserve the saved value; pass `not_specified` to clear it. Early collection is best effort and doesn't guarantee an exact debit date. + """ mandate_options: NotRequired[ "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" ] diff --git a/stripe/params/_webhook_endpoint_create_params.py b/stripe/params/_webhook_endpoint_create_params.py index 4dd01374d..b9ee3e1b4 100644 --- a/stripe/params/_webhook_endpoint_create_params.py +++ b/stripe/params/_webhook_endpoint_create_params.py @@ -138,6 +138,7 @@ class WebhookEndpointCreateParams(RequestOptions): "2026-08-26.dahlia", "2026-09-30.endive", "2026-10-28.endive", + "2026-11-18.endive", ] ] """ diff --git a/stripe/params/billing/_alert_create_params.py b/stripe/params/billing/_alert_create_params.py index bbc474b86..a2ccf3ca0 100644 --- a/stripe/params/billing/_alert_create_params.py +++ b/stripe/params/billing/_alert_create_params.py @@ -176,7 +176,7 @@ class AlertCreateParamsSpendThreshold(TypedDict): Filters to scope the spend calculation. """ group_by: NotRequired[ - "Literal['billing_cadence', 'pricing_plan_subscription']|str" + "Literal['billing_group', 'pricing_plan_subscription']|str" ] """ Defines the granularity of spend aggregation. Defaults to `pricing_plan_subscription`. @@ -192,10 +192,6 @@ class AlertCreateParamsSpendThresholdFilters(TypedDict): """ Filter by billable item IDs. Maximum of 20 billable items. """ - billing_cadence: NotRequired[str] - """ - Filter by billing cadence ID. - """ billing_group: NotRequired[str] """ Filter by billing group ID. diff --git a/stripe/params/billing/_alert_list_notifications_params.py b/stripe/params/billing/_alert_list_notifications_params.py index c202ada24..f8674abd1 100644 --- a/stripe/params/billing/_alert_list_notifications_params.py +++ b/stripe/params/billing/_alert_list_notifications_params.py @@ -14,10 +14,6 @@ class AlertListNotificationsParams(RequestOptions): """ Filter results to only include notifications for the given billing group. """ - cadence: NotRequired[str] - """ - Filter results to only include notifications for the given cadence. - """ customer: str """ The customer to list notifications for. diff --git a/stripe/params/billing/_alert_notification_list_params.py b/stripe/params/billing/_alert_notification_list_params.py index 2e851943e..b142b8418 100644 --- a/stripe/params/billing/_alert_notification_list_params.py +++ b/stripe/params/billing/_alert_notification_list_params.py @@ -13,10 +13,6 @@ class AlertNotificationListParams(TypedDict): """ Filter results to only include notifications for the given billing group. """ - cadence: NotRequired[str] - """ - Filter results to only include notifications for the given cadence. - """ customer: str """ The customer to list notifications for. diff --git a/stripe/params/billing_portal/_configuration_create_params.py b/stripe/params/billing_portal/_configuration_create_params.py index ce572f74e..d880749f5 100644 --- a/stripe/params/billing_portal/_configuration_create_params.py +++ b/stripe/params/billing_portal/_configuration_create_params.py @@ -243,7 +243,7 @@ class ConfigurationCreateParamsFeaturesSubscriptionUpdate(TypedDict): "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ - Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to `none`. """ schedule_at_period_end: NotRequired[ "ConfigurationCreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" diff --git a/stripe/params/billing_portal/_configuration_modify_params.py b/stripe/params/billing_portal/_configuration_modify_params.py index 9ecbaa883..527160b53 100644 --- a/stripe/params/billing_portal/_configuration_modify_params.py +++ b/stripe/params/billing_portal/_configuration_modify_params.py @@ -234,7 +234,7 @@ class ConfigurationModifyParamsFeaturesSubscriptionUpdate(TypedDict): "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ - Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. If omitted, the proration behavior is unchanged. """ schedule_at_period_end: NotRequired[ "ConfigurationModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" diff --git a/stripe/params/billing_portal/_configuration_update_params.py b/stripe/params/billing_portal/_configuration_update_params.py index 59675a905..907382b5e 100644 --- a/stripe/params/billing_portal/_configuration_update_params.py +++ b/stripe/params/billing_portal/_configuration_update_params.py @@ -233,7 +233,7 @@ class ConfigurationUpdateParamsFeaturesSubscriptionUpdate(TypedDict): "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ - Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. If omitted, the proration behavior is unchanged. """ schedule_at_period_end: NotRequired[ "ConfigurationUpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index 184462a1e..a259f7a0d 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -415,10 +415,6 @@ class SessionCreateParams(RequestOptions): We recommend that you review your privacy policy and check with your legal contacts before using this feature. Learn more about [collecting phone numbers with Checkout](https://docs.stripe.com/payments/checkout/phone-numbers). """ - pricing_token: NotRequired[str] - """ - Token used to resolve the presentment currency for this Checkout Session. - """ redirect_on_completion: NotRequired[ "Literal['always', 'if_required', 'never']|str" ] diff --git a/stripe/params/financial_connections/_session_create_params.py b/stripe/params/financial_connections/_session_create_params.py index a7a4d990f..03e0d3eed 100644 --- a/stripe/params/financial_connections/_session_create_params.py +++ b/stripe/params/financial_connections/_session_create_params.py @@ -110,7 +110,7 @@ class SessionCreateParamsFilters(TypedDict): """ country: NotRequired[str] """ - Country from which to collect accounts. + Country from which to collect accounts. Supported values are `US` and `CA`. """ institution: NotRequired[str] """ diff --git a/stripe/params/identity/__init__.py b/stripe/params/identity/__init__.py index 8e100c67d..8c909ac7a 100644 --- a/stripe/params/identity/__init__.py +++ b/stripe/params/identity/__init__.py @@ -29,6 +29,7 @@ ) from stripe.params.identity._verification_session_create_params import ( VerificationSessionCreateParams as VerificationSessionCreateParams, + VerificationSessionCreateParamsLinkSharedData as VerificationSessionCreateParamsLinkSharedData, VerificationSessionCreateParamsOptions as VerificationSessionCreateParamsOptions, VerificationSessionCreateParamsOptionsDocument as VerificationSessionCreateParamsOptionsDocument, VerificationSessionCreateParamsProvidedDetails as VerificationSessionCreateParamsProvidedDetails, @@ -102,6 +103,10 @@ "stripe.params.identity._verification_session_create_params", False, ), + "VerificationSessionCreateParamsLinkSharedData": ( + "stripe.params.identity._verification_session_create_params", + False, + ), "VerificationSessionCreateParamsOptions": ( "stripe.params.identity._verification_session_create_params", False, diff --git a/stripe/params/identity/_verification_session_create_params.py b/stripe/params/identity/_verification_session_create_params.py index 283f81ff6..032275631 100644 --- a/stripe/params/identity/_verification_session_create_params.py +++ b/stripe/params/identity/_verification_session_create_params.py @@ -19,6 +19,12 @@ class VerificationSessionCreateParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + link_shared_data: NotRequired[ + "VerificationSessionCreateParamsLinkSharedData" + ] + """ + An authorized LinkSharedData grant used to populate and submit a document-only session. + """ 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`. @@ -63,6 +69,17 @@ class VerificationSessionCreateParams(RequestOptions): """ +class VerificationSessionCreateParamsLinkSharedData(TypedDict): + granted_token: str + """ + The LinkSharedData grant authorizing use of a shared identity document. Requires confirm=true. + """ + identity_document: str + """ + The identity_data.identity_documents[].key returned for this grant. Required even when the grant contains only one document. + """ + + class VerificationSessionCreateParamsOptions(TypedDict): document: NotRequired[ "Literal['']|VerificationSessionCreateParamsOptionsDocument" diff --git a/stripe/params/radar/_payment_evaluation_create_params.py b/stripe/params/radar/_payment_evaluation_create_params.py index 6a787f6c7..356bc9bc7 100644 --- a/stripe/params/radar/_payment_evaluation_create_params.py +++ b/stripe/params/radar/_payment_evaluation_create_params.py @@ -29,6 +29,23 @@ class PaymentEvaluationCreateParams(RequestOptions): """ Details about the payment. """ + requested_signals: NotRequired[ + List[ + Union[ + Literal[ + "bank_initiated_return", + "card_testing", + "early_fraud_warning", + "fraudulent_dispute", + "fraudulent_payment", + ], + str, + ] + ] + ] + """ + The signals to return in the Payment Evaluation response. Must include `fraudulent_payment`. If omitted, only `fraudulent_payment` is returned. + """ class PaymentEvaluationCreateParamsClientDeviceMetadataDetails(TypedDict): diff --git a/stripe/params/reporting/_report_run_create_params.py b/stripe/params/reporting/_report_run_create_params.py index d18cd5cea..e93153d79 100644 --- a/stripe/params/reporting/_report_run_create_params.py +++ b/stripe/params/reporting/_report_run_create_params.py @@ -51,6 +51,10 @@ class ReportRunCreateParamsParameters(TypedDict): """ Category of balance transactions to be included in the report run. """ + tax_invoice_month: NotRequired[str] + """ + The tax invoice month in YYYY-MM format. + """ timezone: NotRequired[ "Literal['Africa/Abidjan', 'Africa/Accra', 'Africa/Addis_Ababa', 'Africa/Algiers', 'Africa/Asmara', 'Africa/Asmera', 'Africa/Bamako', 'Africa/Bangui', 'Africa/Banjul', 'Africa/Bissau', 'Africa/Blantyre', 'Africa/Brazzaville', 'Africa/Bujumbura', 'Africa/Cairo', 'Africa/Casablanca', 'Africa/Ceuta', 'Africa/Conakry', 'Africa/Dakar', 'Africa/Dar_es_Salaam', 'Africa/Djibouti', 'Africa/Douala', 'Africa/El_Aaiun', 'Africa/Freetown', 'Africa/Gaborone', 'Africa/Harare', 'Africa/Johannesburg', 'Africa/Juba', 'Africa/Kampala', 'Africa/Khartoum', 'Africa/Kigali', 'Africa/Kinshasa', 'Africa/Lagos', 'Africa/Libreville', 'Africa/Lome', 'Africa/Luanda', 'Africa/Lubumbashi', 'Africa/Lusaka', 'Africa/Malabo', 'Africa/Maputo', 'Africa/Maseru', 'Africa/Mbabane', 'Africa/Mogadishu', 'Africa/Monrovia', 'Africa/Nairobi', 'Africa/Ndjamena', 'Africa/Niamey', 'Africa/Nouakchott', 'Africa/Ouagadougou', 'Africa/Porto-Novo', 'Africa/Sao_Tome', 'Africa/Timbuktu', 'Africa/Tripoli', 'Africa/Tunis', 'Africa/Windhoek', 'America/Adak', 'America/Anchorage', 'America/Anguilla', 'America/Antigua', 'America/Araguaina', 'America/Argentina/Buenos_Aires', 'America/Argentina/Catamarca', 'America/Argentina/ComodRivadavia', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/La_Rioja', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Salta', 'America/Argentina/San_Juan', 'America/Argentina/San_Luis', 'America/Argentina/Tucuman', 'America/Argentina/Ushuaia', 'America/Aruba', 'America/Asuncion', 'America/Atikokan', 'America/Atka', 'America/Bahia', 'America/Bahia_Banderas', 'America/Barbados', 'America/Belem', 'America/Belize', 'America/Blanc-Sablon', 'America/Boa_Vista', 'America/Bogota', 'America/Boise', 'America/Buenos_Aires', 'America/Cambridge_Bay', 'America/Campo_Grande', 'America/Cancun', 'America/Caracas', 'America/Catamarca', 'America/Cayenne', 'America/Cayman', 'America/Chicago', 'America/Chihuahua', 'America/Ciudad_Juarez', 'America/Coral_Harbour', 'America/Cordoba', 'America/Costa_Rica', 'America/Coyhaique', 'America/Creston', 'America/Cuiaba', 'America/Curacao', 'America/Danmarkshavn', 'America/Dawson', 'America/Dawson_Creek', 'America/Denver', 'America/Detroit', 'America/Dominica', 'America/Edmonton', 'America/Eirunepe', 'America/El_Salvador', 'America/Ensenada', 'America/Fort_Nelson', 'America/Fort_Wayne', 'America/Fortaleza', 'America/Glace_Bay', 'America/Godthab', 'America/Goose_Bay', 'America/Grand_Turk', 'America/Grenada', 'America/Guadeloupe', 'America/Guatemala', 'America/Guayaquil', 'America/Guyana', 'America/Halifax', 'America/Havana', 'America/Hermosillo', 'America/Indiana/Indianapolis', 'America/Indiana/Knox', 'America/Indiana/Marengo', 'America/Indiana/Petersburg', 'America/Indiana/Tell_City', 'America/Indiana/Vevay', 'America/Indiana/Vincennes', 'America/Indiana/Winamac', 'America/Indianapolis', 'America/Inuvik', 'America/Iqaluit', 'America/Jamaica', 'America/Jujuy', 'America/Juneau', 'America/Kentucky/Louisville', 'America/Kentucky/Monticello', 'America/Knox_IN', 'America/Kralendijk', 'America/La_Paz', 'America/Lima', 'America/Los_Angeles', 'America/Louisville', 'America/Lower_Princes', 'America/Maceio', 'America/Managua', 'America/Manaus', 'America/Marigot', 'America/Martinique', 'America/Matamoros', 'America/Mazatlan', 'America/Mendoza', 'America/Menominee', 'America/Merida', 'America/Metlakatla', 'America/Mexico_City', 'America/Miquelon', 'America/Moncton', 'America/Monterrey', 'America/Montevideo', 'America/Montreal', 'America/Montserrat', 'America/Nassau', 'America/New_York', 'America/Nipigon', 'America/Nome', 'America/Noronha', 'America/North_Dakota/Beulah', 'America/North_Dakota/Center', 'America/North_Dakota/New_Salem', 'America/Nuuk', 'America/Ojinaga', 'America/Panama', 'America/Pangnirtung', 'America/Paramaribo', 'America/Phoenix', 'America/Port-au-Prince', 'America/Port_of_Spain', 'America/Porto_Acre', 'America/Porto_Velho', 'America/Puerto_Rico', 'America/Punta_Arenas', 'America/Rainy_River', 'America/Rankin_Inlet', 'America/Recife', 'America/Regina', 'America/Resolute', 'America/Rio_Branco', 'America/Rosario', 'America/Santa_Isabel', 'America/Santarem', 'America/Santiago', 'America/Santo_Domingo', 'America/Sao_Paulo', 'America/Scoresbysund', 'America/Shiprock', 'America/Sitka', 'America/St_Barthelemy', 'America/St_Johns', 'America/St_Kitts', 'America/St_Lucia', 'America/St_Thomas', 'America/St_Vincent', 'America/Swift_Current', 'America/Tegucigalpa', 'America/Thule', 'America/Thunder_Bay', 'America/Tijuana', 'America/Toronto', 'America/Tortola', 'America/Vancouver', 'America/Virgin', 'America/Whitehorse', 'America/Winnipeg', 'America/Yakutat', 'America/Yellowknife', 'Antarctica/Casey', 'Antarctica/Davis', 'Antarctica/DumontDUrville', 'Antarctica/Macquarie', 'Antarctica/Mawson', 'Antarctica/McMurdo', 'Antarctica/Palmer', 'Antarctica/Rothera', 'Antarctica/South_Pole', 'Antarctica/Syowa', 'Antarctica/Troll', 'Antarctica/Vostok', 'Arctic/Longyearbyen', 'Asia/Aden', 'Asia/Almaty', 'Asia/Amman', 'Asia/Anadyr', 'Asia/Aqtau', 'Asia/Aqtobe', 'Asia/Ashgabat', 'Asia/Ashkhabad', 'Asia/Atyrau', 'Asia/Baghdad', 'Asia/Bahrain', 'Asia/Baku', 'Asia/Bangkok', 'Asia/Barnaul', 'Asia/Beirut', 'Asia/Bishkek', 'Asia/Brunei', 'Asia/Calcutta', 'Asia/Chita', 'Asia/Choibalsan', 'Asia/Chongqing', 'Asia/Chungking', 'Asia/Colombo', 'Asia/Dacca', 'Asia/Damascus', 'Asia/Dhaka', 'Asia/Dili', 'Asia/Dubai', 'Asia/Dushanbe', 'Asia/Famagusta', 'Asia/Gaza', 'Asia/Harbin', 'Asia/Hebron', 'Asia/Ho_Chi_Minh', 'Asia/Hong_Kong', 'Asia/Hovd', 'Asia/Irkutsk', 'Asia/Istanbul', 'Asia/Jakarta', 'Asia/Jayapura', 'Asia/Jerusalem', 'Asia/Kabul', 'Asia/Kamchatka', 'Asia/Karachi', 'Asia/Kashgar', 'Asia/Kathmandu', 'Asia/Katmandu', 'Asia/Khandyga', 'Asia/Kolkata', 'Asia/Krasnoyarsk', 'Asia/Kuala_Lumpur', 'Asia/Kuching', 'Asia/Kuwait', 'Asia/Macao', 'Asia/Macau', 'Asia/Magadan', 'Asia/Makassar', 'Asia/Manila', 'Asia/Muscat', 'Asia/Nicosia', 'Asia/Novokuznetsk', 'Asia/Novosibirsk', 'Asia/Omsk', 'Asia/Oral', 'Asia/Phnom_Penh', 'Asia/Pontianak', 'Asia/Pyongyang', 'Asia/Qatar', 'Asia/Qostanay', 'Asia/Qyzylorda', 'Asia/Rangoon', 'Asia/Riyadh', 'Asia/Saigon', 'Asia/Sakhalin', 'Asia/Samarkand', 'Asia/Seoul', 'Asia/Shanghai', 'Asia/Singapore', 'Asia/Srednekolymsk', 'Asia/Taipei', 'Asia/Tashkent', 'Asia/Tbilisi', 'Asia/Tehran', 'Asia/Tel_Aviv', 'Asia/Thimbu', 'Asia/Thimphu', 'Asia/Tokyo', 'Asia/Tomsk', 'Asia/Ujung_Pandang', 'Asia/Ulaanbaatar', 'Asia/Ulan_Bator', 'Asia/Urumqi', 'Asia/Ust-Nera', 'Asia/Vientiane', 'Asia/Vladivostok', 'Asia/Yakutsk', 'Asia/Yangon', 'Asia/Yekaterinburg', 'Asia/Yerevan', 'Atlantic/Azores', 'Atlantic/Bermuda', 'Atlantic/Canary', 'Atlantic/Cape_Verde', 'Atlantic/Faeroe', 'Atlantic/Faroe', 'Atlantic/Jan_Mayen', 'Atlantic/Madeira', 'Atlantic/Reykjavik', 'Atlantic/South_Georgia', 'Atlantic/St_Helena', 'Atlantic/Stanley', 'Australia/ACT', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Broken_Hill', 'Australia/Canberra', 'Australia/Currie', 'Australia/Darwin', 'Australia/Eucla', 'Australia/Hobart', 'Australia/LHI', 'Australia/Lindeman', 'Australia/Lord_Howe', 'Australia/Melbourne', 'Australia/NSW', 'Australia/North', 'Australia/Perth', 'Australia/Queensland', 'Australia/South', 'Australia/Sydney', 'Australia/Tasmania', 'Australia/Victoria', 'Australia/West', 'Australia/Yancowinna', 'Brazil/Acre', 'Brazil/DeNoronha', 'Brazil/East', 'Brazil/West', 'CET', 'CST6CDT', 'Canada/Atlantic', 'Canada/Central', 'Canada/Eastern', 'Canada/Mountain', 'Canada/Newfoundland', 'Canada/Pacific', 'Canada/Saskatchewan', 'Canada/Yukon', 'Chile/Continental', 'Chile/EasterIsland', 'Cuba', 'EET', 'EST', 'EST5EDT', 'Egypt', 'Eire', 'Etc/GMT', 'Etc/GMT+0', 'Etc/GMT+1', 'Etc/GMT+10', 'Etc/GMT+11', 'Etc/GMT+12', 'Etc/GMT+2', 'Etc/GMT+3', 'Etc/GMT+4', 'Etc/GMT+5', 'Etc/GMT+6', 'Etc/GMT+7', 'Etc/GMT+8', 'Etc/GMT+9', 'Etc/GMT-0', 'Etc/GMT-1', 'Etc/GMT-10', 'Etc/GMT-11', 'Etc/GMT-12', 'Etc/GMT-13', 'Etc/GMT-14', 'Etc/GMT-2', 'Etc/GMT-3', 'Etc/GMT-4', 'Etc/GMT-5', 'Etc/GMT-6', 'Etc/GMT-7', 'Etc/GMT-8', 'Etc/GMT-9', 'Etc/GMT0', 'Etc/Greenwich', 'Etc/UCT', 'Etc/UTC', 'Etc/Universal', 'Etc/Zulu', 'Europe/Amsterdam', 'Europe/Andorra', 'Europe/Astrakhan', 'Europe/Athens', 'Europe/Belfast', 'Europe/Belgrade', 'Europe/Berlin', 'Europe/Bratislava', 'Europe/Brussels', 'Europe/Bucharest', 'Europe/Budapest', 'Europe/Busingen', 'Europe/Chisinau', 'Europe/Copenhagen', 'Europe/Dublin', 'Europe/Gibraltar', 'Europe/Guernsey', 'Europe/Helsinki', 'Europe/Isle_of_Man', 'Europe/Istanbul', 'Europe/Jersey', 'Europe/Kaliningrad', 'Europe/Kiev', 'Europe/Kirov', 'Europe/Kyiv', 'Europe/Lisbon', 'Europe/Ljubljana', 'Europe/London', 'Europe/Luxembourg', 'Europe/Madrid', 'Europe/Malta', 'Europe/Mariehamn', 'Europe/Minsk', 'Europe/Monaco', 'Europe/Moscow', 'Europe/Nicosia', 'Europe/Oslo', 'Europe/Paris', 'Europe/Podgorica', 'Europe/Prague', 'Europe/Riga', 'Europe/Rome', 'Europe/Samara', 'Europe/San_Marino', 'Europe/Sarajevo', 'Europe/Saratov', 'Europe/Simferopol', 'Europe/Skopje', 'Europe/Sofia', 'Europe/Stockholm', 'Europe/Tallinn', 'Europe/Tirane', 'Europe/Tiraspol', 'Europe/Ulyanovsk', 'Europe/Uzhgorod', 'Europe/Vaduz', 'Europe/Vatican', 'Europe/Vienna', 'Europe/Vilnius', 'Europe/Volgograd', 'Europe/Warsaw', 'Europe/Zagreb', 'Europe/Zaporozhye', 'Europe/Zurich', 'Factory', 'GB', 'GB-Eire', 'GMT', 'GMT+0', 'GMT-0', 'GMT0', 'Greenwich', 'HST', 'Hongkong', 'Iceland', 'Indian/Antananarivo', 'Indian/Chagos', 'Indian/Christmas', 'Indian/Cocos', 'Indian/Comoro', 'Indian/Kerguelen', 'Indian/Mahe', 'Indian/Maldives', 'Indian/Mauritius', 'Indian/Mayotte', 'Indian/Reunion', 'Iran', 'Israel', 'Jamaica', 'Japan', 'Kwajalein', 'Libya', 'MET', 'MST', 'MST7MDT', 'Mexico/BajaNorte', 'Mexico/BajaSur', 'Mexico/General', 'NZ', 'NZ-CHAT', 'Navajo', 'PRC', 'PST8PDT', 'Pacific/Apia', 'Pacific/Auckland', 'Pacific/Bougainville', 'Pacific/Chatham', 'Pacific/Chuuk', 'Pacific/Easter', 'Pacific/Efate', 'Pacific/Enderbury', 'Pacific/Fakaofo', 'Pacific/Fiji', 'Pacific/Funafuti', 'Pacific/Galapagos', 'Pacific/Gambier', 'Pacific/Guadalcanal', 'Pacific/Guam', 'Pacific/Honolulu', 'Pacific/Johnston', 'Pacific/Kanton', 'Pacific/Kiritimati', 'Pacific/Kosrae', 'Pacific/Kwajalein', 'Pacific/Majuro', 'Pacific/Marquesas', 'Pacific/Midway', 'Pacific/Nauru', 'Pacific/Niue', 'Pacific/Norfolk', 'Pacific/Noumea', 'Pacific/Pago_Pago', 'Pacific/Palau', 'Pacific/Pitcairn', 'Pacific/Pohnpei', 'Pacific/Ponape', 'Pacific/Port_Moresby', 'Pacific/Rarotonga', 'Pacific/Saipan', 'Pacific/Samoa', 'Pacific/Tahiti', 'Pacific/Tarawa', 'Pacific/Tongatapu', 'Pacific/Truk', 'Pacific/Wake', 'Pacific/Wallis', 'Pacific/Yap', 'Poland', 'Portugal', 'ROC', 'ROK', 'Singapore', 'Turkey', 'UCT', 'US/Alaska', 'US/Aleutian', 'US/Arizona', 'US/Central', 'US/East-Indiana', 'US/Eastern', 'US/Hawaii', 'US/Indiana-Starke', 'US/Michigan', 'US/Mountain', 'US/Pacific', 'US/Pacific-New', 'US/Samoa', 'UTC', 'Universal', 'W-SU', 'WET', 'Zulu']|str" ] diff --git a/stripe/params/tax/_certificate_create_params.py b/stripe/params/tax/_certificate_create_params.py index e13fe4466..bb03a4835 100644 --- a/stripe/params/tax/_certificate_create_params.py +++ b/stripe/params/tax/_certificate_create_params.py @@ -12,9 +12,9 @@ class CertificateCreateParams(RequestOptions): """ file: str """ - The ID of a file uploaded with purpose `tax_certificate`. + The ID of a [file](https://docs.stripe.com/api/files/object) uploaded with purpose `tax_certificate`. The file must belong to the same account and mode as the tax exemption. You can't use a deleted file or a file attached to another certificate that hasn't been deleted. """ tax_exemption: str """ - The ID of an existing tax exemption. + The ID of an existing [customer tax exemption](https://docs.stripe.com/api/tax/exemptions/object) that hasn't been deleted. """ diff --git a/stripe/params/tax/_certificate_list_params.py b/stripe/params/tax/_certificate_list_params.py index 2507ab666..5bc3cfbee 100644 --- a/stripe/params/tax/_certificate_list_params.py +++ b/stripe/params/tax/_certificate_list_params.py @@ -24,5 +24,5 @@ class CertificateListParams(RequestOptions): """ tax_exemption: str """ - The ID of an existing tax exemption. + The ID of the [customer tax exemption](https://docs.stripe.com/api/tax/exemptions/object) whose certificates to list. The tax exemption must not be deleted. """ diff --git a/stripe/params/test_helpers/treasury/__init__.py b/stripe/params/test_helpers/treasury/__init__.py index 2f45ae0e7..a216e5cb0 100644 --- a/stripe/params/test_helpers/treasury/__init__.py +++ b/stripe/params/test_helpers/treasury/__init__.py @@ -7,9 +7,14 @@ from stripe.params.test_helpers.treasury._inbound_transfer_fail_params import ( InboundTransferFailParams as InboundTransferFailParams, InboundTransferFailParamsFailureDetails as InboundTransferFailParamsFailureDetails, + InboundTransferFailParamsFailureDetailsNetworkDetails as InboundTransferFailParamsFailureDetailsNetworkDetails, + InboundTransferFailParamsFailureDetailsNetworkDetailsAch as InboundTransferFailParamsFailureDetailsNetworkDetailsAch, ) from stripe.params.test_helpers.treasury._inbound_transfer_return_inbound_transfer_params import ( InboundTransferReturnInboundTransferParams as InboundTransferReturnInboundTransferParams, + InboundTransferReturnInboundTransferParamsFailureDetails as InboundTransferReturnInboundTransferParamsFailureDetails, + InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails as InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails, + InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch as InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch, ) from stripe.params.test_helpers.treasury._inbound_transfer_succeed_params import ( InboundTransferSucceedParams as InboundTransferSucceedParams, @@ -71,10 +76,30 @@ "stripe.params.test_helpers.treasury._inbound_transfer_fail_params", False, ), + "InboundTransferFailParamsFailureDetailsNetworkDetails": ( + "stripe.params.test_helpers.treasury._inbound_transfer_fail_params", + False, + ), + "InboundTransferFailParamsFailureDetailsNetworkDetailsAch": ( + "stripe.params.test_helpers.treasury._inbound_transfer_fail_params", + False, + ), "InboundTransferReturnInboundTransferParams": ( "stripe.params.test_helpers.treasury._inbound_transfer_return_inbound_transfer_params", False, ), + "InboundTransferReturnInboundTransferParamsFailureDetails": ( + "stripe.params.test_helpers.treasury._inbound_transfer_return_inbound_transfer_params", + False, + ), + "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails": ( + "stripe.params.test_helpers.treasury._inbound_transfer_return_inbound_transfer_params", + False, + ), + "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch": ( + "stripe.params.test_helpers.treasury._inbound_transfer_return_inbound_transfer_params", + False, + ), "InboundTransferSucceedParams": ( "stripe.params.test_helpers.treasury._inbound_transfer_succeed_params", False, diff --git a/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py b/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py index 515241848..fbf7f9ade 100644 --- a/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py +++ b/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py @@ -22,3 +22,29 @@ class InboundTransferFailParamsFailureDetails(TypedDict): """ Reason for the failure. """ + network_details: NotRequired[ + "InboundTransferFailParamsFailureDetailsNetworkDetails" + ] + """ + Network specific details for the failure. + """ + + +class InboundTransferFailParamsFailureDetailsNetworkDetails(TypedDict): + ach: NotRequired[ + "InboundTransferFailParamsFailureDetailsNetworkDetailsAch" + ] + """ + ACH network failure details. + """ + type: Literal["ach"] + """ + The network used to transfer funds. + """ + + +class InboundTransferFailParamsFailureDetailsNetworkDetailsAch(TypedDict): + return_code: str + """ + NACHA ACH return code. + """ diff --git a/stripe/params/test_helpers/treasury/_inbound_transfer_return_inbound_transfer_params.py b/stripe/params/test_helpers/treasury/_inbound_transfer_return_inbound_transfer_params.py index 1a61dde96..30540f01e 100644 --- a/stripe/params/test_helpers/treasury/_inbound_transfer_return_inbound_transfer_params.py +++ b/stripe/params/test_helpers/treasury/_inbound_transfer_return_inbound_transfer_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from typing import List -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Literal, NotRequired, TypedDict class InboundTransferReturnInboundTransferParams(TypedDict): @@ -9,3 +9,48 @@ class InboundTransferReturnInboundTransferParams(TypedDict): """ Specifies which fields in the response should be expanded. """ + failure_details: NotRequired[ + "InboundTransferReturnInboundTransferParamsFailureDetails" + ] + """ + Details about a returned InboundTransfer. + """ + + +class InboundTransferReturnInboundTransferParamsFailureDetails(TypedDict): + code: NotRequired[ + "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'debit_not_authorized', 'incorrect_account_holder_address', 'incorrect_account_holder_name', 'incorrect_account_holder_tax_id', 'insufficient_funds', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']|str" + ] + """ + Reason for the failure. + """ + network_details: NotRequired[ + "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails" + ] + """ + Network specific details for the failure. + """ + + +class InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails( + TypedDict, +): + ach: NotRequired[ + "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch" + ] + """ + ACH network failure details. + """ + type: Literal["ach"] + """ + The network used to transfer funds. + """ + + +class InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch( + TypedDict, +): + return_code: str + """ + NACHA ACH return code. + """ diff --git a/stripe/params/treasury/__init__.py b/stripe/params/treasury/__init__.py index dafa58ab4..50dda35e3 100644 --- a/stripe/params/treasury/__init__.py +++ b/stripe/params/treasury/__init__.py @@ -139,6 +139,8 @@ from stripe.params.treasury._inbound_transfer_fail_params import ( InboundTransferFailParams as InboundTransferFailParams, InboundTransferFailParamsFailureDetails as InboundTransferFailParamsFailureDetails, + InboundTransferFailParamsFailureDetailsNetworkDetails as InboundTransferFailParamsFailureDetailsNetworkDetails, + InboundTransferFailParamsFailureDetailsNetworkDetailsAch as InboundTransferFailParamsFailureDetailsNetworkDetailsAch, ) from stripe.params.treasury._inbound_transfer_list_params import ( InboundTransferListParams as InboundTransferListParams, @@ -148,6 +150,9 @@ ) from stripe.params.treasury._inbound_transfer_return_inbound_transfer_params import ( InboundTransferReturnInboundTransferParams as InboundTransferReturnInboundTransferParams, + InboundTransferReturnInboundTransferParamsFailureDetails as InboundTransferReturnInboundTransferParamsFailureDetails, + InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails as InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails, + InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch as InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch, ) from stripe.params.treasury._inbound_transfer_succeed_params import ( InboundTransferSucceedParams as InboundTransferSucceedParams, @@ -661,6 +666,14 @@ "stripe.params.treasury._inbound_transfer_fail_params", False, ), + "InboundTransferFailParamsFailureDetailsNetworkDetails": ( + "stripe.params.treasury._inbound_transfer_fail_params", + False, + ), + "InboundTransferFailParamsFailureDetailsNetworkDetailsAch": ( + "stripe.params.treasury._inbound_transfer_fail_params", + False, + ), "InboundTransferListParams": ( "stripe.params.treasury._inbound_transfer_list_params", False, @@ -673,6 +686,18 @@ "stripe.params.treasury._inbound_transfer_return_inbound_transfer_params", False, ), + "InboundTransferReturnInboundTransferParamsFailureDetails": ( + "stripe.params.treasury._inbound_transfer_return_inbound_transfer_params", + False, + ), + "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails": ( + "stripe.params.treasury._inbound_transfer_return_inbound_transfer_params", + False, + ), + "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch": ( + "stripe.params.treasury._inbound_transfer_return_inbound_transfer_params", + False, + ), "InboundTransferSucceedParams": ( "stripe.params.treasury._inbound_transfer_succeed_params", False, diff --git a/stripe/params/treasury/_inbound_transfer_fail_params.py b/stripe/params/treasury/_inbound_transfer_fail_params.py index 02f8bb4fc..16f8284f6 100644 --- a/stripe/params/treasury/_inbound_transfer_fail_params.py +++ b/stripe/params/treasury/_inbound_transfer_fail_params.py @@ -23,3 +23,29 @@ class InboundTransferFailParamsFailureDetails(TypedDict): """ Reason for the failure. """ + network_details: NotRequired[ + "InboundTransferFailParamsFailureDetailsNetworkDetails" + ] + """ + Network specific details for the failure. + """ + + +class InboundTransferFailParamsFailureDetailsNetworkDetails(TypedDict): + ach: NotRequired[ + "InboundTransferFailParamsFailureDetailsNetworkDetailsAch" + ] + """ + ACH network failure details. + """ + type: Literal["ach"] + """ + The network used to transfer funds. + """ + + +class InboundTransferFailParamsFailureDetailsNetworkDetailsAch(TypedDict): + return_code: str + """ + NACHA ACH return code. + """ diff --git a/stripe/params/treasury/_inbound_transfer_return_inbound_transfer_params.py b/stripe/params/treasury/_inbound_transfer_return_inbound_transfer_params.py index ada9cdfae..6f36ab78b 100644 --- a/stripe/params/treasury/_inbound_transfer_return_inbound_transfer_params.py +++ b/stripe/params/treasury/_inbound_transfer_return_inbound_transfer_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, TypedDict class InboundTransferReturnInboundTransferParams(RequestOptions): @@ -10,3 +10,48 @@ class InboundTransferReturnInboundTransferParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + failure_details: NotRequired[ + "InboundTransferReturnInboundTransferParamsFailureDetails" + ] + """ + Details about a returned InboundTransfer. + """ + + +class InboundTransferReturnInboundTransferParamsFailureDetails(TypedDict): + code: NotRequired[ + "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'debit_not_authorized', 'incorrect_account_holder_address', 'incorrect_account_holder_name', 'incorrect_account_holder_tax_id', 'insufficient_funds', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']|str" + ] + """ + Reason for the failure. + """ + network_details: NotRequired[ + "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails" + ] + """ + Network specific details for the failure. + """ + + +class InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails( + TypedDict, +): + ach: NotRequired[ + "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch" + ] + """ + ACH network failure details. + """ + type: Literal["ach"] + """ + The network used to transfer funds. + """ + + +class InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch( + TypedDict, +): + return_code: str + """ + NACHA ACH return code. + """ diff --git a/stripe/params/v2/billing/__init__.py b/stripe/params/v2/billing/__init__.py index f40410c02..927ea503b 100644 --- a/stripe/params/v2/billing/__init__.py +++ b/stripe/params/v2/billing/__init__.py @@ -6,9 +6,9 @@ if TYPE_CHECKING: from stripe.params.v2.billing import ( bill_settings as bill_settings, - cadences as cadences, collection_settings as collection_settings, contracts as contracts, + groups as groups, intents as intents, license_fees as license_fees, pricing_plans as pricing_plans, @@ -34,39 +34,6 @@ BillSettingUpdateParamsInvoice as BillSettingUpdateParamsInvoice, BillSettingUpdateParamsInvoiceTimeUntilDue as BillSettingUpdateParamsInvoiceTimeUntilDue, ) - from stripe.params.v2.billing._cadence_cancel_params import ( - CadenceCancelParams as CadenceCancelParams, - ) - from stripe.params.v2.billing._cadence_create_params import ( - CadenceCreateParams as CadenceCreateParams, - CadenceCreateParamsBillingCycle as CadenceCreateParamsBillingCycle, - CadenceCreateParamsBillingCycleDay as CadenceCreateParamsBillingCycleDay, - CadenceCreateParamsBillingCycleDayTime as CadenceCreateParamsBillingCycleDayTime, - CadenceCreateParamsBillingCycleMonth as CadenceCreateParamsBillingCycleMonth, - CadenceCreateParamsBillingCycleMonthTime as CadenceCreateParamsBillingCycleMonthTime, - CadenceCreateParamsBillingCycleWeek as CadenceCreateParamsBillingCycleWeek, - CadenceCreateParamsBillingCycleWeekTime as CadenceCreateParamsBillingCycleWeekTime, - CadenceCreateParamsBillingCycleYear as CadenceCreateParamsBillingCycleYear, - CadenceCreateParamsBillingCycleYearTime as CadenceCreateParamsBillingCycleYearTime, - CadenceCreateParamsPayer as CadenceCreateParamsPayer, - CadenceCreateParamsSettings as CadenceCreateParamsSettings, - CadenceCreateParamsSettingsBill as CadenceCreateParamsSettingsBill, - CadenceCreateParamsSettingsCollection as CadenceCreateParamsSettingsCollection, - ) - from stripe.params.v2.billing._cadence_list_params import ( - CadenceListParams as CadenceListParams, - CadenceListParamsPayer as CadenceListParamsPayer, - ) - from stripe.params.v2.billing._cadence_retrieve_params import ( - CadenceRetrieveParams as CadenceRetrieveParams, - ) - from stripe.params.v2.billing._cadence_update_params import ( - CadenceUpdateParams as CadenceUpdateParams, - CadenceUpdateParamsPayer as CadenceUpdateParamsPayer, - CadenceUpdateParamsSettings as CadenceUpdateParamsSettings, - CadenceUpdateParamsSettingsBill as CadenceUpdateParamsSettingsBill, - CadenceUpdateParamsSettingsCollection as CadenceUpdateParamsSettingsCollection, - ) from stripe.params.v2.billing._collection_setting_create_params import ( CollectionSettingCreateParams as CollectionSettingCreateParams, CollectionSettingCreateParamsEmailDelivery as CollectionSettingCreateParamsEmailDelivery, @@ -116,7 +83,6 @@ ) from stripe.params.v2.billing._contract_cancel_params import ( ContractCancelParams as ContractCancelParams, - ContractCancelParamsCancelPricingLine as ContractCancelParamsCancelPricingLine, ContractCancelParamsTerm as ContractCancelParamsTerm, ContractCancelParamsTermTerm as ContractCancelParamsTermTerm, ) @@ -132,32 +98,7 @@ ContractCreateParamsBillingSettingsBillSettingsDetailsInvoiceTimeUntilDue as ContractCreateParamsBillingSettingsBillSettingsDetailsInvoiceTimeUntilDue, ContractCreateParamsBillingSettingsBillingProfileDetails as ContractCreateParamsBillingSettingsBillingProfileDetails, ContractCreateParamsBillingSettingsCollectionSettingsDetails as ContractCreateParamsBillingSettingsCollectionSettingsDetails, - ContractCreateParamsOneTimeFee as ContractCreateParamsOneTimeFee, - ContractCreateParamsOneTimeFeeBillAt as ContractCreateParamsOneTimeFeeBillAt, - ContractCreateParamsPricingLine as ContractCreateParamsPricingLine, - ContractCreateParamsPricingLineEndsAt as ContractCreateParamsPricingLineEndsAt, - ContractCreateParamsPricingLinePricing as ContractCreateParamsPricingLinePricing, - ContractCreateParamsPricingLinePricingPriceDetails as ContractCreateParamsPricingLinePricingPriceDetails, - ContractCreateParamsPricingLinePricingPriceDetailsPricingOverride as ContractCreateParamsPricingLinePricingPriceDetailsPricingOverride, - ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideEndsAt as ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideEndsAt, - ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideOverwritePrice as ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideOverwritePrice, - ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideStartsAt as ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideStartsAt, - ContractCreateParamsPricingLinePricingPriceDetailsQuantityChange as ContractCreateParamsPricingLinePricingPriceDetailsQuantityChange, - ContractCreateParamsPricingLinePricingPriceDetailsQuantityChangeEffectiveAt as ContractCreateParamsPricingLinePricingPriceDetailsQuantityChangeEffectiveAt, - ContractCreateParamsPricingLineStartsAt as ContractCreateParamsPricingLineStartsAt, - ContractCreateParamsPricingOverride as ContractCreateParamsPricingOverride, - ContractCreateParamsPricingOverrideEndsAt as ContractCreateParamsPricingOverrideEndsAt, - ContractCreateParamsPricingOverrideMultiplyPricing as ContractCreateParamsPricingOverrideMultiplyPricing, - ContractCreateParamsPricingOverrideMultiplyPricingCriterion as ContractCreateParamsPricingOverrideMultiplyPricingCriterion, - ContractCreateParamsPricingOverrideStartsAt as ContractCreateParamsPricingOverrideStartsAt, ContractCreateParamsTerm as ContractCreateParamsTerm, - ContractCreateParamsTermAdHocProduct as ContractCreateParamsTermAdHocProduct, - ContractCreateParamsTermAdHocProductBillSchedule as ContractCreateParamsTermAdHocProductBillSchedule, - ContractCreateParamsTermAdHocProductBillScheduleCustom as ContractCreateParamsTermAdHocProductBillScheduleCustom, - ContractCreateParamsTermAdHocProductBillScheduleCustomBillAt as ContractCreateParamsTermAdHocProductBillScheduleCustomBillAt, - ContractCreateParamsTermAdHocProductServicePeriod as ContractCreateParamsTermAdHocProductServicePeriod, - ContractCreateParamsTermAdHocProductServicePeriodEndsAt as ContractCreateParamsTermAdHocProductServicePeriodEndsAt, - ContractCreateParamsTermAdHocProductServicePeriodStartsAt as ContractCreateParamsTermAdHocProductServicePeriodStartsAt, ContractCreateParamsTermPricingOverride as ContractCreateParamsTermPricingOverride, ContractCreateParamsTermPricingOverrideCriterion as ContractCreateParamsTermPricingOverrideCriterion, ContractCreateParamsTermPricingOverrideCriterionTerm as ContractCreateParamsTermPricingOverrideCriterionTerm, @@ -168,6 +109,13 @@ ContractCreateParamsTermRecurringPrice as ContractCreateParamsTermRecurringPrice, ContractCreateParamsTermRecurringPriceEndsAt as ContractCreateParamsTermRecurringPriceEndsAt, ContractCreateParamsTermRecurringPriceStartsAt as ContractCreateParamsTermRecurringPriceStartsAt, + ContractCreateParamsTermScheduledFee as ContractCreateParamsTermScheduledFee, + ContractCreateParamsTermScheduledFeeBillSchedule as ContractCreateParamsTermScheduledFeeBillSchedule, + ContractCreateParamsTermScheduledFeeBillScheduleCustom as ContractCreateParamsTermScheduledFeeBillScheduleCustom, + ContractCreateParamsTermScheduledFeeBillScheduleCustomBillAt as ContractCreateParamsTermScheduledFeeBillScheduleCustomBillAt, + ContractCreateParamsTermScheduledFeeServicePeriod as ContractCreateParamsTermScheduledFeeServicePeriod, + ContractCreateParamsTermScheduledFeeServicePeriodEndsAt as ContractCreateParamsTermScheduledFeeServicePeriodEndsAt, + ContractCreateParamsTermScheduledFeeServicePeriodStartsAt as ContractCreateParamsTermScheduledFeeServicePeriodStartsAt, ) from stripe.params.v2.billing._contract_delete_params import ( ContractDeleteParams as ContractDeleteParams, @@ -182,13 +130,6 @@ ContractUpdateParams as ContractUpdateParams, ContractUpdateParamsAction as ContractUpdateParamsAction, ContractUpdateParamsActionAddTerm as ContractUpdateParamsActionAddTerm, - ContractUpdateParamsActionAddTermAdHocProduct as ContractUpdateParamsActionAddTermAdHocProduct, - ContractUpdateParamsActionAddTermAdHocProductBillSchedule as ContractUpdateParamsActionAddTermAdHocProductBillSchedule, - ContractUpdateParamsActionAddTermAdHocProductBillScheduleCustom as ContractUpdateParamsActionAddTermAdHocProductBillScheduleCustom, - ContractUpdateParamsActionAddTermAdHocProductBillScheduleCustomBillAt as ContractUpdateParamsActionAddTermAdHocProductBillScheduleCustomBillAt, - ContractUpdateParamsActionAddTermAdHocProductServicePeriod as ContractUpdateParamsActionAddTermAdHocProductServicePeriod, - ContractUpdateParamsActionAddTermAdHocProductServicePeriodEndsAt as ContractUpdateParamsActionAddTermAdHocProductServicePeriodEndsAt, - ContractUpdateParamsActionAddTermAdHocProductServicePeriodStartsAt as ContractUpdateParamsActionAddTermAdHocProductServicePeriodStartsAt, ContractUpdateParamsActionAddTermPricingOverride as ContractUpdateParamsActionAddTermPricingOverride, ContractUpdateParamsActionAddTermPricingOverrideCriterion as ContractUpdateParamsActionAddTermPricingOverrideCriterion, ContractUpdateParamsActionAddTermPricingOverrideCriterionTerm as ContractUpdateParamsActionAddTermPricingOverrideCriterionTerm, @@ -199,22 +140,29 @@ ContractUpdateParamsActionAddTermRecurringPrice as ContractUpdateParamsActionAddTermRecurringPrice, ContractUpdateParamsActionAddTermRecurringPriceEndsAt as ContractUpdateParamsActionAddTermRecurringPriceEndsAt, ContractUpdateParamsActionAddTermRecurringPriceStartsAt as ContractUpdateParamsActionAddTermRecurringPriceStartsAt, + ContractUpdateParamsActionAddTermScheduledFee as ContractUpdateParamsActionAddTermScheduledFee, + ContractUpdateParamsActionAddTermScheduledFeeBillSchedule as ContractUpdateParamsActionAddTermScheduledFeeBillSchedule, + ContractUpdateParamsActionAddTermScheduledFeeBillScheduleCustom as ContractUpdateParamsActionAddTermScheduledFeeBillScheduleCustom, + ContractUpdateParamsActionAddTermScheduledFeeBillScheduleCustomBillAt as ContractUpdateParamsActionAddTermScheduledFeeBillScheduleCustomBillAt, + ContractUpdateParamsActionAddTermScheduledFeeServicePeriod as ContractUpdateParamsActionAddTermScheduledFeeServicePeriod, + ContractUpdateParamsActionAddTermScheduledFeeServicePeriodEndsAt as ContractUpdateParamsActionAddTermScheduledFeeServicePeriodEndsAt, + ContractUpdateParamsActionAddTermScheduledFeeServicePeriodStartsAt as ContractUpdateParamsActionAddTermScheduledFeeServicePeriodStartsAt, ContractUpdateParamsActionRemoveTerm as ContractUpdateParamsActionRemoveTerm, ContractUpdateParamsActionRemoveTermTerm as ContractUpdateParamsActionRemoveTermTerm, ContractUpdateParamsActionUpdateTerm as ContractUpdateParamsActionUpdateTerm, - ContractUpdateParamsActionUpdateTermAdHocProduct as ContractUpdateParamsActionUpdateTermAdHocProduct, - ContractUpdateParamsActionUpdateTermAdHocProductBillSchedule as ContractUpdateParamsActionUpdateTermAdHocProductBillSchedule, - ContractUpdateParamsActionUpdateTermAdHocProductBillScheduleCustom as ContractUpdateParamsActionUpdateTermAdHocProductBillScheduleCustom, - ContractUpdateParamsActionUpdateTermAdHocProductBillScheduleCustomBillAt as ContractUpdateParamsActionUpdateTermAdHocProductBillScheduleCustomBillAt, - ContractUpdateParamsActionUpdateTermAdHocProductServicePeriod as ContractUpdateParamsActionUpdateTermAdHocProductServicePeriod, - ContractUpdateParamsActionUpdateTermAdHocProductServicePeriodEndsAt as ContractUpdateParamsActionUpdateTermAdHocProductServicePeriodEndsAt, - ContractUpdateParamsActionUpdateTermAdHocProductServicePeriodStartsAt as ContractUpdateParamsActionUpdateTermAdHocProductServicePeriodStartsAt, ContractUpdateParamsActionUpdateTermPricingOverride as ContractUpdateParamsActionUpdateTermPricingOverride, ContractUpdateParamsActionUpdateTermPricingOverrideEndsAt as ContractUpdateParamsActionUpdateTermPricingOverrideEndsAt, ContractUpdateParamsActionUpdateTermPricingOverrideStartsAt as ContractUpdateParamsActionUpdateTermPricingOverrideStartsAt, ContractUpdateParamsActionUpdateTermRecurringPrice as ContractUpdateParamsActionUpdateTermRecurringPrice, ContractUpdateParamsActionUpdateTermRecurringPriceEndsAt as ContractUpdateParamsActionUpdateTermRecurringPriceEndsAt, ContractUpdateParamsActionUpdateTermRecurringPriceStartsAt as ContractUpdateParamsActionUpdateTermRecurringPriceStartsAt, + ContractUpdateParamsActionUpdateTermScheduledFee as ContractUpdateParamsActionUpdateTermScheduledFee, + ContractUpdateParamsActionUpdateTermScheduledFeeBillSchedule as ContractUpdateParamsActionUpdateTermScheduledFeeBillSchedule, + ContractUpdateParamsActionUpdateTermScheduledFeeBillScheduleCustom as ContractUpdateParamsActionUpdateTermScheduledFeeBillScheduleCustom, + ContractUpdateParamsActionUpdateTermScheduledFeeBillScheduleCustomBillAt as ContractUpdateParamsActionUpdateTermScheduledFeeBillScheduleCustomBillAt, + ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriod as ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriod, + ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriodEndsAt as ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriodEndsAt, + ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriodStartsAt as ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriodStartsAt, ContractUpdateParamsActionUpdateTermTerm as ContractUpdateParamsActionUpdateTermTerm, ContractUpdateParamsBillingSettings as ContractUpdateParamsBillingSettings, ContractUpdateParamsBillingSettingsBillSettingsDetails as ContractUpdateParamsBillingSettingsBillSettingsDetails, @@ -224,52 +172,6 @@ ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoiceTimeUntilDue as ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoiceTimeUntilDue, ContractUpdateParamsBillingSettingsBillingProfileDetails as ContractUpdateParamsBillingSettingsBillingProfileDetails, ContractUpdateParamsBillingSettingsCollectionSettingsDetails as ContractUpdateParamsBillingSettingsCollectionSettingsDetails, - ContractUpdateParamsOneTimeFeeAction as ContractUpdateParamsOneTimeFeeAction, - ContractUpdateParamsOneTimeFeeActionAdd as ContractUpdateParamsOneTimeFeeActionAdd, - ContractUpdateParamsOneTimeFeeActionAddBillAt as ContractUpdateParamsOneTimeFeeActionAddBillAt, - ContractUpdateParamsOneTimeFeeActionRemove as ContractUpdateParamsOneTimeFeeActionRemove, - ContractUpdateParamsOneTimeFeeActionUpdate as ContractUpdateParamsOneTimeFeeActionUpdate, - ContractUpdateParamsOneTimeFeeActionUpdateBillAt as ContractUpdateParamsOneTimeFeeActionUpdateBillAt, - ContractUpdateParamsPricingLineAction as ContractUpdateParamsPricingLineAction, - ContractUpdateParamsPricingLineActionAdd as ContractUpdateParamsPricingLineActionAdd, - ContractUpdateParamsPricingLineActionAddEndsAt as ContractUpdateParamsPricingLineActionAddEndsAt, - ContractUpdateParamsPricingLineActionAddPricing as ContractUpdateParamsPricingLineActionAddPricing, - ContractUpdateParamsPricingLineActionAddPricingPriceDetails as ContractUpdateParamsPricingLineActionAddPricingPriceDetails, - ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverride as ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverride, - ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideEndsAt as ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideEndsAt, - ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideOverwritePrice as ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideOverwritePrice, - ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideStartsAt as ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideStartsAt, - ContractUpdateParamsPricingLineActionAddPricingPriceDetailsQuantityChange as ContractUpdateParamsPricingLineActionAddPricingPriceDetailsQuantityChange, - ContractUpdateParamsPricingLineActionAddPricingPriceDetailsQuantityChangeEffectiveAt as ContractUpdateParamsPricingLineActionAddPricingPriceDetailsQuantityChangeEffectiveAt, - ContractUpdateParamsPricingLineActionAddStartsAt as ContractUpdateParamsPricingLineActionAddStartsAt, - ContractUpdateParamsPricingLineActionRemove as ContractUpdateParamsPricingLineActionRemove, - ContractUpdateParamsPricingLineActionUpdate as ContractUpdateParamsPricingLineActionUpdate, - ContractUpdateParamsPricingLineActionUpdateEndsAt as ContractUpdateParamsPricingLineActionUpdateEndsAt, - ContractUpdateParamsPricingLineActionUpdatePricing as ContractUpdateParamsPricingLineActionUpdatePricing, - ContractUpdateParamsPricingLineActionUpdatePricingPriceDetails as ContractUpdateParamsPricingLineActionUpdatePricingPriceDetails, - ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideAction as ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideAction, - ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAdd as ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAdd, - ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddEndsAt as ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddEndsAt, - ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddOverwritePrice as ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddOverwritePrice, - ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddStartsAt as ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddStartsAt, - ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionRemove as ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionRemove, - ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdate as ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdate, - ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdateEndsAt as ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdateEndsAt, - ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdateStartsAt as ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdateStartsAt, - ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsQuantityChange as ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsQuantityChange, - ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsQuantityChangeEffectiveAt as ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsQuantityChangeEffectiveAt, - ContractUpdateParamsPricingLineActionUpdateStartsAt as ContractUpdateParamsPricingLineActionUpdateStartsAt, - ContractUpdateParamsPricingOverrideAction as ContractUpdateParamsPricingOverrideAction, - ContractUpdateParamsPricingOverrideActionAdd as ContractUpdateParamsPricingOverrideActionAdd, - ContractUpdateParamsPricingOverrideActionAddEndsAt as ContractUpdateParamsPricingOverrideActionAddEndsAt, - ContractUpdateParamsPricingOverrideActionAddMultiplyPricing as ContractUpdateParamsPricingOverrideActionAddMultiplyPricing, - ContractUpdateParamsPricingOverrideActionAddMultiplyPricingCriterion as ContractUpdateParamsPricingOverrideActionAddMultiplyPricingCriterion, - ContractUpdateParamsPricingOverrideActionAddOverwritePrice as ContractUpdateParamsPricingOverrideActionAddOverwritePrice, - ContractUpdateParamsPricingOverrideActionAddStartsAt as ContractUpdateParamsPricingOverrideActionAddStartsAt, - ContractUpdateParamsPricingOverrideActionRemove as ContractUpdateParamsPricingOverrideActionRemove, - ContractUpdateParamsPricingOverrideActionUpdate as ContractUpdateParamsPricingOverrideActionUpdate, - ContractUpdateParamsPricingOverrideActionUpdateEndsAt as ContractUpdateParamsPricingOverrideActionUpdateEndsAt, - ContractUpdateParamsPricingOverrideActionUpdateStartsAt as ContractUpdateParamsPricingOverrideActionUpdateStartsAt, ) from stripe.params.v2.billing._custom_pricing_unit_create_params import ( CustomPricingUnitCreateParams as CustomPricingUnitCreateParams, @@ -283,6 +185,71 @@ from stripe.params.v2.billing._custom_pricing_unit_update_params import ( CustomPricingUnitUpdateParams as CustomPricingUnitUpdateParams, ) + from stripe.params.v2.billing._group_cancel_params import ( + GroupCancelParams as GroupCancelParams, + ) + from stripe.params.v2.billing._group_create_params import ( + GroupCreateParams as GroupCreateParams, + GroupCreateParamsBillingSettings as GroupCreateParamsBillingSettings, + GroupCreateParamsBillingSettingsEmailDelivery as GroupCreateParamsBillingSettingsEmailDelivery, + GroupCreateParamsBillingSettingsEmailDeliveryPaymentDue as GroupCreateParamsBillingSettingsEmailDeliveryPaymentDue, + GroupCreateParamsBillingSettingsInvoicePresentation as GroupCreateParamsBillingSettingsInvoicePresentation, + GroupCreateParamsBillingSettingsInvoiceTimeUntilDue as GroupCreateParamsBillingSettingsInvoiceTimeUntilDue, + GroupCreateParamsBillingSettingsPaymentMethodOptions as GroupCreateParamsBillingSettingsPaymentMethodOptions, + GroupCreateParamsBillingSettingsPaymentMethodOptionsAcssDebit as GroupCreateParamsBillingSettingsPaymentMethodOptionsAcssDebit, + GroupCreateParamsBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions as GroupCreateParamsBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions, + GroupCreateParamsBillingSettingsPaymentMethodOptionsBancontact as GroupCreateParamsBillingSettingsPaymentMethodOptionsBancontact, + GroupCreateParamsBillingSettingsPaymentMethodOptionsCard as GroupCreateParamsBillingSettingsPaymentMethodOptionsCard, + GroupCreateParamsBillingSettingsPaymentMethodOptionsCardMandateOptions as GroupCreateParamsBillingSettingsPaymentMethodOptionsCardMandateOptions, + GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalance as GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalance, + GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer as GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer, + GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer as GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer, + GroupCreateParamsBillingSettingsPaymentMethodOptionsKonbini as GroupCreateParamsBillingSettingsPaymentMethodOptionsKonbini, + GroupCreateParamsBillingSettingsPaymentMethodOptionsSepaDebit as GroupCreateParamsBillingSettingsPaymentMethodOptionsSepaDebit, + GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccount as GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccount, + GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections as GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections, + GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters as GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters, + GroupCreateParamsBillingSettingsTax as GroupCreateParamsBillingSettingsTax, + GroupCreateParamsGroupingBehavior as GroupCreateParamsGroupingBehavior, + GroupCreateParamsGroupingBehaviorByCadence as GroupCreateParamsGroupingBehaviorByCadence, + GroupCreateParamsGroupingBehaviorByCadenceDay as GroupCreateParamsGroupingBehaviorByCadenceDay, + GroupCreateParamsGroupingBehaviorByCadenceDayTime as GroupCreateParamsGroupingBehaviorByCadenceDayTime, + GroupCreateParamsGroupingBehaviorByCadenceMonth as GroupCreateParamsGroupingBehaviorByCadenceMonth, + GroupCreateParamsGroupingBehaviorByCadenceMonthTime as GroupCreateParamsGroupingBehaviorByCadenceMonthTime, + GroupCreateParamsGroupingBehaviorByCadenceWeek as GroupCreateParamsGroupingBehaviorByCadenceWeek, + GroupCreateParamsGroupingBehaviorByCadenceWeekTime as GroupCreateParamsGroupingBehaviorByCadenceWeekTime, + GroupCreateParamsGroupingBehaviorByCadenceYear as GroupCreateParamsGroupingBehaviorByCadenceYear, + GroupCreateParamsGroupingBehaviorByCadenceYearTime as GroupCreateParamsGroupingBehaviorByCadenceYearTime, + ) + from stripe.params.v2.billing._group_list_params import ( + GroupListParams as GroupListParams, + ) + from stripe.params.v2.billing._group_retrieve_params import ( + GroupRetrieveParams as GroupRetrieveParams, + ) + from stripe.params.v2.billing._group_update_params import ( + GroupUpdateParams as GroupUpdateParams, + GroupUpdateParamsBillingSettings as GroupUpdateParamsBillingSettings, + GroupUpdateParamsBillingSettingsEmailDelivery as GroupUpdateParamsBillingSettingsEmailDelivery, + GroupUpdateParamsBillingSettingsEmailDeliveryPaymentDue as GroupUpdateParamsBillingSettingsEmailDeliveryPaymentDue, + GroupUpdateParamsBillingSettingsInvoicePresentation as GroupUpdateParamsBillingSettingsInvoicePresentation, + GroupUpdateParamsBillingSettingsInvoiceTimeUntilDue as GroupUpdateParamsBillingSettingsInvoiceTimeUntilDue, + GroupUpdateParamsBillingSettingsPaymentMethodOptions as GroupUpdateParamsBillingSettingsPaymentMethodOptions, + GroupUpdateParamsBillingSettingsPaymentMethodOptionsAcssDebit as GroupUpdateParamsBillingSettingsPaymentMethodOptionsAcssDebit, + GroupUpdateParamsBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions as GroupUpdateParamsBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions, + GroupUpdateParamsBillingSettingsPaymentMethodOptionsBancontact as GroupUpdateParamsBillingSettingsPaymentMethodOptionsBancontact, + GroupUpdateParamsBillingSettingsPaymentMethodOptionsCard as GroupUpdateParamsBillingSettingsPaymentMethodOptionsCard, + GroupUpdateParamsBillingSettingsPaymentMethodOptionsCardMandateOptions as GroupUpdateParamsBillingSettingsPaymentMethodOptionsCardMandateOptions, + GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalance as GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalance, + GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer as GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer, + GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer as GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer, + GroupUpdateParamsBillingSettingsPaymentMethodOptionsKonbini as GroupUpdateParamsBillingSettingsPaymentMethodOptionsKonbini, + GroupUpdateParamsBillingSettingsPaymentMethodOptionsSepaDebit as GroupUpdateParamsBillingSettingsPaymentMethodOptionsSepaDebit, + GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccount as GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccount, + GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections as GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections, + GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters as GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters, + GroupUpdateParamsBillingSettingsTax as GroupUpdateParamsBillingSettingsTax, + ) from stripe.params.v2.billing._intent_cancel_params import ( IntentCancelParams as IntentCancelParams, ) @@ -330,21 +297,37 @@ IntentCreateParamsActionSubscribePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorRecurringCreditGrant as IntentCreateParamsActionSubscribePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorRecurringCreditGrant, IntentCreateParamsActionSubscribeV1SubscriptionDetails as IntentCreateParamsActionSubscribeV1SubscriptionDetails, IntentCreateParamsActionSubscribeV1SubscriptionDetailsItem as IntentCreateParamsActionSubscribeV1SubscriptionDetailsItem, - IntentCreateParamsCadenceData as IntentCreateParamsCadenceData, - IntentCreateParamsCadenceDataBillingCycle as IntentCreateParamsCadenceDataBillingCycle, - IntentCreateParamsCadenceDataBillingCycleDay as IntentCreateParamsCadenceDataBillingCycleDay, - IntentCreateParamsCadenceDataBillingCycleDayTime as IntentCreateParamsCadenceDataBillingCycleDayTime, - IntentCreateParamsCadenceDataBillingCycleMonth as IntentCreateParamsCadenceDataBillingCycleMonth, - IntentCreateParamsCadenceDataBillingCycleMonthTime as IntentCreateParamsCadenceDataBillingCycleMonthTime, - IntentCreateParamsCadenceDataBillingCycleWeek as IntentCreateParamsCadenceDataBillingCycleWeek, - IntentCreateParamsCadenceDataBillingCycleWeekTime as IntentCreateParamsCadenceDataBillingCycleWeekTime, - IntentCreateParamsCadenceDataBillingCycleYear as IntentCreateParamsCadenceDataBillingCycleYear, - IntentCreateParamsCadenceDataBillingCycleYearTime as IntentCreateParamsCadenceDataBillingCycleYearTime, - IntentCreateParamsCadenceDataPayer as IntentCreateParamsCadenceDataPayer, - IntentCreateParamsCadenceDataPayerBillingProfileData as IntentCreateParamsCadenceDataPayerBillingProfileData, - IntentCreateParamsCadenceDataSettings as IntentCreateParamsCadenceDataSettings, - IntentCreateParamsCadenceDataSettingsBill as IntentCreateParamsCadenceDataSettingsBill, - IntentCreateParamsCadenceDataSettingsCollection as IntentCreateParamsCadenceDataSettingsCollection, + IntentCreateParamsBillingGroupData as IntentCreateParamsBillingGroupData, + IntentCreateParamsBillingGroupDataBillingSettings as IntentCreateParamsBillingGroupDataBillingSettings, + IntentCreateParamsBillingGroupDataBillingSettingsEmailDelivery as IntentCreateParamsBillingGroupDataBillingSettingsEmailDelivery, + IntentCreateParamsBillingGroupDataBillingSettingsEmailDeliveryPaymentDue as IntentCreateParamsBillingGroupDataBillingSettingsEmailDeliveryPaymentDue, + IntentCreateParamsBillingGroupDataBillingSettingsInvoicePresentation as IntentCreateParamsBillingGroupDataBillingSettingsInvoicePresentation, + IntentCreateParamsBillingGroupDataBillingSettingsInvoiceTimeUntilDue as IntentCreateParamsBillingGroupDataBillingSettingsInvoiceTimeUntilDue, + IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptions as IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptions, + IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsAcssDebit as IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsAcssDebit, + IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions as IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions, + IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsBancontact as IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsBancontact, + IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCard as IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCard, + IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCardMandateOptions as IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCardMandateOptions, + IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalance as IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalance, + IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer as IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer, + IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer as IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer, + IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsKonbini as IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsKonbini, + IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsSepaDebit as IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsSepaDebit, + IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccount as IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccount, + IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections as IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections, + IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters as IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters, + IntentCreateParamsBillingGroupDataBillingSettingsTax as IntentCreateParamsBillingGroupDataBillingSettingsTax, + IntentCreateParamsBillingGroupDataGroupingBehavior as IntentCreateParamsBillingGroupDataGroupingBehavior, + IntentCreateParamsBillingGroupDataGroupingBehaviorByCadence as IntentCreateParamsBillingGroupDataGroupingBehaviorByCadence, + IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceDay as IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceDay, + IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceDayTime as IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceDayTime, + IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceMonth as IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceMonth, + IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceMonthTime as IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceMonthTime, + IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceWeek as IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceWeek, + IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceWeekTime as IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceWeekTime, + IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceYear as IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceYear, + IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceYearTime as IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceYearTime, ) from stripe.params.v2.billing._intent_list_params import ( IntentListParams as IntentListParams, @@ -536,12 +519,12 @@ # name -> (import_target, is_submodule) _import_map = { "bill_settings": ("stripe.params.v2.billing.bill_settings", True), - "cadences": ("stripe.params.v2.billing.cadences", True), "collection_settings": ( "stripe.params.v2.billing.collection_settings", True, ), "contracts": ("stripe.params.v2.billing.contracts", True), + "groups": ("stripe.params.v2.billing.groups", True), "intents": ("stripe.params.v2.billing.intents", True), "license_fees": ("stripe.params.v2.billing.license_fees", True), "pricing_plans": ("stripe.params.v2.billing.pricing_plans", True), @@ -594,98 +577,6 @@ "stripe.params.v2.billing._bill_setting_update_params", False, ), - "CadenceCancelParams": ( - "stripe.params.v2.billing._cadence_cancel_params", - False, - ), - "CadenceCreateParams": ( - "stripe.params.v2.billing._cadence_create_params", - False, - ), - "CadenceCreateParamsBillingCycle": ( - "stripe.params.v2.billing._cadence_create_params", - False, - ), - "CadenceCreateParamsBillingCycleDay": ( - "stripe.params.v2.billing._cadence_create_params", - False, - ), - "CadenceCreateParamsBillingCycleDayTime": ( - "stripe.params.v2.billing._cadence_create_params", - False, - ), - "CadenceCreateParamsBillingCycleMonth": ( - "stripe.params.v2.billing._cadence_create_params", - False, - ), - "CadenceCreateParamsBillingCycleMonthTime": ( - "stripe.params.v2.billing._cadence_create_params", - False, - ), - "CadenceCreateParamsBillingCycleWeek": ( - "stripe.params.v2.billing._cadence_create_params", - False, - ), - "CadenceCreateParamsBillingCycleWeekTime": ( - "stripe.params.v2.billing._cadence_create_params", - False, - ), - "CadenceCreateParamsBillingCycleYear": ( - "stripe.params.v2.billing._cadence_create_params", - False, - ), - "CadenceCreateParamsBillingCycleYearTime": ( - "stripe.params.v2.billing._cadence_create_params", - False, - ), - "CadenceCreateParamsPayer": ( - "stripe.params.v2.billing._cadence_create_params", - False, - ), - "CadenceCreateParamsSettings": ( - "stripe.params.v2.billing._cadence_create_params", - False, - ), - "CadenceCreateParamsSettingsBill": ( - "stripe.params.v2.billing._cadence_create_params", - False, - ), - "CadenceCreateParamsSettingsCollection": ( - "stripe.params.v2.billing._cadence_create_params", - False, - ), - "CadenceListParams": ( - "stripe.params.v2.billing._cadence_list_params", - False, - ), - "CadenceListParamsPayer": ( - "stripe.params.v2.billing._cadence_list_params", - False, - ), - "CadenceRetrieveParams": ( - "stripe.params.v2.billing._cadence_retrieve_params", - False, - ), - "CadenceUpdateParams": ( - "stripe.params.v2.billing._cadence_update_params", - False, - ), - "CadenceUpdateParamsPayer": ( - "stripe.params.v2.billing._cadence_update_params", - False, - ), - "CadenceUpdateParamsSettings": ( - "stripe.params.v2.billing._cadence_update_params", - False, - ), - "CadenceUpdateParamsSettingsBill": ( - "stripe.params.v2.billing._cadence_update_params", - False, - ), - "CadenceUpdateParamsSettingsCollection": ( - "stripe.params.v2.billing._cadence_update_params", - False, - ), "CollectionSettingCreateParams": ( "stripe.params.v2.billing._collection_setting_create_params", False, @@ -838,10 +729,6 @@ "stripe.params.v2.billing._contract_cancel_params", False, ), - "ContractCancelParamsCancelPricingLine": ( - "stripe.params.v2.billing._contract_cancel_params", - False, - ), "ContractCancelParamsTerm": ( "stripe.params.v2.billing._contract_cancel_params", False, @@ -894,147 +781,75 @@ "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsOneTimeFee": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsOneTimeFeeBillAt": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingLine": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingLineEndsAt": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingLinePricing": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingLinePricingPriceDetails": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingLinePricingPriceDetailsPricingOverride": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideEndsAt": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideOverwritePrice": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideStartsAt": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingLinePricingPriceDetailsQuantityChange": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingLinePricingPriceDetailsQuantityChangeEffectiveAt": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingLineStartsAt": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingOverride": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingOverrideEndsAt": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingOverrideMultiplyPricing": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingOverrideMultiplyPricingCriterion": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), - "ContractCreateParamsPricingOverrideStartsAt": ( - "stripe.params.v2.billing._contract_create_params", - False, - ), "ContractCreateParamsTerm": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermAdHocProduct": ( + "ContractCreateParamsTermPricingOverride": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermAdHocProductBillSchedule": ( + "ContractCreateParamsTermPricingOverrideCriterion": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermAdHocProductBillScheduleCustom": ( + "ContractCreateParamsTermPricingOverrideCriterionTerm": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermAdHocProductBillScheduleCustomBillAt": ( + "ContractCreateParamsTermPricingOverrideEndsAt": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermAdHocProductServicePeriod": ( + "ContractCreateParamsTermPricingOverrideMultiply": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermAdHocProductServicePeriodEndsAt": ( + "ContractCreateParamsTermPricingOverrideOverwrite": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermAdHocProductServicePeriodStartsAt": ( + "ContractCreateParamsTermPricingOverrideStartsAt": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermPricingOverride": ( + "ContractCreateParamsTermRecurringPrice": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermPricingOverrideCriterion": ( + "ContractCreateParamsTermRecurringPriceEndsAt": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermPricingOverrideCriterionTerm": ( + "ContractCreateParamsTermRecurringPriceStartsAt": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermPricingOverrideEndsAt": ( + "ContractCreateParamsTermScheduledFee": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermPricingOverrideMultiply": ( + "ContractCreateParamsTermScheduledFeeBillSchedule": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermPricingOverrideOverwrite": ( + "ContractCreateParamsTermScheduledFeeBillScheduleCustom": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermPricingOverrideStartsAt": ( + "ContractCreateParamsTermScheduledFeeBillScheduleCustomBillAt": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermRecurringPrice": ( + "ContractCreateParamsTermScheduledFeeServicePeriod": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermRecurringPriceEndsAt": ( + "ContractCreateParamsTermScheduledFeeServicePeriodEndsAt": ( "stripe.params.v2.billing._contract_create_params", False, ), - "ContractCreateParamsTermRecurringPriceStartsAt": ( + "ContractCreateParamsTermScheduledFeeServicePeriodStartsAt": ( "stripe.params.v2.billing._contract_create_params", False, ), @@ -1062,71 +877,71 @@ "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermAdHocProduct": ( + "ContractUpdateParamsActionAddTermPricingOverride": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermAdHocProductBillSchedule": ( + "ContractUpdateParamsActionAddTermPricingOverrideCriterion": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermAdHocProductBillScheduleCustom": ( + "ContractUpdateParamsActionAddTermPricingOverrideCriterionTerm": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermAdHocProductBillScheduleCustomBillAt": ( + "ContractUpdateParamsActionAddTermPricingOverrideEndsAt": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermAdHocProductServicePeriod": ( + "ContractUpdateParamsActionAddTermPricingOverrideMultiply": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermAdHocProductServicePeriodEndsAt": ( + "ContractUpdateParamsActionAddTermPricingOverrideOverwrite": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermAdHocProductServicePeriodStartsAt": ( + "ContractUpdateParamsActionAddTermPricingOverrideStartsAt": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermPricingOverride": ( + "ContractUpdateParamsActionAddTermRecurringPrice": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermPricingOverrideCriterion": ( + "ContractUpdateParamsActionAddTermRecurringPriceEndsAt": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermPricingOverrideCriterionTerm": ( + "ContractUpdateParamsActionAddTermRecurringPriceStartsAt": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermPricingOverrideEndsAt": ( + "ContractUpdateParamsActionAddTermScheduledFee": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermPricingOverrideMultiply": ( + "ContractUpdateParamsActionAddTermScheduledFeeBillSchedule": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermPricingOverrideOverwrite": ( + "ContractUpdateParamsActionAddTermScheduledFeeBillScheduleCustom": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermPricingOverrideStartsAt": ( + "ContractUpdateParamsActionAddTermScheduledFeeBillScheduleCustomBillAt": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermRecurringPrice": ( + "ContractUpdateParamsActionAddTermScheduledFeeServicePeriod": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermRecurringPriceEndsAt": ( + "ContractUpdateParamsActionAddTermScheduledFeeServicePeriodEndsAt": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionAddTermRecurringPriceStartsAt": ( + "ContractUpdateParamsActionAddTermScheduledFeeServicePeriodStartsAt": ( "stripe.params.v2.billing._contract_update_params", False, ), @@ -1142,55 +957,55 @@ "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionUpdateTermAdHocProduct": ( + "ContractUpdateParamsActionUpdateTermPricingOverride": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionUpdateTermAdHocProductBillSchedule": ( + "ContractUpdateParamsActionUpdateTermPricingOverrideEndsAt": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionUpdateTermAdHocProductBillScheduleCustom": ( + "ContractUpdateParamsActionUpdateTermPricingOverrideStartsAt": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionUpdateTermAdHocProductBillScheduleCustomBillAt": ( + "ContractUpdateParamsActionUpdateTermRecurringPrice": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionUpdateTermAdHocProductServicePeriod": ( + "ContractUpdateParamsActionUpdateTermRecurringPriceEndsAt": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionUpdateTermAdHocProductServicePeriodEndsAt": ( + "ContractUpdateParamsActionUpdateTermRecurringPriceStartsAt": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionUpdateTermAdHocProductServicePeriodStartsAt": ( + "ContractUpdateParamsActionUpdateTermScheduledFee": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionUpdateTermPricingOverride": ( + "ContractUpdateParamsActionUpdateTermScheduledFeeBillSchedule": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionUpdateTermPricingOverrideEndsAt": ( + "ContractUpdateParamsActionUpdateTermScheduledFeeBillScheduleCustom": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionUpdateTermPricingOverrideStartsAt": ( + "ContractUpdateParamsActionUpdateTermScheduledFeeBillScheduleCustomBillAt": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionUpdateTermRecurringPrice": ( + "ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriod": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionUpdateTermRecurringPriceEndsAt": ( + "ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriodEndsAt": ( "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsActionUpdateTermRecurringPriceStartsAt": ( + "ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriodStartsAt": ( "stripe.params.v2.billing._contract_update_params", False, ), @@ -1230,204 +1045,237 @@ "stripe.params.v2.billing._contract_update_params", False, ), - "ContractUpdateParamsOneTimeFeeAction": ( - "stripe.params.v2.billing._contract_update_params", + "CustomPricingUnitCreateParams": ( + "stripe.params.v2.billing._custom_pricing_unit_create_params", False, ), - "ContractUpdateParamsOneTimeFeeActionAdd": ( - "stripe.params.v2.billing._contract_update_params", + "CustomPricingUnitListParams": ( + "stripe.params.v2.billing._custom_pricing_unit_list_params", False, ), - "ContractUpdateParamsOneTimeFeeActionAddBillAt": ( - "stripe.params.v2.billing._contract_update_params", + "CustomPricingUnitRetrieveParams": ( + "stripe.params.v2.billing._custom_pricing_unit_retrieve_params", False, ), - "ContractUpdateParamsOneTimeFeeActionRemove": ( - "stripe.params.v2.billing._contract_update_params", + "CustomPricingUnitUpdateParams": ( + "stripe.params.v2.billing._custom_pricing_unit_update_params", False, ), - "ContractUpdateParamsOneTimeFeeActionUpdate": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCancelParams": ( + "stripe.params.v2.billing._group_cancel_params", False, ), - "ContractUpdateParamsOneTimeFeeActionUpdateBillAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParams": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineAction": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettings": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionAdd": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsEmailDelivery": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionAddEndsAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsEmailDeliveryPaymentDue": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionAddPricing": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsInvoicePresentation": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionAddPricingPriceDetails": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsInvoiceTimeUntilDue": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverride": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsPaymentMethodOptions": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideEndsAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsPaymentMethodOptionsAcssDebit": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideOverwritePrice": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideStartsAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsPaymentMethodOptionsBancontact": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionAddPricingPriceDetailsQuantityChange": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsPaymentMethodOptionsCard": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionAddPricingPriceDetailsQuantityChangeEffectiveAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsPaymentMethodOptionsCardMandateOptions": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionAddStartsAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalance": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionRemove": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdate": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdateEndsAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsPaymentMethodOptionsKonbini": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdatePricing": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsPaymentMethodOptionsSepaDebit": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetails": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccount": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideAction": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAdd": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddEndsAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsBillingSettingsTax": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddOverwritePrice": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsGroupingBehavior": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddStartsAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsGroupingBehaviorByCadence": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionRemove": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsGroupingBehaviorByCadenceDay": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdate": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsGroupingBehaviorByCadenceDayTime": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdateEndsAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsGroupingBehaviorByCadenceMonth": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdateStartsAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsGroupingBehaviorByCadenceMonthTime": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsQuantityChange": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsGroupingBehaviorByCadenceWeek": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsQuantityChangeEffectiveAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsGroupingBehaviorByCadenceWeekTime": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingLineActionUpdateStartsAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsGroupingBehaviorByCadenceYear": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingOverrideAction": ( - "stripe.params.v2.billing._contract_update_params", + "GroupCreateParamsGroupingBehaviorByCadenceYearTime": ( + "stripe.params.v2.billing._group_create_params", False, ), - "ContractUpdateParamsPricingOverrideActionAdd": ( - "stripe.params.v2.billing._contract_update_params", + "GroupListParams": ("stripe.params.v2.billing._group_list_params", False), + "GroupRetrieveParams": ( + "stripe.params.v2.billing._group_retrieve_params", False, ), - "ContractUpdateParamsPricingOverrideActionAddEndsAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupUpdateParams": ( + "stripe.params.v2.billing._group_update_params", False, ), - "ContractUpdateParamsPricingOverrideActionAddMultiplyPricing": ( - "stripe.params.v2.billing._contract_update_params", + "GroupUpdateParamsBillingSettings": ( + "stripe.params.v2.billing._group_update_params", False, ), - "ContractUpdateParamsPricingOverrideActionAddMultiplyPricingCriterion": ( - "stripe.params.v2.billing._contract_update_params", + "GroupUpdateParamsBillingSettingsEmailDelivery": ( + "stripe.params.v2.billing._group_update_params", False, ), - "ContractUpdateParamsPricingOverrideActionAddOverwritePrice": ( - "stripe.params.v2.billing._contract_update_params", + "GroupUpdateParamsBillingSettingsEmailDeliveryPaymentDue": ( + "stripe.params.v2.billing._group_update_params", False, ), - "ContractUpdateParamsPricingOverrideActionAddStartsAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupUpdateParamsBillingSettingsInvoicePresentation": ( + "stripe.params.v2.billing._group_update_params", False, ), - "ContractUpdateParamsPricingOverrideActionRemove": ( - "stripe.params.v2.billing._contract_update_params", + "GroupUpdateParamsBillingSettingsInvoiceTimeUntilDue": ( + "stripe.params.v2.billing._group_update_params", False, ), - "ContractUpdateParamsPricingOverrideActionUpdate": ( - "stripe.params.v2.billing._contract_update_params", + "GroupUpdateParamsBillingSettingsPaymentMethodOptions": ( + "stripe.params.v2.billing._group_update_params", False, ), - "ContractUpdateParamsPricingOverrideActionUpdateEndsAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsAcssDebit": ( + "stripe.params.v2.billing._group_update_params", False, ), - "ContractUpdateParamsPricingOverrideActionUpdateStartsAt": ( - "stripe.params.v2.billing._contract_update_params", + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions": ( + "stripe.params.v2.billing._group_update_params", False, ), - "CustomPricingUnitCreateParams": ( - "stripe.params.v2.billing._custom_pricing_unit_create_params", + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsBancontact": ( + "stripe.params.v2.billing._group_update_params", False, ), - "CustomPricingUnitListParams": ( - "stripe.params.v2.billing._custom_pricing_unit_list_params", + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsCard": ( + "stripe.params.v2.billing._group_update_params", False, ), - "CustomPricingUnitRetrieveParams": ( - "stripe.params.v2.billing._custom_pricing_unit_retrieve_params", + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsCardMandateOptions": ( + "stripe.params.v2.billing._group_update_params", False, ), - "CustomPricingUnitUpdateParams": ( - "stripe.params.v2.billing._custom_pricing_unit_update_params", + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalance": ( + "stripe.params.v2.billing._group_update_params", + False, + ), + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer": ( + "stripe.params.v2.billing._group_update_params", + False, + ), + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer": ( + "stripe.params.v2.billing._group_update_params", + False, + ), + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsKonbini": ( + "stripe.params.v2.billing._group_update_params", + False, + ), + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsSepaDebit": ( + "stripe.params.v2.billing._group_update_params", + False, + ), + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccount": ( + "stripe.params.v2.billing._group_update_params", + False, + ), + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections": ( + "stripe.params.v2.billing._group_update_params", + False, + ), + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters": ( + "stripe.params.v2.billing._group_update_params", + False, + ), + "GroupUpdateParamsBillingSettingsTax": ( + "stripe.params.v2.billing._group_update_params", False, ), "IntentCancelParams": ( @@ -1598,63 +1446,127 @@ "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceData": ( + "IntentCreateParamsBillingGroupData": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettings": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsEmailDelivery": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsEmailDeliveryPaymentDue": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsInvoicePresentation": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsInvoiceTimeUntilDue": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptions": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsAcssDebit": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsBancontact": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCard": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCardMandateOptions": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalance": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsKonbini": ( + "stripe.params.v2.billing._intent_create_params", + False, + ), + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsSepaDebit": ( "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceDataBillingCycle": ( + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccount": ( "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceDataBillingCycleDay": ( + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections": ( "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceDataBillingCycleDayTime": ( + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters": ( "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceDataBillingCycleMonth": ( + "IntentCreateParamsBillingGroupDataBillingSettingsTax": ( "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceDataBillingCycleMonthTime": ( + "IntentCreateParamsBillingGroupDataGroupingBehavior": ( "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceDataBillingCycleWeek": ( + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadence": ( "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceDataBillingCycleWeekTime": ( + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceDay": ( "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceDataBillingCycleYear": ( + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceDayTime": ( "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceDataBillingCycleYearTime": ( + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceMonth": ( "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceDataPayer": ( + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceMonthTime": ( "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceDataPayerBillingProfileData": ( + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceWeek": ( "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceDataSettings": ( + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceWeekTime": ( "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceDataSettingsBill": ( + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceYear": ( "stripe.params.v2.billing._intent_create_params", False, ), - "IntentCreateParamsCadenceDataSettingsCollection": ( + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceYearTime": ( "stripe.params.v2.billing._intent_create_params", False, ), diff --git a/stripe/params/v2/billing/_cadence_create_params.py b/stripe/params/v2/billing/_cadence_create_params.py deleted file mode 100644 index ba1356e49..000000000 --- a/stripe/params/v2/billing/_cadence_create_params.py +++ /dev/null @@ -1,254 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List, Union -from typing_extensions import Literal, NotRequired, TypedDict - - -class CadenceCreateParams(TypedDict): - billing_cycle: "CadenceCreateParamsBillingCycle" - """ - The billing cycle is the object that defines future billing cycle dates. - """ - include: NotRequired[ - List[Union[Literal["invoice_discount_rules", "settings_data"], str]] - ] - """ - Additional resource to include in the response. - """ - lookup_key: NotRequired[str] - """ - A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 characters. - """ - metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - payer: "CadenceCreateParamsPayer" - """ - The payer determines the entity financially responsible for the bill. - """ - settings: NotRequired["CadenceCreateParamsSettings"] - """ - The settings associated with the cadence. - """ - - -class CadenceCreateParamsBillingCycle(TypedDict): - day: NotRequired["CadenceCreateParamsBillingCycleDay"] - """ - Specific configuration for determining billing dates when type=day. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the interval attribute) between - cadence billings. For example, type=month and interval_count=3 bills every - 3 months. If not provided, this defaults to 1. - """ - month: NotRequired["CadenceCreateParamsBillingCycleMonth"] - """ - Specific configuration for determining billing dates when type=month. - """ - type: Union[Literal["day", "month", "week", "year"], str] - """ - The frequency at which a cadence bills. - """ - week: NotRequired["CadenceCreateParamsBillingCycleWeek"] - """ - Specific configuration for determining billing dates when type=week. - """ - year: NotRequired["CadenceCreateParamsBillingCycleYear"] - """ - Specific configuration for determining billing dates when type=year. - """ - - -class CadenceCreateParamsBillingCycleDay(TypedDict): - time: NotRequired["CadenceCreateParamsBillingCycleDayTime"] - """ - The time at which the billing cycle ends. - This field is optional, and if not provided, it defaults to - the time at which the cadence was created in UTC timezone. - """ - - -class CadenceCreateParamsBillingCycleDayTime(TypedDict): - hour: int - """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. - """ - minute: int - """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - second: int - """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - - -class CadenceCreateParamsBillingCycleMonth(TypedDict): - day_of_month: int - """ - The day to anchor the billing on for a type="month" billing cycle from - 1-31. If this number is greater than the number of days in the month being - billed, this anchors to the last day of the month. If not provided, - this defaults to the day the cadence was created. - """ - month_of_year: NotRequired[int] - """ - The month to anchor the billing on for a type="month" billing cycle from - 1-12. If not provided, this defaults to the month the cadence was created. - This setting can only be used for monthly billing cycles with `interval_count` of 2, 3, 4 or 6. - All occurrences are calculated from the month provided. - """ - time: NotRequired["CadenceCreateParamsBillingCycleMonthTime"] - """ - The time at which the billing cycle ends. - This field is optional, and if not provided, it defaults to - the time at which the cadence was created in UTC timezone. - """ - - -class CadenceCreateParamsBillingCycleMonthTime(TypedDict): - hour: int - """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. - """ - minute: int - """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - second: int - """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - - -class CadenceCreateParamsBillingCycleWeek(TypedDict): - day_of_week: int - """ - The day of the week to bill the type=week billing cycle on. - Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601 - week day numbering. If not provided, this defaults to the day the - cadence was created. - """ - time: NotRequired["CadenceCreateParamsBillingCycleWeekTime"] - """ - The time at which the billing cycle ends. - This field is optional, and if not provided, it defaults to - the time at which the cadence was created in UTC timezone. - """ - - -class CadenceCreateParamsBillingCycleWeekTime(TypedDict): - hour: int - """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. - """ - minute: int - """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - second: int - """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - - -class CadenceCreateParamsBillingCycleYear(TypedDict): - day_of_month: NotRequired[int] - """ - The day to anchor the billing on for a type="month" billing cycle from - 1-31. If this number is greater than the number of days in the month being - billed, this anchors to the last day of the month. If not provided, - this defaults to the day the cadence was created. - """ - month_of_year: NotRequired[int] - """ - The month to bill on from 1-12. If not provided, this defaults to the - month the cadence was created. - """ - time: NotRequired["CadenceCreateParamsBillingCycleYearTime"] - """ - The time at which the billing cycle ends. - This field is optional, and if not provided, it defaults to - the time at which the cadence was created in UTC timezone. - """ - - -class CadenceCreateParamsBillingCycleYearTime(TypedDict): - hour: int - """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. - """ - minute: int - """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - second: int - """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - - -class CadenceCreateParamsPayer(TypedDict): - billing_profile: str - """ - The ID of the Billing Profile object which determines how a bill is paid. - """ - - -class CadenceCreateParamsSettings(TypedDict): - bill: NotRequired["CadenceCreateParamsSettingsBill"] - """ - Settings that configure bill generation, which includes calculating totals, tax, and presenting invoices. - If no setting is provided here, the settings from the customer referenced on the payer will be used. - If no customer settings are present, the merchant default settings will be used. - """ - collection: NotRequired["CadenceCreateParamsSettingsCollection"] - """ - Settings that configure and manage the behavior of collecting payments. - If no setting is provided here, the settings from the customer referenced from the payer will be used if they exist. - If no customer settings are present, the merchant default settings will be used. - """ - - -class CadenceCreateParamsSettingsBill(TypedDict): - id: str - """ - The ID of the referenced settings object. - """ - version: NotRequired[str] - """ - An optional field to specify the version of the Settings to use. - If not provided, this defaults to the live version any time the settings are used. - """ - - -class CadenceCreateParamsSettingsCollection(TypedDict): - id: str - """ - The ID of the referenced settings object. - """ - version: NotRequired[str] - """ - An optional field to specify the version of the Settings to use. - If not provided, this defaults to the live version any time the settings are used. - """ diff --git a/stripe/params/v2/billing/_cadence_list_params.py b/stripe/params/v2/billing/_cadence_list_params.py deleted file mode 100644 index 5e8eeae81..000000000 --- a/stripe/params/v2/billing/_cadence_list_params.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing import List, Union -from typing_extensions import Literal, NotRequired, TypedDict - - -class CadenceListParams(TypedDict): - include: NotRequired[ - List[Union[Literal["invoice_discount_rules", "settings_data"], str]] - ] - """ - Additional resource to include in the response. - """ - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - lookup_keys: NotRequired[List[str]] - """ - Only return the cadences with these lookup_keys, if any exist. You can specify up to 10 lookup_keys. - Mutually exclusive with `test_clock` and `payer`. - """ - payer: NotRequired["CadenceListParamsPayer"] - """ - If provided, only cadences that specifically reference the payer will be returned. Mutually exclusive with `test_clock` and `lookup_keys`. - """ - test_clock: NotRequired[str] - """ - If provided, only cadences that specifically reference the provided test clock ID (via the - customer's test clock) will be returned. - Mutually exclusive with `payer`. - """ - - -class CadenceListParamsPayer(TypedDict): - customer: NotRequired[str] - """ - The ID of the Customer object. If provided, only cadences that specifically reference the provided customer ID will be returned. - """ - type: Union[Literal["customer"], str] - """ - A string identifying the type of the payer. Currently the only supported value is `customer`. - """ diff --git a/stripe/params/v2/billing/_cadence_retrieve_params.py b/stripe/params/v2/billing/_cadence_retrieve_params.py deleted file mode 100644 index c569f69b1..000000000 --- a/stripe/params/v2/billing/_cadence_retrieve_params.py +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing import List, Union -from typing_extensions import Literal, NotRequired, TypedDict - - -class CadenceRetrieveParams(TypedDict): - include: NotRequired[ - List[Union[Literal["invoice_discount_rules", "settings_data"], str]] - ] - """ - Additional resource to include in the response. - """ diff --git a/stripe/params/v2/billing/_cadence_update_params.py b/stripe/params/v2/billing/_cadence_update_params.py deleted file mode 100644 index 70b5b6800..000000000 --- a/stripe/params/v2/billing/_cadence_update_params.py +++ /dev/null @@ -1,78 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List, Optional, Union -from typing_extensions import Literal, NotRequired, TypedDict - - -class CadenceUpdateParams(TypedDict): - include: NotRequired[ - List[Union[Literal["invoice_discount_rules", "settings_data"], str]] - ] - """ - Additional resource to include in the response. - """ - lookup_key: NotRequired[str] - """ - A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 characters. - """ - metadata: NotRequired[ - "Dict[str, Optional[str]]|UntypedStripeObject[Optional[str]]" - ] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - payer: NotRequired["CadenceUpdateParamsPayer"] - """ - The payer determines the entity financially responsible for the bill. - """ - settings: NotRequired["CadenceUpdateParamsSettings"] - """ - The settings associated with the cadence. - """ - - -class CadenceUpdateParamsPayer(TypedDict): - billing_profile: NotRequired[str] - """ - The ID of the Billing Profile object which determines how a bill is paid. - """ - - -class CadenceUpdateParamsSettings(TypedDict): - bill: NotRequired["CadenceUpdateParamsSettingsBill"] - """ - Settings that configure bills generation, which includes calculating totals, tax, and presenting invoices. If null is provided, the current bill settings will be removed from the billing cadence. - """ - collection: NotRequired["CadenceUpdateParamsSettingsCollection"] - """ - Settings that configure and manage the behavior of collecting payments. If null is provided, the current collection settings will be removed from the billing cadence. - """ - - -class CadenceUpdateParamsSettingsBill(TypedDict): - id: str - """ - The ID of the referenced settings object. - """ - version: NotRequired[str] - """ - An optional field to specify the version of Settings to use. - If not provided, this defaults to the `live_version` specified on the setting, any time the settings are used. - Using a specific version here prevents the settings from updating, and is discouraged for cadences. - To clear a pinned version, set the version to null. - """ - - -class CadenceUpdateParamsSettingsCollection(TypedDict): - id: str - """ - The ID of the referenced settings object. - """ - version: NotRequired[str] - """ - An optional field to specify the version of Settings to use. - If not provided, this defaults to the `live_version` specified on the setting, any time the settings are used. - Using a specific version here prevents the settings from updating, and is discouraged for cadences. - To clear a pinned version, set the version to null. - """ diff --git a/stripe/params/v2/billing/_contract_cancel_params.py b/stripe/params/v2/billing/_contract_cancel_params.py index c761f2377..b1475778a 100644 --- a/stripe/params/v2/billing/_contract_cancel_params.py +++ b/stripe/params/v2/billing/_contract_cancel_params.py @@ -5,13 +5,6 @@ class ContractCancelParams(TypedDict): - cancel_pricing_lines: NotRequired[ - List["ContractCancelParamsCancelPricingLine"] - ] - """ - Per-pricing-line proration behavior overrides. Falls back to `proration_behavior` if - not specified for a given line. - """ include: NotRequired[ List[ Union[ @@ -35,23 +28,7 @@ class ContractCancelParams(TypedDict): """ terms: NotRequired[List["ContractCancelParamsTerm"]] """ - Per-term proration overrides. Cannot be combined with cancel_pricing_lines. - """ - - -class ContractCancelParamsCancelPricingLine(TypedDict): - id: NotRequired[str] - """ - The id of the pricing line. - """ - lookup_key: NotRequired[str] - """ - The lookup key of the pricing line. - """ - proration_behavior: NotRequired["Literal['none', 'prorated']|str"] - """ - Proration behavior scoped to this pricing line. If not provided, falls back to the - top-level `proration_behavior` on the cancel request. Defaults to `prorated`. + Per-term proration overrides. """ diff --git a/stripe/params/v2/billing/_contract_create_params.py b/stripe/params/v2/billing/_contract_create_params.py index 77d7b1a65..b48d530a2 100644 --- a/stripe/params/v2/billing/_contract_create_params.py +++ b/stripe/params/v2/billing/_contract_create_params.py @@ -47,21 +47,9 @@ class ContractCreateParams(TypedDict): """ Set of key-value pairs that you can attach to an object. """ - one_time_fees: NotRequired[List["ContractCreateParamsOneTimeFee"]] - """ - A list of one-time fees to create with the contract. Each fee is billed as individual invoice items per its bill_schedule. - """ - pricing_lines: NotRequired[List["ContractCreateParamsPricingLine"]] - """ - A list of pricing lines to create with the contract. - """ - pricing_overrides: NotRequired[List["ContractCreateParamsPricingOverride"]] - """ - A list of pricing overrides to create with the contract. - """ terms: NotRequired[List["ContractCreateParamsTerm"]] """ - Terms to create. Cannot be combined with pricing_lines, pricing_overrides, or one_time_fees. + Terms to create with the contract. """ @@ -203,336 +191,176 @@ class ContractCreateParamsBillingSettingsCollectionSettingsDetails(TypedDict): """ -class ContractCreateParamsOneTimeFee(TypedDict): - amount: AmountParam - """ - The amount to bill. - """ - bill_at: "ContractCreateParamsOneTimeFeeBillAt" - """ - When this fee should be billed. - """ +class ContractCreateParamsTerm(TypedDict): lookup_key: NotRequired[str] """ - A user-provided lookup key. + Lookup key unique across all term types on the contract. """ metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] """ - Set of key-value pairs that you can attach to an object. - """ - product: str - """ - The id of the product for this fee. + Set of key-value pairs attached to the term. """ - - -class ContractCreateParamsOneTimeFeeBillAt(TypedDict): - timestamp: NotRequired[str] + pricing_override: NotRequired["ContractCreateParamsTermPricingOverride"] """ - The timestamp at which the entry should be billed. Required if `type` is `timestamp`. + Required when type is pricing_override. """ - type: Union[Literal["now", "timestamp"], str] + recurring_price: NotRequired["ContractCreateParamsTermRecurringPrice"] """ - The type of the bill_at. + Required when type is recurring_price. """ - - -class ContractCreateParamsPricingLine(TypedDict): - ends_at: NotRequired["ContractCreateParamsPricingLineEndsAt"] + scheduled_fee: NotRequired["ContractCreateParamsTermScheduledFee"] """ - When the pricing line ends. + Required when type is scheduled_fee. """ - lookup_key: NotRequired[str] + type: Union[ + Literal["pricing_override", "recurring_price", "scheduled_fee"], str + ] """ - A user-provided lookup key to reference this pricing line. + The term type. Production types require exactly one matching payload. """ - metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] + + +class ContractCreateParamsTermPricingOverride(TypedDict): + criteria: NotRequired[ + List["ContractCreateParamsTermPricingOverrideCriterion"] + ] """ - Set of key-value pairs that you can attach to an object. + Optional criteria selecting recurring or scheduled_fee terms. If omitted, the override applies to all recurring and scheduled_fee terms. """ - pricing: "ContractCreateParamsPricingLinePricing" + ends_at: NotRequired["ContractCreateParamsTermPricingOverrideEndsAt"] """ - The pricing configuration for the pricing line. + The exclusive end. Omitted means open-ended. """ - starts_at: "ContractCreateParamsPricingLineStartsAt" + multiply: NotRequired["ContractCreateParamsTermPricingOverrideMultiply"] """ - When the pricing line starts. + Required when type is multiply. """ - - -class ContractCreateParamsPricingLineEndsAt(TypedDict): - timestamp: NotRequired[str] + overwrite: NotRequired["ContractCreateParamsTermPricingOverrideOverwrite"] """ - The timestamp when the item ends. Required if `type` is `timestamp`. + Required when type is overwrite. """ - type: Union[Literal["never", "timestamp"], str] + priority: NotRequired[int] """ - The type of the ends_at. + Lower numbers win; defaults to 50. """ - - -class ContractCreateParamsPricingLinePricing(TypedDict): - price_details: NotRequired[ - "ContractCreateParamsPricingLinePricingPriceDetails" - ] + starts_at: "ContractCreateParamsTermPricingOverrideStartsAt" """ - V1 price details. Required if `type` is `price`. + The inclusive start of the validity window. """ - type: Union[Literal["price"], str] + type: Union[Literal["multiply", "overwrite"], str] """ - The type of pricing. + The pricing operation. Exactly one matching pricing payload is required. """ -class ContractCreateParamsPricingLinePricingPriceDetails(TypedDict): - price: str - """ - The id of the price. - """ - pricing_overrides: NotRequired[ - List[ - "ContractCreateParamsPricingLinePricingPriceDetailsPricingOverride" - ] +class ContractCreateParamsTermPricingOverrideCriterion(TypedDict): + terms: NotRequired[ + List["ContractCreateParamsTermPricingOverrideCriterionTerm"] ] """ - Pricing overrides embedded directly on this pricing line. + Term selectors. Each ID or lookup key resolves to one fixed term ID. + Omitted or empty selects all charge-bearing terms. Override terms cannot be targets. """ - quantity_changes: NotRequired[ - List[ - "ContractCreateParamsPricingLinePricingPriceDetailsQuantityChange" - ] - ] + type: Union[Literal["exclude", "include"], str] """ - Quantity changes for the pricing line. For now, at most one entry is allowed. - A quantity change clears all future quantity changes on this pricing line. Defaults to 1. + Whether to include or exclude the selected recurring or scheduled_fee terms. """ -class ContractCreateParamsPricingLinePricingPriceDetailsPricingOverride( - TypedDict, -): - ends_at: NotRequired[ - "ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideEndsAt" - ] +class ContractCreateParamsTermPricingOverrideCriterionTerm(TypedDict): + id: NotRequired[str] """ - When the override ends. Defaults to the pricing line's end if not specified. + Select this term by its stable ID. """ lookup_key: NotRequired[str] """ - A user-provided lookup key to reference this override. - """ - metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] - """ - Set of key-value pairs that you can attach to an object. - """ - overwrite_price: NotRequired[ - "ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideOverwritePrice" - ] - """ - Parameters for the overwrite_price override. Required if `type` is `overwrite_price`. - """ - priority: NotRequired[int] - """ - The priority of this override relative to others. 0 is highest, 100 is lowest. Defaults to 50. - """ - starts_at: NotRequired[ - "ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideStartsAt" - ] - """ - When the override starts. Defaults to the pricing line's start if not specified. + Select this term by its unique lookup key. """ - type: Union[Literal["overwrite_price"], str] + type: Literal["id", "lookup_key"] """ - The type of override. + Whether the selector uses a term ID or lookup key. """ -class ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideEndsAt( - TypedDict, -): +class ContractCreateParamsTermPricingOverrideEndsAt(TypedDict): timestamp: NotRequired[str] """ The timestamp when the item ends. Required if `type` is `timestamp`. """ - type: Union[Literal["never", "timestamp"], str] + type: Union[Literal["never", "now", "timestamp"], str] """ The type of the ends_at. """ -class ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideOverwritePrice( - TypedDict, -): - unit_amount: NotRequired[Decimal] - """ - The per-unit amount to be charged in minor currency units. - """ - - -class ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideStartsAt( - TypedDict, -): - timestamp: NotRequired[str] - """ - The timestamp when the item starts. Required if `type` is `timestamp`. - """ - type: Union[Literal["timestamp"], str] - """ - The type of the starts_at. - """ - - -class ContractCreateParamsPricingLinePricingPriceDetailsQuantityChange( - TypedDict, -): - effective_at: "ContractCreateParamsPricingLinePricingPriceDetailsQuantityChangeEffectiveAt" - """ - When this quantity change takes effect. - """ - set: Decimal +class ContractCreateParamsTermPricingOverrideMultiply(TypedDict): + factor: Decimal """ - The quantity to set. + The multiplier, for example 0.85 for a 15% discount. """ -class ContractCreateParamsPricingLinePricingPriceDetailsQuantityChangeEffectiveAt( - TypedDict, -): - timestamp: NotRequired[str] - """ - The timestamp for the effective at. - """ - type: Union[Literal["timestamp"], str] +class ContractCreateParamsTermPricingOverrideOverwrite(TypedDict): + unit_amount_decimal: NotRequired[Decimal] """ - The type of the effective at. + The replacement per-unit amount in minor currency units. """ -class ContractCreateParamsPricingLineStartsAt(TypedDict): +class ContractCreateParamsTermPricingOverrideStartsAt(TypedDict): timestamp: NotRequired[str] """ The timestamp when the item starts. Required if `type` is `timestamp`. """ - type: Union[Literal["timestamp"], str] + type: Union[Literal["now", "timestamp"], str] """ The type of the starts_at. """ -class ContractCreateParamsPricingOverride(TypedDict): - ends_at: NotRequired["ContractCreateParamsPricingOverrideEndsAt"] - """ - When the pricing override ends. - """ - lookup_key: NotRequired[str] - """ - A user-provided lookup key to reference this pricing override. - """ - metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] - """ - Set of key-value pairs. - """ - multiply_pricing: NotRequired[ - "ContractCreateParamsPricingOverrideMultiplyPricing" - ] +class ContractCreateParamsTermRecurringPrice(TypedDict): + ends_at: NotRequired["ContractCreateParamsTermRecurringPriceEndsAt"] """ - Parameters for a multiply_pricing override. Required if `type` is `multiply_pricing`. + The exclusive end. Omitted means open-ended. """ - priority: NotRequired[int] + price: str """ - The priority of this override relative to others. The highest priority is 0 and the lowest is 100. + The V1 recurring Price. """ - starts_at: "ContractCreateParamsPricingOverrideStartsAt" + quantity: NotRequired[Decimal] """ - When the pricing override starts. + Initial licensed quantity. Defaults to 1; must be omitted for metered Prices. """ - type: Union[Literal["multiply_pricing"], str] + starts_at: "ContractCreateParamsTermRecurringPriceStartsAt" """ - The type of pricing override. + The inclusive start of the term. """ -class ContractCreateParamsPricingOverrideEndsAt(TypedDict): +class ContractCreateParamsTermRecurringPriceEndsAt(TypedDict): timestamp: NotRequired[str] """ The timestamp when the item ends. Required if `type` is `timestamp`. """ - type: Union[Literal["never", "timestamp"], str] + type: Union[Literal["never", "now", "timestamp"], str] """ The type of the ends_at. """ -class ContractCreateParamsPricingOverrideMultiplyPricing(TypedDict): - criteria: NotRequired[ - List["ContractCreateParamsPricingOverrideMultiplyPricingCriterion"] - ] - """ - Criteria determining which rates the multiply_pricing override applies to. - """ - factor: Decimal - """ - The multiply_pricing factor. e.g. "0.8" for a 20% reduction. - """ - - -class ContractCreateParamsPricingOverrideMultiplyPricingCriterion(TypedDict): - pricing_line_ids: NotRequired[List[str]] - """ - Filter by pricing line IDs. - """ - pricing_line_lookup_keys: NotRequired[List[str]] - """ - Filter by pricing line lookup keys. - """ - type: Union[Literal["exclude", "include"], str] - """ - Whether to include or exclude items matching these criteria. - """ - - -class ContractCreateParamsPricingOverrideStartsAt(TypedDict): +class ContractCreateParamsTermRecurringPriceStartsAt(TypedDict): timestamp: NotRequired[str] """ The timestamp when the item starts. Required if `type` is `timestamp`. """ - type: Union[Literal["timestamp"], str] + type: Union[Literal["now", "timestamp"], str] """ The type of the starts_at. """ -class ContractCreateParamsTerm(TypedDict): - ad_hoc_product: NotRequired["ContractCreateParamsTermAdHocProduct"] - """ - Required when type is ad_hoc_product. - """ - lookup_key: NotRequired[str] - """ - Lookup key unique across all term types on the contract. - """ - metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] - """ - Set of key-value pairs attached to the term. - """ - pricing_override: NotRequired["ContractCreateParamsTermPricingOverride"] - """ - Required when type is pricing_override. - """ - recurring_price: NotRequired["ContractCreateParamsTermRecurringPrice"] - """ - Required when type is recurring_price. - """ - type: Union[ - Literal["ad_hoc_product", "pricing_override", "recurring_price"], str - ] - """ - The term type. Production types require exactly one matching payload. - """ - - -class ContractCreateParamsTermAdHocProduct(TypedDict): - bill_schedule: "ContractCreateParamsTermAdHocProductBillSchedule" +class ContractCreateParamsTermScheduledFee(TypedDict): + bill_schedule: "ContractCreateParamsTermScheduledFeeBillSchedule" """ Explicit bill dates and amounts. """ @@ -541,16 +369,16 @@ class ContractCreateParamsTermAdHocProduct(TypedDict): The V1 Product being billed. """ service_period: NotRequired[ - "ContractCreateParamsTermAdHocProductServicePeriod" + "ContractCreateParamsTermScheduledFeeServicePeriod" ] """ Informational service period, independent of bill dates. """ -class ContractCreateParamsTermAdHocProductBillSchedule(TypedDict): +class ContractCreateParamsTermScheduledFeeBillSchedule(TypedDict): custom: NotRequired[ - List["ContractCreateParamsTermAdHocProductBillScheduleCustom"] + List["ContractCreateParamsTermScheduledFeeBillScheduleCustom"] ] """ Between one and ten installments. Empty schedules are allowed only on update. @@ -561,18 +389,18 @@ class ContractCreateParamsTermAdHocProductBillSchedule(TypedDict): """ -class ContractCreateParamsTermAdHocProductBillScheduleCustom(TypedDict): +class ContractCreateParamsTermScheduledFeeBillScheduleCustom(TypedDict): amount: AmountParam """ Non-negative amount with an explicit currency that must match the contract's currency. """ - bill_at: "ContractCreateParamsTermAdHocProductBillScheduleCustomBillAt" + bill_at: "ContractCreateParamsTermScheduledFeeBillScheduleCustomBillAt" """ A finite bill date. Resolved once per request, including on idempotent retries. """ -class ContractCreateParamsTermAdHocProductBillScheduleCustomBillAt(TypedDict): +class ContractCreateParamsTermScheduledFeeBillScheduleCustomBillAt(TypedDict): timestamp: NotRequired[str] """ The timestamp at which the entry should be billed. Required if `type` is `timestamp`. @@ -583,173 +411,34 @@ class ContractCreateParamsTermAdHocProductBillScheduleCustomBillAt(TypedDict): """ -class ContractCreateParamsTermAdHocProductServicePeriod(TypedDict): - ends_at: "ContractCreateParamsTermAdHocProductServicePeriodEndsAt" +class ContractCreateParamsTermScheduledFeeServicePeriod(TypedDict): + ends_at: "ContractCreateParamsTermScheduledFeeServicePeriodEndsAt" """ The finite exclusive end; must be after starts_at. Never is not supported. """ - starts_at: "ContractCreateParamsTermAdHocProductServicePeriodStartsAt" + starts_at: "ContractCreateParamsTermScheduledFeeServicePeriodStartsAt" """ The finite inclusive start of the service period. """ -class ContractCreateParamsTermAdHocProductServicePeriodEndsAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp when the item starts. Required if `type` is `timestamp`. - """ - type: Union[Literal["timestamp"], str] - """ - The type of the starts_at. - """ - - -class ContractCreateParamsTermAdHocProductServicePeriodStartsAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp when the item starts. Required if `type` is `timestamp`. - """ - type: Union[Literal["timestamp"], str] - """ - The type of the starts_at. - """ - - -class ContractCreateParamsTermPricingOverride(TypedDict): - criteria: NotRequired[ - List["ContractCreateParamsTermPricingOverrideCriterion"] - ] - """ - Optional criteria selecting recurring or ad_hoc_product terms. If omitted, the override applies to all recurring and ad_hoc_product terms. - """ - ends_at: NotRequired["ContractCreateParamsTermPricingOverrideEndsAt"] - """ - The exclusive end. Omitted means open-ended. - """ - multiply: NotRequired["ContractCreateParamsTermPricingOverrideMultiply"] - """ - Required when type is multiply. - """ - overwrite: NotRequired["ContractCreateParamsTermPricingOverrideOverwrite"] - """ - Required when type is overwrite. - """ - priority: NotRequired[int] - """ - Lower numbers win; defaults to 50. - """ - starts_at: "ContractCreateParamsTermPricingOverrideStartsAt" - """ - The inclusive start of the validity window. - """ - type: Union[Literal["multiply", "overwrite"], str] - """ - The pricing operation. Exactly one matching pricing payload is required. - """ - - -class ContractCreateParamsTermPricingOverrideCriterion(TypedDict): - terms: NotRequired[ - List["ContractCreateParamsTermPricingOverrideCriterionTerm"] - ] - """ - Term selectors. Each ID or lookup key resolves to one fixed term ID. - Omitted or empty selects all charge-bearing terms. Override terms cannot be targets. - """ - type: Union[Literal["exclude", "include"], str] - """ - Whether to include or exclude the selected recurring or ad_hoc_product terms. - """ - - -class ContractCreateParamsTermPricingOverrideCriterionTerm(TypedDict): - id: NotRequired[str] - """ - Select this term by its stable ID. - """ - lookup_key: NotRequired[str] - """ - Select this term by its unique lookup key. - """ - type: Literal["id", "lookup_key"] - """ - Whether the selector uses a term ID or lookup key. - """ - - -class ContractCreateParamsTermPricingOverrideEndsAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp when the item ends. Required if `type` is `timestamp`. - """ - type: Union[Literal["never", "timestamp"], str] - """ - The type of the ends_at. - """ - - -class ContractCreateParamsTermPricingOverrideMultiply(TypedDict): - factor: Decimal - """ - The multiplier, for example 0.85 for a 15% discount. - """ - - -class ContractCreateParamsTermPricingOverrideOverwrite(TypedDict): - unit_amount_decimal: NotRequired[Decimal] - """ - The replacement per-unit amount in minor currency units. - """ - - -class ContractCreateParamsTermPricingOverrideStartsAt(TypedDict): +class ContractCreateParamsTermScheduledFeeServicePeriodEndsAt(TypedDict): timestamp: NotRequired[str] """ The timestamp when the item starts. Required if `type` is `timestamp`. """ - type: Union[Literal["timestamp"], str] + type: Union[Literal["now", "timestamp"], str] """ The type of the starts_at. """ -class ContractCreateParamsTermRecurringPrice(TypedDict): - ends_at: NotRequired["ContractCreateParamsTermRecurringPriceEndsAt"] - """ - The exclusive end. Omitted means open-ended. - """ - price: str - """ - The V1 recurring Price. - """ - quantity: NotRequired[Decimal] - """ - Initial licensed quantity. Defaults to 1; must be omitted for metered Prices. - """ - starts_at: "ContractCreateParamsTermRecurringPriceStartsAt" - """ - The inclusive start of the term. - """ - - -class ContractCreateParamsTermRecurringPriceEndsAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp when the item ends. Required if `type` is `timestamp`. - """ - type: Union[Literal["never", "timestamp"], str] - """ - The type of the ends_at. - """ - - -class ContractCreateParamsTermRecurringPriceStartsAt(TypedDict): +class ContractCreateParamsTermScheduledFeeServicePeriodStartsAt(TypedDict): timestamp: NotRequired[str] """ The timestamp when the item starts. Required if `type` is `timestamp`. """ - type: Union[Literal["timestamp"], str] + type: Union[Literal["now", "timestamp"], str] """ The type of the starts_at. """ diff --git a/stripe/params/v2/billing/_contract_update_params.py b/stripe/params/v2/billing/_contract_update_params.py index 22ab227d0..88bdd05f9 100644 --- a/stripe/params/v2/billing/_contract_update_params.py +++ b/stripe/params/v2/billing/_contract_update_params.py @@ -10,12 +10,16 @@ class ContractUpdateParams(TypedDict): actions: NotRequired[List["ContractUpdateParamsAction"]] """ - Apply all actions atomically. Cannot be combined with the legacy child action arrays. + Apply all term actions atomically. """ billing_settings: NotRequired["ContractUpdateParamsBillingSettings"] """ The billing settings to update on the contract. """ + contract_number: NotRequired[str] + """ + The unique user-provided contract number. This can only be changed while the contract is in draft. + """ include: NotRequired[ List[ Union[ @@ -39,24 +43,6 @@ class ContractUpdateParams(TypedDict): """ Set of key-value pairs. """ - one_time_fee_actions: NotRequired[ - List["ContractUpdateParamsOneTimeFeeAction"] - ] - """ - One-time fee actions to apply. - """ - pricing_line_actions: NotRequired[ - List["ContractUpdateParamsPricingLineAction"] - ] - """ - Pricing line actions to apply. - """ - pricing_override_actions: NotRequired[ - List["ContractUpdateParamsPricingOverrideAction"] - ] - """ - Pricing override actions to apply. - """ class ContractUpdateParamsAction(TypedDict): @@ -79,12 +65,6 @@ class ContractUpdateParamsAction(TypedDict): class ContractUpdateParamsActionAddTerm(TypedDict): - ad_hoc_product: NotRequired[ - "ContractUpdateParamsActionAddTermAdHocProduct" - ] - """ - Required when type is ad_hoc_product. - """ lookup_key: NotRequired[str] """ Lookup key unique across all term types on the contract. @@ -105,108 +85,15 @@ class ContractUpdateParamsActionAddTerm(TypedDict): """ Required when type is recurring_price. """ - type: Union[ - Literal["ad_hoc_product", "pricing_override", "recurring_price"], str - ] - """ - The term type. Production types require exactly one matching payload. - """ - - -class ContractUpdateParamsActionAddTermAdHocProduct(TypedDict): - bill_schedule: "ContractUpdateParamsActionAddTermAdHocProductBillSchedule" - """ - Explicit bill dates and amounts. - """ - product: str - """ - The V1 Product being billed. - """ - service_period: NotRequired[ - "ContractUpdateParamsActionAddTermAdHocProductServicePeriod" - ] + scheduled_fee: NotRequired["ContractUpdateParamsActionAddTermScheduledFee"] """ - Informational service period, independent of bill dates. + Required when type is scheduled_fee. """ - - -class ContractUpdateParamsActionAddTermAdHocProductBillSchedule(TypedDict): - custom: NotRequired[ - List["ContractUpdateParamsActionAddTermAdHocProductBillScheduleCustom"] + type: Union[ + Literal["pricing_override", "recurring_price", "scheduled_fee"], str ] """ - Between one and ten installments. Empty schedules are allowed only on update. - """ - type: Union[Literal["custom"], str] - """ - The type of schedule. - """ - - -class ContractUpdateParamsActionAddTermAdHocProductBillScheduleCustom( - TypedDict, -): - amount: AmountParam - """ - Non-negative amount with an explicit currency that must match the contract's currency. - """ - bill_at: ( - "ContractUpdateParamsActionAddTermAdHocProductBillScheduleCustomBillAt" - ) - """ - A finite bill date. Resolved once per request, including on idempotent retries. - """ - - -class ContractUpdateParamsActionAddTermAdHocProductBillScheduleCustomBillAt( - TypedDict, -): - timestamp: NotRequired[str] - """ - The timestamp at which the entry should be billed. Required if `type` is `timestamp`. - """ - type: Union[Literal["now", "timestamp"], str] - """ - The type of the bill_at. - """ - - -class ContractUpdateParamsActionAddTermAdHocProductServicePeriod(TypedDict): - ends_at: "ContractUpdateParamsActionAddTermAdHocProductServicePeriodEndsAt" - """ - The finite exclusive end; must be after starts_at. Never is not supported. - """ - starts_at: ( - "ContractUpdateParamsActionAddTermAdHocProductServicePeriodStartsAt" - ) - """ - The finite inclusive start of the service period. - """ - - -class ContractUpdateParamsActionAddTermAdHocProductServicePeriodEndsAt( - TypedDict, -): - timestamp: NotRequired[str] - """ - The timestamp when the item starts. Required if `type` is `timestamp`. - """ - type: Union[Literal["timestamp"], str] - """ - The type of the starts_at. - """ - - -class ContractUpdateParamsActionAddTermAdHocProductServicePeriodStartsAt( - TypedDict, -): - timestamp: NotRequired[str] - """ - The timestamp when the item starts. Required if `type` is `timestamp`. - """ - type: Union[Literal["timestamp"], str] - """ - The type of the starts_at. + The term type. Production types require exactly one matching payload. """ @@ -215,7 +102,7 @@ class ContractUpdateParamsActionAddTermPricingOverride(TypedDict): List["ContractUpdateParamsActionAddTermPricingOverrideCriterion"] ] """ - Optional criteria selecting recurring or ad_hoc_product terms. If omitted, the override applies to all recurring and ad_hoc_product terms. + Optional criteria selecting recurring or scheduled_fee terms. If omitted, the override applies to all recurring and scheduled_fee terms. """ ends_at: NotRequired[ "ContractUpdateParamsActionAddTermPricingOverrideEndsAt" @@ -259,7 +146,7 @@ class ContractUpdateParamsActionAddTermPricingOverrideCriterion(TypedDict): """ type: Union[Literal["exclude", "include"], str] """ - Whether to include or exclude the selected recurring or ad_hoc_product terms. + Whether to include or exclude the selected recurring or scheduled_fee terms. """ @@ -283,7 +170,7 @@ class ContractUpdateParamsActionAddTermPricingOverrideEndsAt(TypedDict): """ The timestamp when the item ends. Required if `type` is `timestamp`. """ - type: Union[Literal["never", "timestamp"], str] + type: Union[Literal["never", "now", "timestamp"], str] """ The type of the ends_at. """ @@ -308,7 +195,7 @@ class ContractUpdateParamsActionAddTermPricingOverrideStartsAt(TypedDict): """ The timestamp when the item starts. Required if `type` is `timestamp`. """ - type: Union[Literal["timestamp"], str] + type: Union[Literal["now", "timestamp"], str] """ The type of the starts_at. """ @@ -340,7 +227,7 @@ class ContractUpdateParamsActionAddTermRecurringPriceEndsAt(TypedDict): """ The timestamp when the item ends. Required if `type` is `timestamp`. """ - type: Union[Literal["never", "timestamp"], str] + type: Union[Literal["never", "now", "timestamp"], str] """ The type of the ends_at. """ @@ -351,88 +238,35 @@ class ContractUpdateParamsActionAddTermRecurringPriceStartsAt(TypedDict): """ The timestamp when the item starts. Required if `type` is `timestamp`. """ - type: Union[Literal["timestamp"], str] + type: Union[Literal["now", "timestamp"], str] """ The type of the starts_at. """ -class ContractUpdateParamsActionRemoveTerm(TypedDict): - term: "ContractUpdateParamsActionRemoveTermTerm" - """ - Select a term by ID or its unique lookup key. - """ - - -class ContractUpdateParamsActionRemoveTermTerm(TypedDict): - id: NotRequired[str] - """ - Select this term by its stable ID. - """ - lookup_key: NotRequired[str] - """ - Select this term by its unique lookup key. - """ - type: Literal["id", "lookup_key"] - """ - Whether the selector uses a term ID or lookup key. - """ - - -class ContractUpdateParamsActionUpdateTerm(TypedDict): - ad_hoc_product: NotRequired[ - "ContractUpdateParamsActionUpdateTermAdHocProduct" - ] - """ - Must match the existing term's type. +class ContractUpdateParamsActionAddTermScheduledFee(TypedDict): + bill_schedule: "ContractUpdateParamsActionAddTermScheduledFeeBillSchedule" """ - metadata: NotRequired[ - "Dict[str, Optional[str]]|UntypedStripeObject[Optional[str]]" - ] - """ - Metadata changes to apply immediately. - """ - pricing_override: NotRequired[ - "ContractUpdateParamsActionUpdateTermPricingOverride" - ] - """ - Only validity dates can change; pricing, criteria, and priority are immutable. - """ - recurring_price: NotRequired[ - "ContractUpdateParamsActionUpdateTermRecurringPrice" - ] - """ - Must match the existing term's type. - """ - term: "ContractUpdateParamsActionUpdateTermTerm" - """ - Select a term by ID or its unique lookup key. + Explicit bill dates and amounts. """ - - -class ContractUpdateParamsActionUpdateTermAdHocProduct(TypedDict): - bill_schedule: NotRequired[ - "ContractUpdateParamsActionUpdateTermAdHocProductBillSchedule" - ] + product: str """ - Replace remaining unbilled installments. Billed entries remain immutable. + The V1 Product being billed. """ service_period: NotRequired[ - "ContractUpdateParamsActionUpdateTermAdHocProductServicePeriod" + "ContractUpdateParamsActionAddTermScheduledFeeServicePeriod" ] """ - Informational service period; cannot change historical billing. + Informational service period, independent of bill dates. """ -class ContractUpdateParamsActionUpdateTermAdHocProductBillSchedule(TypedDict): +class ContractUpdateParamsActionAddTermScheduledFeeBillSchedule(TypedDict): custom: NotRequired[ - List[ - "ContractUpdateParamsActionUpdateTermAdHocProductBillScheduleCustom" - ] + List["ContractUpdateParamsActionAddTermScheduledFeeBillScheduleCustom"] ] """ - Full replacement of up to ten unbilled installments. An explicit empty array cancels all of them. + Between one and ten installments. Empty schedules are allowed only on update. """ type: Union[Literal["custom"], str] """ @@ -440,20 +274,22 @@ class ContractUpdateParamsActionUpdateTermAdHocProductBillSchedule(TypedDict): """ -class ContractUpdateParamsActionUpdateTermAdHocProductBillScheduleCustom( +class ContractUpdateParamsActionAddTermScheduledFeeBillScheduleCustom( TypedDict, ): amount: AmountParam """ Non-negative amount with an explicit currency that must match the contract's currency. """ - bill_at: "ContractUpdateParamsActionUpdateTermAdHocProductBillScheduleCustomBillAt" + bill_at: ( + "ContractUpdateParamsActionAddTermScheduledFeeBillScheduleCustomBillAt" + ) """ A finite bill date. Resolved once per request, including on idempotent retries. """ -class ContractUpdateParamsActionUpdateTermAdHocProductBillScheduleCustomBillAt( +class ContractUpdateParamsActionAddTermScheduledFeeBillScheduleCustomBillAt( TypedDict, ): timestamp: NotRequired[str] @@ -466,47 +302,98 @@ class ContractUpdateParamsActionUpdateTermAdHocProductBillScheduleCustomBillAt( """ -class ContractUpdateParamsActionUpdateTermAdHocProductServicePeriod(TypedDict): - ends_at: ( - "ContractUpdateParamsActionUpdateTermAdHocProductServicePeriodEndsAt" - ) +class ContractUpdateParamsActionAddTermScheduledFeeServicePeriod(TypedDict): + ends_at: "ContractUpdateParamsActionAddTermScheduledFeeServicePeriodEndsAt" """ The finite exclusive end; must be after starts_at. Never is not supported. """ starts_at: ( - "ContractUpdateParamsActionUpdateTermAdHocProductServicePeriodStartsAt" + "ContractUpdateParamsActionAddTermScheduledFeeServicePeriodStartsAt" ) """ The finite inclusive start of the service period. """ -class ContractUpdateParamsActionUpdateTermAdHocProductServicePeriodEndsAt( +class ContractUpdateParamsActionAddTermScheduledFeeServicePeriodEndsAt( TypedDict, ): timestamp: NotRequired[str] """ The timestamp when the item starts. Required if `type` is `timestamp`. """ - type: Union[Literal["timestamp"], str] + type: Union[Literal["now", "timestamp"], str] """ The type of the starts_at. """ -class ContractUpdateParamsActionUpdateTermAdHocProductServicePeriodStartsAt( +class ContractUpdateParamsActionAddTermScheduledFeeServicePeriodStartsAt( TypedDict, ): timestamp: NotRequired[str] """ The timestamp when the item starts. Required if `type` is `timestamp`. """ - type: Union[Literal["timestamp"], str] + type: Union[Literal["now", "timestamp"], str] """ The type of the starts_at. """ +class ContractUpdateParamsActionRemoveTerm(TypedDict): + term: "ContractUpdateParamsActionRemoveTermTerm" + """ + Select a term by ID or its unique lookup key. + """ + + +class ContractUpdateParamsActionRemoveTermTerm(TypedDict): + id: NotRequired[str] + """ + Select this term by its stable ID. + """ + lookup_key: NotRequired[str] + """ + Select this term by its unique lookup key. + """ + type: Literal["id", "lookup_key"] + """ + Whether the selector uses a term ID or lookup key. + """ + + +class ContractUpdateParamsActionUpdateTerm(TypedDict): + metadata: NotRequired[ + "Dict[str, Optional[str]]|UntypedStripeObject[Optional[str]]" + ] + """ + Metadata changes to apply immediately. + """ + pricing_override: NotRequired[ + "ContractUpdateParamsActionUpdateTermPricingOverride" + ] + """ + Only validity dates can change; pricing, criteria, and priority are immutable. + """ + recurring_price: NotRequired[ + "ContractUpdateParamsActionUpdateTermRecurringPrice" + ] + """ + Must match the existing term's type. + """ + scheduled_fee: NotRequired[ + "ContractUpdateParamsActionUpdateTermScheduledFee" + ] + """ + Must match the existing term's type. + """ + term: "ContractUpdateParamsActionUpdateTermTerm" + """ + Select a term by ID or its unique lookup key. + """ + + class ContractUpdateParamsActionUpdateTermPricingOverride(TypedDict): ends_at: NotRequired[ "ContractUpdateParamsActionUpdateTermPricingOverrideEndsAt" @@ -527,7 +414,7 @@ class ContractUpdateParamsActionUpdateTermPricingOverrideEndsAt(TypedDict): """ The timestamp when the item ends. Required if `type` is `timestamp`. """ - type: Union[Literal["never", "timestamp"], str] + type: Union[Literal["never", "now", "timestamp"], str] """ The type of the ends_at. """ @@ -538,7 +425,7 @@ class ContractUpdateParamsActionUpdateTermPricingOverrideStartsAt(TypedDict): """ The timestamp when the item starts. Required if `type` is `timestamp`. """ - type: Union[Literal["timestamp"], str] + type: Union[Literal["now", "timestamp"], str] """ The type of the starts_at. """ @@ -569,7 +456,7 @@ class ContractUpdateParamsActionUpdateTermRecurringPriceEndsAt(TypedDict): """ The timestamp when the item ends. Required if `type` is `timestamp`. """ - type: Union[Literal["never", "timestamp"], str] + type: Union[Literal["never", "now", "timestamp"], str] """ The type of the ends_at. """ @@ -580,169 +467,58 @@ class ContractUpdateParamsActionUpdateTermRecurringPriceStartsAt(TypedDict): """ The timestamp when the item starts. Required if `type` is `timestamp`. """ - type: Union[Literal["timestamp"], str] + type: Union[Literal["now", "timestamp"], str] """ The type of the starts_at. """ -class ContractUpdateParamsActionUpdateTermTerm(TypedDict): - id: NotRequired[str] - """ - Select this term by its stable ID. - """ - lookup_key: NotRequired[str] +class ContractUpdateParamsActionUpdateTermScheduledFee(TypedDict): + bill_schedule: NotRequired[ + "ContractUpdateParamsActionUpdateTermScheduledFeeBillSchedule" + ] """ - Select this term by its unique lookup key. + Replace remaining unbilled installments. Billed entries remain immutable. """ - type: Literal["id", "lookup_key"] + service_period: NotRequired[ + "ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriod" + ] """ - Whether the selector uses a term ID or lookup key. + Informational service period; cannot change historical billing. """ -class ContractUpdateParamsBillingSettings(TypedDict): - bill_settings_details: NotRequired[ - "ContractUpdateParamsBillingSettingsBillSettingsDetails" +class ContractUpdateParamsActionUpdateTermScheduledFeeBillSchedule(TypedDict): + custom: NotRequired[ + List[ + "ContractUpdateParamsActionUpdateTermScheduledFeeBillScheduleCustom" + ] ] """ - The bill settings to update (tax calculation type and/or invoice time until due). + Full replacement of up to ten unbilled installments. An explicit empty array cancels all of them. """ - billing_profile_details: NotRequired[ - "ContractUpdateParamsBillingSettingsBillingProfileDetails" - ] + type: Union[Literal["custom"], str] """ - The billing profile details to update. - """ - collection_settings_details: NotRequired[ - "ContractUpdateParamsBillingSettingsCollectionSettingsDetails" - ] - """ - The collection settings details to update on the contract. - """ - - -class ContractUpdateParamsBillingSettingsBillSettingsDetails(TypedDict): - calculation: NotRequired[ - "ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculation" - ] - """ - The tax calculation settings to update. - """ - invoice: NotRequired[ - "ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoice" - ] - """ - The invoice settings to update. - """ - - -class ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculation( - TypedDict, -): - tax: NotRequired[ - "ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculationTax" - ] - """ - Tax calculation settings. + The type of schedule. """ -class ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculationTax( +class ContractUpdateParamsActionUpdateTermScheduledFeeBillScheduleCustom( TypedDict, ): - type: Literal["automatic", "manual"] + amount: AmountParam """ - The type of tax calculation. + Non-negative amount with an explicit currency that must match the contract's currency. """ - - -class ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoice(TypedDict): - time_until_due: NotRequired[ - "ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoiceTimeUntilDue" - ] + bill_at: "ContractUpdateParamsActionUpdateTermScheduledFeeBillScheduleCustomBillAt" """ - How long the customer has to pay the invoice before it's past due. + A finite bill date. Resolved once per request, including on idempotent retries. """ -class ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoiceTimeUntilDue( +class ContractUpdateParamsActionUpdateTermScheduledFeeBillScheduleCustomBillAt( TypedDict, ): - interval: Literal["day", "month", "week", "year"] - """ - The interval unit. - """ - interval_count: int - """ - The number of intervals. - """ - - -class ContractUpdateParamsBillingSettingsBillingProfileDetails(TypedDict): - default_payment_method: NotRequired[str] - """ - The default payment method to charge for the contract. - """ - - -class ContractUpdateParamsBillingSettingsCollectionSettingsDetails(TypedDict): - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - How payment is collected for the contract. An omitted value leaves the - collection method unchanged. - """ - payment_method_configuration: NotRequired[str] - """ - The payment method configuration. - """ - - -class ContractUpdateParamsOneTimeFeeAction(TypedDict): - add: NotRequired["ContractUpdateParamsOneTimeFeeActionAdd"] - """ - Parameters for adding a one-time fee. - """ - remove: NotRequired["ContractUpdateParamsOneTimeFeeActionRemove"] - """ - Parameters for removing a one-time fee. - """ - type: Literal["add", "remove", "update"] - """ - The type of one-time fee action. - """ - update: NotRequired["ContractUpdateParamsOneTimeFeeActionUpdate"] - """ - Parameters for updating a one-time fee. - """ - - -class ContractUpdateParamsOneTimeFeeActionAdd(TypedDict): - amount: AmountParam - """ - The amount to bill. - """ - bill_at: "ContractUpdateParamsOneTimeFeeActionAddBillAt" - """ - When this fee should be billed. - """ - lookup_key: NotRequired[str] - """ - A user-provided lookup key. - """ - metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] - """ - Metadata for the one-time fee. - """ - product: str - """ - The id of the product for this fee. - """ - - -class ContractUpdateParamsOneTimeFeeActionAddBillAt(TypedDict): timestamp: NotRequired[str] """ The timestamp at which the entry should be billed. Required if `type` is `timestamp`. @@ -753,701 +529,156 @@ class ContractUpdateParamsOneTimeFeeActionAddBillAt(TypedDict): """ -class ContractUpdateParamsOneTimeFeeActionRemove(TypedDict): - id: NotRequired[str] - """ - The id of the one-time fee to remove. - """ - lookup_key: NotRequired[str] - """ - The lookup key of the one-time fee to remove. - """ - - -class ContractUpdateParamsOneTimeFeeActionUpdate(TypedDict): - amount: NotRequired[AmountParam] - """ - The updated amount to bill. - """ - bill_at: NotRequired["ContractUpdateParamsOneTimeFeeActionUpdateBillAt"] - """ - The updated bill_at schedule. - """ - id: NotRequired[str] - """ - The id of the one-time fee to update. - """ - lookup_key: NotRequired[str] +class ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriod(TypedDict): + ends_at: ( + "ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriodEndsAt" + ) """ - The lookup key of the one-time fee to update. + The finite exclusive end; must be after starts_at. Never is not supported. """ - metadata: NotRequired[ - "Dict[str, Optional[str]]|UntypedStripeObject[Optional[str]]" - ] + starts_at: ( + "ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriodStartsAt" + ) """ - Metadata mutations to apply to the one-time fee. + The finite inclusive start of the service period. """ -class ContractUpdateParamsOneTimeFeeActionUpdateBillAt(TypedDict): +class ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriodEndsAt( + TypedDict, +): timestamp: NotRequired[str] """ - The timestamp at which the entry should be billed. Required if `type` is `timestamp`. + The timestamp when the item starts. Required if `type` is `timestamp`. """ type: Union[Literal["now", "timestamp"], str] """ - The type of the bill_at. + The type of the starts_at. """ -class ContractUpdateParamsPricingLineAction(TypedDict): - add: NotRequired["ContractUpdateParamsPricingLineActionAdd"] - """ - Add a pricing line. - """ - remove: NotRequired["ContractUpdateParamsPricingLineActionRemove"] - """ - Remove a pricing line. - """ - type: Union[Literal["add", "remove", "update"], str] +class ContractUpdateParamsActionUpdateTermScheduledFeeServicePeriodStartsAt( + TypedDict, +): + timestamp: NotRequired[str] """ - The type of pricing line action. + The timestamp when the item starts. Required if `type` is `timestamp`. """ - update: NotRequired["ContractUpdateParamsPricingLineActionUpdate"] + type: Union[Literal["now", "timestamp"], str] """ - Update a pricing line. + The type of the starts_at. """ -class ContractUpdateParamsPricingLineActionAdd(TypedDict): - ends_at: NotRequired["ContractUpdateParamsPricingLineActionAddEndsAt"] +class ContractUpdateParamsActionUpdateTermTerm(TypedDict): + id: NotRequired[str] """ - The end time for the pricing line. + Select this term by its stable ID. """ lookup_key: NotRequired[str] """ - A lookup key for the pricing line. - """ - metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] - """ - Metadata for the pricing line. - """ - pricing: "ContractUpdateParamsPricingLineActionAddPricing" - """ - The pricing configuration for the pricing line. - """ - starts_at: "ContractUpdateParamsPricingLineActionAddStartsAt" - """ - The start time for the pricing line. - """ - - -class ContractUpdateParamsPricingLineActionAddEndsAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp when the pricing ends. + Select this term by its unique lookup key. """ - type: Union[Literal["never", "now", "timestamp"], str] + type: Literal["id", "lookup_key"] """ - The type of end time to apply. + Whether the selector uses a term ID or lookup key. """ -class ContractUpdateParamsPricingLineActionAddPricing(TypedDict): - price_details: NotRequired[ - "ContractUpdateParamsPricingLineActionAddPricingPriceDetails" +class ContractUpdateParamsBillingSettings(TypedDict): + bill_settings_details: NotRequired[ + "ContractUpdateParamsBillingSettingsBillSettingsDetails" ] """ - V1 price details. Required if `type` is `price`. - """ - type: Union[Literal["price"], str] - """ - The type of pricing. - """ - - -class ContractUpdateParamsPricingLineActionAddPricingPriceDetails(TypedDict): - price: str - """ - The id of the price. + The bill settings to update (tax calculation type and/or invoice time until due). """ - pricing_overrides: NotRequired[ - List[ - "ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverride" - ] + billing_profile_details: NotRequired[ + "ContractUpdateParamsBillingSettingsBillingProfileDetails" ] """ - Pricing overrides embedded directly on this pricing line. + The billing profile details to update. """ - quantity_changes: NotRequired[ - List[ - "ContractUpdateParamsPricingLineActionAddPricingPriceDetailsQuantityChange" - ] + collection_settings_details: NotRequired[ + "ContractUpdateParamsBillingSettingsCollectionSettingsDetails" ] """ - Quantity changes for the pricing line. For now, at most one entry is allowed. - A quantity change clears all future quantity changes on this pricing line. Defaults to 1. + The collection settings details to update on the contract. """ -class ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverride( - TypedDict, -): - ends_at: NotRequired[ - "ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideEndsAt" - ] - """ - When the override ends. Defaults to the pricing line's end if not specified. - """ - lookup_key: NotRequired[str] - """ - A user-provided lookup key to reference this override. - """ - metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] - """ - Set of key-value pairs that you can attach to an object. - """ - overwrite_price: NotRequired[ - "ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideOverwritePrice" +class ContractUpdateParamsBillingSettingsBillSettingsDetails(TypedDict): + calculation: NotRequired[ + "ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculation" ] """ - Parameters for the overwrite_price override. Required if `type` is `overwrite_price`. - """ - priority: NotRequired[int] - """ - The priority of this override relative to others. 0 is highest, 100 is lowest. Defaults to 50. + The tax calculation settings to update. """ - starts_at: NotRequired[ - "ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideStartsAt" + invoice: NotRequired[ + "ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoice" ] """ - When the override starts. Defaults to the pricing line's start if not specified. - """ - type: Union[Literal["overwrite_price"], str] - """ - The type of override. + The invoice settings to update. """ -class ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideEndsAt( +class ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculation( TypedDict, ): - timestamp: NotRequired[str] - """ - The timestamp when the item ends. Required if `type` is `timestamp`. - """ - type: Union[Literal["never", "timestamp"], str] + tax: NotRequired[ + "ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculationTax" + ] """ - The type of the ends_at. + Tax calculation settings. """ -class ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideOverwritePrice( +class ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculationTax( TypedDict, ): - unit_amount: NotRequired[Decimal] + type: Literal["automatic", "manual"] """ - The per-unit amount to be charged in minor currency units. + The type of tax calculation. """ -class ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideStartsAt( - TypedDict, -): - timestamp: NotRequired[str] - """ - The timestamp when the item starts. Required if `type` is `timestamp`. - """ - type: Union[Literal["timestamp"], str] +class ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoice(TypedDict): + time_until_due: NotRequired[ + "ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoiceTimeUntilDue" + ] """ - The type of the starts_at. + How long the customer has to pay the invoice before it's past due. """ -class ContractUpdateParamsPricingLineActionAddPricingPriceDetailsQuantityChange( +class ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoiceTimeUntilDue( TypedDict, ): - effective_at: "ContractUpdateParamsPricingLineActionAddPricingPriceDetailsQuantityChangeEffectiveAt" + interval: Literal["day", "month", "week", "year"] """ - When this quantity change takes effect. + The interval unit. """ - set: Decimal + interval_count: int """ - The quantity to set. + The number of intervals. """ -class ContractUpdateParamsPricingLineActionAddPricingPriceDetailsQuantityChangeEffectiveAt( - TypedDict, -): - timestamp: NotRequired[str] - """ - The timestamp for the effective at. - """ - type: Union[Literal["timestamp"], str] +class ContractUpdateParamsBillingSettingsBillingProfileDetails(TypedDict): + default_payment_method: NotRequired[str] """ - The type of the effective at. + The default payment method to charge for the contract. """ -class ContractUpdateParamsPricingLineActionAddStartsAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp when the pricing starts. - """ - type: Union[Literal["timestamp"], str] +class ContractUpdateParamsBillingSettingsCollectionSettingsDetails(TypedDict): + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] """ - The type of start time to apply. + How payment is collected for the contract. An omitted value leaves the + collection method unchanged. """ - - -class ContractUpdateParamsPricingLineActionRemove(TypedDict): - id: str + payment_method_configuration: NotRequired[str] """ - The id of the pricing line to remove. - """ - - -class ContractUpdateParamsPricingLineActionUpdate(TypedDict): - ends_at: NotRequired["ContractUpdateParamsPricingLineActionUpdateEndsAt"] - """ - Updated end time. - """ - id: str - """ - The id of the pricing line. - """ - metadata: NotRequired[ - "Dict[str, Optional[str]]|UntypedStripeObject[Optional[str]]" - ] - """ - Metadata mutations to apply to the pricing line. - """ - pricing: NotRequired["ContractUpdateParamsPricingLineActionUpdatePricing"] - """ - Updated pricing configuration. - """ - starts_at: NotRequired[ - "ContractUpdateParamsPricingLineActionUpdateStartsAt" - ] - """ - Updated start time. - """ - - -class ContractUpdateParamsPricingLineActionUpdateEndsAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp when the pricing ends. - """ - type: Union[Literal["never", "now", "timestamp"], str] - """ - The type of end time to apply. - """ - - -class ContractUpdateParamsPricingLineActionUpdatePricing(TypedDict): - price_details: NotRequired[ - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetails" - ] - """ - V1 price details. Present when the pricing line type is `price`. - """ - - -class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetails( - TypedDict -): - pricing_override_actions: NotRequired[ - List[ - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideAction" - ] - ] - """ - Pricing override actions to apply to the overrides embedded on this pricing line. - """ - quantity_changes: NotRequired[ - List[ - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsQuantityChange" - ] - ] - """ - Quantity changes for the pricing line. Setting this clears all future quantity changes. - """ - - -class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideAction( - TypedDict, -): - add: NotRequired[ - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAdd" - ] - """ - Add a pricing line override. - """ - remove: NotRequired[ - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionRemove" - ] - """ - Remove a pricing line override. - """ - type: Union[Literal["add", "remove", "update"], str] - """ - The type of pricing line override action. - """ - update: NotRequired[ - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdate" - ] - """ - Update a pricing line override. - """ - - -class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAdd( - TypedDict, -): - ends_at: NotRequired[ - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddEndsAt" - ] - """ - The end time for the override. - """ - lookup_key: NotRequired[str] - """ - A lookup key for the override. - """ - metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] - """ - Metadata for the pricing override. - """ - overwrite_price: NotRequired[ - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddOverwritePrice" - ] - """ - Parameters for an overwrite_price override. Required if `type` is `overwrite_price`. - """ - priority: NotRequired[int] - """ - The priority of this override relative to others. 0 is highest, 100 is lowest. Defaults to 50. - """ - starts_at: "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddStartsAt" - """ - The start time for the override. - """ - type: Union[Literal["overwrite_price"], str] - """ - The type of override to add. - """ - - -class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddEndsAt( - TypedDict, -): - timestamp: NotRequired[str] - """ - The timestamp when the pricing ends. - """ - type: Union[Literal["never", "now", "timestamp"], str] - """ - The type of end time to apply. - """ - - -class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddOverwritePrice( - TypedDict, -): - unit_amount: NotRequired[Decimal] - """ - The per-unit amount to be charged in minor currency units. - """ - - -class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddStartsAt( - TypedDict, -): - timestamp: NotRequired[str] - """ - The timestamp when the pricing starts. - """ - type: Union[Literal["timestamp"], str] - """ - The type of start time to apply. - """ - - -class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionRemove( - TypedDict, -): - id: NotRequired[str] - """ - The id of the pricing override to remove. - """ - lookup_key: NotRequired[str] - """ - Lookup key of the override to remove. - """ - - -class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdate( - TypedDict, -): - ends_at: NotRequired[ - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdateEndsAt" - ] - """ - Updated end time. - """ - id: NotRequired[str] - """ - The id of the pricing override to update. - """ - lookup_key: NotRequired[str] - """ - Updated lookup key. - """ - metadata: NotRequired[ - "Dict[str, Optional[str]]|UntypedStripeObject[Optional[str]]" - ] - """ - Metadata mutations to apply to the pricing override. - """ - starts_at: NotRequired[ - "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdateStartsAt" - ] - """ - Updated start time. - """ - - -class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdateEndsAt( - TypedDict, -): - timestamp: NotRequired[str] - """ - The timestamp when the pricing ends. - """ - type: Union[Literal["never", "now", "timestamp"], str] - """ - The type of end time to apply. - """ - - -class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionUpdateStartsAt( - TypedDict, -): - timestamp: NotRequired[str] - """ - The timestamp when the pricing starts. - """ - type: Union[Literal["timestamp"], str] - """ - The type of start time to apply. - """ - - -class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsQuantityChange( - TypedDict, -): - effective_at: "ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsQuantityChangeEffectiveAt" - """ - When this quantity change takes effect. - """ - set: Decimal - """ - The quantity to set. - """ - - -class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsQuantityChangeEffectiveAt( - TypedDict, -): - timestamp: NotRequired[str] - """ - The timestamp for the effective at. - """ - type: Union[Literal["timestamp"], str] - """ - The type of the effective at. - """ - - -class ContractUpdateParamsPricingLineActionUpdateStartsAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp when the pricing starts. - """ - type: Union[Literal["timestamp"], str] - """ - The type of start time to apply. - """ - - -class ContractUpdateParamsPricingOverrideAction(TypedDict): - add: NotRequired["ContractUpdateParamsPricingOverrideActionAdd"] - """ - Add a pricing override. - """ - remove: NotRequired["ContractUpdateParamsPricingOverrideActionRemove"] - """ - Remove a pricing override. - """ - type: Union[Literal["add", "remove", "update"], str] - """ - The type of pricing override action. - """ - update: NotRequired["ContractUpdateParamsPricingOverrideActionUpdate"] - """ - Update a pricing override. - """ - - -class ContractUpdateParamsPricingOverrideActionAdd(TypedDict): - ends_at: NotRequired["ContractUpdateParamsPricingOverrideActionAddEndsAt"] - """ - The end time for the pricing override. - """ - lookup_key: NotRequired[str] - """ - A lookup key for the pricing override. - """ - metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] - """ - Metadata for the pricing override. - """ - multiply_pricing: NotRequired[ - "ContractUpdateParamsPricingOverrideActionAddMultiplyPricing" - ] - """ - A multiply_pricing override to add. - """ - overwrite_price: NotRequired[ - "ContractUpdateParamsPricingOverrideActionAddOverwritePrice" - ] - """ - An overwrite price override to add. - """ - priority: NotRequired[int] - """ - The priority for the pricing override. The highest priority is 0 and the lowest is 100. - """ - starts_at: "ContractUpdateParamsPricingOverrideActionAddStartsAt" - """ - The start time for the pricing override. - """ - type: Union[Literal["multiply_pricing"], str] - """ - The type of pricing override to add. - """ - - -class ContractUpdateParamsPricingOverrideActionAddEndsAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp when the pricing ends. - """ - type: Union[Literal["never", "now", "timestamp"], str] - """ - The type of end time to apply. - """ - - -class ContractUpdateParamsPricingOverrideActionAddMultiplyPricing(TypedDict): - criteria: List[ - "ContractUpdateParamsPricingOverrideActionAddMultiplyPricingCriterion" - ] - """ - Criteria determining which rates the multiply_pricing override applies to. - """ - factor: str - """ - The multiply_pricing factor, represented as a decimal string. e.g. "0.8" for a 20% reduction. - """ - - -class ContractUpdateParamsPricingOverrideActionAddMultiplyPricingCriterion( - TypedDict, -): - pricing_line_ids: NotRequired[List[str]] - """ - Filter by pricing line IDs. - """ - pricing_line_lookup_keys: NotRequired[List[str]] - """ - Filter by pricing line lookup keys. - """ - type: Union[Literal["exclude", "include"], str] - """ - Whether to include or exclude items matching these criteria. - """ - - -class ContractUpdateParamsPricingOverrideActionAddOverwritePrice(TypedDict): - unit_amount: NotRequired[str] - """ - The per-unit amount to be charged, represented as a decimal string in minor currency units. - """ - - -class ContractUpdateParamsPricingOverrideActionAddStartsAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp when the pricing starts. - """ - type: Union[Literal["timestamp"], str] - """ - The type of start time to apply. - """ - - -class ContractUpdateParamsPricingOverrideActionRemove(TypedDict): - id: str - """ - The id of the pricing override to remove. - """ - - -class ContractUpdateParamsPricingOverrideActionUpdate(TypedDict): - ends_at: NotRequired[ - "ContractUpdateParamsPricingOverrideActionUpdateEndsAt" - ] - """ - The updated end time for the pricing override. - """ - id: str - """ - The ID of the pricing override. - """ - metadata: NotRequired[ - "Dict[str, Optional[str]]|UntypedStripeObject[Optional[str]]" - ] - """ - Metadata mutations to apply to the pricing override. - """ - starts_at: NotRequired[ - "ContractUpdateParamsPricingOverrideActionUpdateStartsAt" - ] - """ - The updated start time for the pricing override. - """ - - -class ContractUpdateParamsPricingOverrideActionUpdateEndsAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp when the pricing ends. - """ - type: Union[Literal["never", "now", "timestamp"], str] - """ - The type of end time to apply. - """ - - -class ContractUpdateParamsPricingOverrideActionUpdateStartsAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp when the pricing starts. - """ - type: Union[Literal["timestamp"], str] - """ - The type of start time to apply. + The payment method configuration. """ diff --git a/stripe/params/v2/billing/_group_cancel_params.py b/stripe/params/v2/billing/_group_cancel_params.py new file mode 100644 index 000000000..27fbf0589 --- /dev/null +++ b/stripe/params/v2/billing/_group_cancel_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class GroupCancelParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_group_create_params.py b/stripe/params/v2/billing/_group_create_params.py new file mode 100644 index 000000000..184098313 --- /dev/null +++ b/stripe/params/v2/billing/_group_create_params.py @@ -0,0 +1,496 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import UntypedStripeObject +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class GroupCreateParams(TypedDict): + billing_settings: NotRequired["GroupCreateParamsBillingSettings"] + """ + Billing setting overrides for the group. If omitted, the applicable defaults are used. + """ + customer: str + """ + The ID of the Customer object whose invoices are grouped. + """ + default_payment_method: NotRequired[str] + """ + The ID of the PaymentMethod object used by default. If unset, the customer's default payment method is used. + """ + grouping_behavior: NotRequired["GroupCreateParamsGroupingBehavior"] + """ + The strategy used to group member invoices. + """ + include: NotRequired[ + List[Union[Literal["billing_settings", "invoice_discount_rules"], str]] + ] + """ + Additional fields to include in the response. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to find a particular billing group. Maximum length of 200 characters. + """ + metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] + """ + Set of key-value pairs that you can attach to an object for storing additional structured information. + """ + + +class GroupCreateParamsBillingSettings(TypedDict): + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + How Stripe collects payment. + """ + email_delivery: NotRequired[ + "GroupCreateParamsBillingSettingsEmailDelivery" + ] + """ + Email delivery setting. + """ + invoice_presentation: NotRequired[ + "GroupCreateParamsBillingSettingsInvoicePresentation" + ] + """ + Settings for invoice presentation. + """ + invoice_time_until_due: NotRequired[ + "GroupCreateParamsBillingSettingsInvoiceTimeUntilDue" + ] + """ + The amount of time until the invoice is overdue for payment. + """ + payment_method_configuration: NotRequired[str] + """ + The ID of the payment method configuration, which controls which payment methods are displayed to your customers. + """ + payment_method_options: NotRequired[ + "GroupCreateParamsBillingSettingsPaymentMethodOptions" + ] + """ + Payment Method specific configuration to be stored on the object. + """ + tax: NotRequired["GroupCreateParamsBillingSettingsTax"] + """ + Settings for calculating tax. + """ + + +class GroupCreateParamsBillingSettingsEmailDelivery(TypedDict): + payment_due: NotRequired[ + "GroupCreateParamsBillingSettingsEmailDeliveryPaymentDue" + ] + """ + Controls emails for when the payment is due. Omit to use the applicable default. + """ + + +class GroupCreateParamsBillingSettingsEmailDeliveryPaymentDue(TypedDict): + enabled: NotRequired[bool] + """ + If true an email for the invoice would be generated and sent out. + """ + include_payment_link: NotRequired[bool] + """ + If true the payment link to hosted invoice page would be included in email and PDF of the invoice. + """ + + +class GroupCreateParamsBillingSettingsInvoicePresentation(TypedDict): + invoice_rendering_template: NotRequired[str] + """ + The ID of the invoice rendering template to be used when generating invoices. Omit to use the applicable default. + """ + + +class GroupCreateParamsBillingSettingsInvoiceTimeUntilDue(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + The interval unit for the time until due. + """ + interval_count: int + """ + The number of interval units. For example, if interval=day and interval_count=30, the invoice is due in 30 days. + """ + + +class GroupCreateParamsBillingSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "GroupCreateParamsBillingSettingsPaymentMethodOptionsAcssDebit" + ] + """ + This sub-hash contains details about the Canadian pre-authorized debit payment method options. + """ + bancontact: NotRequired[ + "GroupCreateParamsBillingSettingsPaymentMethodOptionsBancontact" + ] + """ + This sub-hash contains details about the Bancontact payment method. + """ + card: NotRequired[ + "GroupCreateParamsBillingSettingsPaymentMethodOptionsCard" + ] + """ + This sub-hash contains details about the Card payment method options. + """ + customer_balance: NotRequired[ + "GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + This sub-hash contains details about the Bank transfer payment method options. + """ + konbini: NotRequired[ + "GroupCreateParamsBillingSettingsPaymentMethodOptionsKonbini" + ] + """ + This sub-hash contains details about the Konbini payment method options. + """ + sepa_debit: NotRequired[ + "GroupCreateParamsBillingSettingsPaymentMethodOptionsSepaDebit" + ] + """ + This sub-hash contains details about the SEPA Direct Debit payment method options. + """ + us_bank_account: NotRequired[ + "GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccount" + ] + """ + This sub-hash contains details about the ACH direct debit payment method options. + """ + + +class GroupCreateParamsBillingSettingsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "GroupCreateParamsBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation. + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']|str" + ] + """ + Verification method. + """ + + +class GroupCreateParamsBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + transaction_type: NotRequired["Literal['business', 'personal']|str"] + """ + Transaction type of the mandate. + """ + + +class GroupCreateParamsBillingSettingsPaymentMethodOptionsBancontact( + TypedDict +): + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + + +class GroupCreateParamsBillingSettingsPaymentMethodOptionsCard(TypedDict): + mandate_options: NotRequired[ + "GroupCreateParamsBillingSettingsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + network: NotRequired[str] + """ + Selected network to process the payment on. Depends on the available networks of the card. + """ + request_three_d_secure: NotRequired[ + "Literal['any', 'automatic', 'challenge']|str" + ] + """ + An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers + for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). + However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. + Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + + +class GroupCreateParamsBillingSettingsPaymentMethodOptionsCardMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] + """ + The AmountType for the mandate. One of `fixed` or `maximum`. + """ + description: NotRequired[str] + """ + A description of the mandate that is meant to be displayed to the customer. + """ + + +class GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, +): + bank_transfer: NotRequired[ + "GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired["Literal['bank_transfer']|str"] + """ + The funding method type to be used when there are not enough funds in the customer balance. Currently the only supported value is `bank_transfer`. + """ + + +class GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. + """ + type: NotRequired[ + "Literal['eu_bank_transfer', 'gb_bank_transfer', 'jp_bank_transfer', 'mx_bank_transfer', 'us_bank_transfer']|str" + ] + """ + The bank transfer type that can be used for funding. + """ + + +class GroupCreateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: Union[Literal["BE", "DE", "ES", "FR", "IE", "NL"], str] + """ + The desired country code of the bank account information. + """ + + +class GroupCreateParamsBillingSettingsPaymentMethodOptionsKonbini(TypedDict): + pass + + +class GroupCreateParamsBillingSettingsPaymentMethodOptionsSepaDebit(TypedDict): + pass + + +class GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccount( + TypedDict, +): + financial_connections: "GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" + """ + Additional fields for Financial Connections Session creation. + """ + verification_method: Union[ + Literal["automatic", "instant", "microdeposits"], str + ] + """ + Verification method. + """ + + +class GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + permissions: NotRequired[ + List[ + Union[ + Literal[ + "balances", "ownership", "payment_method", "transactions" + ], + str, + ] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. + """ + prefetch: NotRequired[ + List[Union[Literal["balances", "ownership", "transactions"], str]] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + + +class GroupCreateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[ + List[Union[Literal["checking", "savings"], str]] + ] + """ + The account subcategories to use to filter for selectable accounts. + """ + + +class GroupCreateParamsBillingSettingsTax(TypedDict): + type: NotRequired["Literal['automatic', 'manual']|str"] + """ + Determines if tax is calculated automatically based on a product tax code or manually based on rules defined by the business. Omit to use the applicable default. + """ + + +class GroupCreateParamsGroupingBehavior(TypedDict): + by_cadence: NotRequired["GroupCreateParamsGroupingBehaviorByCadence"] + """ + The cadence configuration when type is `by_cadence`. + """ + type: Union[Literal["by_cadence"], str] + """ + The grouping strategy. + """ + + +class GroupCreateParamsGroupingBehaviorByCadence(TypedDict): + billing_cycle_anchor: NotRequired[str] + """ + Timestamp that anchors the recurring grouping cadence. + """ + day: NotRequired["GroupCreateParamsGroupingBehaviorByCadenceDay"] + """ + Daily cadence details. + """ + interval_count: NotRequired[int] + """ + The number of interval units between groups. Defaults to 1. + """ + month: NotRequired["GroupCreateParamsGroupingBehaviorByCadenceMonth"] + """ + Monthly cadence details. + """ + type: Union[Literal["day", "month", "week", "year"], str] + """ + The interval unit for the cadence. + """ + week: NotRequired["GroupCreateParamsGroupingBehaviorByCadenceWeek"] + """ + Weekly cadence details. + """ + year: NotRequired["GroupCreateParamsGroupingBehaviorByCadenceYear"] + """ + Yearly cadence details. + """ + + +class GroupCreateParamsGroupingBehaviorByCadenceDay(TypedDict): + time: "GroupCreateParamsGroupingBehaviorByCadenceDayTime" + """ + The time at which the daily grouping interval begins. + """ + + +class GroupCreateParamsGroupingBehaviorByCadenceDayTime(TypedDict): + hour: int + """ + The hour, from 0 through 23. + """ + minute: int + """ + The minute, from 0 through 59. + """ + second: int + """ + The second, from 0 through 59. + """ + + +class GroupCreateParamsGroupingBehaviorByCadenceMonth(TypedDict): + day_of_month: int + """ + The day of month, from 1 through 31. For shorter months, the cadence anchors to the month's last day. + """ + month_of_year: NotRequired[int] + """ + The month of year, from 1 through 12, from which occurrences are calculated. Defaults to the month when the billing group was created. + """ + time: NotRequired["GroupCreateParamsGroupingBehaviorByCadenceMonthTime"] + """ + The time at which the monthly grouping interval begins. Defaults to the time the billing group is created, in UTC. + """ + + +class GroupCreateParamsGroupingBehaviorByCadenceMonthTime(TypedDict): + hour: int + """ + The hour, from 0 through 23. + """ + minute: int + """ + The minute, from 0 through 59. + """ + second: int + """ + The second, from 0 through 59. + """ + + +class GroupCreateParamsGroupingBehaviorByCadenceWeek(TypedDict): + day_of_week: int + """ + The ISO-8601 day of week, from 1 for Monday through 7 for Sunday. + """ + time: NotRequired["GroupCreateParamsGroupingBehaviorByCadenceWeekTime"] + """ + The time at which the weekly grouping interval begins. Defaults to the time the billing group is created, in UTC. + """ + + +class GroupCreateParamsGroupingBehaviorByCadenceWeekTime(TypedDict): + hour: int + """ + The hour, from 0 through 23. + """ + minute: int + """ + The minute, from 0 through 59. + """ + second: int + """ + The second, from 0 through 59. + """ + + +class GroupCreateParamsGroupingBehaviorByCadenceYear(TypedDict): + day_of_month: int + """ + The day of month, from 1 through 31. For shorter months, the cadence anchors to the month's last day. + """ + month_of_year: int + """ + The month of year, from 1 through 12. + """ + time: NotRequired["GroupCreateParamsGroupingBehaviorByCadenceYearTime"] + """ + The time at which the yearly grouping interval begins. Defaults to the time the billing group is created, in UTC. + """ + + +class GroupCreateParamsGroupingBehaviorByCadenceYearTime(TypedDict): + hour: int + """ + The hour, from 0 through 23. + """ + minute: int + """ + The minute, from 0 through 59. + """ + second: int + """ + The second, from 0 through 59. + """ diff --git a/stripe/params/v2/billing/_group_list_params.py b/stripe/params/v2/billing/_group_list_params.py new file mode 100644 index 000000000..fc4b776ea --- /dev/null +++ b/stripe/params/v2/billing/_group_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class GroupListParams(TypedDict): + customer: NotRequired[str] + """ + Filter billing groups by Customer ID. Mutually exclusive with test_clock. + """ + limit: NotRequired[int] + """ + The maximum number of results per page. Defaults to 10. + """ + lookup_keys: NotRequired[List[str]] + """ + Filter billing groups by lookup keys. You can specify up to 10 lookup keys. + """ + test_clock: NotRequired[str] + """ + Filter billing groups by TestClock ID. Mutually exclusive with customer. + """ diff --git a/stripe/params/v2/billing/_cadence_cancel_params.py b/stripe/params/v2/billing/_group_retrieve_params.py similarity index 55% rename from stripe/params/v2/billing/_cadence_cancel_params.py rename to stripe/params/v2/billing/_group_retrieve_params.py index 58af143ee..724869af0 100644 --- a/stripe/params/v2/billing/_cadence_cancel_params.py +++ b/stripe/params/v2/billing/_group_retrieve_params.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, NotRequired, TypedDict -class CadenceCancelParams(TypedDict): +class GroupRetrieveParams(TypedDict): include: NotRequired[ - List[Union[Literal["invoice_discount_rules", "settings_data"], str]] + List[Union[Literal["billing_settings", "invoice_discount_rules"], str]] ] """ - Additional resource to include in the response. + Additional fields to include in the response. """ diff --git a/stripe/params/v2/billing/_group_update_params.py b/stripe/params/v2/billing/_group_update_params.py new file mode 100644 index 000000000..fb6eb2b43 --- /dev/null +++ b/stripe/params/v2/billing/_group_update_params.py @@ -0,0 +1,340 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import UntypedStripeObject +from typing import Dict, List, Optional, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class GroupUpdateParams(TypedDict): + billing_settings: NotRequired["GroupUpdateParamsBillingSettings"] + """ + Billing setting overrides to update. Set to null to restore all applicable defaults. + """ + default_payment_method: NotRequired[str] + """ + The ID of the default PaymentMethod object. Set to null to use the customer's default payment method. + """ + include: NotRequired[ + List[Union[Literal["billing_settings", "invoice_discount_rules"], str]] + ] + """ + Additional fields to include in the response. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to find a particular billing group. Set to null to clear it. Maximum length of 200 characters. + """ + metadata: NotRequired[ + "Dict[str, Optional[str]]|UntypedStripeObject[Optional[str]]" + ] + """ + Set of key-value pairs to add, update, or remove. + """ + + +class GroupUpdateParamsBillingSettings(TypedDict): + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + How Stripe collects payment. Set to null to restore the applicable default. + """ + email_delivery: NotRequired[ + "GroupUpdateParamsBillingSettingsEmailDelivery" + ] + """ + Email delivery setting. Set to null to restore the applicable default. + """ + invoice_presentation: NotRequired[ + "GroupUpdateParamsBillingSettingsInvoicePresentation" + ] + """ + Settings for invoice presentation. Set to null to restore the applicable defaults. + """ + invoice_time_until_due: NotRequired[ + "GroupUpdateParamsBillingSettingsInvoiceTimeUntilDue" + ] + """ + The amount of time until the invoice is overdue for payment. Set to null to restore the applicable default. + """ + payment_method_configuration: NotRequired[str] + """ + The ID of the payment method configuration, which controls which payment methods are displayed to your customers. Set to null to restore the applicable default. + """ + payment_method_options: NotRequired[ + "GroupUpdateParamsBillingSettingsPaymentMethodOptions" + ] + """ + Payment Method specific configuration to be stored on the object. Set to null to clear the stored value. + """ + tax: NotRequired["GroupUpdateParamsBillingSettingsTax"] + """ + Tax calculation settings. Set to null to restore the applicable default. + """ + + +class GroupUpdateParamsBillingSettingsEmailDelivery(TypedDict): + payment_due: NotRequired[ + "GroupUpdateParamsBillingSettingsEmailDeliveryPaymentDue" + ] + """ + Controls emails for when the payment is due. Omit to leave unchanged. Set to null to restore the applicable default. + """ + + +class GroupUpdateParamsBillingSettingsEmailDeliveryPaymentDue(TypedDict): + enabled: NotRequired[bool] + """ + If true an email for the invoice would be generated and sent out. Omit to leave unchanged. Set to null to restore the applicable default. + """ + include_payment_link: NotRequired[bool] + """ + If true the payment link to hosted invoice page would be included in email and PDF of the invoice. Omit to leave unchanged. Set to null to restore the applicable default. + """ + + +class GroupUpdateParamsBillingSettingsInvoicePresentation(TypedDict): + invoice_rendering_template: NotRequired[str] + """ + The ID of the invoice rendering template to be used when generating invoices. Set to null to use no template. + """ + + +class GroupUpdateParamsBillingSettingsInvoiceTimeUntilDue(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + The interval unit for the time until due. + """ + interval_count: int + """ + The number of interval units. For example, if interval=day and interval_count=30, the invoice is due in 30 days. + """ + + +class GroupUpdateParamsBillingSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsAcssDebit" + ] + """ + This sub-hash contains details about the Canadian pre-authorized debit payment method options. + """ + bancontact: NotRequired[ + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsBancontact" + ] + """ + This sub-hash contains details about the Bancontact payment method. + """ + card: NotRequired[ + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsCard" + ] + """ + This sub-hash contains details about the Card payment method options. + """ + customer_balance: NotRequired[ + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + This sub-hash contains details about the Bank transfer payment method options. + """ + konbini: NotRequired[ + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsKonbini" + ] + """ + This sub-hash contains details about the Konbini payment method options. + """ + sepa_debit: NotRequired[ + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsSepaDebit" + ] + """ + This sub-hash contains details about the SEPA Direct Debit payment method options. + """ + us_bank_account: NotRequired[ + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccount" + ] + """ + This sub-hash contains details about the ACH direct debit payment method options. + """ + + +class GroupUpdateParamsBillingSettingsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation. + """ + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']|str" + ] + """ + Verification method. + """ + + +class GroupUpdateParamsBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + transaction_type: NotRequired["Literal['business', 'personal']|str"] + """ + Transaction type of the mandate. + """ + + +class GroupUpdateParamsBillingSettingsPaymentMethodOptionsBancontact( + TypedDict +): + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + + +class GroupUpdateParamsBillingSettingsPaymentMethodOptionsCard(TypedDict): + mandate_options: NotRequired[ + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + network: NotRequired[str] + """ + Selected network to process the payment on. Depends on the available networks of the card. + """ + request_three_d_secure: NotRequired[ + "Literal['any', 'automatic', 'challenge']|str" + ] + """ + An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers + for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). + However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. + Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + + +class GroupUpdateParamsBillingSettingsPaymentMethodOptionsCardMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] + """ + The AmountType for the mandate. One of `fixed` or `maximum`. + """ + description: NotRequired[str] + """ + A description of the mandate that is meant to be displayed to the customer. + """ + + +class GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, +): + bank_transfer: NotRequired[ + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired["Literal['bank_transfer']|str"] + """ + The funding method type to be used when there are not enough funds in the customer balance. Currently the only supported value is `bank_transfer`. + """ + + +class GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. + """ + type: NotRequired[ + "Literal['eu_bank_transfer', 'gb_bank_transfer', 'jp_bank_transfer', 'mx_bank_transfer', 'us_bank_transfer']|str" + ] + """ + The bank transfer type that can be used for funding. + """ + + +class GroupUpdateParamsBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: Union[Literal["BE", "DE", "ES", "FR", "IE", "NL"], str] + """ + The desired country code of the bank account information. + """ + + +class GroupUpdateParamsBillingSettingsPaymentMethodOptionsKonbini(TypedDict): + pass + + +class GroupUpdateParamsBillingSettingsPaymentMethodOptionsSepaDebit(TypedDict): + pass + + +class GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccount( + TypedDict, +): + financial_connections: "GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" + """ + Additional fields for Financial Connections Session creation. + """ + verification_method: Union[ + Literal["automatic", "instant", "microdeposits"], str + ] + """ + Verification method. + """ + + +class GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + permissions: NotRequired[ + List[ + Union[ + Literal[ + "balances", "ownership", "payment_method", "transactions" + ], + str, + ] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. + """ + prefetch: NotRequired[ + List[Union[Literal["balances", "ownership", "transactions"], str]] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + + +class GroupUpdateParamsBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[ + List[Union[Literal["checking", "savings"], str]] + ] + """ + The account subcategories to use to filter for selectable accounts. + """ + + +class GroupUpdateParamsBillingSettingsTax(TypedDict): + type: Union[Literal["automatic", "manual"], str] + """ + Determines if tax is calculated automatically based on a product tax code or manually based on rules defined by the business. + """ diff --git a/stripe/params/v2/billing/_intent_create_params.py b/stripe/params/v2/billing/_intent_create_params.py index efbb72047..4ae565853 100644 --- a/stripe/params/v2/billing/_intent_create_params.py +++ b/stripe/params/v2/billing/_intent_create_params.py @@ -11,13 +11,13 @@ class IntentCreateParams(TypedDict): """ Actions to be performed by this Billing Intent. """ - cadence: NotRequired[str] + billing_group: NotRequired[str] """ - ID of an existing Cadence to use. + ID of an existing Billing Group to use. """ - cadence_data: NotRequired["IntentCreateParamsCadenceData"] + billing_group_data: NotRequired["IntentCreateParamsBillingGroupData"] """ - Data for creating a new Cadence. + Data for creating a new Billing Group. """ currency: str """ @@ -117,9 +117,9 @@ class IntentCreateParamsActionApplyEffectiveAt(TypedDict): class IntentCreateParamsActionApplyInvoiceDiscountRule(TypedDict): - applies_to: Union[Literal["cadence"], str] + applies_to: Union[Literal["cadence", "group"], str] """ - The entity that the discount rule applies to, for example, the cadence. + The entity that the discount rule applies to, for example, the billing group. """ percent_off: NotRequired[ "IntentCreateParamsActionApplyInvoiceDiscountRulePercentOff" @@ -136,7 +136,7 @@ class IntentCreateParamsActionApplyInvoiceDiscountRule(TypedDict): class IntentCreateParamsActionApplyInvoiceDiscountRulePercentOff(TypedDict): maximum_applications: "IntentCreateParamsActionApplyInvoiceDiscountRulePercentOffMaximumApplications" """ - The maximum number of times this discount can be applied for this cadence. + The maximum number of times this discount can be applied for this billing group. """ percent_off: Decimal """ @@ -670,255 +670,536 @@ class IntentCreateParamsActionSubscribeV1SubscriptionDetailsItem(TypedDict): """ -class IntentCreateParamsCadenceData(TypedDict): - billing_cycle: "IntentCreateParamsCadenceDataBillingCycle" +class IntentCreateParamsBillingGroupData(TypedDict): + billing_settings: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettings" + ] + """ + Billing setting overrides for the group. If omitted, the applicable defaults are used. + """ + customer: str """ - The billing cycle configuration for this Cadence. + The ID of the Customer object whose invoices are grouped. """ - payer: "IntentCreateParamsCadenceDataPayer" + default_payment_method: NotRequired[str] + """ + The ID of the PaymentMethod object used by default. If unset, the customer's default payment method is used. """ - Information about the payer for this Cadence. + grouping_behavior: NotRequired[ + "IntentCreateParamsBillingGroupDataGroupingBehavior" + ] """ - settings: NotRequired["IntentCreateParamsCadenceDataSettings"] + The strategy used to group member invoices. """ - Settings for creating the Cadence. + lookup_key: NotRequired[str] + """ + An internal key you can use to find a particular billing group. Maximum length of 200 characters. """ -class IntentCreateParamsCadenceDataBillingCycle(TypedDict): - day: NotRequired["IntentCreateParamsCadenceDataBillingCycleDay"] +class IntentCreateParamsBillingGroupDataBillingSettings(TypedDict): + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] """ - Specific configuration for determining billing dates when type=day. + How Stripe collects payment. """ - interval_count: NotRequired[int] + email_delivery: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsEmailDelivery" + ] """ - The number of intervals (specified in the interval attribute) between - cadence billings. For example, type=month and interval_count=3 bills every - 3 months. If not provided, this defaults to 1. + Email delivery setting. """ - month: NotRequired["IntentCreateParamsCadenceDataBillingCycleMonth"] + invoice_presentation: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsInvoicePresentation" + ] """ - Specific configuration for determining billing dates when type=month. + Settings for invoice presentation. """ - type: Union[Literal["day", "month", "week", "year"], str] + invoice_time_until_due: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsInvoiceTimeUntilDue" + ] """ - The frequency at which a cadence bills. + The amount of time until the invoice is overdue for payment. """ - week: NotRequired["IntentCreateParamsCadenceDataBillingCycleWeek"] + payment_method_configuration: NotRequired[str] """ - Specific configuration for determining billing dates when type=week. + The ID of the payment method configuration, which controls which payment methods are displayed to your customers. """ - year: NotRequired["IntentCreateParamsCadenceDataBillingCycleYear"] + payment_method_options: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptions" + ] + """ + Payment Method specific configuration to be stored on the object. """ - Specific configuration for determining billing dates when type=year. + tax: NotRequired["IntentCreateParamsBillingGroupDataBillingSettingsTax"] + """ + Settings for calculating tax. """ -class IntentCreateParamsCadenceDataBillingCycleDay(TypedDict): - time: NotRequired["IntentCreateParamsCadenceDataBillingCycleDayTime"] +class IntentCreateParamsBillingGroupDataBillingSettingsEmailDelivery( + TypedDict +): + payment_due: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsEmailDeliveryPaymentDue" + ] """ - The time at which the billing cycle ends. - This field is optional, and if not provided, it defaults to - the time at which the cadence was created in UTC timezone. + Controls emails for when the payment is due. Omit to use the applicable default. """ -class IntentCreateParamsCadenceDataBillingCycleDayTime(TypedDict): - hour: int +class IntentCreateParamsBillingGroupDataBillingSettingsEmailDeliveryPaymentDue( + TypedDict, +): + enabled: NotRequired[bool] """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. + If true an email for the invoice would be generated and sent out. """ - minute: int + include_payment_link: NotRequired[bool] """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + If true the payment link to hosted invoice page would be included in email and PDF of the invoice. """ - second: int + + +class IntentCreateParamsBillingGroupDataBillingSettingsInvoicePresentation( + TypedDict, +): + invoice_rendering_template: NotRequired[str] """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + The ID of the invoice rendering template to be used when generating invoices. Omit to use the applicable default. """ -class IntentCreateParamsCadenceDataBillingCycleMonth(TypedDict): - day_of_month: int +class IntentCreateParamsBillingGroupDataBillingSettingsInvoiceTimeUntilDue( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] """ - The day to anchor the billing on for a type="month" billing cycle from - 1-31. If this number is greater than the number of days in the month being - billed, this anchors to the last day of the month. If not provided, - this defaults to the day the cadence was created. + The interval unit for the time until due. """ - month_of_year: NotRequired[int] + interval_count: int """ - The month to anchor the billing on for a type="month" billing cycle from - 1-12. If not provided, this defaults to the month the cadence was created. - This setting can only be used for monthly billing cycles with `interval_count` of 2, 3, 4 or 6. - All occurrences are calculated from the month provided. + The number of interval units. For example, if interval=day and interval_count=30, the invoice is due in 30 days. """ - time: NotRequired["IntentCreateParamsCadenceDataBillingCycleMonthTime"] + + +class IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptions( + TypedDict, +): + acss_debit: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsAcssDebit" + ] + """ + This sub-hash contains details about the Canadian pre-authorized debit payment method options. + """ + bancontact: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsBancontact" + ] + """ + This sub-hash contains details about the Bancontact payment method. + """ + card: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCard" + ] """ - The time at which the billing cycle ends. - This field is optional, and if not provided, it defaults to - the time at which the cadence was created in UTC timezone. + This sub-hash contains details about the Card payment method options. + """ + customer_balance: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + This sub-hash contains details about the Bank transfer payment method options. + """ + konbini: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsKonbini" + ] + """ + This sub-hash contains details about the Konbini payment method options. + """ + sepa_debit: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsSepaDebit" + ] + """ + This sub-hash contains details about the SEPA Direct Debit payment method options. + """ + us_bank_account: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccount" + ] + """ + This sub-hash contains details about the ACH direct debit payment method options. """ -class IntentCreateParamsCadenceDataBillingCycleMonthTime(TypedDict): - hour: int +class IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsAcssDebit( + TypedDict, +): + mandate_options: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. + Additional fields for Mandate creation. """ - minute: int + verification_method: NotRequired[ + "Literal['automatic', 'instant', 'microdeposits']|str" + ] """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + Verification method. """ - second: int + + +class IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + Transaction type of the mandate. """ -class IntentCreateParamsCadenceDataBillingCycleWeek(TypedDict): - day_of_week: int +class IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsBancontact( + TypedDict, +): + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ - The day of the week to bill the type=week billing cycle on. - Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601 - week day numbering. If not provided, this defaults to the day the - cadence was created. + Preferred language of the Bancontact authorization page that the customer is redirected to. """ - time: NotRequired["IntentCreateParamsCadenceDataBillingCycleWeekTime"] + + +class IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCard( + TypedDict, +): + mandate_options: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + network: NotRequired[str] + """ + Selected network to process the payment on. Depends on the available networks of the card. + """ + request_three_d_secure: NotRequired[ + "Literal['any', 'automatic', 'challenge']|str" + ] """ - The time at which the billing cycle ends. - This field is optional, and if not provided, it defaults to - the time at which the cadence was created in UTC timezone. + An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers + for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). + However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. + Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. """ -class IntentCreateParamsCadenceDataBillingCycleWeekTime(TypedDict): - hour: int +class IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCardMandateOptions( + TypedDict, +): + amount: NotRequired[int] """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. + Amount to be charged for future payments. """ - minute: int + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + The AmountType for the mandate. One of `fixed` or `maximum`. """ - second: int + description: NotRequired[str] """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + A description of the mandate that is meant to be displayed to the customer. """ -class IntentCreateParamsCadenceDataBillingCycleYear(TypedDict): - day_of_month: NotRequired[int] +class IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, +): + bank_transfer: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] """ - The day to anchor the billing on for a type="month" billing cycle from - 1-31. If this number is greater than the number of days in the month being - billed, this anchors to the last day of the month. If not provided, - this defaults to the day the cadence was created. + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. """ - month_of_year: NotRequired[int] + funding_type: NotRequired["Literal['bank_transfer']|str"] + """ + The funding method type to be used when there are not enough funds in the customer balance. Currently the only supported value is `bank_transfer`. + """ + + +class IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. + """ + type: NotRequired[ + "Literal['eu_bank_transfer', 'gb_bank_transfer', 'jp_bank_transfer', 'mx_bank_transfer', 'us_bank_transfer']|str" + ] + """ + The bank transfer type that can be used for funding. + """ + + +class IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: Union[Literal["BE", "DE", "ES", "FR", "IE", "NL"], str] + """ + The desired country code of the bank account information. + """ + + +class IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsKonbini( + TypedDict, +): + pass + + +class IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsSepaDebit( + TypedDict, +): + pass + + +class IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccount( + TypedDict, +): + financial_connections: "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" + """ + Additional fields for Financial Connections Session creation. + """ + verification_method: Union[ + Literal["automatic", "instant", "microdeposits"], str + ] + """ + Verification method. + """ + + +class IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + permissions: NotRequired[ + List[ + Union[ + Literal[ + "balances", "ownership", "payment_method", "transactions" + ], + str, + ] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. + """ + prefetch: NotRequired[ + List[Union[Literal["balances", "ownership", "transactions"], str]] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + + +class IntentCreateParamsBillingGroupDataBillingSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[ + List[Union[Literal["checking", "savings"], str]] + ] """ - The month to bill on from 1-12. If not provided, this defaults to the - month the cadence was created. + The account subcategories to use to filter for selectable accounts. """ - time: NotRequired["IntentCreateParamsCadenceDataBillingCycleYearTime"] + + +class IntentCreateParamsBillingGroupDataBillingSettingsTax(TypedDict): + type: NotRequired["Literal['automatic', 'manual']|str"] """ - The time at which the billing cycle ends. - This field is optional, and if not provided, it defaults to - the time at which the cadence was created in UTC timezone. + Determines if tax is calculated automatically based on a product tax code or manually based on rules defined by the business. Omit to use the applicable default. """ -class IntentCreateParamsCadenceDataBillingCycleYearTime(TypedDict): +class IntentCreateParamsBillingGroupDataGroupingBehavior(TypedDict): + by_cadence: NotRequired[ + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadence" + ] + """ + The cadence configuration when type is `by_cadence`. + """ + type: Union[Literal["by_cadence"], str] + """ + The grouping strategy. + """ + + +class IntentCreateParamsBillingGroupDataGroupingBehaviorByCadence(TypedDict): + billing_cycle_anchor: NotRequired[str] + """ + Timestamp that anchors the recurring grouping cadence. + """ + day: NotRequired[ + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceDay" + ] + """ + Daily cadence details. + """ + interval_count: NotRequired[int] + """ + The number of interval units between groups. Defaults to 1. + """ + month: NotRequired[ + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceMonth" + ] + """ + Monthly cadence details. + """ + type: Union[Literal["day", "month", "week", "year"], str] + """ + The interval unit for the cadence. + """ + week: NotRequired[ + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceWeek" + ] + """ + Weekly cadence details. + """ + year: NotRequired[ + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceYear" + ] + """ + Yearly cadence details. + """ + + +class IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceDay( + TypedDict +): + time: "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceDayTime" + """ + The time at which the daily grouping interval begins. + """ + + +class IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceDayTime( + TypedDict, +): hour: int """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. + The hour, from 0 through 23. """ minute: int """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + The minute, from 0 through 59. """ second: int """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + The second, from 0 through 59. """ -class IntentCreateParamsCadenceDataPayer(TypedDict): - billing_profile: NotRequired[str] +class IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceMonth( + TypedDict, +): + day_of_month: int + """ + The day of month, from 1 through 31. For shorter months, the cadence anchors to the month's last day. """ - The ID of the Billing Profile object which determines how a bill is paid. + month_of_year: NotRequired[int] """ - billing_profile_data: NotRequired[ - "IntentCreateParamsCadenceDataPayerBillingProfileData" + The month of year, from 1 through 12, from which occurrences are calculated. Defaults to the month when the billing group was created. + """ + time: NotRequired[ + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceMonthTime" ] """ - Data for creating a new profile. + The time at which the monthly grouping interval begins. Defaults to the time the billing group is created, in UTC. """ -class IntentCreateParamsCadenceDataPayerBillingProfileData(TypedDict): - customer: str +class IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceMonthTime( + TypedDict, +): + hour: int """ - The customer to associate with the profile. + The hour, from 0 through 23. """ - default_payment_method: NotRequired[str] + minute: int """ - The default payment method to use when billing this profile. - If left blank, the `PaymentMethod` from the `PaymentIntent` provided - on commit is used to create the profile. + The minute, from 0 through 59. + """ + second: int + """ + The second, from 0 through 59. """ -class IntentCreateParamsCadenceDataSettings(TypedDict): - bill: NotRequired["IntentCreateParamsCadenceDataSettingsBill"] +class IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceWeek( + TypedDict, +): + day_of_week: int """ - Settings that configure bill generation, which includes calculating totals, tax, and presenting invoices. - If no setting is provided here, the settings from the customer referenced on the payer will be used. - If no customer settings are present, the merchant default settings will be used. + The ISO-8601 day of week, from 1 for Monday through 7 for Sunday. """ - collection: NotRequired["IntentCreateParamsCadenceDataSettingsCollection"] + time: NotRequired[ + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceWeekTime" + ] """ - Settings that configure and manage the behavior of collecting payments. - If no setting is provided here, the settings from the customer referenced from the payer will be used if they exist. - If no customer settings are present, the merchant default settings will be used. + The time at which the weekly grouping interval begins. Defaults to the time the billing group is created, in UTC. """ -class IntentCreateParamsCadenceDataSettingsBill(TypedDict): - id: str +class IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceWeekTime( + TypedDict, +): + hour: int + """ + The hour, from 0 through 23. + """ + minute: int """ - The ID of the referenced settings object. + The minute, from 0 through 59. """ - version: NotRequired[str] + second: int """ - An optional field to specify the version of the Settings to use. - If not provided, this defaults to the live version any time the settings are used. + The second, from 0 through 59. """ -class IntentCreateParamsCadenceDataSettingsCollection(TypedDict): - id: str +class IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceYear( + TypedDict, +): + day_of_month: int + """ + The day of month, from 1 through 31. For shorter months, the cadence anchors to the month's last day. + """ + month_of_year: int """ - The ID of the referenced settings object. + The month of year, from 1 through 12. """ - version: NotRequired[str] + time: NotRequired[ + "IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceYearTime" + ] + """ + The time at which the yearly grouping interval begins. Defaults to the time the billing group is created, in UTC. + """ + + +class IntentCreateParamsBillingGroupDataGroupingBehaviorByCadenceYearTime( + TypedDict, +): + hour: int + """ + The hour, from 0 through 23. + """ + minute: int + """ + The minute, from 0 through 59. + """ + second: int """ - An optional field to specify the version of the Settings to use. - If not provided, this defaults to the live version any time the settings are used. + The second, from 0 through 59. """ diff --git a/stripe/params/v2/billing/_pricing_plan_subscription_list_params.py b/stripe/params/v2/billing/_pricing_plan_subscription_list_params.py index d9001385a..422e37342 100644 --- a/stripe/params/v2/billing/_pricing_plan_subscription_list_params.py +++ b/stripe/params/v2/billing/_pricing_plan_subscription_list_params.py @@ -5,9 +5,9 @@ class PricingPlanSubscriptionListParams(TypedDict): - billing_cadence: NotRequired[str] + billing_group: NotRequired[str] """ - Filter by Billing Cadence ID. Mutually exclusive with `payer`, `pricing_plan`, and `pricing_plan_version`. + Filter by Billing Group ID. Mutually exclusive with `payer`, `pricing_plan`, and `pricing_plan_version`. """ include: NotRequired[ List[ @@ -18,7 +18,7 @@ class PricingPlanSubscriptionListParams(TypedDict): ] ] """ - Expand to include additional data such as discount_details, billing_cadence_details, or pricing_plan_component_details. + Expand to include additional data such as discount_details or pricing_plan_component_details. """ limit: NotRequired[int] """ @@ -26,15 +26,15 @@ class PricingPlanSubscriptionListParams(TypedDict): """ payer: NotRequired["PricingPlanSubscriptionListParamsPayer"] """ - Filter by payer. Mutually exclusive with `billing_cadence`, `pricing_plan`, and `pricing_plan_version`. + Filter by payer. Mutually exclusive with `billing_group`, `pricing_plan`, and `pricing_plan_version`. """ pricing_plan: NotRequired[str] """ - Filter by PricingPlan ID. Mutually exclusive with `billing_cadence`, `payer`, and `pricing_plan_version`. + Filter by PricingPlan ID. Mutually exclusive with `billing_group`, `payer`, and `pricing_plan_version`. """ pricing_plan_version: NotRequired[str] """ - Filter by Pricing Plan Version ID. Mutually exclusive with `billing_cadence`, `payer`, and `pricing_plan`. + Filter by Pricing Plan Version ID. Mutually exclusive with `billing_group`, `payer`, and `pricing_plan`. """ servicing_status: NotRequired[ Literal["active", "canceled", "paused", "pending"] @@ -47,7 +47,7 @@ class PricingPlanSubscriptionListParams(TypedDict): class PricingPlanSubscriptionListParamsPayer(TypedDict): customer: NotRequired[str] """ - The ID of the Customer object. If provided, only Pricing Plan Subscriptions that are subscribed on the cadences with the specified payer will be returned. + The ID of the Customer object. If provided, only Pricing Plan Subscriptions that are subscribed on the Billing Groups with the specified payer will be returned. """ type: Union[Literal["customer"], str] """ diff --git a/stripe/params/v2/billing/_rate_card_subscription_create_params.py b/stripe/params/v2/billing/_rate_card_subscription_create_params.py index f344e33e5..aa42bfb7e 100644 --- a/stripe/params/v2/billing/_rate_card_subscription_create_params.py +++ b/stripe/params/v2/billing/_rate_card_subscription_create_params.py @@ -6,9 +6,9 @@ class RateCardSubscriptionCreateParams(TypedDict): - billing_cadence: str + billing_group: str """ - The ID of the Billing Cadence. + The ID of the Billing Group. """ metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] """ diff --git a/stripe/params/v2/billing/_rate_card_subscription_list_params.py b/stripe/params/v2/billing/_rate_card_subscription_list_params.py index 0e4033754..20c9c1301 100644 --- a/stripe/params/v2/billing/_rate_card_subscription_list_params.py +++ b/stripe/params/v2/billing/_rate_card_subscription_list_params.py @@ -5,9 +5,9 @@ class RateCardSubscriptionListParams(TypedDict): - billing_cadence: NotRequired[str] + billing_group: NotRequired[str] """ - Optionally filter by a BillingCadence. Mutually exclusive with `payers`, `rate_card`, and `rate_card_version`. + Optionally filter by a BillingGroup. Mutually exclusive with `payers`, `rate_card`, and `rate_card_version`. """ limit: NotRequired[int] """ @@ -15,16 +15,16 @@ class RateCardSubscriptionListParams(TypedDict): """ payer: NotRequired["RateCardSubscriptionListParamsPayer"] """ - Optionally filter by the payer associated with Billing Cadences which the Rate Card Subscriptions are subscribed to. - Mutually exclusive with `billing_cadence`, `rate_card`, and `rate_card_version`. + Optionally filter by the payer associated with Billing Groups which the Rate Card Subscriptions are subscribed to. + Mutually exclusive with `billing_group`, `rate_card`, and `rate_card_version`. """ rate_card: NotRequired[str] """ - Optionally filter by a RateCard. Mutually exclusive with `billing_cadence`, `payers`, and `rate_card_version`. + Optionally filter by a RateCard. Mutually exclusive with `billing_group`, `payers`, and `rate_card_version`. """ rate_card_version: NotRequired[str] """ - Optionally filter by a RateCard version. Mutually exclusive with `billing_cadence`, `payers`, and `rate_card`. + Optionally filter by a RateCard version. Mutually exclusive with `billing_group`, `payers`, and `rate_card`. """ servicing_status: NotRequired[ Literal["active", "canceled", "paused", "pending"] @@ -37,7 +37,7 @@ class RateCardSubscriptionListParams(TypedDict): class RateCardSubscriptionListParamsPayer(TypedDict): customer: NotRequired[str] """ - The ID of the Customer object. If provided, only the Rate Card Subscriptions that are subscribed on the Billing Cadences with the specified payer will be returned. + The ID of the Customer object. If provided, only the Rate Card Subscriptions that are subscribed on the Billing Groups with the specified payer will be returned. """ type: Union[Literal["customer"], str] """ diff --git a/stripe/params/v2/billing/contracts/__init__.py b/stripe/params/v2/billing/contracts/__init__.py index 0e730bd50..62c600e13 100644 --- a/stripe/params/v2/billing/contracts/__init__.py +++ b/stripe/params/v2/billing/contracts/__init__.py @@ -4,10 +4,7 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: - from stripe.params.v2.billing.contracts import ( - pricing_lines as pricing_lines, - terms as terms, - ) + from stripe.params.v2.billing.contracts import terms as terms from stripe.params.v2.billing.contracts._term_list_contract_terms_params import ( TermListContractTermsParams as TermListContractTermsParams, ) @@ -17,10 +14,6 @@ # name -> (import_target, is_submodule) _import_map = { - "pricing_lines": ( - "stripe.params.v2.billing.contracts.pricing_lines", - True, - ), "terms": ("stripe.params.v2.billing.contracts.terms", True), "TermListContractTermsParams": ( "stripe.params.v2.billing.contracts._term_list_contract_terms_params", diff --git a/stripe/params/v2/billing/contracts/_term_list_contract_terms_params.py b/stripe/params/v2/billing/contracts/_term_list_contract_terms_params.py index 5f26c7e17..68ad9e10e 100644 --- a/stripe/params/v2/billing/contracts/_term_list_contract_terms_params.py +++ b/stripe/params/v2/billing/contracts/_term_list_contract_terms_params.py @@ -9,7 +9,7 @@ class TermListContractTermsParams(TypedDict): Maximum results per page. """ type: NotRequired[ - "Literal['ad_hoc_product', 'pricing_override', 'recurring_price']|str" + "Literal['pricing_override', 'recurring_price', 'scheduled_fee']|str" ] """ Filter terms by type. diff --git a/stripe/params/v2/billing/contracts/pricing_lines/__init__.py b/stripe/params/v2/billing/contracts/pricing_lines/__init__.py deleted file mode 100644 index 93218ceb6..000000000 --- a/stripe/params/v2/billing/contracts/pricing_lines/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- 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.billing.contracts.pricing_lines._quantity_change_list_contract_pricing_line_quantity_changes_params import ( - QuantityChangeListContractPricingLineQuantityChangesParams as QuantityChangeListContractPricingLineQuantityChangesParams, - ) - -# name -> (import_target, is_submodule) -_import_map = { - "QuantityChangeListContractPricingLineQuantityChangesParams": ( - "stripe.params.v2.billing.contracts.pricing_lines._quantity_change_list_contract_pricing_line_quantity_changes_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/billing/contracts/pricing_lines/_quantity_change_list_contract_pricing_line_quantity_changes_params.py b/stripe/params/v2/billing/contracts/pricing_lines/_quantity_change_list_contract_pricing_line_quantity_changes_params.py deleted file mode 100644 index 8f2d24e55..000000000 --- a/stripe/params/v2/billing/contracts/pricing_lines/_quantity_change_list_contract_pricing_line_quantity_changes_params.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import NotRequired, TypedDict - - -class QuantityChangeListContractPricingLineQuantityChangesParams(TypedDict): - limit: NotRequired[int] - """ - The limit for the number of results per page. - """ diff --git a/stripe/params/v2/billing/cadences/__init__.py b/stripe/params/v2/billing/groups/__init__.py similarity index 60% rename from stripe/params/v2/billing/cadences/__init__.py rename to stripe/params/v2/billing/groups/__init__.py index 00c40b56d..8ba787e89 100644 --- a/stripe/params/v2/billing/cadences/__init__.py +++ b/stripe/params/v2/billing/groups/__init__.py @@ -4,21 +4,28 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: - from stripe.params.v2.billing.cadences._spend_modifier_rule_list_params import ( + from stripe.params.v2.billing.groups._invoice_create_params import ( + InvoiceCreateParams as InvoiceCreateParams, + ) + from stripe.params.v2.billing.groups._spend_modifier_rule_list_params import ( SpendModifierRuleListParams as SpendModifierRuleListParams, ) - from stripe.params.v2.billing.cadences._spend_modifier_rule_retrieve_params import ( + from stripe.params.v2.billing.groups._spend_modifier_rule_retrieve_params import ( SpendModifierRuleRetrieveParams as SpendModifierRuleRetrieveParams, ) # name -> (import_target, is_submodule) _import_map = { + "InvoiceCreateParams": ( + "stripe.params.v2.billing.groups._invoice_create_params", + False, + ), "SpendModifierRuleListParams": ( - "stripe.params.v2.billing.cadences._spend_modifier_rule_list_params", + "stripe.params.v2.billing.groups._spend_modifier_rule_list_params", False, ), "SpendModifierRuleRetrieveParams": ( - "stripe.params.v2.billing.cadences._spend_modifier_rule_retrieve_params", + "stripe.params.v2.billing.groups._spend_modifier_rule_retrieve_params", False, ), } diff --git a/stripe/params/v2/billing/groups/_invoice_create_params.py b/stripe/params/v2/billing/groups/_invoice_create_params.py new file mode 100644 index 000000000..475c3e46e --- /dev/null +++ b/stripe/params/v2/billing/groups/_invoice_create_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class InvoiceCreateParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/cadences/_spend_modifier_rule_list_params.py b/stripe/params/v2/billing/groups/_spend_modifier_rule_list_params.py similarity index 100% rename from stripe/params/v2/billing/cadences/_spend_modifier_rule_list_params.py rename to stripe/params/v2/billing/groups/_spend_modifier_rule_list_params.py diff --git a/stripe/params/v2/billing/cadences/_spend_modifier_rule_retrieve_params.py b/stripe/params/v2/billing/groups/_spend_modifier_rule_retrieve_params.py similarity index 100% rename from stripe/params/v2/billing/cadences/_spend_modifier_rule_retrieve_params.py rename to stripe/params/v2/billing/groups/_spend_modifier_rule_retrieve_params.py diff --git a/stripe/params/v2/core/__init__.py b/stripe/params/v2/core/__init__.py index 386bbf668..002d36a62 100644 --- a/stripe/params/v2/core/__init__.py +++ b/stripe/params/v2/core/__init__.py @@ -120,6 +120,9 @@ AccountCreateParamsConfigurationMerchantCapabilitiesBancontactPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBancontactPayments, AccountCreateParamsConfigurationMerchantCapabilitiesBancontactPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesBancontactPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigration, + AccountCreateParamsConfigurationMerchantCapabilitiesBilliePayments as AccountCreateParamsConfigurationMerchantCapabilitiesBilliePayments, + AccountCreateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtections, + AccountCreateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtectionsPspMigration, AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments, AccountCreateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigration, @@ -174,6 +177,9 @@ AccountCreateParamsConfigurationMerchantCapabilitiesLinkPayments as AccountCreateParamsConfigurationMerchantCapabilitiesLinkPayments, AccountCreateParamsConfigurationMerchantCapabilitiesLinkPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesLinkPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigration, + AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtections, + AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtectionsPspMigration, AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPayments, AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigration, @@ -186,6 +192,9 @@ AccountCreateParamsConfigurationMerchantCapabilitiesNaverPayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesNaverPayPayments, AccountCreateParamsConfigurationMerchantCapabilitiesNaverPayPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesNaverPayPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigration, + AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments as AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtections, + AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtectionsPspMigration, AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPayments as AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPayments, AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigration, @@ -201,6 +210,12 @@ AccountCreateParamsConfigurationMerchantCapabilitiesPaynowPayments as AccountCreateParamsConfigurationMerchantCapabilitiesPaynowPayments, AccountCreateParamsConfigurationMerchantCapabilitiesPaynowPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesPaynowPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigration, + AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtections, + AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtectionsPspMigration, + AccountCreateParamsConfigurationMerchantCapabilitiesPixPayments as AccountCreateParamsConfigurationMerchantCapabilitiesPixPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesPixPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesPixPaymentsProtections, + AccountCreateParamsConfigurationMerchantCapabilitiesPixPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesPixPaymentsProtectionsPspMigration, AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPayments, AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigration, @@ -231,6 +246,12 @@ AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSwishPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesSwishPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigration, + AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPayments as AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtections, + AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtectionsPspMigration, + AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPayments as AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtections, + AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtectionsPspMigration, AccountCreateParamsConfigurationMerchantCapabilitiesTwintPayments as AccountCreateParamsConfigurationMerchantCapabilitiesTwintPayments, AccountCreateParamsConfigurationMerchantCapabilitiesTwintPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesTwintPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigration, @@ -243,6 +264,15 @@ AccountCreateParamsConfigurationMerchantCapabilitiesVippsPayments as AccountCreateParamsConfigurationMerchantCapabilitiesVippsPayments, AccountCreateParamsConfigurationMerchantCapabilitiesVippsPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesVippsPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesVippsPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesVippsPaymentsProtectionsPspMigration, + AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPayments as AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtections, + AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtectionsPspMigration, + AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtections, + AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtectionsPspMigration, + AccountCreateParamsConfigurationMerchantCapabilitiesWeroPayments as AccountCreateParamsConfigurationMerchantCapabilitiesWeroPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtections, + AccountCreateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtectionsPspMigration, AccountCreateParamsConfigurationMerchantCapabilitiesZipPayments as AccountCreateParamsConfigurationMerchantCapabilitiesZipPayments, AccountCreateParamsConfigurationMerchantCapabilitiesZipPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesZipPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigration, @@ -252,6 +282,11 @@ AccountCreateParamsConfigurationMerchantKonbiniPayments as AccountCreateParamsConfigurationMerchantKonbiniPayments, AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupport as AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupport, AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupportHours as AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupportHours, + AccountCreateParamsConfigurationMerchantPaypayPayments as AccountCreateParamsConfigurationMerchantPaypayPayments, + AccountCreateParamsConfigurationMerchantPaypayPaymentsSite as AccountCreateParamsConfigurationMerchantPaypayPaymentsSite, + AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteAccessible as AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteAccessible, + AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment as AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment, + AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteRestricted as AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteRestricted, AccountCreateParamsConfigurationMerchantScriptStatementDescriptor as AccountCreateParamsConfigurationMerchantScriptStatementDescriptor, AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKana as AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKana, AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji as AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji, @@ -278,6 +313,15 @@ AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessCustodialStorageOutboundUsdc as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessCustodialStorageOutboundUsdc, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessCustodialStorageOutboundUsdcProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessCustodialStorageOutboundUsdcProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessCustodialStorageOutboundUsdcProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessCustodialStorageOutboundUsdcProtectionsPspMigration, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorage as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorage, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInbound as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInbound, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsd as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsd, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtections, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtectionsPspMigration, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutbound as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutbound, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsd as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsd, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtections, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtectionsPspMigration, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInbound as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInbound, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundAud as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundAud, @@ -564,6 +608,9 @@ AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSwift as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSwift, AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSwiftProtections as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSwiftProtections, AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSwiftProtectionsPspMigration as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSwiftProtectionsPspMigration, + AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTips as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTips, + AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtections as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtections, + AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtectionsPspMigration as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtectionsPspMigration, AccountCreateParamsConfigurationRecipientCapabilitiesCards as AccountCreateParamsConfigurationRecipientCapabilitiesCards, AccountCreateParamsConfigurationRecipientCapabilitiesCardsProtections as AccountCreateParamsConfigurationRecipientCapabilitiesCardsProtections, AccountCreateParamsConfigurationRecipientCapabilitiesCardsProtectionsPspMigration as AccountCreateParamsConfigurationRecipientCapabilitiesCardsProtectionsPspMigration, @@ -594,6 +641,7 @@ AccountCreateParamsIdentityAttestationsRepresentativeDeclaration as AccountCreateParamsIdentityAttestationsRepresentativeDeclaration, AccountCreateParamsIdentityAttestationsTermsOfService as AccountCreateParamsIdentityAttestationsTermsOfService, AccountCreateParamsIdentityAttestationsTermsOfServiceAccount as AccountCreateParamsIdentityAttestationsTermsOfServiceAccount, + AccountCreateParamsIdentityAttestationsTermsOfServiceBusinessDemandDepositAccountFifthThird as AccountCreateParamsIdentityAttestationsTermsOfServiceBusinessDemandDepositAccountFifthThird, AccountCreateParamsIdentityAttestationsTermsOfServiceCardCreator as AccountCreateParamsIdentityAttestationsTermsOfServiceCardCreator, AccountCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercial as AccountCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercial, AccountCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialAccountHolder as AccountCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialAccountHolder, @@ -718,6 +766,7 @@ from stripe.params.v2.core._account_link_create_params import ( AccountLinkCreateParams as AccountLinkCreateParams, AccountLinkCreateParamsUseCase as AccountLinkCreateParamsUseCase, + AccountLinkCreateParamsUseCaseAccountDashboard as AccountLinkCreateParamsUseCaseAccountDashboard, AccountLinkCreateParamsUseCaseAccountOnboarding as AccountLinkCreateParamsUseCaseAccountOnboarding, AccountLinkCreateParamsUseCaseAccountOnboardingCollectionOptions as AccountLinkCreateParamsUseCaseAccountOnboardingCollectionOptions, AccountLinkCreateParamsUseCaseAccountUpdate as AccountLinkCreateParamsUseCaseAccountUpdate, @@ -978,6 +1027,9 @@ AccountUpdateParamsConfigurationMerchantCapabilitiesBancontactPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBancontactPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesBancontactPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesBancontactPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigration, + AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtections, + AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtectionsPspMigration, AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigration, @@ -1032,6 +1084,9 @@ AccountUpdateParamsConfigurationMerchantCapabilitiesLinkPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesLinkPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesLinkPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesLinkPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigration, + AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtections, + AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtectionsPspMigration, AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigration, @@ -1044,6 +1099,9 @@ AccountUpdateParamsConfigurationMerchantCapabilitiesNaverPayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesNaverPayPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesNaverPayPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesNaverPayPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigration, + AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtections, + AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtectionsPspMigration, AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigration, @@ -1059,6 +1117,12 @@ AccountUpdateParamsConfigurationMerchantCapabilitiesPaynowPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesPaynowPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesPaynowPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesPaynowPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigration, + AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtections, + AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtectionsPspMigration, + AccountUpdateParamsConfigurationMerchantCapabilitiesPixPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesPixPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesPixPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesPixPaymentsProtections, + AccountUpdateParamsConfigurationMerchantCapabilitiesPixPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesPixPaymentsProtectionsPspMigration, AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigration, @@ -1089,6 +1153,12 @@ AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigration, + AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtections, + AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtectionsPspMigration, + AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtections, + AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtectionsPspMigration, AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigration, @@ -1101,6 +1171,15 @@ AccountUpdateParamsConfigurationMerchantCapabilitiesVippsPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesVippsPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesVippsPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesVippsPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesVippsPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesVippsPaymentsProtectionsPspMigration, + AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtections, + AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtectionsPspMigration, + AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtections, + AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtectionsPspMigration, + AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtections, + AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtectionsPspMigration, AccountUpdateParamsConfigurationMerchantCapabilitiesZipPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesZipPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesZipPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesZipPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigration, @@ -1110,6 +1189,11 @@ AccountUpdateParamsConfigurationMerchantKonbiniPayments as AccountUpdateParamsConfigurationMerchantKonbiniPayments, AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupport as AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupport, AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupportHours as AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupportHours, + AccountUpdateParamsConfigurationMerchantPaypayPayments as AccountUpdateParamsConfigurationMerchantPaypayPayments, + AccountUpdateParamsConfigurationMerchantPaypayPaymentsSite as AccountUpdateParamsConfigurationMerchantPaypayPaymentsSite, + AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteAccessible as AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteAccessible, + AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment as AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment, + AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteRestricted as AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteRestricted, AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor, AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKana as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKana, AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji, @@ -1136,6 +1220,15 @@ AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessCustodialStorageOutboundUsdc as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessCustodialStorageOutboundUsdc, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessCustodialStorageOutboundUsdcProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessCustodialStorageOutboundUsdcProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessCustodialStorageOutboundUsdcProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessCustodialStorageOutboundUsdcProtectionsPspMigration, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorage as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorage, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInbound as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInbound, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsd as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsd, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtections, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtectionsPspMigration, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutbound as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutbound, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsd as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsd, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtections, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtectionsPspMigration, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInbound as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInbound, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundAud as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundAud, @@ -1422,6 +1515,9 @@ AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSwift as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSwift, AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSwiftProtections as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSwiftProtections, AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSwiftProtectionsPspMigration as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSwiftProtectionsPspMigration, + AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTips as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTips, + AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtections as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtections, + AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtectionsPspMigration as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtectionsPspMigration, AccountUpdateParamsConfigurationRecipientCapabilitiesCards as AccountUpdateParamsConfigurationRecipientCapabilitiesCards, AccountUpdateParamsConfigurationRecipientCapabilitiesCardsProtections as AccountUpdateParamsConfigurationRecipientCapabilitiesCardsProtections, AccountUpdateParamsConfigurationRecipientCapabilitiesCardsProtectionsPspMigration as AccountUpdateParamsConfigurationRecipientCapabilitiesCardsProtectionsPspMigration, @@ -1452,6 +1548,7 @@ AccountUpdateParamsIdentityAttestationsRepresentativeDeclaration as AccountUpdateParamsIdentityAttestationsRepresentativeDeclaration, AccountUpdateParamsIdentityAttestationsTermsOfService as AccountUpdateParamsIdentityAttestationsTermsOfService, AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount as AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount, + AccountUpdateParamsIdentityAttestationsTermsOfServiceBusinessDemandDepositAccountFifthThird as AccountUpdateParamsIdentityAttestationsTermsOfServiceBusinessDemandDepositAccountFifthThird, AccountUpdateParamsIdentityAttestationsTermsOfServiceCardCreator as AccountUpdateParamsIdentityAttestationsTermsOfServiceCardCreator, AccountUpdateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercial as AccountUpdateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercial, AccountUpdateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialAccountHolder as AccountUpdateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialAccountHolder, @@ -2092,6 +2189,18 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantCapabilitiesBilliePayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -2308,6 +2417,18 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -2356,6 +2477,18 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -2416,6 +2549,30 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesPixPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesPixPaymentsProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesPixPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -2536,6 +2693,30 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantCapabilitiesTwintPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -2584,6 +2765,42 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesWeroPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantCapabilitiesZipPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -2620,6 +2837,26 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantPaypayPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantPaypayPaymentsSite": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteAccessible": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteRestricted": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantScriptStatementDescriptor": ( "stripe.params.v2.core._account_create_params", False, @@ -2724,6 +2961,42 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorage": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInbound": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsd": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutbound": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsd": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage": ( "stripe.params.v2.core._account_create_params", False, @@ -3868,6 +4141,18 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTips": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationRecipientCapabilitiesCards": ( "stripe.params.v2.core._account_create_params", False, @@ -3988,6 +4273,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsIdentityAttestationsTermsOfServiceBusinessDemandDepositAccountFifthThird": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsIdentityAttestationsTermsOfServiceCardCreator": ( "stripe.params.v2.core._account_create_params", False, @@ -4468,6 +4757,10 @@ "stripe.params.v2.core._account_link_create_params", False, ), + "AccountLinkCreateParamsUseCaseAccountDashboard": ( + "stripe.params.v2.core._account_link_create_params", + False, + ), "AccountLinkCreateParamsUseCaseAccountOnboarding": ( "stripe.params.v2.core._account_link_create_params", False, @@ -5441,6 +5734,18 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments": ( "stripe.params.v2.core._account_update_params", False, @@ -5657,6 +5962,18 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPayments": ( "stripe.params.v2.core._account_update_params", False, @@ -5705,6 +6022,18 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPayments": ( "stripe.params.v2.core._account_update_params", False, @@ -5765,6 +6094,30 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesPixPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesPixPaymentsProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesPixPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments": ( "stripe.params.v2.core._account_update_params", False, @@ -5885,6 +6238,30 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPayments": ( "stripe.params.v2.core._account_update_params", False, @@ -5933,6 +6310,42 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantCapabilitiesZipPayments": ( "stripe.params.v2.core._account_update_params", False, @@ -5969,6 +6382,26 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantPaypayPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSite": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteAccessible": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteRestricted": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor": ( "stripe.params.v2.core._account_update_params", False, @@ -6073,6 +6506,42 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorage": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInbound": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsd": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutbound": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsd": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage": ( "stripe.params.v2.core._account_update_params", False, @@ -7217,6 +7686,18 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTips": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationRecipientCapabilitiesCards": ( "stripe.params.v2.core._account_update_params", False, @@ -7337,6 +7818,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsIdentityAttestationsTermsOfServiceBusinessDemandDepositAccountFifthThird": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsIdentityAttestationsTermsOfServiceCardCreator": ( "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 72d64ef83..8c6b1ca2e 100644 --- a/stripe/params/v2/core/_account_create_params.py +++ b/stripe/params/v2/core/_account_create_params.py @@ -26,7 +26,7 @@ class AccountCreateParams(TypedDict): """ dashboard: NotRequired[Literal["express", "full", "none"]] """ - A value indicating the Stripe dashboard this Account has access to. This will depend on which configurations are enabled for this account. + Specifies the account's Stripe-hosted Dashboard access. Available values depend on the configurations enabled for the account. Learn more about [configuring Dashboard access](https://docs.stripe.com/connect/accounts-v2/connected-account-configuration#set-dashboard-access). """ defaults: NotRequired["AccountCreateParamsDefaults"] """ @@ -1049,6 +1049,12 @@ class AccountCreateParamsConfigurationMerchant(TypedDict): """ The Merchant Category Code (MCC) for the Merchant Configuration. MCCs classify businesses based on the goods or services they provide. """ + paypay_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantPaypayPayments" + ] + """ + Settings for PayPay payments. + """ script_statement_descriptor: NotRequired[ "AccountCreateParamsConfigurationMerchantScriptStatementDescriptor" ] @@ -1166,6 +1172,12 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process Bancontact payments. """ + billie_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesBilliePayments" + ] + """ + Allow the merchant to process Billie payments. + """ blik_payments: NotRequired[ "AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments" ] @@ -1274,6 +1286,12 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process Link payments. """ + mb_way_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPayments" + ] + """ + Allow the merchant to process MB WAY payments. + """ mobilepay_payments: NotRequired[ "AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPayments" ] @@ -1298,6 +1316,12 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process Naver Pay payments. """ + nz_bank_account_becs_debit_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments" + ] + """ + Allow the merchant to process New Zealand BECS Direct Debit payments. + """ oxxo_payments: NotRequired[ "AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPayments" ] @@ -1328,6 +1352,18 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process PayNow payments. """ + paypay_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPayments" + ] + """ + Allow the merchant to process PayPay payments. + """ + pix_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesPixPayments" + ] + """ + Allow the merchant to process Pix payments. + """ promptpay_payments: NotRequired[ "AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPayments" ] @@ -1388,6 +1424,18 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process Swish payments. """ + touch_n_go_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPayments" + ] + """ + Allow the merchant to process Touch 'n Go payments. + """ + truemoney_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPayments" + ] + """ + Allow the merchant to process TrueMoney payments. + """ twint_payments: NotRequired[ "AccountCreateParamsConfigurationMerchantCapabilitiesTwintPayments" ] @@ -1412,6 +1460,24 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process Vipps payments. """ + wechat_pay_mobile_web_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPayments" + ] + """ + Allow the merchant to process WeChat Pay mobile web payments. Requires the wechat_pay_payments capability. + """ + wechat_pay_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPayments" + ] + """ + Allow the merchant to process WeChat Pay payments. + """ + wero_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesWeroPayments" + ] + """ + Allow the merchant to process Wero payments. + """ zip_payments: NotRequired[ "AccountCreateParamsConfigurationMerchantCapabilitiesZipPayments" ] @@ -1750,6 +1816,39 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesBancontactPaymentsProt """ +class AccountCreateParamsConfigurationMerchantCapabilitiesBilliePayments( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments( TypedDict, ): @@ -2344,6 +2443,39 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesLinkPaymentsProtection """ +class AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPayments( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPayments( TypedDict, ): @@ -2476,6 +2608,39 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesNaverPayPaymentsProtec """ +class AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPayments( TypedDict, ): @@ -2641,6 +2806,72 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesPaynowPaymentsProtecti """ +class AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPayments( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesPixPayments( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesPixPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesPixPaymentsProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMerchantCapabilitiesPixPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesPixPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPayments( TypedDict, ): @@ -2971,6 +3202,72 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesSwishPaymentsProtectio """ +class AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPayments( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPayments( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMerchantCapabilitiesTwintPayments( TypedDict, ): @@ -3103,6 +3400,105 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesVippsPaymentsProtectio """ +class AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPayments( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPayments( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesWeroPayments( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMerchantCapabilitiesZipPayments( TypedDict, ): @@ -3164,6 +3560,10 @@ class AccountCreateParamsConfigurationMerchantGrossSettlement(TypedDict): class AccountCreateParamsConfigurationMerchantKonbiniPayments(TypedDict): + additional_material: NotRequired[str] + """ + Information provided to support the onboarding process for Konbini payments. + """ support: NotRequired[ "AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupport" ] @@ -3204,6 +3604,80 @@ class AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupportHours( """ +class AccountCreateParamsConfigurationMerchantPaypayPayments(TypedDict): + additional_files: List[str] + """ + Additional files supporting PayPay payments configuration. + """ + goods_type: NotRequired[Literal["digital_content", "other"]] + """ + The type of goods sold by the merchant for PayPay payments. + """ + site: NotRequired[ + "AccountCreateParamsConfigurationMerchantPaypayPaymentsSite" + ] + """ + The business's website for PayPay payments. + """ + specified_commercial_transactions_act_url: NotRequired[str] + """ + URL to the Specified Commercial Transactions Act page for PayPay payments. + """ + + +class AccountCreateParamsConfigurationMerchantPaypayPaymentsSite(TypedDict): + accessible: NotRequired[ + "AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteAccessible" + ] + """ + Additional information about the business's website when it's accessible. + """ + in_development: NotRequired[ + "AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment" + ] + """ + Additional information about the business's website when it's in development. + """ + restricted: NotRequired[ + "AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteRestricted" + ] + """ + Additional information about the business's website when it has restricted access. + """ + type: NotRequired[Literal["accessible", "in_development", "restricted"]] + """ + The status of the business's website. + """ + + +class AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteAccessible( + TypedDict, +): + pass + + +class AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment( + TypedDict, +): + password: NotRequired[str] + """ + The password needed to access the business's website. + """ + username: NotRequired[str] + """ + The username needed to access the business's website. + """ + + +class AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteRestricted( + TypedDict, +): + payment_flow_file: NotRequired[str] + """ + The file explaining the payment flow for the business. + """ + + class AccountCreateParamsConfigurationMerchantScriptStatementDescriptor( TypedDict, ): @@ -3420,6 +3894,12 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilities(TypedDict): """ Can send or receive business custodial storage-type funds on Stripe. """ + business_demand_deposit_account_fifth_third_storage: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorage" + ] + """ + Capabilities related to business storage FinancialAccounts backed by Fifth Third demand deposit accounts. + """ business_storage: NotRequired[ "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage" ] @@ -3653,6 +4133,111 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessCustodialS """ +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorage( + TypedDict, +): + inbound: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInbound" + ] + """ + Can receive funds in business storage FinancialAccounts backed by Fifth Third demand deposit accounts. + """ + outbound: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutbound" + ] + """ + Can send funds from business storage FinancialAccounts backed by Fifth Third demand deposit accounts. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInbound( + TypedDict, +): + usd: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsd" + ] + """ + Can receive funds in business storage FinancialAccounts backed by Fifth Third demand deposit accounts in USD. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsd( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutbound( + TypedDict, +): + usd: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsd" + ] + """ + Can send funds from business storage FinancialAccounts backed by Fifth Third demand deposit accounts in USD. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsd( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage( TypedDict, ): @@ -6930,6 +7515,12 @@ class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts( """ Enables this Account to receive OutboundPayments to linked bank accounts over SWIFT. """ + tips: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTips" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over TIPS rails. + """ class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsAch( @@ -7295,6 +7886,39 @@ class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSwiftProt """ +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTips( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationRecipientCapabilitiesCards(TypedDict): protections: NotRequired[ "AccountCreateParamsConfigurationRecipientCapabilitiesCardsProtections" @@ -7643,11 +8267,11 @@ class AccountCreateParamsDefaultsResponsibilities(TypedDict): "application", "application_custom", "application_express", "stripe" ] """ - A value indicating the party responsible for collecting fees from this account. + Controls who pays Stripe fees for direct charges and other pricing-control-eligible Stripe products. For new integrations, setting `losses_collector=application` requires `fees_collector=application`; legacy Custom and Express accounts can also use `application_custom` or `application_express`. For destination charges and separate charges and transfers, Stripe bills the platform regardless of this setting. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior), including application fees and pricing considerations. """ losses_collector: Literal["application", "stripe"] """ - A value indicating who is responsible for losses when this Account can't pay back negative balances from payments. + Controls who is responsible for payment-related negative balances on this account. The platform remains liable for negative balances on its own account. To use Stripe negative balance liability, your integration must meet [Managed Risk requirements](https://docs.stripe.com/connect/risk-management/managed-risk). """ requirements_collector: NotRequired[Literal["application", "stripe"]] """ @@ -7793,6 +8417,12 @@ class AccountCreateParamsIdentityAttestationsTermsOfService(TypedDict): """ Details on the Account's acceptance of the Stripe Services Agreement. """ + business_demand_deposit_account_fifth_third: NotRequired[ + "AccountCreateParamsIdentityAttestationsTermsOfServiceBusinessDemandDepositAccountFifthThird" + ] + """ + Terms of service acceptances for financial accounts backed by Fifth Third demand deposit accounts. + """ card_creator: NotRequired[ "AccountCreateParamsIdentityAttestationsTermsOfServiceCardCreator" ] @@ -7840,6 +8470,23 @@ class AccountCreateParamsIdentityAttestationsTermsOfServiceAccount(TypedDict): """ +class AccountCreateParamsIdentityAttestationsTermsOfServiceBusinessDemandDepositAccountFifthThird( + TypedDict, +): + date: str + """ + The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: str + """ + The IP address from which the Account's representative accepted the terms of service. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the Account's representative accepted the terms of service. + """ + + class AccountCreateParamsIdentityAttestationsTermsOfServiceCardCreator( TypedDict, ): diff --git a/stripe/params/v2/core/_account_link_create_params.py b/stripe/params/v2/core/_account_link_create_params.py index 2714bec65..7b4c6354f 100644 --- a/stripe/params/v2/core/_account_link_create_params.py +++ b/stripe/params/v2/core/_account_link_create_params.py @@ -18,6 +18,12 @@ class AccountLinkCreateParams(TypedDict): class AccountLinkCreateParamsUseCase(TypedDict): + account_dashboard: NotRequired[ + "AccountLinkCreateParamsUseCaseAccountDashboard" + ] + """ + Hash containing configuration options for an Account Link that provides access to the account's Stripe-hosted Dashboard. + """ account_onboarding: NotRequired[ "AccountLinkCreateParamsUseCaseAccountOnboarding" ] @@ -42,6 +48,7 @@ class AccountLinkCreateParamsUseCase(TypedDict): """ type: Union[ Literal[ + "account_dashboard", "account_onboarding", "account_update", "recipient_onboarding", @@ -54,6 +61,14 @@ class AccountLinkCreateParamsUseCase(TypedDict): """ +class AccountLinkCreateParamsUseCaseAccountDashboard(TypedDict): + refresh_url: str + """ + The URL to redirect to if the Account Link has expired or has already + been used. Authenticate the user before generating a replacement link. + """ + + class AccountLinkCreateParamsUseCaseAccountOnboarding(TypedDict): collection_options: NotRequired[ "AccountLinkCreateParamsUseCaseAccountOnboardingCollectionOptions" diff --git a/stripe/params/v2/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py index cccdfc992..8b23f4d6c 100644 --- a/stripe/params/v2/core/_account_update_params.py +++ b/stripe/params/v2/core/_account_update_params.py @@ -26,7 +26,7 @@ class AccountUpdateParams(TypedDict): """ dashboard: NotRequired[Literal["express", "full", "none"]] """ - A value indicating the Stripe dashboard this Account has access to. This will depend on which configurations are enabled for this account. + Specifies the account's Stripe-hosted Dashboard access. Available values depend on the configurations enabled for the account. Learn more about [configuring Dashboard access](https://docs.stripe.com/connect/accounts-v2/connected-account-configuration#set-dashboard-access). """ defaults: NotRequired["AccountUpdateParamsDefaults"] """ @@ -1075,6 +1075,12 @@ class AccountUpdateParamsConfigurationMerchant(TypedDict): """ The Merchant Category Code (MCC) for the merchant. MCCs classify businesses based on the goods or services they provide. """ + paypay_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantPaypayPayments" + ] + """ + Settings for PayPay payments. + """ script_statement_descriptor: NotRequired[ "AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor" ] @@ -1192,6 +1198,12 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process Bancontact payments. """ + billie_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePayments" + ] + """ + Allow the merchant to process Billie payments. + """ blik_payments: NotRequired[ "AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments" ] @@ -1300,6 +1312,12 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process Link payments. """ + mb_way_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPayments" + ] + """ + Allow the merchant to process MB WAY payments. + """ mobilepay_payments: NotRequired[ "AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPayments" ] @@ -1324,6 +1342,12 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process Naver Pay payments. """ + nz_bank_account_becs_debit_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments" + ] + """ + Allow the merchant to process New Zealand BECS Direct Debit payments. + """ oxxo_payments: NotRequired[ "AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPayments" ] @@ -1354,6 +1378,18 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process PayNow payments. """ + paypay_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPayments" + ] + """ + Allow the merchant to process PayPay payments. + """ + pix_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesPixPayments" + ] + """ + Allow the merchant to process Pix payments. + """ promptpay_payments: NotRequired[ "AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments" ] @@ -1414,6 +1450,18 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process Swish payments. """ + touch_n_go_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPayments" + ] + """ + Allow the merchant to process Touch 'n Go payments. + """ + truemoney_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPayments" + ] + """ + Allow the merchant to process TrueMoney payments. + """ twint_payments: NotRequired[ "AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPayments" ] @@ -1438,6 +1486,24 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process Vipps payments. """ + wechat_pay_mobile_web_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPayments" + ] + """ + Allow the merchant to process WeChat Pay mobile web payments. Requires the wechat_pay_payments capability. + """ + wechat_pay_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPayments" + ] + """ + Allow the merchant to process WeChat Pay payments. + """ + wero_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPayments" + ] + """ + Allow the merchant to process Wero payments. + """ zip_payments: NotRequired[ "AccountUpdateParamsConfigurationMerchantCapabilitiesZipPayments" ] @@ -1776,6 +1842,39 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesBancontactPaymentsProt """ +class AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePayments( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments( TypedDict, ): @@ -2370,6 +2469,39 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesLinkPaymentsProtection """ +class AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPayments( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPayments( TypedDict, ): @@ -2502,6 +2634,39 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesNaverPayPaymentsProtec """ +class AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPayments( TypedDict, ): @@ -2667,6 +2832,72 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesPaynowPaymentsProtecti """ +class AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPayments( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesPixPayments( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesPixPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesPixPaymentsProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMerchantCapabilitiesPixPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesPixPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments( TypedDict, ): @@ -2997,6 +3228,72 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPaymentsProtectio """ +class AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPayments( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesTouchNGoPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPayments( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesTruemoneyPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPayments( TypedDict, ): @@ -3129,6 +3426,105 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesVippsPaymentsProtectio """ +class AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPayments( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayMobileWebPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPayments( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesWechatPayPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPayments( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesWeroPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMerchantCapabilitiesZipPayments( TypedDict, ): @@ -3190,6 +3586,10 @@ class AccountUpdateParamsConfigurationMerchantGrossSettlement(TypedDict): class AccountUpdateParamsConfigurationMerchantKonbiniPayments(TypedDict): + additional_material: NotRequired[str] + """ + Information provided to support the onboarding process for Konbini payments. + """ support: NotRequired[ "AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupport" ] @@ -3230,6 +3630,80 @@ class AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupportHours( """ +class AccountUpdateParamsConfigurationMerchantPaypayPayments(TypedDict): + additional_files: NotRequired[List[str]] + """ + Additional files supporting PayPay payments configuration. + """ + goods_type: NotRequired[Literal["digital_content", "other"]] + """ + The type of goods sold by the merchant for PayPay payments. + """ + site: NotRequired[ + "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSite" + ] + """ + The business's website for PayPay payments. + """ + specified_commercial_transactions_act_url: NotRequired[str] + """ + URL to the Specified Commercial Transactions Act page for PayPay payments. + """ + + +class AccountUpdateParamsConfigurationMerchantPaypayPaymentsSite(TypedDict): + accessible: NotRequired[ + "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteAccessible" + ] + """ + Additional information about the business's website when it's accessible. + """ + in_development: NotRequired[ + "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment" + ] + """ + Additional information about the business's website when it's in development. + """ + restricted: NotRequired[ + "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteRestricted" + ] + """ + Additional information about the business's website when it has restricted access. + """ + type: NotRequired[Literal["accessible", "in_development", "restricted"]] + """ + The status of the business's website. + """ + + +class AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteAccessible( + TypedDict, +): + pass + + +class AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment( + TypedDict, +): + password: NotRequired[str] + """ + The password needed to access the business's website. + """ + username: NotRequired[str] + """ + The username needed to access the business's website. + """ + + +class AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteRestricted( + TypedDict, +): + payment_flow_file: NotRequired[str] + """ + The file explaining the payment flow for the business. + """ + + class AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor( TypedDict, ): @@ -3450,6 +3924,12 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilities(TypedDict): """ Can send or receive business custodial storage-type funds on Stripe. """ + business_demand_deposit_account_fifth_third_storage: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorage" + ] + """ + Capabilities related to business storage FinancialAccounts backed by Fifth Third demand deposit accounts. + """ business_storage: NotRequired[ "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage" ] @@ -3683,6 +4163,111 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessCustodialS """ +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorage( + TypedDict, +): + inbound: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInbound" + ] + """ + Can receive funds in business storage FinancialAccounts backed by Fifth Third demand deposit accounts. + """ + outbound: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutbound" + ] + """ + Can send funds from business storage FinancialAccounts backed by Fifth Third demand deposit accounts. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInbound( + TypedDict, +): + usd: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsd" + ] + """ + Can receive funds in business storage FinancialAccounts backed by Fifth Third demand deposit accounts in USD. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsd( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageInboundUsdProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutbound( + TypedDict, +): + usd: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsd" + ] + """ + Can send funds from business storage FinancialAccounts backed by Fifth Third demand deposit accounts in USD. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsd( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessDemandDepositAccountFifthThirdStorageOutboundUsdProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage( TypedDict, ): @@ -6964,6 +7549,12 @@ class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts( """ Enables this Account to receive OutboundPayments to linked bank accounts over SWIFT. """ + tips: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTips" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over TIPS rails. + """ class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsAch( @@ -7329,6 +7920,39 @@ class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSwiftProt """ +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTips( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsTipsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationRecipientCapabilitiesCards(TypedDict): protections: NotRequired[ "AccountUpdateParamsConfigurationRecipientCapabilitiesCardsProtections" @@ -7681,11 +8305,11 @@ class AccountUpdateParamsDefaultsResponsibilities(TypedDict): "application", "application_custom", "application_express", "stripe" ] """ - A value indicating the party responsible for collecting fees from this account. + Controls who pays Stripe fees for direct charges and other pricing-control-eligible Stripe products. For new integrations, setting `losses_collector=application` requires `fees_collector=application`; legacy Custom and Express accounts can also use `application_custom` or `application_express`. For destination charges and separate charges and transfers, Stripe bills the platform regardless of this setting. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior), including application fees and pricing considerations. Set this value when adding an applicable configuration to the account. You can't change it after it's set. """ losses_collector: Literal["application", "stripe"] """ - A value indicating who is responsible for losses when this Account can't pay back negative balances from payments. + Controls who is responsible for payment-related negative balances on this account. The platform remains liable for negative balances on its own account. To use Stripe negative balance liability, your integration must meet [Managed Risk requirements](https://docs.stripe.com/connect/risk-management/managed-risk). Set this value when adding an applicable configuration to the account. You can't change it after it's set. """ requirements_collector: NotRequired[Literal["application", "stripe"]] """ @@ -7831,6 +8455,12 @@ class AccountUpdateParamsIdentityAttestationsTermsOfService(TypedDict): """ Details on the Account's acceptance of the Stripe Services Agreement. """ + business_demand_deposit_account_fifth_third: NotRequired[ + "AccountUpdateParamsIdentityAttestationsTermsOfServiceBusinessDemandDepositAccountFifthThird" + ] + """ + Terms of service acceptances for financial accounts backed by Fifth Third demand deposit accounts. + """ card_creator: NotRequired[ "AccountUpdateParamsIdentityAttestationsTermsOfServiceCardCreator" ] @@ -7878,6 +8508,23 @@ class AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount(TypedDict): """ +class AccountUpdateParamsIdentityAttestationsTermsOfServiceBusinessDemandDepositAccountFifthThird( + TypedDict, +): + date: NotRequired[str] + """ + The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: NotRequired[str] + """ + The IP address from which the Account's representative accepted the terms of service. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the Account's representative accepted the terms of service. + """ + + class AccountUpdateParamsIdentityAttestationsTermsOfServiceCardCreator( TypedDict, ): diff --git a/stripe/params/v2/core/_claimable_sandbox_create_params.py b/stripe/params/v2/core/_claimable_sandbox_create_params.py index e811db55c..8d782bcb8 100644 --- a/stripe/params/v2/core/_claimable_sandbox_create_params.py +++ b/stripe/params/v2/core/_claimable_sandbox_create_params.py @@ -4,9 +4,10 @@ class ClaimableSandboxCreateParams(TypedDict): - app_channel: NotRequired[Literal["public", "testing"]] + channel: NotRequired[Literal["public", "testing"]] """ - The app channel that will be used when pre-installing your app on the claimable sandbox. + The distribution channel used to pre-install your Stripe App on the claimable sandbox. + Use `testing` to install your app's external test version or `public` to install its published version. This field defaults to `public` if omitted. """ enable_mcp_access: bool @@ -32,6 +33,10 @@ class ClaimableSandboxCreateParamsOnboardingLinkDetails(TypedDict): The URL specified should attempt to generate a new onboarding link, and re-direct the user to this new onboarding link so that they can proceed with the onboarding flow. """ + return_url: NotRequired[str] + """ + The URL offered to the user as a way back to your app after they claim the sandbox. + """ class ClaimableSandboxCreateParamsPrefill(TypedDict): @@ -42,8 +47,8 @@ class ClaimableSandboxCreateParamsPrefill(TypedDict): """ email: str """ - Email that this sandbox is meant to be claimed by. Stripe will - notify this email address before the sandbox expires. + Email address of the user who will claim the sandbox. + Stripe sends this address an invitation to claim the sandbox and a reminder before the unclaimed sandbox expires. """ name: NotRequired[str] """ diff --git a/stripe/params/v2/core/_claimable_sandbox_renew_onboarding_link_params.py b/stripe/params/v2/core/_claimable_sandbox_renew_onboarding_link_params.py index 88a811a79..10e765b83 100644 --- a/stripe/params/v2/core/_claimable_sandbox_renew_onboarding_link_params.py +++ b/stripe/params/v2/core/_claimable_sandbox_renew_onboarding_link_params.py @@ -8,17 +8,22 @@ class ClaimableSandboxRenewOnboardingLinkParams(TypedDict): "ClaimableSandboxRenewOnboardingLinkParamsOnboardingLinkDetails" ] """ - Details about the onboarding link. - If omitted, the existing onboarding link details will be reused. + Details about the onboarding link. If omitted, existing details are reused. + Omitted URL fields retain their existing values. """ class ClaimableSandboxRenewOnboardingLinkParamsOnboardingLinkDetails( TypedDict ): - refresh_url: str + refresh_url: NotRequired[str] """ The URL the user will be redirected to if the onboarding link is expired or invalid. - The URL specified should attempt to generate a new onboarding link, - and re-direct the user to this new onboarding link so that they can proceed with the onboarding flow. + If omitted, the existing refresh URL is retained. + The URL should generate a new onboarding link and redirect the user to it. + """ + return_url: NotRequired[str] + """ + The URL offered to the user as a way back to your app after they claim the sandbox. + If omitted, the existing return URL is retained. Set to null to clear it. """ diff --git a/stripe/params/v2/core/_claimable_sandbox_retrieve_params.py b/stripe/params/v2/core/_claimable_sandbox_retrieve_params.py index 63b9337d5..5e124a038 100644 --- a/stripe/params/v2/core/_claimable_sandbox_retrieve_params.py +++ b/stripe/params/v2/core/_claimable_sandbox_retrieve_params.py @@ -1,7 +1,11 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing_extensions import TypedDict +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict class ClaimableSandboxRetrieveParams(TypedDict): - pass + include: NotRequired[List[Literal["sandbox_details.api_keys"]]] + """ + Additional fields to include in the response. + """ diff --git a/stripe/params/v2/core/health/_alert_list_params.py b/stripe/params/v2/core/health/_alert_list_params.py index ac0cf2918..a6010260a 100644 --- a/stripe/params/v2/core/health/_alert_list_params.py +++ b/stripe/params/v2/core/health/_alert_list_params.py @@ -44,6 +44,7 @@ class AlertListParams(TypedDict): "api_error", "api_latency", "authorization_rate_drop", + "custom_payment_method_adapter_degraded", "elements_error", "event_generation_failure", "fraud_rate", diff --git a/stripe/params/v2/iam/_activity_log_list_params.py b/stripe/params/v2/iam/_activity_log_list_params.py index 232cbbda9..5c9356494 100644 --- a/stripe/params/v2/iam/_activity_log_list_params.py +++ b/stripe/params/v2/iam/_activity_log_list_params.py @@ -11,9 +11,14 @@ class ActivityLogListParams(TypedDict): Literal[ "account_security", "api_key", + "app", "authentication", + "connect", + "data_export", + "event_destination", "issuing", "payout", + "radar", "scim", "sso", "user_access", @@ -37,6 +42,20 @@ class ActivityLogListParams(TypedDict): "api_key_deleted", "api_key_updated", "api_key_viewed", + "application_authorized", + "application_created", + "application_deauthorized", + "app_installed", + "app_uninstalled", + "connect_express_branding_updated", + "connect_oauth_disabled", + "connect_oauth_enabled", + "connect_settings_updated", + "connect_site_link_updated", + "data_export_requested", + "event_destination_added", + "event_destination_removed", + "event_destination_updated", "issuing_activated", "issuing_balance_transfer_created", "issuing_cardholder_created", @@ -54,6 +73,17 @@ class ActivityLogListParams(TypedDict): "payout_destination_updated", "payout_schedule_edits_disabled", "payout_schedule_edits_enabled", + "payout_schedule_updated", + "radar_adaptive_3ds_disabled", + "radar_dynamic_risk_thresholds_disabled", + "radar_early_fraud_warning_disabled", + "radar_for_setup_intents_disabled", + "radar_fraud_dispute_protection_disabled", + "radar_rule_added", + "radar_rule_disabled", + "radar_rule_enabled", + "radar_rule_removed", + "radar_rule_updated", "scim_group_deleted", "scim_group_member_added", "scim_group_member_removed", @@ -104,3 +134,7 @@ class ActivityLogListParams(TypedDict): """ Maximum number of results to return per page. """ + logs_from: NotRequired[List[str]] + """ + Controls which activity logs an organization-level request returns. Specify `@self` to return logs recorded in the organization context and `@organization_members` to return logs recorded in accounts that belong to the organization. Specify both values to return logs from both sources. Defaults to `["@self"]` when omitted. Cannot be empty. + """ diff --git a/stripe/params/v2/money_management/__init__.py b/stripe/params/v2/money_management/__init__.py index fdf436784..ce859068c 100644 --- a/stripe/params/v2/money_management/__init__.py +++ b/stripe/params/v2/money_management/__init__.py @@ -98,6 +98,7 @@ from stripe.params.v2.money_management._funding_intent_update_params import ( FundingIntentUpdateParams as FundingIntentUpdateParams, FundingIntentUpdateParamsCheck as FundingIntentUpdateParamsCheck, + FundingIntentUpdateParamsSettlementTiming as FundingIntentUpdateParamsSettlementTiming, ) from stripe.params.v2.money_management._funding_session_create_params import ( FundingSessionCreateParams as FundingSessionCreateParams, @@ -291,6 +292,7 @@ ) from stripe.params.v2.money_management._received_debit_list_params import ( ReceivedDebitListParams as ReceivedDebitListParams, + ReceivedDebitListParamsCreated as ReceivedDebitListParamsCreated, ) from stripe.params.v2.money_management._received_debit_mandate_cancel_params import ( ReceivedDebitMandateCancelParams as ReceivedDebitMandateCancelParams, @@ -559,6 +561,10 @@ "stripe.params.v2.money_management._funding_intent_update_params", False, ), + "FundingIntentUpdateParamsSettlementTiming": ( + "stripe.params.v2.money_management._funding_intent_update_params", + False, + ), "FundingSessionCreateParams": ( "stripe.params.v2.money_management._funding_session_create_params", False, @@ -995,6 +1001,10 @@ "stripe.params.v2.money_management._received_debit_list_params", False, ), + "ReceivedDebitListParamsCreated": ( + "stripe.params.v2.money_management._received_debit_list_params", + False, + ), "ReceivedDebitMandateCancelParams": ( "stripe.params.v2.money_management._received_debit_mandate_cancel_params", False, diff --git a/stripe/params/v2/money_management/_financial_account_create_params.py b/stripe/params/v2/money_management/_financial_account_create_params.py index 65047c769..d06dc1eba 100644 --- a/stripe/params/v2/money_management/_financial_account_create_params.py +++ b/stripe/params/v2/money_management/_financial_account_create_params.py @@ -40,6 +40,12 @@ class FinancialAccountCreateParamsStorage(TypedDict): """ Crypto-specific storage configuration. Fiat currencies remain configured only through `holds_currencies`. """ + funds_holding_structure: NotRequired[ + "Literal['demand_deposit_account', 'for_benefit_of']|str" + ] + """ + How funds in this FinancialAccount are held. Defaults to `for_benefit_of` if not specified. + """ funds_usage_type: NotRequired["Literal['business', 'consumer']|str"] """ The usage type for funds in this FinancialAccount. Defaults to BUSINESS if not specified. diff --git a/stripe/params/v2/money_management/_financial_account_list_params.py b/stripe/params/v2/money_management/_financial_account_list_params.py index d44b60e61..7abf1616e 100644 --- a/stripe/params/v2/money_management/_financial_account_list_params.py +++ b/stripe/params/v2/money_management/_financial_account_list_params.py @@ -19,7 +19,7 @@ class FinancialAccountListParams(TypedDict): """ limit: NotRequired[int] """ - The page limit. + Maximum number of results to return. Default: 10. Valid range: 1-20. """ statuses: NotRequired[List[Literal["closed", "open", "pending"]]] """ diff --git a/stripe/params/v2/money_management/_funding_intent_update_params.py b/stripe/params/v2/money_management/_funding_intent_update_params.py index 2f48db6b4..e03c0889d 100644 --- a/stripe/params/v2/money_management/_funding_intent_update_params.py +++ b/stripe/params/v2/money_management/_funding_intent_update_params.py @@ -29,6 +29,10 @@ class FundingIntentUpdateParams(TypedDict): """ Updates to the key-value pairs attached to the FundingIntent. """ + settlement_timing: NotRequired["FundingIntentUpdateParamsSettlementTiming"] + """ + The updated settlement timing. Omit to retain the existing timing. + """ class FundingIntentUpdateParamsCheck(TypedDict): @@ -40,3 +44,10 @@ class FundingIntentUpdateParamsCheck(TypedDict): """ The ID of a File containing the front image of the check. """ + + +class FundingIntentUpdateParamsSettlementTiming(TypedDict): + delay_days_override: NotRequired[int] + """ + The number of days to delay the availability of funds after processing completes. + """ 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 f528fe1b9..984671dca 100644 --- a/stripe/params/v2/money_management/_outbound_payment_create_params.py +++ b/stripe/params/v2/money_management/_outbound_payment_create_params.py @@ -177,6 +177,7 @@ class OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccount(TypedDict): "sepa_credit", "sepa_instant", "swift", + "tips", ], str, ] diff --git a/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py b/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py index e2e2155fb..bac22bf00 100644 --- a/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py +++ b/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py @@ -111,6 +111,7 @@ class OutboundPaymentQuoteCreateParamsToPayoutMethodOptionsBankAccount( "sepa_credit", "sepa_instant", "swift", + "tips", ], str, ] diff --git a/stripe/params/v2/money_management/_outbound_transfer_create_params.py b/stripe/params/v2/money_management/_outbound_transfer_create_params.py index 035b45405..cb25ad02c 100644 --- a/stripe/params/v2/money_management/_outbound_transfer_create_params.py +++ b/stripe/params/v2/money_management/_outbound_transfer_create_params.py @@ -115,6 +115,7 @@ class OutboundTransferCreateParamsToPayoutMethodOptionsBankAccount(TypedDict): "sepa_credit", "sepa_instant", "swift", + "tips", ], str, ] diff --git a/stripe/params/v2/money_management/_payout_intent_create_params.py b/stripe/params/v2/money_management/_payout_intent_create_params.py index 1624f29bf..e476ba5e9 100644 --- a/stripe/params/v2/money_management/_payout_intent_create_params.py +++ b/stripe/params/v2/money_management/_payout_intent_create_params.py @@ -132,6 +132,7 @@ class PayoutIntentCreateParamsToPayoutMethodOptionsBankAccount(TypedDict): "sepa_credit", "sepa_instant", "swift", + "tips", ], str, ] diff --git a/stripe/params/v2/money_management/_payout_intent_update_params.py b/stripe/params/v2/money_management/_payout_intent_update_params.py index d2979e4e0..d324ab630 100644 --- a/stripe/params/v2/money_management/_payout_intent_update_params.py +++ b/stripe/params/v2/money_management/_payout_intent_update_params.py @@ -107,6 +107,7 @@ class PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccount(TypedDict): "sepa_credit", "sepa_instant", "swift", + "tips", ], str, ] 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 dc1b936ba..d7d0b4ea0 100644 --- a/stripe/params/v2/money_management/_received_debit_list_params.py +++ b/stripe/params/v2/money_management/_received_debit_list_params.py @@ -4,6 +4,10 @@ class ReceivedDebitListParams(TypedDict): + created: NotRequired["ReceivedDebitListParamsCreated"] + """ + Filter ReceivedDebits by their creation time. + """ limit: NotRequired[int] """ The page limit. @@ -16,3 +20,22 @@ class ReceivedDebitListParams(TypedDict): """ Filter by the SpendingMandate ID. """ + + +class ReceivedDebitListParamsCreated(TypedDict): + gt: NotRequired[str] + """ + Return ReceivedDebits created after this timestamp. + """ + gte: NotRequired[str] + """ + Return ReceivedDebits created on or after this timestamp. + """ + lt: NotRequired[str] + """ + Return ReceivedDebits created before this timestamp. + """ + lte: NotRequired[str] + """ + Return ReceivedDebits created on or before this timestamp. + """ diff --git a/stripe/radar/_payment_evaluation.py b/stripe/radar/_payment_evaluation.py index 8e44dabb0..782620624 100644 --- a/stripe/radar/_payment_evaluation.py +++ b/stripe/radar/_payment_evaluation.py @@ -792,6 +792,23 @@ class FraudulentPayment(StripeObject): """ Recommended action for this payment based on its evaluated signals and rules. """ + requested_signals: Optional[ + List[ + Union[ + Literal[ + "bank_initiated_return", + "card_testing", + "early_fraud_warning", + "fraudulent_dispute", + "fraudulent_payment", + ], + str, + ] + ] + ] + """ + The signals requested for this payment evaluation. Only returned when creating a payment evaluation. Includes the default signal list when `requested_signals` is omitted from the request. + """ rules: Optional[Rules] """ Details about Radar Rules associated with the payment evaluation. diff --git a/stripe/reserve/_plan.py b/stripe/reserve/_plan.py index ce9cc20ec..1d95d5a92 100644 --- a/stripe/reserve/_plan.py +++ b/stripe/reserve/_plan.py @@ -36,6 +36,10 @@ class RollingRelease(StripeObject): """ The number of days to reserve funds before releasing. """ + days_after_fulfillment: Optional[int] + """ + The number of days after the PaymentIntent's `fulfillment_date` to reserve funds before releasing. Charges without a `fulfillment_date` use `days_after_charge`. + """ expires_on: Optional[int] """ The time at which the ReservePlan expires. diff --git a/stripe/tax/_certificate.py b/stripe/tax/_certificate.py index 7874f9f18..81b8cd81d 100644 --- a/stripe/tax/_certificate.py +++ b/stripe/tax/_certificate.py @@ -32,7 +32,7 @@ class Certificate( ListableAPIResource["Certificate"], ): """ - Tax exemption and resale certificates associated with tax exemptions. + A Tax Certificate associates an uploaded exemption or resale certificate file with a customer's tax exemption. A tax exemption can have multiple certificates. Deleting a tax exemption also deletes its certificates, but retains their uploaded files. """ OBJECT_NAME: ClassVar[Literal["tax.certificate"]] = "tax.certificate" @@ -42,11 +42,11 @@ class Certificate( """ deleted: bool """ - Whether the certificate has been deleted. + If `true`, the certificate has been deleted. If `false`, it hasn't been deleted. """ file: ExpandableField["File"] """ - The uploaded certificate file. + The ID of the uploaded certificate [file](https://docs.stripe.com/api/files/object). """ id: str """ @@ -62,7 +62,7 @@ class Certificate( """ tax_exemption: Optional[ExpandableField["CustomerTaxExemption"]] """ - The tax exemption associated with this certificate. + The ID of the [customer tax exemption](https://docs.stripe.com/api/tax/exemptions/object) associated with this certificate. """ @classmethod @@ -70,7 +70,7 @@ def create( cls, **params: Unpack["CertificateCreateParams"] ) -> "Certificate": """ - Create a tax certificate associated with a tax exemption. + Creates a Tax Certificate associated with a tax exemption. Before creating the certificate, [upload a file](https://docs.stripe.com/api/files/create) with purpose tax_certificate. """ return cast( "Certificate", @@ -86,7 +86,7 @@ async def create_async( cls, **params: Unpack["CertificateCreateParams"] ) -> "Certificate": """ - Create a tax certificate associated with a tax exemption. + Creates a Tax Certificate associated with a tax exemption. Before creating the certificate, [upload a file](https://docs.stripe.com/api/files/create) with purpose tax_certificate. """ return cast( "Certificate", @@ -102,7 +102,7 @@ def _cls_delete( cls, sid: str, /, **params: Unpack["CertificateDeleteParams"] ) -> "Certificate": """ - Delete a tax certificate associated with a tax exemption. + Deletes a Tax Certificate without deleting its uploaded file. You can reuse the file to create another certificate, and you can still retrieve the deleted certificate. """ url = "%s/%s" % (cls.class_url(), sanitize_id(sid)) return cast( @@ -120,7 +120,7 @@ def delete( sid: str, /, **params: Unpack["CertificateDeleteParams"] ) -> "Certificate": """ - Delete a tax certificate associated with a tax exemption. + Deletes a Tax Certificate without deleting its uploaded file. You can reuse the file to create another certificate, and you can still retrieve the deleted certificate. """ ... @@ -129,7 +129,7 @@ def delete( self, **params: Unpack["CertificateDeleteParams"] ) -> "Certificate": """ - Delete a tax certificate associated with a tax exemption. + Deletes a Tax Certificate without deleting its uploaded file. You can reuse the file to create another certificate, and you can still retrieve the deleted certificate. """ ... @@ -138,7 +138,7 @@ def delete( self, **params: Unpack["CertificateDeleteParams"] ) -> "Certificate": """ - Delete a tax certificate associated with a tax exemption. + Deletes a Tax Certificate without deleting its uploaded file. You can reuse the file to create another certificate, and you can still retrieve the deleted certificate. """ return self._request_and_refresh( "delete", @@ -151,7 +151,7 @@ async def _cls_delete_async( cls, sid: str, /, **params: Unpack["CertificateDeleteParams"] ) -> "Certificate": """ - Delete a tax certificate associated with a tax exemption. + Deletes a Tax Certificate without deleting its uploaded file. You can reuse the file to create another certificate, and you can still retrieve the deleted certificate. """ url = "%s/%s" % (cls.class_url(), sanitize_id(sid)) return cast( @@ -169,7 +169,7 @@ async def delete_async( sid: str, /, **params: Unpack["CertificateDeleteParams"] ) -> "Certificate": """ - Delete a tax certificate associated with a tax exemption. + Deletes a Tax Certificate without deleting its uploaded file. You can reuse the file to create another certificate, and you can still retrieve the deleted certificate. """ ... @@ -178,7 +178,7 @@ async def delete_async( self, **params: Unpack["CertificateDeleteParams"] ) -> "Certificate": """ - Delete a tax certificate associated with a tax exemption. + Deletes a Tax Certificate without deleting its uploaded file. You can reuse the file to create another certificate, and you can still retrieve the deleted certificate. """ ... @@ -187,7 +187,7 @@ async def delete_async( self, **params: Unpack["CertificateDeleteParams"] ) -> "Certificate": """ - Delete a tax certificate associated with a tax exemption. + Deletes a Tax Certificate without deleting its uploaded file. You can reuse the file to create another certificate, and you can still retrieve the deleted certificate. """ return await self._request_and_refresh_async( "delete", @@ -200,7 +200,7 @@ def list( cls, **params: Unpack["CertificateListParams"] ) -> ListObject["Certificate"]: """ - List certificates for an existing tax exemption. + Lists a tax exemption's certificates, ordered from newest to oldest. The list excludes deleted certificates. """ result = cls._static_request( "get", @@ -220,7 +220,7 @@ async def list_async( cls, **params: Unpack["CertificateListParams"] ) -> ListObject["Certificate"]: """ - List certificates for an existing tax exemption. + Lists a tax exemption's certificates, ordered from newest to oldest. The list excludes deleted certificates. """ result = await cls._static_request_async( "get", @@ -240,7 +240,7 @@ def retrieve( cls, id: str, **params: Unpack["CertificateRetrieveParams"] ) -> "Certificate": """ - Retrieve a tax certificate associated with a tax exemption. + Retrieves a Tax Certificate. Deleted certificates remain retrievable with all their fields and deleted set to true. """ instance = cls(id, **params) instance.refresh() @@ -251,7 +251,7 @@ async def retrieve_async( cls, id: str, **params: Unpack["CertificateRetrieveParams"] ) -> "Certificate": """ - Retrieve a tax certificate associated with a tax exemption. + Retrieves a Tax Certificate. Deleted certificates remain retrievable with all their fields and deleted set to true. """ instance = cls(id, **params) await instance.refresh_async() diff --git a/stripe/tax/_certificate_service.py b/stripe/tax/_certificate_service.py index b3e405c3f..2ed716e5e 100644 --- a/stripe/tax/_certificate_service.py +++ b/stripe/tax/_certificate_service.py @@ -32,7 +32,7 @@ def delete( options: Optional["RequestOptions"] = None, ) -> "Certificate": """ - Delete a tax certificate associated with a tax exemption. + Deletes a Tax Certificate without deleting its uploaded file. You can reuse the file to create another certificate, and you can still retrieve the deleted certificate. """ return cast( "Certificate", @@ -53,7 +53,7 @@ async def delete_async( options: Optional["RequestOptions"] = None, ) -> "Certificate": """ - Delete a tax certificate associated with a tax exemption. + Deletes a Tax Certificate without deleting its uploaded file. You can reuse the file to create another certificate, and you can still retrieve the deleted certificate. """ return cast( "Certificate", @@ -74,7 +74,7 @@ def retrieve( options: Optional["RequestOptions"] = None, ) -> "Certificate": """ - Retrieve a tax certificate associated with a tax exemption. + Retrieves a Tax Certificate. Deleted certificates remain retrievable with all their fields and deleted set to true. """ return cast( "Certificate", @@ -95,7 +95,7 @@ async def retrieve_async( options: Optional["RequestOptions"] = None, ) -> "Certificate": """ - Retrieve a tax certificate associated with a tax exemption. + Retrieves a Tax Certificate. Deleted certificates remain retrievable with all their fields and deleted set to true. """ return cast( "Certificate", @@ -114,7 +114,7 @@ def list( options: Optional["RequestOptions"] = None, ) -> "ListObject[Certificate]": """ - List certificates for an existing tax exemption. + Lists a tax exemption's certificates, ordered from newest to oldest. The list excludes deleted certificates. """ return cast( "ListObject[Certificate]", @@ -133,7 +133,7 @@ async def list_async( options: Optional["RequestOptions"] = None, ) -> "ListObject[Certificate]": """ - List certificates for an existing tax exemption. + Lists a tax exemption's certificates, ordered from newest to oldest. The list excludes deleted certificates. """ return cast( "ListObject[Certificate]", @@ -152,7 +152,7 @@ def create( options: Optional["RequestOptions"] = None, ) -> "Certificate": """ - Create a tax certificate associated with a tax exemption. + Creates a Tax Certificate associated with a tax exemption. Before creating the certificate, [upload a file](https://docs.stripe.com/api/files/create) with purpose tax_certificate. """ return cast( "Certificate", @@ -171,7 +171,7 @@ async def create_async( options: Optional["RequestOptions"] = None, ) -> "Certificate": """ - Create a tax certificate associated with a tax exemption. + Creates a Tax Certificate associated with a tax exemption. Before creating the certificate, [upload a file](https://docs.stripe.com/api/files/create) with purpose tax_certificate. """ return cast( "Certificate", diff --git a/stripe/tax/_form.py b/stripe/tax/_form.py index 560f86e1f..6d0ecd52a 100644 --- a/stripe/tax/_form.py +++ b/stripe/tax/_form.py @@ -589,7 +589,9 @@ class StateTaxWithheld(StripeObject): @classmethod def create(cls, **params: Unpack["FormCreateParams"]) -> "FormCorrection": """ - Creates a correction for a filed tax form. Supply either payee details or numerical values for the tax form type. Created correction forms are not filed automatically. + Creates a correction for a filed tax form. Supply either payee details or numerical values for the tax form type. + + Private preview. API access is invite-only. Contact Stripe to request access. Creating a correction doesn't file it; review, attestation, and filing remain in the Dashboard. """ return cast( "FormCorrection", @@ -605,7 +607,9 @@ async def create_async( cls, **params: Unpack["FormCreateParams"] ) -> "FormCorrection": """ - Creates a correction for a filed tax form. Supply either payee details or numerical values for the tax form type. Created correction forms are not filed automatically. + Creates a correction for a filed tax form. Supply either payee details or numerical values for the tax form type. + + Private preview. API access is invite-only. Contact Stripe to request access. Creating a correction doesn't file it; review, attestation, and filing remain in the Dashboard. """ return cast( "FormCorrection", diff --git a/stripe/tax/_form_service.py b/stripe/tax/_form_service.py index f7b59b2b9..7f1bb981f 100644 --- a/stripe/tax/_form_service.py +++ b/stripe/tax/_form_service.py @@ -106,7 +106,9 @@ def create( options: Optional["RequestOptions"] = None, ) -> "FormCorrection": """ - Creates a correction for a filed tax form. Supply either payee details or numerical values for the tax form type. Created correction forms are not filed automatically. + Creates a correction for a filed tax form. Supply either payee details or numerical values for the tax form type. + + Private preview. API access is invite-only. Contact Stripe to request access. Creating a correction doesn't file it; review, attestation, and filing remain in the Dashboard. """ return cast( "FormCorrection", @@ -127,7 +129,9 @@ async def create_async( options: Optional["RequestOptions"] = None, ) -> "FormCorrection": """ - Creates a correction for a filed tax form. Supply either payee details or numerical values for the tax form type. Created correction forms are not filed automatically. + Creates a correction for a filed tax form. Supply either payee details or numerical values for the tax form type. + + Private preview. API access is invite-only. Contact Stripe to request access. Creating a correction doesn't file it; review, attestation, and filing remain in the Dashboard. """ return cast( "FormCorrection", diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index b070d57ef..a41f06f10 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -190,6 +190,7 @@ class ApiError(StripeObject): "forwarding_api_upstream_connection_timeout", "forwarding_api_upstream_error", "idempotency_key_in_use", + "inactive_api_operation_confirmation_required", "incorrect_address", "incorrect_cvc", "incorrect_number", @@ -1011,12 +1012,6 @@ class LineItem(StripeObject): "set_reader_display": SetReaderDisplay, } - class DeviceHealthDetail(StripeObject): - type: Union[Literal["unrecoverable_tamper"], str] - """ - The type of condition affecting the reader's device health. - """ - action: Optional[Action] """ The most recent action performed by the reader. @@ -1025,14 +1020,6 @@ class DeviceHealthDetail(StripeObject): """ Always true for a deleted object """ - device_health: Optional[Union[Literal["healthy", "unhealthy"], str]] - """ - The overall device health of the reader: `healthy` or `unhealthy`. Renamed to `no_issues_detected` and `needs_attention` respectively; see `device_health_details` for the specific conditions. - """ - device_health_details: Optional[List[DeviceHealthDetail]] - """ - The set of conditions affecting the reader's device health. Empty when there are no conditions. - """ device_sw_version: Optional[str] """ The current software version of the reader. @@ -1053,13 +1040,18 @@ class DeviceHealthDetail(StripeObject): "simulated_wisepos_e", "stripe_m2", "stripe_s700", + "stripe_s700_devkit", "stripe_s710", + "stripe_s710_devkit", "stripe_t600", + "stripe_t600_devkit", "verifone_P400", "verifone_m425", "verifone_p630", "verifone_ux700", + "verifone_ux700_devkit", "verifone_v660p", + "verifone_v660p_devkit", ], str, ] @@ -3038,10 +3030,7 @@ async def timeout_input_collection_async( def test_helpers(self): return self.TestHelpers(self) - _inner_class_types = { - "action": Action, - "device_health_details": DeviceHealthDetail, - } + _inner_class_types = {"action": Action} Reader.TestHelpers._resource_cls = Reader diff --git a/stripe/test_helpers/treasury/_inbound_transfer_service.py b/stripe/test_helpers/treasury/_inbound_transfer_service.py index 13402c931..086debe86 100644 --- a/stripe/test_helpers/treasury/_inbound_transfer_service.py +++ b/stripe/test_helpers/treasury/_inbound_transfer_service.py @@ -28,7 +28,7 @@ def fail( options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. """ return cast( "InboundTransfer", @@ -51,7 +51,7 @@ async def fail_async( options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. """ return cast( "InboundTransfer", @@ -74,7 +74,7 @@ def return_inbound_transfer( options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": """ - Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. + Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. """ return cast( "InboundTransfer", @@ -97,7 +97,7 @@ async def return_inbound_transfer_async( options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": """ - Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. + Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. """ return cast( "InboundTransfer", @@ -120,7 +120,7 @@ def succeed( options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. """ return cast( "InboundTransfer", @@ -143,7 +143,7 @@ async def succeed_async( options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. """ return cast( "InboundTransfer", diff --git a/stripe/test_helpers/treasury/_outbound_payment_service.py b/stripe/test_helpers/treasury/_outbound_payment_service.py index e3c187e54..7be2c5dcc 100644 --- a/stripe/test_helpers/treasury/_outbound_payment_service.py +++ b/stripe/test_helpers/treasury/_outbound_payment_service.py @@ -31,7 +31,7 @@ def update( options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": """ - Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states. """ return cast( "OutboundPayment", @@ -54,7 +54,7 @@ async def update_async( options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": """ - Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states. """ return cast( "OutboundPayment", @@ -77,7 +77,7 @@ def fail( options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. """ return cast( "OutboundPayment", @@ -100,7 +100,7 @@ async def fail_async( options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. """ return cast( "OutboundPayment", @@ -123,7 +123,7 @@ def post( options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. """ return cast( "OutboundPayment", @@ -146,7 +146,7 @@ async def post_async( options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. """ return cast( "OutboundPayment", @@ -169,7 +169,7 @@ def return_outbound_payment( options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state. """ return cast( "OutboundPayment", @@ -192,7 +192,7 @@ async def return_outbound_payment_async( options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state. """ return cast( "OutboundPayment", diff --git a/stripe/test_helpers/treasury/_outbound_transfer_service.py b/stripe/test_helpers/treasury/_outbound_transfer_service.py index eca1872cd..1df1e5311 100644 --- a/stripe/test_helpers/treasury/_outbound_transfer_service.py +++ b/stripe/test_helpers/treasury/_outbound_transfer_service.py @@ -31,7 +31,7 @@ def update( options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": """ - Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states. """ return cast( "OutboundTransfer", @@ -54,7 +54,7 @@ async def update_async( options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": """ - Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states. """ return cast( "OutboundTransfer", @@ -77,7 +77,7 @@ def fail( options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. """ return cast( "OutboundTransfer", @@ -100,7 +100,7 @@ async def fail_async( options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. """ return cast( "OutboundTransfer", @@ -123,7 +123,7 @@ def post( options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. """ return cast( "OutboundTransfer", @@ -146,7 +146,7 @@ async def post_async( options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. """ return cast( "OutboundTransfer", @@ -171,7 +171,7 @@ def return_outbound_transfer( options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state. """ return cast( "OutboundTransfer", @@ -196,7 +196,7 @@ async def return_outbound_transfer_async( options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state. """ return cast( "OutboundTransfer", diff --git a/stripe/test_helpers/treasury/_received_credit_service.py b/stripe/test_helpers/treasury/_received_credit_service.py index b0ffb9ffe..82d4b7624 100644 --- a/stripe/test_helpers/treasury/_received_credit_service.py +++ b/stripe/test_helpers/treasury/_received_credit_service.py @@ -19,7 +19,7 @@ def create( options: Optional["RequestOptions"] = None, ) -> "ReceivedCredit": """ - Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties. + Simulates a test ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredit objects initiated by third parties. """ return cast( "ReceivedCredit", @@ -38,7 +38,7 @@ async def create_async( options: Optional["RequestOptions"] = None, ) -> "ReceivedCredit": """ - Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties. + Simulates a test ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredit objects initiated by third parties. """ return cast( "ReceivedCredit", diff --git a/stripe/test_helpers/treasury/_received_debit_service.py b/stripe/test_helpers/treasury/_received_debit_service.py index 4b86843ac..cb4bac603 100644 --- a/stripe/test_helpers/treasury/_received_debit_service.py +++ b/stripe/test_helpers/treasury/_received_debit_service.py @@ -19,7 +19,7 @@ def create( options: Optional["RequestOptions"] = None, ) -> "ReceivedDebit": """ - Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties. + Simulates a test ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebit objects initiated by third parties. """ return cast( "ReceivedDebit", @@ -38,7 +38,7 @@ async def create_async( options: Optional["RequestOptions"] = None, ) -> "ReceivedDebit": """ - Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties. + Simulates a test ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebit objects initiated by third parties. """ return cast( "ReceivedDebit", diff --git a/stripe/treasury/_inbound_transfer.py b/stripe/treasury/_inbound_transfer.py index e38f53ff3..818dd8f17 100644 --- a/stripe/treasury/_inbound_transfer.py +++ b/stripe/treasury/_inbound_transfer.py @@ -513,7 +513,7 @@ def _cls_fail( cls, id: str, /, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. """ return cast( "InboundTransfer", @@ -532,7 +532,7 @@ def fail( id: str, /, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. """ ... @@ -541,7 +541,7 @@ def fail( self, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. """ ... @@ -550,7 +550,7 @@ def fail( self, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. """ return cast( "InboundTransfer", @@ -568,7 +568,7 @@ async def _cls_fail_async( cls, id: str, /, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. """ return cast( "InboundTransfer", @@ -587,7 +587,7 @@ async def fail_async( id: str, /, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. """ ... @@ -596,7 +596,7 @@ async def fail_async( self, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. """ ... @@ -605,7 +605,7 @@ async def fail_async( self, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. """ return cast( "InboundTransfer", @@ -626,7 +626,7 @@ def _cls_return_inbound_transfer( **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ - Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. + Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. """ return cast( "InboundTransfer", @@ -647,7 +647,7 @@ def return_inbound_transfer( **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ - Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. + Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. """ ... @@ -657,7 +657,7 @@ def return_inbound_transfer( **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ - Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. + Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. """ ... @@ -667,7 +667,7 @@ def return_inbound_transfer( **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ - Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. + Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. """ return cast( "InboundTransfer", @@ -688,7 +688,7 @@ async def _cls_return_inbound_transfer_async( **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ - Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. + Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. """ return cast( "InboundTransfer", @@ -709,7 +709,7 @@ async def return_inbound_transfer_async( **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ - Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. + Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. """ ... @@ -719,7 +719,7 @@ async def return_inbound_transfer_async( **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ - Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. + Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. """ ... @@ -729,7 +729,7 @@ async def return_inbound_transfer_async( **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ - Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. + Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. """ return cast( "InboundTransfer", @@ -747,7 +747,7 @@ def _cls_succeed( cls, id: str, /, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. """ return cast( "InboundTransfer", @@ -766,7 +766,7 @@ def succeed( id: str, /, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. """ ... @@ -775,7 +775,7 @@ def succeed( self, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. """ ... @@ -784,7 +784,7 @@ def succeed( self, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. """ return cast( "InboundTransfer", @@ -802,7 +802,7 @@ async def _cls_succeed_async( cls, id: str, /, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. """ return cast( "InboundTransfer", @@ -821,7 +821,7 @@ async def succeed_async( id: str, /, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. """ ... @@ -830,7 +830,7 @@ async def succeed_async( self, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. """ ... @@ -839,7 +839,7 @@ async def succeed_async( self, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ - Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. + Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. """ return cast( "InboundTransfer", diff --git a/stripe/treasury/_outbound_payment.py b/stripe/treasury/_outbound_payment.py index 636451e21..519680454 100644 --- a/stripe/treasury/_outbound_payment.py +++ b/stripe/treasury/_outbound_payment.py @@ -564,7 +564,7 @@ def _cls_fail( cls, id: str, /, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. """ return cast( "OutboundPayment", @@ -583,7 +583,7 @@ def fail( id: str, /, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. """ ... @@ -592,7 +592,7 @@ def fail( self, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. """ ... @@ -601,7 +601,7 @@ def fail( self, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. """ return cast( "OutboundPayment", @@ -619,7 +619,7 @@ async def _cls_fail_async( cls, id: str, /, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. """ return cast( "OutboundPayment", @@ -638,7 +638,7 @@ async def fail_async( id: str, /, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. """ ... @@ -647,7 +647,7 @@ async def fail_async( self, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. """ ... @@ -656,7 +656,7 @@ async def fail_async( self, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. """ return cast( "OutboundPayment", @@ -674,7 +674,7 @@ def _cls_post( cls, id: str, /, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. """ return cast( "OutboundPayment", @@ -693,7 +693,7 @@ def post( id: str, /, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. """ ... @@ -702,7 +702,7 @@ def post( self, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. """ ... @@ -711,7 +711,7 @@ def post( self, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. """ return cast( "OutboundPayment", @@ -729,7 +729,7 @@ async def _cls_post_async( cls, id: str, /, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. """ return cast( "OutboundPayment", @@ -748,7 +748,7 @@ async def post_async( id: str, /, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. """ ... @@ -757,7 +757,7 @@ async def post_async( self, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. """ ... @@ -766,7 +766,7 @@ async def post_async( self, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. """ return cast( "OutboundPayment", @@ -787,7 +787,7 @@ def _cls_return_outbound_payment( **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state. """ return cast( "OutboundPayment", @@ -808,7 +808,7 @@ def return_outbound_payment( **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state. """ ... @@ -818,7 +818,7 @@ def return_outbound_payment( **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state. """ ... @@ -828,7 +828,7 @@ def return_outbound_payment( **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state. """ return cast( "OutboundPayment", @@ -849,7 +849,7 @@ async def _cls_return_outbound_payment_async( **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state. """ return cast( "OutboundPayment", @@ -870,7 +870,7 @@ async def return_outbound_payment_async( **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state. """ ... @@ -880,7 +880,7 @@ async def return_outbound_payment_async( **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state. """ ... @@ -890,7 +890,7 @@ async def return_outbound_payment_async( **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ - Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. + Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state. """ return cast( "OutboundPayment", @@ -908,7 +908,7 @@ def _cls_update( cls, id: str, /, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ - Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states. """ return cast( "OutboundPayment", @@ -927,7 +927,7 @@ def update( id: str, /, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ - Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states. """ ... @@ -936,7 +936,7 @@ def update( self, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ - Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states. """ ... @@ -945,7 +945,7 @@ def update( self, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ - Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states. """ return cast( "OutboundPayment", @@ -963,7 +963,7 @@ async def _cls_update_async( cls, id: str, /, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ - Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states. """ return cast( "OutboundPayment", @@ -982,7 +982,7 @@ async def update_async( id: str, /, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ - Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states. """ ... @@ -991,7 +991,7 @@ async def update_async( self, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ - Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states. """ ... @@ -1000,7 +1000,7 @@ async def update_async( self, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ - Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states. """ return cast( "OutboundPayment", diff --git a/stripe/treasury/_outbound_transfer.py b/stripe/treasury/_outbound_transfer.py index b884cea5e..9dc0b0ae6 100644 --- a/stripe/treasury/_outbound_transfer.py +++ b/stripe/treasury/_outbound_transfer.py @@ -571,7 +571,7 @@ def _cls_fail( **params: Unpack["OutboundTransferFailParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. """ return cast( "OutboundTransfer", @@ -592,7 +592,7 @@ def fail( **params: Unpack["OutboundTransferFailParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. """ ... @@ -601,7 +601,7 @@ def fail( self, **params: Unpack["OutboundTransferFailParams"] ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. """ ... @@ -610,7 +610,7 @@ def fail( self, **params: Unpack["OutboundTransferFailParams"] ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. """ return cast( "OutboundTransfer", @@ -633,7 +633,7 @@ async def _cls_fail_async( **params: Unpack["OutboundTransferFailParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. """ return cast( "OutboundTransfer", @@ -654,7 +654,7 @@ async def fail_async( **params: Unpack["OutboundTransferFailParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. """ ... @@ -663,7 +663,7 @@ async def fail_async( self, **params: Unpack["OutboundTransferFailParams"] ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. """ ... @@ -672,7 +672,7 @@ async def fail_async( self, **params: Unpack["OutboundTransferFailParams"] ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. """ return cast( "OutboundTransfer", @@ -695,7 +695,7 @@ def _cls_post( **params: Unpack["OutboundTransferPostParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. """ return cast( "OutboundTransfer", @@ -716,7 +716,7 @@ def post( **params: Unpack["OutboundTransferPostParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. """ ... @@ -725,7 +725,7 @@ def post( self, **params: Unpack["OutboundTransferPostParams"] ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. """ ... @@ -734,7 +734,7 @@ def post( self, **params: Unpack["OutboundTransferPostParams"] ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. """ return cast( "OutboundTransfer", @@ -757,7 +757,7 @@ async def _cls_post_async( **params: Unpack["OutboundTransferPostParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. """ return cast( "OutboundTransfer", @@ -778,7 +778,7 @@ async def post_async( **params: Unpack["OutboundTransferPostParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. """ ... @@ -787,7 +787,7 @@ async def post_async( self, **params: Unpack["OutboundTransferPostParams"] ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. """ ... @@ -796,7 +796,7 @@ async def post_async( self, **params: Unpack["OutboundTransferPostParams"] ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. """ return cast( "OutboundTransfer", @@ -819,7 +819,7 @@ def _cls_return_outbound_transfer( **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state. """ return cast( "OutboundTransfer", @@ -840,7 +840,7 @@ def return_outbound_transfer( **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state. """ ... @@ -850,7 +850,7 @@ def return_outbound_transfer( **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state. """ ... @@ -860,7 +860,7 @@ def return_outbound_transfer( **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state. """ return cast( "OutboundTransfer", @@ -883,7 +883,7 @@ async def _cls_return_outbound_transfer_async( **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state. """ return cast( "OutboundTransfer", @@ -904,7 +904,7 @@ async def return_outbound_transfer_async( **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state. """ ... @@ -914,7 +914,7 @@ async def return_outbound_transfer_async( **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state. """ ... @@ -924,7 +924,7 @@ async def return_outbound_transfer_async( **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ - Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. + Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state. """ return cast( "OutboundTransfer", @@ -947,7 +947,7 @@ def _cls_update( **params: Unpack["OutboundTransferUpdateParams"], ) -> "OutboundTransfer": """ - Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states. """ return cast( "OutboundTransfer", @@ -968,7 +968,7 @@ def update( **params: Unpack["OutboundTransferUpdateParams"], ) -> "OutboundTransfer": """ - Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states. """ ... @@ -977,7 +977,7 @@ def update( self, **params: Unpack["OutboundTransferUpdateParams"] ) -> "OutboundTransfer": """ - Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states. """ ... @@ -986,7 +986,7 @@ def update( self, **params: Unpack["OutboundTransferUpdateParams"] ) -> "OutboundTransfer": """ - Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states. """ return cast( "OutboundTransfer", @@ -1009,7 +1009,7 @@ async def _cls_update_async( **params: Unpack["OutboundTransferUpdateParams"], ) -> "OutboundTransfer": """ - Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states. """ return cast( "OutboundTransfer", @@ -1030,7 +1030,7 @@ async def update_async( **params: Unpack["OutboundTransferUpdateParams"], ) -> "OutboundTransfer": """ - Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states. """ ... @@ -1039,7 +1039,7 @@ async def update_async( self, **params: Unpack["OutboundTransferUpdateParams"] ) -> "OutboundTransfer": """ - Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states. """ ... @@ -1048,7 +1048,7 @@ async def update_async( self, **params: Unpack["OutboundTransferUpdateParams"] ) -> "OutboundTransfer": """ - Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. + Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states. """ return cast( "OutboundTransfer", diff --git a/stripe/treasury/_received_credit.py b/stripe/treasury/_received_credit.py index db92209b1..b6949d544 100644 --- a/stripe/treasury/_received_credit.py +++ b/stripe/treasury/_received_credit.py @@ -391,7 +391,7 @@ def create( cls, **params: Unpack["ReceivedCreditCreateParams"] ) -> "ReceivedCredit": """ - Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties. + Simulates a test ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredit objects initiated by third parties. """ return cast( "ReceivedCredit", @@ -407,7 +407,7 @@ async def create_async( cls, **params: Unpack["ReceivedCreditCreateParams"] ) -> "ReceivedCredit": """ - Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties. + Simulates a test ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredit objects initiated by third parties. """ return cast( "ReceivedCredit", diff --git a/stripe/treasury/_received_debit.py b/stripe/treasury/_received_debit.py index 743f02cbf..be3bb1343 100644 --- a/stripe/treasury/_received_debit.py +++ b/stripe/treasury/_received_debit.py @@ -337,7 +337,7 @@ def create( cls, **params: Unpack["ReceivedDebitCreateParams"] ) -> "ReceivedDebit": """ - Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties. + Simulates a test ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebit objects initiated by third parties. """ return cast( "ReceivedDebit", @@ -353,7 +353,7 @@ async def create_async( cls, **params: Unpack["ReceivedDebitCreateParams"] ) -> "ReceivedDebit": """ - Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties. + Simulates a test ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebit objects initiated by third parties. """ return cast( "ReceivedDebit", diff --git a/stripe/v2/_billing_service.py b/stripe/v2/_billing_service.py index 42b098b5f..c6dd1a17b 100644 --- a/stripe/v2/_billing_service.py +++ b/stripe/v2/_billing_service.py @@ -6,7 +6,6 @@ if TYPE_CHECKING: from stripe.v2.billing._bill_setting_service import BillSettingService - from stripe.v2.billing._cadence_service import CadenceService from stripe.v2.billing._collection_setting_service import ( CollectionSettingService, ) @@ -14,6 +13,7 @@ from stripe.v2.billing._custom_pricing_unit_service import ( CustomPricingUnitService, ) + from stripe.v2.billing._group_service import GroupService from stripe.v2.billing._intent_service import IntentService from stripe.v2.billing._license_fee_service import LicenseFeeService from stripe.v2.billing._licensed_item_service import LicensedItemService @@ -45,7 +45,6 @@ "stripe.v2.billing._bill_setting_service", "BillSettingService", ], - "cadences": ["stripe.v2.billing._cadence_service", "CadenceService"], "collection_settings": [ "stripe.v2.billing._collection_setting_service", "CollectionSettingService", @@ -55,6 +54,7 @@ "stripe.v2.billing._custom_pricing_unit_service", "CustomPricingUnitService", ], + "groups": ["stripe.v2.billing._group_service", "GroupService"], "intents": ["stripe.v2.billing._intent_service", "IntentService"], "license_fees": [ "stripe.v2.billing._license_fee_service", @@ -111,10 +111,10 @@ class BillingService(StripeService): bill_settings: "BillSettingService" - cadences: "CadenceService" collection_settings: "CollectionSettingService" contracts: "ContractService" custom_pricing_units: "CustomPricingUnitService" + groups: "GroupService" intents: "IntentService" license_fees: "LicenseFeeService" licensed_items: "LicensedItemService" diff --git a/stripe/v2/billing/__init__.py b/stripe/v2/billing/__init__.py index 0c0edc07d..45d7806a4 100644 --- a/stripe/v2/billing/__init__.py +++ b/stripe/v2/billing/__init__.py @@ -6,9 +6,9 @@ if TYPE_CHECKING: from stripe.v2.billing import ( bill_settings as bill_settings, - cadences as cadences, collection_settings as collection_settings, contracts as contracts, + groups as groups, intents as intents, license_fees as license_fees, pricing_plans as pricing_plans, @@ -21,13 +21,6 @@ from stripe.v2.billing._bill_setting_version import ( BillSettingVersion as BillSettingVersion, ) - from stripe.v2.billing._cadence import Cadence as Cadence - from stripe.v2.billing._cadence_service import ( - CadenceService as CadenceService, - ) - from stripe.v2.billing._cadence_spend_modifier import ( - CadenceSpendModifier as CadenceSpendModifier, - ) from stripe.v2.billing._collection_setting import ( CollectionSetting as CollectionSetting, ) @@ -38,9 +31,6 @@ CollectionSettingVersion as CollectionSettingVersion, ) from stripe.v2.billing._contract import Contract as Contract - from stripe.v2.billing._contract_pricing_line_quantity_change import ( - ContractPricingLineQuantityChange as ContractPricingLineQuantityChange, - ) from stripe.v2.billing._contract_service import ( ContractService as ContractService, ) @@ -54,6 +44,12 @@ from stripe.v2.billing._custom_pricing_unit_service import ( CustomPricingUnitService as CustomPricingUnitService, ) + from stripe.v2.billing._group import Group as Group + from stripe.v2.billing._group_invoice import GroupInvoice as GroupInvoice + from stripe.v2.billing._group_service import GroupService as GroupService + from stripe.v2.billing._group_spend_modifier import ( + GroupSpendModifier as GroupSpendModifier, + ) from stripe.v2.billing._intent import Intent as Intent from stripe.v2.billing._intent_action import IntentAction as IntentAction from stripe.v2.billing._intent_service import ( @@ -144,9 +140,9 @@ # name -> (import_target, is_submodule) _import_map = { "bill_settings": ("stripe.v2.billing.bill_settings", True), - "cadences": ("stripe.v2.billing.cadences", True), "collection_settings": ("stripe.v2.billing.collection_settings", True), "contracts": ("stripe.v2.billing.contracts", True), + "groups": ("stripe.v2.billing.groups", True), "intents": ("stripe.v2.billing.intents", True), "license_fees": ("stripe.v2.billing.license_fees", True), "pricing_plans": ("stripe.v2.billing.pricing_plans", True), @@ -154,12 +150,6 @@ "BillSetting": ("stripe.v2.billing._bill_setting", False), "BillSettingService": ("stripe.v2.billing._bill_setting_service", False), "BillSettingVersion": ("stripe.v2.billing._bill_setting_version", False), - "Cadence": ("stripe.v2.billing._cadence", False), - "CadenceService": ("stripe.v2.billing._cadence_service", False), - "CadenceSpendModifier": ( - "stripe.v2.billing._cadence_spend_modifier", - False, - ), "CollectionSetting": ("stripe.v2.billing._collection_setting", False), "CollectionSettingService": ( "stripe.v2.billing._collection_setting_service", @@ -170,10 +160,6 @@ False, ), "Contract": ("stripe.v2.billing._contract", False), - "ContractPricingLineQuantityChange": ( - "stripe.v2.billing._contract_pricing_line_quantity_change", - False, - ), "ContractService": ("stripe.v2.billing._contract_service", False), "ContractTerm": ("stripe.v2.billing._contract_term", False), "ContractTermQuantityChange": ( @@ -185,6 +171,10 @@ "stripe.v2.billing._custom_pricing_unit_service", False, ), + "Group": ("stripe.v2.billing._group", False), + "GroupInvoice": ("stripe.v2.billing._group_invoice", False), + "GroupService": ("stripe.v2.billing._group_service", False), + "GroupSpendModifier": ("stripe.v2.billing._group_spend_modifier", False), "Intent": ("stripe.v2.billing._intent", False), "IntentAction": ("stripe.v2.billing._intent_action", False), "IntentService": ("stripe.v2.billing._intent_service", False), diff --git a/stripe/v2/billing/_cadence.py b/stripe/v2/billing/_cadence.py deleted file mode 100644 index 132942731..000000000 --- a/stripe/v2/billing/_cadence.py +++ /dev/null @@ -1,631 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from decimal import Decimal -from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional, Union -from typing_extensions import Literal - - -class Cadence(StripeObject): - """ - A Cadence represents a billing schedule applied to a customer, defining when and how often to generate invoices, such as on monthly or annual billing cycle. - """ - - OBJECT_NAME: ClassVar[Literal["v2.billing.cadence"]] = "v2.billing.cadence" - - class BillingCycle(StripeObject): - class Day(StripeObject): - class Time(StripeObject): - hour: int - """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. - """ - minute: int - """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - second: Optional[int] - """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - - time: Time - """ - The time at which the billing cycle ends. - """ - _inner_class_types = {"time": Time} - - class Month(StripeObject): - class Time(StripeObject): - hour: int - """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. - """ - minute: int - """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - second: Optional[int] - """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - - day_of_month: int - """ - The day to anchor the billing on for a type="month" billing cycle from 1-31. - If this number is greater than the number of days in the month being billed, - this anchors to the last day of the month. - """ - month_of_year: Optional[int] - """ - The month to anchor the billing on for a type="month" billing cycle from - 1-12. Occurrences are calculated from the month anchor. - """ - time: Time - """ - The time at which the billing cycle ends. - """ - _inner_class_types = {"time": Time} - - class Week(StripeObject): - class Time(StripeObject): - hour: int - """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. - """ - minute: int - """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - second: Optional[int] - """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - - day_of_week: int - """ - The day of the week to bill the type=week billing cycle on. - Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601 week day numbering. - """ - time: Time - """ - The time at which the billing cycle ends. - """ - _inner_class_types = {"time": Time} - - class Year(StripeObject): - class Time(StripeObject): - hour: int - """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. - """ - minute: int - """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - second: Optional[int] - """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - - day_of_month: int - """ - The day to anchor the billing on for a type="month" billing cycle from 1-31. - If this number is greater than the number of days in the month being billed, - this anchors to the last day of the month. - """ - month_of_year: int - """ - The month to bill on from 1-12. If not provided, this defaults to the month the cadence was created. - """ - time: Time - """ - The time at which the billing cycle ends. - """ - _inner_class_types = {"time": Time} - - day: Optional[Day] - """ - Specific configuration for determining billing dates when type=day. - """ - interval_count: int - """ - The number of intervals (specified in the interval attribute) between cadence billings. For example, type=month and interval_count=3 bills every 3 months. - """ - month: Optional[Month] - """ - Specific configuration for determining billing dates when type=month. - """ - type: Union[Literal["day", "month", "week", "year"], str] - """ - The frequency at which a cadence bills. - """ - week: Optional[Week] - """ - Specific configuration for determining billing dates when type=week. - """ - year: Optional[Year] - """ - Specific configuration for determining billing dates when type=year. - """ - _inner_class_types = { - "day": Day, - "month": Month, - "week": Week, - "year": Year, - } - - class InvoiceDiscountRule(StripeObject): - class PercentOff(StripeObject): - class MaximumApplications(StripeObject): - type: Union[Literal["indefinite"], str] - """ - Max applications type of this discount, ex: indefinite. - """ - - maximum_applications: MaximumApplications - """ - The maximum applications configuration for this discount. - """ - percent_off: Decimal - """ - Percent that is taken off the amount. For example, a percent_off of 50.0 reduces a 100 USD amount to 50 USD. - """ - _inner_class_types = {"maximum_applications": MaximumApplications} - _field_encodings = {"percent_off": "decimal_string"} - - id: str - """ - Unique identifier for the object. - """ - percent_off: Optional[PercentOff] - """ - Details if the discount is a percentage off. - """ - type: Union[Literal["percent_off"], str] - """ - The type of the discount. - """ - _inner_class_types = {"percent_off": PercentOff} - - class Payer(StripeObject): - billing_profile: str - """ - The ID of the Billing Profile object which determines how a bill is paid. - """ - customer: Optional[str] - """ - The ID of the Customer object. - """ - type: Union[Literal["customer"], str] - """ - A string identifying the type of the payer. Currently the only supported value is `customer`. - """ - - class Settings(StripeObject): - class Bill(StripeObject): - id: str - """ - The ID of the referenced settings object. - """ - version: Optional[str] - """ - Returns the Settings Version when the cadence is pinned to a specific version. - """ - - class Collection(StripeObject): - id: str - """ - The ID of the referenced settings object. - """ - version: Optional[str] - """ - Returns the Settings Version when the cadence is pinned to a specific version. - """ - - bill: Optional[Bill] - """ - Settings that configure bills generation, which includes calculating totals, tax, and presenting invoices. - """ - collection: Optional[Collection] - """ - Settings that configure and manage the behavior of collecting payments. - """ - _inner_class_types = {"bill": Bill, "collection": Collection} - - class SettingsData(StripeObject): - class Bill(StripeObject): - class Calculation(StripeObject): - class Tax(StripeObject): - type: Union[Literal["automatic", "manual"], str] - """ - Determines if tax is calculated automatically based on a PTC or manually based on rules defined by the business. Defaults to "manual". - """ - - tax: Optional[Tax] - """ - Settings for calculating tax. - """ - _inner_class_types = {"tax": Tax} - - class Invoice(StripeObject): - class TimeUntilDue(StripeObject): - interval: Literal["day", "month", "week", "year"] - """ - The interval unit for the time until due. - """ - interval_count: int - """ - The number of interval units. For example, if interval=day and interval_count=30, - the invoice is due in 30 days. - """ - - time_until_due: Optional[TimeUntilDue] - """ - The amount of time until the invoice is overdue for payment. - """ - _inner_class_types = {"time_until_due": TimeUntilDue} - - calculation: Calculation - """ - Settings related to calculating a bill. - """ - invoice: Invoice - """ - Settings related to invoice behavior. - """ - invoice_rendering_template: Optional[str] - """ - The ID of the invoice rendering template to be used when generating invoices. - """ - _inner_class_types = { - "calculation": Calculation, - "invoice": Invoice, - } - - class Collection(StripeObject): - class EmailDelivery(StripeObject): - class PaymentDue(StripeObject): - enabled: bool - """ - If true an email for the invoice would be generated and sent out. - """ - include_payment_link: bool - """ - If true the payment link to hosted invoice page would be included in email and PDF of the invoice. - """ - - payment_due: Optional[PaymentDue] - """ - Controls emails for when the payment is due. For example after the invoice is finalized and transitions to Open state. - """ - _inner_class_types = {"payment_due": PaymentDue} - - class PaymentMethodOptions(StripeObject): - class AcssDebit(StripeObject): - class MandateOptions(StripeObject): - transaction_type: Optional[ - Union[Literal["business", "personal"], str] - ] - """ - Transaction type of the mandate. - """ - - mandate_options: Optional[MandateOptions] - """ - Additional fields for Mandate creation. - """ - verification_method: Optional[ - Union[ - Literal["automatic", "instant", "microdeposits"], - str, - ] - ] - """ - Verification method. - """ - _inner_class_types = {"mandate_options": MandateOptions} - - class Bancontact(StripeObject): - preferred_language: Optional[ - Union[Literal["de", "en", "fr", "nl"], str] - ] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - - class Card(StripeObject): - class MandateOptions(StripeObject): - amount: Optional[int] - """ - Amount to be charged for future payments. - """ - amount_type: Optional[ - Union[Literal["fixed", "maximum"], str] - ] - """ - The AmountType for the mandate. One of `fixed` or `maximum`. - """ - description: Optional[str] - """ - A description of the mandate that is meant to be displayed to the customer. - """ - _field_encodings = {"amount": "int64_string"} - - mandate_options: Optional[MandateOptions] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - network: Optional[str] - """ - Selected network to process the payment on. Depends on the available networks of the card. - """ - request_three_d_secure: Optional[ - Union[Literal["any", "automatic", "challenge"], str] - ] - """ - An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers - for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). - However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. - Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - _inner_class_types = {"mandate_options": MandateOptions} - - class CustomerBalance(StripeObject): - class BankTransfer(StripeObject): - class EuBankTransfer(StripeObject): - country: Union[ - Literal["BE", "DE", "ES", "FR", "IE", "NL"], - str, - ] - """ - The desired country code of the bank account information. - """ - - eu_bank_transfer: Optional[EuBankTransfer] - """ - Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. - """ - type: Optional[ - Union[ - Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ], - str, - ] - ] - """ - The bank transfer type that can be used for funding. - """ - _inner_class_types = { - "eu_bank_transfer": EuBankTransfer, - } - - bank_transfer: Optional[BankTransfer] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: Optional[ - Union[Literal["bank_transfer"], str] - ] - """ - The funding method type to be used when there are not enough funds in the customer balance. Currently the only supported value is `bank_transfer`. - """ - _inner_class_types = {"bank_transfer": BankTransfer} - - class Konbini(StripeObject): - pass - - class SepaDebit(StripeObject): - pass - - class UsBankAccount(StripeObject): - class FinancialConnections(StripeObject): - class Filters(StripeObject): - account_subcategories: List[ - Union[Literal["checking", "savings"], str] - ] - """ - The account subcategories to use to filter for selectable accounts. - """ - - filters: Optional[Filters] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - permissions: List[ - Union[ - Literal[ - "balances", - "ownership", - "payment_method", - "transactions", - ], - str, - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. - """ - prefetch: List[ - Union[ - Literal[ - "balances", "ownership", "transactions" - ], - str, - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - _inner_class_types = {"filters": Filters} - - financial_connections: FinancialConnections - """ - Additional fields for Financial Connections Session creation. - """ - verification_method: Union[ - Literal["automatic", "instant", "microdeposits"], str - ] - """ - Verification method. - """ - _inner_class_types = { - "financial_connections": FinancialConnections, - } - - acss_debit: Optional[AcssDebit] - """ - This sub-hash contains details about the Canadian pre-authorized debit payment method options. - """ - bancontact: Optional[Bancontact] - """ - This sub-hash contains details about the Bancontact payment method. - """ - card: Optional[Card] - """ - This sub-hash contains details about the Card payment method options. - """ - customer_balance: Optional[CustomerBalance] - """ - This sub-hash contains details about the Bank transfer payment method options. - """ - konbini: Optional[Konbini] - """ - This sub-hash contains details about the Konbini payment method options. - """ - sepa_debit: Optional[SepaDebit] - """ - This sub-hash contains details about the SEPA Direct Debit payment method options. - """ - us_bank_account: Optional[UsBankAccount] - """ - This sub-hash contains details about the ACH direct debit payment method options. - """ - _inner_class_types = { - "acss_debit": AcssDebit, - "bancontact": Bancontact, - "card": Card, - "customer_balance": CustomerBalance, - "konbini": Konbini, - "sepa_debit": SepaDebit, - "us_bank_account": UsBankAccount, - } - - collection_method: Literal["automatic", "send_invoice"] - """ - Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay this - bill at the end of the period using the payment method attached to the billing profile. When sending an invoice, - Stripe emails your billing profile an invoice with payment instructions. - Defaults to automatic. - """ - email_delivery: EmailDelivery - """ - Email delivery settings. - """ - payment_method_configuration: str - """ - The ID of the PaymentMethodConfiguration object, which controls which payment methods are displayed to your customers. - """ - payment_method_options: PaymentMethodOptions - """ - Payment Method specific configuration stored on the object. - """ - _inner_class_types = { - "email_delivery": EmailDelivery, - "payment_method_options": PaymentMethodOptions, - } - - bill: Bill - """ - Expanded bill settings data with actual configuration values. - """ - collection: Collection - """ - Expanded collection settings data with actual configuration values. - """ - _inner_class_types = {"bill": Bill, "collection": Collection} - - billing_cycle: BillingCycle - """ - The billing cycle is the object that defines future billing cycle dates. - """ - created: str - """ - Timestamp of when the object was created. - """ - id: str - """ - Unique identifier for the object. - """ - invoice_discount_rules: Optional[List[InvoiceDiscountRule]] - """ - The discount rules applied to all invoices for the cadence. - """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ - lookup_key: Optional[str] - """ - A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 characters. - """ - metadata: Optional[UntypedStripeObject[str]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - next_billing_date: Optional[str] - """ - The date that the billing cadence will next bill. Null if the cadence is not active. - """ - object: Literal["v2.billing.cadence"] - """ - String representing the object's type. Objects of the same type share the same value of the object field. - """ - payer: Payer - """ - The payer determines the entity financially responsible for the bill. - """ - settings: Optional[Settings] - """ - The settings associated with the cadence. - """ - settings_data: Optional[SettingsData] - """ - Settings data that contains expanded billing settings configuration with actual values. - """ - status: Union[Literal["active", "canceled"], str] - """ - The current status of the cadence. - """ - test_clock: Optional[str] - """ - The ID of the Test Clock. - """ - _inner_class_types = { - "billing_cycle": BillingCycle, - "invoice_discount_rules": InvoiceDiscountRule, - "payer": Payer, - "settings": Settings, - "settings_data": SettingsData, - } diff --git a/stripe/v2/billing/_cadence_service.py b/stripe/v2/billing/_cadence_service.py deleted file mode 100644 index 4257aa36a..000000000 --- a/stripe/v2/billing/_cadence_service.py +++ /dev/null @@ -1,260 +0,0 @@ -# -*- 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 importlib import import_module -from typing_extensions import TYPE_CHECKING - -if TYPE_CHECKING: - from stripe._request_options import RequestOptions - from stripe.params.v2.billing._cadence_cancel_params import ( - CadenceCancelParams, - ) - from stripe.params.v2.billing._cadence_create_params import ( - CadenceCreateParams, - ) - from stripe.params.v2.billing._cadence_list_params import CadenceListParams - from stripe.params.v2.billing._cadence_retrieve_params import ( - CadenceRetrieveParams, - ) - from stripe.params.v2.billing._cadence_update_params import ( - CadenceUpdateParams, - ) - from stripe.v2._list_object import ListObject - from stripe.v2.billing._cadence import Cadence - from stripe.v2.billing.cadences._spend_modifier_rule_service import ( - SpendModifierRuleService, - ) - -_subservices = { - "spend_modifier_rules": [ - "stripe.v2.billing.cadences._spend_modifier_rule_service", - "SpendModifierRuleService", - ], -} - - -class CadenceService(StripeService): - spend_modifier_rules: "SpendModifierRuleService" - - 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() - - def list( - self, - params: Optional["CadenceListParams"] = None, - options: Optional["RequestOptions"] = None, - ) -> "ListObject[Cadence]": - """ - List Billing Cadences. - """ - return cast( - "ListObject[Cadence]", - self._request( - "get", - "/v2/billing/cadences", - base_address="api", - params=params, - options=options, - ), - ) - - async def list_async( - self, - params: Optional["CadenceListParams"] = None, - options: Optional["RequestOptions"] = None, - ) -> "ListObject[Cadence]": - """ - List Billing Cadences. - """ - return cast( - "ListObject[Cadence]", - await self._request_async( - "get", - "/v2/billing/cadences", - base_address="api", - params=params, - options=options, - ), - ) - - def create( - self, - params: "CadenceCreateParams", - options: Optional["RequestOptions"] = None, - ) -> "Cadence": - """ - Create a Billing Cadence object. - """ - return cast( - "Cadence", - self._request( - "post", - "/v2/billing/cadences", - base_address="api", - params=params, - options=options, - ), - ) - - async def create_async( - self, - params: "CadenceCreateParams", - options: Optional["RequestOptions"] = None, - ) -> "Cadence": - """ - Create a Billing Cadence object. - """ - return cast( - "Cadence", - await self._request_async( - "post", - "/v2/billing/cadences", - base_address="api", - params=params, - options=options, - ), - ) - - def retrieve( - self, - id: str, - /, - params: Optional["CadenceRetrieveParams"] = None, - options: Optional["RequestOptions"] = None, - ) -> "Cadence": - """ - Retrieve a Billing Cadence object. - """ - return cast( - "Cadence", - self._request( - "get", - "/v2/billing/cadences/{id}".format(id=sanitize_id(id)), - base_address="api", - params=params, - options=options, - ), - ) - - async def retrieve_async( - self, - id: str, - /, - params: Optional["CadenceRetrieveParams"] = None, - options: Optional["RequestOptions"] = None, - ) -> "Cadence": - """ - Retrieve a Billing Cadence object. - """ - return cast( - "Cadence", - await self._request_async( - "get", - "/v2/billing/cadences/{id}".format(id=sanitize_id(id)), - base_address="api", - params=params, - options=options, - ), - ) - - def update( - self, - id: str, - /, - params: Optional["CadenceUpdateParams"] = None, - options: Optional["RequestOptions"] = None, - ) -> "Cadence": - """ - Update a Billing Cadence object. - """ - return cast( - "Cadence", - self._request( - "post", - "/v2/billing/cadences/{id}".format(id=sanitize_id(id)), - base_address="api", - params=params, - options=options, - ), - ) - - async def update_async( - self, - id: str, - /, - params: Optional["CadenceUpdateParams"] = None, - options: Optional["RequestOptions"] = None, - ) -> "Cadence": - """ - Update a Billing Cadence object. - """ - return cast( - "Cadence", - await self._request_async( - "post", - "/v2/billing/cadences/{id}".format(id=sanitize_id(id)), - base_address="api", - params=params, - options=options, - ), - ) - - def cancel( - self, - id: str, - /, - params: Optional["CadenceCancelParams"] = None, - options: Optional["RequestOptions"] = None, - ) -> "Cadence": - """ - Cancel the Billing Cadence. - """ - return cast( - "Cadence", - self._request( - "post", - "/v2/billing/cadences/{id}/cancel".format(id=sanitize_id(id)), - base_address="api", - params=params, - options=options, - ), - ) - - async def cancel_async( - self, - id: str, - /, - params: Optional["CadenceCancelParams"] = None, - options: Optional["RequestOptions"] = None, - ) -> "Cadence": - """ - Cancel the Billing Cadence. - """ - return cast( - "Cadence", - await self._request_async( - "post", - "/v2/billing/cadences/{id}/cancel".format(id=sanitize_id(id)), - base_address="api", - params=params, - options=options, - ), - ) diff --git a/stripe/v2/billing/_contract_pricing_line_quantity_change.py b/stripe/v2/billing/_contract_pricing_line_quantity_change.py deleted file mode 100644 index 7ff9d5c02..000000000 --- a/stripe/v2/billing/_contract_pricing_line_quantity_change.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from decimal import Decimal -from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional, Union -from typing_extensions import Literal - - -class ContractPricingLineQuantityChange(StripeObject): - """ - A quantity change object for a pricing line, returned by ListContractPricingLineQuantityChanges. - """ - - OBJECT_NAME: ClassVar[ - Literal["v2.billing.contract_pricing_line_quantity_change"] - ] = "v2.billing.contract_pricing_line_quantity_change" - - class Pricing(StripeObject): - price: Optional[str] - """ - The ID of the V1 price. Present when `type` is `price`. - """ - type: Union[Literal["price"], str] - """ - The type of pricing. - """ - - created: str - """ - The timestamp when this quantity change object was created. - """ - effective_at: str - """ - The timestamp when this quantity change takes effect. - """ - id: str - """ - The id of the quantity change object. - """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ - object: Literal["v2.billing.contract_pricing_line_quantity_change"] - """ - String representing the object's type. Objects of the same type share the same value of the object field. - """ - pricing: Pricing - """ - The pricing configuration for the associated pricing line. - """ - pricing_line: str - """ - The id of the pricing line associated with this quantity change. - """ - quantity: Decimal - """ - The quantity at the effective time. - """ - _inner_class_types = {"pricing": Pricing} - _field_encodings = {"quantity": "decimal_string"} diff --git a/stripe/v2/billing/_contract_service.py b/stripe/v2/billing/_contract_service.py index 81da3d0c3..51bb6a542 100644 --- a/stripe/v2/billing/_contract_service.py +++ b/stripe/v2/billing/_contract_service.py @@ -33,22 +33,14 @@ from stripe.v2._deleted_object import DeletedObject from stripe.v2._list_object import ListObject from stripe.v2.billing._contract import Contract - from stripe.v2.billing.contracts._pricing_lines_service import ( - PricingLinesService, - ) from stripe.v2.billing.contracts._term_service import TermService _subservices = { - "pricing_lines": [ - "stripe.v2.billing.contracts._pricing_lines_service", - "PricingLinesService", - ], "terms": ["stripe.v2.billing.contracts._term_service", "TermService"], } class ContractService(StripeService): - pricing_lines: "PricingLinesService" terms: "TermService" def __init__(self, requestor): @@ -125,23 +117,6 @@ def create( params=_coerce_v2_params( params, { - "pricing_lines": { - "pricing": { - "price_details": { - "pricing_overrides": { - "overwrite_price": { - "unit_amount": "decimal_string", - }, - }, - "quantity_changes": { - "set": "decimal_string", - }, - }, - }, - }, - "pricing_overrides": { - "multiply_pricing": {"factor": "decimal_string"}, - }, "terms": { "pricing_override": { "multiply": {"factor": "decimal_string"}, @@ -174,23 +149,6 @@ async def create_async( params=_coerce_v2_params( params, { - "pricing_lines": { - "pricing": { - "price_details": { - "pricing_overrides": { - "overwrite_price": { - "unit_amount": "decimal_string", - }, - }, - "quantity_changes": { - "set": "decimal_string", - }, - }, - }, - }, - "pricing_overrides": { - "multiply_pricing": {"factor": "decimal_string"}, - }, "terms": { "pricing_override": { "multiply": {"factor": "decimal_string"}, @@ -327,38 +285,6 @@ def update( }, }, }, - "pricing_line_actions": { - "add": { - "pricing": { - "price_details": { - "pricing_overrides": { - "overwrite_price": { - "unit_amount": "decimal_string", - }, - }, - "quantity_changes": { - "set": "decimal_string", - }, - }, - }, - }, - "update": { - "pricing": { - "price_details": { - "pricing_override_actions": { - "add": { - "overwrite_price": { - "unit_amount": "decimal_string", - }, - }, - }, - "quantity_changes": { - "set": "decimal_string", - }, - }, - }, - }, - }, }, ), options=options, @@ -402,38 +328,6 @@ async def update_async( }, }, }, - "pricing_line_actions": { - "add": { - "pricing": { - "price_details": { - "pricing_overrides": { - "overwrite_price": { - "unit_amount": "decimal_string", - }, - }, - "quantity_changes": { - "set": "decimal_string", - }, - }, - }, - }, - "update": { - "pricing": { - "price_details": { - "pricing_override_actions": { - "add": { - "overwrite_price": { - "unit_amount": "decimal_string", - }, - }, - }, - "quantity_changes": { - "set": "decimal_string", - }, - }, - }, - }, - }, }, ), options=options, diff --git a/stripe/v2/billing/_contract_term.py b/stripe/v2/billing/_contract_term.py index 69735a7bf..3033c0478 100644 --- a/stripe/v2/billing/_contract_term.py +++ b/stripe/v2/billing/_contract_term.py @@ -16,84 +16,15 @@ class ContractTerm(StripeObject): "v2.billing.contract_term" ) - class AdHocProduct(StripeObject): - class BillSchedule(StripeObject): - class Custom(StripeObject): - class BillAt(StripeObject): - timestamp: str - """ - The timestamp at which the fee will be billed. - """ - - amount: Amount - """ - Amount in the contract's currency. - """ - bill_at: BillAt - """ - The resolved bill date. - """ - _inner_class_types = {"bill_at": BillAt} - - custom: List[Custom] - """ - Scheduled installments and billed history. - """ - type: Union[Literal["custom"], str] - """ - The type of billing schedule. - """ - _inner_class_types = {"custom": Custom} - - class ServicePeriod(StripeObject): - class EndsAt(StripeObject): - timestamp: str - """ - The timestamp when the item ends. - """ - - class StartsAt(StripeObject): - timestamp: str - """ - The timestamp when the item starts. - """ - - ends_at: EndsAt - """ - The exclusive end of the service period. - """ - starts_at: StartsAt - """ - The inclusive start of the service period. - """ - _inner_class_types = {"ends_at": EndsAt, "starts_at": StartsAt} - - bill_schedule: BillSchedule - """ - Explicit bill dates and amounts, including billed history. - """ - product: str - """ - The V1 Product being billed. - """ - service_period: Optional[ServicePeriod] - """ - Informational invoice and revenue-recognition period with timestamp objects; does not affect billing or proration. - """ - _inner_class_types = { - "bill_schedule": BillSchedule, - "service_period": ServicePeriod, - } - class PricingOverride(StripeObject): class Criterion(StripeObject): terms: Optional[List[str]] """ - Resolved IDs of recurring or ad_hoc_product terms. Override terms are not valid targets. + Resolved IDs of recurring or scheduled_fee terms. Override terms are not valid targets. """ type: Union[Literal["exclude", "include"], str] """ - Whether to include or exclude the selected recurring or ad_hoc_product terms. + Whether to include or exclude the selected recurring or scheduled_fee terms. """ class EndsAt(StripeObject): @@ -124,7 +55,7 @@ class StartsAt(StripeObject): criteria: List[Criterion] """ - Recurring or ad_hoc_product terms selected by this override. An override without criteria applies to all recurring and ad_hoc_product terms. + Recurring or scheduled_fee terms selected by this override. An override without criteria applies to all recurring and scheduled_fee terms. """ ends_at: Optional[EndsAt] """ @@ -190,10 +121,75 @@ class StartsAt(StripeObject): _inner_class_types = {"ends_at": EndsAt, "starts_at": StartsAt} _field_encodings = {"quantity": "decimal_string"} - ad_hoc_product: Optional[AdHocProduct] - """ - Present when type is ad_hoc_product. - """ + class ScheduledFee(StripeObject): + class BillSchedule(StripeObject): + class Custom(StripeObject): + class BillAt(StripeObject): + timestamp: str + """ + The timestamp at which the fee will be billed. + """ + + amount: Amount + """ + Amount in the contract's currency. + """ + bill_at: BillAt + """ + The resolved bill date. + """ + _inner_class_types = {"bill_at": BillAt} + + custom: List[Custom] + """ + Scheduled installments and billed history. + """ + type: Union[Literal["custom"], str] + """ + The type of billing schedule. + """ + _inner_class_types = {"custom": Custom} + + class ServicePeriod(StripeObject): + class EndsAt(StripeObject): + timestamp: str + """ + The timestamp when the item ends. + """ + + class StartsAt(StripeObject): + timestamp: str + """ + The timestamp when the item starts. + """ + + ends_at: EndsAt + """ + The exclusive end of the service period. + """ + starts_at: StartsAt + """ + The inclusive start of the service period. + """ + _inner_class_types = {"ends_at": EndsAt, "starts_at": StartsAt} + + bill_schedule: BillSchedule + """ + Explicit bill dates and amounts, including billed history. + """ + product: str + """ + The V1 Product being billed. + """ + service_period: Optional[ServicePeriod] + """ + Informational invoice and revenue-recognition period with timestamp objects; does not affect billing or proration. + """ + _inner_class_types = { + "bill_schedule": BillSchedule, + "service_period": ServicePeriod, + } + id: str """ The stable ID of the term. @@ -222,14 +218,18 @@ class StartsAt(StripeObject): """ Present when type is recurring_price. """ + scheduled_fee: Optional[ScheduledFee] + """ + Present when type is scheduled_fee. + """ type: Union[ - Literal["ad_hoc_product", "pricing_override", "recurring_price"], str + Literal["pricing_override", "recurring_price", "scheduled_fee"], str ] """ The type of this term. """ _inner_class_types = { - "ad_hoc_product": AdHocProduct, "pricing_override": PricingOverride, "recurring_price": RecurringPrice, + "scheduled_fee": ScheduledFee, } diff --git a/stripe/v2/billing/_group.py b/stripe/v2/billing/_group.py new file mode 100644 index 000000000..3e1f735b7 --- /dev/null +++ b/stripe/v2/billing/_group.py @@ -0,0 +1,562 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from decimal import Decimal +from stripe._stripe_object import StripeObject, UntypedStripeObject +from typing import ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class Group(StripeObject): + """ + A Billing Group combines member invoices into a consolidated invoice according to shared grouping behavior. + """ + + OBJECT_NAME: ClassVar[Literal["v2.billing.group"]] = "v2.billing.group" + + class BillingSettings(StripeObject): + class EmailDelivery(StripeObject): + class PaymentDue(StripeObject): + enabled: bool + """ + If true an email for the invoice would be generated and sent out. + """ + include_payment_link: bool + """ + If true the payment link to hosted invoice page would be included in email and PDF of the invoice. + """ + + payment_due: PaymentDue + """ + Controls emails for when the payment is due. + """ + _inner_class_types = {"payment_due": PaymentDue} + + class InvoicePresentation(StripeObject): + invoice_rendering_template: Optional[str] + """ + The ID of the invoice rendering template to be used when generating invoices. + """ + + class InvoiceTimeUntilDue(StripeObject): + interval: Literal["day", "month", "week", "year"] + """ + The interval unit for the time until due. + """ + interval_count: int + """ + The number of interval units. For example, if interval=day and interval_count=30, the invoice is due in 30 days. + """ + + class PaymentMethodOptions(StripeObject): + class AcssDebit(StripeObject): + class MandateOptions(StripeObject): + transaction_type: Optional[ + Union[Literal["business", "personal"], str] + ] + """ + Transaction type of the mandate. + """ + + mandate_options: Optional[MandateOptions] + """ + Additional fields for Mandate creation. + """ + verification_method: Optional[ + Union[ + Literal["automatic", "instant", "microdeposits"], str + ] + ] + """ + Verification method. + """ + _inner_class_types = {"mandate_options": MandateOptions} + + class Bancontact(StripeObject): + preferred_language: Optional[ + Union[Literal["de", "en", "fr", "nl"], str] + ] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + + class Card(StripeObject): + class MandateOptions(StripeObject): + amount: Optional[int] + """ + Amount to be charged for future payments. + """ + amount_type: Optional[ + Union[Literal["fixed", "maximum"], str] + ] + """ + The AmountType for the mandate. One of `fixed` or `maximum`. + """ + description: Optional[str] + """ + A description of the mandate that is meant to be displayed to the customer. + """ + _field_encodings = {"amount": "int64_string"} + + mandate_options: Optional[MandateOptions] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + network: Optional[str] + """ + Selected network to process the payment on. Depends on the available networks of the card. + """ + request_three_d_secure: Optional[ + Union[Literal["any", "automatic", "challenge"], str] + ] + """ + An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers + for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). + However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. + Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + _inner_class_types = {"mandate_options": MandateOptions} + + class CustomerBalance(StripeObject): + class BankTransfer(StripeObject): + class EuBankTransfer(StripeObject): + country: Union[ + Literal["BE", "DE", "ES", "FR", "IE", "NL"], str + ] + """ + The desired country code of the bank account information. + """ + + eu_bank_transfer: Optional[EuBankTransfer] + """ + Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. + """ + type: Optional[ + Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, + ] + ] + """ + The bank transfer type that can be used for funding. + """ + _inner_class_types = {"eu_bank_transfer": EuBankTransfer} + + bank_transfer: Optional[BankTransfer] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: Optional[Union[Literal["bank_transfer"], str]] + """ + The funding method type to be used when there are not enough funds in the customer balance. Currently the only supported value is `bank_transfer`. + """ + _inner_class_types = {"bank_transfer": BankTransfer} + + class Konbini(StripeObject): + pass + + class SepaDebit(StripeObject): + pass + + class UsBankAccount(StripeObject): + class FinancialConnections(StripeObject): + class Filters(StripeObject): + account_subcategories: List[ + Union[Literal["checking", "savings"], str] + ] + """ + The account subcategories to use to filter for selectable accounts. + """ + + filters: Optional[Filters] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + permissions: List[ + Union[ + Literal[ + "balances", + "ownership", + "payment_method", + "transactions", + ], + str, + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. + """ + prefetch: List[ + Union[ + Literal["balances", "ownership", "transactions"], + str, + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + _inner_class_types = {"filters": Filters} + + financial_connections: FinancialConnections + """ + Additional fields for Financial Connections Session creation. + """ + verification_method: Union[ + Literal["automatic", "instant", "microdeposits"], str + ] + """ + Verification method. + """ + _inner_class_types = { + "financial_connections": FinancialConnections, + } + + acss_debit: Optional[AcssDebit] + """ + This sub-hash contains details about the Canadian pre-authorized debit payment method options. + """ + bancontact: Optional[Bancontact] + """ + This sub-hash contains details about the Bancontact payment method. + """ + card: Optional[Card] + """ + This sub-hash contains details about the Card payment method options. + """ + customer_balance: Optional[CustomerBalance] + """ + This sub-hash contains details about the Bank transfer payment method options. + """ + konbini: Optional[Konbini] + """ + This sub-hash contains details about the Konbini payment method options. + """ + sepa_debit: Optional[SepaDebit] + """ + This sub-hash contains details about the SEPA Direct Debit payment method options. + """ + us_bank_account: Optional[UsBankAccount] + """ + This sub-hash contains details about the ACH direct debit payment method options. + """ + _inner_class_types = { + "acss_debit": AcssDebit, + "bancontact": Bancontact, + "card": Card, + "customer_balance": CustomerBalance, + "konbini": Konbini, + "sepa_debit": SepaDebit, + "us_bank_account": UsBankAccount, + } + + class Tax(StripeObject): + type: Union[Literal["automatic", "manual"], str] + """ + Determines if tax is calculated automatically based on a product tax code or manually based on rules defined by the business. + """ + + collection_method: Literal["charge_automatically", "send_invoice"] + """ + How Stripe collects payment. + """ + email_delivery: EmailDelivery + """ + Email delivery setting. + """ + invoice_presentation: Optional[InvoicePresentation] + """ + Settings for invoice presentation. + """ + invoice_time_until_due: InvoiceTimeUntilDue + """ + The amount of time until the invoice is overdue for payment. + """ + payment_method_configuration: Optional[str] + """ + The ID of the payment method configuration, which controls which payment methods are displayed to your customers. + """ + payment_method_options: Optional[PaymentMethodOptions] + """ + Payment Method specific configuration to be stored on the object. + """ + tax: Tax + """ + Settings for calculating tax. + """ + _inner_class_types = { + "email_delivery": EmailDelivery, + "invoice_presentation": InvoicePresentation, + "invoice_time_until_due": InvoiceTimeUntilDue, + "payment_method_options": PaymentMethodOptions, + "tax": Tax, + } + + class GroupingBehavior(StripeObject): + class ByCadence(StripeObject): + class Day(StripeObject): + class Time(StripeObject): + hour: int + """ + The hour, from 0 through 23. + """ + minute: int + """ + The minute, from 0 through 59. + """ + second: Optional[int] + """ + The second, from 0 through 59. Defaults to 0. + """ + + time: Time + """ + The time at which the daily grouping interval begins. + """ + _inner_class_types = {"time": Time} + + class Month(StripeObject): + class Time(StripeObject): + hour: int + """ + The hour, from 0 through 23. + """ + minute: int + """ + The minute, from 0 through 59. + """ + second: Optional[int] + """ + The second, from 0 through 59. Defaults to 0. + """ + + day_of_month: Optional[int] + """ + The day of month, from 1 through 31. For shorter months, the cadence anchors to the month's last day. + """ + month_of_year: Optional[int] + """ + The month of year, from 1 through 12, from which occurrences are calculated. + """ + time: Time + """ + The time at which the monthly grouping interval begins. Defaults to the time the billing group was created, in UTC. + """ + _inner_class_types = {"time": Time} + + class Week(StripeObject): + class Time(StripeObject): + hour: int + """ + The hour, from 0 through 23. + """ + minute: int + """ + The minute, from 0 through 59. + """ + second: Optional[int] + """ + The second, from 0 through 59. Defaults to 0. + """ + + day_of_week: Optional[int] + """ + The ISO-8601 day of week, from 1 for Monday through 7 for Sunday. + """ + time: Time + """ + The time at which the weekly grouping interval begins. + """ + _inner_class_types = {"time": Time} + + class Year(StripeObject): + class Time(StripeObject): + hour: int + """ + The hour, from 0 through 23. + """ + minute: int + """ + The minute, from 0 through 59. + """ + second: Optional[int] + """ + The second, from 0 through 59. Defaults to 0. + """ + + day_of_month: Optional[int] + """ + The day of month, from 1 through 31. For shorter months, the cadence anchors to the month's last day. + """ + month_of_year: Optional[int] + """ + The month of year, from 1 through 12. + """ + time: Time + """ + The time at which the yearly grouping interval begins. Defaults to the time the billing group was created, in UTC. + """ + _inner_class_types = {"time": Time} + + billing_cycle_anchor: Optional[str] + """ + Timestamp that anchors the recurring grouping cadence. + """ + day: Optional[Day] + """ + Daily cadence details. + """ + interval_count: int + """ + The number of interval units between groups. + """ + month: Optional[Month] + """ + Monthly cadence details. + """ + type: Union[Literal["day", "month", "week", "year"], str] + """ + The interval unit for the cadence. + """ + week: Optional[Week] + """ + Weekly cadence details. + """ + year: Optional[Year] + """ + Yearly cadence details. + """ + _inner_class_types = { + "day": Day, + "month": Month, + "week": Week, + "year": Year, + } + + by_cadence: Optional[ByCadence] + """ + The cadence configuration when type is `by_cadence`. + """ + type: Union[Literal["by_cadence"], str] + """ + The grouping strategy. + """ + _inner_class_types = {"by_cadence": ByCadence} + + class InvoiceDiscountRule(StripeObject): + class PercentOff(StripeObject): + class MaximumApplications(StripeObject): + times: Optional[int] + """ + The number of times this discount can be applied when the type is `times`. + """ + type: Union[Literal["indefinite", "times"], str] + """ + Max applications type of this discount, ex: indefinite. + """ + + maximum_applications: MaximumApplications + """ + The maximum applications configuration for this discount. + """ + percent_off: Decimal + """ + Percent that is taken off the amount. For example, a percent_off of 50.0 reduces a 100 USD amount to 50 USD. + """ + _inner_class_types = {"maximum_applications": MaximumApplications} + _field_encodings = {"percent_off": "decimal_string"} + + id: str + """ + Unique identifier for the object. + """ + percent_off: Optional[PercentOff] + """ + Details if the discount is a percentage off. + """ + type: Union[Literal["percent_off"], str] + """ + The type of the discount. + """ + _inner_class_types = {"percent_off": PercentOff} + + class StatusTransitions(StripeObject): + activated_at: Optional[str] + """ + Timestamp of when the billing group became active. + """ + canceled_at: Optional[str] + """ + Timestamp of when the billing group was canceled. + """ + + billing_settings: Optional[BillingSettings] + """ + The effective billing settings for the group. Returned only when `billing_settings` is included in the request. + """ + created: str + """ + Timestamp of when the object was created. + """ + customer: str + """ + The ID of the Customer object whose invoices are grouped. + """ + default_payment_method: Optional[str] + """ + The ID of the PaymentMethod object used by default. If unset, the customer's default payment method is used. + """ + grouping_behavior: GroupingBehavior + """ + The strategy used to group member invoices. + """ + id: str + """ + The ID of the BillingGroup object. + """ + invoice_discount_rules: Optional[List[InvoiceDiscountRule]] + """ + The discount rules applied to all invoices for the group's underlying cadence. Returned only when `invoice_discount_rules` is included in the request. + """ + livemode: bool + """ + Whether the billing group exists in live mode. + """ + lookup_key: Optional[str] + """ + An internal key you can use to find a particular billing group. Maximum length of 200 characters. + """ + metadata: Optional[UntypedStripeObject[str]] + """ + Set of key-value pairs that you can attach to an object for storing additional structured information. + """ + next_billing_date: str + """ + The date when the billing group will next create a consolidated invoice. + """ + object: Literal["v2.billing.group"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + status: Union[Literal["active", "canceled"], str] + """ + The current status of the billing group. + """ + status_transitions: StatusTransitions + """ + Timestamps for the billing group's status transitions. + """ + test_clock: Optional[str] + """ + The ID of the TestClock object associated with the billing group. + """ + _inner_class_types = { + "billing_settings": BillingSettings, + "grouping_behavior": GroupingBehavior, + "invoice_discount_rules": InvoiceDiscountRule, + "status_transitions": StatusTransitions, + } diff --git a/stripe/v2/billing/_group_invoice.py b/stripe/v2/billing/_group_invoice.py new file mode 100644 index 000000000..a55be7661 --- /dev/null +++ b/stripe/v2/billing/_group_invoice.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar +from typing_extensions import Literal + + +class GroupInvoice(StripeObject): + """ + A Billing Group Invoice references an empty invoice created with the billing group's settings. + """ + + OBJECT_NAME: ClassVar[Literal["v2.billing.group_invoice"]] = ( + "v2.billing.group_invoice" + ) + created: str + """ + Timestamp of when the BillingGroupInvoice object was created. + """ + id: str + """ + The ID of the BillingGroupInvoice object. + """ + invoice_id: str + """ + The ID of the created Invoice object. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.billing.group_invoice"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ diff --git a/stripe/v2/billing/_group_service.py b/stripe/v2/billing/_group_service.py new file mode 100644 index 000000000..81cc2e695 --- /dev/null +++ b/stripe/v2/billing/_group_service.py @@ -0,0 +1,313 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._encode import _coerce_v2_params +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.billing._group_cancel_params import GroupCancelParams + from stripe.params.v2.billing._group_create_params import GroupCreateParams + from stripe.params.v2.billing._group_list_params import GroupListParams + from stripe.params.v2.billing._group_retrieve_params import ( + GroupRetrieveParams, + ) + from stripe.params.v2.billing._group_update_params import GroupUpdateParams + from stripe.v2._list_object import ListObject + from stripe.v2.billing._group import Group + from stripe.v2.billing.groups._invoice_service import InvoiceService + from stripe.v2.billing.groups._spend_modifier_rule_service import ( + SpendModifierRuleService, + ) + +_subservices = { + "invoices": [ + "stripe.v2.billing.groups._invoice_service", + "InvoiceService", + ], + "spend_modifier_rules": [ + "stripe.v2.billing.groups._spend_modifier_rule_service", + "SpendModifierRuleService", + ], +} + + +class GroupService(StripeService): + invoices: "InvoiceService" + spend_modifier_rules: "SpendModifierRuleService" + + 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() + + def list( + self, + params: Optional["GroupListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Group]": + """ + List Billing Groups. + """ + return cast( + "ListObject[Group]", + self._request( + "get", + "/v2/billing/groups", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["GroupListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Group]": + """ + List Billing Groups. + """ + return cast( + "ListObject[Group]", + await self._request_async( + "get", + "/v2/billing/groups", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "GroupCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "Group": + """ + Create a BillingGroup. + """ + return cast( + "Group", + self._request( + "post", + "/v2/billing/groups", + base_address="api", + params=_coerce_v2_params( + params, + { + "billing_settings": { + "payment_method_options": { + "card": { + "mandate_options": { + "amount": "int64_string", + }, + }, + }, + }, + }, + ), + options=options, + ), + ) + + async def create_async( + self, + params: "GroupCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "Group": + """ + Create a BillingGroup. + """ + return cast( + "Group", + await self._request_async( + "post", + "/v2/billing/groups", + base_address="api", + params=_coerce_v2_params( + params, + { + "billing_settings": { + "payment_method_options": { + "card": { + "mandate_options": { + "amount": "int64_string", + }, + }, + }, + }, + }, + ), + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["GroupRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Group": + """ + Retrieve a BillingGroup. + """ + return cast( + "Group", + self._request( + "get", + "/v2/billing/groups/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["GroupRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Group": + """ + Retrieve a BillingGroup. + """ + return cast( + "Group", + await self._request_async( + "get", + "/v2/billing/groups/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + def update( + self, + id: str, + /, + params: Optional["GroupUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Group": + """ + Update a BillingGroup. + """ + return cast( + "Group", + self._request( + "post", + "/v2/billing/groups/{id}".format(id=sanitize_id(id)), + base_address="api", + params=_coerce_v2_params( + params, + { + "billing_settings": { + "payment_method_options": { + "card": { + "mandate_options": { + "amount": "int64_string", + }, + }, + }, + }, + }, + ), + options=options, + ), + ) + + async def update_async( + self, + id: str, + /, + params: Optional["GroupUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Group": + """ + Update a BillingGroup. + """ + return cast( + "Group", + await self._request_async( + "post", + "/v2/billing/groups/{id}".format(id=sanitize_id(id)), + base_address="api", + params=_coerce_v2_params( + params, + { + "billing_settings": { + "payment_method_options": { + "card": { + "mandate_options": { + "amount": "int64_string", + }, + }, + }, + }, + }, + ), + options=options, + ), + ) + + def cancel( + self, + id: str, + /, + params: Optional["GroupCancelParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Group": + """ + Cancel a BillingGroup. + """ + return cast( + "Group", + self._request( + "post", + "/v2/billing/groups/{id}/cancel".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def cancel_async( + self, + id: str, + /, + params: Optional["GroupCancelParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Group": + """ + Cancel a BillingGroup. + """ + return cast( + "Group", + await self._request_async( + "post", + "/v2/billing/groups/{id}/cancel".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/billing/_cadence_spend_modifier.py b/stripe/v2/billing/_group_spend_modifier.py similarity index 68% rename from stripe/v2/billing/_cadence_spend_modifier.py rename to stripe/v2/billing/_group_spend_modifier.py index fae279692..4640abd7f 100644 --- a/stripe/v2/billing/_cadence_spend_modifier.py +++ b/stripe/v2/billing/_group_spend_modifier.py @@ -5,21 +5,21 @@ from typing_extensions import Literal -class CadenceSpendModifier(StripeObject): +class GroupSpendModifier(StripeObject): """ - A Spend Modifier changes how spend is computed when billing for specific cadence. + A spend modifier changes how spend is computed for a billing group. """ - OBJECT_NAME: ClassVar[Literal["v2.billing.cadence_spend_modifier"]] = ( - "v2.billing.cadence_spend_modifier" + OBJECT_NAME: ClassVar[Literal["v2.billing.group_spend_modifier"]] = ( + "v2.billing.group_spend_modifier" ) class MaxBillingPeriodSpend(StripeObject): class Amount(StripeObject): class CustomPricingUnit(StripeObject): - id: Optional[str] + id: str """ - The id of the custom pricing unit. + The ID of the custom pricing unit. """ value: str """ @@ -36,23 +36,13 @@ class CustomPricingUnit(StripeObject): """ _inner_class_types = {"custom_pricing_unit": CustomPricingUnit} - class CustomPricingUnitOverageRate(StripeObject): - id: str - """ - ID of the custom pricing unit overage rate. - """ - alert: str """ The billing alert associated with the maximum spend threshold. """ amount: Amount """ - The maximum amount of invoice spend. - """ - custom_pricing_unit_overage_rate: CustomPricingUnitOverageRate - """ - The configuration for the overage rate for the custom pricing unit. + The maximum invoice spend, measured in custom pricing units. """ effective_from: str """ @@ -62,14 +52,11 @@ class CustomPricingUnitOverageRate(StripeObject): """ The timestamp until which this spend modifier is effective. If not set, the modifier is effective indefinitely. """ - _inner_class_types = { - "amount": Amount, - "custom_pricing_unit_overage_rate": CustomPricingUnitOverageRate, - } + _inner_class_types = {"amount": Amount} - billing_cadence: str + billing_group: str """ - The ID of the Billing Cadence this spend modifier is associated with. + The ID of the billing group this spend modifier is associated with. """ created: str """ @@ -87,7 +74,7 @@ class CustomPricingUnitOverageRate(StripeObject): """ Max invoice spend details. Present if type is `max_billing_period_spend`. """ - object: Literal["v2.billing.cadence_spend_modifier"] + object: Literal["v2.billing.group_spend_modifier"] """ String representing the object's type. Objects of the same type share the same value of the object field. """ diff --git a/stripe/v2/billing/_intent.py b/stripe/v2/billing/_intent.py index 50e26a7f9..cbd560c26 100644 --- a/stripe/v2/billing/_intent.py +++ b/stripe/v2/billing/_intent.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional, Union +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -48,234 +48,472 @@ class AmountDetails(StripeObject): Total amount for the Billing Intent. """ - class CadenceData(StripeObject): - class BillingCycle(StripeObject): - class Day(StripeObject): - class Time(StripeObject): - hour: int + class BillingGroupData(StripeObject): + class BillingSettings(StripeObject): + class EmailDelivery(StripeObject): + class PaymentDue(StripeObject): + enabled: bool """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. + If true an email for the invoice would be generated and sent out. """ - minute: int + include_payment_link: bool """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - second: Optional[int] - """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + If true the payment link to hosted invoice page would be included in email and PDF of the invoice. """ - time: Time + payment_due: PaymentDue + """ + Controls emails for when the payment is due. + """ + _inner_class_types = {"payment_due": PaymentDue} + + class InvoicePresentation(StripeObject): + invoice_rendering_template: Optional[str] """ - The time at which the billing cycle ends. + The ID of the invoice rendering template to be used when generating invoices. """ - _inner_class_types = {"time": Time} - class Month(StripeObject): - class Time(StripeObject): - hour: int + class InvoiceTimeUntilDue(StripeObject): + interval: Literal["day", "month", "week", "year"] + """ + The interval unit for the time until due. + """ + interval_count: int + """ + The number of interval units. For example, if interval=day and interval_count=30, the invoice is due in 30 days. + """ + + class PaymentMethodOptions(StripeObject): + class AcssDebit(StripeObject): + class MandateOptions(StripeObject): + transaction_type: Optional[ + Union[Literal["business", "personal"], str] + ] + """ + Transaction type of the mandate. + """ + + mandate_options: Optional[MandateOptions] """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. + Additional fields for Mandate creation. """ - minute: int + verification_method: Optional[ + Union[ + Literal["automatic", "instant", "microdeposits"], + str, + ] + ] """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + Verification method. """ - second: Optional[int] + _inner_class_types = {"mandate_options": MandateOptions} + + class Bancontact(StripeObject): + preferred_language: Optional[ + Union[Literal["de", "en", "fr", "nl"], str] + ] """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + Preferred language of the Bancontact authorization page that the customer is redirected to. """ - day_of_month: int - """ - The day to anchor the billing on for a type="month" billing cycle from 1-31. - If this number is greater than the number of days in the month being billed, - this anchors to the last day of the month. - """ - month_of_year: Optional[int] - """ - The month to anchor the billing on for a type="month" billing cycle from - 1-12. Occurrences are calculated from the month anchor. - """ - time: Time - """ - The time at which the billing cycle ends. - """ - _inner_class_types = {"time": Time} + class Card(StripeObject): + class MandateOptions(StripeObject): + amount: Optional[int] + """ + Amount to be charged for future payments. + """ + amount_type: Optional[ + Union[Literal["fixed", "maximum"], str] + ] + """ + The AmountType for the mandate. One of `fixed` or `maximum`. + """ + description: Optional[str] + """ + A description of the mandate that is meant to be displayed to the customer. + """ + _field_encodings = {"amount": "int64_string"} - class Week(StripeObject): - class Time(StripeObject): - hour: int + mandate_options: Optional[MandateOptions] """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. + Configuration options for setting up an eMandate for cards issued in India. """ - minute: int + network: Optional[str] """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + Selected network to process the payment on. Depends on the available networks of the card. """ - second: Optional[int] + request_three_d_secure: Optional[ + Union[Literal["any", "automatic", "challenge"], str] + ] """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers + for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). + However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. + Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. """ + _inner_class_types = {"mandate_options": MandateOptions} - day_of_week: int - """ - The day of the week to bill the type=week billing cycle on. - Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601 week day numbering. - """ - time: Time - """ - The time at which the billing cycle ends. - """ - _inner_class_types = {"time": Time} + class CustomerBalance(StripeObject): + class BankTransfer(StripeObject): + class EuBankTransfer(StripeObject): + country: Union[ + Literal["BE", "DE", "ES", "FR", "IE", "NL"], + str, + ] + """ + The desired country code of the bank account information. + """ + + eu_bank_transfer: Optional[EuBankTransfer] + """ + Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. + """ + type: Optional[ + Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, + ] + ] + """ + The bank transfer type that can be used for funding. + """ + _inner_class_types = { + "eu_bank_transfer": EuBankTransfer, + } - class Year(StripeObject): - class Time(StripeObject): - hour: int + bank_transfer: Optional[BankTransfer] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. + funding_type: Optional[ + Union[Literal["bank_transfer"], str] + ] """ - minute: int + The funding method type to be used when there are not enough funds in the customer balance. Currently the only supported value is `bank_transfer`. + """ + _inner_class_types = {"bank_transfer": BankTransfer} + + class Konbini(StripeObject): + pass + + class SepaDebit(StripeObject): + pass + + class UsBankAccount(StripeObject): + class FinancialConnections(StripeObject): + class Filters(StripeObject): + account_subcategories: List[ + Union[Literal["checking", "savings"], str] + ] + """ + The account subcategories to use to filter for selectable accounts. + """ + + filters: Optional[Filters] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + permissions: List[ + Union[ + Literal[ + "balances", + "ownership", + "payment_method", + "transactions", + ], + str, + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. + """ + prefetch: List[ + Union[ + Literal[ + "balances", "ownership", "transactions" + ], + str, + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + _inner_class_types = {"filters": Filters} + + financial_connections: FinancialConnections """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + Additional fields for Financial Connections Session creation. """ - second: Optional[int] + verification_method: Union[ + Literal["automatic", "instant", "microdeposits"], str + ] """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. + Verification method. """ + _inner_class_types = { + "financial_connections": FinancialConnections, + } - day_of_month: int + acss_debit: Optional[AcssDebit] + """ + This sub-hash contains details about the Canadian pre-authorized debit payment method options. """ - The day to anchor the billing on for a type="month" billing cycle from 1-31. - If this number is greater than the number of days in the month being billed, - this anchors to the last day of the month. + bancontact: Optional[Bancontact] """ - month_of_year: int + This sub-hash contains details about the Bancontact payment method. """ - The month to bill on from 1-12. If not provided, this defaults to the month the cadence was created. + card: Optional[Card] """ - time: Time + This sub-hash contains details about the Card payment method options. + """ + customer_balance: Optional[CustomerBalance] + """ + This sub-hash contains details about the Bank transfer payment method options. + """ + konbini: Optional[Konbini] + """ + This sub-hash contains details about the Konbini payment method options. + """ + sepa_debit: Optional[SepaDebit] + """ + This sub-hash contains details about the SEPA Direct Debit payment method options. + """ + us_bank_account: Optional[UsBankAccount] + """ + This sub-hash contains details about the ACH direct debit payment method options. + """ + _inner_class_types = { + "acss_debit": AcssDebit, + "bancontact": Bancontact, + "card": Card, + "customer_balance": CustomerBalance, + "konbini": Konbini, + "sepa_debit": SepaDebit, + "us_bank_account": UsBankAccount, + } + + class Tax(StripeObject): + type: Union[Literal["automatic", "manual"], str] """ - The time at which the billing cycle ends. + Determines if tax is calculated automatically based on a product tax code or manually based on rules defined by the business. """ - _inner_class_types = {"time": Time} - day: Optional[Day] + collection_method: Literal["charge_automatically", "send_invoice"] """ - Specific configuration for determining billing dates when type=day. + How Stripe collects payment. """ - interval_count: int + email_delivery: EmailDelivery """ - The number of intervals (specified in the interval attribute) between cadence billings. For example, type=month and interval_count=3 bills every 3 months. + Email delivery setting. """ - month: Optional[Month] + invoice_presentation: Optional[InvoicePresentation] """ - Specific configuration for determining billing dates when type=month. + Settings for invoice presentation. """ - type: Union[Literal["day", "month", "week", "year"], str] + invoice_time_until_due: InvoiceTimeUntilDue """ - The frequency at which a cadence bills. + The amount of time until the invoice is overdue for payment. """ - week: Optional[Week] + payment_method_configuration: Optional[str] """ - Specific configuration for determining billing dates when type=week. + The ID of the payment method configuration, which controls which payment methods are displayed to your customers. """ - year: Optional[Year] + payment_method_options: Optional[PaymentMethodOptions] """ - Specific configuration for determining billing dates when type=year. + Payment Method specific configuration to be stored on the object. + """ + tax: Tax + """ + Settings for calculating tax. """ _inner_class_types = { - "day": Day, - "month": Month, - "week": Week, - "year": Year, + "email_delivery": EmailDelivery, + "invoice_presentation": InvoicePresentation, + "invoice_time_until_due": InvoiceTimeUntilDue, + "payment_method_options": PaymentMethodOptions, + "tax": Tax, } - class Payer(StripeObject): - class BillingProfileData(StripeObject): - customer: str + class GroupingBehavior(StripeObject): + class ByCadence(StripeObject): + class Day(StripeObject): + class Time(StripeObject): + hour: int + """ + The hour, from 0 through 23. + """ + minute: int + """ + The minute, from 0 through 59. + """ + second: Optional[int] + """ + The second, from 0 through 59. Defaults to 0. + """ + + time: Time + """ + The time at which the daily grouping interval begins. + """ + _inner_class_types = {"time": Time} + + class Month(StripeObject): + class Time(StripeObject): + hour: int + """ + The hour, from 0 through 23. + """ + minute: int + """ + The minute, from 0 through 59. + """ + second: Optional[int] + """ + The second, from 0 through 59. Defaults to 0. + """ + + day_of_month: Optional[int] + """ + The day of month, from 1 through 31. For shorter months, the cadence anchors to the month's last day. + """ + month_of_year: Optional[int] + """ + The month of year, from 1 through 12, from which occurrences are calculated. + """ + time: Time + """ + The time at which the monthly grouping interval begins. Defaults to the time the billing group was created, in UTC. + """ + _inner_class_types = {"time": Time} + + class Week(StripeObject): + class Time(StripeObject): + hour: int + """ + The hour, from 0 through 23. + """ + minute: int + """ + The minute, from 0 through 59. + """ + second: Optional[int] + """ + The second, from 0 through 59. Defaults to 0. + """ + + day_of_week: Optional[int] + """ + The ISO-8601 day of week, from 1 for Monday through 7 for Sunday. + """ + time: Time + """ + The time at which the weekly grouping interval begins. + """ + _inner_class_types = {"time": Time} + + class Year(StripeObject): + class Time(StripeObject): + hour: int + """ + The hour, from 0 through 23. + """ + minute: int + """ + The minute, from 0 through 59. + """ + second: Optional[int] + """ + The second, from 0 through 59. Defaults to 0. + """ + + day_of_month: Optional[int] + """ + The day of month, from 1 through 31. For shorter months, the cadence anchors to the month's last day. + """ + month_of_year: Optional[int] + """ + The month of year, from 1 through 12. + """ + time: Time + """ + The time at which the yearly grouping interval begins. Defaults to the time the billing group was created, in UTC. + """ + _inner_class_types = {"time": Time} + + billing_cycle_anchor: Optional[str] """ - The customer to associate with the profile. + Timestamp that anchors the recurring grouping cadence. """ - default_payment_method: Optional[str] + day: Optional[Day] """ - The default payment method to use when billing this profile. - If none is provided, the customer `default_payment_method` is used. + Daily cadence details. """ - - billing_profile: Optional[str] - """ - The ID of the Billing Profile object which determines how a bill is paid. - """ - billing_profile_data: Optional[BillingProfileData] - """ - Data for creating a new profile. - """ - _inner_class_types = {"billing_profile_data": BillingProfileData} - - class Settings(StripeObject): - class Bill(StripeObject): - id: str + interval_count: int """ - The ID of the referenced settings object. + The number of interval units between groups. """ - version: Optional[str] + month: Optional[Month] """ - Returns the Settings Version when the cadence is pinned to a specific version. + Monthly cadence details. """ - - class Collection(StripeObject): - id: str + type: Union[Literal["day", "month", "week", "year"], str] + """ + The interval unit for the cadence. """ - The ID of the referenced settings object. + week: Optional[Week] """ - version: Optional[str] + Weekly cadence details. """ - Returns the Settings Version when the cadence is pinned to a specific version. + year: Optional[Year] """ + Yearly cadence details. + """ + _inner_class_types = { + "day": Day, + "month": Month, + "week": Week, + "year": Year, + } - bill: Optional[Bill] + by_cadence: Optional[ByCadence] """ - Settings that configure bills generation, which includes calculating totals, tax, and presenting invoices. + The cadence configuration when type is `by_cadence`. """ - collection: Optional[Collection] + type: Union[Literal["by_cadence"], str] """ - Settings that configure and manage the behavior of collecting payments. + The grouping strategy. """ - _inner_class_types = {"bill": Bill, "collection": Collection} + _inner_class_types = {"by_cadence": ByCadence} - billing_cycle: BillingCycle + billing_settings: Optional[BillingSettings] + """ + Billing setting overrides for the group. If omitted, the applicable defaults are used. + """ + customer: str + """ + The ID of the Customer object whose invoices are grouped. + """ + default_payment_method: Optional[str] """ - The billing cycle configuration for this Cadence. + The ID of the PaymentMethod object used by default. If unset, the customer's default payment method is used. """ - payer: Payer + grouping_behavior: Optional[GroupingBehavior] """ - Information about the payer for this Cadence. + The strategy used to group member invoices. """ - settings: Optional[Settings] + lookup_key: Optional[str] """ - Settings for creating the Cadence. + An internal key you can use to find a particular billing group. Maximum length of 200 characters. """ _inner_class_types = { - "billing_cycle": BillingCycle, - "payer": Payer, - "settings": Settings, + "billing_settings": BillingSettings, + "grouping_behavior": GroupingBehavior, } class StatusTransitions(StripeObject): @@ -304,13 +542,13 @@ class StatusTransitions(StripeObject): """ Breakdown of the amount for this Billing Intent. """ - cadence: Optional[str] + billing_group: Optional[str] """ - ID of an existing Cadence to use. + ID of an existing Billing Group to use. """ - cadence_data: Optional[CadenceData] + billing_group_data: Optional[BillingGroupData] """ - Data for creating a new Cadence. + Data for creating a new Billing Group. """ created: str """ @@ -342,6 +580,6 @@ class StatusTransitions(StripeObject): """ _inner_class_types = { "amount_details": AmountDetails, - "cadence_data": CadenceData, + "billing_group_data": BillingGroupData, "status_transitions": StatusTransitions, } diff --git a/stripe/v2/billing/_intent_action.py b/stripe/v2/billing/_intent_action.py index 4dd2ddef2..cf197b911 100644 --- a/stripe/v2/billing/_intent_action.py +++ b/stripe/v2/billing/_intent_action.py @@ -62,7 +62,7 @@ class MaximumApplications(StripeObject): maximum_applications: MaximumApplications """ - The maximum number of times this discount can be applied for this Billing Cadence. + The maximum number of times this discount can be applied for this billing group. """ percent_off: Decimal """ @@ -73,9 +73,9 @@ class MaximumApplications(StripeObject): } _field_encodings = {"percent_off": "decimal_string"} - applies_to: Union[Literal["cadence"], str] + applies_to: Union[Literal["cadence", "group"], str] """ - The entity that the discount rule applies to, for example, the Billing Cadence. + The entity that the discount rule applies to, for example, the Billing Group. """ invoice_discount_rule: Optional[str] """ diff --git a/stripe/v2/billing/_intent_service.py b/stripe/v2/billing/_intent_service.py index 629528945..f2f214d23 100644 --- a/stripe/v2/billing/_intent_service.py +++ b/stripe/v2/billing/_intent_service.py @@ -123,6 +123,17 @@ def create( }, }, }, + "billing_group_data": { + "billing_settings": { + "payment_method_options": { + "card": { + "mandate_options": { + "amount": "int64_string", + }, + }, + }, + }, + }, }, ), options=options, @@ -155,6 +166,17 @@ async def create_async( }, }, }, + "billing_group_data": { + "billing_settings": { + "payment_method_options": { + "card": { + "mandate_options": { + "amount": "int64_string", + }, + }, + }, + }, + }, }, ), options=options, diff --git a/stripe/v2/billing/_pricing_plan_subscription.py b/stripe/v2/billing/_pricing_plan_subscription.py index 98d432992..e018aa890 100644 --- a/stripe/v2/billing/_pricing_plan_subscription.py +++ b/stripe/v2/billing/_pricing_plan_subscription.py @@ -16,7 +16,7 @@ class PricingPlanSubscription(StripeObject): """ A Pricing Plan Subscription represents a customer's active subscription to a Pricing Plan. It tracks both the servicing status (whether the customer is receiving service) and collection status (whether payments are current). Subscriptions - are created through Billing Intents and bill according to the associated Billing Cadence. + are created through Billing Intents and bill according to the associated Billing Group. """ OBJECT_NAME: ClassVar[Literal["v2.billing.pricing_plan_subscription"]] = ( @@ -489,9 +489,9 @@ class ServicingStatusTransitions(StripeObject): When the servicing is scheduled to cancel. """ - billing_cadence: str + billing_group: str """ - The ID of the Billing Cadence this subscription is billed on. + The ID of the Billing Group this subscription is billed on. """ cancellation_details: Optional[CancellationDetails] """ @@ -553,7 +553,7 @@ class ServicingStatusTransitions(StripeObject): """ test_clock: Optional[str] """ - The ID of the Test Clock of the associated Billing Cadence, if any. + The ID of the Test Clock of the associated Billing Group, if any. """ _inner_class_types = { "cancellation_details": CancellationDetails, diff --git a/stripe/v2/billing/_rate_card_subscription.py b/stripe/v2/billing/_rate_card_subscription.py index 3faf47841..396a4aae6 100644 --- a/stripe/v2/billing/_rate_card_subscription.py +++ b/stripe/v2/billing/_rate_card_subscription.py @@ -9,7 +9,7 @@ class RateCardSubscription(StripeObject): """ A Rate Card Subscription represents a customer's subscription to a Rate Card's usage-based pricing. It tracks the servicing status (whether usage is being measured) and collection status (whether payments are current). Subscriptions - bill according to the service interval defined in the Rate Card and are collected on the associated Billing Cadence. + bill according to the service interval defined in the Rate Card and are collected on the associated Billing Group. """ OBJECT_NAME: ClassVar[Literal["v2.billing.rate_card_subscription"]] = ( @@ -60,9 +60,9 @@ class ServicingStatusTransitions(StripeObject): When the servicing is scheduled to cancel. """ - billing_cadence: str + billing_group: str """ - The ID of the Billing Cadence. + The ID of the Billing Group. """ collection_status: Optional[ Literal[ diff --git a/stripe/v2/billing/_rate_card_subscription_service.py b/stripe/v2/billing/_rate_card_subscription_service.py index 440188dfc..2b6ba637a 100644 --- a/stripe/v2/billing/_rate_card_subscription_service.py +++ b/stripe/v2/billing/_rate_card_subscription_service.py @@ -71,7 +71,7 @@ def create( options: Optional["RequestOptions"] = None, ) -> "RateCardSubscription": """ - Create a Rate Card Subscription to bill a Rate Card on a specified Billing Cadence. + Create a Rate Card Subscription to bill a Rate Card on a specified Billing Group. """ return cast( "RateCardSubscription", @@ -90,7 +90,7 @@ async def create_async( options: Optional["RequestOptions"] = None, ) -> "RateCardSubscription": """ - Create a Rate Card Subscription to bill a Rate Card on a specified Billing Cadence. + Create a Rate Card Subscription to bill a Rate Card on a specified Billing Group. """ return cast( "RateCardSubscription", diff --git a/stripe/v2/billing/contracts/__init__.py b/stripe/v2/billing/contracts/__init__.py index ee82c9ea5..9b5f01a72 100644 --- a/stripe/v2/billing/contracts/__init__.py +++ b/stripe/v2/billing/contracts/__init__.py @@ -4,25 +4,14 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: - from stripe.v2.billing.contracts import ( - pricing_lines as pricing_lines, - terms as terms, - ) - from stripe.v2.billing.contracts._pricing_lines_service import ( - PricingLinesService as PricingLinesService, - ) + from stripe.v2.billing.contracts import terms as terms from stripe.v2.billing.contracts._term_service import ( TermService as TermService, ) # name -> (import_target, is_submodule) _import_map = { - "pricing_lines": ("stripe.v2.billing.contracts.pricing_lines", True), "terms": ("stripe.v2.billing.contracts.terms", True), - "PricingLinesService": ( - "stripe.v2.billing.contracts._pricing_lines_service", - False, - ), "TermService": ("stripe.v2.billing.contracts._term_service", False), } if not TYPE_CHECKING: diff --git a/stripe/v2/billing/contracts/_pricing_lines_service.py b/stripe/v2/billing/contracts/_pricing_lines_service.py deleted file mode 100644 index 44e6e0d21..000000000 --- a/stripe/v2/billing/contracts/_pricing_lines_service.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- 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.billing.contracts.pricing_lines._quantity_change_service import ( - QuantityChangeService, - ) - -_subservices = { - "quantity_changes": [ - "stripe.v2.billing.contracts.pricing_lines._quantity_change_service", - "QuantityChangeService", - ], -} - - -class PricingLinesService(StripeService): - quantity_changes: "QuantityChangeService" - - def __init__(self, requestor): - super().__init__(requestor) - - def __getattr__(self, name): - try: - import_from, service = _subservices[name] - service_class = getattr( - import_module(import_from), - service, - ) - setattr( - self, - name, - service_class(self._requestor), - ) - return getattr(self, name) - except KeyError: - raise AttributeError() diff --git a/stripe/v2/billing/contracts/pricing_lines/__init__.py b/stripe/v2/billing/contracts/pricing_lines/__init__.py deleted file mode 100644 index d9f625af1..000000000 --- a/stripe/v2/billing/contracts/pricing_lines/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- 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.billing.contracts.pricing_lines._quantity_change_service import ( - QuantityChangeService as QuantityChangeService, - ) - -# name -> (import_target, is_submodule) -_import_map = { - "QuantityChangeService": ( - "stripe.v2.billing.contracts.pricing_lines._quantity_change_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/billing/contracts/pricing_lines/_quantity_change_service.py b/stripe/v2/billing/contracts/pricing_lines/_quantity_change_service.py deleted file mode 100644 index c8af044b6..000000000 --- a/stripe/v2/billing/contracts/pricing_lines/_quantity_change_service.py +++ /dev/null @@ -1,72 +0,0 @@ -# -*- 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.billing.contracts.pricing_lines._quantity_change_list_contract_pricing_line_quantity_changes_params import ( - QuantityChangeListContractPricingLineQuantityChangesParams, - ) - from stripe.v2._list_object import ListObject - from stripe.v2.billing._contract_pricing_line_quantity_change import ( - ContractPricingLineQuantityChange, - ) - - -class QuantityChangeService(StripeService): - def list_contract_pricing_line_quantity_changes( - self, - contract_id: str, - pricing_line_id: str, - /, - params: Optional[ - "QuantityChangeListContractPricingLineQuantityChangesParams" - ] = None, - options: Optional["RequestOptions"] = None, - ) -> "ListObject[ContractPricingLineQuantityChange]": - """ - List quantity changes for a pricing line on a contract. - """ - return cast( - "ListObject[ContractPricingLineQuantityChange]", - self._request( - "get", - "/v2/billing/contracts/{contract_id}/pricing_lines/{pricing_line_id}/quantity_changes".format( - contract_id=sanitize_id(contract_id), - pricing_line_id=sanitize_id(pricing_line_id), - ), - base_address="api", - params=params, - options=options, - ), - ) - - async def list_contract_pricing_line_quantity_changes_async( - self, - contract_id: str, - pricing_line_id: str, - /, - params: Optional[ - "QuantityChangeListContractPricingLineQuantityChangesParams" - ] = None, - options: Optional["RequestOptions"] = None, - ) -> "ListObject[ContractPricingLineQuantityChange]": - """ - List quantity changes for a pricing line on a contract. - """ - return cast( - "ListObject[ContractPricingLineQuantityChange]", - await self._request_async( - "get", - "/v2/billing/contracts/{contract_id}/pricing_lines/{pricing_line_id}/quantity_changes".format( - contract_id=sanitize_id(contract_id), - pricing_line_id=sanitize_id(pricing_line_id), - ), - base_address="api", - params=params, - options=options, - ), - ) diff --git a/stripe/v2/billing/cadences/__init__.py b/stripe/v2/billing/groups/__init__.py similarity index 68% rename from stripe/v2/billing/cadences/__init__.py rename to stripe/v2/billing/groups/__init__.py index e9ecf4ad8..1872b498d 100644 --- a/stripe/v2/billing/cadences/__init__.py +++ b/stripe/v2/billing/groups/__init__.py @@ -4,14 +4,18 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: - from stripe.v2.billing.cadences._spend_modifier_rule_service import ( + from stripe.v2.billing.groups._invoice_service import ( + InvoiceService as InvoiceService, + ) + from stripe.v2.billing.groups._spend_modifier_rule_service import ( SpendModifierRuleService as SpendModifierRuleService, ) # name -> (import_target, is_submodule) _import_map = { + "InvoiceService": ("stripe.v2.billing.groups._invoice_service", False), "SpendModifierRuleService": ( - "stripe.v2.billing.cadences._spend_modifier_rule_service", + "stripe.v2.billing.groups._spend_modifier_rule_service", False, ), } diff --git a/stripe/v2/billing/groups/_invoice_service.py b/stripe/v2/billing/groups/_invoice_service.py new file mode 100644 index 000000000..95918f908 --- /dev/null +++ b/stripe/v2/billing/groups/_invoice_service.py @@ -0,0 +1,57 @@ +# -*- 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.billing.groups._invoice_create_params import ( + InvoiceCreateParams, + ) + from stripe.v2.billing._group_invoice import GroupInvoice + + +class InvoiceService(StripeService): + def create( + self, + id: str, + /, + params: Optional["InvoiceCreateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GroupInvoice": + """ + Create an empty invoice using the billing group's settings. + """ + return cast( + "GroupInvoice", + self._request( + "post", + "/v2/billing/groups/{id}/invoices".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + id: str, + /, + params: Optional["InvoiceCreateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GroupInvoice": + """ + Create an empty invoice using the billing group's settings. + """ + return cast( + "GroupInvoice", + await self._request_async( + "post", + "/v2/billing/groups/{id}/invoices".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/billing/cadences/_spend_modifier_rule_service.py b/stripe/v2/billing/groups/_spend_modifier_rule_service.py similarity index 59% rename from stripe/v2/billing/cadences/_spend_modifier_rule_service.py rename to stripe/v2/billing/groups/_spend_modifier_rule_service.py index 59ab98649..58204f2a9 100644 --- a/stripe/v2/billing/cadences/_spend_modifier_rule_service.py +++ b/stripe/v2/billing/groups/_spend_modifier_rule_service.py @@ -7,33 +7,33 @@ if TYPE_CHECKING: from stripe._request_options import RequestOptions - from stripe.params.v2.billing.cadences._spend_modifier_rule_list_params import ( + from stripe.params.v2.billing.groups._spend_modifier_rule_list_params import ( SpendModifierRuleListParams, ) - from stripe.params.v2.billing.cadences._spend_modifier_rule_retrieve_params import ( + from stripe.params.v2.billing.groups._spend_modifier_rule_retrieve_params import ( SpendModifierRuleRetrieveParams, ) from stripe.v2._list_object import ListObject - from stripe.v2.billing._cadence_spend_modifier import CadenceSpendModifier + from stripe.v2.billing._group_spend_modifier import GroupSpendModifier class SpendModifierRuleService(StripeService): def list( self, - cadence_id: str, + group_id: str, /, params: Optional["SpendModifierRuleListParams"] = None, options: Optional["RequestOptions"] = None, - ) -> "ListObject[CadenceSpendModifier]": + ) -> "ListObject[GroupSpendModifier]": """ - List all Spend Modifiers associated with a Billing Cadence. + List spend modifiers associated with a billing group. """ return cast( - "ListObject[CadenceSpendModifier]", + "ListObject[GroupSpendModifier]", self._request( "get", - "/v2/billing/cadences/{cadence_id}/spend_modifier_rules".format( - cadence_id=sanitize_id(cadence_id), + "/v2/billing/groups/{group_id}/spend_modifier_rules".format( + group_id=sanitize_id(group_id), ), base_address="api", params=params, @@ -43,20 +43,20 @@ def list( async def list_async( self, - cadence_id: str, + group_id: str, /, params: Optional["SpendModifierRuleListParams"] = None, options: Optional["RequestOptions"] = None, - ) -> "ListObject[CadenceSpendModifier]": + ) -> "ListObject[GroupSpendModifier]": """ - List all Spend Modifiers associated with a Billing Cadence. + List spend modifiers associated with a billing group. """ return cast( - "ListObject[CadenceSpendModifier]", + "ListObject[GroupSpendModifier]", await self._request_async( "get", - "/v2/billing/cadences/{cadence_id}/spend_modifier_rules".format( - cadence_id=sanitize_id(cadence_id), + "/v2/billing/groups/{group_id}/spend_modifier_rules".format( + group_id=sanitize_id(group_id), ), base_address="api", params=params, @@ -66,21 +66,21 @@ async def list_async( def retrieve( self, - cadence_id: str, + group_id: str, id: str, /, params: Optional["SpendModifierRuleRetrieveParams"] = None, options: Optional["RequestOptions"] = None, - ) -> "CadenceSpendModifier": + ) -> "GroupSpendModifier": """ - Retrieve a Spend Modifier associated with a Billing Cadence. + Retrieve a spend modifier associated with a billing group. """ return cast( - "CadenceSpendModifier", + "GroupSpendModifier", self._request( "get", - "/v2/billing/cadences/{cadence_id}/spend_modifier_rules/{id}".format( - cadence_id=sanitize_id(cadence_id), + "/v2/billing/groups/{group_id}/spend_modifier_rules/{id}".format( + group_id=sanitize_id(group_id), id=sanitize_id(id), ), base_address="api", @@ -91,21 +91,21 @@ def retrieve( async def retrieve_async( self, - cadence_id: str, + group_id: str, id: str, /, params: Optional["SpendModifierRuleRetrieveParams"] = None, options: Optional["RequestOptions"] = None, - ) -> "CadenceSpendModifier": + ) -> "GroupSpendModifier": """ - Retrieve a Spend Modifier associated with a Billing Cadence. + Retrieve a spend modifier associated with a billing group. """ return cast( - "CadenceSpendModifier", + "GroupSpendModifier", await self._request_async( "get", - "/v2/billing/cadences/{cadence_id}/spend_modifier_rules/{id}".format( - cadence_id=sanitize_id(cadence_id), + "/v2/billing/groups/{group_id}/spend_modifier_rules/{id}".format( + group_id=sanitize_id(group_id), id=sanitize_id(id), ), base_address="api", diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index 6205d3710..b02e15541 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -2562,7 +2562,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class BlikPayments(StripeObject): + class BilliePayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -2641,7 +2641,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class BlikRecurringPayments(StripeObject): + class BlikPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -2720,7 +2720,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class BoletoPayments(StripeObject): + class BlikRecurringPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -2799,7 +2799,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class CardPayments(StripeObject): + class BoletoPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -2878,7 +2878,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class CartesBancairesPayments(StripeObject): + class CardPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -2957,7 +2957,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class CashappPayments(StripeObject): + class CartesBancairesPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -3036,7 +3036,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class EpsPayments(StripeObject): + class CashappPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -3115,7 +3115,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class FpxPayments(StripeObject): + class EpsPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -3194,7 +3194,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class GbBankTransferPayments(StripeObject): + class FpxPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -3273,7 +3273,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class GrabpayPayments(StripeObject): + class GbBankTransferPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -3352,7 +3352,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class IdealPayments(StripeObject): + class GrabpayPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -3431,7 +3431,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class JcbPayments(StripeObject): + class IdealPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -3510,7 +3510,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class JpBankTransferPayments(StripeObject): + class JcbPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -3589,7 +3589,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class KakaoPayPayments(StripeObject): + class JpBankTransferPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -3668,7 +3668,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class KlarnaPayments(StripeObject): + class KakaoPayPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -3747,7 +3747,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class KonbiniPayments(StripeObject): + class KlarnaPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -3826,7 +3826,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class KrCardPayments(StripeObject): + class KonbiniPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -3905,7 +3905,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class LinkPayments(StripeObject): + class KrCardPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -3984,7 +3984,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class MobilepayPayments(StripeObject): + class LinkPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -4063,7 +4063,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class MultibancoPayments(StripeObject): + class MbWayPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -4142,7 +4142,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class MxBankTransferPayments(StripeObject): + class MobilepayPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -4221,7 +4221,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class NaverPayPayments(StripeObject): + class MultibancoPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -4300,7 +4300,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class OxxoPayments(StripeObject): + class MxBankTransferPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -4379,7 +4379,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class P24Payments(StripeObject): + class NaverPayPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -4458,7 +4458,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class PayByBankPayments(StripeObject): + class NzBankAccountBecsDebitPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -4537,7 +4537,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class PaycoPayments(StripeObject): + class OxxoPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -4616,7 +4616,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class PaynowPayments(StripeObject): + class P24Payments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -4695,7 +4695,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class PromptpayPayments(StripeObject): + class PayByBankPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -4774,7 +4774,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class RevolutPayPayments(StripeObject): + class PaycoPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -4853,7 +4853,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class SamsungPayPayments(StripeObject): + class PaynowPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -4932,7 +4932,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class SatispayPayments(StripeObject): + class PaypayPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -5011,7 +5011,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class ScalapayPayments(StripeObject): + class PixPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -5090,7 +5090,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class SepaBankTransferPayments(StripeObject): + class PromptpayPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -5169,7 +5169,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class SepaDebitPayments(StripeObject): + class RevolutPayPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -5248,7 +5248,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class SequraPayments(StripeObject): + class SamsungPayPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -5327,100 +5327,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class StripeBalance(StripeObject): - class Payouts(StripeObject): - class Protections(StripeObject): - class PspMigration(StripeObject): - expires_at: Optional[int] - """ - The time until which the protection will expire, as a Unix timestamp. - """ - requested_at: int - """ - The time at which the protection was requested, as a Unix timestamp. - """ - status: Literal[ - "active", - "disrupted", - "expired", - "inactive", - ] - """ - The current status of the protection. - """ - _field_encodings = { - "expires_at": "int64_string", - "requested_at": "int64_string", - } - - psp_migration: PspMigration - """ - Protection details for PSP migration. - """ - _inner_class_types = { - "psp_migration": PspMigration - } - - class StatusDetail(StripeObject): - code: Literal[ - "determining_status", - "rejected_fraud", - "rejected_incomplete_verification", - "rejected_listed", - "rejected_other", - "rejected_platform_fraud", - "rejected_platform_other", - "rejected_platform_terms_of_service", - "rejected_terms_of_service", - "requirements_past_due", - "requirements_pending_verification", - "restricted_other", - "unsupported_business", - "unsupported_country", - "unsupported_entity_type", - ] - """ - Machine-readable code explaining the reason for the Capability to be in its current status. - """ - resolution: Literal[ - "contact_stripe", - "no_resolution", - "provide_info", - ] - """ - Machine-readable code explaining how to make the Capability active. - """ - - protections: Protections - """ - Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). - """ - status: Literal[ - "active", - "pending", - "rejected", - "restricted", - "unsupported", - ] - """ - The status of the Capability. - """ - status_details: List[StatusDetail] - """ - Additional details about the capability's status. This value is empty when `status` is `active`. - """ - _inner_class_types = { - "protections": Protections, - "status_details": StatusDetail, - } - - payouts: Optional[Payouts] - """ - Enables this Account to complete payouts from their Stripe Balance (/v1/balance). - """ - _inner_class_types = {"payouts": Payouts} - - class SunbitPayments(StripeObject): + class SatispayPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -5499,7 +5406,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class SwishPayments(StripeObject): + class ScalapayPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -5578,7 +5485,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class TwintPayments(StripeObject): + class SepaBankTransferPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -5657,7 +5564,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class UpiPayments(StripeObject): + class SepaDebitPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -5736,7 +5643,7 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class UsBankTransferPayments(StripeObject): + class SequraPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -5815,46 +5722,929 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class VippsPayments(StripeObject): - class Protections(StripeObject): - class PspMigration(StripeObject): - expires_at: Optional[int] + class StripeBalance(StripeObject): + class Payouts(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration """ - The time until which the protection will expire, as a Unix timestamp. + Protection details for PSP migration. """ - requested_at: int + _inner_class_types = { + "psp_migration": PspMigration + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] """ - The time at which the protection was requested, as a Unix timestamp. + Machine-readable code explaining the reason for the Capability to be in its current status. """ - status: Literal[ - "active", "disrupted", "expired", "inactive" + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", ] """ - The current status of the protection. + Machine-readable code explaining how to make the Capability active. """ - _field_encodings = { - "expires_at": "int64_string", - "requested_at": "int64_string", - } - psp_migration: PspMigration + protections: Protections """ - Protection details for PSP migration. + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ - _inner_class_types = {"psp_migration": PspMigration} - - class StatusDetail(StripeObject): - code: Literal[ - "determining_status", - "rejected_fraud", - "rejected_incomplete_verification", - "rejected_listed", - "rejected_other", - "rejected_platform_fraud", - "rejected_platform_other", - "rejected_platform_terms_of_service", - "rejected_terms_of_service", - "requirements_past_due", + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + payouts: Optional[Payouts] + """ + Enables this Account to complete payouts from their Stripe Balance (/v1/balance). + """ + _inner_class_types = {"payouts": Payouts} + + class SunbitPayments(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", "disrupted", "expired", "inactive" + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = {"psp_migration": PspMigration} + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", "no_resolution", "provide_info" + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class SwishPayments(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", "disrupted", "expired", "inactive" + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = {"psp_migration": PspMigration} + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", "no_resolution", "provide_info" + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class TouchNGoPayments(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", "disrupted", "expired", "inactive" + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = {"psp_migration": PspMigration} + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", "no_resolution", "provide_info" + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class TruemoneyPayments(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", "disrupted", "expired", "inactive" + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = {"psp_migration": PspMigration} + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", "no_resolution", "provide_info" + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class TwintPayments(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", "disrupted", "expired", "inactive" + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = {"psp_migration": PspMigration} + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", "no_resolution", "provide_info" + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class UpiPayments(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", "disrupted", "expired", "inactive" + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = {"psp_migration": PspMigration} + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", "no_resolution", "provide_info" + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class UsBankTransferPayments(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", "disrupted", "expired", "inactive" + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = {"psp_migration": PspMigration} + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", "no_resolution", "provide_info" + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class VippsPayments(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", "disrupted", "expired", "inactive" + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = {"psp_migration": PspMigration} + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", "no_resolution", "provide_info" + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class WechatPayMobileWebPayments(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", "disrupted", "expired", "inactive" + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = {"psp_migration": PspMigration} + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", "no_resolution", "provide_info" + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class WechatPayPayments(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", "disrupted", "expired", "inactive" + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = {"psp_migration": PspMigration} + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", "no_resolution", "provide_info" + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class WeroPayments(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", "disrupted", "expired", "inactive" + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = {"psp_migration": PspMigration} + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", "requirements_pending_verification", "restricted_other", "unsupported_business", @@ -6013,6 +6803,10 @@ class StatusDetail(StripeObject): """ Allow the merchant to process Bancontact payments. """ + billie_payments: Optional[BilliePayments] + """ + Allow the merchant to process Billie payments. + """ blik_payments: Optional[BlikPayments] """ Allow the merchant to process BLIK payments. @@ -6085,6 +6879,10 @@ class StatusDetail(StripeObject): """ Allow the merchant to process Link payments. """ + mb_way_payments: Optional[MbWayPayments] + """ + Allow the merchant to process MB WAY payments. + """ mobilepay_payments: Optional[MobilepayPayments] """ Allow the merchant to process MobilePay payments. @@ -6101,6 +6899,12 @@ class StatusDetail(StripeObject): """ Allow the merchant to process Naver Pay payments. """ + nz_bank_account_becs_debit_payments: Optional[ + NzBankAccountBecsDebitPayments + ] + """ + Allow the merchant to process New Zealand BECS Direct Debit payments. + """ oxxo_payments: Optional[OxxoPayments] """ Allow the merchant to process OXXO payments. @@ -6117,9 +6921,17 @@ class StatusDetail(StripeObject): """ Allow the merchant to process PAYCO payments. """ - paynow_payments: Optional[PaynowPayments] + paynow_payments: Optional[PaynowPayments] + """ + Allow the merchant to process PayNow payments. + """ + paypay_payments: Optional[PaypayPayments] + """ + Allow the merchant to process PayPay payments. + """ + pix_payments: Optional[PixPayments] """ - Allow the merchant to process PayNow payments. + Allow the merchant to process Pix payments. """ promptpay_payments: Optional[PromptpayPayments] """ @@ -6165,6 +6977,14 @@ class StatusDetail(StripeObject): """ Allow the merchant to process Swish payments. """ + touch_n_go_payments: Optional[TouchNGoPayments] + """ + Allow the merchant to process Touch 'n Go payments. + """ + truemoney_payments: Optional[TruemoneyPayments] + """ + Allow the merchant to process TrueMoney payments. + """ twint_payments: Optional[TwintPayments] """ Allow the merchant to process TWINT payments. @@ -6181,6 +7001,20 @@ class StatusDetail(StripeObject): """ Allow the merchant to process Vipps payments. """ + wechat_pay_mobile_web_payments: Optional[ + WechatPayMobileWebPayments + ] + """ + Allow the merchant to process WeChat Pay mobile web payments. Requires the wechat_pay_payments capability. + """ + wechat_pay_payments: Optional[WechatPayPayments] + """ + Allow the merchant to process WeChat Pay payments. + """ + wero_payments: Optional[WeroPayments] + """ + Allow the merchant to process Wero payments. + """ zip_payments: Optional[ZipPayments] """ Allow the merchant to process Zip payments. @@ -6196,6 +7030,7 @@ class StatusDetail(StripeObject): "au_becs_debit_payments": AuBecsDebitPayments, "bacs_debit_payments": BacsDebitPayments, "bancontact_payments": BancontactPayments, + "billie_payments": BilliePayments, "blik_payments": BlikPayments, "blik_recurring_payments": BlikRecurringPayments, "boleto_payments": BoletoPayments, @@ -6214,15 +7049,19 @@ class StatusDetail(StripeObject): "konbini_payments": KonbiniPayments, "kr_card_payments": KrCardPayments, "link_payments": LinkPayments, + "mb_way_payments": MbWayPayments, "mobilepay_payments": MobilepayPayments, "multibanco_payments": MultibancoPayments, "mx_bank_transfer_payments": MxBankTransferPayments, "naver_pay_payments": NaverPayPayments, + "nz_bank_account_becs_debit_payments": NzBankAccountBecsDebitPayments, "oxxo_payments": OxxoPayments, "p24_payments": P24Payments, "pay_by_bank_payments": PayByBankPayments, "payco_payments": PaycoPayments, "paynow_payments": PaynowPayments, + "paypay_payments": PaypayPayments, + "pix_payments": PixPayments, "promptpay_payments": PromptpayPayments, "revolut_pay_payments": RevolutPayPayments, "samsung_pay_payments": SamsungPayPayments, @@ -6234,10 +7073,15 @@ class StatusDetail(StripeObject): "stripe_balance": StripeBalance, "sunbit_payments": SunbitPayments, "swish_payments": SwishPayments, + "touch_n_go_payments": TouchNGoPayments, + "truemoney_payments": TruemoneyPayments, "twint_payments": TwintPayments, "upi_payments": UpiPayments, "us_bank_transfer_payments": UsBankTransferPayments, "vipps_payments": VippsPayments, + "wechat_pay_mobile_web_payments": WechatPayMobileWebPayments, + "wechat_pay_payments": WechatPayPayments, + "wero_payments": WeroPayments, "zip_payments": ZipPayments, } @@ -6290,12 +7134,79 @@ class Hours(StripeObject): """ _inner_class_types = {"hours": Hours} + additional_material: Optional[str] + """ + Information provided to support the onboarding process for Konbini payments. + """ support: Optional[Support] """ Support for Konbini payments. """ _inner_class_types = {"support": Support} + class PaypayPayments(StripeObject): + class Site(StripeObject): + class Accessible(StripeObject): + pass + + class InDevelopment(StripeObject): + password_provided: bool + """ + Whether a password needed to access the business's website has been provided. + """ + username: Optional[str] + """ + The username needed to access the business's website. + """ + + class Restricted(StripeObject): + payment_flow_file: Optional[str] + """ + The file explaining the payment flow for the business. + """ + + accessible: Optional[Accessible] + """ + Additional information about the business's website when it's accessible. + """ + in_development: Optional[InDevelopment] + """ + Additional information about the business's website when it's in development. + """ + restricted: Optional[Restricted] + """ + Additional information about the business's website when it has restricted access. + """ + type: Optional[ + Literal["accessible", "in_development", "restricted"] + ] + """ + The status of the business's website. + """ + _inner_class_types = { + "accessible": Accessible, + "in_development": InDevelopment, + "restricted": Restricted, + } + + additional_files: List[str] + """ + Additional files supporting PayPay payments configuration. + """ + goods_type: Optional[Literal["digital_content", "other"]] + """ + The type of goods sold by the merchant for PayPay payments. + """ + site: Optional[Site] + """ + The business's website for PayPay payments. + """ + specified_commercial_transactions_act_url: Optional[str] + """ + URL to the Specified Commercial Transactions Act page for PayPay payments. + """ + _inner_class_types = {"site": Site} + class ScriptStatementDescriptor(StripeObject): class Kana(StripeObject): descriptor: Optional[str] @@ -6409,76 +7320,264 @@ class Address(StripeObject): """ _inner_class_types = {"address": Address} - applied: bool - """ - Indicates whether the merchant configuration is active. You can deactivate or reactivate the merchant configuration by updating this property. Deactivating the configuration by setting this value to false doesn't delete the configuration's properties. - """ - bacs_debit_payments: Optional[BacsDebitPayments] - """ - Settings for Bacs Direct Debit payments. - """ - branding: Optional[Branding] - """ - Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and other products. - """ - capabilities: Optional[Capabilities] - """ - Capabilities that have been requested on the Merchant Configuration. - """ - card_payments: Optional[CardPayments] - """ - Card payments settings. - """ - gross_settlement: Optional[GrossSettlement] - """ - Settings for gross settlement. - """ - konbini_payments: Optional[KonbiniPayments] - """ - Settings specific to Konbini payments on the account. - """ - mcc: Optional[str] - """ - The Merchant Category Code (MCC) for the merchant. MCCs classify businesses based on the goods or services they provide. - """ - script_statement_descriptor: Optional[ScriptStatementDescriptor] - """ - Settings for the default text that appears on statements for language variations. - """ - sepa_debit_payments: Optional[SepaDebitPayments] - """ - Settings for SEPA Direct Debit payments. - """ - smart_disputes: Optional[SmartDisputes] - """ - Settings for Smart Disputes automatic response feature. - """ - statement_descriptor: Optional[StatementDescriptor] - """ - Statement descriptor. - """ - support: Optional[Support] - """ - Publicly available contact information for sending support issues to. - """ - _inner_class_types = { - "bacs_debit_payments": BacsDebitPayments, - "branding": Branding, - "capabilities": Capabilities, - "card_payments": CardPayments, - "gross_settlement": GrossSettlement, - "konbini_payments": KonbiniPayments, - "script_statement_descriptor": ScriptStatementDescriptor, - "sepa_debit_payments": SepaDebitPayments, - "smart_disputes": SmartDisputes, - "statement_descriptor": StatementDescriptor, - "support": Support, - } + applied: bool + """ + Indicates whether the merchant configuration is active. You can deactivate or reactivate the merchant configuration by updating this property. Deactivating the configuration by setting this value to false doesn't delete the configuration's properties. + """ + bacs_debit_payments: Optional[BacsDebitPayments] + """ + Settings for Bacs Direct Debit payments. + """ + branding: Optional[Branding] + """ + Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and other products. + """ + capabilities: Optional[Capabilities] + """ + Capabilities that have been requested on the Merchant Configuration. + """ + card_payments: Optional[CardPayments] + """ + Card payments settings. + """ + gross_settlement: Optional[GrossSettlement] + """ + Settings for gross settlement. + """ + konbini_payments: Optional[KonbiniPayments] + """ + Settings specific to Konbini payments on the account. + """ + mcc: Optional[str] + """ + The Merchant Category Code (MCC) for the merchant. MCCs classify businesses based on the goods or services they provide. + """ + paypay_payments: Optional[PaypayPayments] + """ + Settings for PayPay payments. + """ + script_statement_descriptor: Optional[ScriptStatementDescriptor] + """ + Settings for the default text that appears on statements for language variations. + """ + sepa_debit_payments: Optional[SepaDebitPayments] + """ + Settings for SEPA Direct Debit payments. + """ + smart_disputes: Optional[SmartDisputes] + """ + Settings for Smart Disputes automatic response feature. + """ + statement_descriptor: Optional[StatementDescriptor] + """ + Statement descriptor. + """ + support: Optional[Support] + """ + Publicly available contact information for sending support issues to. + """ + _inner_class_types = { + "bacs_debit_payments": BacsDebitPayments, + "branding": Branding, + "capabilities": Capabilities, + "card_payments": CardPayments, + "gross_settlement": GrossSettlement, + "konbini_payments": KonbiniPayments, + "paypay_payments": PaypayPayments, + "script_statement_descriptor": ScriptStatementDescriptor, + "sepa_debit_payments": SepaDebitPayments, + "smart_disputes": SmartDisputes, + "statement_descriptor": StatementDescriptor, + "support": Support, + } + + class MoneyManager(StripeObject): + class Capabilities(StripeObject): + class BusinessCustodialStorage(StripeObject): + class Inbound(StripeObject): + class Ousd(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = { + "psp_migration": PspMigration, + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class Usdc(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = { + "psp_migration": PspMigration, + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } - class MoneyManager(StripeObject): - class Capabilities(StripeObject): - class BusinessCustodialStorage(StripeObject): - class Inbound(StripeObject): + ousd: Optional[Ousd] + """ + Can receive business custodial storage-type funds on Stripe in OUSD. + """ + usdc: Optional[Usdc] + """ + Can receive business custodial storage-type funds on Stripe in USDC. + """ + _inner_class_types = {"ousd": Ousd, "usdc": Usdc} + + class Outbound(StripeObject): class Ousd(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): @@ -6653,16 +7752,32 @@ class StatusDetail(StripeObject): ousd: Optional[Ousd] """ - Can receive business custodial storage-type funds on Stripe in OUSD. + Can send business custodial storage-type funds on Stripe in OUSD. """ usdc: Optional[Usdc] """ - Can receive business custodial storage-type funds on Stripe in USDC. + Can send business custodial storage-type funds on Stripe in USDC. """ _inner_class_types = {"ousd": Ousd, "usdc": Usdc} - class Outbound(StripeObject): - class Ousd(StripeObject): + inbound: Optional[Inbound] + """ + Can receive business custodial storage-type funds on Stripe. + """ + outbound: Optional[Outbound] + """ + Can send business custodial storage-type funds on Stripe. + """ + _inner_class_types = { + "inbound": Inbound, + "outbound": Outbound, + } + + class BusinessDemandDepositAccountFifthThirdStorage( + StripeObject, + ): + class Inbound(StripeObject): + class Usd(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -6748,7 +7863,14 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - class Usdc(StripeObject): + usd: Optional[Usd] + """ + Can receive funds in business storage FinancialAccounts backed by Fifth Third demand deposit accounts in USD. + """ + _inner_class_types = {"usd": Usd} + + class Outbound(StripeObject): + class Usd(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): expires_at: Optional[int] @@ -6834,23 +7956,19 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } - ousd: Optional[Ousd] - """ - Can send business custodial storage-type funds on Stripe in OUSD. - """ - usdc: Optional[Usdc] + usd: Optional[Usd] """ - Can send business custodial storage-type funds on Stripe in USDC. + Can send funds from business storage FinancialAccounts backed by Fifth Third demand deposit accounts in USD. """ - _inner_class_types = {"ousd": Ousd, "usdc": Usdc} + _inner_class_types = {"usd": Usd} inbound: Optional[Inbound] """ - Can receive business custodial storage-type funds on Stripe. + Can receive funds in business storage FinancialAccounts backed by Fifth Third demand deposit accounts. """ outbound: Optional[Outbound] """ - Can send business custodial storage-type funds on Stripe. + Can send funds from business storage FinancialAccounts backed by Fifth Third demand deposit accounts. """ _inner_class_types = { "inbound": Inbound, @@ -13838,6 +14956,12 @@ class StatusDetail(StripeObject): """ Can send or receive business custodial storage-type funds on Stripe. """ + business_demand_deposit_account_fifth_third_storage: Optional[ + BusinessDemandDepositAccountFifthThirdStorage + ] + """ + Capabilities related to business storage FinancialAccounts backed by Fifth Third demand deposit accounts. + """ business_storage: Optional[BusinessStorage] """ Can send or receive business storage-type funds on Stripe. @@ -13872,6 +14996,7 @@ class StatusDetail(StripeObject): """ _inner_class_types = { "business_custodial_storage": BusinessCustodialStorage, + "business_demand_deposit_account_fifth_third_storage": BusinessDemandDepositAccountFifthThirdStorage, "business_storage": BusinessStorage, "consumer_storage": ConsumerStorage, "inbound_fundings": InboundFundings, @@ -14962,6 +16087,92 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } + class Tips(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = { + "psp_migration": PspMigration + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + ach: Optional[Ach] """ Enables this Account to receive OutboundPayments to linked bank accounts over ACH rails. @@ -15006,6 +16217,10 @@ class StatusDetail(StripeObject): """ Enables this Account to receive OutboundPayments to linked bank accounts over SWIFT. """ + tips: Optional[Tips] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over TIPS rails. + """ _inner_class_types = { "ach": Ach, "becs": Becs, @@ -15018,6 +16233,7 @@ class StatusDetail(StripeObject): "sepa": Sepa, "sepa_instant": SepaInstant, "swift": Swift, + "tips": Tips, } class Cards(StripeObject): @@ -15714,11 +16930,11 @@ class Responsibilities(StripeObject): ] ] """ - Indicates whether the platform or connected account is responsible for paying Stripe fees for pricing-control-eligible products. + Controls who pays Stripe fees for direct charges and other pricing-control-eligible Stripe products. For new integrations, setting `losses_collector=application` requires `fees_collector=application`; legacy Custom and Express accounts can also use `application_custom` or `application_express`. For destination charges and separate charges and transfers, Stripe bills the platform regardless of this setting. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior), including application fees and pricing considerations. """ losses_collector: Optional[Literal["application", "stripe"]] """ - A value indicating the responsibility for losses on this account. + Controls who is responsible for payment-related negative balances on this account. The platform remains liable for negative balances on its own account. To use Stripe negative balance liability, your integration must meet [Managed Risk requirements](https://docs.stripe.com/connect/risk-management/managed-risk). """ requirements_collector: Literal["application", "stripe"] """ @@ -16196,10 +17412,14 @@ class Deadline(StripeObject): "bank_accounts.sepa_credit", "bank_accounts.sepa_instant", "bank_accounts.swift", + "bank_accounts.tips", "bank_accounts.wire", + "billie_payments", "blik_payments", "blik_recurring_payments", "boleto_payments", + "business_demand_deposit_account_fifth_third_storage.inbound.usd", + "business_demand_deposit_account_fifth_third_storage.outbound.usd", "business_storage.inbound.eur", "business_storage.inbound.gbp", "business_storage.inbound.usd", @@ -16246,10 +17466,12 @@ class Deadline(StripeObject): "konbini_payments", "kr_card_payments", "link_payments", + "mb_way_payments", "mobilepay_payments", "multibanco_payments", "mx_bank_transfer_payments", "naver_pay_payments", + "nz_bank_account_becs_debit_payments", "outbound_payments.bank_accounts", "outbound_payments.cards", "outbound_payments.financial_accounts", @@ -16261,8 +17483,10 @@ class Deadline(StripeObject): "paper_checks", "payco_payments", "paynow_payments", + "paypay_payments", "pay_by_bank_payments", "pix", + "pix_payments", "projects", "promptpay_payments", "received_credits.bank_accounts", @@ -16277,10 +17501,15 @@ class Deadline(StripeObject): "stripe_balance.stablecoin_custodial", "stripe_balance.stripe_transfers", "swish_payments", + "touch_n_go_payments", + "truemoney_payments", "twint_payments", "upi_payments", "us_bank_transfer_payments", "vipps_payments", + "wechat_pay_mobile_web_payments", + "wechat_pay_payments", + "wero_payments", "zip_payments", ], str, @@ -16503,6 +17732,20 @@ class Account(StripeObject): The user agent of the browser from which the Account's representative accepted the terms of service. """ + class BusinessDemandDepositAccountFifthThird(StripeObject): + date: Optional[str] + """ + The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: Optional[str] + """ + The IP address from which the Account's representative accepted the terms of service. + """ + user_agent: Optional[str] + """ + The user agent of the browser from which the Account's representative accepted the terms of service. + """ + class CardCreator(StripeObject): class Commercial(StripeObject): class AccountHolder(StripeObject): @@ -17603,6 +18846,12 @@ class MoneyManager(StripeObject): """ Details on the Account's acceptance of the Stripe Services Agreement. """ + business_demand_deposit_account_fifth_third: Optional[ + BusinessDemandDepositAccountFifthThird + ] + """ + Terms of service acceptances for financial accounts backed by Fifth Third demand deposit accounts. + """ card_creator: Optional[CardCreator] """ Details on the Account's acceptance of Issuing-specific terms of service. @@ -17627,6 +18876,7 @@ class MoneyManager(StripeObject): """ _inner_class_types = { "account": Account, + "business_demand_deposit_account_fifth_third": BusinessDemandDepositAccountFifthThird, "card_creator": CardCreator, "consumer_money_manager": ConsumerMoneyManager, "consumer_privacy_disclosures": ConsumerPrivacyDisclosures, @@ -19306,10 +20556,14 @@ class Deadline(StripeObject): "bank_accounts.sepa_credit", "bank_accounts.sepa_instant", "bank_accounts.swift", + "bank_accounts.tips", "bank_accounts.wire", + "billie_payments", "blik_payments", "blik_recurring_payments", "boleto_payments", + "business_demand_deposit_account_fifth_third_storage.inbound.usd", + "business_demand_deposit_account_fifth_third_storage.outbound.usd", "business_storage.inbound.eur", "business_storage.inbound.gbp", "business_storage.inbound.usd", @@ -19356,10 +20610,12 @@ class Deadline(StripeObject): "konbini_payments", "kr_card_payments", "link_payments", + "mb_way_payments", "mobilepay_payments", "multibanco_payments", "mx_bank_transfer_payments", "naver_pay_payments", + "nz_bank_account_becs_debit_payments", "outbound_payments.bank_accounts", "outbound_payments.cards", "outbound_payments.financial_accounts", @@ -19371,8 +20627,10 @@ class Deadline(StripeObject): "paper_checks", "payco_payments", "paynow_payments", + "paypay_payments", "pay_by_bank_payments", "pix", + "pix_payments", "projects", "promptpay_payments", "received_credits.bank_accounts", @@ -19387,10 +20645,15 @@ class Deadline(StripeObject): "stripe_balance.stablecoin_custodial", "stripe_balance.stripe_transfers", "swish_payments", + "touch_n_go_payments", + "truemoney_payments", "twint_payments", "upi_payments", "us_bank_transfer_payments", "vipps_payments", + "wechat_pay_mobile_web_payments", + "wechat_pay_payments", + "wero_payments", "zip_payments", ], str, @@ -19562,7 +20825,7 @@ class MinimumDeadline(StripeObject): """ dashboard: Optional[Literal["express", "full", "none"]] """ - A value indicating the Stripe dashboard this Account has access to. This will depend on which configurations are enabled for this account. + Specifies the account's Stripe-hosted Dashboard access. Available values depend on the configurations enabled for the account. Learn more about [configuring Dashboard access](https://docs.stripe.com/connect/accounts-v2/connected-account-configuration#set-dashboard-access). """ defaults: Optional[Defaults] """ diff --git a/stripe/v2/core/_account_link.py b/stripe/v2/core/_account_link.py index 804a43c5b..7844b7a3a 100644 --- a/stripe/v2/core/_account_link.py +++ b/stripe/v2/core/_account_link.py @@ -7,7 +7,7 @@ class AccountLink(StripeObject): """ - Account Links let a platform create a temporary, single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information. + Account Links let a platform create a temporary, single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information, or to access its Stripe-hosted Dashboard. """ OBJECT_NAME: ClassVar[Literal["v2.core.account_link"]] = ( @@ -15,6 +15,13 @@ class AccountLink(StripeObject): ) class UseCase(StripeObject): + class AccountDashboard(StripeObject): + refresh_url: str + """ + The URL to redirect to if the Account Link has expired or has already + been used. Authenticate the user before generating a replacement link. + """ + class AccountOnboarding(StripeObject): class CollectionOptions(StripeObject): fields: Optional[ @@ -131,6 +138,10 @@ class CollectionOptions(StripeObject): """ _inner_class_types = {"collection_options": CollectionOptions} + account_dashboard: Optional[AccountDashboard] + """ + Hash containing configuration options for an Account Link that provides access to the account's Stripe-hosted Dashboard. + """ account_onboarding: Optional[AccountOnboarding] """ Hash containing configuration options for an Account Link object that onboards a new account. @@ -149,6 +160,7 @@ class CollectionOptions(StripeObject): """ type: Union[ Literal[ + "account_dashboard", "account_onboarding", "account_update", "recipient_onboarding", @@ -160,6 +172,7 @@ class CollectionOptions(StripeObject): Open Enum. The type of Account Link the user is requesting. """ _inner_class_types = { + "account_dashboard": AccountDashboard, "account_onboarding": AccountOnboarding, "account_update": AccountUpdate, "recipient_onboarding": RecipientOnboarding, diff --git a/stripe/v2/core/_account_link_service.py b/stripe/v2/core/_account_link_service.py index 19b868c0c..33308de01 100644 --- a/stripe/v2/core/_account_link_service.py +++ b/stripe/v2/core/_account_link_service.py @@ -19,7 +19,7 @@ def create( options: Optional["RequestOptions"] = None, ) -> "AccountLink": """ - Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information. + Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information, or to access its Stripe-hosted Dashboard. """ return cast( "AccountLink", @@ -38,7 +38,7 @@ async def create_async( options: Optional["RequestOptions"] = None, ) -> "AccountLink": """ - Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information. + Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information, or to access its Stripe-hosted Dashboard. """ return cast( "AccountLink", diff --git a/stripe/v2/core/_account_person_token.py b/stripe/v2/core/_account_person_token.py index 34b07a1e6..e615dcc07 100644 --- a/stripe/v2/core/_account_person_token.py +++ b/stripe/v2/core/_account_person_token.py @@ -8,6 +8,8 @@ class AccountPersonToken(StripeObject): """ Person Tokens are single-use tokens which tokenize person information, and are used for creating or updating a Person. + In live mode, you must create person tokens using a live publishable key. + In a sandbox, you can create person tokens with secret or publishable keys. """ OBJECT_NAME: ClassVar[Literal["v2.core.account_person_token"]] = ( diff --git a/stripe/v2/core/_account_session.py b/stripe/v2/core/_account_session.py index ea98e07bb..a47c961da 100644 --- a/stripe/v2/core/_account_session.py +++ b/stripe/v2/core/_account_session.py @@ -548,7 +548,7 @@ class Scopes(StripeObject): "disabled", "enabled" ] """ - Whether to disable Stripe user authentication in the enabled components. + Whether to disable Stripe user authentication in this component. """ manage_payout_methods: Literal["disabled", "enabled"] """ diff --git a/stripe/v2/core/_account_token.py b/stripe/v2/core/_account_token.py index 27f454cb0..936d29b8f 100644 --- a/stripe/v2/core/_account_token.py +++ b/stripe/v2/core/_account_token.py @@ -7,7 +7,9 @@ class AccountToken(StripeObject): """ - Account tokens are single-use tokens which tokenize an account's contact_email, display_name, contact_phone, and identity. + Account tokens are single-use tokens which tokenize an account's `contact_email`, `display_name`, `contact_phone`, and `identity`. + In live mode, you must create account tokens using a live publishable key. + In a sandbox, you can create account tokens with secret or publishable keys. """ OBJECT_NAME: ClassVar[Literal["v2.core.account_token"]] = ( diff --git a/stripe/v2/core/_account_token_service.py b/stripe/v2/core/_account_token_service.py index 33d82d2c2..99f042e4f 100644 --- a/stripe/v2/core/_account_token_service.py +++ b/stripe/v2/core/_account_token_service.py @@ -27,8 +27,8 @@ def create( Create an account token with a publishable key and pass it to the Accounts v2 API to create or update an account without its data touching your server. Learn more about [account tokens](https://docs.stripe.com/connect/account-tokens). - In live mode, you can only create account tokens with your application's publishable key. - In test mode, you can create account tokens with your secret key or publishable key. + In live mode, you must create account tokens using a live publishable key. + In a sandbox, you can create account tokens with secret or publishable keys. """ return cast( "AccountToken", @@ -61,8 +61,8 @@ async def create_async( Create an account token with a publishable key and pass it to the Accounts v2 API to create or update an account without its data touching your server. Learn more about [account tokens](https://docs.stripe.com/connect/account-tokens). - In live mode, you can only create account tokens with your application's publishable key. - In test mode, you can create account tokens with your secret key or publishable key. + In live mode, you must create account tokens using a live publishable key. + In a sandbox, you can create account tokens with secret or publishable keys. """ return cast( "AccountToken", diff --git a/stripe/v2/core/_claimable_sandbox.py b/stripe/v2/core/_claimable_sandbox.py index 4db20da62..7d7b86523 100644 --- a/stripe/v2/core/_claimable_sandbox.py +++ b/stripe/v2/core/_claimable_sandbox.py @@ -1,17 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal class ClaimableSandbox(StripeObject): """ - A claimable sandbox represents a Stripe sandbox that is anonymous. - When it is created, it can be prefilled with specific metadata, such as email, name, or country. - Claimable sandboxes can be claimed through a URL. When a user claims a sandbox through this URL, - it will prompt them to create a new Stripe account. Or, it will allow them to claim this sandbox in their - existing Stripe account. + A claimable sandbox is a Stripe sandbox that a user can claim into a new or existing Stripe account + through an onboarding link. You can prefill it with an email address, sandbox name, and country. Claimable sandboxes have 60 days to be claimed. After this expiration time has passed, if the sandbox is not claimed, it will be deleted. """ @@ -23,7 +20,8 @@ class ClaimableSandbox(StripeObject): class OnboardingLinkDetails(StripeObject): expires_at: str """ - The timestamp the onboarding link expires. + Time at which the onboarding link expires. Represented as an RFC 3339 timestamp in UTC + with millisecond precision, for example `2022-09-18T13:22:18.123Z`. """ refresh_url: str """ @@ -31,22 +29,27 @@ class OnboardingLinkDetails(StripeObject): The URL specified should attempt to generate a new onboarding link, and re-direct the user to this new onboarding link so that they can proceed with the onboarding flow. """ + return_url: Optional[str] + """ + The URL offered to the user as a way back to your app after they claim the sandbox. + """ url: str """ - URL that will redirect the user to either claim or onboard the claimable sandbox depending on its status. + The URL that lets a user claim the sandbox or continue onboarding their Stripe account, + depending on the sandbox's status. """ class OwnerDetails(StripeObject): account: Optional[str] """ - The ID of the livemode Stripe account that owns the sandbox. - This field is only set when owner_details.app_install_status is `installed`. + The ID of the live mode Stripe account that owns the sandbox. + This field is only set when `owner_details.app_install_status` is `installed`. """ - app_install_status: Literal[ - "installed", "pending_install", "pending_onboarding" + app_install_status: Optional[ + Literal["installed", "pending_install", "pending_onboarding"] ] """ - Indicates whether the platform app is installed on the sandbox's livemode owner account. + Indicates whether the platform app is installed on the sandbox's live mode owner account. """ class Prefill(StripeObject): @@ -57,8 +60,8 @@ class Prefill(StripeObject): """ email: str """ - Email that this sandbox is meant to be claimed by. Stripe will - send an email to this email address before the sandbox expires. + Email address of the user who will claim the sandbox. + Stripe sends this address an invitation to claim the sandbox and a reminder before the unclaimed sandbox expires. """ name: str """ @@ -67,19 +70,132 @@ class Prefill(StripeObject): class SandboxDetails(StripeObject): class ApiKeys(StripeObject): - mcp: Optional[str] + class Mcp(StripeObject): + class SecretKey(StripeObject): + token: Optional[str] + """ + The plaintext token for the API key. + """ + + created: str + """ + Time at which the API key was created. Represented as an RFC 3339 timestamp in UTC + with millisecond precision, for example `2022-09-18T13:22:18.123Z`. + """ + expires_at: Optional[str] + """ + Time at which the API key expires. Represented as an RFC 3339 timestamp in UTC + with millisecond precision, for example `2022-09-18T13:22:18.123Z`. + """ + id: str + """ + Unique identifier of the API key. + """ + secret_key: Optional[SecretKey] + """ + Token for the secret key. Present only in the create response; + null in subsequent retrieve responses. + """ + status: Union[Literal["active", "expired"], str] + """ + Current status of the API key. + """ + type: Union[Literal["secret_key"], str] + """ + Type of the API key. + """ + _inner_class_types = {"secret_key": SecretKey} + + class Publishable(StripeObject): + class PublishableKey(StripeObject): + token: Optional[str] + """ + The plaintext token for the API key. + """ + + created: str + """ + Time at which the API key was created. Represented as an RFC 3339 timestamp in UTC + with millisecond precision, for example `2022-09-18T13:22:18.123Z`. + """ + expires_at: Optional[str] + """ + Time at which the API key expires. Represented as an RFC 3339 timestamp in UTC + with millisecond precision, for example `2022-09-18T13:22:18.123Z`. + """ + id: str + """ + Unique identifier of the API key. + """ + publishable_key: Optional[PublishableKey] + """ + Token for the publishable key. Present only in the create response; + null in subsequent retrieve responses. + """ + status: Union[Literal["active", "expired"], str] + """ + Current status of the API key. + """ + type: Union[Literal["publishable_key"], str] + """ + Type of the API key. + """ + _inner_class_types = {"publishable_key": PublishableKey} + + class Secret(StripeObject): + class SecretKey(StripeObject): + token: Optional[str] + """ + The plaintext token for the API key. + """ + + created: str + """ + Time at which the API key was created. Represented as an RFC 3339 timestamp in UTC + with millisecond precision, for example `2022-09-18T13:22:18.123Z`. + """ + expires_at: Optional[str] + """ + Time at which the API key expires. Represented as an RFC 3339 timestamp in UTC + with millisecond precision, for example `2022-09-18T13:22:18.123Z`. + """ + id: str + """ + Unique identifier of the API key. + """ + secret_key: Optional[SecretKey] + """ + Token for the secret key. Present only in the create response; + null in subsequent retrieve responses. + """ + status: Union[Literal["active", "expired"], str] + """ + Current status of the API key. + """ + type: Union[Literal["secret_key"], str] + """ + Type of the API key. + """ + _inner_class_types = {"secret_key": SecretKey} + + mcp: Optional[Mcp] """ - Used to communicate with [Stripe's MCP server](https://docs.stripe.com/mcp). - This allows LLM agents to securely operate on a Stripe account. + Object hash for the sandbox's MCP key. + Null unless `enable_mcp_access: true` was passed in the creation request. """ - publishable: str + publishable: Publishable """ - Publicly accessible in a web or mobile app client-side code. + Object hash for the sandbox's publishable key. """ - secret: str + secret: Secret """ - Should be stored securely in server-side code (such as an environment variable). + Object hash for the sandbox's secret key. """ + _inner_class_types = { + "mcp": Mcp, + "publishable": Publishable, + "secret": Secret, + } account: str """ @@ -87,29 +203,37 @@ class ApiKeys(StripeObject): """ api_keys: Optional[ApiKeys] """ - Keys that can be used to set up an integration for this sandbox and operate on the account. This will be present only in the create response, and will be null in subsequent retrieve responses. + Keys that can be used to set up an integration for this sandbox and operate on the account. + Present in the create response. To fetch this field in the retrieve response, + pass `sandbox_details.api_keys` in the `include` parameter. """ _inner_class_types = {"api_keys": ApiKeys} - app_channel: Literal["public", "testing"] + channel: Literal["public", "testing"] """ - The app channel that will be used when pre-installing your app on the claimable sandbox. + The distribution channel used to pre-install your Stripe App on the claimable sandbox. + Use `testing` to install your app's external test version or `public` to install its published version. """ claimed_at: Optional[str] """ - The timestamp the sandbox was claimed. The value will be null if the sandbox status is not `claimed`. + Time at which the sandbox was claimed. Set when the status is `claimed` or `live`. + Represented as an RFC 3339 timestamp in UTC with millisecond precision, + for example `2022-09-18T13:22:18.123Z`. """ created: str """ - When the sandbox is created. + Time at which the sandbox was created. Represented as an RFC 3339 timestamp in UTC + with millisecond precision, for example `2022-09-18T13:22:18.123Z`. """ expires_at: Optional[str] """ - The timestamp the sandbox will expire. The value will be null if the sandbox is `claimed`. + Time at which the unclaimed sandbox expires. Null when the status is `claimed` or `live`. + Represented as an RFC 3339 timestamp in UTC with millisecond precision, + for example `2022-09-18T13:22:18.123Z`. """ id: str """ - Unique identifier for the Claimable sandbox. + Unique identifier for the claimable sandbox. """ livemode: bool """ @@ -119,13 +243,14 @@ class ApiKeys(StripeObject): """ String representing the object's type. Objects of the same type share the same value of the object field. """ - onboarding_link_details: OnboardingLinkDetails + onboarding_link_details: Optional[OnboardingLinkDetails] """ Details about the onboarding link. + Null when the sandbox status is `live` or `expired`. """ owner_details: Optional[OwnerDetails] """ - Details about the livemode owner account of the sandbox. + Details about the live mode owner account of the sandbox. This will be null until the sandbox is claimed. """ prefill: Prefill diff --git a/stripe/v2/core/_claimable_sandbox_service.py b/stripe/v2/core/_claimable_sandbox_service.py index c0ff1b99c..43f04f3ef 100644 --- a/stripe/v2/core/_claimable_sandbox_service.py +++ b/stripe/v2/core/_claimable_sandbox_service.py @@ -26,8 +26,8 @@ def create( options: Optional["RequestOptions"] = None, ) -> "ClaimableSandbox": """ - Create an anonymous, claimable sandbox. This sandbox can be prefilled with data. The response will include - a claim URL that allow a user to claim the account. + Create a claimable sandbox with prefilled data. The response includes an onboarding link that lets + a user claim the sandbox into a new or existing Stripe account. """ return cast( "ClaimableSandbox", @@ -46,8 +46,8 @@ async def create_async( options: Optional["RequestOptions"] = None, ) -> "ClaimableSandbox": """ - Create an anonymous, claimable sandbox. This sandbox can be prefilled with data. The response will include - a claim URL that allow a user to claim the account. + Create a claimable sandbox with prefilled data. The response includes an onboarding link that lets + a user claim the sandbox into a new or existing Stripe account. """ return cast( "ClaimableSandbox", @@ -114,7 +114,7 @@ def renew_onboarding_link( options: Optional["RequestOptions"] = None, ) -> "ClaimableSandbox": """ - Renew the claimable sandbox onboarding link. This will invalidate any existing onboarding links. + Renew the claimable sandbox onboarding link. This invalidates the existing onboarding link. The endpoint only works on a claimable sandbox with status `unclaimed` or `claimed`. """ return cast( @@ -138,7 +138,7 @@ async def renew_onboarding_link_async( options: Optional["RequestOptions"] = None, ) -> "ClaimableSandbox": """ - Renew the claimable sandbox onboarding link. This will invalidate any existing onboarding links. + Renew the claimable sandbox onboarding link. This invalidates the existing onboarding link. The endpoint only works on a claimable sandbox with status `unclaimed` or `claimed`. """ return cast( diff --git a/stripe/v2/core/accounts/_person_token_service.py b/stripe/v2/core/accounts/_person_token_service.py index 0a40fb628..be9726e96 100644 --- a/stripe/v2/core/accounts/_person_token_service.py +++ b/stripe/v2/core/accounts/_person_token_service.py @@ -27,7 +27,8 @@ def create( ) -> "AccountPersonToken": """ Creates a single-use token that represents the details for a person. Use this when you create or update persons associated with an Account v2. Learn more about [account tokens](https://docs.stripe.com/connect/account-tokens). - You can only create person tokens with your application's publishable key and in live mode. You can use your application's secret key to create person tokens only in test mode. + In live mode, you must create person tokens using a live publishable key. + In a sandbox, you can create person tokens with secret or publishable keys. """ return cast( "AccountPersonToken", @@ -54,7 +55,8 @@ async def create_async( ) -> "AccountPersonToken": """ Creates a single-use token that represents the details for a person. Use this when you create or update persons associated with an Account v2. Learn more about [account tokens](https://docs.stripe.com/connect/account-tokens). - You can only create person tokens with your application's publishable key and in live mode. You can use your application's secret key to create person tokens only in test mode. + In live mode, you must create person tokens using a live publishable key. + In a sandbox, you can create person tokens with secret or publishable keys. """ return cast( "AccountPersonToken", diff --git a/stripe/v2/core/health/_alert.py b/stripe/v2/core/health/_alert.py index eeb086ef8..56f971a4b 100644 --- a/stripe/v2/core/health/_alert.py +++ b/stripe/v2/core/health/_alert.py @@ -224,6 +224,41 @@ class Dimension(StripeObject): "previous_percentage": "decimal_string", } + class CustomPaymentMethodAdapterDegraded(StripeObject): + class CustomPaymentMethodTypeDetails(StripeObject): + auto_disabled_at: Optional[str] + """ + The time when the custom payment method was automatically disabled. Null when it is enabled. + """ + display_name: str + """ + The display name of the custom payment method type. + """ + reverse_api_url: str + """ + The URL of the user's self-hosted adapter endpoint. + """ + type: str + """ + The identifier of the custom payment method type (e.g., "cpmt_..."). + """ + + custom_payment_method_disabled_from_checkout: bool + """ + Whether the custom payment method was disabled in Checkout as a result of the degradation. True while the alert is open and false when it is resolved. + """ + custom_payment_method_type_details: CustomPaymentMethodTypeDetails + """ + The custom payment method type whose adapter is unhealthy. + """ + degraded_health_reason: str + """ + The reason the adapter's health is degraded. + """ + _inner_class_types = { + "custom_payment_method_type_details": CustomPaymentMethodTypeDetails, + } + class DocumentationLink(StripeObject): label: str """ @@ -528,6 +563,12 @@ class WebhookLatency(StripeObject): """ Time at which the health alert was created. """ + custom_payment_method_adapter_degraded: Optional[ + CustomPaymentMethodAdapterDegraded + ] + """ + Populated when type is custom_payment_method_adapter_degraded. + """ documentation_links: List[DocumentationLink] """ Links to relevant documentation for diagnosing and resolving the alert. @@ -625,6 +666,7 @@ class WebhookLatency(StripeObject): "api_error", "api_latency", "authorization_rate_drop", + "custom_payment_method_adapter_degraded", "elements_error", "event_generation_failure", "fraud_rate", @@ -651,6 +693,7 @@ class WebhookLatency(StripeObject): "api_error": ApiError, "api_latency": ApiLatency, "authorization_rate_drop": AuthorizationRateDrop, + "custom_payment_method_adapter_degraded": CustomPaymentMethodAdapterDegraded, "documentation_links": DocumentationLink, "elements_error": ElementsError, "event_generation_failure": EventGenerationFailure, diff --git a/stripe/v2/core/health/_alert_history_entry.py b/stripe/v2/core/health/_alert_history_entry.py index 33ff102bc..7573c5ea3 100644 --- a/stripe/v2/core/health/_alert_history_entry.py +++ b/stripe/v2/core/health/_alert_history_entry.py @@ -224,6 +224,41 @@ class Dimension(StripeObject): "previous_percentage": "decimal_string", } + class CustomPaymentMethodAdapterDegraded(StripeObject): + class CustomPaymentMethodTypeDetails(StripeObject): + auto_disabled_at: Optional[str] + """ + The time when the custom payment method was automatically disabled. Null when it is enabled. + """ + display_name: str + """ + The display name of the custom payment method type. + """ + reverse_api_url: str + """ + The URL of the user's self-hosted adapter endpoint. + """ + type: str + """ + The identifier of the custom payment method type (e.g., "cpmt_..."). + """ + + custom_payment_method_disabled_from_checkout: bool + """ + Whether the custom payment method was disabled in Checkout as a result of the degradation. True while the alert is open and false when it is resolved. + """ + custom_payment_method_type_details: CustomPaymentMethodTypeDetails + """ + The custom payment method type whose adapter is unhealthy. + """ + degraded_health_reason: str + """ + The reason the adapter's health is degraded. + """ + _inner_class_types = { + "custom_payment_method_type_details": CustomPaymentMethodTypeDetails, + } + class ElementsError(StripeObject): element_type: Optional[ Union[Literal["expressCheckout", "payment"], str] @@ -518,6 +553,12 @@ class WebhookLatency(StripeObject): """ Populated when type is authorization_rate_drop. """ + custom_payment_method_adapter_degraded: Optional[ + CustomPaymentMethodAdapterDegraded + ] + """ + Populated when type is custom_payment_method_adapter_degraded. + """ elements_error: Optional[ElementsError] """ Populated when type is elements_error. @@ -587,6 +628,7 @@ class WebhookLatency(StripeObject): "api_error", "api_latency", "authorization_rate_drop", + "custom_payment_method_adapter_degraded", "elements_error", "event_generation_failure", "fraud_rate", @@ -613,6 +655,7 @@ class WebhookLatency(StripeObject): "api_error": ApiError, "api_latency": ApiLatency, "authorization_rate_drop": AuthorizationRateDrop, + "custom_payment_method_adapter_degraded": CustomPaymentMethodAdapterDegraded, "elements_error": ElementsError, "event_generation_failure": EventGenerationFailure, "fraud_rate": FraudRate, diff --git a/stripe/v2/data/reporting/_query_run.py b/stripe/v2/data/reporting/_query_run.py index a6fa66f3e..3dd55df7c 100644 --- a/stripe/v2/data/reporting/_query_run.py +++ b/stripe/v2/data/reporting/_query_run.py @@ -7,6 +7,7 @@ class QueryRun(StripeObject): """ + The [Queries and Reports API](https://docs.stripe.com/data/api/query-runs) replaces this API. For new integrations, use `/v2/data/query_runs` instead. The `QueryRun` object represents an ad-hoc SQL execution. Once created, Stripe processes the query. When the query has finished running, the object provides a reference to the results. """ diff --git a/stripe/v2/iam/_activity_log.py b/stripe/v2/iam/_activity_log.py index 7d10c943d..fa32400cf 100644 --- a/stripe/v2/iam/_activity_log.py +++ b/stripe/v2/iam/_activity_log.py @@ -1,5 +1,6 @@ # -*- 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 @@ -172,6 +173,467 @@ class Authentication(StripeObject): Target email address involved in the authentication. """ + class Connect(StripeObject): + class Application(StripeObject): + id: str + """ + Identifier of the application. + """ + + class NewExpressBrandingSettings(StripeObject): + border_radius: Optional[str] + """ + Border radius for the Express Dashboard. + """ + primary_button_background_color: Optional[str] + """ + Primary button background color for the Express Dashboard. + """ + primary_color: Optional[str] + """ + Primary color for the Express Dashboard. + """ + secondary_button_background_color: Optional[str] + """ + Secondary button background color for the Express Dashboard. + """ + + class NewSettings(StripeObject): + business_name: Optional[str] + """ + The display name shown on the onboarding experience and Dashboard. This is different from the business legal name. + """ + copy_platform_branding_to_new_connected_accounts: Optional[ + bool + ] + """ + Whether platform branding is copied to new connected accounts. These also appear on invoices, receipts, and other Stripe products. + """ + hide_onboarding_support_email: Optional[bool] + """ + Whether the support email is hidden on onboarding surfaces. + """ + hide_onboarding_support_phone: Optional[bool] + """ + Whether the support phone number is hidden on onboarding surfaces. + """ + hide_onboarding_support_url: Optional[bool] + """ + Whether the support URL is hidden on onboarding surfaces. + """ + icon: Optional[str] + """ + Identifier of the icon file (file_* ID). + """ + logo: Optional[str] + """ + Identifier of the logo file (file_* ID). + """ + payout_statement_descriptor: Optional[str] + """ + The platform's default payout statement descriptor. It appears on the bank statements of the platform's connected accounts for their payouts. + """ + primary_color: Optional[str] + """ + A CSS hex color value representing the primary branding color, applied to the onboarding experience and the Stripe Dashboard. + """ + secondary_color: Optional[str] + """ + A CSS hex color value representing the secondary branding color, applied to the onboarding experience and the Stripe Dashboard. + """ + + class OldExpressBrandingSettings(StripeObject): + border_radius: Optional[str] + """ + Border radius for the Express Dashboard. + """ + primary_button_background_color: Optional[str] + """ + Primary button background color for the Express Dashboard. + """ + primary_color: Optional[str] + """ + Primary color for the Express Dashboard. + """ + secondary_button_background_color: Optional[str] + """ + Secondary button background color for the Express Dashboard. + """ + + class OldSettings(StripeObject): + business_name: Optional[str] + """ + The display name shown on the onboarding experience and Dashboard. This is different from the business legal name. + """ + copy_platform_branding_to_new_connected_accounts: Optional[ + bool + ] + """ + Whether platform branding is copied to new connected accounts. These also appear on invoices, receipts, and other Stripe products. + """ + hide_onboarding_support_email: Optional[bool] + """ + Whether the support email is hidden on onboarding surfaces. + """ + hide_onboarding_support_phone: Optional[bool] + """ + Whether the support phone number is hidden on onboarding surfaces. + """ + hide_onboarding_support_url: Optional[bool] + """ + Whether the support URL is hidden on onboarding surfaces. + """ + icon: Optional[str] + """ + Identifier of the icon file (file_* ID). + """ + logo: Optional[str] + """ + Identifier of the logo file (file_* ID). + """ + payout_statement_descriptor: Optional[str] + """ + The platform's default payout statement descriptor. It appears on the bank statements of the platform's connected accounts for their payouts. + """ + primary_color: Optional[str] + """ + A CSS hex color value representing the primary branding color, applied to the onboarding experience and the Stripe Dashboard. + """ + secondary_color: Optional[str] + """ + A CSS hex color value representing the secondary branding color, applied to the onboarding experience and the Stripe Dashboard. + """ + + application: Optional[Application] + """ + The Connect application. + """ + new_express_branding_settings: Optional[NewExpressBrandingSettings] + """ + Express Dashboard branding settings after the change. Set for the connect_express_branding_updated action. + """ + new_settings: Optional[NewSettings] + """ + Connect settings after the change. Set for the connect_settings_updated action. + """ + old_express_branding_settings: Optional[OldExpressBrandingSettings] + """ + Express Dashboard branding settings before the change. Set for the connect_express_branding_updated action. + """ + old_settings: Optional[OldSettings] + """ + Connect settings before the change. Set for the connect_settings_updated action. + """ + site_link_route: Optional[ + Union[ + Literal[ + "account_management", + "balances", + "documents", + "financial_accounts", + "issuing_card_transactions", + "notification_banner", + "payments", + "payouts", + ], + str, + ] + ] + """ + The site link route. Set for the connect_site_link_updated action. + """ + _inner_class_types = { + "application": Application, + "new_express_branding_settings": NewExpressBrandingSettings, + "new_settings": NewSettings, + "old_express_branding_settings": OldExpressBrandingSettings, + "old_settings": OldSettings, + } + + class DataExport(StripeObject): + type: str + """ + Name of export type. + """ + + class EventDestination(StripeObject): + class NewConfiguration(StripeObject): + class AmazonEventbridge(StripeObject): + aws_account_id: str + """ + AWS account ID configured for the event destination. + """ + aws_event_source_arn: str + """ + ARN of the AWS event source configured for the event destination. + """ + aws_region: str + """ + AWS region configured for the event destination. + """ + + class AzureEventGrid(StripeObject): + azure_partner_topic_name: str + """ + Azure partner topic name configured for the event destination. + """ + azure_region: str + """ + Azure region configured for the event destination. + """ + azure_resource_group_name: str + """ + Azure resource group name configured for the event destination. + """ + azure_subscription_id: str + """ + Azure subscription ID configured for the event destination. + """ + + class WebhookEndpoint(StripeObject): + url: str + """ + URL configured for the webhook endpoint. + """ + + amazon_eventbridge: Optional[AmazonEventbridge] + """ + Amazon EventBridge configuration. + """ + azure_event_grid: Optional[AzureEventGrid] + """ + Azure Event Grid configuration. + """ + enabled_events: List[str] + """ + Event types subscribed to by the destination. ["*"] subscribes to all V1 webhook events. + """ + events_from: List[str] + """ + Event source selectors: @self, @accounts, @organization_members, or @organization_members/@accounts. + """ + status: Union[Literal["disabled", "enabled"], str] + """ + Status of the event destination. + """ + webhook_endpoint: Optional[WebhookEndpoint] + """ + Webhook endpoint configuration. + """ + _inner_class_types = { + "amazon_eventbridge": AmazonEventbridge, + "azure_event_grid": AzureEventGrid, + "webhook_endpoint": WebhookEndpoint, + } + + class OldConfiguration(StripeObject): + class AmazonEventbridge(StripeObject): + aws_account_id: str + """ + AWS account ID configured for the event destination. + """ + aws_event_source_arn: str + """ + ARN of the AWS event source configured for the event destination. + """ + aws_region: str + """ + AWS region configured for the event destination. + """ + + class AzureEventGrid(StripeObject): + azure_partner_topic_name: str + """ + Azure partner topic name configured for the event destination. + """ + azure_region: str + """ + Azure region configured for the event destination. + """ + azure_resource_group_name: str + """ + Azure resource group name configured for the event destination. + """ + azure_subscription_id: str + """ + Azure subscription ID configured for the event destination. + """ + + class WebhookEndpoint(StripeObject): + url: str + """ + URL configured for the webhook endpoint. + """ + + amazon_eventbridge: Optional[AmazonEventbridge] + """ + Amazon EventBridge configuration. + """ + azure_event_grid: Optional[AzureEventGrid] + """ + Azure Event Grid configuration. + """ + enabled_events: List[str] + """ + Event types subscribed to by the destination. ["*"] subscribes to all V1 webhook events. + """ + events_from: List[str] + """ + Event source selectors: @self, @accounts, @organization_members, or @organization_members/@accounts. + """ + status: Union[Literal["disabled", "enabled"], str] + """ + Status of the event destination. + """ + webhook_endpoint: Optional[WebhookEndpoint] + """ + Webhook endpoint configuration. + """ + _inner_class_types = { + "amazon_eventbridge": AmazonEventbridge, + "azure_event_grid": AzureEventGrid, + "webhook_endpoint": WebhookEndpoint, + } + + new_configuration: Optional[NewConfiguration] + """ + Configuration after the change. Set for added and updated actions, absent for removed actions. + """ + old_configuration: Optional[OldConfiguration] + """ + Configuration before the change. Set for updated and removed actions, absent for added actions. + """ + type: Union[ + Literal[ + "amazon_eventbridge", + "azure_event_grid", + "webhook_endpoint", + ], + str, + ] + """ + Type of the event destination. + """ + _inner_class_types = { + "new_configuration": NewConfiguration, + "old_configuration": OldConfiguration, + } + + class Radar(StripeObject): + class NewRule(StripeObject): + action: Union[ + Literal[ + "allow", + "block", + "block_fa_outbound", + "manual_review", + "payout_pause", + "raise_review", + "request_credentials", + "resolve_dispute", + ], + str, + ] + """ + Action performed when the rule matches. + """ + enabled: Optional[bool] + """ + Whether the rule is enabled. + """ + id: str + """ + Identifier of the rule. + """ + objective: Optional[str] + """ + Objective of the rule. + """ + predicate: Optional[str] + """ + Rule expression evaluated to determine whether the rule matches. + """ + rollout_percentage: Optional[Decimal] + """ + Percentage of matching traffic to which the rule applies, between 0 and 100, serialized as a decimal string. + """ + type: Optional[Union[Literal["account", "payment"], str]] + """ + Type of entity evaluated by the rule. + """ + _field_encodings = {"rollout_percentage": "decimal_string"} + + class OldRule(StripeObject): + action: Union[ + Literal[ + "allow", + "block", + "block_fa_outbound", + "manual_review", + "payout_pause", + "raise_review", + "request_credentials", + "resolve_dispute", + ], + str, + ] + """ + Action performed when the rule matches. + """ + enabled: Optional[bool] + """ + Whether the rule is enabled. + """ + id: str + """ + Identifier of the rule. + """ + objective: Optional[str] + """ + Objective of the rule. + """ + predicate: Optional[str] + """ + Rule expression evaluated to determine whether the rule matches. + """ + rollout_percentage: Optional[Decimal] + """ + Percentage of matching traffic to which the rule applies, between 0 and 100, serialized as a decimal string. + """ + type: Optional[Union[Literal["account", "payment"], str]] + """ + Type of entity evaluated by the rule. + """ + _field_encodings = {"rollout_percentage": "decimal_string"} + + new_risk_preference: Optional[ + Union[ + Literal["balanced", "custom", "high_growth", "low_risk"], + str, + ] + ] + """ + Risk preference after a preference switch carried by a protection-toggle action. + """ + new_rules: Optional[List[NewRule]] + """ + Rules after the change. Set for add, update, enable, and disable actions; absent for remove actions. + """ + old_risk_preference: Optional[ + Union[ + Literal["balanced", "custom", "high_growth", "low_risk"], + str, + ] + ] + """ + Risk preference before a preference switch carried by a protection-toggle action. + """ + old_rules: Optional[List[OldRule]] + """ + Rules before the change. Set for update, removal, enable, and disable actions; absent for add actions. + """ + _inner_class_types = {"new_rules": NewRule, "old_rules": OldRule} + class Scim(StripeObject): group_name: str """ @@ -334,6 +796,22 @@ class UserRoles(StripeObject): """ Details of an authentication action. """ + connect: Optional[Connect] + """ + Details of a Connect action. + """ + data_export: Optional[DataExport] + """ + Details of a data export action. + """ + event_destination: Optional[EventDestination] + """ + Details of an event destination action. + """ + radar: Optional[Radar] + """ + Details of a Radar action. + """ scim: Optional[Scim] """ Details of a SCIM action. @@ -346,9 +824,14 @@ class UserRoles(StripeObject): Literal[ "account_security", "api_key", + "app", "authentication", + "connect", + "data_export", + "event_destination", "issuing", "payout", + "radar", "scim", "sso", "user_access", @@ -381,6 +864,10 @@ class UserRoles(StripeObject): "account_security": AccountSecurity, "api_key": ApiKey, "authentication": Authentication, + "connect": Connect, + "data_export": DataExport, + "event_destination": EventDestination, + "radar": Radar, "scim": Scim, "sso": Sso, "user_access": UserAccess, @@ -396,13 +883,16 @@ class RelatedObject(StripeObject): """ type: Union[ Literal[ + "apps.install", "balance_transfer", "bank_account", "blockchain_address", "card", + "v2.core.event_destination", "issuing.card", "issuing.cardholder", "issuing.dispute", + "webhook_endpoint", ], str, ] @@ -459,6 +949,20 @@ class Request(StripeObject): "api_key_deleted", "api_key_updated", "api_key_viewed", + "application_authorized", + "application_created", + "application_deauthorized", + "app_installed", + "app_uninstalled", + "connect_express_branding_updated", + "connect_oauth_disabled", + "connect_oauth_enabled", + "connect_settings_updated", + "connect_site_link_updated", + "data_export_requested", + "event_destination_added", + "event_destination_removed", + "event_destination_updated", "issuing_activated", "issuing_balance_transfer_created", "issuing_cardholder_created", @@ -476,6 +980,17 @@ class Request(StripeObject): "payout_destination_updated", "payout_schedule_edits_disabled", "payout_schedule_edits_enabled", + "payout_schedule_updated", + "radar_adaptive_3ds_disabled", + "radar_dynamic_risk_thresholds_disabled", + "radar_early_fraud_warning_disabled", + "radar_for_setup_intents_disabled", + "radar_fraud_dispute_protection_disabled", + "radar_rule_added", + "radar_rule_disabled", + "radar_rule_enabled", + "radar_rule_removed", + "radar_rule_updated", "scim_group_deleted", "scim_group_member_added", "scim_group_member_removed", diff --git a/stripe/v2/money_management/_financial_account.py b/stripe/v2/money_management/_financial_account.py index 990b55809..4e7b30bc9 100644 --- a/stripe/v2/money_management/_financial_account.py +++ b/stripe/v2/money_management/_financial_account.py @@ -255,6 +255,12 @@ class DepositInsuranceEligibility(StripeObject): """ Array of eligibility objects, segmented by bank name and deposit insurance scheme. """ + funds_holding_structure: Optional[ + Union[Literal["demand_deposit_account", "for_benefit_of"], str] + ] + """ + How funds in this FinancialAccount are held. Defaults to `for_benefit_of` if not specified. + """ funds_usage_type: Optional[Union[Literal["business", "consumer"], str]] """ The usage type for funds in this FinancialAccount. Can be used to specify that the funds are for Consumer activity. diff --git a/stripe/v2/money_management/_inbound_transfer.py b/stripe/v2/money_management/_inbound_transfer.py index 1107ec2cc..5c27c673a 100644 --- a/stripe/v2/money_management/_inbound_transfer.py +++ b/stripe/v2/money_management/_inbound_transfer.py @@ -18,6 +18,10 @@ class InboundTransfer(StripeObject): class From(StripeObject): class PaymentMethod(StripeObject): + au_becs_debit: Optional[str] + """ + The Australian bank account credential used for AU BECS Direct Debit. + """ bacs_debit: Optional[str] """ The Bacs Direct Debit PaymentMethod identifier. diff --git a/stripe/v2/money_management/_outbound_payment.py b/stripe/v2/money_management/_outbound_payment.py index 93abd2da3..a41ee418d 100644 --- a/stripe/v2/money_management/_outbound_payment.py +++ b/stripe/v2/money_management/_outbound_payment.py @@ -209,6 +209,7 @@ class Ach(StripeObject): "sepa_credit", "sepa_instant", "swift", + "tips", ], str, ] diff --git a/stripe/v2/money_management/_outbound_payment_quote.py b/stripe/v2/money_management/_outbound_payment_quote.py index 64f2492d7..7d40e1b93 100644 --- a/stripe/v2/money_management/_outbound_payment_quote.py +++ b/stripe/v2/money_management/_outbound_payment_quote.py @@ -59,6 +59,7 @@ class Ach(StripeObject): "sepa", "sepa_instant", "swift", + "tips", ], str, ] @@ -201,6 +202,7 @@ class Ach(StripeObject): "sepa_credit", "sepa_instant", "swift", + "tips", ], str, ] diff --git a/stripe/v2/money_management/_outbound_transfer.py b/stripe/v2/money_management/_outbound_transfer.py index 8af3d5cfa..bca637724 100644 --- a/stripe/v2/money_management/_outbound_transfer.py +++ b/stripe/v2/money_management/_outbound_transfer.py @@ -154,6 +154,7 @@ class Ach(StripeObject): "sepa_credit", "sepa_instant", "swift", + "tips", ], str, ] diff --git a/stripe/v2/money_management/_payout_intent.py b/stripe/v2/money_management/_payout_intent.py index ce1589a3f..39d9ca3fe 100644 --- a/stripe/v2/money_management/_payout_intent.py +++ b/stripe/v2/money_management/_payout_intent.py @@ -45,6 +45,7 @@ class Ach(StripeObject): "sepa", "sepa_instant", "swift", + "tips", ], str, ] @@ -358,6 +359,7 @@ class Ach(StripeObject): "sepa_credit", "sepa_instant", "swift", + "tips", ], str, ] diff --git a/stripe/v2/money_management/_received_debit.py b/stripe/v2/money_management/_received_debit.py index 553285044..8e8940ca2 100644 --- a/stripe/v2/money_management/_received_debit.py +++ b/stripe/v2/money_management/_received_debit.py @@ -112,6 +112,53 @@ class Ach(StripeObject): """ _inner_class_types = {"ach": Ach} + class OriginatingBankAccount(StripeObject): + class Aba(StripeObject): + account_holder_name: Optional[str] + """ + The name of the account holder that originated the debit, as provided by the ACH network. + """ + bank_name: Optional[str] + """ + The name of the bank the debit originated from. + """ + routing_number: Optional[str] + """ + The routing number of the bank that originated the debit. + """ + + class SortCode(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. + """ + sort_code: Optional[str] + """ + The sort code of the bank that originated the debit. + """ + + aba: Optional[Aba] + """ + Details of the originating account. Present when type is `aba`. + """ + sort_code: Optional[SortCode] + """ + Details of the originating account. Present when type is `sort_code`. + """ + type: Union[Literal["aba", "sort_code"], str] + """ + The credential type identifying the originating bank account. + """ + _inner_class_types = {"aba": Aba, "sort_code": SortCode} + class UsBankAccount(StripeObject): bank_name: Optional[str] """ @@ -132,21 +179,32 @@ class UsBankAccount(StripeObject): """ gb_bank_account: Optional[GbBankAccount] """ + Deprecated: Use `bank_transfer.originating_bank_account.sort_code` instead. Object containing details of the GB Bank Account that originated the debit. Present when the debit was originated via BACS. """ + network: Union[Literal["ach", "bacs"], str] + """ + The bank network the debit was originated on. + """ network_details: Optional[NetworkDetails] """ Network-specific details about the bank transfer. """ origin_type: Union[Literal["gb_bank_account", "us_bank_account"], str] """ + Deprecated: Use `bank_transfer.originating_bank_account.type` instead. Open Enum. Indicates the origin type through which this debit was initiated. """ + originating_bank_account: OriginatingBankAccount + """ + The originating bank account's credential details. + """ payment_method_type: Union[ Literal["gb_bank_account", "us_bank_account"], str ] """ + Deprecated: Use `bank_transfer.originating_bank_account.type` instead. Open Enum. The type of the payment method used to originate the debit. """ spending_mandate: Optional[str] @@ -159,12 +217,14 @@ class UsBankAccount(StripeObject): """ us_bank_account: Optional[UsBankAccount] """ + Deprecated: Use `bank_transfer.originating_bank_account.aba` instead. Object containing details of the US Bank Account that originated the debit. Present when the debit was originated via ACH. """ _inner_class_types = { "gb_bank_account": GbBankAccount, "network_details": NetworkDetails, + "originating_bank_account": OriginatingBankAccount, "us_bank_account": UsBankAccount, } diff --git a/stripe/v2/money_management/_transaction.py b/stripe/v2/money_management/_transaction.py index 261594154..7f483e842 100644 --- a/stripe/v2/money_management/_transaction.py +++ b/stripe/v2/money_management/_transaction.py @@ -184,6 +184,7 @@ class Flow(StripeObject): "dispute", "earned_credit", "fee_batch", + "inbound_funding", "inbound_transfer", "issuing_authorization", "issuing_dispute", @@ -270,6 +271,8 @@ class StatusTransitions(StripeObject): "earned_credit", "financing_paydown", "financing_paydown_reversal", + "inbound_funding", + "inbound_funding_reversal", "inbound_payment", "inbound_payment_failure", "inbound_transfer", diff --git a/stripe/v2/money_management/_transaction_entry.py b/stripe/v2/money_management/_transaction_entry.py index b86fee523..69baab6da 100644 --- a/stripe/v2/money_management/_transaction_entry.py +++ b/stripe/v2/money_management/_transaction_entry.py @@ -178,6 +178,7 @@ class Flow(StripeObject): "dispute", "earned_credit", "fee_batch", + "inbound_funding", "inbound_transfer", "issuing_authorization", "issuing_dispute", @@ -229,6 +230,8 @@ class Flow(StripeObject): "earned_credit", "financing_paydown", "financing_paydown_reversal", + "inbound_funding", + "inbound_funding_reversal", "inbound_payment", "inbound_payment_failure", "inbound_transfer", diff --git a/stripe/v2/reporting/_report.py b/stripe/v2/reporting/_report.py index 9c7eb95fd..6282c1927 100644 --- a/stripe/v2/reporting/_report.py +++ b/stripe/v2/reporting/_report.py @@ -7,6 +7,7 @@ class Report(StripeObject): """ + The [Queries and Reports API](https://docs.stripe.com/data/api/reports) replaces this API. For new integrations, use `/v2/data/reports` instead. The Report resource represents a customizable report template that provides insights into various aspects of your Stripe integration. """ diff --git a/stripe/v2/reporting/_report_run.py b/stripe/v2/reporting/_report_run.py index 37047db16..35ef41f03 100644 --- a/stripe/v2/reporting/_report_run.py +++ b/stripe/v2/reporting/_report_run.py @@ -7,6 +7,7 @@ class ReportRun(StripeObject): """ + The [Queries and Reports API](https://docs.stripe.com/data/api/reports) replaces this API. For new integrations, use `/v2/data/report_runs` instead. The `ReportRun` object represents an instance of a `Report` generated with specific run parameters. Once the object is created, Stripe begins processing the report. When the report has finished running, it will give you a reference to the results. diff --git a/tests/api_resources/test_list_object.py b/tests/api_resources/test_list_object.py index 02568c4b7..895094d36 100644 --- a/tests/api_resources/test_list_object.py +++ b/tests/api_resources/test_list_object.py @@ -1,4 +1,5 @@ import json +import pickle import pytest @@ -297,6 +298,68 @@ def test_iter_two_pages(self, http_client_mock): assert seen == ["pm_123", "pm_124", "pm_125", "pm_126"] + @pytest.fixture + def restored_list(self, monkeypatch): + lo = stripe.ListObject.construct_from( + self.pageable_model_response(["pm_123"], True), + "producer-key-sentinel", + stripe_account="example-account", + ) + monkeypatch.setattr(stripe, "api_key", None) + restored = pickle.loads(pickle.dumps(lo)) + restored.reattach_api_key("worker-key-sentinel") + return restored + + def test_iter_uses_reattached_api_key_on_every_page( + self, http_client_mock, restored_list + ): + http_client_mock.stub_request( + "get", + path="/v1/pageablemodels", + query_string="starting_after=pm_123", + rbody=json.dumps(self.pageable_model_response(["pm_124"], True)), + ) + http_client_mock.stub_request( + "get", + path="/v1/pageablemodels", + query_string="starting_after=pm_124", + rbody=json.dumps(self.pageable_model_response(["pm_125"], False)), + ) + + seen = [item["id"] for item in restored_list.auto_paging_iter()] + + assert seen == ["pm_123", "pm_124", "pm_125"] + for starting_after in ("pm_123", "pm_124"): + http_client_mock.assert_requested( + "get", + path="/v1/pageablemodels", + query_string=f"starting_after={starting_after}", + api_key="worker-key-sentinel", + stripe_account="example-account", + ) + + def test_iter_reverse_uses_reattached_api_key( + self, http_client_mock, restored_list + ): + restored_list._retrieve_params = {"ending_before": "pm_124"} + http_client_mock.stub_request( + "get", + path="/v1/pageablemodels", + query_string="ending_before=pm_123", + rbody=json.dumps(self.pageable_model_response(["pm_122"], False)), + ) + + seen = [item["id"] for item in restored_list.auto_paging_iter()] + + assert seen == ["pm_123", "pm_122"] + http_client_mock.assert_requested( + "get", + path="/v1/pageablemodels", + query_string="ending_before=pm_123", + api_key="worker-key-sentinel", + stripe_account="example-account", + ) + def test_iter_reverse(self, http_client_mock): lo = stripe.ListObject.construct_from( self.pageable_model_response(["pm_125", "pm_126"], True), "mykey" @@ -655,6 +718,34 @@ async def test_iter_one_page(self, http_client_mock): assert seen == ["pm_123", "pm_124"] + @pytest.mark.anyio + async def test_iter_uses_reattached_api_key( + self, http_client_mock, monkeypatch + ): + lo = stripe.ListObject.construct_from( + self.pageable_model_response(["pm_123"], True), + "producer-key-sentinel", + ) + monkeypatch.setattr(stripe, "api_key", None) + restored = pickle.loads(pickle.dumps(lo)) + restored.reattach_api_key("worker-key-sentinel") + http_client_mock.stub_request( + "get", + path="/v1/pageablemodels", + query_string="starting_after=pm_123", + rbody=json.dumps(self.pageable_model_response(["pm_124"], False)), + ) + + seen = [item["id"] async for item in restored.auto_paging_iter()] + + assert seen == ["pm_123", "pm_124"] + http_client_mock.assert_requested( + "get", + path="/v1/pageablemodels", + query_string="starting_after=pm_123", + api_key="worker-key-sentinel", + ) + @pytest.mark.anyio async def test_iter_two_pages(self, http_client_mock): lo = stripe.ListObject.construct_from( diff --git a/tests/api_resources/test_list_object_v2.py b/tests/api_resources/test_list_object_v2.py index 84759e873..a7581b142 100644 --- a/tests/api_resources/test_list_object_v2.py +++ b/tests/api_resources/test_list_object_v2.py @@ -1,6 +1,7 @@ from __future__ import absolute_import, division, print_function import json +import pickle import pytest @@ -147,6 +148,33 @@ def test_iter_forwards_api_key(self, http_client_mock: HTTPClientMock): api_key="sk_test_iter_forwards_options", ) + def test_iter_uses_reattached_api_key(self, http_client_mock, monkeypatch): + lo = ListObject.construct_from( + self.pageable_model_response( + ["pm_123"], "/v2/pageablemodels?page=page_2" + ), + "producer-key-sentinel", + ) + monkeypatch.setattr(stripe, "api_key", None) + restored = pickle.loads(pickle.dumps(lo)) + restored.reattach_api_key("worker-key-sentinel") + http_client_mock.stub_request( + "get", + path="/v2/pageablemodels", + query_string="page=page_2", + rbody=json.dumps(self.pageable_model_response(["pm_124"], None)), + ) + + seen = [item["id"] for item in restored.auto_paging_iter()] + + assert seen == ["pm_123", "pm_124"] + http_client_mock.assert_requested( + "get", + path="/v2/pageablemodels", + query_string="page=page_2", + api_key="worker-key-sentinel", + ) + class TestAutoPagingAsync: @staticmethod diff --git a/tests/api_resources/test_search_result_object.py b/tests/api_resources/test_search_result_object.py index 9db977921..5d640e374 100644 --- a/tests/api_resources/test_search_result_object.py +++ b/tests/api_resources/test_search_result_object.py @@ -1,4 +1,5 @@ import json +import pickle import pytest @@ -256,6 +257,35 @@ def test_iter_two_pages(self, http_client_mock): assert seen == ["pm_123", "pm_124", "pm_125", "pm_126"] + def test_iter_uses_reattached_api_key(self, http_client_mock, monkeypatch): + sro = stripe.SearchResultObject.construct_from( + self.pageable_model_response(["pm_123"], True, "token"), + "producer-key-sentinel", + stripe_account="example-account", + ) + monkeypatch.setattr(stripe, "api_key", None) + restored = pickle.loads(pickle.dumps(sro)) + restored.reattach_api_key("worker-key-sentinel") + http_client_mock.stub_request( + "get", + path="/v1/pageablemodels", + query_string="page=token", + rbody=json.dumps( + self.pageable_model_response(["pm_124"], False, None) + ), + ) + + seen = [item["id"] for item in restored.auto_paging_iter()] + + assert seen == ["pm_123", "pm_124"] + http_client_mock.assert_requested( + "get", + path="/v1/pageablemodels", + query_string="page=token", + api_key="worker-key-sentinel", + stripe_account="example-account", + ) + class TestAutoPagingAsync: @staticmethod diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index d9aa146a5..68a50e929 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -43599,196 +43599,6 @@ def test_v2_billing_bill_settings_version_get_2_service( api_base="https://api.stripe.com", ) - def test_v2_billing_cadence_get_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "get", - "/v2/billing/cadences", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.billing.cadences.list() - http_client_mock.assert_requested( - "get", - path="/v2/billing/cadences", - query_string="", - api_base="https://api.stripe.com", - ) - - def test_v2_billing_cadence_post_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "post", - "/v2/billing/cadences", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.billing.cadences.create( - { - "billing_cycle": { - "day": { - "time": { - "hour": 3208676, - "minute": 1074026988, - "second": 906279820, - }, - }, - "interval_count": 797691627, - "month": { - "day_of_month": 1361669285, - "month_of_year": 82933018, - "time": { - "hour": 3208676, - "minute": 1074026988, - "second": 906279820, - }, - }, - "type": "week", - "week": { - "day_of_week": 43636807, - "time": { - "hour": 3208676, - "minute": 1074026988, - "second": 906279820, - }, - }, - "year": { - "day_of_month": 1361669285, - "month_of_year": 82933018, - "time": { - "hour": 3208676, - "minute": 1074026988, - "second": 906279820, - }, - }, - }, - "payer": {"billing_profile": "billing_profile"}, - } - ) - http_client_mock.assert_requested( - "post", - path="/v2/billing/cadences", - query_string="", - api_base="https://api.stripe.com", - post_data='{"billing_cycle":{"day":{"time":{"hour":3208676,"minute":1074026988,"second":906279820}},"interval_count":797691627,"month":{"day_of_month":1361669285,"month_of_year":82933018,"time":{"hour":3208676,"minute":1074026988,"second":906279820}},"type":"week","week":{"day_of_week":43636807,"time":{"hour":3208676,"minute":1074026988,"second":906279820}},"year":{"day_of_month":1361669285,"month_of_year":82933018,"time":{"hour":3208676,"minute":1074026988,"second":906279820}}},"payer":{"billing_profile":"billing_profile"}}', - is_json=True, - ) - - def test_v2_billing_cadence_get_2_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "get", - "/v2/billing/cadences/id_123", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.billing.cadences.retrieve("id_123") - http_client_mock.assert_requested( - "get", - path="/v2/billing/cadences/id_123", - query_string="", - api_base="https://api.stripe.com", - ) - - def test_v2_billing_cadence_post_2_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "post", - "/v2/billing/cadences/id_123", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.billing.cadences.update("id_123") - http_client_mock.assert_requested( - "post", - path="/v2/billing/cadences/id_123", - query_string="", - api_base="https://api.stripe.com", - post_data="{}", - is_json=True, - ) - - def test_v2_billing_cadence_post_3_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "post", - "/v2/billing/cadences/id_123/cancel", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.billing.cadences.cancel("id_123") - http_client_mock.assert_requested( - "post", - path="/v2/billing/cadences/id_123/cancel", - query_string="", - api_base="https://api.stripe.com", - post_data="{}", - is_json=True, - ) - - def test_v2_billing_cadences_spend_modifier_rule_get_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "get", - "/v2/billing/cadences/cadence_id_123/spend_modifier_rules", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.billing.cadences.spend_modifier_rules.list("cadence_id_123") - http_client_mock.assert_requested( - "get", - path="/v2/billing/cadences/cadence_id_123/spend_modifier_rules", - query_string="", - api_base="https://api.stripe.com", - ) - - def test_v2_billing_cadences_spend_modifier_rule_get_2_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "get", - "/v2/billing/cadences/cadence_id_123/spend_modifier_rules/id_123", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.billing.cadences.spend_modifier_rules.retrieve( - "cadence_id_123", - "id_123", - ) - http_client_mock.assert_requested( - "get", - path="/v2/billing/cadences/cadence_id_123/spend_modifier_rules/id_123", - query_string="", - api_base="https://api.stripe.com", - ) - def test_v2_billing_collection_setting_get_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -44071,29 +43881,6 @@ def test_v2_billing_contract_post_4_service( is_json=True, ) - def test_v2_billing_contracts_pricing_lines_quantity_change_get_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "get", - "/v2/billing/contracts/contract_id_123/pricing_lines/pricing_line_id_123/quantity_changes", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.billing.contracts.pricing_lines.quantity_changes.list_contract_pricing_line_quantity_changes( - "contract_id_123", - "pricing_line_id_123", - ) - http_client_mock.assert_requested( - "get", - path="/v2/billing/contracts/contract_id_123/pricing_lines/pricing_line_id_123/quantity_changes", - query_string="", - api_base="https://api.stripe.com", - ) - def test_v2_billing_contracts_term_get_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -44250,6 +44037,177 @@ def test_v2_billing_custom_pricing_unit_post_2_service( is_json=True, ) + def test_v2_billing_group_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/billing/groups", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.billing.groups.list() + http_client_mock.assert_requested( + "get", + path="/v2/billing/groups", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_billing_group_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/billing/groups", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.billing.groups.create({"customer": "customer"}) + http_client_mock.assert_requested( + "post", + path="/v2/billing/groups", + query_string="", + api_base="https://api.stripe.com", + post_data='{"customer":"customer"}', + is_json=True, + ) + + def test_v2_billing_group_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/billing/groups/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.billing.groups.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/billing/groups/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_billing_group_post_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/billing/groups/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.billing.groups.update("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/billing/groups/id_123", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_billing_group_post_3_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/billing/groups/id_123/cancel", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.billing.groups.cancel("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/billing/groups/id_123/cancel", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_billing_groups_invoice_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/billing/groups/id_123/invoices", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.billing.groups.invoices.create("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/billing/groups/id_123/invoices", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_billing_groups_spend_modifier_rule_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/billing/groups/group_id_123/spend_modifier_rules", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.billing.groups.spend_modifier_rules.list("group_id_123") + http_client_mock.assert_requested( + "get", + path="/v2/billing/groups/group_id_123/spend_modifier_rules", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_billing_groups_spend_modifier_rule_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/billing/groups/group_id_123/spend_modifier_rules/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.billing.groups.spend_modifier_rules.retrieve( + "group_id_123", + "id_123", + ) + http_client_mock.assert_requested( + "get", + path="/v2/billing/groups/group_id_123/spend_modifier_rules/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + def test_v2_billing_intent_get_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -45946,7 +45904,7 @@ def test_v2_billing_rate_card_subscription_post_service( client.v2.billing.rate_card_subscriptions.create( { - "billing_cadence": "billing_cadence", + "billing_group": "billing_group", "rate_card": "rate_card", } ) @@ -45955,7 +45913,7 @@ def test_v2_billing_rate_card_subscription_post_service( path="/v2/billing/rate_card_subscriptions", query_string="", api_base="https://api.stripe.com", - post_data='{"billing_cadence":"billing_cadence","rate_card":"rate_card"}', + post_data='{"billing_group":"billing_group","rate_card":"rate_card"}', is_json=True, ) @@ -46514,6 +46472,7 @@ def test_v2_core_account_link_post_service( { "account": "account", "use_case": { + "account_dashboard": {"refresh_url": "refresh_url"}, "account_onboarding": { "collection_options": { "fields": "eventually_due", @@ -46546,7 +46505,7 @@ def test_v2_core_account_link_post_service( "refresh_url": "refresh_url", "return_url": "return_url", }, - "type": "recipient_onboarding", + "type": "account_dashboard", }, } ) @@ -46555,7 +46514,7 @@ def test_v2_core_account_link_post_service( path="/v2/core/account_links", query_string="", api_base="https://api.stripe.com", - post_data='{"account":"account","use_case":{"account_onboarding":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"refresh_url":"refresh_url","return_url":"return_url"},"account_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"refresh_url":"refresh_url","return_url":"return_url"},"recipient_onboarding":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"refresh_url":"refresh_url","return_url":"return_url"},"recipient_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"refresh_url":"refresh_url","return_url":"return_url"},"type":"recipient_onboarding"}}', + post_data='{"account":"account","use_case":{"account_dashboard":{"refresh_url":"refresh_url"},"account_onboarding":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"refresh_url":"refresh_url","return_url":"return_url"},"account_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"refresh_url":"refresh_url","return_url":"return_url"},"recipient_onboarding":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"refresh_url":"refresh_url","return_url":"return_url"},"recipient_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"refresh_url":"refresh_url","return_url":"return_url"},"type":"account_dashboard"}}', is_json=True, ) @@ -46837,7 +46796,10 @@ def test_v2_core_claimable_sandbox_post_service( client.v2.core.claimable_sandboxes.create( { "enable_mcp_access": True, - "onboarding_link_details": {"refresh_url": "refresh_url"}, + "onboarding_link_details": { + "refresh_url": "refresh_url", + "return_url": "return_url", + }, "prefill": { "country": "country", "email": "email", @@ -46850,7 +46812,7 @@ def test_v2_core_claimable_sandbox_post_service( path="/v2/core/claimable_sandboxes", query_string="", api_base="https://api.stripe.com", - post_data='{"enable_mcp_access":true,"onboarding_link_details":{"refresh_url":"refresh_url"},"prefill":{"country":"country","email":"email","name":"name"}}', + post_data='{"enable_mcp_access":true,"onboarding_link_details":{"refresh_url":"refresh_url","return_url":"return_url"},"prefill":{"country":"country","email":"email","name":"name"}}', is_json=True, ) @@ -49260,7 +49222,7 @@ def test_v2_money_management_outbound_payment_post_service( "transaction_purpose": "payroll", }, }, - "preferred_networks": ["fedwire"], + "preferred_networks": ["sepa_instant"], }, "check_send": { "attachment_file": "attachment_file", @@ -49278,7 +49240,7 @@ def test_v2_money_management_outbound_payment_post_service( path="/v2/money_management/outbound_payments", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","payout_method_options":{"bank_account":{"preferred_network_options":{"ach":{"addenda":"addenda","submission":"next_day","transaction_purpose":"payroll"}},"preferred_networks":["fedwire"]},"check_send":{"attachment_file":"attachment_file","memo":"memo","shipping_speed":"priority","signature":"signature"}},"recipient":"recipient"}}', + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","payout_method_options":{"bank_account":{"preferred_network_options":{"ach":{"addenda":"addenda","submission":"next_day","transaction_purpose":"payroll"}},"preferred_networks":["sepa_instant"]},"check_send":{"attachment_file":"attachment_file","memo":"memo","shipping_speed":"priority","signature":"signature"}},"recipient":"recipient"}}', is_json=True, ) @@ -49355,7 +49317,7 @@ def test_v2_money_management_outbound_payment_quote_post_service( "transaction_purpose": "payroll", }, }, - "preferred_networks": ["fedwire"], + "preferred_networks": ["sepa_instant"], }, }, "recipient": "recipient", @@ -49367,7 +49329,7 @@ def test_v2_money_management_outbound_payment_quote_post_service( path="/v2/money_management/outbound_payment_quotes", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","payout_method_options":{"bank_account":{"preferred_network_options":{"ach":{"addenda":"addenda","submission":"next_day","transaction_purpose":"payroll"}},"preferred_networks":["fedwire"]}},"recipient":"recipient"}}', + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","payout_method_options":{"bank_account":{"preferred_network_options":{"ach":{"addenda":"addenda","submission":"next_day","transaction_purpose":"payroll"}},"preferred_networks":["sepa_instant"]}},"recipient":"recipient"}}', is_json=True, ) @@ -49544,7 +49506,7 @@ def test_v2_money_management_outbound_transfer_post_service( "preferred_network_options": { "ach": {"addenda": "addenda"}, }, - "preferred_networks": ["fedwire"], + "preferred_networks": ["sepa_instant"], }, }, }, @@ -49555,7 +49517,7 @@ def test_v2_money_management_outbound_transfer_post_service( path="/v2/money_management/outbound_transfers", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","payout_method_options":{"bank_account":{"preferred_network_options":{"ach":{"addenda":"addenda"}},"preferred_networks":["fedwire"]}}}}', + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","payout_method_options":{"bank_account":{"preferred_network_options":{"ach":{"addenda":"addenda"}},"preferred_networks":["sepa_instant"]}}}}', is_json=True, ) @@ -49652,7 +49614,7 @@ def test_v2_money_management_payout_intent_post_service( "transaction_purpose": "payroll", }, }, - "preferred_networks": ["fedwire"], + "preferred_networks": ["sepa_instant"], }, "check_send": { "attachment_file": "attachment_file", @@ -49670,7 +49632,7 @@ def test_v2_money_management_payout_intent_post_service( path="/v2/money_management/payout_intents", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","payout_method_options":{"bank_account":{"preferred_network_options":{"ach":{"addenda":"addenda","submission":"next_day","transaction_purpose":"payroll"}},"preferred_networks":["fedwire"]},"check_send":{"attachment_file":"attachment_file","memo":"memo","shipping_speed":"priority","signature":"signature"}},"recipient":"recipient"}}', + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","payout_method_options":{"bank_account":{"preferred_network_options":{"ach":{"addenda":"addenda","submission":"next_day","transaction_purpose":"payroll"}},"preferred_networks":["sepa_instant"]},"check_send":{"attachment_file":"attachment_file","memo":"memo","shipping_speed":"priority","signature":"signature"}},"recipient":"recipient"}}', is_json=True, ) diff --git a/tests/test_http_client.py b/tests/test_http_client.py index 0c6eaa557..959d72104 100644 --- a/tests/test_http_client.py +++ b/tests/test_http_client.py @@ -1,17 +1,15 @@ +import importlib import io import base64 import json -import sys +import threading from typing import Any, Callable, Dict, List, Optional from unittest.mock import MagicMock, Mock, call, patch import pytest from typing_extensions import Type -if sys.version_info >= (3, 8): - from unittest.mock import AsyncMock -else: - from mock import AsyncMock +from unittest.mock import AsyncMock from contextlib import contextmanager @@ -43,7 +41,15 @@ def mocked_request_lib(): SUPPORTED_LIBS = frozenset( - ("google.appengine.api", "requests", "pycurl", "httpx", "aiohttp", "anyio") + ( + "google.appengine.api", + "requests", + "pycurl", + "httpx2", + "httpx", # TODO: (DEVSDK-3427) drop in the next major version. + "aiohttp", + "anyio", + ) ) @@ -107,10 +113,15 @@ def test_default_httpclient_from_imports( @pytest.mark.parametrize( ["available_libs", "expected"], [ - # needs both httpx and anyio + # TODO: (DEVSDK-3427) delete the httpx-only cases in the next major version. + # needs both httpx2 (or httpx) and anyio + [["httpx2"], NoImportFoundAsyncClient], [["httpx"], NoImportFoundAsyncClient], [["anyio"], NoImportFoundAsyncClient], + [["httpx2", "anyio"], HTTPXClient], [["httpx", "anyio"], HTTPXClient], + [["httpx2", "httpx", "anyio"], HTTPXClient], + [["httpx", "anyio", "aiohttp"], HTTPXClient], # having only one required lib means we proceed [["anyio", "aiohttp"], AIOHTTPClient], [["aiohttp"], AIOHTTPClient], @@ -1166,6 +1177,220 @@ def test_request_rejects_header_injection( with pytest.raises(ValueError): make_request("get", self.valid_url, headers, None) + @pytest.mark.parametrize( + "client_kwargs,expected_connect_timeout,expected_timeout", + [ + ({}, 30, 80), + ({"connect_timeout": 5, "timeout": 10}, 5, 10), + ({"connect_timeout": 5}, 5, 80), + ({"timeout": 10}, 30, 10), + ], + ) + def test_timeout( + self, + mocked_request_lib, + mock_response, + make_request, + client_kwargs, + expected_connect_timeout, + expected_timeout, + ): + mock_response(mocked_request_lib, '{"foo": "baz"}', 200) + make_request( + "GET", self.valid_url, {}, None, client_kwargs=client_kwargs + ) + + curl_mock = mocked_request_lib.Curl() + curl_mock.setopt.assert_any_call( + mocked_request_lib.CONNECTTIMEOUT, expected_connect_timeout + ) + curl_mock.setopt.assert_any_call( + mocked_request_lib.TIMEOUT, expected_timeout + ) + + def test_timeout_stream( + self, mocked_request_lib, mock_response, make_streamed_request + ): + mock_response(mocked_request_lib, "some streamed content", 200) + make_streamed_request( + "GET", + self.valid_url, + {}, + None, + client_kwargs={"connect_timeout": 5, "timeout": 10}, + ) + + curl_mock = mocked_request_lib.Curl() + curl_mock.setopt.assert_any_call(mocked_request_lib.CONNECTTIMEOUT, 5) + curl_mock.setopt.assert_any_call(mocked_request_lib.TIMEOUT, 10) + + def test_timeout_reapplied_after_reset( + self, mocked_request_lib, mock_response, make_client + ): + mock_response(mocked_request_lib, '{"foo": "baz"}', 200) + client = make_client(connect_timeout=5, timeout=10) + + client.request("get", self.valid_url, {}) + client.request("get", self.valid_url, {}) + + curl_mock = mocked_request_lib.Curl() + # reset() clears every option, so each request must set the + # timeouts again after its own reset() call. + relevant_calls = [ + c + for c in curl_mock.mock_calls + if c == call.reset() + or ( + c[0] == "setopt" + and c[1][0] + in ( + mocked_request_lib.CONNECTTIMEOUT, + mocked_request_lib.TIMEOUT, + ) + ) + ] + assert ( + relevant_calls + == [ + call.reset(), + call.setopt(mocked_request_lib.CONNECTTIMEOUT, 5), + call.setopt(mocked_request_lib.TIMEOUT, 10), + ] + * 2 + ) + + def test_positional_args(self, mocked_request_lib): + client = self.REQUEST_CLIENT(False, None, None, mocked_request_lib) + + assert client.pycurl is mocked_request_lib + assert client._verify_ssl_certs is False + assert client._connect_timeout == 30 + assert client._timeout == 80 + + # Timeouts are keyword-only so they can't be confused with each + # other or with the existing positional parameters. + with pytest.raises(TypeError): + self.REQUEST_CLIENT( + False, + None, + None, + mocked_request_lib, + 10, # pyright: ignore[reportGeneralTypeIssues] + ) + + @pytest.fixture + def created_curls(self, mocked_request_lib): + curls: List[Mock] = [] + + def make_curl(): + curl = Mock() + curl.getinfo.return_value = 200 + curls.append(curl) + return curl + + mocked_request_lib.Curl = Mock(side_effect=make_curl) + return curls + + @staticmethod + def setopt_values(curl, option): + return [ + c.args[1] + for c in curl.setopt.call_args_list + if c.args[0] == option + ] + + def test_uses_one_curl_handle_per_thread( + self, mocked_request_lib, created_curls + ): + client = self.REQUEST_CLIENT(proxy=self.PROXY, _lib=mocked_request_lib) + + client.request("get", self.valid_url, {}) + client.request("get", self.valid_url, {}) + assert len(created_curls) == 1 + + errors: List[BaseException] = [] + + def request_in_thread(): + try: + client.request("get", self.valid_url, {}) + except BaseException as e: + errors.append(e) + + thread = threading.Thread(target=request_in_thread) + thread.start() + thread.join(timeout=5) + + assert errors == [] + assert len(created_curls) == 2 + assert created_curls[0] is not created_curls[1] + + def test_concurrent_requests_do_not_share_curl_state( + self, mocked_request_lib + ): + client = self.REQUEST_CLIENT(proxy=self.PROXY, _lib=mocked_request_lib) + url_a = "https://api.stripe.com/v1/payouts" + url_b = "https://api.stripe.com/v1/transfers" + a_performing = threading.Event() + release_a = threading.Event() + errors: List[BaseException] = [] + + # Hold request A inside perform() until request B has fully run. If the + # threads shared a handle, B's settings would replace A's mid-request. + def block_first_perform(): + if not a_performing.is_set(): + a_performing.set() + assert release_a.wait(timeout=5) + + def request_a(): + try: + client.request( + "post", url_a, {"Authorization": "Bearer sk_test_A"}, "a=1" + ) + except BaseException as e: + errors.append(e) + + curl_a = Mock() + curl_a.getinfo.return_value = 200 + curl_a.perform.side_effect = block_first_perform + curl_b = Mock() + curl_b.getinfo.return_value = 200 + mocked_request_lib.Curl = Mock(side_effect=[curl_a, curl_b]) + + thread_a = threading.Thread(target=request_a) + thread_a.start() + assert a_performing.wait(timeout=5) + + client.request( + "post", url_b, {"Authorization": "Bearer sk_test_B"}, "b=2" + ) + release_a.set() + thread_a.join(timeout=5) + + assert errors == [] + lib = mocked_request_lib + assert self.setopt_values(curl_a, lib.URL) == [url_a] + assert self.setopt_values(curl_a, lib.POSTFIELDS) == ["a=1"] + assert self.setopt_values(curl_a, lib.HTTPHEADER) == [ + ["Authorization: Bearer sk_test_A"] + ] + assert self.setopt_values(curl_b, lib.URL) == [url_b] + assert self.setopt_values(curl_b, lib.POSTFIELDS) == ["b=2"] + assert self.setopt_values(curl_b, lib.HTTPHEADER) == [ + ["Authorization: Bearer sk_test_B"] + ] + + def test_close_closes_this_threads_curl_handle( + self, mocked_request_lib, created_curls + ): + client = self.REQUEST_CLIENT(proxy=self.PROXY, _lib=mocked_request_lib) + client.request("get", self.valid_url, {}) + + client.close() + + created_curls[0].close.assert_called_once_with() + client.request("get", self.valid_url, {}) + assert len(created_curls) == 2 + class TestPycurlClientHttpProxy(TestPycurlClient): PROXY = "http://user:withPwd@slap:8888/" @@ -1209,7 +1434,7 @@ class TestHTTPXClient(ClientTestBase): @pytest.fixture def request_mock(self, mocked_request_lib): - # Set up the httpx library mock structure + # Set up the httpx2 library mock structure async_client_instance = Mock() sync_client_instance = Mock() @@ -1281,9 +1506,8 @@ def _check_call( args = (method, url) kwargs = { "headers": headers, - "data": post_data or {}, + "content": post_data or None, "timeout": timeout, - "proxies": {"http": "http://slap/", "https": "http://slap/"}, } if is_streaming: @@ -1310,9 +1534,8 @@ def _check_call_async( args = (method, url) kwargs = { "headers": headers, - "data": post_data, + "content": post_data or None, "timeout": timeout, - "proxies": {"http": "http://slap/", "https": "http://slap/"}, } if is_streaming: @@ -1617,6 +1840,62 @@ def test_timeout_async(self): pass +class TestHTTPXClientTimeout: + @pytest.fixture(params=["httpx2", "httpx"]) + def lib(self, request): + return importlib.import_module(request.param) + + @pytest.fixture + def other_lib(self, lib): + name = "httpx" if lib.__name__ == "httpx2" else "httpx2" + return importlib.import_module(name) + + @pytest.mark.parametrize("timeout", [None, 5, 2.5, 80]) + def test_numeric_timeout_is_unchanged(self, lib, timeout): + client = HTTPXClient(timeout=timeout, _lib=lib) + + assert client._timeout == timeout + + def test_timeout_from_same_lib_is_unchanged(self, lib): + timeout = lib.Timeout(30.0, connect=5.0) + + client = HTTPXClient(timeout=timeout, _lib=lib) + + assert client._timeout is timeout + + def test_timeout_from_other_lib_is_converted(self, lib, other_lib): + timeout = other_lib.Timeout(30.0, connect=5.0, read=10.0) + + client = HTTPXClient(timeout=timeout, _lib=lib) + + assert isinstance(client._timeout, lib.Timeout) + assert client._timeout == lib.Timeout(30.0, connect=5.0, read=10.0) + + @pytest.mark.anyio + async def test_converted_timeout_is_accepted_by_request( + self, lib, other_lib + ): + seen = {} + + def handler(request): + seen.update(request.extensions["timeout"]) + return lib.Response(200, request=request, content=b"{}") + + client = HTTPXClient( + timeout=other_lib.Timeout(5.0, read=1.0), _lib=lib + ) + client._client_async = lib.AsyncClient( + transport=lib.MockTransport(handler) + ) + + _, status, _ = await client.request_async( + "get", "https://api.stripe.com/", {}, None + ) + + assert status == 200 + assert seen == {"connect": 5.0, "read": 1.0, "write": 5.0, "pool": 5.0} + + class TestAIOHTTPClient(ClientTestBase): REQUEST_CLIENT: Type[_http_client.AIOHTTPClient] = ( _http_client.AIOHTTPClient @@ -2028,7 +2307,7 @@ class TestLiveHTTPClients: @pytest.mark.anyio async def test_httpx_request_async_https(self): """ - Test to ensure that httpx https calls succeed by making a live test call + Test to ensure that httpx2 https calls succeed by making a live test call to the public stripe API. """ method = "get" diff --git a/tests/test_integration.py b/tests/test_integration.py index 9572ff127..05d3b8534 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -1,3 +1,4 @@ +import importlib import platform from threading import Thread, Lock import json @@ -5,7 +6,7 @@ import warnings import time -import httpx +import httpx2 import aiohttp import sys import stripe @@ -227,6 +228,49 @@ class MockServerRequestHandler(MyTestHandler): assert MockServerRequestHandler.num_requests == 1 + # TODO: (DEVSDK-3427) drop the httpx param in the next major version. + @pytest.fixture(params=["httpx2", "httpx"]) + def httpx_lib(self, request): + return importlib.import_module(request.param) + + def test_hits_proxy_through_httpx_client(self, httpx_lib): + class MockServerRequestHandler(MyTestHandler): + pass + + self.setup_mock_server(MockServerRequestHandler) + + client = stripe.StripeClient( + "sk_test_123", + http_client=stripe.HTTPXClient( + proxy=f"http://{MOCK_HOST}:{self.mock_server_port}", + allow_sync_methods=True, + _lib=httpx_lib, + ), + base_addresses={"api": f"http://{MOCK_HOST}:12111"}, + ) + client.balance.retrieve() + + assert MockServerRequestHandler.num_requests == 1 + + @pytest.mark.anyio + async def test_hits_proxy_through_httpx_client_async(self, httpx_lib): + class MockServerRequestHandler(MyTestHandler): + pass + + self.setup_mock_server(MockServerRequestHandler) + + client = stripe.StripeClient( + "sk_test_123", + http_client=stripe.HTTPXClient( + proxy=f"http://{MOCK_HOST}:{self.mock_server_port}", + _lib=httpx_lib, + ), + base_addresses={"api": f"http://{MOCK_HOST}:12111"}, + ) + await client.balance.retrieve_async() + + assert MockServerRequestHandler.num_requests == 1 + def test_passes_client_telemetry_when_enabled(self): class MockServerRequestHandler(MyTestHandler): def do_request(self, req_num): @@ -420,7 +464,7 @@ def do_request(self, n): expected_message = "" if isinstance(hc, stripe.HTTPXClient): - hc._timeout = httpx.Timeout(None, read=0.01) + hc._timeout = httpx2.Timeout(None, read=0.01) expected_message = "A ReadTimeout was raised" elif isinstance(hc, stripe.AIOHTTPClient): hc._timeout = aiohttp.ClientTimeout(sock_read=0.01) diff --git a/tests/test_stripe_object.py b/tests/test_stripe_object.py index aecd64938..6873b915a 100644 --- a/tests/test_stripe_object.py +++ b/tests/test_stripe_object.py @@ -8,7 +8,7 @@ import stripe from stripe._invoice import Invoice -from stripe._stripe_object import StripeObject +from stripe._stripe_object import API_KEY_SERIALIZATION_CONSTANT, StripeObject # We use this because it has a map, "restriction.currency_options" from string -> CurrencyOptions nested class. SAMPLE_PROMOTION_CODE = json.loads( @@ -274,30 +274,365 @@ def test_repr(self): assert '"date": 1511136000' in res assert '"dec": "1.23"' in res - def test_pickling(self): - obj = StripeObject("foo", "bar", myparam=5) - - obj["object"] = "boo" - obj.refresh_from( + @pytest.mark.parametrize("protocol", range(pickle.HIGHEST_PROTOCOL + 1)) + @pytest.mark.parametrize( + "destination_key", [None, "destination-key-sentinel"] + ) + def test_pickling(self, protocol, destination_key, monkeypatch): + obj = stripe.Customer.construct_from( { - "fala": "lalala", - # ensures that empty strings are correctly unpickled in Py3 - "emptystring": "", + "id": "resource", + "object": "customer", + "description": "example", + "metadata": {"emptystring": ""}, }, - api_key="bar", - partial=True, + "producer-key-sentinel", + stripe_version="2017-08-15", + stripe_account="example-account", + ) + obj.metadata.api_key = "nested-key-sentinel" + nested = stripe.Customer.construct_from( + {"id": "nested-resource", "object": "customer"}, + "nested-key-sentinel", + stripe_version="2018-02-28", + stripe_account="nested-example-account", + ) + obj.containers = [{"nested": nested}] + original_requestor = obj._requestor + payload = obj.to_dict() + + for value in (obj.metadata, obj): + assert value.__reduce__()[1][1] == API_KEY_SERIALIZATION_CONSTANT + pickled = pickle.dumps(value, protocol=protocol) + assert b"producer-key-sentinel" not in pickled + assert b"nested-key-sentinel" not in pickled + + monkeypatch.setattr(stripe, "api_key", destination_key) + restored = pickle.loads(pickled) + + assert type(restored) is stripe.Customer + assert restored.to_dict() == payload + for value in (restored, restored.metadata): + assert value.api_key == API_KEY_SERIALIZATION_CONSTANT + assert value.stripe_version == "2017-08-15" + assert value.stripe_account == "example-account" + assert obj.api_key == "producer-key-sentinel" + assert obj.metadata.api_key == "nested-key-sentinel" + assert obj._requestor is original_requestor + assert obj.to_dict() == payload + + restored_nested = restored.containers[0]["nested"] + assert restored_nested.api_key == API_KEY_SERIALIZATION_CONSTANT + assert restored_nested.stripe_account == "nested-example-account" + assert restored_nested.stripe_version == "2018-02-28" + + restored.reattach_api_key("reattached-key-sentinel") + for value in (restored, restored.metadata, restored_nested): + assert value.api_key == "reattached-key-sentinel" + assert restored_nested.stripe_account == "nested-example-account" + assert restored_nested.stripe_version == "2018-02-28" + assert stripe.api_key == destination_key + + pickled = pickle.dumps(restored, protocol=protocol) + for key in ( + b"producer-key-sentinel", + b"nested-key-sentinel", + b"destination-key-sentinel", + b"reattached-key-sentinel", + ): + assert key not in pickled + + def test_pickling_verified_webhook(self, monkeypatch): + payload = json.dumps( + { + "object": "event", + "data": { + "object": {"object": "customer", "metadata": {"empty": ""}} + }, + } ) + monkeypatch.setattr(stripe, "api_key", "producer-key-sentinel") + signature = stripe.WebhookSignature.generate_signature_header( + payload, "webhook-test-secret" + ) + event = stripe.Webhook.construct_event( + payload, signature, "webhook-test-secret" + ) + pickled = pickle.dumps(event) + assert b"producer-key-sentinel" not in pickled + monkeypatch.setattr(stripe, "api_key", "destination-key-sentinel") + restored = pickle.loads(pickled) + + assert type(restored) is stripe.Event + assert type(restored.data.object) is stripe.Customer + assert restored.to_dict() == event.to_dict() + for value in ( + restored, + restored.data, + restored.data.object, + restored.data.object.metadata, + ): + assert value.api_key == API_KEY_SERIALIZATION_CONSTANT + assert event.api_key == "producer-key-sentinel" - assert obj.fala == "lalala" + @pytest.fixture + def restored_customer(self, monkeypatch): + obj = stripe.Customer.construct_from( + {"id": "resource", "object": "customer"}, + "producer-key-sentinel", + stripe_account="example-account", + ) + monkeypatch.setattr(stripe, "api_key", None) + return pickle.loads(pickle.dumps(obj)) + + @pytest.mark.parametrize("global_key", [None, "global-key-sentinel"]) + @pytest.mark.parametrize("per_call_key", [None, "per-call-key-sentinel"]) + def test_restored_delete_requires_reattachment( + self, + http_client_mock, + restored_customer, + monkeypatch, + global_key, + per_call_key, + ): + monkeypatch.setattr(stripe, "api_key", global_key) + with pytest.raises( + stripe.AuthenticationError, match="reattach_api_key" + ): + restored_customer.delete(api_key=per_call_key) + http_client_mock.assert_no_request() + + def test_reattach_api_key(self, http_client_mock, restored_customer): + restored_customer.reattach_api_key("worker-key-sentinel") + http_client_mock.stub_request( + "get", + path="/v1/customers/resource", + rbody='{"id": "resource", "object": "customer"}', + ) + restored_customer.refresh() + http_client_mock.assert_requested( + "get", + path="/v1/customers/resource", + api_key="worker-key-sentinel", + stripe_account="example-account", + ) + assert ( + pickle.loads(pickle.dumps(restored_customer)).api_key + == API_KEY_SERIALIZATION_CONSTANT + ) - pickled = pickle.dumps(obj) - newobj = pickle.loads(pickled) + @pytest.mark.parametrize( + "key", [None, "", " ", 123, API_KEY_SERIALIZATION_CONSTANT] + ) + def test_reattach_api_key_rejects_invalid_keys( + self, restored_customer, key + ): + with pytest.raises(ValueError, match="api_key"): + restored_customer.reattach_api_key(key) + assert restored_customer.api_key == API_KEY_SERIALIZATION_CONSTANT + + def test_reattach_api_key_rejects_attached_objects( + self, restored_customer + ): + with pytest.raises(ValueError, match="only be reattached"): + stripe.Customer("cus_123").reattach_api_key("key") + restored_customer.reattach_api_key("key") + with pytest.raises(ValueError, match="only be reattached"): + restored_customer.reattach_api_key("other-key") + assert restored_customer.api_key == "key" + + def test_reattach_api_key_handles_cycles_and_attached_children( + self, restored_customer + ): + attached = StripeObject(api_key="child-key") + restored_customer._data["nested"] = [ + restored_customer, + {"attached": attached}, + ] + restored_customer.reattach_api_key("key") + assert restored_customer.api_key == "key" + assert attached.api_key == "child-key" + + @pytest.mark.parametrize("copy_method", [copy, deepcopy]) + def test_copy_detached_object( + self, restored_customer, monkeypatch, copy_method + ): + monkeypatch.setattr(stripe, "api_key", "global-key") + copied = copy_method(restored_customer) + assert copied.api_key == API_KEY_SERIALIZATION_CONSTANT + assert copied.stripe_account == "example-account" + with pytest.raises( + stripe.AuthenticationError, match="reattach_api_key" + ): + copied._request( + "get", "/v1/customers/resource", base_address="api" + ) + + @pytest.mark.parametrize("method", ["_request", "_request_stream"]) + @pytest.mark.parametrize("per_call_key", [None, "per-call-key-sentinel"]) + def test_detached_request_guard( + self, restored_customer, method, http_client_mock, per_call_key + ): + with pytest.raises( + stripe.AuthenticationError, match="reattach_api_key" + ): + getattr(restored_customer, method)( + "get", + "/v1/customers/resource", + params={"api_key": per_call_key}, + ) + http_client_mock.assert_no_request() - assert newobj.id == "foo" - assert newobj.api_key == "bar" - assert newobj["object"] == "boo" - assert newobj.fala == "lalala" - assert newobj.emptystring == "" + @pytest.mark.anyio + @pytest.mark.parametrize( + "method", ["_request_async", "_request_stream_async"] + ) + @pytest.mark.parametrize("per_call_key", [None, "per-call-key-sentinel"]) + async def test_detached_async_request_guard( + self, restored_customer, method, http_client_mock, per_call_key + ): + with pytest.raises( + stripe.AuthenticationError, match="reattach_api_key" + ): + await getattr(restored_customer, method)( + "get", + "/v1/customers/resource", + params={"api_key": per_call_key}, + ) + http_client_mock.assert_no_request() + + def test_detached_option_setters_require_reattachment( + self, restored_customer + ): + with pytest.raises( + stripe.AuthenticationError, match="reattach_api_key" + ): + restored_customer.api_key = "key" + with pytest.raises( + stripe.AuthenticationError, match="reattach_api_key" + ): + restored_customer.refresh_from({}, api_key="key") + + def test_restored_refresh_uses_reattached_api_key( + self, http_client_mock, restored_customer + ): + restored_customer.reattach_api_key("worker-key-sentinel") + http_client_mock.stub_request( + "get", + path="/v1/customers/resource", + rbody='{"id": "resource", "object": "customer", "description": "refreshed"}', + ) + + assert restored_customer.refresh() is restored_customer + + http_client_mock.assert_requested( + "get", + path="/v1/customers/resource", + api_key="worker-key-sentinel", + stripe_account="example-account", + ) + assert restored_customer.description == "refreshed" + assert stripe.api_key is None + assert b"worker-key-sentinel" not in pickle.dumps(restored_customer) + + @pytest.mark.anyio + async def test_restored_refresh_async_uses_reattached_api_key( + self, http_client_mock, restored_customer + ): + restored_customer.reattach_api_key("worker-key-sentinel") + http_client_mock.stub_request( + "get", + path="/v1/customers/resource", + rbody='{"id": "resource", "object": "customer"}', + ) + + await restored_customer.refresh_async() + + http_client_mock.assert_requested( + "get", + path="/v1/customers/resource", + api_key="worker-key-sentinel", + stripe_account="example-account", + ) + + def test_refresh_preserves_retrieve_params(self, http_client_mock): + obj = stripe.Customer( + "resource", "producer-key-sentinel", expand=["sources"] + ) + http_client_mock.stub_request( + "get", + path="/v1/customers/resource", + query_string="expand[0]=sources", + rbody='{"id": "resource", "object": "customer"}', + ) + + obj.refresh() + + http_client_mock.assert_requested( + "get", + path="/v1/customers/resource", + query_string="expand[0]=sources", + api_key="producer-key-sentinel", + ) + + def test_restored_save_uses_reattached_api_key( + self, http_client_mock, restored_customer + ): + restored_customer.reattach_api_key("worker-key-sentinel") + restored_customer.description = "changed" + http_client_mock.stub_request( + "post", + path="/v1/customers/resource", + rbody='{"id": "resource", "object": "customer", "description": "changed"}', + ) + + restored_customer.save() + + http_client_mock.assert_requested( + "post", + path="/v1/customers/resource", + api_key="worker-key-sentinel", + stripe_account="example-account", + ) + + def test_save_keeps_positional_idempotency_key( + self, http_client_mock, restored_customer + ): + restored_customer.reattach_api_key("worker-key-sentinel") + restored_customer.description = "changed" + http_client_mock.stub_request( + "post", + path="/v1/customers/resource", + rbody='{"id": "resource", "object": "customer", "description": "changed"}', + ) + + restored_customer.save("idempotency-sentinel") + + http_client_mock.assert_requested( + "post", + path="/v1/customers/resource", + api_key="worker-key-sentinel", + idempotency_key="idempotency-sentinel", + ) + + def test_restored_delete_uses_reattached_api_key( + self, http_client_mock, restored_customer + ): + restored_customer.reattach_api_key("worker-key-sentinel") + http_client_mock.stub_request( + "delete", + path="/v1/customers/resource", + rbody='{"id": "resource", "object": "customer", "deleted": true}', + ) + + restored_customer.delete(api_key="worker-key-sentinel") + + http_client_mock.assert_requested( + "delete", + path="/v1/customers/resource", + api_key="worker-key-sentinel", + stripe_account="example-account", + ) def test_deletion(self): obj = StripeObject("id", "key") diff --git a/tests/test_v2_event.py b/tests/test_v2_event.py index 8c6359acc..797ac01cf 100644 --- a/tests/test_v2_event.py +++ b/tests/test_v2_event.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- # File copied from our code generator; changes here will be overwritten. import json +import pickle +import stripe from typing import Any, Callable, Dict, Optional, Union from typing_extensions import assert_type @@ -41,6 +43,32 @@ class TestV2Event(object): + def test_pickled_event_requires_reattachment( + self, http_client_mock, v2_payload_no_data + ): + event = V1BillingMeterErrorReportTriggeredEvent.construct_from( + json.loads(v2_payload_no_data), "producer-key-sentinel" + ) + restored = pickle.loads(pickle.dumps(event)) + with pytest.raises( + stripe.AuthenticationError, match="reattach_api_key" + ): + restored.fetch_related_object() + http_client_mock.assert_no_request() + restored.reattach_api_key("worker-key-sentinel") + http_client_mock.stub_request( + "get", + path="/v1/billing/meters/mtr_123", + rbody='{"id": "mtr_123", "object": "billing.meter"}', + ) + restored.fetch_related_object() + http_client_mock.assert_requested( + "get", + path="/v1/billing/meters/mtr_123", + api_key="worker-key-sentinel", + stripe_context="acct_123", + ) + @pytest.fixture(scope="function") def v2_payload_no_data(self): return json.dumps(