diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f59e56c82..0d22d0a82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -109,11 +109,17 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false + - name: Read OpenAPI version + id: openapi + shell: bash + run: echo "version=$(< OPENAPI_VERSION)" >> "$GITHUB_OUTPUT" - name: Set up Python ${{ matrix.python_version }} uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python_version }} - uses: stripe/openapi/actions/stripe-mock@master + with: + openapi_version: ${{ steps.openapi.outputs.version }} - name: "run tests" run: just test diff --git a/.hark/changes/2026-09-30_stripe-openapi_217ec12b.change.md b/.hark/changes/2026-09-30_stripe-openapi_217ec12b.change.md new file mode 100644 index 000000000..f1f7818f5 --- /dev/null +++ b/.hark/changes/2026-09-30_stripe-openapi_217ec12b.change.md @@ -0,0 +1,80 @@ +--- +title: Update generated code +pr_url: https://github.com/stripe/stripe-python/pull/1925 +semver_level: major +is_stripe_api_change: true +--- + +* Add support for new resources `v2.data.QueryRun`, `v2.data.ReportRun`, `v2.data.Report`, `v2.data.Schema`, `v2.money_management.EarnedCreditSimulation`, `v2.money_management.EarnedCredit`, and `v2.provisioning.ResourceAccessConfiguration` +* Add support for `earned_credits` method on resource `v2.money_management.EarnedCreditSimulation` +* Add support for `list` and `retrieve` methods on resources `v2.data.Report`, `v2.data.Schema`, and `v2.money_management.EarnedCredit` +* Add support for `create` and `retrieve` methods on resources `v2.data.QueryRun` and `v2.data.ReportRun` +* Add support for `reveal_access_configuration` method on resource `v2.provisioning.Resource` +* Add support for `refresh_regulatory_receipt` method on resource `v2.money_management.Transaction` +* Add support for `capital_financing_manual_payment` on `AccountSessionCreateParamsComponent` +* ⚠️ Remove support for `authorized_content_security_policy`, `authorized_endpoints`, `authorized_permissions`, and `state` on `Apps.Install` +* ⚠️ Change type of `Apps.Install.channel` from `string` to `enum` +* Change type of `Apps.Install.content_security_policy_granted` from `nullable(AppServiceResourceInstallContentSecurityPolicy)` to `AppServiceResourceInstallContentSecurityPolicy` +* Change type of `Apps.Install.endpoints_granted` from `nullable(array(string))` to `array(string)` +* Change type of `Apps.Install.permissions_granted` from `nullable(array(string))` to `array(string)` +* Change type of `Apps.Install.status` from `nullable(enum)` to `enum` +* Add support for `financing_documents` on `Capital.FinancingOffer` +* Add support for `enabled_payment_types` and `overdue_amount` on `Capital.FinancingSummary.Detail` +* Add support for `card_account_update` on `Charge.PaymentMethodDetail.Card` +* Add support for `on_behalf_of` on `checkout.SessionCreateParams` +* Add support for `billing_cycle_anchor` on `Checkout.Session.Item.Subscription.TrialSetting.EndBehavior`, `PaymentLink.SubscriptionDatum.TrialSetting.EndBehavior`, `PaymentLinkCreateParamsSubscriptionDatumTrialSettingEndBehavior`, `PaymentLinkModifyParamsSubscriptionDatumTrialSettingEndBehavior`, `checkout.SessionCreateParamsItemSubscriptionTrialSettingEndBehavior`, and `checkout.SessionCreateParamsSubscriptionDatumTrialSettingEndBehavior` +* Add support for `payment_method_preselect` on `Checkout.Session.SavedPaymentMethodOption` and `checkout.SessionCreateParamsSavedPaymentMethodOption` +* Add support for `es` on `CustomerCreateCustomerTaxExemptionParams` and `CustomerTaxExemption` +* ⚠️ Remove support for `financial_activity` on `FinancialConnections.Transaction.Classification` +* Add support for `enablement_details` on `Invoice.AutomaticTax` and `QuotePreviewInvoice.AutomaticTax` +* Add support for new value `squads` on enums `Issuing.Card.CryptoWallet.type` and `issuing.CardCreateParamsCryptoWallet.type` +* Add support for new value `rerouted` on enums `PaymentAttemptRecordReportCanceledParams.reason`, `PaymentRecordReportPaymentAttemptCanceledParams.reason`, `PaymentRecordReportPaymentAttemptParamsCanceled.reason`, and `PaymentRecordReportPaymentParamsCanceled.reason` +* Add support for `return_code` on `PaymentAttemptRecord.PaymentMethodDetail.UsBankAccount` and `PaymentRecord.PaymentMethodDetail.UsBankAccount` +* Add support for `request_card_account_update` on `PaymentIntent.PaymentMethodOption.Card`, `PaymentIntentConfirmParamsPaymentMethodOptionCard`, `PaymentIntentCreateParamsPaymentMethodOptionCard`, and `PaymentIntentModifyParamsPaymentMethodOptionCard` +* ⚠️ Remove support for `name` on `ProductCatalog.TrialOffer` +* ⚠️ Change type of `Radar.PaymentEvaluation.Signal.EarlyFraudWarning.score` and `Radar.PaymentEvaluation.Signal.FraudulentDispute.score` from `number` to `nullable(number)` +* Add support for `status` on `Tax.Form` and `tax.FormListParams` +* Add support for `card_not_present_transactions`, `gross_amount_of_transactions_decimal`, `monthly_volumes`, `payment_transactions_count`, and `state_income_tax_withheld` on `Tax.Form.Us1099K` +* Add support for `cash_tips`, `currency`, and `federal_income_tax_withheld` on `Tax.Form.Us1099K`, `Tax.Form.Us1099Misc`, and `Tax.Form.Us1099Nec` +* Add support for `crop_insurance_proceeds`, `direct_sales_for_resale`, `excess_golden_parachute_payments`, `fatca_filing_required`, `fish_purchased_for_resale`, `fishing_boat_proceeds`, `gross_proceeds_paid_to_an_attorney`, `medical_and_health_care_payments`, `nonqualified_deferred_compensation`, `other_income`, `rents`, `royalties`, `section_409a_deferrals`, and `substitute_payments` on `Tax.Form.Us1099Misc` +* Add support for `overtime_compensation`, `state_income`, and `state_tax_withheld` on `Tax.Form.Us1099Misc` and `Tax.Form.Us1099Nec` +* Add support for `direct_sales_indicator`, `fatca_filing_requirement`, and `nonemployee_compensation` on `Tax.Form.Us1099Nec` +* ⚠️ Remove support for `tamper_state` on `terminal.ReaderListParams` +* ⚠️ Remove support for `configurations` on `V2.Core.AccountLink.UseCase.RecipientOnboarding`, `V2.Core.AccountLink.UseCase.RecipientUpdate`, `v2.core.AccountLinkCreateParamsUseCaseRecipientOnboarding`, and `v2.core.AccountLinkCreateParamsUseCaseRecipientUpdate` +* ⚠️ Add support for new value `rejected` on enums `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.Celtic.ChargeCard.status`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.Celtic.SpendCard.status`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.CrossRiverBank.ChargeCard.status`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.CrossRiverBank.PrepaidCard.status`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.CrossRiverBank.SpendCard.status`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.FifthThird.ChargeCard.status`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.Lead.PrepaidCard.status`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.Stripe.ChargeCard.status`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.Stripe.PrepaidCard.status`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.Stripe.SpendCard.status`, `V2.Core.Account.Configuration.CardCreator.Capability.Consumer.Celtic.RevolvingCreditCard.status`, `V2.Core.Account.Configuration.CardCreator.Capability.Consumer.CrossRiverBank.PrepaidCard.status`, `V2.Core.Account.Configuration.CardCreator.Capability.Consumer.Lead.DebitCard.status`, `V2.Core.Account.Configuration.CardCreator.Capability.Consumer.Lead.PrepaidCard.status`, `V2.Core.Account.Configuration.Developer.Capability.Project.status`, `V2.Core.Account.Configuration.Merchant.Capability.BlikRecurringPayment.status`, `V2.Core.Account.Configuration.MoneyManager.Capability.BusinessStorage.Inbound.Usdc.status`, `V2.Core.Account.Configuration.MoneyManager.Capability.BusinessStorage.Outbound.Usdc.status`, `V2.Core.Account.Configuration.MoneyManager.Capability.ConsumerStorage.Inbound.Usd.status`, `V2.Core.Account.Configuration.MoneyManager.Capability.ConsumerStorage.Inbound.Usdc.status`, `V2.Core.Account.Configuration.MoneyManager.Capability.ConsumerStorage.Outbound.Usd.status`, `V2.Core.Account.Configuration.MoneyManager.Capability.ConsumerStorage.Outbound.Usdc.status`, `V2.Core.Account.Configuration.MoneyManager.Capability.OutboundPayment.CryptoWallet.status`, `V2.Core.Account.Configuration.MoneyManager.Capability.OutboundPayment.PaperCheck.status`, `V2.Core.Account.Configuration.MoneyManager.Capability.OutboundTransfer.CryptoWallet.status`, `V2.Core.Account.Configuration.MoneyManager.Capability.ReceivedCredit.CryptoWallet.status`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Ach.status`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Bec.status`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Eft.status`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Fedwire.status`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Fp.status`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Instant.status`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Npp.status`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Rtp.status`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.SepaCredit.status`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.SepaInstant.status`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Swift.status`, `V2.Core.Account.Configuration.Recipient.Capability.CryptoWallet.status`, and `V2.Core.Account.Configuration.Recipient.Capability.PaperCheck.status` +* ⚠️ Add support for new values `rejected_fraud`, `rejected_incomplete_verification`, `rejected_listed`, `rejected_other`, `rejected_platform_fraud`, `rejected_platform_other`, `rejected_platform_terms_of_service`, and `rejected_terms_of_service` on enums `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.Celtic.ChargeCard.StatusDetail.code`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.Celtic.SpendCard.StatusDetail.code`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.CrossRiverBank.ChargeCard.StatusDetail.code`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.CrossRiverBank.PrepaidCard.StatusDetail.code`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.CrossRiverBank.SpendCard.StatusDetail.code`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.FifthThird.ChargeCard.StatusDetail.code`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.Lead.PrepaidCard.StatusDetail.code`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.Stripe.ChargeCard.StatusDetail.code`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.Stripe.PrepaidCard.StatusDetail.code`, `V2.Core.Account.Configuration.CardCreator.Capability.Commercial.Stripe.SpendCard.StatusDetail.code`, `V2.Core.Account.Configuration.CardCreator.Capability.Consumer.Celtic.RevolvingCreditCard.StatusDetail.code`, `V2.Core.Account.Configuration.CardCreator.Capability.Consumer.CrossRiverBank.PrepaidCard.StatusDetail.code`, `V2.Core.Account.Configuration.CardCreator.Capability.Consumer.Lead.DebitCard.StatusDetail.code`, `V2.Core.Account.Configuration.CardCreator.Capability.Consumer.Lead.PrepaidCard.StatusDetail.code`, `V2.Core.Account.Configuration.Developer.Capability.Project.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.BlikRecurringPayment.StatusDetail.code`, `V2.Core.Account.Configuration.MoneyManager.Capability.BusinessStorage.Inbound.Usdc.StatusDetail.code`, `V2.Core.Account.Configuration.MoneyManager.Capability.BusinessStorage.Outbound.Usdc.StatusDetail.code`, `V2.Core.Account.Configuration.MoneyManager.Capability.ConsumerStorage.Inbound.Usd.StatusDetail.code`, `V2.Core.Account.Configuration.MoneyManager.Capability.ConsumerStorage.Inbound.Usdc.StatusDetail.code`, `V2.Core.Account.Configuration.MoneyManager.Capability.ConsumerStorage.Outbound.Usd.StatusDetail.code`, `V2.Core.Account.Configuration.MoneyManager.Capability.ConsumerStorage.Outbound.Usdc.StatusDetail.code`, `V2.Core.Account.Configuration.MoneyManager.Capability.OutboundPayment.CryptoWallet.StatusDetail.code`, `V2.Core.Account.Configuration.MoneyManager.Capability.OutboundPayment.PaperCheck.StatusDetail.code`, `V2.Core.Account.Configuration.MoneyManager.Capability.OutboundTransfer.CryptoWallet.StatusDetail.code`, `V2.Core.Account.Configuration.MoneyManager.Capability.ReceivedCredit.CryptoWallet.StatusDetail.code`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Ach.StatusDetail.code`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Bec.StatusDetail.code`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Eft.StatusDetail.code`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Fedwire.StatusDetail.code`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Fp.StatusDetail.code`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Instant.StatusDetail.code`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Npp.StatusDetail.code`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Rtp.StatusDetail.code`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.SepaCredit.StatusDetail.code`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.SepaInstant.StatusDetail.code`, `V2.Core.Account.Configuration.Recipient.Capability.BankAccount.Swift.StatusDetail.code`, `V2.Core.Account.Configuration.Recipient.Capability.CryptoWallet.StatusDetail.code`, and `V2.Core.Account.Configuration.Recipient.Capability.PaperCheck.StatusDetail.code` +* Add support for `ousd` on `V2.Core.Account.Configuration.MoneyManager.Capability.BusinessStorage.Inbound`, `V2.Core.Account.Configuration.MoneyManager.Capability.BusinessStorage.Outbound`, `v2.core.AccountCreateParamsConfigurationMoneyManagerCapabilityBusinessStorageInbound`, `v2.core.AccountCreateParamsConfigurationMoneyManagerCapabilityBusinessStorageOutbound`, `v2.core.AccountModifyParamsConfigurationMoneyManagerCapabilityBusinessStorageInbound`, and `v2.core.AccountModifyParamsConfigurationMoneyManagerCapabilityBusinessStorageOutbound` +* Add support for `origin` on `V2.Core.Vault.NetworkToken` +* Add support for new values `account_security`, `authentication`, `issuing`, `payout`, `scim`, `sso`, and `user_profile` on enum `V2.Iam.ActivityLog.Detail.type` +* Add support for `bic` on `V2.MoneyManagement.FinancialAddress.BankAccount.Aba`, `V2.MoneyManagement.FinancialAddress.BankAccount.Cpa`, `V2.MoneyManagement.FinancialAddress.BankAccount.Iban`, and `V2.MoneyManagement.FinancialAddress.BankAccount.SortCode` +* Add support for `iban` on `V2.MoneyManagement.FinancialAddress.BankAccount.SortCode` +* Add support for `statement_descriptor` on `V2.MoneyManagement.InboundTransfer` and `v2.money_management.InboundTransferCreateParams` +* Add support for `network_fee_details` on `V2.MoneyManagement.PayoutIntent.EstimatedFee` +* Add support for new value `network_fee` on enum `V2.MoneyManagement.PayoutIntent.EstimatedFee.type` +* ⚠️ Remove support for `archived` on `V2.MoneyManagement.PayoutMethod.CryptoWallet` +* Add support for new value `swift` on enums `V2.MoneyManagement.ReceivedCredit.BankTransfer.CaBankAccount.network` and `V2.MoneyManagement.ReceivedCredit.BankTransfer.OriginatingBankAccount.Cpa.network` +* Add support for new value `swift` on enums `V2.MoneyManagement.ReceivedCredit.BankTransfer.GbBankAccount.network` and `V2.MoneyManagement.ReceivedCredit.BankTransfer.OriginatingBankAccount.SortCode.network` +* Add support for new value `swift` on enums `V2.MoneyManagement.ReceivedCredit.BankTransfer.OriginatingBankAccount.Aba.network` and `V2.MoneyManagement.ReceivedCredit.BankTransfer.UsBankAccount.network` +* Add support for new value `swift` on enums `V2.MoneyManagement.ReceivedCredit.BankTransfer.OriginatingBankAccount.Iban.network` and `V2.MoneyManagement.ReceivedCredit.BankTransfer.SepaBankAccount.network` +* Add support for `network_details` on `V2.MoneyManagement.ReceivedDebit.BankTransfer` +* Add support for new value `earned_credit` on enums `V2.MoneyManagement.Transaction.category` and `V2.MoneyManagement.TransactionEntry.TransactionDetail.category` +* Add support for `earned_credit` on `V2.MoneyManagement.Transaction.Flow` and `V2.MoneyManagement.TransactionEntry.TransactionDetail.Flow` +* Add support for new value `earned_credit` on enums `V2.MoneyManagement.Transaction.Flow.type` and `V2.MoneyManagement.TransactionEntry.TransactionDetail.Flow.type` +* Add support for `regulatory_receipt` on `V2.MoneyManagement.Transaction` +* ⚠️ Remove support for `retry_until` on `V2.Payments.OffSessionPayment.RetryDetail` +* ⚠️ Remove support for `cvc` on `v2.payments.OffSessionPaymentCreateParamsPaymentMethodDatumCard` +* Add support for `from_resource` on `v2.money_management.OutboundSetupIntentCreateParams` +* Add support for new value `storage.deposit_insurance_eligibility` on enums `v2.money_management.FinancialAccountListParams.include` and `v2.money_management.FinancialAccountRetrieveParams.include` +* Add support for new values `account_security`, `authentication`, `issuing`, `payout`, `scim`, `sso`, and `user_profile` on enum `v2.iam.ActivityLogListParams.action_groups` +* Change type of `v2.core.vault.NetworkTokenCreateFromCredentialParamsCard.origin` and `v2.core.vault.NetworkTokenCreateParamsCard.origin` from `literal('card_on_file')` to `enum('card_on_file'|'wallet')` +* Change type of `v2.core.vault.NetworkTokenCreateFromCredentialParams.type` and `v2.core.vault.NetworkTokenCreateParams.type` from `literal('card')` to `enum('card')` +* Change type of `v2.core.vault.NetworkTokenGenerateCryptogramParams.type` from `literal('token_cryptogram')` to `enum('token_cryptogram')` +* ⚠️ Change type of `v2.billing.ContractCreateParamsPricingLinePricingPriceDetailPricingOverrideOverwritePrice.unit_amount`, `v2.billing.ContractModifyParamsPricingLineActionAddPricingPriceDetailPricingOverrideOverwritePrice.unit_amount`, and `v2.billing.ContractModifyParamsPricingLineActionUpdatePricingPriceDetailPricingOverrideActionAddOverwritePrice.unit_amount` from `string` to `decimal_string` +* ⚠️ Change type of `v2.billing.ContractCreateParamsPricingOverrideMultiplyPricing.factor` from `string` to `decimal_string` +* Add support for `billing_settings` on `v2.billing.ContractModifyParams` +* Add support for new values `business_storage.inbound.ousd` and `business_storage.outbound.ousd` on enum `EventsV2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent.updated_capability` +* ⚠️ Remove support for `account`, `evaluated_at`, `fraudulent_merchant`, and `type` on `EventsV2SignalsAccountSignalFraudulentMerchantReadyEvent` +* Add support for event notifications `V2DataQueryRunCreatedEvent`, `V2DataQueryRunFailedEvent`, `V2DataQueryRunSucceededEvent`, and `V2DataQueryRunUpdatedEvent` with related object `v2.data.QueryRun` +* Add support for event notifications `V2DataReportRunCreatedEvent`, `V2DataReportRunFailedEvent`, `V2DataReportRunSucceededEvent`, and `V2DataReportRunUpdatedEvent` with related object `v2.data.ReportRun` +* Add support for event notification `V2MoneyManagementEarnedCreditSucceededEvent` with related object `v2.money_management.EarnedCredit` +* Add support for error code `contract_test_clock_advancing` on `CannotProceedError` diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 26c32de53..316bdd23b 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -2d13381d5dfd98ca6daaddeefc23711d41c7170a \ No newline at end of file +adad04916772f880317eac10d8c026b401863f1d \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index da9b3a5de..bfaa37da3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2516 \ No newline at end of file +v2526 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 115646855..4673ff133 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ reportUnnecessaryComparison = true reportUnnecessaryContains = true reportUnnecessaryIsInstance = true reportPrivateImportUsage = true -reportUnnecessaryTypeIgnoreComment = false +reportUnnecessaryTypeIgnoreComment = true [tool.mypy] follow_imports = "silent" diff --git a/stripe/__init__.py b/stripe/__init__.py index 9a853a581..2d4c5fc72 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -175,6 +175,7 @@ def add_beta_version( tax as tax, terminal as terminal, test_helpers as test_helpers, + three_d_secure as three_d_secure, treasury as treasury, v2 as v2, ) @@ -354,7 +355,6 @@ def add_beta_version( CannotProceedError as CannotProceedError, CardError as CardError, ControlledByAlternateResourceError as ControlledByAlternateResourceError, - ControlledByDashboardError as ControlledByDashboardError, FeatureNotEnabledError as FeatureNotEnabledError, FinancialAccountNotOpenError as FinancialAccountNotOpenError, FxQuoteExpiredError as FxQuoteExpiredError, @@ -364,6 +364,7 @@ def add_beta_version( InvalidPaymentMethodError as InvalidPaymentMethodError, InvalidPayoutMethodError as InvalidPayoutMethodError, InvalidRequestError as InvalidRequestError, + InvalidVaultedCredentialError as InvalidVaultedCredentialError, MerchantNotGatedError as MerchantNotGatedError, NonZeroBalanceError as NonZeroBalanceError, NotCancelableError as NotCancelableError, @@ -376,6 +377,9 @@ def add_beta_version( StripeError as StripeError, StripeErrorWithParamCode as StripeErrorWithParamCode, TemporarySessionExpiredError as TemporarySessionExpiredError, + VerificationAttemptFailedError as VerificationAttemptFailedError, + VerificationExpiredError as VerificationExpiredError, + VerificationNotInitiatedError as VerificationNotInitiatedError, ) from stripe._error_object import ( ErrorObject as ErrorObject, @@ -585,7 +589,6 @@ def add_beta_version( from stripe._reserve_transaction import ( ReserveTransaction as ReserveTransaction, ) - from stripe._reversal import Reversal as Reversal from stripe._review import Review as Review from stripe._review_service import ReviewService as ReviewService from stripe._risk_signals import RiskSignals as RiskSignals @@ -667,11 +670,15 @@ def add_beta_version( from stripe._test_helpers_service import ( TestHelpersService as TestHelpersService, ) + from stripe._three_d_secure_service import ( + ThreeDSecureService as ThreeDSecureService, + ) from stripe._token import Token as Token from stripe._token_service import TokenService as TokenService from stripe._topup import Topup as Topup from stripe._topup_service import TopupService as TopupService from stripe._transfer import Transfer as Transfer + from stripe._transfer_reversal import TransferReversal as TransferReversal from stripe._transfer_reversal_service import ( TransferReversalService as TransferReversalService, ) @@ -725,6 +732,7 @@ def add_beta_version( "tax": ("stripe.tax", True), "terminal": ("stripe.terminal", True), "test_helpers": ("stripe.test_helpers", True), + "three_d_secure": ("stripe.three_d_secure", True), "treasury": ("stripe.treasury", True), "v2": ("stripe.v2", True), "Account": ("stripe._account", False), @@ -863,7 +871,6 @@ def add_beta_version( "CannotProceedError": ("stripe._error", False), "CardError": ("stripe._error", False), "ControlledByAlternateResourceError": ("stripe._error", False), - "ControlledByDashboardError": ("stripe._error", False), "FeatureNotEnabledError": ("stripe._error", False), "FinancialAccountNotOpenError": ("stripe._error", False), "FxQuoteExpiredError": ("stripe._error", False), @@ -873,6 +880,7 @@ def add_beta_version( "InvalidPaymentMethodError": ("stripe._error", False), "InvalidPayoutMethodError": ("stripe._error", False), "InvalidRequestError": ("stripe._error", False), + "InvalidVaultedCredentialError": ("stripe._error", False), "MerchantNotGatedError": ("stripe._error", False), "NonZeroBalanceError": ("stripe._error", False), "NotCancelableError": ("stripe._error", False), @@ -885,6 +893,9 @@ def add_beta_version( "StripeError": ("stripe._error", False), "StripeErrorWithParamCode": ("stripe._error", False), "TemporarySessionExpiredError": ("stripe._error", False), + "VerificationAttemptFailedError": ("stripe._error", False), + "VerificationExpiredError": ("stripe._error", False), + "VerificationNotInitiatedError": ("stripe._error", False), "ErrorObject": ("stripe._error_object", False), "OAuthErrorObject": ("stripe._error_object", False), "Event": ("stripe._event", False), @@ -1064,7 +1075,6 @@ def add_beta_version( "RequestorOptions": ("stripe._requestor_options", False), "ReserveService": ("stripe._reserve_service", False), "ReserveTransaction": ("stripe._reserve_transaction", False), - "Reversal": ("stripe._reversal", False), "Review": ("stripe._review", False), "ReviewService": ("stripe._review_service", False), "RiskSignals": ("stripe._risk_signals", False), @@ -1116,11 +1126,13 @@ def add_beta_version( "TerminalService": ("stripe._terminal_service", False), "APIResourceTestHelpers": ("stripe._test_helpers", False), "TestHelpersService": ("stripe._test_helpers_service", False), + "ThreeDSecureService": ("stripe._three_d_secure_service", False), "Token": ("stripe._token", False), "TokenService": ("stripe._token_service", False), "Topup": ("stripe._topup", False), "TopupService": ("stripe._topup_service", False), "Transfer": ("stripe._transfer", False), + "TransferReversal": ("stripe._transfer_reversal", False), "TransferReversalService": ("stripe._transfer_reversal_service", False), "TransferService": ("stripe._transfer_service", False), "TransitBalance": ("stripe._transit_balance", False), diff --git a/stripe/_account.py b/stripe/_account.py index 896a67d82..61952a3b0 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -1305,7 +1305,7 @@ class Details(StripeObject): ] ] """ - If the account is disabled, this string describes why the account can't create charges or receive payouts. Can be `rejected.fraud`, `rejected.terms_of_service`, `rejected.listed`, `rejected.other`, `fields_needed`, `listed`, `under_review`, or `other`. + This is typed as an enum for consistency with `requirements.disabled_reason`. """ errors: Optional[List[Error]] """ @@ -1498,7 +1498,7 @@ class Details(StripeObject): ] ] """ - If the account is disabled, this string describes why the account can't create charges or receive payouts. Can be `rejected.fraud`, `rejected.terms_of_service`, `rejected.listed`, `rejected.other`, `fields_needed`, `listed`, `under_review`, or `other`. + If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://docs.stripe.com/connect/handling-api-verification). """ errors: Optional[List[Error]] """ @@ -2034,7 +2034,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["AccountDeleteParams"] + cls, sid: str, /, **params: Unpack["AccountDeleteParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can delete accounts you manage. @@ -2057,7 +2057,9 @@ def _cls_delete( @overload @staticmethod - def delete(sid: str, **params: Unpack["AccountDeleteParams"]) -> "Account": + def delete( + sid: str, /, **params: Unpack["AccountDeleteParams"] + ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can delete accounts you manage. @@ -2083,9 +2085,7 @@ def delete(self, **params: Unpack["AccountDeleteParams"]) -> "Account": ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["AccountDeleteParams"] - ) -> "Account": + def delete(self, **params: Unpack["AccountDeleteParams"]) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can delete accounts you manage. @@ -2103,7 +2103,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["AccountDeleteParams"] + cls, sid: str, /, **params: Unpack["AccountDeleteParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can delete accounts you manage. @@ -2127,7 +2127,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["AccountDeleteParams"] + sid: str, /, **params: Unpack["AccountDeleteParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can delete accounts you manage. @@ -2156,7 +2156,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["AccountDeleteParams"] ) -> "Account": """ @@ -2252,7 +2252,7 @@ def persons( ... @class_method_variant("_cls_persons") - def persons( # pyright: ignore[reportGeneralTypeIssues] + def persons( self, **params: Unpack["AccountPersonsParams"] ) -> ListObject["Person"]: """ @@ -2307,7 +2307,7 @@ async def persons_async( ... @class_method_variant("_cls_persons_async") - async def persons_async( # pyright: ignore[reportGeneralTypeIssues] + async def persons_async( self, **params: Unpack["AccountPersonsParams"] ) -> ListObject["Person"]: """ @@ -2366,9 +2366,7 @@ def reject(self, **params: Unpack["AccountRejectParams"]) -> "Account": ... @class_method_variant("_cls_reject") - def reject( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["AccountRejectParams"] - ) -> "Account": + def reject(self, **params: Unpack["AccountRejectParams"]) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can reject accounts that you have flagged as suspicious. @@ -2429,7 +2427,7 @@ async def reject_async( ... @class_method_variant("_cls_reject_async") - async def reject_async( # pyright: ignore[reportGeneralTypeIssues] + async def reject_async( self, **params: Unpack["AccountRejectParams"] ) -> "Account": """ @@ -2496,9 +2494,7 @@ def unreject(self, **params: Unpack["AccountUnrejectParams"]) -> "Account": ... @class_method_variant("_cls_unreject") - def unreject( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["AccountUnrejectParams"] - ) -> "Account": + def unreject(self, **params: Unpack["AccountUnrejectParams"]) -> "Account": """ With Connect, you can unreject accounts that you have previously rejected. @@ -2567,7 +2563,7 @@ async def unreject_async( ... @class_method_variant("_cls_unreject_async") - async def unreject_async( # pyright: ignore[reportGeneralTypeIssues] + async def unreject_async( self, **params: Unpack["AccountUnrejectParams"] ) -> "Account": """ diff --git a/stripe/_account_notice.py b/stripe/_account_notice.py index c434f4d67..0d67422ff 100644 --- a/stripe/_account_notice.py +++ b/stripe/_account_notice.py @@ -160,7 +160,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["AccountNoticeModifyParams"] + cls, id: str, /, **params: Unpack["AccountNoticeModifyParams"] ) -> "AccountNotice": """ Updates an AccountNotice object. @@ -177,7 +177,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["AccountNoticeModifyParams"] + cls, id: str, /, **params: Unpack["AccountNoticeModifyParams"] ) -> "AccountNotice": """ Updates an AccountNotice object. diff --git a/stripe/_api_requestor.py b/stripe/_api_requestor.py index 6b593a1f8..424c265a8 100644 --- a/stripe/_api_requestor.py +++ b/stripe/_api_requestor.py @@ -430,8 +430,6 @@ def specific_v2_api_error(self, rbody, rcode, resp, rheaders, error_data): ) elif type == "controlled_by_alternate_resource": return error.ControlledByAlternateResourceError(**error_args) - elif type == "controlled_by_dashboard": - return error.ControlledByDashboardError(**error_args) elif type == "feature_not_enabled": return error.FeatureNotEnabledError(**error_args) elif type == "financial_account_not_open": @@ -449,6 +447,11 @@ def specific_v2_api_error(self, rbody, rcode, resp, rheaders, error_data): ) elif type == "invalid_payout_method": return error.InvalidPayoutMethodError(**error_args) + elif type == "invalid_vaulted_credential": + return error.InvalidVaultedCredentialError( + **error_args, + invalid_param=error_data.get("invalid_param"), + ) elif type == "merchant_not_gated": return error.MerchantNotGatedError(**error_args) elif type == "non_zero_balance": @@ -465,6 +468,21 @@ def specific_v2_api_error(self, rbody, rcode, resp, rheaders, error_data): return error.ServiceUnavailableError(**error_args) elif type == "temporary_session_expired": return error.TemporarySessionExpiredError(**error_args) + elif type == "verification_attempt_failed": + return error.VerificationAttemptFailedError( + **error_args, + verification_status=error_data.get("verification_status"), + ) + elif type == "verification_expired": + return error.VerificationExpiredError( + **error_args, + verification_status=error_data.get("verification_status"), + ) + elif type == "verification_not_initiated": + return error.VerificationNotInitiatedError( + **error_args, + verification_status=error_data.get("verification_status"), + ) # switchCases: The end of the section generated from our OpenAPI spec return self.specific_v1_api_error( diff --git a/stripe/_api_version.py b/stripe/_api_version.py index ca69bb422..65684571e 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-09-23.preview" + CURRENT = "2026-09-30.preview" CURRENT_MAJOR = "" diff --git a/stripe/_apple_pay_domain.py b/stripe/_apple_pay_domain.py index c1691cf24..3d1518ccb 100644 --- a/stripe/_apple_pay_domain.py +++ b/stripe/_apple_pay_domain.py @@ -85,7 +85,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["ApplePayDomainDeleteParams"] + cls, sid: str, /, **params: Unpack["ApplePayDomainDeleteParams"] ) -> "ApplePayDomain": """ Delete an apple pay domain. @@ -103,7 +103,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["ApplePayDomainDeleteParams"] + sid: str, /, **params: Unpack["ApplePayDomainDeleteParams"] ) -> "ApplePayDomain": """ Delete an apple pay domain. @@ -120,7 +120,7 @@ def delete( ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] + def delete( self, **params: Unpack["ApplePayDomainDeleteParams"] ) -> "ApplePayDomain": """ @@ -134,7 +134,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["ApplePayDomainDeleteParams"] + cls, sid: str, /, **params: Unpack["ApplePayDomainDeleteParams"] ) -> "ApplePayDomain": """ Delete an apple pay domain. @@ -152,7 +152,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["ApplePayDomainDeleteParams"] + sid: str, /, **params: Unpack["ApplePayDomainDeleteParams"] ) -> "ApplePayDomain": """ Delete an apple pay domain. @@ -169,7 +169,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["ApplePayDomainDeleteParams"] ) -> "ApplePayDomain": """ diff --git a/stripe/_application_fee.py b/stripe/_application_fee.py index 6673192e1..1e0894100 100644 --- a/stripe/_application_fee.py +++ b/stripe/_application_fee.py @@ -245,7 +245,7 @@ def refund( ... @class_method_variant("_cls_refund") - def refund( # pyright: ignore[reportGeneralTypeIssues] + def refund( self, **params: Unpack["ApplicationFeeRefundParams"] ) -> "ApplicationFeeRefund": """ @@ -330,7 +330,7 @@ async def refund_async( ... @class_method_variant("_cls_refund_async") - async def refund_async( # pyright: ignore[reportGeneralTypeIssues] + async def refund_async( self, **params: Unpack["ApplicationFeeRefundParams"] ) -> "ApplicationFeeRefund": """ diff --git a/stripe/_apps_service.py b/stripe/_apps_service.py index d20e13470..932e6cfc3 100644 --- a/stripe/_apps_service.py +++ b/stripe/_apps_service.py @@ -5,12 +5,17 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: + from stripe.apps._install_service import InstallService from stripe.apps._secret_service import SecretService -_subservices = {"secrets": ["stripe.apps._secret_service", "SecretService"]} +_subservices = { + "installs": ["stripe.apps._install_service", "InstallService"], + "secrets": ["stripe.apps._secret_service", "SecretService"], +} class AppsService(StripeService): + installs: "InstallService" secrets: "SecretService" def __init__(self, requestor): diff --git a/stripe/_balance_transaction.py b/stripe/_balance_transaction.py index 1dc2cb784..19eb22c4a 100644 --- a/stripe/_balance_transaction.py +++ b/stripe/_balance_transaction.py @@ -19,10 +19,10 @@ from stripe._payout import Payout from stripe._refund import Refund from stripe._reserve_transaction import ReserveTransaction - from stripe._reversal import Reversal from stripe._tax_deducted_at_source import TaxDeductedAtSource from stripe._topup import Topup from stripe._transfer import Transfer + from stripe._transfer_reversal import TransferReversal from stripe.issuing._authorization import Authorization from stripe.issuing._dispute import Dispute as IssuingDisputeResource from stripe.issuing._transaction import Transaction @@ -148,7 +148,7 @@ class FeeDetail(StripeObject): "TaxDeductedAtSource", "Topup", "Transfer", - "Reversal", + "TransferReversal", ] ] ] @@ -178,6 +178,8 @@ class FeeDetail(StripeObject): "issuing_authorization_hold", "issuing_authorization_release", "issuing_dispute", + "issuing_dispute_provisional_credit", + "issuing_dispute_provisional_credit_reversal", "issuing_transaction", "obligation_outbound", "obligation_reversal_inbound", @@ -215,7 +217,7 @@ class FeeDetail(StripeObject): str, ] """ - Transaction type: `tax_fund`, `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. + Transaction type: `tax_fund`, `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_dispute_provisional_credit`, `issuing_dispute_provisional_credit_reversal`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. """ @classmethod diff --git a/stripe/_bank_account.py b/stripe/_bank_account.py index 4ab7a4fd1..fdde3c24f 100644 --- a/stripe/_bank_account.py +++ b/stripe/_bank_account.py @@ -409,7 +409,7 @@ class Details(StripeObject): @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["BankAccountDeleteParams"] + cls, sid: str, /, **params: Unpack["BankAccountDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -427,7 +427,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["BankAccountDeleteParams"] + sid: str, /, **params: Unpack["BankAccountDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -444,7 +444,7 @@ def delete( ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] + def delete( self, **params: Unpack["BankAccountDeleteParams"] ) -> Union["BankAccount", "Card"]: """ @@ -458,7 +458,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["BankAccountDeleteParams"] + cls, sid: str, /, **params: Unpack["BankAccountDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -476,7 +476,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["BankAccountDeleteParams"] + sid: str, /, **params: Unpack["BankAccountDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -493,7 +493,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["BankAccountDeleteParams"] ) -> Union["BankAccount", "Card"]: """ diff --git a/stripe/_card.py b/stripe/_card.py index e264539a5..0c9081f23 100644 --- a/stripe/_card.py +++ b/stripe/_card.py @@ -201,7 +201,7 @@ class Redaction(StripeObject): @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["CardDeleteParams"] + cls, sid: str, /, **params: Unpack["CardDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -219,7 +219,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["CardDeleteParams"] + sid: str, /, **params: Unpack["CardDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -236,7 +236,7 @@ def delete( ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] + def delete( self, **params: Unpack["CardDeleteParams"] ) -> Union["BankAccount", "Card"]: """ @@ -250,7 +250,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["CardDeleteParams"] + cls, sid: str, /, **params: Unpack["CardDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -268,7 +268,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["CardDeleteParams"] + sid: str, /, **params: Unpack["CardDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -285,7 +285,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["CardDeleteParams"] ) -> Union["BankAccount", "Card"]: """ diff --git a/stripe/_charge.py b/stripe/_charge.py index 10977d110..d4c5d3623 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -912,6 +912,12 @@ class ShippingAddress(StripeObject): """ When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. """ + card_account_update: Optional[ + Union[Literal["expiry_changed", "number_changed"], str] + ] + """ + If present, indicates that the Card Account Updater changed the card's credentials during this authorization. `number_changed` means the card number was updated (the expiration date may have changed as well); `expiry_changed` means only the expiration date was updated. + """ checks: Optional[Checks] """ Check results by Card networks on Card address and CVC at time of payment. @@ -2938,9 +2944,7 @@ def capture(self, **params: Unpack["ChargeCaptureParams"]) -> "Charge": ... @class_method_variant("_cls_capture") - def capture( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["ChargeCaptureParams"] - ) -> "Charge": + def capture(self, **params: Unpack["ChargeCaptureParams"]) -> "Charge": """ This method is deprecated and will be removed soon. If your integration uses it, you need to update it to use a different payment flow, such as [the Payment Intents API](https://docs.stripe.com/docs/payments/payment-intents). """ @@ -2993,7 +2997,7 @@ async def capture_async( ... @class_method_variant("_cls_capture_async") - async def capture_async( # pyright: ignore[reportGeneralTypeIssues] + async def capture_async( self, **params: Unpack["ChargeCaptureParams"] ) -> "Charge": """ @@ -3082,7 +3086,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["ChargeModifyParams"] + cls, id: str, /, **params: Unpack["ChargeModifyParams"] ) -> "Charge": """ Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -3099,7 +3103,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["ChargeModifyParams"] + cls, id: str, /, **params: Unpack["ChargeModifyParams"] ) -> "Charge": """ Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged. diff --git a/stripe/_coupon.py b/stripe/_coupon.py index c06392b4f..ece6654c9 100644 --- a/stripe/_coupon.py +++ b/stripe/_coupon.py @@ -197,7 +197,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["CouponDeleteParams"] + cls, sid: str, /, **params: Unpack["CouponDeleteParams"] ) -> "Coupon": """ You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. @@ -214,7 +214,9 @@ def _cls_delete( @overload @staticmethod - def delete(sid: str, **params: Unpack["CouponDeleteParams"]) -> "Coupon": + def delete( + sid: str, /, **params: Unpack["CouponDeleteParams"] + ) -> "Coupon": """ You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. """ @@ -228,9 +230,7 @@ def delete(self, **params: Unpack["CouponDeleteParams"]) -> "Coupon": ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["CouponDeleteParams"] - ) -> "Coupon": + def delete(self, **params: Unpack["CouponDeleteParams"]) -> "Coupon": """ You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. """ @@ -242,7 +242,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["CouponDeleteParams"] + cls, sid: str, /, **params: Unpack["CouponDeleteParams"] ) -> "Coupon": """ You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. @@ -260,7 +260,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["CouponDeleteParams"] + sid: str, /, **params: Unpack["CouponDeleteParams"] ) -> "Coupon": """ You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. @@ -277,7 +277,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["CouponDeleteParams"] ) -> "Coupon": """ @@ -331,7 +331,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["CouponModifyParams"] + cls, id: str, /, **params: Unpack["CouponModifyParams"] ) -> "Coupon": """ Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable. @@ -348,7 +348,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["CouponModifyParams"] + cls, id: str, /, **params: Unpack["CouponModifyParams"] ) -> "Coupon": """ Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable. diff --git a/stripe/_credit_note.py b/stripe/_credit_note.py index bc79a03a6..0a8b7de4c 100644 --- a/stripe/_credit_note.py +++ b/stripe/_credit_note.py @@ -484,7 +484,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["CreditNoteModifyParams"] + cls, id: str, /, **params: Unpack["CreditNoteModifyParams"] ) -> "CreditNote": """ Updates an existing credit note. @@ -501,7 +501,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["CreditNoteModifyParams"] + cls, id: str, /, **params: Unpack["CreditNoteModifyParams"] ) -> "CreditNote": """ Updates an existing credit note. @@ -638,7 +638,7 @@ def void_credit_note( ... @class_method_variant("_cls_void_credit_note") - def void_credit_note( # pyright: ignore[reportGeneralTypeIssues] + def void_credit_note( self, **params: Unpack["CreditNoteVoidCreditNoteParams"] ) -> "CreditNote": """ @@ -691,7 +691,7 @@ async def void_credit_note_async( ... @class_method_variant("_cls_void_credit_note_async") - async def void_credit_note_async( # pyright: ignore[reportGeneralTypeIssues] + async def void_credit_note_async( self, **params: Unpack["CreditNoteVoidCreditNoteParams"] ) -> "CreditNote": """ diff --git a/stripe/_customer.py b/stripe/_customer.py index 0f7c72ed9..c30da9072 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -531,7 +531,7 @@ def create_funding_instructions( ... @class_method_variant("_cls_create_funding_instructions") - def create_funding_instructions( # pyright: ignore[reportGeneralTypeIssues] + def create_funding_instructions( self, **params: Unpack["CustomerCreateFundingInstructionsParams"] ) -> "FundingInstructions": """ @@ -599,7 +599,7 @@ async def create_funding_instructions_async( ... @class_method_variant("_cls_create_funding_instructions_async") - async def create_funding_instructions_async( # pyright: ignore[reportGeneralTypeIssues] + async def create_funding_instructions_async( self, **params: Unpack["CustomerCreateFundingInstructionsParams"] ) -> "FundingInstructions": """ @@ -620,7 +620,7 @@ async def create_funding_instructions_async( # pyright: ignore[reportGeneralTyp @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["CustomerDeleteParams"] + cls, sid: str, /, **params: Unpack["CustomerDeleteParams"] ) -> "Customer": """ Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. @@ -638,7 +638,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["CustomerDeleteParams"] + sid: str, /, **params: Unpack["CustomerDeleteParams"] ) -> "Customer": """ Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. @@ -653,9 +653,7 @@ def delete(self, **params: Unpack["CustomerDeleteParams"]) -> "Customer": ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["CustomerDeleteParams"] - ) -> "Customer": + def delete(self, **params: Unpack["CustomerDeleteParams"]) -> "Customer": """ Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. """ @@ -667,7 +665,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["CustomerDeleteParams"] + cls, sid: str, /, **params: Unpack["CustomerDeleteParams"] ) -> "Customer": """ Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. @@ -685,7 +683,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["CustomerDeleteParams"] + sid: str, /, **params: Unpack["CustomerDeleteParams"] ) -> "Customer": """ Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. @@ -702,7 +700,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["CustomerDeleteParams"] ) -> "Customer": """ @@ -752,7 +750,7 @@ def delete_discount( ... @class_method_variant("_cls_delete_discount") - def delete_discount( # pyright: ignore[reportGeneralTypeIssues] + def delete_discount( self, **params: Unpack["CustomerDeleteDiscountParams"] ) -> "Discount": """ @@ -807,7 +805,7 @@ async def delete_discount_async( ... @class_method_variant("_cls_delete_discount_async") - async def delete_discount_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_discount_async( self, **params: Unpack["CustomerDeleteDiscountParams"] ) -> "Discount": """ @@ -905,7 +903,7 @@ def list_payment_methods( ... @class_method_variant("_cls_list_payment_methods") - def list_payment_methods( # pyright: ignore[reportGeneralTypeIssues] + def list_payment_methods( self, **params: Unpack["CustomerListPaymentMethodsParams"] ) -> ListObject["PaymentMethod"]: """ @@ -963,7 +961,7 @@ async def list_payment_methods_async( ... @class_method_variant("_cls_list_payment_methods_async") - async def list_payment_methods_async( # pyright: ignore[reportGeneralTypeIssues] + async def list_payment_methods_async( self, **params: Unpack["CustomerListPaymentMethodsParams"] ) -> ListObject["PaymentMethod"]: """ @@ -982,7 +980,7 @@ async def list_payment_methods_async( # pyright: ignore[reportGeneralTypeIssues @classmethod def modify( - cls, id: str, **params: Unpack["CustomerModifyParams"] + cls, id: str, /, **params: Unpack["CustomerModifyParams"] ) -> "Customer": """ Updates the specified customer by setting the values of the parameters passed. Any parameters not provided are left unchanged. For example, if you pass the source parameter, that becomes the customer's active source (such as a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer's current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled is retried. This retry doesn't count as an automatic retry, and doesn't affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer doesn't trigger this behavior. @@ -1001,7 +999,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["CustomerModifyParams"] + cls, id: str, /, **params: Unpack["CustomerModifyParams"] ) -> "Customer": """ Updates the specified customer by setting the values of the parameters passed. Any parameters not provided are left unchanged. For example, if you pass the source parameter, that becomes the customer's active source (such as a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer's current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled is retried. This retry doesn't count as an automatic retry, and doesn't affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer doesn't trigger this behavior. @@ -1089,7 +1087,7 @@ def retrieve_payment_method( ... @class_method_variant("_cls_retrieve_payment_method") - def retrieve_payment_method( # pyright: ignore[reportGeneralTypeIssues] + def retrieve_payment_method( self, payment_method: str, /, @@ -1159,7 +1157,7 @@ async def retrieve_payment_method_async( ... @class_method_variant("_cls_retrieve_payment_method_async") - async def retrieve_payment_method_async( # pyright: ignore[reportGeneralTypeIssues] + async def retrieve_payment_method_async( self, payment_method: str, /, @@ -2154,7 +2152,7 @@ def fund_cash_balance( ... @class_method_variant("_cls_fund_cash_balance") - def fund_cash_balance( # pyright: ignore[reportGeneralTypeIssues] + def fund_cash_balance( self, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ @@ -2212,7 +2210,7 @@ async def fund_cash_balance_async( ... @class_method_variant("_cls_fund_cash_balance_async") - async def fund_cash_balance_async( # pyright: ignore[reportGeneralTypeIssues] + async def fund_cash_balance_async( self, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ diff --git a/stripe/_customer_tax_exemption.py b/stripe/_customer_tax_exemption.py index fd5775fd4..ef2598aea 100644 --- a/stripe/_customer_tax_exemption.py +++ b/stripe/_customer_tax_exemption.py @@ -24,6 +24,12 @@ class Ca(StripeObject): The type of Canadian tax (gst_hst, PST, QST, RST). """ + class Es(StripeObject): + state: Optional[str] + """ + Two-letter Spanish subdivision code (ISO 3166-2). Absent for country-wide Spain exemptions. + """ + class Us(StripeObject): state: str """ @@ -51,6 +57,7 @@ class Us(StripeObject): """ ISO 8601 date (YYYY-MM-DD) when the exemption becomes effective. """ + es: Optional[Es] expiration_date: Optional[str] """ ISO 8601 date (YYYY-MM-DD) when the exemption expires. @@ -68,4 +75,4 @@ class Us(StripeObject): String representing the object's type. Objects of the same type share the same value. """ us: Optional[Us] - _inner_class_types = {"ca": Ca, "us": Us} + _inner_class_types = {"ca": Ca, "es": Es, "us": Us} diff --git a/stripe/_dispute.py b/stripe/_dispute.py index c6250a740..97727cbca 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -626,9 +626,7 @@ def close(self, **params: Unpack["DisputeCloseParams"]) -> "Dispute": ... @class_method_variant("_cls_close") - def close( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["DisputeCloseParams"] - ) -> "Dispute": + def close(self, **params: Unpack["DisputeCloseParams"]) -> "Dispute": """ Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute (accepting it), acknowledging it as lost. @@ -689,7 +687,7 @@ async def close_async( ... @class_method_variant("_cls_close_async") - async def close_async( # pyright: ignore[reportGeneralTypeIssues] + async def close_async( self, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ @@ -750,7 +748,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["DisputeModifyParams"] + cls, id: str, /, **params: Unpack["DisputeModifyParams"] ) -> "Dispute": """ When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically. @@ -769,7 +767,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["DisputeModifyParams"] + cls, id: str, /, **params: Unpack["DisputeModifyParams"] ) -> "Dispute": """ When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically. diff --git a/stripe/_ephemeral_key.py b/stripe/_ephemeral_key.py index 88766347f..5ca8ca1e9 100644 --- a/stripe/_ephemeral_key.py +++ b/stripe/_ephemeral_key.py @@ -51,7 +51,7 @@ class EphemeralKey( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["EphemeralKeyDeleteParams"] + cls, sid: str, /, **params: Unpack["EphemeralKeyDeleteParams"] ) -> "EphemeralKey": """ Invalidates a short-lived API key for a given resource. @@ -69,7 +69,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["EphemeralKeyDeleteParams"] + sid: str, /, **params: Unpack["EphemeralKeyDeleteParams"] ) -> "EphemeralKey": """ Invalidates a short-lived API key for a given resource. @@ -86,7 +86,7 @@ def delete( ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] + def delete( self, **params: Unpack["EphemeralKeyDeleteParams"] ) -> "EphemeralKey": """ @@ -100,7 +100,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["EphemeralKeyDeleteParams"] + cls, sid: str, /, **params: Unpack["EphemeralKeyDeleteParams"] ) -> "EphemeralKey": """ Invalidates a short-lived API key for a given resource. @@ -118,7 +118,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["EphemeralKeyDeleteParams"] + sid: str, /, **params: Unpack["EphemeralKeyDeleteParams"] ) -> "EphemeralKey": """ Invalidates a short-lived API key for a given resource. @@ -135,7 +135,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["EphemeralKeyDeleteParams"] ) -> "EphemeralKey": """ diff --git a/stripe/_error.py b/stripe/_error.py index d87493623..5823d0b53 100644 --- a/stripe/_error.py +++ b/stripe/_error.py @@ -226,10 +226,6 @@ class ControlledByAlternateResourceError(StripeError): pass -class ControlledByDashboardError(StripeError): - pass - - class FeatureNotEnabledError(StripeError): pass @@ -276,6 +272,28 @@ class InvalidPayoutMethodError(StripeError): pass +class InvalidVaultedCredentialError(StripeError): + def __init__( + self, + message=None, + http_body=None, + http_status=None, + json_body=None, + headers=None, + code=None, + invalid_param=None, + ): + super().__init__( + message, + http_body, + http_status, + json_body, + headers, + code, + ) + self.invalid_param = invalid_param + + class MerchantNotGatedError(StripeError): pass @@ -304,4 +322,70 @@ class TemporarySessionExpiredError(StripeError): pass +class VerificationAttemptFailedError(StripeError): + def __init__( + self, + message=None, + http_body=None, + http_status=None, + json_body=None, + headers=None, + code=None, + verification_status=None, + ): + super().__init__( + message, + http_body, + http_status, + json_body, + headers, + code, + ) + self.verification_status = verification_status + + +class VerificationExpiredError(StripeError): + def __init__( + self, + message=None, + http_body=None, + http_status=None, + json_body=None, + headers=None, + code=None, + verification_status=None, + ): + super().__init__( + message, + http_body, + http_status, + json_body, + headers, + code, + ) + self.verification_status = verification_status + + +class VerificationNotInitiatedError(StripeError): + def __init__( + self, + message=None, + http_body=None, + http_status=None, + json_body=None, + headers=None, + code=None, + verification_status=None, + ): + super().__init__( + message, + http_body, + http_status, + json_body, + headers, + code, + ) + self.verification_status = verification_status + + # classDefinitions: The end of the section generated from our OpenAPI spec diff --git a/stripe/_error_object.py b/stripe/_error_object.py index cdad0676a..5ae6b10b0 100644 --- a/stripe/_error_object.py +++ b/stripe/_error_object.py @@ -18,7 +18,7 @@ class ErrorObject(StripeObject): # errorAnnotations: The beginning of the section generated from our OpenAPI spec advice_code: Optional[str] """ - For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines#retrying-issuer-declines) if they provide one. + For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines/card#retrying-issuer-declines) if they provide one. """ charge: Optional[str] """ diff --git a/stripe/_event_notification_handler.py b/stripe/_event_notification_handler.py index 628849ca1..535fbb522 100644 --- a/stripe/_event_notification_handler.py +++ b/stripe/_event_notification_handler.py @@ -1074,6 +1074,18 @@ from stripe.events._v2_core_vault_network_token_suspended_event import ( V2CoreVaultNetworkTokenSuspendedEventNotification, ) + from stripe.events._v2_data_query_run_created_event import ( + V2DataQueryRunCreatedEventNotification, + ) + from stripe.events._v2_data_query_run_failed_event import ( + V2DataQueryRunFailedEventNotification, + ) + from stripe.events._v2_data_query_run_succeeded_event import ( + V2DataQueryRunSucceededEventNotification, + ) + from stripe.events._v2_data_query_run_updated_event import ( + V2DataQueryRunUpdatedEventNotification, + ) from stripe.events._v2_data_reporting_query_run_created_event import ( V2DataReportingQueryRunCreatedEventNotification, ) @@ -1086,6 +1098,18 @@ from stripe.events._v2_data_reporting_query_run_updated_event import ( V2DataReportingQueryRunUpdatedEventNotification, ) + from stripe.events._v2_data_report_run_created_event import ( + V2DataReportRunCreatedEventNotification, + ) + from stripe.events._v2_data_report_run_failed_event import ( + V2DataReportRunFailedEventNotification, + ) + from stripe.events._v2_data_report_run_succeeded_event import ( + V2DataReportRunSucceededEventNotification, + ) + from stripe.events._v2_data_report_run_updated_event import ( + V2DataReportRunUpdatedEventNotification, + ) from stripe.events._v2_extend_extension_run_failed_event import ( V2ExtendExtensionRunFailedEventNotification, ) @@ -1146,6 +1170,9 @@ from stripe.events._v2_money_management_debit_dispute_succeeded_event import ( V2MoneyManagementDebitDisputeSucceededEventNotification, ) + from stripe.events._v2_money_management_earned_credit_succeeded_event import ( + V2MoneyManagementEarnedCreditSucceededEventNotification, + ) from stripe.events._v2_money_management_financial_account_created_event import ( V2MoneyManagementFinancialAccountCreatedEventNotification, ) @@ -6043,6 +6070,58 @@ def on_v2_core_vault_network_token_suspended( ) return func + def on_v2_data_query_run_created( + self, + func: "Callable[[V2DataQueryRunCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2DataQueryRunCreatedEvent` (`v2.data.query_run.created`) event notification. + """ + self._register( + "v2.data.query_run.created", + func, + ) + return func + + def on_v2_data_query_run_failed( + self, + func: "Callable[[V2DataQueryRunFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2DataQueryRunFailedEvent` (`v2.data.query_run.failed`) event notification. + """ + self._register( + "v2.data.query_run.failed", + func, + ) + return func + + def on_v2_data_query_run_succeeded( + self, + func: "Callable[[V2DataQueryRunSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2DataQueryRunSucceededEvent` (`v2.data.query_run.succeeded`) event notification. + """ + self._register( + "v2.data.query_run.succeeded", + func, + ) + return func + + def on_v2_data_query_run_updated( + self, + func: "Callable[[V2DataQueryRunUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2DataQueryRunUpdatedEvent` (`v2.data.query_run.updated`) event notification. + """ + self._register( + "v2.data.query_run.updated", + func, + ) + return func + def on_v2_data_reporting_query_run_created( self, func: "Callable[[V2DataReportingQueryRunCreatedEventNotification, StripeClient], CallbackReturn]", @@ -6095,6 +6174,58 @@ def on_v2_data_reporting_query_run_updated( ) return func + def on_v2_data_report_run_created( + self, + func: "Callable[[V2DataReportRunCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2DataReportRunCreatedEvent` (`v2.data.report_run.created`) event notification. + """ + self._register( + "v2.data.report_run.created", + func, + ) + return func + + def on_v2_data_report_run_failed( + self, + func: "Callable[[V2DataReportRunFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2DataReportRunFailedEvent` (`v2.data.report_run.failed`) event notification. + """ + self._register( + "v2.data.report_run.failed", + func, + ) + return func + + def on_v2_data_report_run_succeeded( + self, + func: "Callable[[V2DataReportRunSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2DataReportRunSucceededEvent` (`v2.data.report_run.succeeded`) event notification. + """ + self._register( + "v2.data.report_run.succeeded", + func, + ) + return func + + def on_v2_data_report_run_updated( + self, + func: "Callable[[V2DataReportRunUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2DataReportRunUpdatedEvent` (`v2.data.report_run.updated`) event notification. + """ + self._register( + "v2.data.report_run.updated", + func, + ) + return func + def on_v2_extend_extension_run_failed( self, func: "Callable[[V2ExtendExtensionRunFailedEventNotification, StripeClient], CallbackReturn]", @@ -6355,6 +6486,19 @@ def on_v2_money_management_debit_dispute_succeeded( ) return func + def on_v2_money_management_earned_credit_succeeded( + self, + func: "Callable[[V2MoneyManagementEarnedCreditSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementEarnedCreditSucceededEvent` (`v2.money_management.earned_credit.succeeded`) event notification. + """ + self._register( + "v2.money_management.earned_credit.succeeded", + func, + ) + return func + def on_v2_money_management_financial_account_created( self, func: "Callable[[V2MoneyManagementFinancialAccountCreatedEventNotification, StripeClient], CallbackReturn]", diff --git a/stripe/_file_link.py b/stripe/_file_link.py index e4c5f1117..013ed379d 100644 --- a/stripe/_file_link.py +++ b/stripe/_file_link.py @@ -139,7 +139,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["FileLinkModifyParams"] + cls, id: str, /, **params: Unpack["FileLinkModifyParams"] ) -> "FileLink": """ Updates an existing file link object. Expired links can no longer be updated. @@ -156,7 +156,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["FileLinkModifyParams"] + cls, id: str, /, **params: Unpack["FileLinkModifyParams"] ) -> "FileLink": """ Updates an existing file link object. Expired links can no longer be updated. diff --git a/stripe/_fx_quote.py b/stripe/_fx_quote.py index a17b86c74..82a909615 100644 --- a/stripe/_fx_quote.py +++ b/stripe/_fx_quote.py @@ -104,6 +104,10 @@ class Transfer(StripeObject): """ Unique identifier for the object. """ + livemode: bool + """ + If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. + """ lock_duration: Union[Literal["day", "five_minutes", "hour", "none"], str] """ The duration that the quote is locked for, from creation time. The quote will be usable for the duration specified. diff --git a/stripe/_gift_card.py b/stripe/_gift_card.py index 7f933fdbf..1fe9485a4 100644 --- a/stripe/_gift_card.py +++ b/stripe/_gift_card.py @@ -102,7 +102,7 @@ def activate( ... @class_method_variant("_cls_activate") - def activate( # pyright: ignore[reportGeneralTypeIssues] + def activate( self, **params: Unpack["GiftCardActivateParams"] ) -> "GiftCardOperation": """ @@ -157,7 +157,7 @@ async def activate_async( ... @class_method_variant("_cls_activate_async") - async def activate_async( # pyright: ignore[reportGeneralTypeIssues] + async def activate_async( self, **params: Unpack["GiftCardActivateParams"] ) -> "GiftCardOperation": """ @@ -212,7 +212,7 @@ def cashout( ... @class_method_variant("_cls_cashout") - def cashout( # pyright: ignore[reportGeneralTypeIssues] + def cashout( self, **params: Unpack["GiftCardCashoutParams"] ) -> "GiftCardOperation": """ @@ -267,7 +267,7 @@ async def cashout_async( ... @class_method_variant("_cls_cashout_async") - async def cashout_async( # pyright: ignore[reportGeneralTypeIssues] + async def cashout_async( self, **params: Unpack["GiftCardCashoutParams"] ) -> "GiftCardOperation": """ @@ -322,7 +322,7 @@ def check_balance( ... @class_method_variant("_cls_check_balance") - def check_balance( # pyright: ignore[reportGeneralTypeIssues] + def check_balance( self, **params: Unpack["GiftCardCheckBalanceParams"] ) -> "GiftCardOperation": """ @@ -377,7 +377,7 @@ async def check_balance_async( ... @class_method_variant("_cls_check_balance_async") - async def check_balance_async( # pyright: ignore[reportGeneralTypeIssues] + async def check_balance_async( self, **params: Unpack["GiftCardCheckBalanceParams"] ) -> "GiftCardOperation": """ @@ -462,7 +462,7 @@ def reload( ... @class_method_variant("_cls_reload") - def reload( # pyright: ignore[reportGeneralTypeIssues] + def reload( self, **params: Unpack["GiftCardReloadParams"] ) -> "GiftCardOperation": """ @@ -517,7 +517,7 @@ async def reload_async( ... @class_method_variant("_cls_reload_async") - async def reload_async( # pyright: ignore[reportGeneralTypeIssues] + async def reload_async( self, **params: Unpack["GiftCardReloadParams"] ) -> "GiftCardOperation": """ @@ -594,7 +594,7 @@ def void_operation( ... @class_method_variant("_cls_void_operation") - def void_operation( # pyright: ignore[reportGeneralTypeIssues] + def void_operation( self, **params: Unpack["GiftCardVoidOperationParams"] ) -> "GiftCardOperation": """ @@ -649,7 +649,7 @@ async def void_operation_async( ... @class_method_variant("_cls_void_operation_async") - async def void_operation_async( # pyright: ignore[reportGeneralTypeIssues] + async def void_operation_async( self, **params: Unpack["GiftCardVoidOperationParams"] ) -> "GiftCardOperation": """ diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 083d3723b..910444112 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -165,6 +165,29 @@ class AmountsDue(StripeObject): """ class AutomaticTax(StripeObject): + class EnablementDetails(StripeObject): + class IntegrationConfigurationDisabledReason(StripeObject): + conflicting_field: str + """ + The parameter that prevented `automatic_tax` from being enabled (for example `default_tax_rates`). + """ + + integration_configuration_disabled_reason: Optional[ + IntegrationConfigurationDisabledReason + ] + """ + Present when `source=tax_integration_configuration`, `automatic_tax[enabled]=false`, and a conflicting parameter is recorded. + """ + source: Literal[ + "explicit", "managed_payments", "tax_integration_configuration" + ] + """ + How `automatic_tax` was set: `explicit`, `managed_payments`, or `tax_integration_configuration`. + """ + _inner_class_types = { + "integration_configuration_disabled_reason": IntegrationConfigurationDisabledReason, + } + class Liability(StripeObject): account: Optional[ExpandableField["Account"]] """ @@ -191,6 +214,10 @@ class Liability(StripeObject): """ Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://docs.stripe.com/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. """ + enablement_details: Optional[EnablementDetails] + """ + How `automatic_tax` was set (`explicit`, `managed_payments`, or `tax_integration_configuration`) and why it may have been disabled. + """ liability: Optional[Liability] """ The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. @@ -207,7 +234,10 @@ class Liability(StripeObject): """ The status of the most recent automated tax calculation for this invoice. """ - _inner_class_types = {"liability": Liability} + _inner_class_types = { + "enablement_details": EnablementDetails, + "liability": Liability, + } class ConfirmationSecret(StripeObject): client_secret: str @@ -470,7 +500,7 @@ class Issuer(StripeObject): class LastFinalizationError(StripeObject): advice_code: Optional[str] """ - For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines#retrying-issuer-declines) if they provide one. + For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines/card#retrying-issuer-declines) if they provide one. """ charge: Optional[str] """ @@ -531,6 +561,7 @@ class LastFinalizationError(StripeObject): "customer_session_expired", "customer_tax_location_invalid", "debit_not_authorized", + "dispute_evidence_page_limit_exceeded", "email_invalid", "expired_card", "expired_payment_method", @@ -541,6 +572,8 @@ class LastFinalizationError(StripeObject): "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", + "financial_connections_consent_locale_invalid", + "financial_connections_consent_locale_unsupported", "financial_connections_institution_unavailable", "financial_connections_no_successful_transaction_refresh", "forwarding_api_inactive", @@ -595,6 +628,7 @@ class LastFinalizationError(StripeObject): "parameter_missing", "parameter_unknown", "parameters_exclusive", + "payment_evaluation_on_api_version_not_supported", "payment_intent_action_required", "payment_intent_authentication_failure", "payment_intent_incompatible_payment_method", @@ -1510,6 +1544,27 @@ class Address(StripeObject): """ _inner_class_types = {"address": Address} + class StatusDetails(StripeObject): + class Uncollectible(StripeObject): + reason: Optional[ + Union[ + Literal[ + "max_payment_attempts", + "payment_not_received", + "subscription_canceled", + "subscription_paused", + "user_forgiven", + ], + str, + ] + ] + """ + The reason why the invoice is uncollectible. + """ + + uncollectible: Optional[Uncollectible] + _inner_class_types = {"uncollectible": Uncollectible} + class StatusTransitions(StripeObject): finalized_at: Optional[int] """ @@ -1961,6 +2016,7 @@ class TaxRateDetails(StripeObject): """ The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://docs.stripe.com/billing/invoices/workflow#workflow-overview) """ + status_details: Optional[StatusDetails] status_transitions: StatusTransitions subtotal: int """ @@ -2042,7 +2098,7 @@ def add_lines( ... @class_method_variant("_cls_add_lines") - def add_lines( # pyright: ignore[reportGeneralTypeIssues] + def add_lines( self, **params: Unpack["InvoiceAddLinesParams"] ) -> "Invoice": """ @@ -2097,7 +2153,7 @@ async def add_lines_async( ... @class_method_variant("_cls_add_lines_async") - async def add_lines_async( # pyright: ignore[reportGeneralTypeIssues] + async def add_lines_async( self, **params: Unpack["InvoiceAddLinesParams"] ) -> "Invoice": """ @@ -2179,7 +2235,7 @@ def attach_payment( ... @class_method_variant("_cls_attach_payment") - def attach_payment( # pyright: ignore[reportGeneralTypeIssues] + def attach_payment( self, **params: Unpack["InvoiceAttachPaymentParams"] ) -> "Invoice": """ @@ -2270,7 +2326,7 @@ async def attach_payment_async( ... @class_method_variant("_cls_attach_payment_async") - async def attach_payment_async( # pyright: ignore[reportGeneralTypeIssues] + async def attach_payment_async( self, **params: Unpack["InvoiceAttachPaymentParams"] ) -> "Invoice": """ @@ -2376,7 +2432,7 @@ async def create_preview_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["InvoiceDeleteParams"] + cls, sid: str, /, **params: Unpack["InvoiceDeleteParams"] ) -> "Invoice": """ Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api/invoices/void). @@ -2393,7 +2449,9 @@ def _cls_delete( @overload @staticmethod - def delete(sid: str, **params: Unpack["InvoiceDeleteParams"]) -> "Invoice": + def delete( + sid: str, /, **params: Unpack["InvoiceDeleteParams"] + ) -> "Invoice": """ Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api/invoices/void). """ @@ -2407,9 +2465,7 @@ def delete(self, **params: Unpack["InvoiceDeleteParams"]) -> "Invoice": ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["InvoiceDeleteParams"] - ) -> "Invoice": + def delete(self, **params: Unpack["InvoiceDeleteParams"]) -> "Invoice": """ Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api/invoices/void). """ @@ -2421,7 +2477,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["InvoiceDeleteParams"] + cls, sid: str, /, **params: Unpack["InvoiceDeleteParams"] ) -> "Invoice": """ Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api/invoices/void). @@ -2439,7 +2495,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["InvoiceDeleteParams"] + sid: str, /, **params: Unpack["InvoiceDeleteParams"] ) -> "Invoice": """ Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api/invoices/void). @@ -2456,7 +2512,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["InvoiceDeleteParams"] ) -> "Invoice": """ @@ -2506,7 +2562,7 @@ def detach_payment( ... @class_method_variant("_cls_detach_payment") - def detach_payment( # pyright: ignore[reportGeneralTypeIssues] + def detach_payment( self, **params: Unpack["InvoiceDetachPaymentParams"] ) -> "Invoice": """ @@ -2561,7 +2617,7 @@ async def detach_payment_async( ... @class_method_variant("_cls_detach_payment_async") - async def detach_payment_async( # pyright: ignore[reportGeneralTypeIssues] + async def detach_payment_async( self, **params: Unpack["InvoiceDetachPaymentParams"] ) -> "Invoice": """ @@ -2616,7 +2672,7 @@ def finalize_invoice( ... @class_method_variant("_cls_finalize_invoice") - def finalize_invoice( # pyright: ignore[reportGeneralTypeIssues] + def finalize_invoice( self, **params: Unpack["InvoiceFinalizeInvoiceParams"] ) -> "Invoice": """ @@ -2671,7 +2727,7 @@ async def finalize_invoice_async( ... @class_method_variant("_cls_finalize_invoice_async") - async def finalize_invoice_async( # pyright: ignore[reportGeneralTypeIssues] + async def finalize_invoice_async( self, **params: Unpack["InvoiceFinalizeInvoiceParams"] ) -> "Invoice": """ @@ -2769,7 +2825,7 @@ def mark_uncollectible( ... @class_method_variant("_cls_mark_uncollectible") - def mark_uncollectible( # pyright: ignore[reportGeneralTypeIssues] + def mark_uncollectible( self, **params: Unpack["InvoiceMarkUncollectibleParams"] ) -> "Invoice": """ @@ -2827,7 +2883,7 @@ async def mark_uncollectible_async( ... @class_method_variant("_cls_mark_uncollectible_async") - async def mark_uncollectible_async( # pyright: ignore[reportGeneralTypeIssues] + async def mark_uncollectible_async( self, **params: Unpack["InvoiceMarkUncollectibleParams"] ) -> "Invoice": """ @@ -2846,7 +2902,7 @@ async def mark_uncollectible_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def modify( - cls, id: str, **params: Unpack["InvoiceModifyParams"] + cls, id: str, /, **params: Unpack["InvoiceModifyParams"] ) -> "Invoice": """ Draft invoices are fully editable. Once an invoice is [finalized](https://docs.stripe.com/docs/billing/invoices/workflow#finalized), @@ -2869,7 +2925,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["InvoiceModifyParams"] + cls, id: str, /, **params: Unpack["InvoiceModifyParams"] ) -> "Invoice": """ Draft invoices are fully editable. Once an invoice is [finalized](https://docs.stripe.com/docs/billing/invoices/workflow#finalized), @@ -2926,9 +2982,7 @@ def pay(self, **params: Unpack["InvoicePayParams"]) -> "Invoice": ... @class_method_variant("_cls_pay") - def pay( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["InvoicePayParams"] - ) -> "Invoice": + def pay(self, **params: Unpack["InvoicePayParams"]) -> "Invoice": """ Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. """ @@ -2981,7 +3035,7 @@ async def pay_async( ... @class_method_variant("_cls_pay_async") - async def pay_async( # pyright: ignore[reportGeneralTypeIssues] + async def pay_async( self, **params: Unpack["InvoicePayParams"] ) -> "Invoice": """ @@ -3036,7 +3090,7 @@ def remove_lines( ... @class_method_variant("_cls_remove_lines") - def remove_lines( # pyright: ignore[reportGeneralTypeIssues] + def remove_lines( self, **params: Unpack["InvoiceRemoveLinesParams"] ) -> "Invoice": """ @@ -3091,7 +3145,7 @@ async def remove_lines_async( ... @class_method_variant("_cls_remove_lines_async") - async def remove_lines_async( # pyright: ignore[reportGeneralTypeIssues] + async def remove_lines_async( self, **params: Unpack["InvoiceRemoveLinesParams"] ) -> "Invoice": """ @@ -3174,7 +3228,7 @@ def send_invoice( ... @class_method_variant("_cls_send_invoice") - def send_invoice( # pyright: ignore[reportGeneralTypeIssues] + def send_invoice( self, **params: Unpack["InvoiceSendInvoiceParams"] ) -> "Invoice": """ @@ -3237,7 +3291,7 @@ async def send_invoice_async( ... @class_method_variant("_cls_send_invoice_async") - async def send_invoice_async( # pyright: ignore[reportGeneralTypeIssues] + async def send_invoice_async( self, **params: Unpack["InvoiceSendInvoiceParams"] ) -> "Invoice": """ @@ -3294,7 +3348,7 @@ def update_lines( ... @class_method_variant("_cls_update_lines") - def update_lines( # pyright: ignore[reportGeneralTypeIssues] + def update_lines( self, **params: Unpack["InvoiceUpdateLinesParams"] ) -> "Invoice": """ @@ -3349,7 +3403,7 @@ async def update_lines_async( ... @class_method_variant("_cls_update_lines_async") - async def update_lines_async( # pyright: ignore[reportGeneralTypeIssues] + async def update_lines_async( self, **params: Unpack["InvoiceUpdateLinesParams"] ) -> "Invoice": """ @@ -3410,7 +3464,7 @@ def void_invoice( ... @class_method_variant("_cls_void_invoice") - def void_invoice( # pyright: ignore[reportGeneralTypeIssues] + def void_invoice( self, **params: Unpack["InvoiceVoidInvoiceParams"] ) -> "Invoice": """ @@ -3473,7 +3527,7 @@ async def void_invoice_async( ... @class_method_variant("_cls_void_invoice_async") - async def void_invoice_async( # pyright: ignore[reportGeneralTypeIssues] + async def void_invoice_async( self, **params: Unpack["InvoiceVoidInvoiceParams"] ) -> "Invoice": """ @@ -3584,6 +3638,7 @@ async def list_lines_async( "rendering": Rendering, "shipping_cost": ShippingCost, "shipping_details": ShippingDetails, + "status_details": StatusDetails, "status_transitions": StatusTransitions, "threshold_reason": ThresholdReason, "total_discount_amounts": TotalDiscountAmount, diff --git a/stripe/_invoice_item.py b/stripe/_invoice_item.py index 7ef5dc5ba..15e52d004 100644 --- a/stripe/_invoice_item.py +++ b/stripe/_invoice_item.py @@ -54,6 +54,12 @@ class InvoiceItem( OBJECT_NAME: ClassVar[Literal["invoiceitem"]] = "invoiceitem" + class InvoicingRule(StripeObject): + type: Union[Literal["defer_until_credited_items_resolved"], str] + """ + The type of invoicing rule. + """ + class ManagedPayments(StripeObject): enabled: bool """ @@ -333,6 +339,10 @@ class DiscountAmount(StripeObject): """ The ID of the invoice this invoice item belongs to. """ + invoicing_rules: Optional[List[InvoicingRule]] + """ + The rules that control when this invoice item is eligible for invoicing. All rules must be satisfied for the item to be invoiced. + """ livemode: bool """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. @@ -419,7 +429,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["InvoiceItemDeleteParams"] + cls, sid: str, /, **params: Unpack["InvoiceItemDeleteParams"] ) -> "InvoiceItem": """ Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. @@ -437,7 +447,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["InvoiceItemDeleteParams"] + sid: str, /, **params: Unpack["InvoiceItemDeleteParams"] ) -> "InvoiceItem": """ Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. @@ -454,7 +464,7 @@ def delete( ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] + def delete( self, **params: Unpack["InvoiceItemDeleteParams"] ) -> "InvoiceItem": """ @@ -468,7 +478,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["InvoiceItemDeleteParams"] + cls, sid: str, /, **params: Unpack["InvoiceItemDeleteParams"] ) -> "InvoiceItem": """ Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. @@ -486,7 +496,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["InvoiceItemDeleteParams"] + sid: str, /, **params: Unpack["InvoiceItemDeleteParams"] ) -> "InvoiceItem": """ Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. @@ -503,7 +513,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["InvoiceItemDeleteParams"] ) -> "InvoiceItem": """ @@ -557,7 +567,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["InvoiceItemModifyParams"] + cls, id: str, /, **params: Unpack["InvoiceItemModifyParams"] ) -> "InvoiceItem": """ Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed. @@ -574,7 +584,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["InvoiceItemModifyParams"] + cls, id: str, /, **params: Unpack["InvoiceItemModifyParams"] ) -> "InvoiceItem": """ Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed. @@ -612,6 +622,7 @@ async def retrieve_async( return instance _inner_class_types = { + "invoicing_rules": InvoicingRule, "managed_payments": ManagedPayments, "parent": Parent, "period": Period, diff --git a/stripe/_invoice_rendering_template.py b/stripe/_invoice_rendering_template.py index 6486596eb..f4516581d 100644 --- a/stripe/_invoice_rendering_template.py +++ b/stripe/_invoice_rendering_template.py @@ -109,7 +109,7 @@ def archive( ... @class_method_variant("_cls_archive") - def archive( # pyright: ignore[reportGeneralTypeIssues] + def archive( self, **params: Unpack["InvoiceRenderingTemplateArchiveParams"] ) -> "InvoiceRenderingTemplate": """ @@ -169,7 +169,7 @@ async def archive_async( ... @class_method_variant("_cls_archive_async") - async def archive_async( # pyright: ignore[reportGeneralTypeIssues] + async def archive_async( self, **params: Unpack["InvoiceRenderingTemplateArchiveParams"] ) -> "InvoiceRenderingTemplate": """ @@ -295,7 +295,7 @@ def unarchive( ... @class_method_variant("_cls_unarchive") - def unarchive( # pyright: ignore[reportGeneralTypeIssues] + def unarchive( self, **params: Unpack["InvoiceRenderingTemplateUnarchiveParams"] ) -> "InvoiceRenderingTemplate": """ @@ -355,7 +355,7 @@ async def unarchive_async( ... @class_method_variant("_cls_unarchive_async") - async def unarchive_async( # pyright: ignore[reportGeneralTypeIssues] + async def unarchive_async( self, **params: Unpack["InvoiceRenderingTemplateUnarchiveParams"] ) -> "InvoiceRenderingTemplate": """ diff --git a/stripe/_mandate.py b/stripe/_mandate.py index 6a32ab4ed..b534a3d64 100644 --- a/stripe/_mandate.py +++ b/stripe/_mandate.py @@ -138,7 +138,27 @@ class Blik(StripeObject): """ class Card(StripeObject): - pass + class India(StripeObject): + inactive_reason: Optional[ + Union[ + Literal[ + "canceled", + "card_not_supported", + "currency_not_supported", + "expired", + "issuer_not_supported", + "processing_error", + "undetermined", + ], + str, + ] + ] + """ + The reason why the mandate has an `inactive` status. This field is only populated if the mandate is inactive. + """ + + india: Optional[India] + _inner_class_types = {"india": India} class Cashapp(StripeObject): pass diff --git a/stripe/_margin.py b/stripe/_margin.py index 2d67bad70..533b6ed4e 100644 --- a/stripe/_margin.py +++ b/stripe/_margin.py @@ -136,7 +136,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["MarginModifyParams"] + cls, id: str, /, **params: Unpack["MarginModifyParams"] ) -> "Margin": """ Update the specified margin object. Certain fields of the margin object are not editable. @@ -153,7 +153,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["MarginModifyParams"] + cls, id: str, /, **params: Unpack["MarginModifyParams"] ) -> "Margin": """ Update the specified margin object. Certain fields of the margin object are not editable. diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index ba69d6dc7..67ebf0b40 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -344,6 +344,10 @@ "stripe.radar._account_evaluation", "AccountEvaluation", ), + "radar.billing_evaluation": ( + "stripe.radar._billing_evaluation", + "BillingEvaluation", + ), "radar.customer_evaluation": ( "stripe.radar._customer_evaluation", "CustomerEvaluation", @@ -375,7 +379,6 @@ "stripe._reserve_transaction", "ReserveTransaction", ), - "transfer_reversal": ("stripe._reversal", "Reversal"), "review": ("stripe._review", "Review"), "risk_signals": ("stripe._risk_signals", "RiskSignals"), "setup_attempt": ("stripe._setup_attempt", "SetupAttempt"), @@ -450,9 +453,14 @@ "stripe.test_helpers._test_clock", "TestClock", ), + "three_d_secure.authentication": ( + "stripe.three_d_secure._authentication", + "Authentication", + ), "token": ("stripe._token", "Token"), "topup": ("stripe._topup", "Topup"), "transfer": ("stripe._transfer", "Transfer"), + "transfer_reversal": ("stripe._transfer_reversal", "TransferReversal"), "transit_balance": ("stripe._transit_balance", "TransitBalance"), "treasury.credit_reversal": ( "stripe.treasury._credit_reversal", @@ -660,23 +668,19 @@ "stripe.v2.data.analytics._metric_query_result", "MetricQueryResult", ), + "v2.data.query_run": ("stripe.v2.data._query_run", "QueryRun"), + "v2.data.report": ("stripe.v2.data._report", "Report"), "v2.data.reporting.query_run": ( "stripe.v2.data.reporting._query_run", "QueryRun", ), + "v2.data.report_run": ("stripe.v2.data._report_run", "ReportRun"), + "v2.data.schema": ("stripe.v2.data._schema", "Schema"), "v2.extend.workflow": ("stripe.v2.extend._workflow", "Workflow"), "v2.extend.workflow_run": ( "stripe.v2.extend._workflow_run", "WorkflowRun", ), - "financial_address_credit_simulation": ( - "stripe.v2._financial_address_credit_simulation", - "FinancialAddressCreditSimulation", - ), - "financial_address_generated_microdeposits": ( - "stripe.v2._financial_address_generated_microdeposits", - "FinancialAddressGeneratedMicrodeposits", - ), "v2.iam.activity_log": ("stripe.v2.iam._activity_log", "ActivityLog"), "v2.iam.api_key": ("stripe.v2.iam._api_key", "ApiKey"), "v2.money_management.adjustment": ( @@ -691,6 +695,14 @@ "stripe.v2.money_management._debit_dispute", "DebitDispute", ), + "v2.money_management.earned_credit": ( + "stripe.v2.money_management._earned_credit", + "EarnedCredit", + ), + "v2.money_management.earned_credit_simulation": ( + "stripe.v2.money_management._earned_credit_simulation", + "EarnedCreditSimulation", + ), "v2.money_management.financial_account": ( "stripe.v2.money_management._financial_account", "FinancialAccount", @@ -711,10 +723,18 @@ "stripe.v2.money_management._financial_address", "FinancialAddress", ), + "v2.money_management.financial_address_credit_simulation": ( + "stripe.v2.money_management._financial_address_credit_simulation", + "FinancialAddressCreditSimulation", + ), "v2.money_management.financial_address_debit_simulation": ( "stripe.v2.money_management._financial_address_debit_simulation", "FinancialAddressDebitSimulation", ), + "v2.money_management.financial_address_generated_microdeposits": ( + "stripe.v2.money_management._financial_address_generated_microdeposits", + "FinancialAddressGeneratedMicrodeposits", + ), "v2.money_management.inbound_transfer": ( "stripe.v2.money_management._inbound_transfer", "InboundTransfer", @@ -824,6 +844,10 @@ "stripe.v2.provisioning._resource", "Resource", ), + "v2.provisioning.resource_access_configuration": ( + "stripe.v2.provisioning._resource_access_configuration", + "ResourceAccessConfiguration", + ), "v2.reporting.report": ("stripe.v2.reporting._report", "Report"), "v2.reporting.report_run": ( "stripe.v2.reporting._report_run", diff --git a/stripe/_order.py b/stripe/_order.py index 97a2611ac..7cdc56a52 100644 --- a/stripe/_order.py +++ b/stripe/_order.py @@ -1198,7 +1198,9 @@ async def list_async( return result @classmethod - def modify(cls, id: str, **params: Unpack["OrderModifyParams"]) -> "Order": + def modify( + cls, id: str, /, **params: Unpack["OrderModifyParams"] + ) -> "Order": """ Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged. """ @@ -1214,7 +1216,7 @@ def modify(cls, id: str, **params: Unpack["OrderModifyParams"]) -> "Order": @classmethod async def modify_async( - cls, id: str, **params: Unpack["OrderModifyParams"] + cls, id: str, /, **params: Unpack["OrderModifyParams"] ) -> "Order": """ Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -1283,9 +1285,7 @@ def submit(self, **params: Unpack["OrderSubmitParams"]) -> "Order": ... @class_method_variant("_cls_submit") - def submit( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OrderSubmitParams"] - ) -> "Order": + def submit(self, **params: Unpack["OrderSubmitParams"]) -> "Order": """ Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://docs.stripe.com/api#reopen_order) method is called. """ @@ -1336,7 +1336,7 @@ async def submit_async( ... @class_method_variant("_cls_submit_async") - async def submit_async( # pyright: ignore[reportGeneralTypeIssues] + async def submit_async( self, **params: Unpack["OrderSubmitParams"] ) -> "Order": """ diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 79e62847d..3713ab4d7 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -2179,6 +2179,10 @@ class UsBankAccount(StripeObject): """ The ACH payment reference for this transaction. """ + return_code: Optional[str] + """ + NACHA ACH return code for a failed US bank account payment. + """ routing_number: Optional[str] """ The routing number for the bank account. @@ -2645,7 +2649,7 @@ def report_authenticated( ... @class_method_variant("_cls_report_authenticated") - def report_authenticated( # pyright: ignore[reportGeneralTypeIssues] + def report_authenticated( self, **params: Unpack["PaymentAttemptRecordReportAuthenticatedParams"] ) -> "PaymentAttemptRecord": """ @@ -2705,7 +2709,7 @@ async def report_authenticated_async( ... @class_method_variant("_cls_report_authenticated_async") - async def report_authenticated_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_authenticated_async( self, **params: Unpack["PaymentAttemptRecordReportAuthenticatedParams"] ) -> "PaymentAttemptRecord": """ @@ -2765,7 +2769,7 @@ def report_authorized( ... @class_method_variant("_cls_report_authorized") - def report_authorized( # pyright: ignore[reportGeneralTypeIssues] + def report_authorized( self, **params: Unpack["PaymentAttemptRecordReportAuthorizedParams"] ) -> "PaymentAttemptRecord": """ @@ -2825,7 +2829,7 @@ async def report_authorized_async( ... @class_method_variant("_cls_report_authorized_async") - async def report_authorized_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_authorized_async( self, **params: Unpack["PaymentAttemptRecordReportAuthorizedParams"] ) -> "PaymentAttemptRecord": """ @@ -2885,7 +2889,7 @@ def report_canceled( ... @class_method_variant("_cls_report_canceled") - def report_canceled( # pyright: ignore[reportGeneralTypeIssues] + def report_canceled( self, **params: Unpack["PaymentAttemptRecordReportCanceledParams"] ) -> "PaymentAttemptRecord": """ @@ -2945,7 +2949,7 @@ async def report_canceled_async( ... @class_method_variant("_cls_report_canceled_async") - async def report_canceled_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_canceled_async( self, **params: Unpack["PaymentAttemptRecordReportCanceledParams"] ) -> "PaymentAttemptRecord": """ @@ -3006,7 +3010,7 @@ def report_early_fraud_warning( ... @class_method_variant("_cls_report_early_fraud_warning") - def report_early_fraud_warning( # pyright: ignore[reportGeneralTypeIssues] + def report_early_fraud_warning( self, **params: Unpack["PaymentAttemptRecordReportEarlyFraudWarningParams"], ) -> "PaymentAttemptRecord": @@ -3068,7 +3072,7 @@ async def report_early_fraud_warning_async( ... @class_method_variant("_cls_report_early_fraud_warning_async") - async def report_early_fraud_warning_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_early_fraud_warning_async( self, **params: Unpack["PaymentAttemptRecordReportEarlyFraudWarningParams"], ) -> "PaymentAttemptRecord": @@ -3129,7 +3133,7 @@ def report_failed( ... @class_method_variant("_cls_report_failed") - def report_failed( # pyright: ignore[reportGeneralTypeIssues] + def report_failed( self, **params: Unpack["PaymentAttemptRecordReportFailedParams"] ) -> "PaymentAttemptRecord": """ @@ -3189,7 +3193,7 @@ async def report_failed_async( ... @class_method_variant("_cls_report_failed_async") - async def report_failed_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_failed_async( self, **params: Unpack["PaymentAttemptRecordReportFailedParams"] ) -> "PaymentAttemptRecord": """ @@ -3249,7 +3253,7 @@ def report_guaranteed( ... @class_method_variant("_cls_report_guaranteed") - def report_guaranteed( # pyright: ignore[reportGeneralTypeIssues] + def report_guaranteed( self, **params: Unpack["PaymentAttemptRecordReportGuaranteedParams"] ) -> "PaymentAttemptRecord": """ @@ -3309,7 +3313,7 @@ async def report_guaranteed_async( ... @class_method_variant("_cls_report_guaranteed_async") - async def report_guaranteed_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_guaranteed_async( self, **params: Unpack["PaymentAttemptRecordReportGuaranteedParams"] ) -> "PaymentAttemptRecord": """ @@ -3369,7 +3373,7 @@ def report_informational( ... @class_method_variant("_cls_report_informational") - def report_informational( # pyright: ignore[reportGeneralTypeIssues] + def report_informational( self, **params: Unpack["PaymentAttemptRecordReportInformationalParams"] ) -> "PaymentAttemptRecord": """ @@ -3429,7 +3433,7 @@ async def report_informational_async( ... @class_method_variant("_cls_report_informational_async") - async def report_informational_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_informational_async( self, **params: Unpack["PaymentAttemptRecordReportInformationalParams"] ) -> "PaymentAttemptRecord": """ @@ -3489,7 +3493,7 @@ def report_refund( ... @class_method_variant("_cls_report_refund") - def report_refund( # pyright: ignore[reportGeneralTypeIssues] + def report_refund( self, **params: Unpack["PaymentAttemptRecordReportRefundParams"] ) -> "PaymentAttemptRecord": """ @@ -3549,7 +3553,7 @@ async def report_refund_async( ... @class_method_variant("_cls_report_refund_async") - async def report_refund_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_refund_async( self, **params: Unpack["PaymentAttemptRecordReportRefundParams"] ) -> "PaymentAttemptRecord": """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index fe39d1638..4a3aa343d 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -322,7 +322,7 @@ class Tax(StripeObject): class LastPaymentError(StripeObject): advice_code: Optional[str] """ - For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines#retrying-issuer-declines) if they provide one. + For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines/card#retrying-issuer-declines) if they provide one. """ charge: Optional[str] """ @@ -383,6 +383,7 @@ class LastPaymentError(StripeObject): "customer_session_expired", "customer_tax_location_invalid", "debit_not_authorized", + "dispute_evidence_page_limit_exceeded", "email_invalid", "expired_card", "expired_payment_method", @@ -393,6 +394,8 @@ class LastPaymentError(StripeObject): "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", + "financial_connections_consent_locale_invalid", + "financial_connections_consent_locale_unsupported", "financial_connections_institution_unavailable", "financial_connections_no_successful_transaction_refresh", "forwarding_api_inactive", @@ -447,6 +450,7 @@ class LastPaymentError(StripeObject): "parameter_missing", "parameter_unknown", "parameters_exclusive", + "payment_evaluation_on_api_version_not_supported", "payment_intent_action_required", "payment_intent_authentication_failure", "payment_intent_incompatible_payment_method", @@ -3927,6 +3931,12 @@ class Address(StripeObject): """ Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. """ + request_card_account_update: Optional[ + Literal["if_available", "never"] + ] + """ + Indicates whether Stripe may synchronously request a real-time card account update for this confirmation. `if_available` allows the update; `never` opts out. Defaults to `if_available` and is omitted from the response unless explicitly set on this confirmation. This does not affect batch Card Account Updater. + """ request_decremental_authorization: Optional[ Union[Literal["if_available", "never"], str] ] @@ -5597,6 +5607,7 @@ class PaymentData(StripeObject): "boleto", "capchase_pay", "card", + "card_present", "cashapp", "check_scan", "click_to_pay", @@ -5617,6 +5628,7 @@ class PaymentData(StripeObject): "grabpay", "id_bank_transfer", "ideal", + "interac_present", "kakao_pay", "klarna", "knet", @@ -6055,7 +6067,7 @@ def apply_customer_balance( ... @class_method_variant("_cls_apply_customer_balance") - def apply_customer_balance( # pyright: ignore[reportGeneralTypeIssues] + def apply_customer_balance( self, **params: Unpack["PaymentIntentApplyCustomerBalanceParams"] ) -> "PaymentIntent": """ @@ -6115,7 +6127,7 @@ async def apply_customer_balance_async( ... @class_method_variant("_cls_apply_customer_balance_async") - async def apply_customer_balance_async( # pyright: ignore[reportGeneralTypeIssues] + async def apply_customer_balance_async( self, **params: Unpack["PaymentIntentApplyCustomerBalanceParams"] ) -> "PaymentIntent": """ @@ -6182,7 +6194,7 @@ def cancel( ... @class_method_variant("_cls_cancel") - def cancel( # pyright: ignore[reportGeneralTypeIssues] + def cancel( self, **params: Unpack["PaymentIntentCancelParams"] ) -> "PaymentIntent": """ @@ -6253,7 +6265,7 @@ async def cancel_async( ... @class_method_variant("_cls_cancel_async") - async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_async( self, **params: Unpack["PaymentIntentCancelParams"] ) -> "PaymentIntent": """ @@ -6324,7 +6336,7 @@ def capture( ... @class_method_variant("_cls_capture") - def capture( # pyright: ignore[reportGeneralTypeIssues] + def capture( self, **params: Unpack["PaymentIntentCaptureParams"] ) -> "PaymentIntent": """ @@ -6395,7 +6407,7 @@ async def capture_async( ... @class_method_variant("_cls_capture_async") - async def capture_async( # pyright: ignore[reportGeneralTypeIssues] + async def capture_async( self, **params: Unpack["PaymentIntentCaptureParams"] ) -> "PaymentIntent": """ @@ -6541,7 +6553,7 @@ def confirm( ... @class_method_variant("_cls_confirm") - def confirm( # pyright: ignore[reportGeneralTypeIssues] + def confirm( self, **params: Unpack["PaymentIntentConfirmParams"] ) -> "PaymentIntent": """ @@ -6712,7 +6724,7 @@ async def confirm_async( ... @class_method_variant("_cls_confirm_async") - async def confirm_async( # pyright: ignore[reportGeneralTypeIssues] + async def confirm_async( self, **params: Unpack["PaymentIntentConfirmParams"] ) -> "PaymentIntent": """ @@ -6896,7 +6908,7 @@ def decrement_authorization( ... @class_method_variant("_cls_decrement_authorization") - def decrement_authorization( # pyright: ignore[reportGeneralTypeIssues] + def decrement_authorization( self, **params: Unpack["PaymentIntentDecrementAuthorizationParams"] ) -> "PaymentIntent": """ @@ -7016,7 +7028,7 @@ async def decrement_authorization_async( ... @class_method_variant("_cls_decrement_authorization_async") - async def decrement_authorization_async( # pyright: ignore[reportGeneralTypeIssues] + async def decrement_authorization_async( self, **params: Unpack["PaymentIntentDecrementAuthorizationParams"] ) -> "PaymentIntent": """ @@ -7166,7 +7178,7 @@ def increment_authorization( ... @class_method_variant("_cls_increment_authorization") - def increment_authorization( # pyright: ignore[reportGeneralTypeIssues] + def increment_authorization( self, **params: Unpack["PaymentIntentIncrementAuthorizationParams"] ) -> "PaymentIntent": """ @@ -7326,7 +7338,7 @@ async def increment_authorization_async( ... @class_method_variant("_cls_increment_authorization_async") - async def increment_authorization_async( # pyright: ignore[reportGeneralTypeIssues] + async def increment_authorization_async( self, **params: Unpack["PaymentIntentIncrementAuthorizationParams"] ) -> "PaymentIntent": """ @@ -7410,7 +7422,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["PaymentIntentModifyParams"] + cls, id: str, /, **params: Unpack["PaymentIntentModifyParams"] ) -> "PaymentIntent": """ Updates properties on a PaymentIntent object without confirming. @@ -7433,7 +7445,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PaymentIntentModifyParams"] + cls, id: str, /, **params: Unpack["PaymentIntentModifyParams"] ) -> "PaymentIntent": """ Updates properties on a PaymentIntent object without confirming. @@ -7513,7 +7525,7 @@ def reauthorize( ... @class_method_variant("_cls_reauthorize") - def reauthorize( # pyright: ignore[reportGeneralTypeIssues] + def reauthorize( self, **params: Unpack["PaymentIntentReauthorizeParams"] ) -> "PaymentIntent": """ @@ -7596,7 +7608,7 @@ async def reauthorize_async( ... @class_method_variant("_cls_reauthorize_async") - async def reauthorize_async( # pyright: ignore[reportGeneralTypeIssues] + async def reauthorize_async( self, **params: Unpack["PaymentIntentReauthorizeParams"] ) -> "PaymentIntent": """ @@ -7691,7 +7703,7 @@ def trigger_action( ... @class_method_variant("_cls_trigger_action") - def trigger_action( # pyright: ignore[reportGeneralTypeIssues] + def trigger_action( self, **params: Unpack["PaymentIntentTriggerActionParams"] ) -> "PaymentIntent": """ @@ -7749,7 +7761,7 @@ async def trigger_action_async( ... @class_method_variant("_cls_trigger_action_async") - async def trigger_action_async( # pyright: ignore[reportGeneralTypeIssues] + async def trigger_action_async( self, **params: Unpack["PaymentIntentTriggerActionParams"] ) -> "PaymentIntent": """ @@ -7809,7 +7821,7 @@ def update_crypto_refund_address( ... @class_method_variant("_cls_update_crypto_refund_address") - def update_crypto_refund_address( # pyright: ignore[reportGeneralTypeIssues] + def update_crypto_refund_address( self, **params: Unpack["PaymentIntentUpdateCryptoRefundAddressParams"] ) -> "PaymentIntent": """ @@ -7869,7 +7881,7 @@ async def update_crypto_refund_address_async( ... @class_method_variant("_cls_update_crypto_refund_address_async") - async def update_crypto_refund_address_async( # pyright: ignore[reportGeneralTypeIssues] + async def update_crypto_refund_address_async( self, **params: Unpack["PaymentIntentUpdateCryptoRefundAddressParams"] ) -> "PaymentIntent": """ @@ -7929,7 +7941,7 @@ def verify_microdeposits( ... @class_method_variant("_cls_verify_microdeposits") - def verify_microdeposits( # pyright: ignore[reportGeneralTypeIssues] + def verify_microdeposits( self, **params: Unpack["PaymentIntentVerifyMicrodepositsParams"] ) -> "PaymentIntent": """ @@ -7989,7 +8001,7 @@ async def verify_microdeposits_async( ... @class_method_variant("_cls_verify_microdeposits_async") - async def verify_microdeposits_async( # pyright: ignore[reportGeneralTypeIssues] + async def verify_microdeposits_async( self, **params: Unpack["PaymentIntentVerifyMicrodepositsParams"] ) -> "PaymentIntent": """ @@ -8134,7 +8146,7 @@ def simulate_crypto_deposit( ... @class_method_variant("_cls_simulate_crypto_deposit") - def simulate_crypto_deposit( # pyright: ignore[reportGeneralTypeIssues] + def simulate_crypto_deposit( self, **params: Unpack["PaymentIntentSimulateCryptoDepositParams"] ) -> "PaymentIntent": """ @@ -8194,7 +8206,7 @@ async def simulate_crypto_deposit_async( ... @class_method_variant("_cls_simulate_crypto_deposit_async") - async def simulate_crypto_deposit_async( # pyright: ignore[reportGeneralTypeIssues] + async def simulate_crypto_deposit_async( self, **params: Unpack["PaymentIntentSimulateCryptoDepositParams"] ) -> "PaymentIntent": """ diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index 2b67a8de1..5c5bcc26e 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -759,6 +759,12 @@ class Issuer(StripeObject): class TrialSettings(StripeObject): class EndBehavior(StripeObject): + billing_cycle_anchor: Optional[ + Union[Literal["now", "unchanged"], str] + ] + """ + Indicates how the subscription's billing cycle anchor is reset when a trial ends. If not set, the default is `now`. + """ missing_payment_method: Union[ Literal["cancel", "create_invoice", "pause"], str ] @@ -848,7 +854,7 @@ class TransferData(StripeObject): """ custom_fields: List[CustomField] """ - Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`. + Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `elements`. """ custom_text: CustomText customer_creation: Union[Literal["always", "if_required"], str] @@ -950,6 +956,7 @@ class TransferData(StripeObject): "rechnung", "satispay", "sepa_debit", + "sequra", "shopeepay", "sofort", "sunbit", @@ -1115,7 +1122,7 @@ def list_line_items( ... @class_method_variant("_cls_list_line_items") - def list_line_items( # pyright: ignore[reportGeneralTypeIssues] + def list_line_items( self, **params: Unpack["PaymentLinkListLineItemsParams"] ) -> ListObject["LineItem"]: """ @@ -1175,7 +1182,7 @@ async def list_line_items_async( ... @class_method_variant("_cls_list_line_items_async") - async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] + async def list_line_items_async( self, **params: Unpack["PaymentLinkListLineItemsParams"] ) -> ListObject["LineItem"]: """ @@ -1194,7 +1201,7 @@ async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def modify( - cls, id: str, **params: Unpack["PaymentLinkModifyParams"] + cls, id: str, /, **params: Unpack["PaymentLinkModifyParams"] ) -> "PaymentLink": """ Updates a payment link. @@ -1211,7 +1218,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PaymentLinkModifyParams"] + cls, id: str, /, **params: Unpack["PaymentLinkModifyParams"] ) -> "PaymentLink": """ Updates a payment link. diff --git a/stripe/_payment_location.py b/stripe/_payment_location.py index b49da585f..f687d441d 100644 --- a/stripe/_payment_location.py +++ b/stripe/_payment_location.py @@ -176,7 +176,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["PaymentLocationDeleteParams"] + cls, sid: str, /, **params: Unpack["PaymentLocationDeleteParams"] ) -> "PaymentLocation": """ Delete a Payment Location. @@ -194,7 +194,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["PaymentLocationDeleteParams"] + sid: str, /, **params: Unpack["PaymentLocationDeleteParams"] ) -> "PaymentLocation": """ Delete a Payment Location. @@ -211,7 +211,7 @@ def delete( ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] + def delete( self, **params: Unpack["PaymentLocationDeleteParams"] ) -> "PaymentLocation": """ @@ -225,7 +225,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["PaymentLocationDeleteParams"] + cls, sid: str, /, **params: Unpack["PaymentLocationDeleteParams"] ) -> "PaymentLocation": """ Delete a Payment Location. @@ -243,7 +243,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["PaymentLocationDeleteParams"] + sid: str, /, **params: Unpack["PaymentLocationDeleteParams"] ) -> "PaymentLocation": """ Delete a Payment Location. @@ -260,7 +260,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["PaymentLocationDeleteParams"] ) -> "PaymentLocation": """ @@ -314,7 +314,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["PaymentLocationModifyParams"] + cls, id: str, /, **params: Unpack["PaymentLocationModifyParams"] ) -> "PaymentLocation": """ Update a Payment Location. @@ -331,7 +331,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PaymentLocationModifyParams"] + cls, id: str, /, **params: Unpack["PaymentLocationModifyParams"] ) -> "PaymentLocation": """ Update a Payment Location. diff --git a/stripe/_payment_location_capability.py b/stripe/_payment_location_capability.py index b671437cc..b34b7b05f 100644 --- a/stripe/_payment_location_capability.py +++ b/stripe/_payment_location_capability.py @@ -151,7 +151,10 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["PaymentLocationCapabilityModifyParams"] + cls, + id: str, + /, + **params: Unpack["PaymentLocationCapabilityModifyParams"], ) -> "PaymentLocationCapability": """ Updates a payment_location capability. Request or remove a payment_location capability by updating its requested parameter. @@ -168,7 +171,10 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PaymentLocationCapabilityModifyParams"] + cls, + id: str, + /, + **params: Unpack["PaymentLocationCapabilityModifyParams"], ) -> "PaymentLocationCapability": """ Updates a payment_location capability. Request or remove a payment_location capability by updating its requested parameter. diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index a6ed710ae..182c09a61 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -1499,6 +1499,9 @@ class GeneratedFrom(StripeObject): """ _inner_class_types = {"generated_from": GeneratedFrom} + class Sequra(StripeObject): + pass + class Shopeepay(StripeObject): pass @@ -1743,6 +1746,7 @@ class Zip(StripeObject): satispay: Optional[Satispay] scalapay: Optional[Scalapay] sepa_debit: Optional[SepaDebit] + sequra: Optional[Sequra] shared_payment_granted_token: Optional[str] """ ID of the shared payment granted token used in the creation of this PaymentMethod. @@ -1913,7 +1917,7 @@ def attach( ... @class_method_variant("_cls_attach") - def attach( # pyright: ignore[reportGeneralTypeIssues] + def attach( self, **params: Unpack["PaymentMethodAttachParams"] ) -> "PaymentMethod": """ @@ -2019,7 +2023,7 @@ async def attach_async( ... @class_method_variant("_cls_attach_async") - async def attach_async( # pyright: ignore[reportGeneralTypeIssues] + async def attach_async( self, **params: Unpack["PaymentMethodAttachParams"] ) -> "PaymentMethod": """ @@ -2091,7 +2095,7 @@ def check_balance( ... @class_method_variant("_cls_check_balance") - def check_balance( # pyright: ignore[reportGeneralTypeIssues] + def check_balance( self, **params: Unpack["PaymentMethodCheckBalanceParams"] ) -> "PaymentMethodBalance": """ @@ -2151,7 +2155,7 @@ async def check_balance_async( ... @class_method_variant("_cls_check_balance_async") - async def check_balance_async( # pyright: ignore[reportGeneralTypeIssues] + async def check_balance_async( self, **params: Unpack["PaymentMethodCheckBalanceParams"] ) -> "PaymentMethodBalance": """ @@ -2245,7 +2249,7 @@ def detach( ... @class_method_variant("_cls_detach") - def detach( # pyright: ignore[reportGeneralTypeIssues] + def detach( self, **params: Unpack["PaymentMethodDetachParams"] ) -> "PaymentMethod": """ @@ -2303,7 +2307,7 @@ async def detach_async( ... @class_method_variant("_cls_detach_async") - async def detach_async( # pyright: ignore[reportGeneralTypeIssues] + async def detach_async( self, **params: Unpack["PaymentMethodDetachParams"] ) -> "PaymentMethod": """ @@ -2362,7 +2366,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["PaymentMethodModifyParams"] + cls, id: str, /, **params: Unpack["PaymentMethodModifyParams"] ) -> "PaymentMethod": """ Updates a PaymentMethod object. A PaymentMethod must be attached to a customer to be updated. @@ -2379,7 +2383,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PaymentMethodModifyParams"] + cls, id: str, /, **params: Unpack["PaymentMethodModifyParams"] ) -> "PaymentMethod": """ Updates a PaymentMethod object. A PaymentMethod must be attached to a customer to be updated. @@ -2475,6 +2479,7 @@ async def retrieve_async( "satispay": Satispay, "scalapay": Scalapay, "sepa_debit": SepaDebit, + "sequra": Sequra, "shopeepay": Shopeepay, "sofort": Sofort, "stripe_balance": StripeBalance, diff --git a/stripe/_payment_method_configuration.py b/stripe/_payment_method_configuration.py index 991bf96ed..f1450375f 100644 --- a/stripe/_payment_method_configuration.py +++ b/stripe/_payment_method_configuration.py @@ -1238,6 +1238,28 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} + class Sequra(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 Shopeepay(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -1544,6 +1566,7 @@ class DisplayPreference(StripeObject): satispay: Optional[Satispay] scalapay: Optional[Scalapay] sepa_debit: Optional[SepaDebit] + sequra: Optional[Sequra] shopeepay: Optional[Shopeepay] sofort: Optional[Sofort] sunbit: Optional[Sunbit] @@ -1631,6 +1654,7 @@ async def list_async( def modify( cls, id: str, + /, **params: Unpack["PaymentMethodConfigurationModifyParams"], ) -> "PaymentMethodConfiguration": """ @@ -1650,6 +1674,7 @@ def modify( async def modify_async( cls, id: str, + /, **params: Unpack["PaymentMethodConfigurationModifyParams"], ) -> "PaymentMethodConfiguration": """ @@ -1746,6 +1771,7 @@ async def retrieve_async( "satispay": Satispay, "scalapay": Scalapay, "sepa_debit": SepaDebit, + "sequra": Sequra, "shopeepay": Shopeepay, "sofort": Sofort, "sunbit": Sunbit, diff --git a/stripe/_payment_method_domain.py b/stripe/_payment_method_domain.py index d60833b78..52ec77b94 100644 --- a/stripe/_payment_method_domain.py +++ b/stripe/_payment_method_domain.py @@ -268,7 +268,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["PaymentMethodDomainModifyParams"] + cls, id: str, /, **params: Unpack["PaymentMethodDomainModifyParams"] ) -> "PaymentMethodDomain": """ Updates an existing payment method domain. @@ -285,7 +285,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PaymentMethodDomainModifyParams"] + cls, id: str, /, **params: Unpack["PaymentMethodDomainModifyParams"] ) -> "PaymentMethodDomain": """ Updates an existing payment method domain. @@ -380,7 +380,7 @@ def validate( ... @class_method_variant("_cls_validate") - def validate( # pyright: ignore[reportGeneralTypeIssues] + def validate( self, **params: Unpack["PaymentMethodDomainValidateParams"] ) -> "PaymentMethodDomain": """ @@ -460,7 +460,7 @@ async def validate_async( ... @class_method_variant("_cls_validate_async") - async def validate_async( # pyright: ignore[reportGeneralTypeIssues] + async def validate_async( self, **params: Unpack["PaymentMethodDomainValidateParams"] ) -> "PaymentMethodDomain": """ diff --git a/stripe/_payment_plan.py b/stripe/_payment_plan.py index eb929fb29..fd87dc2f2 100644 --- a/stripe/_payment_plan.py +++ b/stripe/_payment_plan.py @@ -263,7 +263,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["PaymentPlanModifyParams"] + cls, id: str, /, **params: Unpack["PaymentPlanModifyParams"] ) -> "PaymentPlan": """ Updates the schedule or metadata of an existing payment plan. Only unpaid installments can be updated. @@ -280,7 +280,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PaymentPlanModifyParams"] + cls, id: str, /, **params: Unpack["PaymentPlanModifyParams"] ) -> "PaymentPlan": """ Updates the schedule or metadata of an existing payment plan. Only unpaid installments can be updated. diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index f49a1dfe2..940516d18 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -2194,6 +2194,10 @@ class UsBankAccount(StripeObject): """ The ACH payment reference for this transaction. """ + return_code: Optional[str] + """ + NACHA ACH return code for a failed US bank account payment. + """ routing_number: Optional[str] """ The routing number for the bank account. @@ -2658,7 +2662,7 @@ def report_dispute( ... @class_method_variant("_cls_report_dispute") - def report_dispute( # pyright: ignore[reportGeneralTypeIssues] + def report_dispute( self, **params: Unpack["PaymentRecordReportDisputeParams"] ) -> "PaymentRecord": """ @@ -2717,7 +2721,7 @@ async def report_dispute_async( ... @class_method_variant("_cls_report_dispute_async") - async def report_dispute_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_dispute_async( self, **params: Unpack["PaymentRecordReportDisputeParams"] ) -> "PaymentRecord": """ @@ -2815,7 +2819,7 @@ def report_payment_attempt( ... @class_method_variant("_cls_report_payment_attempt") - def report_payment_attempt( # pyright: ignore[reportGeneralTypeIssues] + def report_payment_attempt( self, **params: Unpack["PaymentRecordReportPaymentAttemptParams"] ) -> "PaymentRecord": """ @@ -2877,7 +2881,7 @@ async def report_payment_attempt_async( ... @class_method_variant("_cls_report_payment_attempt_async") - async def report_payment_attempt_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_payment_attempt_async( self, **params: Unpack["PaymentRecordReportPaymentAttemptParams"] ) -> "PaymentRecord": """ @@ -2942,7 +2946,7 @@ def report_payment_attempt_canceled( ... @class_method_variant("_cls_report_payment_attempt_canceled") - def report_payment_attempt_canceled( # pyright: ignore[reportGeneralTypeIssues] + def report_payment_attempt_canceled( self, **params: Unpack["PaymentRecordReportPaymentAttemptCanceledParams"], ) -> "PaymentRecord": @@ -3008,7 +3012,7 @@ async def report_payment_attempt_canceled_async( ... @class_method_variant("_cls_report_payment_attempt_canceled_async") - async def report_payment_attempt_canceled_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_payment_attempt_canceled_async( self, **params: Unpack["PaymentRecordReportPaymentAttemptCanceledParams"], ) -> "PaymentRecord": @@ -3073,7 +3077,7 @@ def report_payment_attempt_failed( ... @class_method_variant("_cls_report_payment_attempt_failed") - def report_payment_attempt_failed( # pyright: ignore[reportGeneralTypeIssues] + def report_payment_attempt_failed( self, **params: Unpack["PaymentRecordReportPaymentAttemptFailedParams"] ) -> "PaymentRecord": """ @@ -3137,7 +3141,7 @@ async def report_payment_attempt_failed_async( ... @class_method_variant("_cls_report_payment_attempt_failed_async") - async def report_payment_attempt_failed_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_payment_attempt_failed_async( self, **params: Unpack["PaymentRecordReportPaymentAttemptFailedParams"] ) -> "PaymentRecord": """ @@ -3202,7 +3206,7 @@ def report_payment_attempt_guaranteed( ... @class_method_variant("_cls_report_payment_attempt_guaranteed") - def report_payment_attempt_guaranteed( # pyright: ignore[reportGeneralTypeIssues] + def report_payment_attempt_guaranteed( self, **params: Unpack["PaymentRecordReportPaymentAttemptGuaranteedParams"], ) -> "PaymentRecord": @@ -3268,7 +3272,7 @@ async def report_payment_attempt_guaranteed_async( ... @class_method_variant("_cls_report_payment_attempt_guaranteed_async") - async def report_payment_attempt_guaranteed_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_payment_attempt_guaranteed_async( self, **params: Unpack["PaymentRecordReportPaymentAttemptGuaranteedParams"], ) -> "PaymentRecord": @@ -3337,7 +3341,7 @@ def report_payment_attempt_informational( ... @class_method_variant("_cls_report_payment_attempt_informational") - def report_payment_attempt_informational( # pyright: ignore[reportGeneralTypeIssues] + def report_payment_attempt_informational( self, **params: Unpack[ "PaymentRecordReportPaymentAttemptInformationalParams" @@ -3407,7 +3411,7 @@ async def report_payment_attempt_informational_async( ... @class_method_variant("_cls_report_payment_attempt_informational_async") - async def report_payment_attempt_informational_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_payment_attempt_informational_async( self, **params: Unpack[ "PaymentRecordReportPaymentAttemptInformationalParams" @@ -3468,7 +3472,7 @@ def report_refund( ... @class_method_variant("_cls_report_refund") - def report_refund( # pyright: ignore[reportGeneralTypeIssues] + def report_refund( self, **params: Unpack["PaymentRecordReportRefundParams"] ) -> "PaymentRecord": """ @@ -3527,7 +3531,7 @@ async def report_refund_async( ... @class_method_variant("_cls_report_refund_async") - async def report_refund_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_refund_async( self, **params: Unpack["PaymentRecordReportRefundParams"] ) -> "PaymentRecord": """ diff --git a/stripe/_payout.py b/stripe/_payout.py index 0841b7e78..20a0be4cf 100644 --- a/stripe/_payout.py +++ b/stripe/_payout.py @@ -211,9 +211,7 @@ def cancel(self, **params: Unpack["PayoutCancelParams"]) -> "Payout": ... @class_method_variant("_cls_cancel") - def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PayoutCancelParams"] - ) -> "Payout": + def cancel(self, **params: Unpack["PayoutCancelParams"]) -> "Payout": """ You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. """ @@ -266,7 +264,7 @@ async def cancel_async( ... @class_method_variant("_cls_cancel_async") - async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_async( self, **params: Unpack["PayoutCancelParams"] ) -> "Payout": """ @@ -363,7 +361,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["PayoutModifyParams"] + cls, id: str, /, **params: Unpack["PayoutModifyParams"] ) -> "Payout": """ Updates the specified payout by setting the values of the parameters you pass. We don't change parameters that you don't provide. This request only accepts the metadata as arguments. @@ -380,7 +378,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PayoutModifyParams"] + cls, id: str, /, **params: Unpack["PayoutModifyParams"] ) -> "Payout": """ Updates the specified payout by setting the values of the parameters you pass. We don't change parameters that you don't provide. This request only accepts the metadata as arguments. @@ -459,9 +457,7 @@ def reverse(self, **params: Unpack["PayoutReverseParams"]) -> "Payout": ... @class_method_variant("_cls_reverse") - def reverse( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PayoutReverseParams"] - ) -> "Payout": + def reverse(self, **params: Unpack["PayoutReverseParams"]) -> "Payout": """ Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. @@ -522,7 +518,7 @@ async def reverse_async( ... @class_method_variant("_cls_reverse_async") - async def reverse_async( # pyright: ignore[reportGeneralTypeIssues] + async def reverse_async( self, **params: Unpack["PayoutReverseParams"] ) -> "Payout": """ diff --git a/stripe/_plan.py b/stripe/_plan.py index 3c8786874..1c1161d85 100644 --- a/stripe/_plan.py +++ b/stripe/_plan.py @@ -193,7 +193,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["PlanDeleteParams"] + cls, sid: str, /, **params: Unpack["PlanDeleteParams"] ) -> "Plan": """ Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. @@ -210,7 +210,7 @@ def _cls_delete( @overload @staticmethod - def delete(sid: str, **params: Unpack["PlanDeleteParams"]) -> "Plan": + def delete(sid: str, /, **params: Unpack["PlanDeleteParams"]) -> "Plan": """ Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. """ @@ -224,9 +224,7 @@ def delete(self, **params: Unpack["PlanDeleteParams"]) -> "Plan": ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PlanDeleteParams"] - ) -> "Plan": + def delete(self, **params: Unpack["PlanDeleteParams"]) -> "Plan": """ Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. """ @@ -238,7 +236,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["PlanDeleteParams"] + cls, sid: str, /, **params: Unpack["PlanDeleteParams"] ) -> "Plan": """ Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. @@ -256,7 +254,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["PlanDeleteParams"] + sid: str, /, **params: Unpack["PlanDeleteParams"] ) -> "Plan": """ Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. @@ -273,7 +271,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["PlanDeleteParams"] ) -> "Plan": """ @@ -324,7 +322,9 @@ async def list_async( return result @classmethod - def modify(cls, id: str, **params: Unpack["PlanModifyParams"]) -> "Plan": + def modify( + cls, id: str, /, **params: Unpack["PlanModifyParams"] + ) -> "Plan": """ Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan's ID, amount, currency, or billing cycle. """ @@ -340,7 +340,7 @@ def modify(cls, id: str, **params: Unpack["PlanModifyParams"]) -> "Plan": @classmethod async def modify_async( - cls, id: str, **params: Unpack["PlanModifyParams"] + cls, id: str, /, **params: Unpack["PlanModifyParams"] ) -> "Plan": """ Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan's ID, amount, currency, or billing cycle. diff --git a/stripe/_price.py b/stripe/_price.py index 5369cf5b8..f036d91c8 100644 --- a/stripe/_price.py +++ b/stripe/_price.py @@ -370,7 +370,9 @@ async def list_async( return result @classmethod - def modify(cls, id: str, **params: Unpack["PriceModifyParams"]) -> "Price": + def modify( + cls, id: str, /, **params: Unpack["PriceModifyParams"] + ) -> "Price": """ Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged. """ @@ -386,7 +388,7 @@ def modify(cls, id: str, **params: Unpack["PriceModifyParams"]) -> "Price": @classmethod async def modify_async( - cls, id: str, **params: Unpack["PriceModifyParams"] + cls, id: str, /, **params: Unpack["PriceModifyParams"] ) -> "Price": """ Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged. diff --git a/stripe/_product.py b/stripe/_product.py index 207689348..65118c990 100644 --- a/stripe/_product.py +++ b/stripe/_product.py @@ -277,7 +277,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["ProductDeleteParams"] + cls, sid: str, /, **params: Unpack["ProductDeleteParams"] ) -> "Product": """ Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. @@ -294,7 +294,9 @@ def _cls_delete( @overload @staticmethod - def delete(sid: str, **params: Unpack["ProductDeleteParams"]) -> "Product": + def delete( + sid: str, /, **params: Unpack["ProductDeleteParams"] + ) -> "Product": """ Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. """ @@ -308,9 +310,7 @@ def delete(self, **params: Unpack["ProductDeleteParams"]) -> "Product": ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["ProductDeleteParams"] - ) -> "Product": + def delete(self, **params: Unpack["ProductDeleteParams"]) -> "Product": """ Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. """ @@ -322,7 +322,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["ProductDeleteParams"] + cls, sid: str, /, **params: Unpack["ProductDeleteParams"] ) -> "Product": """ Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. @@ -340,7 +340,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["ProductDeleteParams"] + sid: str, /, **params: Unpack["ProductDeleteParams"] ) -> "Product": """ Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. @@ -357,7 +357,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["ProductDeleteParams"] ) -> "Product": """ @@ -411,7 +411,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["ProductModifyParams"] + cls, id: str, /, **params: Unpack["ProductModifyParams"] ) -> "Product": """ Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -428,7 +428,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["ProductModifyParams"] + cls, id: str, /, **params: Unpack["ProductModifyParams"] ) -> "Product": """ Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged. diff --git a/stripe/_promotion_code.py b/stripe/_promotion_code.py index 6b1e57dfc..8f9a7d28f 100644 --- a/stripe/_promotion_code.py +++ b/stripe/_promotion_code.py @@ -203,7 +203,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["PromotionCodeModifyParams"] + cls, id: str, /, **params: Unpack["PromotionCodeModifyParams"] ) -> "PromotionCode": """ Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable. @@ -220,7 +220,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PromotionCodeModifyParams"] + cls, id: str, /, **params: Unpack["PromotionCodeModifyParams"] ) -> "PromotionCode": """ Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable. diff --git a/stripe/_quote.py b/stripe/_quote.py index 268b24abd..1e96a13d8 100644 --- a/stripe/_quote.py +++ b/stripe/_quote.py @@ -1436,9 +1436,7 @@ def accept(self, **params: Unpack["QuoteAcceptParams"]) -> "Quote": ... @class_method_variant("_cls_accept") - def accept( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["QuoteAcceptParams"] - ) -> "Quote": + def accept(self, **params: Unpack["QuoteAcceptParams"]) -> "Quote": """ Accepts the specified quote. """ @@ -1489,7 +1487,7 @@ async def accept_async( ... @class_method_variant("_cls_accept_async") - async def accept_async( # pyright: ignore[reportGeneralTypeIssues] + async def accept_async( self, **params: Unpack["QuoteAcceptParams"] ) -> "Quote": """ @@ -1540,9 +1538,7 @@ def cancel(self, **params: Unpack["QuoteCancelParams"]) -> "Quote": ... @class_method_variant("_cls_cancel") - def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["QuoteCancelParams"] - ) -> "Quote": + def cancel(self, **params: Unpack["QuoteCancelParams"]) -> "Quote": """ Cancels the quote. """ @@ -1593,7 +1589,7 @@ async def cancel_async( ... @class_method_variant("_cls_cancel_async") - async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_async( self, **params: Unpack["QuoteCancelParams"] ) -> "Quote": """ @@ -1676,7 +1672,7 @@ def finalize_quote( ... @class_method_variant("_cls_finalize_quote") - def finalize_quote( # pyright: ignore[reportGeneralTypeIssues] + def finalize_quote( self, **params: Unpack["QuoteFinalizeQuoteParams"] ) -> "Quote": """ @@ -1729,7 +1725,7 @@ async def finalize_quote_async( ... @class_method_variant("_cls_finalize_quote_async") - async def finalize_quote_async( # pyright: ignore[reportGeneralTypeIssues] + async def finalize_quote_async( self, **params: Unpack["QuoteFinalizeQuoteParams"] ) -> "Quote": """ @@ -1827,7 +1823,7 @@ def list_computed_upfront_line_items( ... @class_method_variant("_cls_list_computed_upfront_line_items") - def list_computed_upfront_line_items( # pyright: ignore[reportGeneralTypeIssues] + def list_computed_upfront_line_items( self, **params: Unpack["QuoteListComputedUpfrontLineItemsParams"] ) -> ListObject["LineItem"]: """ @@ -1887,7 +1883,7 @@ async def list_computed_upfront_line_items_async( ... @class_method_variant("_cls_list_computed_upfront_line_items_async") - async def list_computed_upfront_line_items_async( # pyright: ignore[reportGeneralTypeIssues] + async def list_computed_upfront_line_items_async( self, **params: Unpack["QuoteListComputedUpfrontLineItemsParams"] ) -> ListObject["LineItem"]: """ @@ -1942,7 +1938,7 @@ def list_line_items( ... @class_method_variant("_cls_list_line_items") - def list_line_items( # pyright: ignore[reportGeneralTypeIssues] + def list_line_items( self, **params: Unpack["QuoteListLineItemsParams"] ) -> ListObject["LineItem"]: """ @@ -1997,7 +1993,7 @@ async def list_line_items_async( ... @class_method_variant("_cls_list_line_items_async") - async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] + async def list_line_items_async( self, **params: Unpack["QuoteListLineItemsParams"] ) -> ListObject["LineItem"]: """ @@ -2050,7 +2046,7 @@ def list_lines( ... @class_method_variant("_cls_list_lines") - def list_lines( # pyright: ignore[reportGeneralTypeIssues] + def list_lines( self, **params: Unpack["QuoteListLinesParams"] ) -> ListObject["QuoteLine"]: """ @@ -2103,7 +2099,7 @@ async def list_lines_async( ... @class_method_variant("_cls_list_lines_async") - async def list_lines_async( # pyright: ignore[reportGeneralTypeIssues] + async def list_lines_async( self, **params: Unpack["QuoteListLinesParams"] ) -> ListObject["QuoteLine"]: """ @@ -2169,7 +2165,7 @@ def list_preview_invoice_lines( ... @class_method_variant("_cls_list_preview_invoice_lines") - def list_preview_invoice_lines( # pyright: ignore[reportGeneralTypeIssues] + def list_preview_invoice_lines( self, preview_invoice: str, /, @@ -2239,7 +2235,7 @@ async def list_preview_invoice_lines_async( ... @class_method_variant("_cls_list_preview_invoice_lines_async") - async def list_preview_invoice_lines_async( # pyright: ignore[reportGeneralTypeIssues] + async def list_preview_invoice_lines_async( self, preview_invoice: str, /, @@ -2296,9 +2292,7 @@ def mark_draft(self, **params: Unpack["QuoteMarkDraftParams"]) -> "Quote": ... @class_method_variant("_cls_mark_draft") - def mark_draft( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["QuoteMarkDraftParams"] - ) -> "Quote": + def mark_draft(self, **params: Unpack["QuoteMarkDraftParams"]) -> "Quote": """ Converts a stale quote to draft. """ @@ -2351,7 +2345,7 @@ async def mark_draft_async( ... @class_method_variant("_cls_mark_draft_async") - async def mark_draft_async( # pyright: ignore[reportGeneralTypeIssues] + async def mark_draft_async( self, **params: Unpack["QuoteMarkDraftParams"] ) -> "Quote": """ @@ -2404,9 +2398,7 @@ def mark_stale(self, **params: Unpack["QuoteMarkStaleParams"]) -> "Quote": ... @class_method_variant("_cls_mark_stale") - def mark_stale( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["QuoteMarkStaleParams"] - ) -> "Quote": + def mark_stale(self, **params: Unpack["QuoteMarkStaleParams"]) -> "Quote": """ Converts a draft or open quote to stale. """ @@ -2459,7 +2451,7 @@ async def mark_stale_async( ... @class_method_variant("_cls_mark_stale_async") - async def mark_stale_async( # pyright: ignore[reportGeneralTypeIssues] + async def mark_stale_async( self, **params: Unpack["QuoteMarkStaleParams"] ) -> "Quote": """ @@ -2477,7 +2469,9 @@ async def mark_stale_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def modify(cls, id: str, **params: Unpack["QuoteModifyParams"]) -> "Quote": + def modify( + cls, id: str, /, **params: Unpack["QuoteModifyParams"] + ) -> "Quote": """ A quote models prices and services for a customer. """ @@ -2493,7 +2487,7 @@ def modify(cls, id: str, **params: Unpack["QuoteModifyParams"]) -> "Quote": @classmethod async def modify_async( - cls, id: str, **params: Unpack["QuoteModifyParams"] + cls, id: str, /, **params: Unpack["QuoteModifyParams"] ) -> "Quote": """ A quote models prices and services for a customer. @@ -2541,9 +2535,7 @@ def pdf(self, **params: Unpack["QuotePdfParams"]) -> Any: ... @class_method_variant("_cls_pdf") - def pdf( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["QuotePdfParams"] - ) -> Any: + def pdf(self, **params: Unpack["QuotePdfParams"]) -> Any: """ Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ @@ -2594,9 +2586,7 @@ async def pdf_async(self, **params: Unpack["QuotePdfParams"]) -> Any: ... @class_method_variant("_cls_pdf_async") - async def pdf_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["QuotePdfParams"] - ) -> Any: + async def pdf_async(self, **params: Unpack["QuotePdfParams"]) -> Any: """ Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ @@ -2648,9 +2638,7 @@ def reestimate(self, **params: Unpack["QuoteReestimateParams"]) -> "Quote": ... @class_method_variant("_cls_reestimate") - def reestimate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["QuoteReestimateParams"] - ) -> "Quote": + def reestimate(self, **params: Unpack["QuoteReestimateParams"]) -> "Quote": """ Recompute the upcoming invoice estimate for the quote. """ @@ -2703,7 +2691,7 @@ async def reestimate_async( ... @class_method_variant("_cls_reestimate_async") - async def reestimate_async( # pyright: ignore[reportGeneralTypeIssues] + async def reestimate_async( self, **params: Unpack["QuoteReestimateParams"] ) -> "Quote": """ diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py index 0051107c1..b016c535f 100644 --- a/stripe/_quote_preview_invoice.py +++ b/stripe/_quote_preview_invoice.py @@ -120,6 +120,29 @@ class AppliesTo(StripeObject): """ class AutomaticTax(StripeObject): + class EnablementDetails(StripeObject): + class IntegrationConfigurationDisabledReason(StripeObject): + conflicting_field: str + """ + The parameter that prevented `automatic_tax` from being enabled (for example `default_tax_rates`). + """ + + integration_configuration_disabled_reason: Optional[ + IntegrationConfigurationDisabledReason + ] + """ + Present when `source=tax_integration_configuration`, `automatic_tax[enabled]=false`, and a conflicting parameter is recorded. + """ + source: Literal[ + "explicit", "managed_payments", "tax_integration_configuration" + ] + """ + How `automatic_tax` was set: `explicit`, `managed_payments`, or `tax_integration_configuration`. + """ + _inner_class_types = { + "integration_configuration_disabled_reason": IntegrationConfigurationDisabledReason, + } + class Liability(StripeObject): account: Optional[ExpandableField["Account"]] """ @@ -146,6 +169,10 @@ class Liability(StripeObject): """ Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://docs.stripe.com/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. """ + enablement_details: Optional[EnablementDetails] + """ + How `automatic_tax` was set (`explicit`, `managed_payments`, or `tax_integration_configuration`) and why it may have been disabled. + """ liability: Optional[Liability] """ The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. @@ -162,7 +189,10 @@ class Liability(StripeObject): """ The status of the most recent automated tax calculation for this invoice. """ - _inner_class_types = {"liability": Liability} + _inner_class_types = { + "enablement_details": EnablementDetails, + "liability": Liability, + } class ConfirmationSecret(StripeObject): client_secret: str @@ -425,7 +455,7 @@ class Issuer(StripeObject): class LastFinalizationError(StripeObject): advice_code: Optional[str] """ - For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines#retrying-issuer-declines) if they provide one. + For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines/card#retrying-issuer-declines) if they provide one. """ charge: Optional[str] """ @@ -486,6 +516,7 @@ class LastFinalizationError(StripeObject): "customer_session_expired", "customer_tax_location_invalid", "debit_not_authorized", + "dispute_evidence_page_limit_exceeded", "email_invalid", "expired_card", "expired_payment_method", @@ -496,6 +527,8 @@ class LastFinalizationError(StripeObject): "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", + "financial_connections_consent_locale_invalid", + "financial_connections_consent_locale_unsupported", "financial_connections_institution_unavailable", "financial_connections_no_successful_transaction_refresh", "forwarding_api_inactive", @@ -550,6 +583,7 @@ class LastFinalizationError(StripeObject): "parameter_missing", "parameter_unknown", "parameters_exclusive", + "payment_evaluation_on_api_version_not_supported", "payment_intent_action_required", "payment_intent_authentication_failure", "payment_intent_incompatible_payment_method", @@ -1465,6 +1499,27 @@ class Address(StripeObject): """ _inner_class_types = {"address": Address} + class StatusDetails(StripeObject): + class Uncollectible(StripeObject): + reason: Optional[ + Union[ + Literal[ + "max_payment_attempts", + "payment_not_received", + "subscription_canceled", + "subscription_paused", + "user_forgiven", + ], + str, + ] + ] + """ + The reason why the invoice is uncollectible. + """ + + uncollectible: Optional[Uncollectible] + _inner_class_types = {"uncollectible": Uncollectible} + class StatusTransitions(StripeObject): finalized_at: Optional[int] """ @@ -1893,6 +1948,7 @@ class TaxRateDetails(StripeObject): """ The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://docs.stripe.com/billing/invoices/workflow#workflow-overview) """ + status_details: Optional[StatusDetails] status_transitions: StatusTransitions subscription: Optional[ExpandableField["Subscription"]] subtotal: int @@ -1955,6 +2011,7 @@ class TaxRateDetails(StripeObject): "rendering": Rendering, "shipping_cost": ShippingCost, "shipping_details": ShippingDetails, + "status_details": StatusDetails, "status_transitions": StatusTransitions, "threshold_reason": ThresholdReason, "total_discount_amounts": TotalDiscountAmount, diff --git a/stripe/_radar_service.py b/stripe/_radar_service.py index d14f26d37..556ed7456 100644 --- a/stripe/_radar_service.py +++ b/stripe/_radar_service.py @@ -8,6 +8,9 @@ from stripe.radar._account_evaluation_service import ( AccountEvaluationService, ) + from stripe.radar._billing_evaluation_service import ( + BillingEvaluationService, + ) from stripe.radar._customer_evaluation_service import ( CustomerEvaluationService, ) @@ -28,6 +31,10 @@ "stripe.radar._account_evaluation_service", "AccountEvaluationService", ], + "billing_evaluations": [ + "stripe.radar._billing_evaluation_service", + "BillingEvaluationService", + ], "customer_evaluations": [ "stripe.radar._customer_evaluation_service", "CustomerEvaluationService", @@ -54,6 +61,7 @@ class RadarService(StripeService): account_evaluations: "AccountEvaluationService" + billing_evaluations: "BillingEvaluationService" customer_evaluations: "CustomerEvaluationService" early_fraud_warnings: "EarlyFraudWarningService" issuing_authorization_evaluations: "IssuingAuthorizationEvaluationService" diff --git a/stripe/_refund.py b/stripe/_refund.py index 602ade3fc..a5842822e 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -17,7 +17,7 @@ from stripe._customer import Customer from stripe._payment_intent import PaymentIntent from stripe._payment_method import PaymentMethod - from stripe._reversal import Reversal + from stripe._transfer_reversal import TransferReversal from stripe.params._refund_cancel_params import RefundCancelParams from stripe.params._refund_create_params import RefundCreateParams from stripe.params._refund_expire_params import RefundExpireParams @@ -485,7 +485,7 @@ class PresentmentDetails(StripeObject): """ This is the transaction number that appears on email receipts sent for this refund. """ - source_transfer_reversal: Optional[ExpandableField["Reversal"]] + source_transfer_reversal: Optional[ExpandableField["TransferReversal"]] """ The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. """ @@ -493,7 +493,7 @@ class PresentmentDetails(StripeObject): """ Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://docs.stripe.com/refunds#failed-refunds). """ - transfer_reversal: Optional[ExpandableField["Reversal"]] + transfer_reversal: Optional[ExpandableField["TransferReversal"]] """ This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. """ @@ -540,9 +540,7 @@ def cancel(self, **params: Unpack["RefundCancelParams"]) -> "Refund": ... @class_method_variant("_cls_cancel") - def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["RefundCancelParams"] - ) -> "Refund": + def cancel(self, **params: Unpack["RefundCancelParams"]) -> "Refund": """ Cancels a refund with a status of requires_action. @@ -603,7 +601,7 @@ async def cancel_async( ... @class_method_variant("_cls_cancel_async") - async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_async( self, **params: Unpack["RefundCancelParams"] ) -> "Refund": """ @@ -714,7 +712,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["RefundModifyParams"] + cls, id: str, /, **params: Unpack["RefundModifyParams"] ) -> "Refund": """ Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged. @@ -733,7 +731,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["RefundModifyParams"] + cls, id: str, /, **params: Unpack["RefundModifyParams"] ) -> "Refund": """ Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged. @@ -811,9 +809,7 @@ def expire(self, **params: Unpack["RefundExpireParams"]) -> "Refund": ... @class_method_variant("_cls_expire") - def expire( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["RefundExpireParams"] - ) -> "Refund": + def expire(self, **params: Unpack["RefundExpireParams"]) -> "Refund": """ Expire a refund with a status of requires_action. """ @@ -866,7 +862,7 @@ async def expire_async( ... @class_method_variant("_cls_expire_async") - async def expire_async( # pyright: ignore[reportGeneralTypeIssues] + async def expire_async( self, **params: Unpack["RefundExpireParams"] ) -> "Refund": """ diff --git a/stripe/_review.py b/stripe/_review.py index 482ed6732..297ae4f23 100644 --- a/stripe/_review.py +++ b/stripe/_review.py @@ -170,9 +170,7 @@ def approve(self, **params: Unpack["ReviewApproveParams"]) -> "Review": ... @class_method_variant("_cls_approve") - def approve( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["ReviewApproveParams"] - ) -> "Review": + def approve(self, **params: Unpack["ReviewApproveParams"]) -> "Review": """ Approves a Review object, closing it and removing it from the list of reviews. """ @@ -225,7 +223,7 @@ async def approve_async( ... @class_method_variant("_cls_approve_async") - async def approve_async( # pyright: ignore[reportGeneralTypeIssues] + async def approve_async( self, **params: Unpack["ReviewApproveParams"] ) -> "Review": """ diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index c12d2ca4d..45fd7e162 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -547,7 +547,7 @@ class UsBankAccount(StripeObject): class SetupError(StripeObject): advice_code: Optional[str] """ - For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines#retrying-issuer-declines) if they provide one. + For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines/card#retrying-issuer-declines) if they provide one. """ charge: Optional[str] """ @@ -608,6 +608,7 @@ class SetupError(StripeObject): "customer_session_expired", "customer_tax_location_invalid", "debit_not_authorized", + "dispute_evidence_page_limit_exceeded", "email_invalid", "expired_card", "expired_payment_method", @@ -618,6 +619,8 @@ class SetupError(StripeObject): "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", + "financial_connections_consent_locale_invalid", + "financial_connections_consent_locale_unsupported", "financial_connections_institution_unavailable", "financial_connections_no_successful_transaction_refresh", "forwarding_api_inactive", @@ -672,6 +675,7 @@ class SetupError(StripeObject): "parameter_missing", "parameter_unknown", "parameters_exclusive", + "payment_evaluation_on_api_version_not_supported", "payment_intent_action_required", "payment_intent_authentication_failure", "payment_intent_incompatible_payment_method", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 73401dc69..6d1fdfec5 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -89,7 +89,7 @@ class AutomaticPaymentMethods(StripeObject): class LastSetupError(StripeObject): advice_code: Optional[str] """ - For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines#retrying-issuer-declines) if they provide one. + For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines/card#retrying-issuer-declines) if they provide one. """ charge: Optional[str] """ @@ -150,6 +150,7 @@ class LastSetupError(StripeObject): "customer_session_expired", "customer_tax_location_invalid", "debit_not_authorized", + "dispute_evidence_page_limit_exceeded", "email_invalid", "expired_card", "expired_payment_method", @@ -160,6 +161,8 @@ class LastSetupError(StripeObject): "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", + "financial_connections_consent_locale_invalid", + "financial_connections_consent_locale_unsupported", "financial_connections_institution_unavailable", "financial_connections_no_successful_transaction_refresh", "forwarding_api_inactive", @@ -214,6 +217,7 @@ class LastSetupError(StripeObject): "parameter_missing", "parameter_unknown", "parameters_exclusive", + "payment_evaluation_on_api_version_not_supported", "payment_intent_action_required", "payment_intent_authentication_failure", "payment_intent_incompatible_payment_method", @@ -1083,6 +1087,7 @@ class FrMealVoucher(StripeObject): "boleto", "capchase_pay", "card", + "card_present", "cashapp", "check_scan", "click_to_pay", @@ -1103,6 +1108,7 @@ class FrMealVoucher(StripeObject): "grabpay", "id_bank_transfer", "ideal", + "interac_present", "kakao_pay", "klarna", "knet", @@ -1429,7 +1435,7 @@ def cancel( ... @class_method_variant("_cls_cancel") - def cancel( # pyright: ignore[reportGeneralTypeIssues] + def cancel( self, **params: Unpack["SetupIntentCancelParams"] ) -> "SetupIntent": """ @@ -1492,7 +1498,7 @@ async def cancel_async( ... @class_method_variant("_cls_cancel_async") - async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_async( self, **params: Unpack["SetupIntentCancelParams"] ) -> "SetupIntent": """ @@ -1588,7 +1594,7 @@ def confirm( ... @class_method_variant("_cls_confirm") - def confirm( # pyright: ignore[reportGeneralTypeIssues] + def confirm( self, **params: Unpack["SetupIntentConfirmParams"] ) -> "SetupIntent": """ @@ -1695,7 +1701,7 @@ async def confirm_async( ... @class_method_variant("_cls_confirm_async") - async def confirm_async( # pyright: ignore[reportGeneralTypeIssues] + async def confirm_async( self, **params: Unpack["SetupIntentConfirmParams"] ) -> "SetupIntent": """ @@ -1805,7 +1811,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["SetupIntentModifyParams"] + cls, id: str, /, **params: Unpack["SetupIntentModifyParams"] ) -> "SetupIntent": """ Updates a SetupIntent object. @@ -1822,7 +1828,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["SetupIntentModifyParams"] + cls, id: str, /, **params: Unpack["SetupIntentModifyParams"] ) -> "SetupIntent": """ Updates a SetupIntent object. @@ -1910,7 +1916,7 @@ def verify_microdeposits( ... @class_method_variant("_cls_verify_microdeposits") - def verify_microdeposits( # pyright: ignore[reportGeneralTypeIssues] + def verify_microdeposits( self, **params: Unpack["SetupIntentVerifyMicrodepositsParams"] ) -> "SetupIntent": """ @@ -1970,7 +1976,7 @@ async def verify_microdeposits_async( ... @class_method_variant("_cls_verify_microdeposits_async") - async def verify_microdeposits_async( # pyright: ignore[reportGeneralTypeIssues] + async def verify_microdeposits_async( self, **params: Unpack["SetupIntentVerifyMicrodepositsParams"] ) -> "SetupIntent": """ diff --git a/stripe/_shipping_rate.py b/stripe/_shipping_rate.py index f9ac2fca9..6e8bb9872 100644 --- a/stripe/_shipping_rate.py +++ b/stripe/_shipping_rate.py @@ -221,7 +221,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["ShippingRateModifyParams"] + cls, id: str, /, **params: Unpack["ShippingRateModifyParams"] ) -> "ShippingRate": """ Updates an existing shipping rate object. @@ -238,7 +238,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["ShippingRateModifyParams"] + cls, id: str, /, **params: Unpack["ShippingRateModifyParams"] ) -> "ShippingRate": """ Updates an existing shipping rate object. diff --git a/stripe/_source.py b/stripe/_source.py index 68f4353c0..4e2685bce 100644 --- a/stripe/_source.py +++ b/stripe/_source.py @@ -695,7 +695,7 @@ def list_source_transactions( ... @class_method_variant("_cls_list_source_transactions") - def list_source_transactions( # pyright: ignore[reportGeneralTypeIssues] + def list_source_transactions( self, **params: Unpack["SourceListSourceTransactionsParams"] ) -> ListObject["SourceTransaction"]: """ @@ -753,7 +753,7 @@ async def list_source_transactions_async( ... @class_method_variant("_cls_list_source_transactions_async") - async def list_source_transactions_async( # pyright: ignore[reportGeneralTypeIssues] + async def list_source_transactions_async( self, **params: Unpack["SourceListSourceTransactionsParams"] ) -> ListObject["SourceTransaction"]: """ @@ -772,7 +772,7 @@ async def list_source_transactions_async( # pyright: ignore[reportGeneralTypeIs @classmethod def modify( - cls, id: str, **params: Unpack["SourceModifyParams"] + cls, id: str, /, **params: Unpack["SourceModifyParams"] ) -> "Source": """ Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -791,7 +791,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["SourceModifyParams"] + cls, id: str, /, **params: Unpack["SourceModifyParams"] ) -> "Source": """ Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -866,9 +866,7 @@ def verify(self, **params: Unpack["SourceVerifyParams"]) -> "Source": ... @class_method_variant("_cls_verify") - def verify( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SourceVerifyParams"] - ) -> "Source": + def verify(self, **params: Unpack["SourceVerifyParams"]) -> "Source": """ Verify a given source. """ @@ -921,7 +919,7 @@ async def verify_async( ... @class_method_variant("_cls_verify_async") - async def verify_async( # pyright: ignore[reportGeneralTypeIssues] + async def verify_async( self, **params: Unpack["SourceVerifyParams"] ) -> "Source": """ diff --git a/stripe/_stripe_client.py b/stripe/_stripe_client.py index c35fd76bc..36e3b4aca 100644 --- a/stripe/_stripe_client.py +++ b/stripe/_stripe_client.py @@ -153,6 +153,7 @@ from stripe._tax_rate_service import TaxRateService from stripe._terminal_service import TerminalService from stripe._test_helpers_service import TestHelpersService + from stripe._three_d_secure_service import ThreeDSecureService from stripe._token_service import TokenService from stripe._topup_service import TopupService from stripe._transfer_service import TransferService @@ -1400,6 +1401,17 @@ def terminal(self) -> "TerminalService": def test_helpers(self) -> "TestHelpersService": return self.v1.test_helpers + @property + @deprecated( + """ + StripeClient.three_d_secure is deprecated, use StripeClient.v1.three_d_secure instead. + All functionality under it has been copied over to StripeClient.v1.three_d_secure. + See [migration guide](https://github.com/stripe/stripe-python/wiki/v1-namespace-in-StripeClient) for more on this and tips on migrating to the new v1 namespace. + """, + ) + def three_d_secure(self) -> "ThreeDSecureService": + return self.v1.three_d_secure + @property @deprecated( """ diff --git a/stripe/_stripe_object.py b/stripe/_stripe_object.py index b37075ab1..8fe6d87d7 100644 --- a/stripe/_stripe_object.py +++ b/stripe/_stripe_object.py @@ -7,7 +7,6 @@ Type, Literal, Self, - deprecated, ) from typing import ( Any, @@ -448,23 +447,6 @@ def _refresh_from( self._previous = values - @deprecated("This will be removed in a future version of stripe-python.") - def request( - self, - method: Literal["get", "post", "delete"], - url: str, - params: Optional[Dict[str, Any]] = None, - *, - base_address: BaseAddress = "api", - ) -> "StripeObject": - return StripeObject._request( - self, - method, - url, - params=params, - base_address=base_address, - ) - def _request( self, method: Literal["get", "post", "delete"], diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 0cd56c535..aee1b4f3e 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -957,7 +957,7 @@ class PendingUpdate(StripeObject): """ trial_from_plan: Optional[bool] """ - 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) to learn more. + 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. """ class Prebilling(StripeObject): @@ -989,6 +989,8 @@ class Paused(StripeObject): class Subscription(StripeObject): type: Union[ Literal[ + "final_payment_failure", + "first_payment_failure", "pause_requested", "system", "trial_end_without_payment_method", @@ -1247,7 +1249,7 @@ class EndBehavior(StripeObject): A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. - A subscription can only enter a `paused` status [when a trial ends without a payment method](https://docs.stripe.com/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. + A subscription can only enter a `paused` status [when a trial ends without a payment method](https://docs.stripe.com/billing/subscriptions/trials/free-trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). @@ -1321,7 +1323,7 @@ def attach_cadence( ... @class_method_variant("_cls_attach_cadence") - def attach_cadence( # pyright: ignore[reportGeneralTypeIssues] + def attach_cadence( self, **params: Unpack["SubscriptionAttachCadenceParams"] ) -> "Subscription": """ @@ -1381,7 +1383,7 @@ async def attach_cadence_async( ... @class_method_variant("_cls_attach_cadence_async") - async def attach_cadence_async( # pyright: ignore[reportGeneralTypeIssues] + async def attach_cadence_async( self, **params: Unpack["SubscriptionAttachCadenceParams"] ) -> "Subscription": """ @@ -1455,7 +1457,7 @@ def cancel( ... @class_method_variant("_cls_cancel") - def cancel( # pyright: ignore[reportGeneralTypeIssues] + def cancel( self, **params: Unpack["SubscriptionCancelParams"] ) -> "Subscription": """ @@ -1533,7 +1535,7 @@ async def cancel_async( ... @class_method_variant("_cls_cancel_async") - async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_async( self, **params: Unpack["SubscriptionCancelParams"] ) -> "Subscription": """ @@ -1643,7 +1645,7 @@ def delete_discount( ... @class_method_variant("_cls_delete_discount") - def delete_discount( # pyright: ignore[reportGeneralTypeIssues] + def delete_discount( self, **params: Unpack["SubscriptionDeleteDiscountParams"] ) -> "Discount": """ @@ -1705,7 +1707,7 @@ async def delete_discount_async( ... @class_method_variant("_cls_delete_discount_async") - async def delete_discount_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_discount_async( self, **params: Unpack["SubscriptionDeleteDiscountParams"] ) -> "Discount": """ @@ -1803,7 +1805,7 @@ def migrate( ... @class_method_variant("_cls_migrate") - def migrate( # pyright: ignore[reportGeneralTypeIssues] + def migrate( self, **params: Unpack["SubscriptionMigrateParams"] ) -> "Subscription": """ @@ -1861,7 +1863,7 @@ async def migrate_async( ... @class_method_variant("_cls_migrate_async") - async def migrate_async( # pyright: ignore[reportGeneralTypeIssues] + async def migrate_async( self, **params: Unpack["SubscriptionMigrateParams"] ) -> "Subscription": """ @@ -1880,7 +1882,7 @@ async def migrate_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def modify( - cls, id: str, **params: Unpack["SubscriptionModifyParams"] + cls, id: str, /, **params: Unpack["SubscriptionModifyParams"] ) -> "Subscription": """ Updates an existing subscription to match the specified parameters. @@ -1917,7 +1919,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["SubscriptionModifyParams"] + cls, id: str, /, **params: Unpack["SubscriptionModifyParams"] ) -> "Subscription": """ Updates an existing subscription to match the specified parameters. @@ -1990,7 +1992,7 @@ def pause( ... @class_method_variant("_cls_pause") - def pause( # pyright: ignore[reportGeneralTypeIssues] + def pause( self, **params: Unpack["SubscriptionPauseParams"] ) -> "Subscription": """ @@ -2045,7 +2047,7 @@ async def pause_async( ... @class_method_variant("_cls_pause_async") - async def pause_async( # pyright: ignore[reportGeneralTypeIssues] + async def pause_async( self, **params: Unpack["SubscriptionPauseParams"] ) -> "Subscription": """ @@ -2100,7 +2102,7 @@ def resume( ... @class_method_variant("_cls_resume") - def resume( # pyright: ignore[reportGeneralTypeIssues] + def resume( self, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ @@ -2155,7 +2157,7 @@ async def resume_async( ... @class_method_variant("_cls_resume_async") - async def resume_async( # pyright: ignore[reportGeneralTypeIssues] + async def resume_async( self, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ diff --git a/stripe/_subscription_item.py b/stripe/_subscription_item.py index 21c7a9b10..d4fce06ae 100644 --- a/stripe/_subscription_item.py +++ b/stripe/_subscription_item.py @@ -54,8 +54,17 @@ class BillingThresholds(StripeObject): class CurrentTrial(StripeObject): end_date: int + """ + The time the current trial ends. + """ start_date: int + """ + The time the current trial started. + """ trial_offer: str + """ + The Trial Offer ID applied to the subscription item. + """ class Trial(StripeObject): converts_to: Optional[List[str]] @@ -182,7 +191,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["SubscriptionItemDeleteParams"] + cls, sid: str, /, **params: Unpack["SubscriptionItemDeleteParams"] ) -> "SubscriptionItem": """ Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. @@ -200,7 +209,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["SubscriptionItemDeleteParams"] + sid: str, /, **params: Unpack["SubscriptionItemDeleteParams"] ) -> "SubscriptionItem": """ Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. @@ -217,7 +226,7 @@ def delete( ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] + def delete( self, **params: Unpack["SubscriptionItemDeleteParams"] ) -> "SubscriptionItem": """ @@ -231,7 +240,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["SubscriptionItemDeleteParams"] + cls, sid: str, /, **params: Unpack["SubscriptionItemDeleteParams"] ) -> "SubscriptionItem": """ Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. @@ -249,7 +258,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["SubscriptionItemDeleteParams"] + sid: str, /, **params: Unpack["SubscriptionItemDeleteParams"] ) -> "SubscriptionItem": """ Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. @@ -266,7 +275,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["SubscriptionItemDeleteParams"] ) -> "SubscriptionItem": """ @@ -320,7 +329,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["SubscriptionItemModifyParams"] + cls, id: str, /, **params: Unpack["SubscriptionItemModifyParams"] ) -> "SubscriptionItem": """ Updates the plan or quantity of an item on a current subscription. @@ -337,7 +346,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["SubscriptionItemModifyParams"] + cls, id: str, /, **params: Unpack["SubscriptionItemModifyParams"] ) -> "SubscriptionItem": """ Updates the plan or quantity of an item on a current subscription. diff --git a/stripe/_subscription_schedule.py b/stripe/_subscription_schedule.py index ecd1966f8..752f1913d 100644 --- a/stripe/_subscription_schedule.py +++ b/stripe/_subscription_schedule.py @@ -1171,7 +1171,7 @@ def amend( ... @class_method_variant("_cls_amend") - def amend( # pyright: ignore[reportGeneralTypeIssues] + def amend( self, **params: Unpack["SubscriptionScheduleAmendParams"] ) -> "SubscriptionSchedule": """ @@ -1229,7 +1229,7 @@ async def amend_async( ... @class_method_variant("_cls_amend_async") - async def amend_async( # pyright: ignore[reportGeneralTypeIssues] + async def amend_async( self, **params: Unpack["SubscriptionScheduleAmendParams"] ) -> "SubscriptionSchedule": """ @@ -1287,7 +1287,7 @@ def cancel( ... @class_method_variant("_cls_cancel") - def cancel( # pyright: ignore[reportGeneralTypeIssues] + def cancel( self, **params: Unpack["SubscriptionScheduleCancelParams"] ) -> "SubscriptionSchedule": """ @@ -1345,7 +1345,7 @@ async def cancel_async( ... @class_method_variant("_cls_cancel_async") - async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_async( self, **params: Unpack["SubscriptionScheduleCancelParams"] ) -> "SubscriptionSchedule": """ @@ -1436,7 +1436,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["SubscriptionScheduleModifyParams"] + cls, id: str, /, **params: Unpack["SubscriptionScheduleModifyParams"] ) -> "SubscriptionSchedule": """ Updates an existing subscription schedule. @@ -1453,7 +1453,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["SubscriptionScheduleModifyParams"] + cls, id: str, /, **params: Unpack["SubscriptionScheduleModifyParams"] ) -> "SubscriptionSchedule": """ Updates an existing subscription schedule. @@ -1509,7 +1509,7 @@ def release( ... @class_method_variant("_cls_release") - def release( # pyright: ignore[reportGeneralTypeIssues] + def release( self, **params: Unpack["SubscriptionScheduleReleaseParams"] ) -> "SubscriptionSchedule": """ @@ -1567,7 +1567,7 @@ async def release_async( ... @class_method_variant("_cls_release_async") - async def release_async( # pyright: ignore[reportGeneralTypeIssues] + async def release_async( self, **params: Unpack["SubscriptionScheduleReleaseParams"] ) -> "SubscriptionSchedule": """ diff --git a/stripe/_tax_id.py b/stripe/_tax_id.py index 370f1baf8..4f3889c73 100644 --- a/stripe/_tax_id.py +++ b/stripe/_tax_id.py @@ -275,7 +275,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["TaxIdDeleteParams"] + cls, sid: str, /, **params: Unpack["TaxIdDeleteParams"] ) -> "TaxId": """ Deletes an existing account or customer tax_id object. @@ -292,7 +292,7 @@ def _cls_delete( @overload @staticmethod - def delete(sid: str, **params: Unpack["TaxIdDeleteParams"]) -> "TaxId": + def delete(sid: str, /, **params: Unpack["TaxIdDeleteParams"]) -> "TaxId": """ Deletes an existing account or customer tax_id object. """ @@ -306,9 +306,7 @@ def delete(self, **params: Unpack["TaxIdDeleteParams"]) -> "TaxId": ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["TaxIdDeleteParams"] - ) -> "TaxId": + def delete(self, **params: Unpack["TaxIdDeleteParams"]) -> "TaxId": """ Deletes an existing account or customer tax_id object. """ @@ -320,7 +318,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["TaxIdDeleteParams"] + cls, sid: str, /, **params: Unpack["TaxIdDeleteParams"] ) -> "TaxId": """ Deletes an existing account or customer tax_id object. @@ -338,7 +336,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["TaxIdDeleteParams"] + sid: str, /, **params: Unpack["TaxIdDeleteParams"] ) -> "TaxId": """ Deletes an existing account or customer tax_id object. @@ -355,7 +353,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["TaxIdDeleteParams"] ) -> "TaxId": """ diff --git a/stripe/_tax_rate.py b/stripe/_tax_rate.py index b39b580c8..0c3c5c77f 100644 --- a/stripe/_tax_rate.py +++ b/stripe/_tax_rate.py @@ -121,6 +121,7 @@ class FlatAmount(StripeObject): Literal[ "amusement_tax", "communications_tax", + "digital_excise_tax", "gst", "hst", "igst", @@ -134,6 +135,7 @@ class FlatAmount(StripeObject): "rst", "sales_tax", "service_tax", + "utility_users_tax", "vat", ], str, @@ -215,7 +217,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["TaxRateModifyParams"] + cls, id: str, /, **params: Unpack["TaxRateModifyParams"] ) -> "TaxRate": """ Updates an existing tax rate. @@ -232,7 +234,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["TaxRateModifyParams"] + cls, id: str, /, **params: Unpack["TaxRateModifyParams"] ) -> "TaxRate": """ Updates an existing tax rate. diff --git a/stripe/v2/money_management/_test_helpers_service.py b/stripe/_three_d_secure_service.py similarity index 68% rename from stripe/v2/money_management/_test_helpers_service.py rename to stripe/_three_d_secure_service.py index d5fa4a9cb..06b321711 100644 --- a/stripe/v2/money_management/_test_helpers_service.py +++ b/stripe/_three_d_secure_service.py @@ -5,20 +5,20 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: - from stripe.v2.money_management.test_helpers._financial_address_service import ( - FinancialAddressService, + from stripe.three_d_secure._authentication_service import ( + AuthenticationService, ) _subservices = { - "financial_addresses": [ - "stripe.v2.money_management.test_helpers._financial_address_service", - "FinancialAddressService", + "authentications": [ + "stripe.three_d_secure._authentication_service", + "AuthenticationService", ], } -class TestHelpersService(StripeService): - financial_addresses: "FinancialAddressService" +class ThreeDSecureService(StripeService): + authentications: "AuthenticationService" def __init__(self, requestor): super().__init__(requestor) diff --git a/stripe/_topup.py b/stripe/_topup.py index 1cbece59e..5ad3dc83c 100644 --- a/stripe/_topup.py +++ b/stripe/_topup.py @@ -162,9 +162,7 @@ def cancel(self, **params: Unpack["TopupCancelParams"]) -> "Topup": ... @class_method_variant("_cls_cancel") - def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["TopupCancelParams"] - ) -> "Topup": + def cancel(self, **params: Unpack["TopupCancelParams"]) -> "Topup": """ Cancels a top-up. Only pending top-ups can be canceled. """ @@ -215,7 +213,7 @@ async def cancel_async( ... @class_method_variant("_cls_cancel_async") - async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_async( self, **params: Unpack["TopupCancelParams"] ) -> "Topup": """ @@ -301,7 +299,9 @@ async def list_async( return result @classmethod - def modify(cls, id: str, **params: Unpack["TopupModifyParams"]) -> "Topup": + def modify( + cls, id: str, /, **params: Unpack["TopupModifyParams"] + ) -> "Topup": """ Updates the metadata of a top-up. Other top-up details are not editable by design. """ @@ -317,7 +317,7 @@ def modify(cls, id: str, **params: Unpack["TopupModifyParams"]) -> "Topup": @classmethod async def modify_async( - cls, id: str, **params: Unpack["TopupModifyParams"] + cls, id: str, /, **params: Unpack["TopupModifyParams"] ) -> "Topup": """ Updates the metadata of a top-up. Other top-up details are not editable by design. diff --git a/stripe/_transfer.py b/stripe/_transfer.py index 0572b3070..fb959a08b 100644 --- a/stripe/_transfer.py +++ b/stripe/_transfer.py @@ -16,7 +16,7 @@ from stripe._application_fee import ApplicationFee from stripe._balance_transaction import BalanceTransaction from stripe._charge import Charge - from stripe._reversal import Reversal + from stripe._transfer_reversal import TransferReversal from stripe.params._transfer_create_params import TransferCreateParams from stripe.params._transfer_create_reversal_params import ( TransferCreateReversalParams, @@ -109,7 +109,7 @@ class Transfer( """ String representing the object's type. Objects of the same type share the same value. """ - reversals: ListObject["Reversal"] + reversals: ListObject["TransferReversal"] """ A list of reversals that have been applied to the transfer. """ @@ -202,7 +202,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["TransferModifyParams"] + cls, id: str, /, **params: Unpack["TransferModifyParams"] ) -> "Transfer": """ Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -221,7 +221,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["TransferModifyParams"] + cls, id: str, /, **params: Unpack["TransferModifyParams"] ) -> "Transfer": """ Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -263,12 +263,12 @@ async def retrieve_async( @classmethod def list_reversals( cls, id: str, /, **params: Unpack["TransferListReversalsParams"] - ) -> ListObject["Reversal"]: + ) -> ListObject["TransferReversal"]: """ You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals. """ return cast( - ListObject["Reversal"], + ListObject["TransferReversal"], cls._static_request( "get", "/v1/transfers/{id}/reversals".format(id=sanitize_id(id)), @@ -279,12 +279,12 @@ def list_reversals( @classmethod async def list_reversals_async( cls, id: str, /, **params: Unpack["TransferListReversalsParams"] - ) -> ListObject["Reversal"]: + ) -> ListObject["TransferReversal"]: """ You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals. """ return cast( - ListObject["Reversal"], + ListObject["TransferReversal"], await cls._static_request_async( "get", "/v1/transfers/{id}/reversals".format(id=sanitize_id(id)), @@ -295,7 +295,7 @@ async def list_reversals_async( @classmethod def create_reversal( cls, id: str, /, **params: Unpack["TransferCreateReversalParams"] - ) -> "Reversal": + ) -> "TransferReversal": """ When you create a new reversal, you must specify a transfer to create it on. @@ -304,7 +304,7 @@ def create_reversal( Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer. """ return cast( - "Reversal", + "TransferReversal", cls._static_request( "post", "/v1/transfers/{id}/reversals".format(id=sanitize_id(id)), @@ -315,7 +315,7 @@ def create_reversal( @classmethod async def create_reversal_async( cls, id: str, /, **params: Unpack["TransferCreateReversalParams"] - ) -> "Reversal": + ) -> "TransferReversal": """ When you create a new reversal, you must specify a transfer to create it on. @@ -324,7 +324,7 @@ async def create_reversal_async( Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer. """ return cast( - "Reversal", + "TransferReversal", await cls._static_request_async( "post", "/v1/transfers/{id}/reversals".format(id=sanitize_id(id)), @@ -339,12 +339,12 @@ def retrieve_reversal( id: str, /, **params: Unpack["TransferRetrieveReversalParams"], - ) -> "Reversal": + ) -> "TransferReversal": """ By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer. """ return cast( - "Reversal", + "TransferReversal", cls._static_request( "get", "/v1/transfers/{transfer}/reversals/{id}".format( @@ -361,12 +361,12 @@ async def retrieve_reversal_async( id: str, /, **params: Unpack["TransferRetrieveReversalParams"], - ) -> "Reversal": + ) -> "TransferReversal": """ By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer. """ return cast( - "Reversal", + "TransferReversal", await cls._static_request_async( "get", "/v1/transfers/{transfer}/reversals/{id}".format( @@ -383,14 +383,14 @@ def modify_reversal( id: str, /, **params: Unpack["TransferModifyReversalParams"], - ) -> "Reversal": + ) -> "TransferReversal": """ Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request only accepts metadata and description as arguments. """ return cast( - "Reversal", + "TransferReversal", cls._static_request( "post", "/v1/transfers/{transfer}/reversals/{id}".format( @@ -407,14 +407,14 @@ async def modify_reversal_async( id: str, /, **params: Unpack["TransferModifyReversalParams"], - ) -> "Reversal": + ) -> "TransferReversal": """ Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request only accepts metadata and description as arguments. """ return cast( - "Reversal", + "TransferReversal", await cls._static_request_async( "post", "/v1/transfers/{transfer}/reversals/{id}".format( diff --git a/stripe/_reversal.py b/stripe/_transfer_reversal.py similarity index 98% rename from stripe/_reversal.py rename to stripe/_transfer_reversal.py index f6a6e5109..2a9dc2566 100644 --- a/stripe/_reversal.py +++ b/stripe/_transfer_reversal.py @@ -13,7 +13,7 @@ from stripe._refund import Refund -class Reversal(UpdateableAPIResource["Reversal"]): +class TransferReversal(UpdateableAPIResource["TransferReversal"]): """ [Stripe Connect](https://docs.stripe.com/connect) platforms can reverse transfers made to a connected account, either entirely or partially, and can also specify whether diff --git a/stripe/_transfer_reversal_service.py b/stripe/_transfer_reversal_service.py index e25f76cf0..c418478f2 100644 --- a/stripe/_transfer_reversal_service.py +++ b/stripe/_transfer_reversal_service.py @@ -8,7 +8,7 @@ if TYPE_CHECKING: from stripe._list_object import ListObject from stripe._request_options import RequestOptions - from stripe._reversal import Reversal + from stripe._transfer_reversal import TransferReversal from stripe.params._transfer_reversal_create_params import ( TransferReversalCreateParams, ) @@ -30,12 +30,12 @@ def list( /, params: Optional["TransferReversalListParams"] = None, options: Optional["RequestOptions"] = None, - ) -> "ListObject[Reversal]": + ) -> "ListObject[TransferReversal]": """ You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals. """ return cast( - "ListObject[Reversal]", + "ListObject[TransferReversal]", self._request( "get", "/v1/transfers/{id}/reversals".format(id=sanitize_id(id)), @@ -51,12 +51,12 @@ async def list_async( /, params: Optional["TransferReversalListParams"] = None, options: Optional["RequestOptions"] = None, - ) -> "ListObject[Reversal]": + ) -> "ListObject[TransferReversal]": """ You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals. """ return cast( - "ListObject[Reversal]", + "ListObject[TransferReversal]", await self._request_async( "get", "/v1/transfers/{id}/reversals".format(id=sanitize_id(id)), @@ -72,7 +72,7 @@ def create( /, params: Optional["TransferReversalCreateParams"] = None, options: Optional["RequestOptions"] = None, - ) -> "Reversal": + ) -> "TransferReversal": """ When you create a new reversal, you must specify a transfer to create it on. @@ -81,7 +81,7 @@ def create( Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer. """ return cast( - "Reversal", + "TransferReversal", self._request( "post", "/v1/transfers/{id}/reversals".format(id=sanitize_id(id)), @@ -97,7 +97,7 @@ async def create_async( /, params: Optional["TransferReversalCreateParams"] = None, options: Optional["RequestOptions"] = None, - ) -> "Reversal": + ) -> "TransferReversal": """ When you create a new reversal, you must specify a transfer to create it on. @@ -106,7 +106,7 @@ async def create_async( Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer. """ return cast( - "Reversal", + "TransferReversal", await self._request_async( "post", "/v1/transfers/{id}/reversals".format(id=sanitize_id(id)), @@ -123,12 +123,12 @@ def retrieve( /, params: Optional["TransferReversalRetrieveParams"] = None, options: Optional["RequestOptions"] = None, - ) -> "Reversal": + ) -> "TransferReversal": """ By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer. """ return cast( - "Reversal", + "TransferReversal", self._request( "get", "/v1/transfers/{transfer}/reversals/{id}".format( @@ -148,12 +148,12 @@ async def retrieve_async( /, params: Optional["TransferReversalRetrieveParams"] = None, options: Optional["RequestOptions"] = None, - ) -> "Reversal": + ) -> "TransferReversal": """ By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer. """ return cast( - "Reversal", + "TransferReversal", await self._request_async( "get", "/v1/transfers/{transfer}/reversals/{id}".format( @@ -173,14 +173,14 @@ def update( /, params: Optional["TransferReversalUpdateParams"] = None, options: Optional["RequestOptions"] = None, - ) -> "Reversal": + ) -> "TransferReversal": """ Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request only accepts metadata and description as arguments. """ return cast( - "Reversal", + "TransferReversal", self._request( "post", "/v1/transfers/{transfer}/reversals/{id}".format( @@ -200,14 +200,14 @@ async def update_async( /, params: Optional["TransferReversalUpdateParams"] = None, options: Optional["RequestOptions"] = None, - ) -> "Reversal": + ) -> "TransferReversal": """ Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request only accepts metadata and description as arguments. """ return cast( - "Reversal", + "TransferReversal", await self._request_async( "post", "/v1/transfers/{transfer}/reversals/{id}".format( diff --git a/stripe/_v1_services.py b/stripe/_v1_services.py index 83d9390df..a5deebce4 100644 --- a/stripe/_v1_services.py +++ b/stripe/_v1_services.py @@ -106,6 +106,7 @@ from stripe._tax_service import TaxService from stripe._terminal_service import TerminalService from stripe._test_helpers_service import TestHelpersService + from stripe._three_d_secure_service import ThreeDSecureService from stripe._token_service import TokenService from stripe._topup_service import TopupService from stripe._transfer_service import TransferService @@ -287,6 +288,10 @@ "tax_rates": ["stripe._tax_rate_service", "TaxRateService"], "terminal": ["stripe._terminal_service", "TerminalService"], "test_helpers": ["stripe._test_helpers_service", "TestHelpersService"], + "three_d_secure": [ + "stripe._three_d_secure_service", + "ThreeDSecureService", + ], "tokens": ["stripe._token_service", "TokenService"], "topups": ["stripe._topup_service", "TopupService"], "transfers": ["stripe._transfer_service", "TransferService"], @@ -386,6 +391,7 @@ class V1Services(StripeService): tax_rates: "TaxRateService" terminal: "TerminalService" test_helpers: "TestHelpersService" + three_d_secure: "ThreeDSecureService" tokens: "TokenService" topups: "TopupService" transfers: "TransferService" diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py index b9a345c56..f5886872f 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -132,7 +132,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["WebhookEndpointDeleteParams"] + cls, sid: str, /, **params: Unpack["WebhookEndpointDeleteParams"] ) -> "WebhookEndpoint": """ You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. @@ -150,7 +150,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["WebhookEndpointDeleteParams"] + sid: str, /, **params: Unpack["WebhookEndpointDeleteParams"] ) -> "WebhookEndpoint": """ You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. @@ -167,7 +167,7 @@ def delete( ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] + def delete( self, **params: Unpack["WebhookEndpointDeleteParams"] ) -> "WebhookEndpoint": """ @@ -181,7 +181,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["WebhookEndpointDeleteParams"] + cls, sid: str, /, **params: Unpack["WebhookEndpointDeleteParams"] ) -> "WebhookEndpoint": """ You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. @@ -199,7 +199,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["WebhookEndpointDeleteParams"] + sid: str, /, **params: Unpack["WebhookEndpointDeleteParams"] ) -> "WebhookEndpoint": """ You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. @@ -216,7 +216,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["WebhookEndpointDeleteParams"] ) -> "WebhookEndpoint": """ @@ -270,7 +270,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["WebhookEndpointModifyParams"] + cls, id: str, /, **params: Unpack["WebhookEndpointModifyParams"] ) -> "WebhookEndpoint": """ Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint. @@ -287,7 +287,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["WebhookEndpointModifyParams"] + cls, id: str, /, **params: Unpack["WebhookEndpointModifyParams"] ) -> "WebhookEndpoint": """ Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint. diff --git a/stripe/apps/__init__.py b/stripe/apps/__init__.py index 9d7e1db90..1d8f2463c 100644 --- a/stripe/apps/__init__.py +++ b/stripe/apps/__init__.py @@ -5,12 +5,14 @@ if TYPE_CHECKING: from stripe.apps._install import Install as Install + from stripe.apps._install_service import InstallService as InstallService from stripe.apps._secret import Secret as Secret from stripe.apps._secret_service import SecretService as SecretService # name -> (import_target, is_submodule) _import_map = { "Install": ("stripe.apps._install", False), + "InstallService": ("stripe.apps._install_service", False), "Secret": ("stripe.apps._secret", False), "SecretService": ("stripe.apps._secret_service", False), } diff --git a/stripe/apps/_install.py b/stripe/apps/_install.py index fbad653a5..c40ac4da4 100644 --- a/stripe/apps/_install.py +++ b/stripe/apps/_install.py @@ -1,11 +1,31 @@ # -*- 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 StripeObject -from typing import ClassVar, List, Optional, Union -from typing_extensions import Literal +from stripe._updateable_api_resource import UpdateableAPIResource +from stripe._util import class_method_variant, sanitize_id +from typing import ClassVar, List, Optional, Union, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.apps._install_create_params import InstallCreateParams + from stripe.params.apps._install_list_params import InstallListParams + from stripe.params.apps._install_modify_params import InstallModifyParams + from stripe.params.apps._install_retrieve_params import ( + InstallRetrieveParams, + ) + from stripe.params.apps._install_uninstall_params import ( + InstallUninstallParams, + ) -class Install(StripeObject): + +class Install( + CreateableAPIResource["Install"], + ListableAPIResource["Install"], + UpdateableAPIResource["Install"], +): """ An app install represents a Stripe App that is installed on an account. It reports the permissions, content security policy entries, and endpoints that the installing account has authorized, along with any @@ -15,11 +35,6 @@ class Install(StripeObject): OBJECT_NAME: ClassVar[Literal["apps.install"]] = "apps.install" - class AuthorizedContentSecurityPolicy(StripeObject): - connect_src: Optional[List[str]] - image_src: Optional[List[str]] - purpose: Optional[str] - class ContentSecurityPolicyGranted(StripeObject): connect_src: List[str] """ @@ -50,29 +65,20 @@ class ContentSecurityPolicyPending(StripeObject): """ approval_required: bool """ - Whether the installer must authorize pending permissions, content security policy entries, or endpoints. For private apps, `approval_required` stays `false`. Install a new version from the Dashboard to grant its permissions. + Whether the installer must authorize pending permissions, content security policy entries, or endpoints. For private apps, `approval_required` stays `false`; creating or reauthorizing the install through the API installs the newest completed upload and grants its permissions. """ auth_code: Optional[str] """ The authorization code for an oauth app install. """ - authorized_content_security_policy: AuthorizedContentSecurityPolicy - authorized_endpoints: List[str] - """ - The endpoint URLs authorized by the installer. - """ - authorized_permissions: List[str] - """ - The permissions authorized by the installer. - """ - channel: str + channel: Union[ + Literal["private_live", "private_test", "public", "review", "testing"], + str, + ] """ The distribution channel associated with the app install. """ - content_security_policy_granted: Optional[ContentSecurityPolicyGranted] - """ - The content security policy entries authorized by the installer. - """ + content_security_policy_granted: ContentSecurityPolicyGranted content_security_policy_pending: ContentSecurityPolicyPending created: int """ @@ -82,7 +88,7 @@ class ContentSecurityPolicyPending(StripeObject): """ The ID of the embedding platform that created the install, if applicable. """ - endpoints_granted: Optional[List[str]] + endpoints_granted: List[str] """ The endpoint URLs authorized by the installer. """ @@ -102,7 +108,7 @@ class ContentSecurityPolicyPending(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - permissions_granted: Optional[List[str]] + permissions_granted: List[str] """ The permissions authorized by the installer. """ @@ -110,27 +116,253 @@ class ContentSecurityPolicyPending(StripeObject): """ The permissions requested by the latest app version that the installer has not authorized. """ - state: str - """ - The status of the app install. - """ - status: Optional[ - Union[ - Literal[ - "install_failed", - "installed", - "installing", - "uninstall_failed", - "uninstalling", - ], - str, - ] + status: Union[ + Literal[ + "install_failed", + "installed", + "installing", + "uninstall_failed", + "uninstalling", + ], + str, ] """ The status of the app install. """ + + @classmethod + def create(cls, **params: Unpack["InstallCreateParams"]) -> "Install": + """ + Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned. + """ + return cast( + "Install", + cls._static_request( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + async def create_async( + cls, **params: Unpack["InstallCreateParams"] + ) -> "Install": + """ + Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned. + """ + return cast( + "Install", + await cls._static_request_async( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + 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. + """ + result = cls._static_request( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + async def list_async( + cls, **params: Unpack["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. + """ + result = await cls._static_request_async( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + def modify( + cls, id: str, /, **params: Unpack["InstallModifyParams"] + ) -> "Install": + """ + Reauthorizes an app install. The installer grants the permissions, content security policy entries, and endpoints that the version being installed requests. An account reauthorizes its own installs on any channel with its own key, which grants all of that access, so only give app_install_write to keys that may approve an app's access. App developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. An app developer can't grant new access. An embedding platform can grant new access only once the app's developer approves its request to embed the app. For private apps, the version being installed is the newest completed upload. + """ + url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + return cast( + "Install", + cls._static_request( + "post", + url, + params=params, + ), + ) + + @classmethod + async def modify_async( + cls, id: str, /, **params: Unpack["InstallModifyParams"] + ) -> "Install": + """ + Reauthorizes an app install. The installer grants the permissions, content security policy entries, and endpoints that the version being installed requests. An account reauthorizes its own installs on any channel with its own key, which grants all of that access, so only give app_install_write to keys that may approve an app's access. App developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. An app developer can't grant new access. An embedding platform can grant new access only once the app's developer approves its request to embed the app. For private apps, the version being installed is the newest completed upload. + """ + url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + return cast( + "Install", + await cls._static_request_async( + "post", + url, + params=params, + ), + ) + + @classmethod + def retrieve( + cls, id: str, **params: Unpack["InstallRetrieveParams"] + ) -> "Install": + """ + Retrieves an app install. The installing account, the app's developer (with the keys of the account that owns the app or of the app's managed sandbox), and the embedding platform that created the install can retrieve it. + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["InstallRetrieveParams"] + ) -> "Install": + """ + Retrieves an app install. The installing account, the app's developer (with the keys of the account that owns the app or of the app's managed sandbox), and the embedding platform that created the install can retrieve it. + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + + @classmethod + def _cls_uninstall( + cls, id: str, /, **params: Unpack["InstallUninstallParams"] + ) -> "Install": + """ + Uninstalls an app from the account that installed it. + """ + return cast( + "Install", + cls._static_request( + "post", + "/v1/apps/installs/{id}/uninstall".format(id=sanitize_id(id)), + params=params, + ), + ) + + @overload + @staticmethod + def uninstall( + id: str, /, **params: Unpack["InstallUninstallParams"] + ) -> "Install": + """ + Uninstalls an app from the account that installed it. + """ + ... + + @overload + def uninstall( + self, **params: Unpack["InstallUninstallParams"] + ) -> "Install": + """ + Uninstalls an app from the account that installed it. + """ + ... + + @class_method_variant("_cls_uninstall") + def uninstall( + self, **params: Unpack["InstallUninstallParams"] + ) -> "Install": + """ + Uninstalls an app from the account that installed it. + """ + return cast( + "Install", + self._request( + "post", + "/v1/apps/installs/{id}/uninstall".format( + id=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_uninstall_async( + cls, id: str, /, **params: Unpack["InstallUninstallParams"] + ) -> "Install": + """ + Uninstalls an app from the account that installed it. + """ + return cast( + "Install", + await cls._static_request_async( + "post", + "/v1/apps/installs/{id}/uninstall".format(id=sanitize_id(id)), + params=params, + ), + ) + + @overload + @staticmethod + async def uninstall_async( + id: str, /, **params: Unpack["InstallUninstallParams"] + ) -> "Install": + """ + Uninstalls an app from the account that installed it. + """ + ... + + @overload + async def uninstall_async( + self, **params: Unpack["InstallUninstallParams"] + ) -> "Install": + """ + Uninstalls an app from the account that installed it. + """ + ... + + @class_method_variant("_cls_uninstall_async") + async def uninstall_async( + self, **params: Unpack["InstallUninstallParams"] + ) -> "Install": + """ + Uninstalls an app from the account that installed it. + """ + return cast( + "Install", + await self._request_async( + "post", + "/v1/apps/installs/{id}/uninstall".format( + id=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + _inner_class_types = { - "authorized_content_security_policy": AuthorizedContentSecurityPolicy, "content_security_policy_granted": ContentSecurityPolicyGranted, "content_security_policy_pending": ContentSecurityPolicyPending, } diff --git a/stripe/apps/_install_service.py b/stripe/apps/_install_service.py new file mode 100644 index 000000000..930d3be45 --- /dev/null +++ b/stripe/apps/_install_service.py @@ -0,0 +1,224 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._list_object import ListObject + from stripe._request_options import RequestOptions + from stripe.apps._install import Install + from stripe.params.apps._install_create_params import InstallCreateParams + from stripe.params.apps._install_list_params import InstallListParams + from stripe.params.apps._install_retrieve_params import ( + InstallRetrieveParams, + ) + from stripe.params.apps._install_uninstall_params import ( + InstallUninstallParams, + ) + from stripe.params.apps._install_update_params import InstallUpdateParams + + +class InstallService(StripeService): + def list( + self, + params: Optional["InstallListParams"] = None, + 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. + """ + return cast( + "ListObject[Install]", + self._request( + "get", + "/v1/apps/installs", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["InstallListParams"] = None, + 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. + """ + return cast( + "ListObject[Install]", + await self._request_async( + "get", + "/v1/apps/installs", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "InstallCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "Install": + """ + Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned. + """ + return cast( + "Install", + self._request( + "post", + "/v1/apps/installs", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "InstallCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "Install": + """ + Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned. + """ + return cast( + "Install", + await self._request_async( + "post", + "/v1/apps/installs", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["InstallRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Install": + """ + Retrieves an app install. The installing account, the app's developer (with the keys of the account that owns the app or of the app's managed sandbox), and the embedding platform that created the install can retrieve it. + """ + return cast( + "Install", + self._request( + "get", + "/v1/apps/installs/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["InstallRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Install": + """ + Retrieves an app install. The installing account, the app's developer (with the keys of the account that owns the app or of the app's managed sandbox), and the embedding platform that created the install can retrieve it. + """ + return cast( + "Install", + await self._request_async( + "get", + "/v1/apps/installs/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + def update( + self, + id: str, + /, + params: Optional["InstallUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Install": + """ + Reauthorizes an app install. The installer grants the permissions, content security policy entries, and endpoints that the version being installed requests. An account reauthorizes its own installs on any channel with its own key, which grants all of that access, so only give app_install_write to keys that may approve an app's access. App developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. An app developer can't grant new access. An embedding platform can grant new access only once the app's developer approves its request to embed the app. For private apps, the version being installed is the newest completed upload. + """ + return cast( + "Install", + self._request( + "post", + "/v1/apps/installs/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + id: str, + /, + params: Optional["InstallUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Install": + """ + Reauthorizes an app install. The installer grants the permissions, content security policy entries, and endpoints that the version being installed requests. An account reauthorizes its own installs on any channel with its own key, which grants all of that access, so only give app_install_write to keys that may approve an app's access. App developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. An app developer can't grant new access. An embedding platform can grant new access only once the app's developer approves its request to embed the app. For private apps, the version being installed is the newest completed upload. + """ + return cast( + "Install", + await self._request_async( + "post", + "/v1/apps/installs/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + def uninstall( + self, + id: str, + /, + params: Optional["InstallUninstallParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Install": + """ + Uninstalls an app from the account that installed it. + """ + return cast( + "Install", + self._request( + "post", + "/v1/apps/installs/{id}/uninstall".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def uninstall_async( + self, + id: str, + /, + params: Optional["InstallUninstallParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Install": + """ + Uninstalls an app from the account that installed it. + """ + return cast( + "Install", + await self._request_async( + "post", + "/v1/apps/installs/{id}/uninstall".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/billing/_alert.py b/stripe/billing/_alert.py index 79308c147..453d89895 100644 --- a/stripe/billing/_alert.py +++ b/stripe/billing/_alert.py @@ -338,9 +338,7 @@ def activate(self, **params: Unpack["AlertActivateParams"]) -> "Alert": ... @class_method_variant("_cls_activate") - def activate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["AlertActivateParams"] - ) -> "Alert": + def activate(self, **params: Unpack["AlertActivateParams"]) -> "Alert": """ Reactivates this alert, allowing it to trigger again. """ @@ -391,7 +389,7 @@ async def activate_async( ... @class_method_variant("_cls_activate_async") - async def activate_async( # pyright: ignore[reportGeneralTypeIssues] + async def activate_async( self, **params: Unpack["AlertActivateParams"] ) -> "Alert": """ @@ -440,9 +438,7 @@ def archive(self, **params: Unpack["AlertArchiveParams"]) -> "Alert": ... @class_method_variant("_cls_archive") - def archive( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["AlertArchiveParams"] - ) -> "Alert": + def archive(self, **params: Unpack["AlertArchiveParams"]) -> "Alert": """ Archives this alert, removing it from the list view and APIs. This is non-reversible. """ @@ -493,7 +489,7 @@ async def archive_async( ... @class_method_variant("_cls_archive_async") - async def archive_async( # pyright: ignore[reportGeneralTypeIssues] + async def archive_async( self, **params: Unpack["AlertArchiveParams"] ) -> "Alert": """ @@ -576,9 +572,7 @@ def deactivate(self, **params: Unpack["AlertDeactivateParams"]) -> "Alert": ... @class_method_variant("_cls_deactivate") - def deactivate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["AlertDeactivateParams"] - ) -> "Alert": + def deactivate(self, **params: Unpack["AlertDeactivateParams"]) -> "Alert": """ Deactivates this alert, preventing it from triggering. """ @@ -631,7 +625,7 @@ async def deactivate_async( ... @class_method_variant("_cls_deactivate_async") - async def deactivate_async( # pyright: ignore[reportGeneralTypeIssues] + async def deactivate_async( self, **params: Unpack["AlertDeactivateParams"] ) -> "Alert": """ diff --git a/stripe/billing/_credit_grant.py b/stripe/billing/_credit_grant.py index 58053bc9a..d8c2fb223 100644 --- a/stripe/billing/_credit_grant.py +++ b/stripe/billing/_credit_grant.py @@ -299,7 +299,7 @@ def expire( ... @class_method_variant("_cls_expire") - def expire( # pyright: ignore[reportGeneralTypeIssues] + def expire( self, **params: Unpack["CreditGrantExpireParams"] ) -> "CreditGrant": """ @@ -354,7 +354,7 @@ async def expire_async( ... @class_method_variant("_cls_expire_async") - async def expire_async( # pyright: ignore[reportGeneralTypeIssues] + async def expire_async( self, **params: Unpack["CreditGrantExpireParams"] ) -> "CreditGrant": """ @@ -413,7 +413,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["CreditGrantModifyParams"] + cls, id: str, /, **params: Unpack["CreditGrantModifyParams"] ) -> "CreditGrant": """ Updates a credit grant. @@ -430,7 +430,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["CreditGrantModifyParams"] + cls, id: str, /, **params: Unpack["CreditGrantModifyParams"] ) -> "CreditGrant": """ Updates a credit grant. @@ -505,7 +505,7 @@ def void_grant( ... @class_method_variant("_cls_void_grant") - def void_grant( # pyright: ignore[reportGeneralTypeIssues] + def void_grant( self, **params: Unpack["CreditGrantVoidGrantParams"] ) -> "CreditGrant": """ @@ -560,7 +560,7 @@ async def void_grant_async( ... @class_method_variant("_cls_void_grant_async") - async def void_grant_async( # pyright: ignore[reportGeneralTypeIssues] + async def void_grant_async( self, **params: Unpack["CreditGrantVoidGrantParams"] ) -> "CreditGrant": """ diff --git a/stripe/billing/_feedback_option.py b/stripe/billing/_feedback_option.py index 1bb86bf4a..bea3b6b8d 100644 --- a/stripe/billing/_feedback_option.py +++ b/stripe/billing/_feedback_option.py @@ -142,7 +142,7 @@ def deactivate( ... @class_method_variant("_cls_deactivate") - def deactivate( # pyright: ignore[reportGeneralTypeIssues] + def deactivate( self, **params: Unpack["FeedbackOptionDeactivateParams"] ) -> "FeedbackOption": """ @@ -197,7 +197,7 @@ async def deactivate_async( ... @class_method_variant("_cls_deactivate_async") - async def deactivate_async( # pyright: ignore[reportGeneralTypeIssues] + async def deactivate_async( self, **params: Unpack["FeedbackOptionDeactivateParams"] ) -> "FeedbackOption": """ @@ -256,7 +256,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["FeedbackOptionModifyParams"] + cls, id: str, /, **params: Unpack["FeedbackOptionModifyParams"] ) -> "FeedbackOption": """ Updates the description of an existing feedback option. @@ -273,7 +273,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["FeedbackOptionModifyParams"] + cls, id: str, /, **params: Unpack["FeedbackOptionModifyParams"] ) -> "FeedbackOption": """ Updates the description of an existing feedback option. diff --git a/stripe/billing/_meter.py b/stripe/billing/_meter.py index 879ef194b..f4dbf0bd1 100644 --- a/stripe/billing/_meter.py +++ b/stripe/billing/_meter.py @@ -182,9 +182,7 @@ def deactivate(self, **params: Unpack["MeterDeactivateParams"]) -> "Meter": ... @class_method_variant("_cls_deactivate") - def deactivate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["MeterDeactivateParams"] - ) -> "Meter": + def deactivate(self, **params: Unpack["MeterDeactivateParams"]) -> "Meter": """ When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. """ @@ -237,7 +235,7 @@ async def deactivate_async( ... @class_method_variant("_cls_deactivate_async") - async def deactivate_async( # pyright: ignore[reportGeneralTypeIssues] + async def deactivate_async( self, **params: Unpack["MeterDeactivateParams"] ) -> "Meter": """ @@ -293,7 +291,9 @@ async def list_async( return result @classmethod - def modify(cls, id: str, **params: Unpack["MeterModifyParams"]) -> "Meter": + def modify( + cls, id: str, /, **params: Unpack["MeterModifyParams"] + ) -> "Meter": """ Updates a billing meter. """ @@ -309,7 +309,7 @@ def modify(cls, id: str, **params: Unpack["MeterModifyParams"]) -> "Meter": @classmethod async def modify_async( - cls, id: str, **params: Unpack["MeterModifyParams"] + cls, id: str, /, **params: Unpack["MeterModifyParams"] ) -> "Meter": """ Updates a billing meter. @@ -360,9 +360,7 @@ def reactivate(self, **params: Unpack["MeterReactivateParams"]) -> "Meter": ... @class_method_variant("_cls_reactivate") - def reactivate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["MeterReactivateParams"] - ) -> "Meter": + def reactivate(self, **params: Unpack["MeterReactivateParams"]) -> "Meter": """ When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. """ @@ -415,7 +413,7 @@ async def reactivate_async( ... @class_method_variant("_cls_reactivate_async") - async def reactivate_async( # pyright: ignore[reportGeneralTypeIssues] + async def reactivate_async( self, **params: Unpack["MeterReactivateParams"] ) -> "Meter": """ diff --git a/stripe/billing_portal/_configuration.py b/stripe/billing_portal/_configuration.py index af85f62e6..201d3f630 100644 --- a/stripe/billing_portal/_configuration.py +++ b/stripe/billing_portal/_configuration.py @@ -373,7 +373,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["ConfigurationModifyParams"] + cls, id: str, /, **params: Unpack["ConfigurationModifyParams"] ) -> "Configuration": """ Updates a configuration that describes the functionality of the customer portal. @@ -390,7 +390,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["ConfigurationModifyParams"] + cls, id: str, /, **params: Unpack["ConfigurationModifyParams"] ) -> "Configuration": """ Updates a configuration that describes the functionality of the customer portal. diff --git a/stripe/billing_portal/_session.py b/stripe/billing_portal/_session.py index 452caebd4..e934fc705 100644 --- a/stripe/billing_portal/_session.py +++ b/stripe/billing_portal/_session.py @@ -35,6 +35,23 @@ class Session(CreateableAPIResource["Session"]): "billing_portal.session" ) + class AfterExpiration(StripeObject): + class CustomerLogin(StripeObject): + expires_at: Optional[int] + """ + The time after which the customer can no longer recover this session. + """ + + customer_login: Optional[CustomerLogin] + """ + Configuration for authenticating the customer after the session expires. + """ + type: Union[Literal["customer_login"], str] + """ + The behavior to apply when the session expires. + """ + _inner_class_types = {"customer_login": CustomerLogin} + class Flow(StripeObject): class AfterCompletion(StripeObject): class HostedConfirmation(StripeObject): @@ -195,6 +212,10 @@ class Item(StripeObject): "subscription_update_confirm": SubscriptionUpdateConfirm, } + after_expiration: Optional[AfterExpiration] + """ + Behavior after the portal session expires. + """ configuration: ExpandableField["Configuration"] """ The configuration used by this session, describing the features available. @@ -327,4 +348,4 @@ async def create_async( ), ) - _inner_class_types = {"flow": Flow} + _inner_class_types = {"after_expiration": AfterExpiration, "flow": Flow} diff --git a/stripe/capital/_financing_offer.py b/stripe/capital/_financing_offer.py index 9f9cedbdc..8517ec996 100644 --- a/stripe/capital/_financing_offer.py +++ b/stripe/capital/_financing_offer.py @@ -1,14 +1,16 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._test_helpers import APIResourceTestHelpers 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, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: + from stripe._file import File from stripe.params.capital._financing_offer_create_params import ( FinancingOfferCreateParams, ) @@ -63,6 +65,22 @@ class AcceptedTerms(StripeObject): Per-transaction rate at which Stripe withholds funds to repay the financing. """ + class FinancingDocuments(StripeObject): + financing_agreement: Optional[ExpandableField["File"]] + """ + The primary contract that defines the financing provided to the connected account, including the funded amount, repayment terms, fees, and each party's obligations. Only available once the financing offer has been paid out. + """ + state_sales_based_financing_agreement: Optional[ + ExpandableField["File"] + ] + """ + A state-specific disclosure required by certain US states for sales-based financing. It supplements the main financing agreement and may be generated by Stripe or supplied by a financing partner, depending on the product. + """ + transfer_agreements: Optional[List[ExpandableField["File"]]] + """ + A partner-provided contract documenting the transfer or assignment of rights associated with the financing. It is separate from the main financing agreement, and a single financing may have multiple transfer agreements. + """ + class OfferedTerms(StripeObject): advance_amount: int """ @@ -123,6 +141,7 @@ class OfferedTerms(StripeObject): Literal[ "celtic_us_loan", "fundbox_au_financing", + "fundbox_ca_financing", "youlend_de_financing", "youlend_fr_financing", "youlend_uk_mca", @@ -138,6 +157,10 @@ class OfferedTerms(StripeObject): """ Time at which the offer expires. Given in seconds since unix epoch. """ + financing_documents: Optional[FinancingDocuments] + """ + Documents associated with a financing offer. + """ financing_type: Optional[Union[Literal["cash_advance", "flex_loan"], str]] """ The type of financing being offered. @@ -287,7 +310,7 @@ def mark_delivered( ... @class_method_variant("_cls_mark_delivered") - def mark_delivered( # pyright: ignore[reportGeneralTypeIssues] + def mark_delivered( self, **params: Unpack["FinancingOfferMarkDeliveredParams"] ) -> "FinancingOffer": """ @@ -351,7 +374,7 @@ async def mark_delivered_async( ... @class_method_variant("_cls_mark_delivered_async") - async def mark_delivered_async( # pyright: ignore[reportGeneralTypeIssues] + async def mark_delivered_async( self, **params: Unpack["FinancingOfferMarkDeliveredParams"] ) -> "FinancingOffer": """ @@ -469,7 +492,7 @@ def refill( ... @class_method_variant("_cls_refill") - def refill( # pyright: ignore[reportGeneralTypeIssues] + def refill( self, **params: Unpack["FinancingOfferRefillParams"] ) -> "FinancingOffer": """ @@ -531,7 +554,7 @@ async def refill_async( ... @class_method_variant("_cls_refill_async") - async def refill_async( # pyright: ignore[reportGeneralTypeIssues] + async def refill_async( self, **params: Unpack["FinancingOfferRefillParams"] ) -> "FinancingOffer": """ @@ -556,6 +579,7 @@ def test_helpers(self): _inner_class_types = { "accepted_terms": AcceptedTerms, + "financing_documents": FinancingDocuments, "offered_terms": OfferedTerms, } diff --git a/stripe/capital/_financing_summary.py b/stripe/capital/_financing_summary.py index 0ea56e3a6..8e07133c6 100644 --- a/stripe/capital/_financing_summary.py +++ b/stripe/capital/_financing_summary.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._singleton_api_resource import SingletonAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional, Union +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -77,10 +77,27 @@ class CurrentRepaymentInterval(StripeObject): """ The type of disclaimer to use for a financing offer in user-facing surfaces. The corresponding disclaimer text to use for each disclaimer_variant value can be found in the [regulatory compliance docs](https://docs.stripe.com/capital/regulatory-compliance). """ + enabled_payment_types: Optional[ + List[ + Union[ + Literal[ + "automatic_debits", "manual_payment", "withholding" + ], + str, + ] + ] + ] + """ + The ways the connected account can pay toward its financing(s). + """ fee_amount: int """ Fixed fee amount, in minor units. For example, 100 USD is represented as 10000. """ + overdue_amount: Optional[int] + """ + The overdue amount, in minor units. For example, 1,000 USD is represented as 100000. Defaults to null for legal cash advances. + """ paid_amount: int """ The amount the Connected account has paid toward the financing debt so far, in minor units. For example, 1,000 USD is represented as 100000. diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 810e847c8..53f0b2083 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -1252,6 +1252,12 @@ class PendingInvoiceItemInterval(StripeObject): class TrialSettings(StripeObject): class EndBehavior(StripeObject): + billing_cycle_anchor: Optional[ + Union[Literal["now", "unchanged"], str] + ] + """ + Indicates how the subscription's billing cycle anchor is reset when a trial ends. If not set, the default is `now`. + """ missing_payment_method: Union[ Literal["cancel", "create_invoice", "pause"], str ] @@ -2657,6 +2663,10 @@ class SavedPaymentMethodOptions(StripeObject): """ Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout. """ + payment_method_preselect: Optional[str] + """ + The ID of a saved payment method to select when the Payment Element renders, for example `pm_1MqLiJLkdIwHu7ixUEgbFdYF`. Takes precedence over the customer's default payment method. If the ID doesn't match one of the payment methods the Element is displaying, the Element selects a payment method as it normally would and no error is returned. Preselecting a payment method never changes which payment methods the Element displays, and never modifies the payment method, the customer, or this session. The preselection is fixed once set. To preselect a different payment method, create a new session. An Element that's already on the page keeps its current selection. + """ payment_method_remove: Optional[ Union[Literal["disabled", "enabled"], str] ] @@ -3130,6 +3140,10 @@ class Link(StripeObject): """ Enables user redeemable promotion codes. """ + allowed_payment_method_types: Optional[List[str]] + """ + A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. + """ amount_subtotal: Optional[int] """ Total of all items before discounts or taxes are applied. @@ -3201,7 +3215,7 @@ class Link(StripeObject): """ custom_fields: List[CustomField] """ - Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`. + Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `elements`. """ custom_payment_method_types: Optional[List[str]] """ @@ -3522,9 +3536,7 @@ def approve(self, **params: Unpack["SessionApproveParams"]) -> "Session": ... @class_method_variant("_cls_approve") - def approve( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SessionApproveParams"] - ) -> "Session": + def approve(self, **params: Unpack["SessionApproveParams"]) -> "Session": """ Approves a customer's attempt to pay for a Checkout Session with approval_method set to manual. """ @@ -3577,7 +3589,7 @@ async def approve_async( ... @class_method_variant("_cls_approve_async") - async def approve_async( # pyright: ignore[reportGeneralTypeIssues] + async def approve_async( self, **params: Unpack["SessionApproveParams"] ) -> "Session": """ @@ -3666,9 +3678,7 @@ def expire(self, **params: Unpack["SessionExpireParams"]) -> "Session": ... @class_method_variant("_cls_expire") - def expire( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SessionExpireParams"] - ) -> "Session": + def expire(self, **params: Unpack["SessionExpireParams"]) -> "Session": """ A Checkout Session can be expired when it is in one of these statuses: open @@ -3729,7 +3739,7 @@ async def expire_async( ... @class_method_variant("_cls_expire_async") - async def expire_async( # pyright: ignore[reportGeneralTypeIssues] + async def expire_async( self, **params: Unpack["SessionExpireParams"] ) -> "Session": """ @@ -3826,7 +3836,7 @@ def list_line_items( ... @class_method_variant("_cls_list_line_items") - def list_line_items( # pyright: ignore[reportGeneralTypeIssues] + def list_line_items( self, **params: Unpack["SessionListLineItemsParams"] ) -> ListObject["LineItem"]: """ @@ -3881,7 +3891,7 @@ async def list_line_items_async( ... @class_method_variant("_cls_list_line_items_async") - async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] + async def list_line_items_async( self, **params: Unpack["SessionListLineItemsParams"] ) -> ListObject["LineItem"]: """ @@ -3900,7 +3910,7 @@ async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def modify( - cls, id: str, **params: Unpack["SessionModifyParams"] + cls, id: str, /, **params: Unpack["SessionModifyParams"] ) -> "Session": """ Updates a Checkout Session object. @@ -3919,7 +3929,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["SessionModifyParams"] + cls, id: str, /, **params: Unpack["SessionModifyParams"] ) -> "Session": """ Updates a Checkout Session object. diff --git a/stripe/climate/_order.py b/stripe/climate/_order.py index b491769ca..938e072a8 100644 --- a/stripe/climate/_order.py +++ b/stripe/climate/_order.py @@ -224,9 +224,7 @@ def cancel(self, **params: Unpack["OrderCancelParams"]) -> "Order": ... @class_method_variant("_cls_cancel") - def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OrderCancelParams"] - ) -> "Order": + def cancel(self, **params: Unpack["OrderCancelParams"]) -> "Order": """ Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier @@ -291,7 +289,7 @@ async def cancel_async( ... @class_method_variant("_cls_cancel_async") - async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_async( self, **params: Unpack["OrderCancelParams"] ) -> "Order": """ @@ -384,7 +382,9 @@ async def list_async( return result @classmethod - def modify(cls, id: str, **params: Unpack["OrderModifyParams"]) -> "Order": + def modify( + cls, id: str, /, **params: Unpack["OrderModifyParams"] + ) -> "Order": """ Updates the specified order by setting the values of the parameters passed. """ @@ -400,7 +400,7 @@ def modify(cls, id: str, **params: Unpack["OrderModifyParams"]) -> "Order": @classmethod async def modify_async( - cls, id: str, **params: Unpack["OrderModifyParams"] + cls, id: str, /, **params: Unpack["OrderModifyParams"] ) -> "Order": """ Updates the specified order by setting the values of the parameters passed. diff --git a/stripe/crypto/_onramp_session.py b/stripe/crypto/_onramp_session.py index a0a62f4a5..09a5a8629 100644 --- a/stripe/crypto/_onramp_session.py +++ b/stripe/crypto/_onramp_session.py @@ -334,7 +334,7 @@ def checkout( ... @class_method_variant("_cls_checkout") - def checkout( # pyright: ignore[reportGeneralTypeIssues] + def checkout( self, **params: Unpack["OnrampSessionCheckoutParams"] ) -> "OnrampSession": """ @@ -397,7 +397,7 @@ async def checkout_async( ... @class_method_variant("_cls_checkout_async") - async def checkout_async( # pyright: ignore[reportGeneralTypeIssues] + async def checkout_async( self, **params: Unpack["OnrampSessionCheckoutParams"] ) -> "OnrampSession": """ @@ -534,7 +534,7 @@ def quote( ... @class_method_variant("_cls_quote") - def quote( # pyright: ignore[reportGeneralTypeIssues] + def quote( self, **params: Unpack["OnrampSessionQuoteParams"] ) -> "OnrampSession": """ @@ -589,7 +589,7 @@ async def quote_async( ... @class_method_variant("_cls_quote_async") - async def quote_async( # pyright: ignore[reportGeneralTypeIssues] + async def quote_async( self, **params: Unpack["OnrampSessionQuoteParams"] ) -> "OnrampSession": """ diff --git a/stripe/delegated_checkout/_requested_session.py b/stripe/delegated_checkout/_requested_session.py index b3fe93183..f2671bf78 100644 --- a/stripe/delegated_checkout/_requested_session.py +++ b/stripe/delegated_checkout/_requested_session.py @@ -901,7 +901,7 @@ def confirm( ... @class_method_variant("_cls_confirm") - def confirm( # pyright: ignore[reportGeneralTypeIssues] + def confirm( self, **params: Unpack["RequestedSessionConfirmParams"] ) -> "RequestedSession": """ @@ -961,7 +961,7 @@ async def confirm_async( ... @class_method_variant("_cls_confirm_async") - async def confirm_async( # pyright: ignore[reportGeneralTypeIssues] + async def confirm_async( self, **params: Unpack["RequestedSessionConfirmParams"] ) -> "RequestedSession": """ @@ -1053,7 +1053,7 @@ def expire( ... @class_method_variant("_cls_expire") - def expire( # pyright: ignore[reportGeneralTypeIssues] + def expire( self, **params: Unpack["RequestedSessionExpireParams"] ) -> "RequestedSession": """ @@ -1113,7 +1113,7 @@ async def expire_async( ... @class_method_variant("_cls_expire_async") - async def expire_async( # pyright: ignore[reportGeneralTypeIssues] + async def expire_async( self, **params: Unpack["RequestedSessionExpireParams"] ) -> "RequestedSession": """ @@ -1173,7 +1173,7 @@ def list_orders( ... @class_method_variant("_cls_list_orders") - def list_orders( # pyright: ignore[reportGeneralTypeIssues] + def list_orders( self, **params: Unpack["RequestedSessionListOrdersParams"] ) -> ListObject["Order"]: """ @@ -1233,7 +1233,7 @@ async def list_orders_async( ... @class_method_variant("_cls_list_orders_async") - async def list_orders_async( # pyright: ignore[reportGeneralTypeIssues] + async def list_orders_async( self, **params: Unpack["RequestedSessionListOrdersParams"] ) -> ListObject["Order"]: """ @@ -1252,7 +1252,7 @@ async def list_orders_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def modify( - cls, id: str, **params: Unpack["RequestedSessionModifyParams"] + cls, id: str, /, **params: Unpack["RequestedSessionModifyParams"] ) -> "RequestedSession": """ Updates a requested session @@ -1269,7 +1269,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["RequestedSessionModifyParams"] + cls, id: str, /, **params: Unpack["RequestedSessionModifyParams"] ) -> "RequestedSession": """ Updates a requested session diff --git a/stripe/entitlements/_feature.py b/stripe/entitlements/_feature.py index ece2eb797..ee834faf8 100644 --- a/stripe/entitlements/_feature.py +++ b/stripe/entitlements/_feature.py @@ -138,7 +138,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["FeatureModifyParams"] + cls, id: str, /, **params: Unpack["FeatureModifyParams"] ) -> "Feature": """ Update a feature's metadata or permanently deactivate it. @@ -155,7 +155,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["FeatureModifyParams"] + cls, id: str, /, **params: Unpack["FeatureModifyParams"] ) -> "Feature": """ Update a feature's metadata or permanently deactivate it. diff --git a/stripe/events/__init__.py b/stripe/events/__init__.py index f798b0c25..a3679b0bc 100644 --- a/stripe/events/__init__.py +++ b/stripe/events/__init__.py @@ -1395,6 +1395,38 @@ V2CoreVaultNetworkTokenSuspendedEvent as V2CoreVaultNetworkTokenSuspendedEvent, V2CoreVaultNetworkTokenSuspendedEventNotification as V2CoreVaultNetworkTokenSuspendedEventNotification, ) + from stripe.events._v2_data_query_run_created_event import ( + V2DataQueryRunCreatedEvent as V2DataQueryRunCreatedEvent, + V2DataQueryRunCreatedEventNotification as V2DataQueryRunCreatedEventNotification, + ) + from stripe.events._v2_data_query_run_failed_event import ( + V2DataQueryRunFailedEvent as V2DataQueryRunFailedEvent, + V2DataQueryRunFailedEventNotification as V2DataQueryRunFailedEventNotification, + ) + from stripe.events._v2_data_query_run_succeeded_event import ( + V2DataQueryRunSucceededEvent as V2DataQueryRunSucceededEvent, + V2DataQueryRunSucceededEventNotification as V2DataQueryRunSucceededEventNotification, + ) + from stripe.events._v2_data_query_run_updated_event import ( + V2DataQueryRunUpdatedEvent as V2DataQueryRunUpdatedEvent, + V2DataQueryRunUpdatedEventNotification as V2DataQueryRunUpdatedEventNotification, + ) + from stripe.events._v2_data_report_run_created_event import ( + V2DataReportRunCreatedEvent as V2DataReportRunCreatedEvent, + V2DataReportRunCreatedEventNotification as V2DataReportRunCreatedEventNotification, + ) + from stripe.events._v2_data_report_run_failed_event import ( + V2DataReportRunFailedEvent as V2DataReportRunFailedEvent, + V2DataReportRunFailedEventNotification as V2DataReportRunFailedEventNotification, + ) + from stripe.events._v2_data_report_run_succeeded_event import ( + V2DataReportRunSucceededEvent as V2DataReportRunSucceededEvent, + V2DataReportRunSucceededEventNotification as V2DataReportRunSucceededEventNotification, + ) + from stripe.events._v2_data_report_run_updated_event import ( + V2DataReportRunUpdatedEvent as V2DataReportRunUpdatedEvent, + V2DataReportRunUpdatedEventNotification as V2DataReportRunUpdatedEventNotification, + ) from stripe.events._v2_data_reporting_query_run_created_event import ( V2DataReportingQueryRunCreatedEvent as V2DataReportingQueryRunCreatedEvent, V2DataReportingQueryRunCreatedEventNotification as V2DataReportingQueryRunCreatedEventNotification, @@ -1491,6 +1523,10 @@ V2MoneyManagementDebitDisputeSucceededEvent as V2MoneyManagementDebitDisputeSucceededEvent, V2MoneyManagementDebitDisputeSucceededEventNotification as V2MoneyManagementDebitDisputeSucceededEventNotification, ) + from stripe.events._v2_money_management_earned_credit_succeeded_event import ( + V2MoneyManagementEarnedCreditSucceededEvent as V2MoneyManagementEarnedCreditSucceededEvent, + V2MoneyManagementEarnedCreditSucceededEventNotification as V2MoneyManagementEarnedCreditSucceededEventNotification, + ) from stripe.events._v2_money_management_financial_account_created_event import ( V2MoneyManagementFinancialAccountCreatedEvent as V2MoneyManagementFinancialAccountCreatedEvent, V2MoneyManagementFinancialAccountCreatedEventNotification as V2MoneyManagementFinancialAccountCreatedEventNotification, @@ -4512,6 +4548,70 @@ "stripe.events._v2_core_vault_network_token_suspended_event", False, ), + "V2DataQueryRunCreatedEvent": ( + "stripe.events._v2_data_query_run_created_event", + False, + ), + "V2DataQueryRunCreatedEventNotification": ( + "stripe.events._v2_data_query_run_created_event", + False, + ), + "V2DataQueryRunFailedEvent": ( + "stripe.events._v2_data_query_run_failed_event", + False, + ), + "V2DataQueryRunFailedEventNotification": ( + "stripe.events._v2_data_query_run_failed_event", + False, + ), + "V2DataQueryRunSucceededEvent": ( + "stripe.events._v2_data_query_run_succeeded_event", + False, + ), + "V2DataQueryRunSucceededEventNotification": ( + "stripe.events._v2_data_query_run_succeeded_event", + False, + ), + "V2DataQueryRunUpdatedEvent": ( + "stripe.events._v2_data_query_run_updated_event", + False, + ), + "V2DataQueryRunUpdatedEventNotification": ( + "stripe.events._v2_data_query_run_updated_event", + False, + ), + "V2DataReportRunCreatedEvent": ( + "stripe.events._v2_data_report_run_created_event", + False, + ), + "V2DataReportRunCreatedEventNotification": ( + "stripe.events._v2_data_report_run_created_event", + False, + ), + "V2DataReportRunFailedEvent": ( + "stripe.events._v2_data_report_run_failed_event", + False, + ), + "V2DataReportRunFailedEventNotification": ( + "stripe.events._v2_data_report_run_failed_event", + False, + ), + "V2DataReportRunSucceededEvent": ( + "stripe.events._v2_data_report_run_succeeded_event", + False, + ), + "V2DataReportRunSucceededEventNotification": ( + "stripe.events._v2_data_report_run_succeeded_event", + False, + ), + "V2DataReportRunUpdatedEvent": ( + "stripe.events._v2_data_report_run_updated_event", + False, + ), + "V2DataReportRunUpdatedEventNotification": ( + "stripe.events._v2_data_report_run_updated_event", + False, + ), "V2DataReportingQueryRunCreatedEvent": ( "stripe.events._v2_data_reporting_query_run_created_event", False, @@ -4704,6 +4804,14 @@ "stripe.events._v2_money_management_debit_dispute_succeeded_event", False, ), + "V2MoneyManagementEarnedCreditSucceededEvent": ( + "stripe.events._v2_money_management_earned_credit_succeeded_event", + False, + ), + "V2MoneyManagementEarnedCreditSucceededEventNotification": ( + "stripe.events._v2_money_management_earned_credit_succeeded_event", + False, + ), "V2MoneyManagementFinancialAccountCreatedEvent": ( "stripe.events._v2_money_management_financial_account_created_event", False, diff --git a/stripe/events/_event_classes.py b/stripe/events/_event_classes.py index 20b4d5e15..ba2159d68 100644 --- a/stripe/events/_event_classes.py +++ b/stripe/events/_event_classes.py @@ -1042,6 +1042,18 @@ from stripe.events._v2_core_vault_network_token_suspended_event import ( V2CoreVaultNetworkTokenSuspendedEventNotification, ) + from stripe.events._v2_data_query_run_created_event import ( + V2DataQueryRunCreatedEventNotification, + ) + from stripe.events._v2_data_query_run_failed_event import ( + V2DataQueryRunFailedEventNotification, + ) + from stripe.events._v2_data_query_run_succeeded_event import ( + V2DataQueryRunSucceededEventNotification, + ) + from stripe.events._v2_data_query_run_updated_event import ( + V2DataQueryRunUpdatedEventNotification, + ) from stripe.events._v2_data_reporting_query_run_created_event import ( V2DataReportingQueryRunCreatedEventNotification, ) @@ -1054,6 +1066,18 @@ from stripe.events._v2_data_reporting_query_run_updated_event import ( V2DataReportingQueryRunUpdatedEventNotification, ) + from stripe.events._v2_data_report_run_created_event import ( + V2DataReportRunCreatedEventNotification, + ) + from stripe.events._v2_data_report_run_failed_event import ( + V2DataReportRunFailedEventNotification, + ) + from stripe.events._v2_data_report_run_succeeded_event import ( + V2DataReportRunSucceededEventNotification, + ) + from stripe.events._v2_data_report_run_updated_event import ( + V2DataReportRunUpdatedEventNotification, + ) from stripe.events._v2_extend_extension_run_failed_event import ( V2ExtendExtensionRunFailedEventNotification, ) @@ -1114,6 +1138,9 @@ from stripe.events._v2_money_management_debit_dispute_succeeded_event import ( V2MoneyManagementDebitDisputeSucceededEventNotification, ) + from stripe.events._v2_money_management_earned_credit_succeeded_event import ( + V2MoneyManagementEarnedCreditSucceededEventNotification, + ) from stripe.events._v2_money_management_financial_account_created_event import ( V2MoneyManagementFinancialAccountCreatedEventNotification, ) @@ -2773,6 +2800,22 @@ "stripe.events._v2_core_vault_network_token_suspended_event", "V2CoreVaultNetworkTokenSuspendedEvent", ), + "v2.data.query_run.created": ( + "stripe.events._v2_data_query_run_created_event", + "V2DataQueryRunCreatedEvent", + ), + "v2.data.query_run.failed": ( + "stripe.events._v2_data_query_run_failed_event", + "V2DataQueryRunFailedEvent", + ), + "v2.data.query_run.succeeded": ( + "stripe.events._v2_data_query_run_succeeded_event", + "V2DataQueryRunSucceededEvent", + ), + "v2.data.query_run.updated": ( + "stripe.events._v2_data_query_run_updated_event", + "V2DataQueryRunUpdatedEvent", + ), "v2.data.reporting.query_run.created": ( "stripe.events._v2_data_reporting_query_run_created_event", "V2DataReportingQueryRunCreatedEvent", @@ -2789,6 +2832,22 @@ "stripe.events._v2_data_reporting_query_run_updated_event", "V2DataReportingQueryRunUpdatedEvent", ), + "v2.data.report_run.created": ( + "stripe.events._v2_data_report_run_created_event", + "V2DataReportRunCreatedEvent", + ), + "v2.data.report_run.failed": ( + "stripe.events._v2_data_report_run_failed_event", + "V2DataReportRunFailedEvent", + ), + "v2.data.report_run.succeeded": ( + "stripe.events._v2_data_report_run_succeeded_event", + "V2DataReportRunSucceededEvent", + ), + "v2.data.report_run.updated": ( + "stripe.events._v2_data_report_run_updated_event", + "V2DataReportRunUpdatedEvent", + ), "v2.extend.extension_run.failed": ( "stripe.events._v2_extend_extension_run_failed_event", "V2ExtendExtensionRunFailedEvent", @@ -2869,6 +2928,10 @@ "stripe.events._v2_money_management_debit_dispute_succeeded_event", "V2MoneyManagementDebitDisputeSucceededEvent", ), + "v2.money_management.earned_credit.succeeded": ( + "stripe.events._v2_money_management_earned_credit_succeeded_event", + "V2MoneyManagementEarnedCreditSucceededEvent", + ), "v2.money_management.financial_account.created": ( "stripe.events._v2_money_management_financial_account_created_event", "V2MoneyManagementFinancialAccountCreatedEvent", @@ -4632,6 +4695,22 @@ def get_v2_event_class(type_: str): "stripe.events._v2_core_vault_network_token_suspended_event", "V2CoreVaultNetworkTokenSuspendedEventNotification", ), + "v2.data.query_run.created": ( + "stripe.events._v2_data_query_run_created_event", + "V2DataQueryRunCreatedEventNotification", + ), + "v2.data.query_run.failed": ( + "stripe.events._v2_data_query_run_failed_event", + "V2DataQueryRunFailedEventNotification", + ), + "v2.data.query_run.succeeded": ( + "stripe.events._v2_data_query_run_succeeded_event", + "V2DataQueryRunSucceededEventNotification", + ), + "v2.data.query_run.updated": ( + "stripe.events._v2_data_query_run_updated_event", + "V2DataQueryRunUpdatedEventNotification", + ), "v2.data.reporting.query_run.created": ( "stripe.events._v2_data_reporting_query_run_created_event", "V2DataReportingQueryRunCreatedEventNotification", @@ -4648,6 +4727,22 @@ def get_v2_event_class(type_: str): "stripe.events._v2_data_reporting_query_run_updated_event", "V2DataReportingQueryRunUpdatedEventNotification", ), + "v2.data.report_run.created": ( + "stripe.events._v2_data_report_run_created_event", + "V2DataReportRunCreatedEventNotification", + ), + "v2.data.report_run.failed": ( + "stripe.events._v2_data_report_run_failed_event", + "V2DataReportRunFailedEventNotification", + ), + "v2.data.report_run.succeeded": ( + "stripe.events._v2_data_report_run_succeeded_event", + "V2DataReportRunSucceededEventNotification", + ), + "v2.data.report_run.updated": ( + "stripe.events._v2_data_report_run_updated_event", + "V2DataReportRunUpdatedEventNotification", + ), "v2.extend.extension_run.failed": ( "stripe.events._v2_extend_extension_run_failed_event", "V2ExtendExtensionRunFailedEventNotification", @@ -4728,6 +4823,10 @@ def get_v2_event_class(type_: str): "stripe.events._v2_money_management_debit_dispute_succeeded_event", "V2MoneyManagementDebitDisputeSucceededEventNotification", ), + "v2.money_management.earned_credit.succeeded": ( + "stripe.events._v2_money_management_earned_credit_succeeded_event", + "V2MoneyManagementEarnedCreditSucceededEventNotification", + ), "v2.money_management.financial_account.created": ( "stripe.events._v2_money_management_financial_account_created_event", "V2MoneyManagementFinancialAccountCreatedEventNotification", @@ -5456,10 +5555,18 @@ def get_v2_event_notification_class(type_: str): "V2CoreVaultNetworkTokenDeactivatedEventNotification", "V2CoreVaultNetworkTokenDetailsUpdatedEventNotification", "V2CoreVaultNetworkTokenSuspendedEventNotification", + "V2DataQueryRunCreatedEventNotification", + "V2DataQueryRunFailedEventNotification", + "V2DataQueryRunSucceededEventNotification", + "V2DataQueryRunUpdatedEventNotification", "V2DataReportingQueryRunCreatedEventNotification", "V2DataReportingQueryRunFailedEventNotification", "V2DataReportingQueryRunSucceededEventNotification", "V2DataReportingQueryRunUpdatedEventNotification", + "V2DataReportRunCreatedEventNotification", + "V2DataReportRunFailedEventNotification", + "V2DataReportRunSucceededEventNotification", + "V2DataReportRunUpdatedEventNotification", "V2ExtendExtensionRunFailedEventNotification", "V2ExtendWorkflowRunFailedEventNotification", "V2ExtendWorkflowRunStartedEventNotification", @@ -5480,6 +5587,7 @@ def get_v2_event_notification_class(type_: str): "V2MoneyManagementDebitDisputeFailedEventNotification", "V2MoneyManagementDebitDisputeSubmittedEventNotification", "V2MoneyManagementDebitDisputeSucceededEventNotification", + "V2MoneyManagementEarnedCreditSucceededEventNotification", "V2MoneyManagementFinancialAccountCreatedEventNotification", "V2MoneyManagementFinancialAccountStatementCreatedEventNotification", "V2MoneyManagementFinancialAccountStatementRestatedEventNotification", 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 efd769bd1..ed11fbbd1 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 @@ -140,8 +140,10 @@ class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventDat "promptpay_payments", "revolut_pay_payments", "samsung_pay_payments", + "satispay_payments", "sepa_bank_transfer_payments", "sepa_debit_payments", + "sequra_payments", "sunbit_payments", "swish_payments", "twint_payments", 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 317fcac5f..779af6547 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 @@ -99,11 +99,13 @@ class V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEven "business_storage.inbound.cad", "business_storage.inbound.eur", "business_storage.inbound.gbp", + "business_storage.inbound.ousd", "business_storage.inbound.usd", "business_storage.inbound.usdc", "business_storage.outbound.cad", "business_storage.outbound.eur", "business_storage.outbound.gbp", + "business_storage.outbound.ousd", "business_storage.outbound.usd", "business_storage.outbound.usdc", "consumer_storage.inbound.usd", diff --git a/stripe/events/_v2_data_query_run_created_event.py b/stripe/events/_v2_data_query_run_created_event.py new file mode 100644 index 000000000..b2367eb46 --- /dev/null +++ b/stripe/events/_v2_data_query_run_created_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.data._query_run import QueryRun + + +class V2DataQueryRunCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.data.query_run.created" + type: Literal["v2.data.query_run.created"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2DataQueryRunCreatedEvent": + return cast( + "V2DataQueryRunCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "QueryRun": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V2DataQueryRunCreatedEvent": + return cast( + "V2DataQueryRunCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "QueryRun": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2DataQueryRunCreatedEvent(Event): + LOOKUP_TYPE = "v2.data.query_run.created" + type: Literal["v2.data.query_run.created"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "QueryRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "QueryRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_data_query_run_failed_event.py b/stripe/events/_v2_data_query_run_failed_event.py new file mode 100644 index 000000000..c5fc62eeb --- /dev/null +++ b/stripe/events/_v2_data_query_run_failed_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.data._query_run import QueryRun + + +class V2DataQueryRunFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.data.query_run.failed" + type: Literal["v2.data.query_run.failed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2DataQueryRunFailedEvent": + return cast( + "V2DataQueryRunFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "QueryRun": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V2DataQueryRunFailedEvent": + return cast( + "V2DataQueryRunFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "QueryRun": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2DataQueryRunFailedEvent(Event): + LOOKUP_TYPE = "v2.data.query_run.failed" + type: Literal["v2.data.query_run.failed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "QueryRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "QueryRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_data_query_run_succeeded_event.py b/stripe/events/_v2_data_query_run_succeeded_event.py new file mode 100644 index 000000000..86343daf7 --- /dev/null +++ b/stripe/events/_v2_data_query_run_succeeded_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.data._query_run import QueryRun + + +class V2DataQueryRunSucceededEventNotification(EventNotification): + LOOKUP_TYPE = "v2.data.query_run.succeeded" + type: Literal["v2.data.query_run.succeeded"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2DataQueryRunSucceededEvent": + return cast( + "V2DataQueryRunSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "QueryRun": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V2DataQueryRunSucceededEvent": + return cast( + "V2DataQueryRunSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "QueryRun": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2DataQueryRunSucceededEvent(Event): + LOOKUP_TYPE = "v2.data.query_run.succeeded" + type: Literal["v2.data.query_run.succeeded"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "QueryRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "QueryRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_data_query_run_updated_event.py b/stripe/events/_v2_data_query_run_updated_event.py new file mode 100644 index 000000000..aa8ef758f --- /dev/null +++ b/stripe/events/_v2_data_query_run_updated_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.data._query_run import QueryRun + + +class V2DataQueryRunUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.data.query_run.updated" + type: Literal["v2.data.query_run.updated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2DataQueryRunUpdatedEvent": + return cast( + "V2DataQueryRunUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "QueryRun": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V2DataQueryRunUpdatedEvent": + return cast( + "V2DataQueryRunUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "QueryRun": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "QueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2DataQueryRunUpdatedEvent(Event): + LOOKUP_TYPE = "v2.data.query_run.updated" + type: Literal["v2.data.query_run.updated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "QueryRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "QueryRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_data_report_run_created_event.py b/stripe/events/_v2_data_report_run_created_event.py new file mode 100644 index 000000000..29d001269 --- /dev/null +++ b/stripe/events/_v2_data_report_run_created_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.data._report_run import ReportRun + + +class V2DataReportRunCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.data.report_run.created" + type: Literal["v2.data.report_run.created"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2DataReportRunCreatedEvent": + return cast( + "V2DataReportRunCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReportRun": + 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( + "ReportRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V2DataReportRunCreatedEvent": + return cast( + "V2DataReportRunCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReportRun": + 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( + "ReportRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2DataReportRunCreatedEvent(Event): + LOOKUP_TYPE = "v2.data.report_run.created" + type: Literal["v2.data.report_run.created"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ReportRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReportRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_data_report_run_failed_event.py b/stripe/events/_v2_data_report_run_failed_event.py new file mode 100644 index 000000000..dcb40497f --- /dev/null +++ b/stripe/events/_v2_data_report_run_failed_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.data._report_run import ReportRun + + +class V2DataReportRunFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.data.report_run.failed" + type: Literal["v2.data.report_run.failed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2DataReportRunFailedEvent": + return cast( + "V2DataReportRunFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReportRun": + 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( + "ReportRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V2DataReportRunFailedEvent": + return cast( + "V2DataReportRunFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReportRun": + 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( + "ReportRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2DataReportRunFailedEvent(Event): + LOOKUP_TYPE = "v2.data.report_run.failed" + type: Literal["v2.data.report_run.failed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ReportRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReportRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_data_report_run_succeeded_event.py b/stripe/events/_v2_data_report_run_succeeded_event.py new file mode 100644 index 000000000..027f307be --- /dev/null +++ b/stripe/events/_v2_data_report_run_succeeded_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.data._report_run import ReportRun + + +class V2DataReportRunSucceededEventNotification(EventNotification): + LOOKUP_TYPE = "v2.data.report_run.succeeded" + type: Literal["v2.data.report_run.succeeded"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2DataReportRunSucceededEvent": + return cast( + "V2DataReportRunSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReportRun": + 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( + "ReportRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V2DataReportRunSucceededEvent": + return cast( + "V2DataReportRunSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReportRun": + 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( + "ReportRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2DataReportRunSucceededEvent(Event): + LOOKUP_TYPE = "v2.data.report_run.succeeded" + type: Literal["v2.data.report_run.succeeded"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ReportRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReportRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_data_report_run_updated_event.py b/stripe/events/_v2_data_report_run_updated_event.py new file mode 100644 index 000000000..bdb185f07 --- /dev/null +++ b/stripe/events/_v2_data_report_run_updated_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.data._report_run import ReportRun + + +class V2DataReportRunUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.data.report_run.updated" + type: Literal["v2.data.report_run.updated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2DataReportRunUpdatedEvent": + return cast( + "V2DataReportRunUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReportRun": + 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( + "ReportRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V2DataReportRunUpdatedEvent": + return cast( + "V2DataReportRunUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReportRun": + 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( + "ReportRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2DataReportRunUpdatedEvent(Event): + LOOKUP_TYPE = "v2.data.report_run.updated" + type: Literal["v2.data.report_run.updated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ReportRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReportRun", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_earned_credit_succeeded_event.py b/stripe/events/_v2_money_management_earned_credit_succeeded_event.py new file mode 100644 index 000000000..36b9ab2e0 --- /dev/null +++ b/stripe/events/_v2_money_management_earned_credit_succeeded_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._earned_credit import EarnedCredit + + +class V2MoneyManagementEarnedCreditSucceededEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.earned_credit.succeeded" + type: Literal["v2.money_management.earned_credit.succeeded"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementEarnedCreditSucceededEvent": + return cast( + "V2MoneyManagementEarnedCreditSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "EarnedCredit": + 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( + "EarnedCredit", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementEarnedCreditSucceededEvent": + return cast( + "V2MoneyManagementEarnedCreditSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "EarnedCredit": + 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( + "EarnedCredit", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementEarnedCreditSucceededEvent(Event): + LOOKUP_TYPE = "v2.money_management.earned_credit.succeeded" + type: Literal["v2.money_management.earned_credit.succeeded"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "EarnedCredit": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "EarnedCredit", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_transaction_updated_event.py b/stripe/events/_v2_money_management_transaction_updated_event.py index affb5f9b9..c6ec091ed 100644 --- a/stripe/events/_v2_money_management_transaction_updated_event.py +++ b/stripe/events/_v2_money_management_transaction_updated_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.money_management._transaction import Transaction @@ -78,6 +81,41 @@ class V2MoneyManagementTransactionUpdatedEvent(Event): LOOKUP_TYPE = "v2.money_management.transaction.updated" type: Literal["v2.money_management.transaction.updated"] + class V2MoneyManagementTransactionUpdatedEventData(StripeObject): + treasury_transaction: Optional[str] + """ + Id of the v1 Treasury Transaction corresponding to this Transaction. + """ + + data: V2MoneyManagementTransactionUpdatedEventData + """ + Data for the v2.money_management.transaction.updated event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2MoneyManagementTransactionUpdatedEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2MoneyManagementTransactionUpdatedEvent.V2MoneyManagementTransactionUpdatedEventData._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_account_signal_fraudulent_merchant_ready_event.py b/stripe/events/_v2_signals_account_signal_fraudulent_merchant_ready_event.py index d8b1eb486..f6ea544b2 100644 --- a/stripe/events/_v2_signals_account_signal_fraudulent_merchant_ready_event.py +++ b/stripe/events/_v2_signals_account_signal_fraudulent_merchant_ready_event.py @@ -1,16 +1,12 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from decimal import Decimal -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, List, Optional, Union, cast +from typing import Any, Dict, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: - from stripe._api_requestor import _APIRequestor from stripe._stripe_client import StripeClient from stripe.v2.signals._account_signal import AccountSignal @@ -86,116 +82,6 @@ class V2SignalsAccountSignalFraudulentMerchantReadyEvent(Event): LOOKUP_TYPE = "v2.signals.account_signal.fraudulent_merchant_ready" type: Literal["v2.signals.account_signal.fraudulent_merchant_ready"] - class V2SignalsAccountSignalFraudulentMerchantReadyEventData(StripeObject): - class FraudulentMerchant(StripeObject): - class Indicator(StripeObject): - description: str - """ - A brief explanation of how this indicator contributed to the fraudulent merchant probability. - """ - impact: Union[ - Literal[ - "decrease", - "neutral", - "slight_increase", - "strong_increase", - ], - str, - ] - """ - The effect this indicator had on the overall risk level. - """ - indicator: Union[ - Literal[ - "bank_account", - "business_information_and_account_activity", - "disputes", - "failures", - "geolocation", - "other", - "other_related_accounts", - "other_transaction_activity", - "owner_email", - "web_presence", - ], - str, - ] - """ - The name of the specific indicator used in the risk assessment. - """ - - indicators: List[Indicator] - """ - Array of objects representing individual factors that contributed to the calculated probability. Maximum of 3. - """ - probability: Optional[Decimal] - """ - The probability of the merchant being fraudulent. Can be between 0.00 and 100.00. May be empty if the risk_level is UNKNOWN or NOT_ASSESSED. - """ - risk_level: Union[ - Literal[ - "elevated", - "highest", - "low", - "normal", - "not_assessed", - "unknown", - ], - str, - ] - """ - Categorical assessment of the fraudulent merchant risk based on probability. - """ - _inner_class_types = {"indicators": Indicator} - _field_encodings = {"probability": "decimal_string"} - - account: str - """ - Account ID that this signal is associated with. - """ - evaluated_at: str - """ - Timestamp when the signal was evaluated. - """ - fraudulent_merchant: Optional[FraudulentMerchant] - """ - Fraudulent merchant signal data. Present when type is fraudulent_merchant. - """ - type: Union[Literal["fraudulent_merchant"], str] - """ - The type of account signal. Currently only fraudulent_merchant is supported. - """ - _inner_class_types = {"fraudulent_merchant": FraudulentMerchant} - - data: V2SignalsAccountSignalFraudulentMerchantReadyEventData - """ - Data for the v2.signals.account_signal.fraudulent_merchant_ready event - """ - - @classmethod - def _construct_from( - cls, - *, - values: Dict[str, Any], - last_response: Optional[StripeResponse] = None, - requestor: "_APIRequestor", - api_mode: ApiMode, - ) -> "V2SignalsAccountSignalFraudulentMerchantReadyEvent": - evt = super()._construct_from( - values=values, - last_response=last_response, - requestor=requestor, - api_mode=api_mode, - ) - if hasattr(evt, "data"): - evt.data = V2SignalsAccountSignalFraudulentMerchantReadyEvent.V2SignalsAccountSignalFraudulentMerchantReadyEventData._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/financial_connections/_account.py b/stripe/financial_connections/_account.py index bbf700500..f4a40dc19 100644 --- a/stripe/financial_connections/_account.py +++ b/stripe/financial_connections/_account.py @@ -435,7 +435,7 @@ def disconnect( ... @class_method_variant("_cls_disconnect") - def disconnect( # pyright: ignore[reportGeneralTypeIssues] + def disconnect( self, **params: Unpack["AccountDisconnectParams"] ) -> "Account": """ @@ -490,7 +490,7 @@ async def disconnect_async( ... @class_method_variant("_cls_disconnect_async") - async def disconnect_async( # pyright: ignore[reportGeneralTypeIssues] + async def disconnect_async( self, **params: Unpack["AccountDisconnectParams"] ) -> "Account": """ @@ -585,7 +585,7 @@ def list_owners( ... @class_method_variant("_cls_list_owners") - def list_owners( # pyright: ignore[reportGeneralTypeIssues] + def list_owners( self, **params: Unpack["AccountListOwnersParams"] ) -> ListObject["AccountOwner"]: """ @@ -640,7 +640,7 @@ async def list_owners_async( ... @class_method_variant("_cls_list_owners_async") - async def list_owners_async( # pyright: ignore[reportGeneralTypeIssues] + async def list_owners_async( self, **params: Unpack["AccountListOwnersParams"] ) -> ListObject["AccountOwner"]: """ @@ -695,7 +695,7 @@ def refresh_account( ... @class_method_variant("_cls_refresh_account") - def refresh_account( # pyright: ignore[reportGeneralTypeIssues] + def refresh_account( self, **params: Unpack["AccountRefreshAccountParams"] ) -> "Account": """ @@ -750,7 +750,7 @@ async def refresh_account_async( ... @class_method_variant("_cls_refresh_account_async") - async def refresh_account_async( # pyright: ignore[reportGeneralTypeIssues] + async def refresh_account_async( self, **params: Unpack["AccountRefreshAccountParams"] ) -> "Account": """ @@ -827,7 +827,7 @@ def subscribe( ... @class_method_variant("_cls_subscribe") - def subscribe( # pyright: ignore[reportGeneralTypeIssues] + def subscribe( self, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ @@ -882,7 +882,7 @@ async def subscribe_async( ... @class_method_variant("_cls_subscribe_async") - async def subscribe_async( # pyright: ignore[reportGeneralTypeIssues] + async def subscribe_async( self, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ @@ -937,7 +937,7 @@ def unsubscribe( ... @class_method_variant("_cls_unsubscribe") - def unsubscribe( # pyright: ignore[reportGeneralTypeIssues] + def unsubscribe( self, **params: Unpack["AccountUnsubscribeParams"] ) -> "Account": """ @@ -992,7 +992,7 @@ async def unsubscribe_async( ... @class_method_variant("_cls_unsubscribe_async") - async def unsubscribe_async( # pyright: ignore[reportGeneralTypeIssues] + async def unsubscribe_async( self, **params: Unpack["AccountUnsubscribeParams"] ) -> "Account": """ diff --git a/stripe/financial_connections/_session.py b/stripe/financial_connections/_session.py index b4ff00b69..d8ac8e9c7 100644 --- a/stripe/financial_connections/_session.py +++ b/stripe/financial_connections/_session.py @@ -64,10 +64,6 @@ class Filters(StripeObject): """ Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. """ - countries: Optional[List[str]] - """ - List of countries from which to filter accounts. - """ country: Optional[str] """ Country from which to filter accounts. diff --git a/stripe/financial_connections/_transaction.py b/stripe/financial_connections/_transaction.py index 02bd37c17..8b5a6a1fa 100644 --- a/stripe/financial_connections/_transaction.py +++ b/stripe/financial_connections/_transaction.py @@ -25,22 +25,6 @@ class Transaction(ListableAPIResource["Transaction"]): ) class Classification(StripeObject): - class FinancialActivity(StripeObject): - confidence_level: Optional[ - Literal["high", "low", "medium", "very_high"] - ] - """ - Stripe's confidence in this classification. - """ - detailed_label: Optional[str] - """ - The detailed category label for this transaction. - """ - primary_label: Optional[str] - """ - The primary category label for this transaction. - """ - class MoneyMovement(StripeObject): confidence_level: Optional[ Literal["high", "low", "medium", "very_high"] @@ -73,7 +57,6 @@ class PersonalFinance(StripeObject): The primary category label for this transaction. """ - financial_activity: Optional[FinancialActivity] money_movement: Optional[MoneyMovement] personal_finance: Optional[PersonalFinance] type: str @@ -81,7 +64,6 @@ class PersonalFinance(StripeObject): The taxonomy type for this classification entry. """ _inner_class_types = { - "financial_activity": FinancialActivity, "money_movement": MoneyMovement, "personal_finance": PersonalFinance, } diff --git a/stripe/identity/_blocklist_entry.py b/stripe/identity/_blocklist_entry.py index 70aecafb7..c98dc29e6 100644 --- a/stripe/identity/_blocklist_entry.py +++ b/stripe/identity/_blocklist_entry.py @@ -184,7 +184,7 @@ def disable( ... @class_method_variant("_cls_disable") - def disable( # pyright: ignore[reportGeneralTypeIssues] + def disable( self, **params: Unpack["BlocklistEntryDisableParams"] ) -> "BlocklistEntry": """ @@ -263,7 +263,7 @@ async def disable_async( ... @class_method_variant("_cls_disable_async") - async def disable_async( # pyright: ignore[reportGeneralTypeIssues] + async def disable_async( self, **params: Unpack["BlocklistEntryDisableParams"] ) -> "BlocklistEntry": """ diff --git a/stripe/identity/_verification_session.py b/stripe/identity/_verification_session.py index 3b00b06a6..79b70f9dd 100644 --- a/stripe/identity/_verification_session.py +++ b/stripe/identity/_verification_session.py @@ -411,7 +411,7 @@ def cancel( ... @class_method_variant("_cls_cancel") - def cancel( # pyright: ignore[reportGeneralTypeIssues] + def cancel( self, **params: Unpack["VerificationSessionCancelParams"] ) -> "VerificationSession": """ @@ -477,7 +477,7 @@ async def cancel_async( ... @class_method_variant("_cls_cancel_async") - async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_async( self, **params: Unpack["VerificationSessionCancelParams"] ) -> "VerificationSession": """ @@ -582,7 +582,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["VerificationSessionModifyParams"] + cls, id: str, /, **params: Unpack["VerificationSessionModifyParams"] ) -> "VerificationSession": """ Updates a VerificationSession object. @@ -602,7 +602,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["VerificationSessionModifyParams"] + cls, id: str, /, **params: Unpack["VerificationSessionModifyParams"] ) -> "VerificationSession": """ Updates a VerificationSession object. @@ -715,7 +715,7 @@ def redact( ... @class_method_variant("_cls_redact") - def redact( # pyright: ignore[reportGeneralTypeIssues] + def redact( self, **params: Unpack["VerificationSessionRedactParams"] ) -> "VerificationSession": """ @@ -845,7 +845,7 @@ async def redact_async( ... @class_method_variant("_cls_redact_async") - async def redact_async( # pyright: ignore[reportGeneralTypeIssues] + async def redact_async( self, **params: Unpack["VerificationSessionRedactParams"] ) -> "VerificationSession": """ diff --git a/stripe/issuing/_authorization.py b/stripe/issuing/_authorization.py index a56917644..8cddf1e26 100644 --- a/stripe/issuing/_authorization.py +++ b/stripe/issuing/_authorization.py @@ -2087,7 +2087,7 @@ def approve( ... @class_method_variant("_cls_approve") - def approve( # pyright: ignore[reportGeneralTypeIssues] + def approve( self, **params: Unpack["AuthorizationApproveParams"] ) -> "Authorization": """ @@ -2149,7 +2149,7 @@ async def approve_async( ... @class_method_variant("_cls_approve_async") - async def approve_async( # pyright: ignore[reportGeneralTypeIssues] + async def approve_async( self, **params: Unpack["AuthorizationApproveParams"] ) -> "Authorization": """ @@ -2211,7 +2211,7 @@ def decline( ... @class_method_variant("_cls_decline") - def decline( # pyright: ignore[reportGeneralTypeIssues] + def decline( self, **params: Unpack["AuthorizationDeclineParams"] ) -> "Authorization": """ @@ -2273,7 +2273,7 @@ async def decline_async( ... @class_method_variant("_cls_decline_async") - async def decline_async( # pyright: ignore[reportGeneralTypeIssues] + async def decline_async( self, **params: Unpack["AuthorizationDeclineParams"] ) -> "Authorization": """ @@ -2333,7 +2333,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["AuthorizationModifyParams"] + cls, id: str, /, **params: Unpack["AuthorizationModifyParams"] ) -> "Authorization": """ Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -2350,7 +2350,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["AuthorizationModifyParams"] + cls, id: str, /, **params: Unpack["AuthorizationModifyParams"] ) -> "Authorization": """ Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -2433,7 +2433,7 @@ def capture( ... @class_method_variant("_cls_capture") - def capture( # pyright: ignore[reportGeneralTypeIssues] + def capture( self, **params: Unpack["AuthorizationCaptureParams"] ) -> "Authorization": """ @@ -2495,7 +2495,7 @@ async def capture_async( ... @class_method_variant("_cls_capture_async") - async def capture_async( # pyright: ignore[reportGeneralTypeIssues] + async def capture_async( self, **params: Unpack["AuthorizationCaptureParams"] ) -> "Authorization": """ @@ -2589,7 +2589,7 @@ def expire( ... @class_method_variant("_cls_expire") - def expire( # pyright: ignore[reportGeneralTypeIssues] + def expire( self, **params: Unpack["AuthorizationExpireParams"] ) -> "Authorization": """ @@ -2651,7 +2651,7 @@ async def expire_async( ... @class_method_variant("_cls_expire_async") - async def expire_async( # pyright: ignore[reportGeneralTypeIssues] + async def expire_async( self, **params: Unpack["AuthorizationExpireParams"] ) -> "Authorization": """ @@ -2713,7 +2713,7 @@ def finalize_amount( ... @class_method_variant("_cls_finalize_amount") - def finalize_amount( # pyright: ignore[reportGeneralTypeIssues] + def finalize_amount( self, **params: Unpack["AuthorizationFinalizeAmountParams"] ) -> "Authorization": """ @@ -2775,7 +2775,7 @@ async def finalize_amount_async( ... @class_method_variant("_cls_finalize_amount_async") - async def finalize_amount_async( # pyright: ignore[reportGeneralTypeIssues] + async def finalize_amount_async( self, **params: Unpack["AuthorizationFinalizeAmountParams"] ) -> "Authorization": """ @@ -2837,7 +2837,7 @@ def increment( ... @class_method_variant("_cls_increment") - def increment( # pyright: ignore[reportGeneralTypeIssues] + def increment( self, **params: Unpack["AuthorizationIncrementParams"] ) -> "Authorization": """ @@ -2899,7 +2899,7 @@ async def increment_async( ... @class_method_variant("_cls_increment_async") - async def increment_async( # pyright: ignore[reportGeneralTypeIssues] + async def increment_async( self, **params: Unpack["AuthorizationIncrementParams"] ) -> "Authorization": """ @@ -2961,7 +2961,7 @@ def respond( ... @class_method_variant("_cls_respond") - def respond( # pyright: ignore[reportGeneralTypeIssues] + def respond( self, **params: Unpack["AuthorizationRespondParams"] ) -> "Authorization": """ @@ -3023,7 +3023,7 @@ async def respond_async( ... @class_method_variant("_cls_respond_async") - async def respond_async( # pyright: ignore[reportGeneralTypeIssues] + async def respond_async( self, **params: Unpack["AuthorizationRespondParams"] ) -> "Authorization": """ @@ -3085,7 +3085,7 @@ def reverse( ... @class_method_variant("_cls_reverse") - def reverse( # pyright: ignore[reportGeneralTypeIssues] + def reverse( self, **params: Unpack["AuthorizationReverseParams"] ) -> "Authorization": """ @@ -3147,7 +3147,7 @@ async def reverse_async( ... @class_method_variant("_cls_reverse_async") - async def reverse_async( # pyright: ignore[reportGeneralTypeIssues] + async def reverse_async( self, **params: Unpack["AuthorizationReverseParams"] ) -> "Authorization": """ diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index c18d6055b..b2e939ac3 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -55,9 +55,11 @@ class CryptoWallet(StripeObject): """ The cryptocurrency held in the wallet. """ - type: Optional[Union[Literal["bridge_wallet", "standard"], str]] + type: Optional[ + Union[Literal["bridge_wallet", "squads", "standard"], str] + ] """ - The type of wallet (standard or bridge_wallet). + The type of crypto wallet. """ class LatestFraudWarning(StripeObject): @@ -1497,7 +1499,9 @@ async def list_async( return result @classmethod - def modify(cls, id: str, **params: Unpack["CardModifyParams"]) -> "Card": + def modify( + cls, id: str, /, **params: Unpack["CardModifyParams"] + ) -> "Card": """ Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. """ @@ -1513,7 +1517,7 @@ def modify(cls, id: str, **params: Unpack["CardModifyParams"]) -> "Card": @classmethod async def modify_async( - cls, id: str, **params: Unpack["CardModifyParams"] + cls, id: str, /, **params: Unpack["CardModifyParams"] ) -> "Card": """ Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -1591,7 +1595,7 @@ def deliver_card( ... @class_method_variant("_cls_deliver_card") - def deliver_card( # pyright: ignore[reportGeneralTypeIssues] + def deliver_card( self, **params: Unpack["CardDeliverCardParams"] ) -> "Card": """ @@ -1646,7 +1650,7 @@ async def deliver_card_async( ... @class_method_variant("_cls_deliver_card_async") - async def deliver_card_async( # pyright: ignore[reportGeneralTypeIssues] + async def deliver_card_async( self, **params: Unpack["CardDeliverCardParams"] ) -> "Card": """ @@ -1699,9 +1703,7 @@ def fail_card(self, **params: Unpack["CardFailCardParams"]) -> "Card": ... @class_method_variant("_cls_fail_card") - def fail_card( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["CardFailCardParams"] - ) -> "Card": + def fail_card(self, **params: Unpack["CardFailCardParams"]) -> "Card": """ Updates the shipping status of the specified Issuing Card object to failure. """ @@ -1754,7 +1756,7 @@ async def fail_card_async( ... @class_method_variant("_cls_fail_card_async") - async def fail_card_async( # pyright: ignore[reportGeneralTypeIssues] + async def fail_card_async( self, **params: Unpack["CardFailCardParams"] ) -> "Card": """ @@ -1809,7 +1811,7 @@ def return_card( ... @class_method_variant("_cls_return_card") - def return_card( # pyright: ignore[reportGeneralTypeIssues] + def return_card( self, **params: Unpack["CardReturnCardParams"] ) -> "Card": """ @@ -1864,7 +1866,7 @@ async def return_card_async( ... @class_method_variant("_cls_return_card_async") - async def return_card_async( # pyright: ignore[reportGeneralTypeIssues] + async def return_card_async( self, **params: Unpack["CardReturnCardParams"] ) -> "Card": """ @@ -1917,9 +1919,7 @@ def ship_card(self, **params: Unpack["CardShipCardParams"]) -> "Card": ... @class_method_variant("_cls_ship_card") - def ship_card( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["CardShipCardParams"] - ) -> "Card": + def ship_card(self, **params: Unpack["CardShipCardParams"]) -> "Card": """ Updates the shipping status of the specified Issuing Card object to shipped. """ @@ -1972,7 +1972,7 @@ async def ship_card_async( ... @class_method_variant("_cls_ship_card_async") - async def ship_card_async( # pyright: ignore[reportGeneralTypeIssues] + async def ship_card_async( self, **params: Unpack["CardShipCardParams"] ) -> "Card": """ @@ -2027,7 +2027,7 @@ def submit_card( ... @class_method_variant("_cls_submit_card") - def submit_card( # pyright: ignore[reportGeneralTypeIssues] + def submit_card( self, **params: Unpack["CardSubmitCardParams"] ) -> "Card": """ @@ -2082,7 +2082,7 @@ async def submit_card_async( ... @class_method_variant("_cls_submit_card_async") - async def submit_card_async( # pyright: ignore[reportGeneralTypeIssues] + async def submit_card_async( self, **params: Unpack["CardSubmitCardParams"] ) -> "Card": """ diff --git a/stripe/issuing/_cardholder.py b/stripe/issuing/_cardholder.py index 7665726f1..f2d96a325 100644 --- a/stripe/issuing/_cardholder.py +++ b/stripe/issuing/_cardholder.py @@ -1316,7 +1316,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["CardholderModifyParams"] + cls, id: str, /, **params: Unpack["CardholderModifyParams"] ) -> "Cardholder": """ Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -1333,7 +1333,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["CardholderModifyParams"] + cls, id: str, /, **params: Unpack["CardholderModifyParams"] ) -> "Cardholder": """ Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. diff --git a/stripe/issuing/_credit_underwriting_record.py b/stripe/issuing/_credit_underwriting_record.py index 76ba651b6..95e83a862 100644 --- a/stripe/issuing/_credit_underwriting_record.py +++ b/stripe/issuing/_credit_underwriting_record.py @@ -502,7 +502,7 @@ def correct( ... @class_method_variant("_cls_correct") - def correct( # pyright: ignore[reportGeneralTypeIssues] + def correct( self, **params: Unpack["CreditUnderwritingRecordCorrectParams"] ) -> "CreditUnderwritingRecord": """ @@ -566,7 +566,7 @@ async def correct_async( ... @class_method_variant("_cls_correct_async") - async def correct_async( # pyright: ignore[reportGeneralTypeIssues] + async def correct_async( self, **params: Unpack["CreditUnderwritingRecordCorrectParams"] ) -> "CreditUnderwritingRecord": """ @@ -746,7 +746,7 @@ def report_decision( ... @class_method_variant("_cls_report_decision") - def report_decision( # pyright: ignore[reportGeneralTypeIssues] + def report_decision( self, **params: Unpack["CreditUnderwritingRecordReportDecisionParams"] ) -> "CreditUnderwritingRecord": """ @@ -810,7 +810,7 @@ async def report_decision_async( ... @class_method_variant("_cls_report_decision_async") - async def report_decision_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_decision_async( self, **params: Unpack["CreditUnderwritingRecordReportDecisionParams"] ) -> "CreditUnderwritingRecord": """ @@ -881,7 +881,7 @@ def report_offer_acceptance( ... @class_method_variant("_cls_report_offer_acceptance") - def report_offer_acceptance( # pyright: ignore[reportGeneralTypeIssues] + def report_offer_acceptance( self, **params: Unpack[ "CreditUnderwritingRecordReportOfferAcceptanceParams" @@ -955,7 +955,7 @@ async def report_offer_acceptance_async( ... @class_method_variant("_cls_report_offer_acceptance_async") - async def report_offer_acceptance_async( # pyright: ignore[reportGeneralTypeIssues] + async def report_offer_acceptance_async( self, **params: Unpack[ "CreditUnderwritingRecordReportOfferAcceptanceParams" diff --git a/stripe/issuing/_dispute.py b/stripe/issuing/_dispute.py index 45651b52f..daf307f1f 100644 --- a/stripe/issuing/_dispute.py +++ b/stripe/issuing/_dispute.py @@ -679,7 +679,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["DisputeModifyParams"] + cls, id: str, /, **params: Unpack["DisputeModifyParams"] ) -> "Dispute": """ Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string. @@ -696,7 +696,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["DisputeModifyParams"] + cls, id: str, /, **params: Unpack["DisputeModifyParams"] ) -> "Dispute": """ Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string. @@ -769,9 +769,7 @@ def submit(self, **params: Unpack["DisputeSubmitParams"]) -> "Dispute": ... @class_method_variant("_cls_submit") - def submit( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["DisputeSubmitParams"] - ) -> "Dispute": + def submit(self, **params: Unpack["DisputeSubmitParams"]) -> "Dispute": """ Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). """ @@ -824,7 +822,7 @@ async def submit_async( ... @class_method_variant("_cls_submit_async") - async def submit_async( # pyright: ignore[reportGeneralTypeIssues] + async def submit_async( self, **params: Unpack["DisputeSubmitParams"] ) -> "Dispute": """ @@ -880,9 +878,7 @@ def close(self, **params: Unpack["DisputeCloseParams"]) -> "Dispute": ... @class_method_variant("_cls_close") - def close( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["DisputeCloseParams"] - ) -> "Dispute": + def close(self, **params: Unpack["DisputeCloseParams"]) -> "Dispute": """ Test helper: closes a test-mode Issuing dispute as won or lost. """ @@ -935,7 +931,7 @@ async def close_async( ... @class_method_variant("_cls_close_async") - async def close_async( # pyright: ignore[reportGeneralTypeIssues] + async def close_async( self, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ @@ -993,7 +989,7 @@ def provisional_credit( ... @class_method_variant("_cls_provisional_credit") - def provisional_credit( # pyright: ignore[reportGeneralTypeIssues] + def provisional_credit( self, **params: Unpack["DisputeProvisionalCreditParams"] ) -> "Dispute": """ @@ -1051,7 +1047,7 @@ async def provisional_credit_async( ... @class_method_variant("_cls_provisional_credit_async") - async def provisional_credit_async( # pyright: ignore[reportGeneralTypeIssues] + async def provisional_credit_async( self, **params: Unpack["DisputeProvisionalCreditParams"] ) -> "Dispute": """ @@ -1120,7 +1116,7 @@ def simulate_network_lifecycle_dispute_response( @class_method_variant( "_cls_simulate_network_lifecycle_dispute_response", ) - def simulate_network_lifecycle_dispute_response( # pyright: ignore[reportGeneralTypeIssues] + def simulate_network_lifecycle_dispute_response( self, **params: Unpack[ "DisputeSimulateNetworkLifecycleDisputeResponseParams" @@ -1192,7 +1188,7 @@ async def simulate_network_lifecycle_dispute_response_async( @class_method_variant( "_cls_simulate_network_lifecycle_dispute_response_async", ) - async def simulate_network_lifecycle_dispute_response_async( # pyright: ignore[reportGeneralTypeIssues] + async def simulate_network_lifecycle_dispute_response_async( self, **params: Unpack[ "DisputeSimulateNetworkLifecycleDisputeResponseParams" @@ -1264,7 +1260,7 @@ def simulate_network_lifecycle_pre_arbitration_response( @class_method_variant( "_cls_simulate_network_lifecycle_pre_arbitration_response", ) - def simulate_network_lifecycle_pre_arbitration_response( # pyright: ignore[reportGeneralTypeIssues] + def simulate_network_lifecycle_pre_arbitration_response( self, **params: Unpack[ "DisputeSimulateNetworkLifecyclePreArbitrationResponseParams" @@ -1336,7 +1332,7 @@ async def simulate_network_lifecycle_pre_arbitration_response_async( @class_method_variant( "_cls_simulate_network_lifecycle_pre_arbitration_response_async", ) - async def simulate_network_lifecycle_pre_arbitration_response_async( # pyright: ignore[reportGeneralTypeIssues] + async def simulate_network_lifecycle_pre_arbitration_response_async( self, **params: Unpack[ "DisputeSimulateNetworkLifecyclePreArbitrationResponseParams" @@ -1408,7 +1404,7 @@ def simulate_network_lifecycle_pre_arbitration_submission( @class_method_variant( "_cls_simulate_network_lifecycle_pre_arbitration_submission", ) - def simulate_network_lifecycle_pre_arbitration_submission( # pyright: ignore[reportGeneralTypeIssues] + def simulate_network_lifecycle_pre_arbitration_submission( self, **params: Unpack[ "DisputeSimulateNetworkLifecyclePreArbitrationSubmissionParams" @@ -1480,7 +1476,7 @@ async def simulate_network_lifecycle_pre_arbitration_submission_async( @class_method_variant( "_cls_simulate_network_lifecycle_pre_arbitration_submission_async", ) - async def simulate_network_lifecycle_pre_arbitration_submission_async( # pyright: ignore[reportGeneralTypeIssues] + async def simulate_network_lifecycle_pre_arbitration_submission_async( self, **params: Unpack[ "DisputeSimulateNetworkLifecyclePreArbitrationSubmissionParams" diff --git a/stripe/issuing/_personalization_design.py b/stripe/issuing/_personalization_design.py index 1b82b1246..7f074a695 100644 --- a/stripe/issuing/_personalization_design.py +++ b/stripe/issuing/_personalization_design.py @@ -240,7 +240,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["PersonalizationDesignModifyParams"] + cls, id: str, /, **params: Unpack["PersonalizationDesignModifyParams"] ) -> "PersonalizationDesign": """ Updates a card personalization object. @@ -257,7 +257,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PersonalizationDesignModifyParams"] + cls, id: str, /, **params: Unpack["PersonalizationDesignModifyParams"] ) -> "PersonalizationDesign": """ Updates a card personalization object. @@ -342,7 +342,7 @@ def activate( ... @class_method_variant("_cls_activate") - def activate( # pyright: ignore[reportGeneralTypeIssues] + def activate( self, **params: Unpack["PersonalizationDesignActivateParams"] ) -> "PersonalizationDesign": """ @@ -406,7 +406,7 @@ async def activate_async( ... @class_method_variant("_cls_activate_async") - async def activate_async( # pyright: ignore[reportGeneralTypeIssues] + async def activate_async( self, **params: Unpack["PersonalizationDesignActivateParams"] ) -> "PersonalizationDesign": """ @@ -470,7 +470,7 @@ def deactivate( ... @class_method_variant("_cls_deactivate") - def deactivate( # pyright: ignore[reportGeneralTypeIssues] + def deactivate( self, **params: Unpack["PersonalizationDesignDeactivateParams"] ) -> "PersonalizationDesign": """ @@ -534,7 +534,7 @@ async def deactivate_async( ... @class_method_variant("_cls_deactivate_async") - async def deactivate_async( # pyright: ignore[reportGeneralTypeIssues] + async def deactivate_async( self, **params: Unpack["PersonalizationDesignDeactivateParams"] ) -> "PersonalizationDesign": """ @@ -598,7 +598,7 @@ def reject( ... @class_method_variant("_cls_reject") - def reject( # pyright: ignore[reportGeneralTypeIssues] + def reject( self, **params: Unpack["PersonalizationDesignRejectParams"] ) -> "PersonalizationDesign": """ @@ -662,7 +662,7 @@ async def reject_async( ... @class_method_variant("_cls_reject_async") - async def reject_async( # pyright: ignore[reportGeneralTypeIssues] + async def reject_async( self, **params: Unpack["PersonalizationDesignRejectParams"] ) -> "PersonalizationDesign": """ diff --git a/stripe/issuing/_program.py b/stripe/issuing/_program.py index b69e28997..78bbb00c8 100644 --- a/stripe/issuing/_program.py +++ b/stripe/issuing/_program.py @@ -129,7 +129,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["ProgramModifyParams"] + cls, id: str, /, **params: Unpack["ProgramModifyParams"] ) -> "Program": """ Updates a Program object. @@ -146,7 +146,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["ProgramModifyParams"] + cls, id: str, /, **params: Unpack["ProgramModifyParams"] ) -> "Program": """ Updates a Program object. diff --git a/stripe/issuing/_token.py b/stripe/issuing/_token.py index d01a48a7f..41d933488 100644 --- a/stripe/issuing/_token.py +++ b/stripe/issuing/_token.py @@ -505,7 +505,9 @@ async def list_async( return result @classmethod - def modify(cls, id: str, **params: Unpack["TokenModifyParams"]) -> "Token": + def modify( + cls, id: str, /, **params: Unpack["TokenModifyParams"] + ) -> "Token": """ Attempts to update the specified Issuing Token object to the status specified. """ @@ -521,7 +523,7 @@ def modify(cls, id: str, **params: Unpack["TokenModifyParams"]) -> "Token": @classmethod async def modify_async( - cls, id: str, **params: Unpack["TokenModifyParams"] + cls, id: str, /, **params: Unpack["TokenModifyParams"] ) -> "Token": """ Attempts to update the specified Issuing Token object to the status specified. diff --git a/stripe/issuing/_transaction.py b/stripe/issuing/_transaction.py index 7cfd70b74..b39f16e51 100644 --- a/stripe/issuing/_transaction.py +++ b/stripe/issuing/_transaction.py @@ -732,7 +732,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["TransactionModifyParams"] + cls, id: str, /, **params: Unpack["TransactionModifyParams"] ) -> "Transaction": """ Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -749,7 +749,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["TransactionModifyParams"] + cls, id: str, /, **params: Unpack["TransactionModifyParams"] ) -> "Transaction": """ Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -894,7 +894,7 @@ def refund( ... @class_method_variant("_cls_refund") - def refund( # pyright: ignore[reportGeneralTypeIssues] + def refund( self, **params: Unpack["TransactionRefundParams"] ) -> "Transaction": """ @@ -952,7 +952,7 @@ async def refund_async( ... @class_method_variant("_cls_refund_async") - async def refund_async( # pyright: ignore[reportGeneralTypeIssues] + async def refund_async( self, **params: Unpack["TransactionRefundParams"] ) -> "Transaction": """ diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index 80a8999f7..a8c49cb6a 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -29,6 +29,7 @@ tax as tax, terminal as terminal, test_helpers as test_helpers, + three_d_secure as three_d_secure, treasury as treasury, ) from stripe.params._account_capability_list_params import ( @@ -71,6 +72,7 @@ AccountCreateParamsCapabilitiesBilliePayments as AccountCreateParamsCapabilitiesBilliePayments, AccountCreateParamsCapabilitiesBizumPayments as AccountCreateParamsCapabilitiesBizumPayments, AccountCreateParamsCapabilitiesBlikPayments as AccountCreateParamsCapabilitiesBlikPayments, + AccountCreateParamsCapabilitiesBlikRecurringPayments as AccountCreateParamsCapabilitiesBlikRecurringPayments, AccountCreateParamsCapabilitiesBoletoPayments as AccountCreateParamsCapabilitiesBoletoPayments, AccountCreateParamsCapabilitiesCardIssuing as AccountCreateParamsCapabilitiesCardIssuing, AccountCreateParamsCapabilitiesCardPayments as AccountCreateParamsCapabilitiesCardPayments, @@ -121,6 +123,7 @@ AccountCreateParamsCapabilitiesScalapayPayments as AccountCreateParamsCapabilitiesScalapayPayments, AccountCreateParamsCapabilitiesSepaBankTransferPayments as AccountCreateParamsCapabilitiesSepaBankTransferPayments, AccountCreateParamsCapabilitiesSepaDebitPayments as AccountCreateParamsCapabilitiesSepaDebitPayments, + AccountCreateParamsCapabilitiesSequraPayments as AccountCreateParamsCapabilitiesSequraPayments, AccountCreateParamsCapabilitiesShopeepayPayments as AccountCreateParamsCapabilitiesShopeepayPayments, AccountCreateParamsCapabilitiesSofortPayments as AccountCreateParamsCapabilitiesSofortPayments, AccountCreateParamsCapabilitiesStripeBalancePayments as AccountCreateParamsCapabilitiesStripeBalancePayments, @@ -203,6 +206,7 @@ AccountCreateParamsSettingsPaypayPaymentsSiteAccessible as AccountCreateParamsSettingsPaypayPaymentsSiteAccessible, AccountCreateParamsSettingsPaypayPaymentsSiteInDevelopment as AccountCreateParamsSettingsPaypayPaymentsSiteInDevelopment, AccountCreateParamsSettingsPaypayPaymentsSiteRestricted as AccountCreateParamsSettingsPaypayPaymentsSiteRestricted, + AccountCreateParamsSettingsSepaDebitPayments as AccountCreateParamsSettingsSepaDebitPayments, AccountCreateParamsSettingsSmartDisputes as AccountCreateParamsSettingsSmartDisputes, AccountCreateParamsSettingsSmartDisputesAutoRespond as AccountCreateParamsSettingsSmartDisputesAutoRespond, AccountCreateParamsSettingsTaxForms as AccountCreateParamsSettingsTaxForms, @@ -435,6 +439,8 @@ AccountSessionCreateParamsComponentsCapitalFinancingApplication as AccountSessionCreateParamsComponentsCapitalFinancingApplication, AccountSessionCreateParamsComponentsCapitalFinancingApplicationFeatures as AccountSessionCreateParamsComponentsCapitalFinancingApplicationFeatures, AccountSessionCreateParamsComponentsCapitalFinancingFeatures as AccountSessionCreateParamsComponentsCapitalFinancingFeatures, + AccountSessionCreateParamsComponentsCapitalFinancingManualPayment as AccountSessionCreateParamsComponentsCapitalFinancingManualPayment, + AccountSessionCreateParamsComponentsCapitalFinancingManualPaymentFeatures as AccountSessionCreateParamsComponentsCapitalFinancingManualPaymentFeatures, AccountSessionCreateParamsComponentsCapitalFinancingPromotion as AccountSessionCreateParamsComponentsCapitalFinancingPromotion, AccountSessionCreateParamsComponentsCapitalFinancingPromotionFeatures as AccountSessionCreateParamsComponentsCapitalFinancingPromotionFeatures, AccountSessionCreateParamsComponentsCapitalOverview as AccountSessionCreateParamsComponentsCapitalOverview, @@ -520,6 +526,7 @@ AccountUpdateParamsCapabilitiesBilliePayments as AccountUpdateParamsCapabilitiesBilliePayments, AccountUpdateParamsCapabilitiesBizumPayments as AccountUpdateParamsCapabilitiesBizumPayments, AccountUpdateParamsCapabilitiesBlikPayments as AccountUpdateParamsCapabilitiesBlikPayments, + AccountUpdateParamsCapabilitiesBlikRecurringPayments as AccountUpdateParamsCapabilitiesBlikRecurringPayments, AccountUpdateParamsCapabilitiesBoletoPayments as AccountUpdateParamsCapabilitiesBoletoPayments, AccountUpdateParamsCapabilitiesCardIssuing as AccountUpdateParamsCapabilitiesCardIssuing, AccountUpdateParamsCapabilitiesCardPayments as AccountUpdateParamsCapabilitiesCardPayments, @@ -570,6 +577,7 @@ AccountUpdateParamsCapabilitiesScalapayPayments as AccountUpdateParamsCapabilitiesScalapayPayments, AccountUpdateParamsCapabilitiesSepaBankTransferPayments as AccountUpdateParamsCapabilitiesSepaBankTransferPayments, AccountUpdateParamsCapabilitiesSepaDebitPayments as AccountUpdateParamsCapabilitiesSepaDebitPayments, + AccountUpdateParamsCapabilitiesSequraPayments as AccountUpdateParamsCapabilitiesSequraPayments, AccountUpdateParamsCapabilitiesShopeepayPayments as AccountUpdateParamsCapabilitiesShopeepayPayments, AccountUpdateParamsCapabilitiesSofortPayments as AccountUpdateParamsCapabilitiesSofortPayments, AccountUpdateParamsCapabilitiesStripeBalancePayments as AccountUpdateParamsCapabilitiesStripeBalancePayments, @@ -1068,6 +1076,7 @@ ConfirmationTokenCreateParamsPaymentMethodDataSatispay as ConfirmationTokenCreateParamsPaymentMethodDataSatispay, ConfirmationTokenCreateParamsPaymentMethodDataScalapay as ConfirmationTokenCreateParamsPaymentMethodDataScalapay, ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit as ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit, + ConfirmationTokenCreateParamsPaymentMethodDataSequra as ConfirmationTokenCreateParamsPaymentMethodDataSequra, ConfirmationTokenCreateParamsPaymentMethodDataShopeepay as ConfirmationTokenCreateParamsPaymentMethodDataShopeepay, ConfirmationTokenCreateParamsPaymentMethodDataSofort as ConfirmationTokenCreateParamsPaymentMethodDataSofort, ConfirmationTokenCreateParamsPaymentMethodDataStripeBalance as ConfirmationTokenCreateParamsPaymentMethodDataStripeBalance, @@ -1232,6 +1241,7 @@ from stripe.params._customer_create_tax_exemption_params import ( CustomerCreateTaxExemptionParams as CustomerCreateTaxExemptionParams, CustomerCreateTaxExemptionParamsCa as CustomerCreateTaxExemptionParamsCa, + CustomerCreateTaxExemptionParamsEs as CustomerCreateTaxExemptionParamsEs, CustomerCreateTaxExemptionParamsUs as CustomerCreateTaxExemptionParamsUs, ) from stripe.params._customer_create_tax_id_params import ( @@ -1379,6 +1389,7 @@ from stripe.params._customer_tax_exemption_create_params import ( CustomerTaxExemptionCreateParams as CustomerTaxExemptionCreateParams, CustomerTaxExemptionCreateParamsCa as CustomerTaxExemptionCreateParamsCa, + CustomerTaxExemptionCreateParamsEs as CustomerTaxExemptionCreateParamsEs, CustomerTaxExemptionCreateParamsUs as CustomerTaxExemptionCreateParamsUs, ) from stripe.params._customer_tax_exemption_delete_params import ( @@ -1424,6 +1435,8 @@ from stripe.params._dispute_modify_params import ( DisputeModifyParams as DisputeModifyParams, DisputeModifyParamsEvidence as DisputeModifyParamsEvidence, + DisputeModifyParamsEvidenceAppeal as DisputeModifyParamsEvidenceAppeal, + DisputeModifyParamsEvidenceAppealCard as DisputeModifyParamsEvidenceAppealCard, DisputeModifyParamsEvidenceEnhancedEvidence as DisputeModifyParamsEvidenceEnhancedEvidence, DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance as DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance, DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3 as DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3, @@ -1439,6 +1452,8 @@ from stripe.params._dispute_update_params import ( DisputeUpdateParams as DisputeUpdateParams, DisputeUpdateParamsEvidence as DisputeUpdateParamsEvidence, + DisputeUpdateParamsEvidenceAppeal as DisputeUpdateParamsEvidenceAppeal, + DisputeUpdateParamsEvidenceAppealCard as DisputeUpdateParamsEvidenceAppealCard, DisputeUpdateParamsEvidenceEnhancedEvidence as DisputeUpdateParamsEvidenceEnhancedEvidence, DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance as DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance, DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3 as DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3, @@ -1739,6 +1754,7 @@ InvoiceCreatePreviewParamsScheduleDetailsPrebillingBillUntilAmendmentEnd as InvoiceCreatePreviewParamsScheduleDetailsPrebillingBillUntilAmendmentEnd, InvoiceCreatePreviewParamsScheduleDetailsPrebillingBillUntilDuration as InvoiceCreatePreviewParamsScheduleDetailsPrebillingBillUntilDuration, InvoiceCreatePreviewParamsSubscriptionDetails as InvoiceCreatePreviewParamsSubscriptionDetails, + InvoiceCreatePreviewParamsSubscriptionDetailsBillingCycleAnchor as InvoiceCreatePreviewParamsSubscriptionDetailsBillingCycleAnchor, InvoiceCreatePreviewParamsSubscriptionDetailsBillingMode as InvoiceCreatePreviewParamsSubscriptionDetailsBillingMode, InvoiceCreatePreviewParamsSubscriptionDetailsBillingModeFlexible as InvoiceCreatePreviewParamsSubscriptionDetailsBillingModeFlexible, InvoiceCreatePreviewParamsSubscriptionDetailsBillingSchedule as InvoiceCreatePreviewParamsSubscriptionDetailsBillingSchedule, @@ -2612,6 +2628,7 @@ PaymentIntentConfirmParamsPaymentMethodDataSatispay as PaymentIntentConfirmParamsPaymentMethodDataSatispay, PaymentIntentConfirmParamsPaymentMethodDataScalapay as PaymentIntentConfirmParamsPaymentMethodDataScalapay, PaymentIntentConfirmParamsPaymentMethodDataSepaDebit as PaymentIntentConfirmParamsPaymentMethodDataSepaDebit, + PaymentIntentConfirmParamsPaymentMethodDataSequra as PaymentIntentConfirmParamsPaymentMethodDataSequra, PaymentIntentConfirmParamsPaymentMethodDataShopeepay as PaymentIntentConfirmParamsPaymentMethodDataShopeepay, PaymentIntentConfirmParamsPaymentMethodDataSofort as PaymentIntentConfirmParamsPaymentMethodDataSofort, PaymentIntentConfirmParamsPaymentMethodDataStripeBalance as PaymentIntentConfirmParamsPaymentMethodDataStripeBalance, @@ -2642,6 +2659,7 @@ PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, PaymentIntentConfirmParamsPaymentMethodOptionsBizum as PaymentIntentConfirmParamsPaymentMethodOptionsBizum, PaymentIntentConfirmParamsPaymentMethodOptionsBlik as PaymentIntentConfirmParamsPaymentMethodOptionsBlik, + PaymentIntentConfirmParamsPaymentMethodOptionsBlikMandateOptions as PaymentIntentConfirmParamsPaymentMethodOptionsBlikMandateOptions, PaymentIntentConfirmParamsPaymentMethodOptionsBoleto as PaymentIntentConfirmParamsPaymentMethodOptionsBoleto, PaymentIntentConfirmParamsPaymentMethodOptionsCard as PaymentIntentConfirmParamsPaymentMethodOptionsCard, PaymentIntentConfirmParamsPaymentMethodOptionsCardCaptureDelay as PaymentIntentConfirmParamsPaymentMethodOptionsCardCaptureDelay, @@ -2751,6 +2769,7 @@ PaymentIntentConfirmParamsPaymentMethodOptionsScalapay as PaymentIntentConfirmParamsPaymentMethodOptionsScalapay, PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebit as PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebit, PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions as PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions, + PaymentIntentConfirmParamsPaymentMethodOptionsSequra as PaymentIntentConfirmParamsPaymentMethodOptionsSequra, PaymentIntentConfirmParamsPaymentMethodOptionsShopeepay as PaymentIntentConfirmParamsPaymentMethodOptionsShopeepay, PaymentIntentConfirmParamsPaymentMethodOptionsSofort as PaymentIntentConfirmParamsPaymentMethodOptionsSofort, PaymentIntentConfirmParamsPaymentMethodOptionsStripeBalance as PaymentIntentConfirmParamsPaymentMethodOptionsStripeBalance, @@ -2943,6 +2962,7 @@ PaymentIntentCreateParamsPaymentMethodDataSatispay as PaymentIntentCreateParamsPaymentMethodDataSatispay, PaymentIntentCreateParamsPaymentMethodDataScalapay as PaymentIntentCreateParamsPaymentMethodDataScalapay, PaymentIntentCreateParamsPaymentMethodDataSepaDebit as PaymentIntentCreateParamsPaymentMethodDataSepaDebit, + PaymentIntentCreateParamsPaymentMethodDataSequra as PaymentIntentCreateParamsPaymentMethodDataSequra, PaymentIntentCreateParamsPaymentMethodDataShopeepay as PaymentIntentCreateParamsPaymentMethodDataShopeepay, PaymentIntentCreateParamsPaymentMethodDataSofort as PaymentIntentCreateParamsPaymentMethodDataSofort, PaymentIntentCreateParamsPaymentMethodDataStripeBalance as PaymentIntentCreateParamsPaymentMethodDataStripeBalance, @@ -2973,6 +2993,7 @@ PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, PaymentIntentCreateParamsPaymentMethodOptionsBizum as PaymentIntentCreateParamsPaymentMethodOptionsBizum, PaymentIntentCreateParamsPaymentMethodOptionsBlik as PaymentIntentCreateParamsPaymentMethodOptionsBlik, + PaymentIntentCreateParamsPaymentMethodOptionsBlikMandateOptions as PaymentIntentCreateParamsPaymentMethodOptionsBlikMandateOptions, PaymentIntentCreateParamsPaymentMethodOptionsBoleto as PaymentIntentCreateParamsPaymentMethodOptionsBoleto, PaymentIntentCreateParamsPaymentMethodOptionsCard as PaymentIntentCreateParamsPaymentMethodOptionsCard, PaymentIntentCreateParamsPaymentMethodOptionsCardCaptureDelay as PaymentIntentCreateParamsPaymentMethodOptionsCardCaptureDelay, @@ -3082,6 +3103,7 @@ PaymentIntentCreateParamsPaymentMethodOptionsScalapay as PaymentIntentCreateParamsPaymentMethodOptionsScalapay, PaymentIntentCreateParamsPaymentMethodOptionsSepaDebit as PaymentIntentCreateParamsPaymentMethodOptionsSepaDebit, PaymentIntentCreateParamsPaymentMethodOptionsSepaDebitMandateOptions as PaymentIntentCreateParamsPaymentMethodOptionsSepaDebitMandateOptions, + PaymentIntentCreateParamsPaymentMethodOptionsSequra as PaymentIntentCreateParamsPaymentMethodOptionsSequra, PaymentIntentCreateParamsPaymentMethodOptionsShopeepay as PaymentIntentCreateParamsPaymentMethodOptionsShopeepay, PaymentIntentCreateParamsPaymentMethodOptionsSofort as PaymentIntentCreateParamsPaymentMethodOptionsSofort, PaymentIntentCreateParamsPaymentMethodOptionsStripeBalance as PaymentIntentCreateParamsPaymentMethodOptionsStripeBalance, @@ -3328,6 +3350,7 @@ PaymentIntentModifyParamsPaymentMethodDataSatispay as PaymentIntentModifyParamsPaymentMethodDataSatispay, PaymentIntentModifyParamsPaymentMethodDataScalapay as PaymentIntentModifyParamsPaymentMethodDataScalapay, PaymentIntentModifyParamsPaymentMethodDataSepaDebit as PaymentIntentModifyParamsPaymentMethodDataSepaDebit, + PaymentIntentModifyParamsPaymentMethodDataSequra as PaymentIntentModifyParamsPaymentMethodDataSequra, PaymentIntentModifyParamsPaymentMethodDataShopeepay as PaymentIntentModifyParamsPaymentMethodDataShopeepay, PaymentIntentModifyParamsPaymentMethodDataSofort as PaymentIntentModifyParamsPaymentMethodDataSofort, PaymentIntentModifyParamsPaymentMethodDataStripeBalance as PaymentIntentModifyParamsPaymentMethodDataStripeBalance, @@ -3358,6 +3381,7 @@ PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, PaymentIntentModifyParamsPaymentMethodOptionsBizum as PaymentIntentModifyParamsPaymentMethodOptionsBizum, PaymentIntentModifyParamsPaymentMethodOptionsBlik as PaymentIntentModifyParamsPaymentMethodOptionsBlik, + PaymentIntentModifyParamsPaymentMethodOptionsBlikMandateOptions as PaymentIntentModifyParamsPaymentMethodOptionsBlikMandateOptions, PaymentIntentModifyParamsPaymentMethodOptionsBoleto as PaymentIntentModifyParamsPaymentMethodOptionsBoleto, PaymentIntentModifyParamsPaymentMethodOptionsCard as PaymentIntentModifyParamsPaymentMethodOptionsCard, PaymentIntentModifyParamsPaymentMethodOptionsCardCaptureDelay as PaymentIntentModifyParamsPaymentMethodOptionsCardCaptureDelay, @@ -3467,6 +3491,7 @@ PaymentIntentModifyParamsPaymentMethodOptionsScalapay as PaymentIntentModifyParamsPaymentMethodOptionsScalapay, PaymentIntentModifyParamsPaymentMethodOptionsSepaDebit as PaymentIntentModifyParamsPaymentMethodOptionsSepaDebit, PaymentIntentModifyParamsPaymentMethodOptionsSepaDebitMandateOptions as PaymentIntentModifyParamsPaymentMethodOptionsSepaDebitMandateOptions, + PaymentIntentModifyParamsPaymentMethodOptionsSequra as PaymentIntentModifyParamsPaymentMethodOptionsSequra, PaymentIntentModifyParamsPaymentMethodOptionsShopeepay as PaymentIntentModifyParamsPaymentMethodOptionsShopeepay, PaymentIntentModifyParamsPaymentMethodOptionsSofort as PaymentIntentModifyParamsPaymentMethodOptionsSofort, PaymentIntentModifyParamsPaymentMethodOptionsStripeBalance as PaymentIntentModifyParamsPaymentMethodOptionsStripeBalance, @@ -3677,6 +3702,7 @@ PaymentIntentUpdateParamsPaymentMethodDataSatispay as PaymentIntentUpdateParamsPaymentMethodDataSatispay, PaymentIntentUpdateParamsPaymentMethodDataScalapay as PaymentIntentUpdateParamsPaymentMethodDataScalapay, PaymentIntentUpdateParamsPaymentMethodDataSepaDebit as PaymentIntentUpdateParamsPaymentMethodDataSepaDebit, + PaymentIntentUpdateParamsPaymentMethodDataSequra as PaymentIntentUpdateParamsPaymentMethodDataSequra, PaymentIntentUpdateParamsPaymentMethodDataShopeepay as PaymentIntentUpdateParamsPaymentMethodDataShopeepay, PaymentIntentUpdateParamsPaymentMethodDataSofort as PaymentIntentUpdateParamsPaymentMethodDataSofort, PaymentIntentUpdateParamsPaymentMethodDataStripeBalance as PaymentIntentUpdateParamsPaymentMethodDataStripeBalance, @@ -3707,6 +3733,7 @@ PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, PaymentIntentUpdateParamsPaymentMethodOptionsBizum as PaymentIntentUpdateParamsPaymentMethodOptionsBizum, PaymentIntentUpdateParamsPaymentMethodOptionsBlik as PaymentIntentUpdateParamsPaymentMethodOptionsBlik, + PaymentIntentUpdateParamsPaymentMethodOptionsBlikMandateOptions as PaymentIntentUpdateParamsPaymentMethodOptionsBlikMandateOptions, PaymentIntentUpdateParamsPaymentMethodOptionsBoleto as PaymentIntentUpdateParamsPaymentMethodOptionsBoleto, PaymentIntentUpdateParamsPaymentMethodOptionsCard as PaymentIntentUpdateParamsPaymentMethodOptionsCard, PaymentIntentUpdateParamsPaymentMethodOptionsCardCaptureDelay as PaymentIntentUpdateParamsPaymentMethodOptionsCardCaptureDelay, @@ -3816,6 +3843,7 @@ PaymentIntentUpdateParamsPaymentMethodOptionsScalapay as PaymentIntentUpdateParamsPaymentMethodOptionsScalapay, PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebit as PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebit, PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebitMandateOptions as PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebitMandateOptions, + PaymentIntentUpdateParamsPaymentMethodOptionsSequra as PaymentIntentUpdateParamsPaymentMethodOptionsSequra, PaymentIntentUpdateParamsPaymentMethodOptionsShopeepay as PaymentIntentUpdateParamsPaymentMethodOptionsShopeepay, PaymentIntentUpdateParamsPaymentMethodOptionsSofort as PaymentIntentUpdateParamsPaymentMethodOptionsSofort, PaymentIntentUpdateParamsPaymentMethodOptionsStripeBalance as PaymentIntentUpdateParamsPaymentMethodOptionsStripeBalance, @@ -4166,6 +4194,8 @@ PaymentMethodConfigurationCreateParamsScalapayDisplayPreference as PaymentMethodConfigurationCreateParamsScalapayDisplayPreference, PaymentMethodConfigurationCreateParamsSepaDebit as PaymentMethodConfigurationCreateParamsSepaDebit, PaymentMethodConfigurationCreateParamsSepaDebitDisplayPreference as PaymentMethodConfigurationCreateParamsSepaDebitDisplayPreference, + PaymentMethodConfigurationCreateParamsSequra as PaymentMethodConfigurationCreateParamsSequra, + PaymentMethodConfigurationCreateParamsSequraDisplayPreference as PaymentMethodConfigurationCreateParamsSequraDisplayPreference, PaymentMethodConfigurationCreateParamsShopeepay as PaymentMethodConfigurationCreateParamsShopeepay, PaymentMethodConfigurationCreateParamsShopeepayDisplayPreference as PaymentMethodConfigurationCreateParamsShopeepayDisplayPreference, PaymentMethodConfigurationCreateParamsSofort as PaymentMethodConfigurationCreateParamsSofort, @@ -4304,6 +4334,8 @@ PaymentMethodConfigurationModifyParamsScalapayDisplayPreference as PaymentMethodConfigurationModifyParamsScalapayDisplayPreference, PaymentMethodConfigurationModifyParamsSepaDebit as PaymentMethodConfigurationModifyParamsSepaDebit, PaymentMethodConfigurationModifyParamsSepaDebitDisplayPreference as PaymentMethodConfigurationModifyParamsSepaDebitDisplayPreference, + PaymentMethodConfigurationModifyParamsSequra as PaymentMethodConfigurationModifyParamsSequra, + PaymentMethodConfigurationModifyParamsSequraDisplayPreference as PaymentMethodConfigurationModifyParamsSequraDisplayPreference, PaymentMethodConfigurationModifyParamsShopeepay as PaymentMethodConfigurationModifyParamsShopeepay, PaymentMethodConfigurationModifyParamsShopeepayDisplayPreference as PaymentMethodConfigurationModifyParamsShopeepayDisplayPreference, PaymentMethodConfigurationModifyParamsSofort as PaymentMethodConfigurationModifyParamsSofort, @@ -4442,6 +4474,8 @@ PaymentMethodConfigurationUpdateParamsScalapayDisplayPreference as PaymentMethodConfigurationUpdateParamsScalapayDisplayPreference, PaymentMethodConfigurationUpdateParamsSepaDebit as PaymentMethodConfigurationUpdateParamsSepaDebit, PaymentMethodConfigurationUpdateParamsSepaDebitDisplayPreference as PaymentMethodConfigurationUpdateParamsSepaDebitDisplayPreference, + PaymentMethodConfigurationUpdateParamsSequra as PaymentMethodConfigurationUpdateParamsSequra, + PaymentMethodConfigurationUpdateParamsSequraDisplayPreference as PaymentMethodConfigurationUpdateParamsSequraDisplayPreference, PaymentMethodConfigurationUpdateParamsShopeepay as PaymentMethodConfigurationUpdateParamsShopeepay, PaymentMethodConfigurationUpdateParamsShopeepayDisplayPreference as PaymentMethodConfigurationUpdateParamsShopeepayDisplayPreference, PaymentMethodConfigurationUpdateParamsSofort as PaymentMethodConfigurationUpdateParamsSofort, @@ -4525,6 +4559,7 @@ PaymentMethodCreateParamsSatispay as PaymentMethodCreateParamsSatispay, PaymentMethodCreateParamsScalapay as PaymentMethodCreateParamsScalapay, PaymentMethodCreateParamsSepaDebit as PaymentMethodCreateParamsSepaDebit, + PaymentMethodCreateParamsSequra as PaymentMethodCreateParamsSequra, PaymentMethodCreateParamsShopeepay as PaymentMethodCreateParamsShopeepay, PaymentMethodCreateParamsSofort as PaymentMethodCreateParamsSofort, PaymentMethodCreateParamsStripeBalance as PaymentMethodCreateParamsStripeBalance, @@ -4570,7 +4605,6 @@ PaymentMethodModifyParamsCard as PaymentMethodModifyParamsCard, PaymentMethodModifyParamsCardNetworks as PaymentMethodModifyParamsCardNetworks, PaymentMethodModifyParamsCustom as PaymentMethodModifyParamsCustom, - PaymentMethodModifyParamsPayto as PaymentMethodModifyParamsPayto, PaymentMethodModifyParamsUsBankAccount as PaymentMethodModifyParamsUsBankAccount, ) from stripe.params._payment_method_retrieve_params import ( @@ -4583,7 +4617,6 @@ PaymentMethodUpdateParamsCard as PaymentMethodUpdateParamsCard, PaymentMethodUpdateParamsCardNetworks as PaymentMethodUpdateParamsCardNetworks, PaymentMethodUpdateParamsCustom as PaymentMethodUpdateParamsCustom, - PaymentMethodUpdateParamsPayto as PaymentMethodUpdateParamsPayto, PaymentMethodUpdateParamsUsBankAccount as PaymentMethodUpdateParamsUsBankAccount, ) from stripe.params._payment_plan_create_params import ( @@ -5317,6 +5350,7 @@ SetupIntentConfirmParamsPaymentMethodDataSatispay as SetupIntentConfirmParamsPaymentMethodDataSatispay, SetupIntentConfirmParamsPaymentMethodDataScalapay as SetupIntentConfirmParamsPaymentMethodDataScalapay, SetupIntentConfirmParamsPaymentMethodDataSepaDebit as SetupIntentConfirmParamsPaymentMethodDataSepaDebit, + SetupIntentConfirmParamsPaymentMethodDataSequra as SetupIntentConfirmParamsPaymentMethodDataSequra, SetupIntentConfirmParamsPaymentMethodDataShopeepay as SetupIntentConfirmParamsPaymentMethodDataShopeepay, SetupIntentConfirmParamsPaymentMethodDataSofort as SetupIntentConfirmParamsPaymentMethodDataSofort, SetupIntentConfirmParamsPaymentMethodDataStripeBalance as SetupIntentConfirmParamsPaymentMethodDataStripeBalance, @@ -5337,6 +5371,8 @@ SetupIntentConfirmParamsPaymentMethodOptionsBacsDebit as SetupIntentConfirmParamsPaymentMethodOptionsBacsDebit, SetupIntentConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions as SetupIntentConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions, SetupIntentConfirmParamsPaymentMethodOptionsBizum as SetupIntentConfirmParamsPaymentMethodOptionsBizum, + SetupIntentConfirmParamsPaymentMethodOptionsBlik as SetupIntentConfirmParamsPaymentMethodOptionsBlik, + SetupIntentConfirmParamsPaymentMethodOptionsBlikMandateOptions as SetupIntentConfirmParamsPaymentMethodOptionsBlikMandateOptions, SetupIntentConfirmParamsPaymentMethodOptionsCard as SetupIntentConfirmParamsPaymentMethodOptionsCard, SetupIntentConfirmParamsPaymentMethodOptionsCardMandateOptions as SetupIntentConfirmParamsPaymentMethodOptionsCardMandateOptions, SetupIntentConfirmParamsPaymentMethodOptionsCardPresent as SetupIntentConfirmParamsPaymentMethodOptionsCardPresent, @@ -5434,6 +5470,7 @@ SetupIntentCreateParamsPaymentMethodDataSatispay as SetupIntentCreateParamsPaymentMethodDataSatispay, SetupIntentCreateParamsPaymentMethodDataScalapay as SetupIntentCreateParamsPaymentMethodDataScalapay, SetupIntentCreateParamsPaymentMethodDataSepaDebit as SetupIntentCreateParamsPaymentMethodDataSepaDebit, + SetupIntentCreateParamsPaymentMethodDataSequra as SetupIntentCreateParamsPaymentMethodDataSequra, SetupIntentCreateParamsPaymentMethodDataShopeepay as SetupIntentCreateParamsPaymentMethodDataShopeepay, SetupIntentCreateParamsPaymentMethodDataSofort as SetupIntentCreateParamsPaymentMethodDataSofort, SetupIntentCreateParamsPaymentMethodDataStripeBalance as SetupIntentCreateParamsPaymentMethodDataStripeBalance, @@ -5454,6 +5491,8 @@ SetupIntentCreateParamsPaymentMethodOptionsBacsDebit as SetupIntentCreateParamsPaymentMethodOptionsBacsDebit, SetupIntentCreateParamsPaymentMethodOptionsBacsDebitMandateOptions as SetupIntentCreateParamsPaymentMethodOptionsBacsDebitMandateOptions, SetupIntentCreateParamsPaymentMethodOptionsBizum as SetupIntentCreateParamsPaymentMethodOptionsBizum, + SetupIntentCreateParamsPaymentMethodOptionsBlik as SetupIntentCreateParamsPaymentMethodOptionsBlik, + SetupIntentCreateParamsPaymentMethodOptionsBlikMandateOptions as SetupIntentCreateParamsPaymentMethodOptionsBlikMandateOptions, SetupIntentCreateParamsPaymentMethodOptionsCard as SetupIntentCreateParamsPaymentMethodOptionsCard, SetupIntentCreateParamsPaymentMethodOptionsCardMandateOptions as SetupIntentCreateParamsPaymentMethodOptionsCardMandateOptions, SetupIntentCreateParamsPaymentMethodOptionsCardPresent as SetupIntentCreateParamsPaymentMethodOptionsCardPresent, @@ -5551,6 +5590,7 @@ SetupIntentModifyParamsPaymentMethodDataSatispay as SetupIntentModifyParamsPaymentMethodDataSatispay, SetupIntentModifyParamsPaymentMethodDataScalapay as SetupIntentModifyParamsPaymentMethodDataScalapay, SetupIntentModifyParamsPaymentMethodDataSepaDebit as SetupIntentModifyParamsPaymentMethodDataSepaDebit, + SetupIntentModifyParamsPaymentMethodDataSequra as SetupIntentModifyParamsPaymentMethodDataSequra, SetupIntentModifyParamsPaymentMethodDataShopeepay as SetupIntentModifyParamsPaymentMethodDataShopeepay, SetupIntentModifyParamsPaymentMethodDataSofort as SetupIntentModifyParamsPaymentMethodDataSofort, SetupIntentModifyParamsPaymentMethodDataStripeBalance as SetupIntentModifyParamsPaymentMethodDataStripeBalance, @@ -5571,6 +5611,8 @@ SetupIntentModifyParamsPaymentMethodOptionsBacsDebit as SetupIntentModifyParamsPaymentMethodOptionsBacsDebit, SetupIntentModifyParamsPaymentMethodOptionsBacsDebitMandateOptions as SetupIntentModifyParamsPaymentMethodOptionsBacsDebitMandateOptions, SetupIntentModifyParamsPaymentMethodOptionsBizum as SetupIntentModifyParamsPaymentMethodOptionsBizum, + SetupIntentModifyParamsPaymentMethodOptionsBlik as SetupIntentModifyParamsPaymentMethodOptionsBlik, + SetupIntentModifyParamsPaymentMethodOptionsBlikMandateOptions as SetupIntentModifyParamsPaymentMethodOptionsBlikMandateOptions, SetupIntentModifyParamsPaymentMethodOptionsCard as SetupIntentModifyParamsPaymentMethodOptionsCard, SetupIntentModifyParamsPaymentMethodOptionsCardMandateOptions as SetupIntentModifyParamsPaymentMethodOptionsCardMandateOptions, SetupIntentModifyParamsPaymentMethodOptionsCardPresent as SetupIntentModifyParamsPaymentMethodOptionsCardPresent, @@ -5666,6 +5708,7 @@ SetupIntentUpdateParamsPaymentMethodDataSatispay as SetupIntentUpdateParamsPaymentMethodDataSatispay, SetupIntentUpdateParamsPaymentMethodDataScalapay as SetupIntentUpdateParamsPaymentMethodDataScalapay, SetupIntentUpdateParamsPaymentMethodDataSepaDebit as SetupIntentUpdateParamsPaymentMethodDataSepaDebit, + SetupIntentUpdateParamsPaymentMethodDataSequra as SetupIntentUpdateParamsPaymentMethodDataSequra, SetupIntentUpdateParamsPaymentMethodDataShopeepay as SetupIntentUpdateParamsPaymentMethodDataShopeepay, SetupIntentUpdateParamsPaymentMethodDataSofort as SetupIntentUpdateParamsPaymentMethodDataSofort, SetupIntentUpdateParamsPaymentMethodDataStripeBalance as SetupIntentUpdateParamsPaymentMethodDataStripeBalance, @@ -5686,6 +5729,8 @@ SetupIntentUpdateParamsPaymentMethodOptionsBacsDebit as SetupIntentUpdateParamsPaymentMethodOptionsBacsDebit, SetupIntentUpdateParamsPaymentMethodOptionsBacsDebitMandateOptions as SetupIntentUpdateParamsPaymentMethodOptionsBacsDebitMandateOptions, SetupIntentUpdateParamsPaymentMethodOptionsBizum as SetupIntentUpdateParamsPaymentMethodOptionsBizum, + SetupIntentUpdateParamsPaymentMethodOptionsBlik as SetupIntentUpdateParamsPaymentMethodOptionsBlik, + SetupIntentUpdateParamsPaymentMethodOptionsBlikMandateOptions as SetupIntentUpdateParamsPaymentMethodOptionsBlikMandateOptions, SetupIntentUpdateParamsPaymentMethodOptionsCard as SetupIntentUpdateParamsPaymentMethodOptionsCard, SetupIntentUpdateParamsPaymentMethodOptionsCardMandateOptions as SetupIntentUpdateParamsPaymentMethodOptionsCardMandateOptions, SetupIntentUpdateParamsPaymentMethodOptionsCardPresent as SetupIntentUpdateParamsPaymentMethodOptionsCardPresent, @@ -5964,6 +6009,7 @@ SubscriptionModifyParamsAddInvoiceItemPriceData as SubscriptionModifyParamsAddInvoiceItemPriceData, SubscriptionModifyParamsAutomaticTax as SubscriptionModifyParamsAutomaticTax, SubscriptionModifyParamsAutomaticTaxLiability as SubscriptionModifyParamsAutomaticTaxLiability, + SubscriptionModifyParamsBillingCycleAnchor as SubscriptionModifyParamsBillingCycleAnchor, SubscriptionModifyParamsBillingSchedule as SubscriptionModifyParamsBillingSchedule, SubscriptionModifyParamsBillingScheduleAppliesTo as SubscriptionModifyParamsBillingScheduleAppliesTo, SubscriptionModifyParamsBillingScheduleBillUntil as SubscriptionModifyParamsBillingScheduleBillUntil, @@ -6037,6 +6083,7 @@ ) from stripe.params._subscription_resume_params import ( SubscriptionResumeParams as SubscriptionResumeParams, + SubscriptionResumeParamsBillingCycleAnchor as SubscriptionResumeParamsBillingCycleAnchor, ) from stripe.params._subscription_retrieve_params import ( SubscriptionRetrieveParams as SubscriptionRetrieveParams, @@ -6319,6 +6366,7 @@ SubscriptionUpdateParamsAddInvoiceItemPriceData as SubscriptionUpdateParamsAddInvoiceItemPriceData, SubscriptionUpdateParamsAutomaticTax as SubscriptionUpdateParamsAutomaticTax, SubscriptionUpdateParamsAutomaticTaxLiability as SubscriptionUpdateParamsAutomaticTaxLiability, + SubscriptionUpdateParamsBillingCycleAnchor as SubscriptionUpdateParamsBillingCycleAnchor, SubscriptionUpdateParamsBillingSchedule as SubscriptionUpdateParamsBillingSchedule, SubscriptionUpdateParamsBillingScheduleAppliesTo as SubscriptionUpdateParamsBillingScheduleAppliesTo, SubscriptionUpdateParamsBillingScheduleBillUntil as SubscriptionUpdateParamsBillingScheduleBillUntil, @@ -6593,6 +6641,7 @@ "tax": ("stripe.params.tax", True), "terminal": ("stripe.params.terminal", True), "test_helpers": ("stripe.params.test_helpers", True), + "three_d_secure": ("stripe.params.three_d_secure", True), "treasury": ("stripe.params.treasury", True), "AccountCapabilityListParams": ( "stripe.params._account_capability_list_params", @@ -6707,6 +6756,10 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsCapabilitiesBlikRecurringPayments": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsCapabilitiesBoletoPayments": ( "stripe.params._account_create_params", False, @@ -6907,6 +6960,10 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsCapabilitiesSequraPayments": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsCapabilitiesShopeepayPayments": ( "stripe.params._account_create_params", False, @@ -7232,6 +7289,10 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsSettingsSepaDebitPayments": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsSettingsSmartDisputes": ( "stripe.params._account_create_params", False, @@ -7854,6 +7915,14 @@ "stripe.params._account_session_create_params", False, ), + "AccountSessionCreateParamsComponentsCapitalFinancingManualPayment": ( + "stripe.params._account_session_create_params", + False, + ), + "AccountSessionCreateParamsComponentsCapitalFinancingManualPaymentFeatures": ( + "stripe.params._account_session_create_params", + False, + ), "AccountSessionCreateParamsComponentsCapitalFinancingPromotion": ( "stripe.params._account_session_create_params", False, @@ -8164,6 +8233,10 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsCapabilitiesBlikRecurringPayments": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsCapabilitiesBoletoPayments": ( "stripe.params._account_update_params", False, @@ -8364,6 +8437,10 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsCapabilitiesSequraPayments": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsCapabilitiesShopeepayPayments": ( "stripe.params._account_update_params", False, @@ -10051,6 +10128,10 @@ "stripe.params._confirmation_token_create_params", False, ), + "ConfirmationTokenCreateParamsPaymentMethodDataSequra": ( + "stripe.params._confirmation_token_create_params", + False, + ), "ConfirmationTokenCreateParamsPaymentMethodDataShopeepay": ( "stripe.params._confirmation_token_create_params", False, @@ -10413,6 +10494,10 @@ "stripe.params._customer_create_tax_exemption_params", False, ), + "CustomerCreateTaxExemptionParamsEs": ( + "stripe.params._customer_create_tax_exemption_params", + False, + ), "CustomerCreateTaxExemptionParamsUs": ( "stripe.params._customer_create_tax_exemption_params", False, @@ -10685,6 +10770,10 @@ "stripe.params._customer_tax_exemption_create_params", False, ), + "CustomerTaxExemptionCreateParamsEs": ( + "stripe.params._customer_tax_exemption_create_params", + False, + ), "CustomerTaxExemptionCreateParamsUs": ( "stripe.params._customer_tax_exemption_create_params", False, @@ -10762,6 +10851,14 @@ "stripe.params._dispute_modify_params", False, ), + "DisputeModifyParamsEvidenceAppeal": ( + "stripe.params._dispute_modify_params", + False, + ), + "DisputeModifyParamsEvidenceAppealCard": ( + "stripe.params._dispute_modify_params", + False, + ), "DisputeModifyParamsEvidenceEnhancedEvidence": ( "stripe.params._dispute_modify_params", False, @@ -10800,6 +10897,14 @@ "stripe.params._dispute_update_params", False, ), + "DisputeUpdateParamsEvidenceAppeal": ( + "stripe.params._dispute_update_params", + False, + ), + "DisputeUpdateParamsEvidenceAppealCard": ( + "stripe.params._dispute_update_params", + False, + ), "DisputeUpdateParamsEvidenceEnhancedEvidence": ( "stripe.params._dispute_update_params", False, @@ -11680,6 +11785,10 @@ "stripe.params._invoice_create_preview_params", False, ), + "InvoiceCreatePreviewParamsSubscriptionDetailsBillingCycleAnchor": ( + "stripe.params._invoice_create_preview_params", + False, + ), "InvoiceCreatePreviewParamsSubscriptionDetailsBillingMode": ( "stripe.params._invoice_create_preview_params", False, @@ -14623,6 +14732,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodDataSequra": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodDataShopeepay": ( "stripe.params._payment_intent_confirm_params", False, @@ -14743,6 +14856,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsBoleto": ( "stripe.params._payment_intent_confirm_params", False, @@ -15179,6 +15296,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsSequra": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsShopeepay": ( "stripe.params._payment_intent_confirm_params", False, @@ -15939,6 +16060,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodDataSequra": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodDataShopeepay": ( "stripe.params._payment_intent_create_params", False, @@ -16059,6 +16184,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsBoleto": ( "stripe.params._payment_intent_create_params", False, @@ -16495,6 +16624,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsSequra": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsShopeepay": ( "stripe.params._payment_intent_create_params", False, @@ -17439,6 +17572,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodDataSequra": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodDataShopeepay": ( "stripe.params._payment_intent_modify_params", False, @@ -17559,6 +17696,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsBoleto": ( "stripe.params._payment_intent_modify_params", False, @@ -17995,6 +18136,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsSequra": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsShopeepay": ( "stripe.params._payment_intent_modify_params", False, @@ -18779,6 +18924,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodDataSequra": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodDataShopeepay": ( "stripe.params._payment_intent_update_params", False, @@ -18899,6 +19048,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsBoleto": ( "stripe.params._payment_intent_update_params", False, @@ -19335,6 +19488,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsSequra": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsShopeepay": ( "stripe.params._payment_intent_update_params", False, @@ -20567,6 +20724,14 @@ "stripe.params._payment_method_configuration_create_params", False, ), + "PaymentMethodConfigurationCreateParamsSequra": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), + "PaymentMethodConfigurationCreateParamsSequraDisplayPreference": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), "PaymentMethodConfigurationCreateParamsShopeepay": ( "stripe.params._payment_method_configuration_create_params", False, @@ -21103,6 +21268,14 @@ "stripe.params._payment_method_configuration_modify_params", False, ), + "PaymentMethodConfigurationModifyParamsSequra": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), + "PaymentMethodConfigurationModifyParamsSequraDisplayPreference": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), "PaymentMethodConfigurationModifyParamsShopeepay": ( "stripe.params._payment_method_configuration_modify_params", False, @@ -21639,6 +21812,14 @@ "stripe.params._payment_method_configuration_update_params", False, ), + "PaymentMethodConfigurationUpdateParamsSequra": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), + "PaymentMethodConfigurationUpdateParamsSequraDisplayPreference": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), "PaymentMethodConfigurationUpdateParamsShopeepay": ( "stripe.params._payment_method_configuration_update_params", False, @@ -21963,6 +22144,10 @@ "stripe.params._payment_method_create_params", False, ), + "PaymentMethodCreateParamsSequra": ( + "stripe.params._payment_method_create_params", + False, + ), "PaymentMethodCreateParamsShopeepay": ( "stripe.params._payment_method_create_params", False, @@ -22071,10 +22256,6 @@ "stripe.params._payment_method_modify_params", False, ), - "PaymentMethodModifyParamsPayto": ( - "stripe.params._payment_method_modify_params", - False, - ), "PaymentMethodModifyParamsUsBankAccount": ( "stripe.params._payment_method_modify_params", False, @@ -22107,10 +22288,6 @@ "stripe.params._payment_method_update_params", False, ), - "PaymentMethodUpdateParamsPayto": ( - "stripe.params._payment_method_update_params", - False, - ), "PaymentMethodUpdateParamsUsBankAccount": ( "stripe.params._payment_method_update_params", False, @@ -24111,6 +24288,10 @@ "stripe.params._setup_intent_confirm_params", False, ), + "SetupIntentConfirmParamsPaymentMethodDataSequra": ( + "stripe.params._setup_intent_confirm_params", + False, + ), "SetupIntentConfirmParamsPaymentMethodDataShopeepay": ( "stripe.params._setup_intent_confirm_params", False, @@ -24191,6 +24372,14 @@ "stripe.params._setup_intent_confirm_params", False, ), + "SetupIntentConfirmParamsPaymentMethodOptionsBlik": ( + "stripe.params._setup_intent_confirm_params", + False, + ), + "SetupIntentConfirmParamsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._setup_intent_confirm_params", + False, + ), "SetupIntentConfirmParamsPaymentMethodOptionsCard": ( "stripe.params._setup_intent_confirm_params", False, @@ -24571,6 +24760,10 @@ "stripe.params._setup_intent_create_params", False, ), + "SetupIntentCreateParamsPaymentMethodDataSequra": ( + "stripe.params._setup_intent_create_params", + False, + ), "SetupIntentCreateParamsPaymentMethodDataShopeepay": ( "stripe.params._setup_intent_create_params", False, @@ -24651,6 +24844,14 @@ "stripe.params._setup_intent_create_params", False, ), + "SetupIntentCreateParamsPaymentMethodOptionsBlik": ( + "stripe.params._setup_intent_create_params", + False, + ), + "SetupIntentCreateParamsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._setup_intent_create_params", + False, + ), "SetupIntentCreateParamsPaymentMethodOptionsCard": ( "stripe.params._setup_intent_create_params", False, @@ -25023,6 +25224,10 @@ "stripe.params._setup_intent_modify_params", False, ), + "SetupIntentModifyParamsPaymentMethodDataSequra": ( + "stripe.params._setup_intent_modify_params", + False, + ), "SetupIntentModifyParamsPaymentMethodDataShopeepay": ( "stripe.params._setup_intent_modify_params", False, @@ -25103,6 +25308,14 @@ "stripe.params._setup_intent_modify_params", False, ), + "SetupIntentModifyParamsPaymentMethodOptionsBlik": ( + "stripe.params._setup_intent_modify_params", + False, + ), + "SetupIntentModifyParamsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._setup_intent_modify_params", + False, + ), "SetupIntentModifyParamsPaymentMethodOptionsCard": ( "stripe.params._setup_intent_modify_params", False, @@ -25467,6 +25680,10 @@ "stripe.params._setup_intent_update_params", False, ), + "SetupIntentUpdateParamsPaymentMethodDataSequra": ( + "stripe.params._setup_intent_update_params", + False, + ), "SetupIntentUpdateParamsPaymentMethodDataShopeepay": ( "stripe.params._setup_intent_update_params", False, @@ -25547,6 +25764,14 @@ "stripe.params._setup_intent_update_params", False, ), + "SetupIntentUpdateParamsPaymentMethodOptionsBlik": ( + "stripe.params._setup_intent_update_params", + False, + ), + "SetupIntentUpdateParamsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._setup_intent_update_params", + False, + ), "SetupIntentUpdateParamsPaymentMethodOptionsCard": ( "stripe.params._setup_intent_update_params", False, @@ -26416,6 +26641,10 @@ "stripe.params._subscription_modify_params", False, ), + "SubscriptionModifyParamsBillingCycleAnchor": ( + "stripe.params._subscription_modify_params", + False, + ), "SubscriptionModifyParamsBillingSchedule": ( "stripe.params._subscription_modify_params", False, @@ -26692,6 +26921,10 @@ "stripe.params._subscription_resume_params", False, ), + "SubscriptionResumeParamsBillingCycleAnchor": ( + "stripe.params._subscription_resume_params", + False, + ), "SubscriptionRetrieveParams": ( "stripe.params._subscription_retrieve_params", False, @@ -27732,6 +27965,10 @@ "stripe.params._subscription_update_params", False, ), + "SubscriptionUpdateParamsBillingCycleAnchor": ( + "stripe.params._subscription_update_params", + False, + ), "SubscriptionUpdateParamsBillingSchedule": ( "stripe.params._subscription_update_params", False, diff --git a/stripe/params/_account_create_params.py b/stripe/params/_account_create_params.py index 54eeb694a..cd897b80d 100644 --- a/stripe/params/_account_create_params.py +++ b/stripe/params/_account_create_params.py @@ -306,6 +306,12 @@ class AccountCreateParamsCapabilities(TypedDict): """ The blik_payments capability. """ + blik_recurring_payments: NotRequired[ + "AccountCreateParamsCapabilitiesBlikRecurringPayments" + ] + """ + The blik_recurring_payments capability. + """ boleto_payments: NotRequired[ "AccountCreateParamsCapabilitiesBoletoPayments" ] @@ -566,6 +572,12 @@ class AccountCreateParamsCapabilities(TypedDict): """ The sepa_debit_payments capability. """ + sequra_payments: NotRequired[ + "AccountCreateParamsCapabilitiesSequraPayments" + ] + """ + The sequra_payments capability. + """ shopeepay_payments: NotRequired[ "AccountCreateParamsCapabilitiesShopeepayPayments" ] @@ -756,6 +768,13 @@ class AccountCreateParamsCapabilitiesBlikPayments(TypedDict): """ +class AccountCreateParamsCapabilitiesBlikRecurringPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + class AccountCreateParamsCapabilitiesBoletoPayments(TypedDict): requested: NotRequired[bool] """ @@ -1116,6 +1135,13 @@ class AccountCreateParamsCapabilitiesSepaDebitPayments(TypedDict): """ +class AccountCreateParamsCapabilitiesSequraPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + class AccountCreateParamsCapabilitiesShopeepayPayments(TypedDict): requested: NotRequired[bool] """ @@ -2255,6 +2281,12 @@ class AccountCreateParamsSettings(TypedDict): """ Settings specific to the PayPay payments method. """ + sepa_debit_payments: NotRequired[ + "AccountCreateParamsSettingsSepaDebitPayments" + ] + """ + Settings specific to SEPA Direct Debit payments. + """ smart_disputes: NotRequired["AccountCreateParamsSettingsSmartDisputes"] """ Settings specific to the account's use of Smart Disputes. @@ -2524,6 +2556,13 @@ class AccountCreateParamsSettingsPaypayPaymentsSiteRestricted(TypedDict): """ +class AccountCreateParamsSettingsSepaDebitPayments(TypedDict): + creditor_id: NotRequired[str] + """ + The business creditor id for european payments. + """ + + class AccountCreateParamsSettingsSmartDisputes(TypedDict): auto_respond: NotRequired[ "AccountCreateParamsSettingsSmartDisputesAutoRespond" diff --git a/stripe/params/_account_reject_params.py b/stripe/params/_account_reject_params.py index 4e1be3a1a..629e546fc 100644 --- a/stripe/params/_account_reject_params.py +++ b/stripe/params/_account_reject_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired @@ -14,7 +14,18 @@ class AccountRejectParams(RequestOptions): """ Whether to pause payouts on the account as part of the rejection. Defaults to `pause`. Use `none` to leave payouts enabled. """ - reason: str + reason: Union[ + Literal[ + "credit", + "fraud_no_intent_to_fulfill", + "fraud_other", + "fraud_payment_method_casher", + "fraud_payment_method_tester", + "other", + "terms_of_service", + ], + str, + ] """ - The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. + The reason for rejecting the account. Can be `fraud_payment_method_casher`, `fraud_payment_method_tester`, `fraud_no_intent_to_fulfill`, `fraud_other`, `credit`, `terms_of_service`, or `other`. """ diff --git a/stripe/params/_account_session_create_params.py b/stripe/params/_account_session_create_params.py index 935867523..439b13752 100644 --- a/stripe/params/_account_session_create_params.py +++ b/stripe/params/_account_session_create_params.py @@ -71,6 +71,12 @@ class AccountSessionCreateParamsComponents(TypedDict): """ Configuration for the [Capital financing application](https://docs.stripe.com/connect/supported-embedded-components/capital-financing-application/) embedded component. """ + capital_financing_manual_payment: NotRequired[ + "AccountSessionCreateParamsComponentsCapitalFinancingManualPayment" + ] + """ + Configuration for the [Capital financing manual payment](https://docs.stripe.com/connect/supported-embedded-components/capital-financing-manual-payment/) embedded component. + """ capital_financing_promotion: NotRequired[ "AccountSessionCreateParamsComponentsCapitalFinancingPromotion" ] @@ -431,6 +437,27 @@ class AccountSessionCreateParamsComponentsCapitalFinancingApplicationFeatures( pass +class AccountSessionCreateParamsComponentsCapitalFinancingManualPayment( + TypedDict, +): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsCapitalFinancingManualPaymentFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsCapitalFinancingManualPaymentFeatures( + TypedDict, +): + pass + + class AccountSessionCreateParamsComponentsCapitalFinancingPromotion(TypedDict): enabled: bool """ diff --git a/stripe/params/_account_update_params.py b/stripe/params/_account_update_params.py index 6b50ec115..ee2a6d921 100644 --- a/stripe/params/_account_update_params.py +++ b/stripe/params/_account_update_params.py @@ -293,6 +293,12 @@ class AccountUpdateParamsCapabilities(TypedDict): """ The blik_payments capability. """ + blik_recurring_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesBlikRecurringPayments" + ] + """ + The blik_recurring_payments capability. + """ boleto_payments: NotRequired[ "AccountUpdateParamsCapabilitiesBoletoPayments" ] @@ -553,6 +559,12 @@ class AccountUpdateParamsCapabilities(TypedDict): """ The sepa_debit_payments capability. """ + sequra_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesSequraPayments" + ] + """ + The sequra_payments capability. + """ shopeepay_payments: NotRequired[ "AccountUpdateParamsCapabilitiesShopeepayPayments" ] @@ -743,6 +755,13 @@ class AccountUpdateParamsCapabilitiesBlikPayments(TypedDict): """ +class AccountUpdateParamsCapabilitiesBlikRecurringPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + class AccountUpdateParamsCapabilitiesBoletoPayments(TypedDict): requested: NotRequired[bool] """ @@ -1103,6 +1122,13 @@ class AccountUpdateParamsCapabilitiesSepaDebitPayments(TypedDict): """ +class AccountUpdateParamsCapabilitiesSequraPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + class AccountUpdateParamsCapabilitiesShopeepayPayments(TypedDict): requested: NotRequired[bool] """ diff --git a/stripe/params/_confirmation_token_create_params.py b/stripe/params/_confirmation_token_create_params.py index 03230540e..a5ee34a22 100644 --- a/stripe/params/_confirmation_token_create_params.py +++ b/stripe/params/_confirmation_token_create_params.py @@ -330,6 +330,10 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. """ + sequra: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSequra"] + """ + If this is a SeQura PaymentMethod, this hash contains details about the SeQura payment method. + """ shared_payment_granted_token: NotRequired[str] """ ID of the SharedPaymentGrantedToken used to confirm this PaymentIntent. @@ -893,6 +897,10 @@ class ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit(TypedDict): """ +class ConfirmationTokenCreateParamsPaymentMethodDataSequra(TypedDict): + pass + + class ConfirmationTokenCreateParamsPaymentMethodDataShopeepay(TypedDict): pass diff --git a/stripe/params/_customer_create_tax_exemption_params.py b/stripe/params/_customer_create_tax_exemption_params.py index 9a8bcb749..4e9956e1a 100644 --- a/stripe/params/_customer_create_tax_exemption_params.py +++ b/stripe/params/_customer_create_tax_exemption_params.py @@ -18,6 +18,10 @@ class CustomerCreateTaxExemptionParams(RequestOptions): """ ISO 8601 date (YYYY-MM-DD) when the exemption becomes effective. Must be no more than one year after today's UTC date (inclusive). """ + es: NotRequired["CustomerCreateTaxExemptionParamsEs"] + """ + Spain-specific exemption details. Optional when country is ES; must be absent otherwise. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. @@ -43,6 +47,13 @@ class CustomerCreateTaxExemptionParamsCa(TypedDict): """ +class CustomerCreateTaxExemptionParamsEs(TypedDict): + state: str + """ + Two-letter Spanish subdivision code (ISO 3166-2). + """ + + class CustomerCreateTaxExemptionParamsUs(TypedDict): state: str """ diff --git a/stripe/params/_customer_tax_exemption_create_params.py b/stripe/params/_customer_tax_exemption_create_params.py index 2cfbbd7e8..de5f6ecbc 100644 --- a/stripe/params/_customer_tax_exemption_create_params.py +++ b/stripe/params/_customer_tax_exemption_create_params.py @@ -17,6 +17,10 @@ class CustomerTaxExemptionCreateParams(TypedDict): """ ISO 8601 date (YYYY-MM-DD) when the exemption becomes effective. Must be no more than one year after today's UTC date (inclusive). """ + es: NotRequired["CustomerTaxExemptionCreateParamsEs"] + """ + Spain-specific exemption details. Optional when country is ES; must be absent otherwise. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. @@ -42,6 +46,13 @@ class CustomerTaxExemptionCreateParamsCa(TypedDict): """ +class CustomerTaxExemptionCreateParamsEs(TypedDict): + state: str + """ + Two-letter Spanish subdivision code (ISO 3166-2). + """ + + class CustomerTaxExemptionCreateParamsUs(TypedDict): state: str """ diff --git a/stripe/params/_dispute_modify_params.py b/stripe/params/_dispute_modify_params.py index 94b7e4ad8..a7b56f7e0 100644 --- a/stripe/params/_dispute_modify_params.py +++ b/stripe/params/_dispute_modify_params.py @@ -47,6 +47,10 @@ class DisputeModifyParamsEvidence(TypedDict): """ Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000. """ + appeal: NotRequired["Literal['']|DisputeModifyParamsEvidenceAppeal"] + """ + Evidence to submit when appealing a dispute. + """ billing_address: NotRequired[str] """ The billing address provided by the customer. @@ -159,6 +163,24 @@ class DisputeModifyParamsEvidence(TypedDict): """ +class DisputeModifyParamsEvidenceAppeal(TypedDict): + card: NotRequired["Literal['']|DisputeModifyParamsEvidenceAppealCard"] + """ + Evidence for a card dispute appeal. + """ + + +class DisputeModifyParamsEvidenceAppealCard(TypedDict): + reason_for_filing: NotRequired["Literal['']|str"] + """ + An explanation of the reason for filing the appeal. + """ + supporting_files: NotRequired["Literal['']|List[str]"] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `dispute_evidence` to support the appeal. + """ + + class DisputeModifyParamsEvidenceEnhancedEvidence(TypedDict): mastercard_compliance: NotRequired[ "DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance" diff --git a/stripe/params/_dispute_update_params.py b/stripe/params/_dispute_update_params.py index 7c14e2dcd..0d0507db5 100644 --- a/stripe/params/_dispute_update_params.py +++ b/stripe/params/_dispute_update_params.py @@ -46,6 +46,10 @@ class DisputeUpdateParamsEvidence(TypedDict): """ Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000. """ + appeal: NotRequired["Literal['']|DisputeUpdateParamsEvidenceAppeal"] + """ + Evidence to submit when appealing a dispute. + """ billing_address: NotRequired[str] """ The billing address provided by the customer. @@ -158,6 +162,24 @@ class DisputeUpdateParamsEvidence(TypedDict): """ +class DisputeUpdateParamsEvidenceAppeal(TypedDict): + card: NotRequired["Literal['']|DisputeUpdateParamsEvidenceAppealCard"] + """ + Evidence for a card dispute appeal. + """ + + +class DisputeUpdateParamsEvidenceAppealCard(TypedDict): + reason_for_filing: NotRequired["Literal['']|str"] + """ + An explanation of the reason for filing the appeal. + """ + supporting_files: NotRequired["Literal['']|List[str]"] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `dispute_evidence` to support the appeal. + """ + + class DisputeUpdateParamsEvidenceEnhancedEvidence(TypedDict): mastercard_compliance: NotRequired[ "DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance" diff --git a/stripe/params/_invoice_add_lines_params.py b/stripe/params/_invoice_add_lines_params.py index 2a41b4623..41fbca1c7 100644 --- a/stripe/params/_invoice_add_lines_params.py +++ b/stripe/params/_invoice_add_lines_params.py @@ -286,7 +286,7 @@ class InvoiceAddLinesParamsLineTaxAmountTaxRateData(TypedDict): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'vat']|str" + "Literal['amusement_tax', 'communications_tax', 'digital_excise_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'utility_users_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index 1d202c338..f0618264b 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -2489,7 +2489,9 @@ class InvoiceCreatePreviewParamsScheduleDetailsPrebillingBillUntilDuration( class InvoiceCreatePreviewParamsSubscriptionDetails(TypedDict): - billing_cycle_anchor: NotRequired["Literal['now', 'unchanged']|str|int"] + billing_cycle_anchor: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsBillingCycleAnchor" + ] """ For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://docs.stripe.com/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. """ @@ -2573,6 +2575,19 @@ class InvoiceCreatePreviewParamsSubscriptionDetails(TypedDict): """ +class InvoiceCreatePreviewParamsSubscriptionDetailsBillingCycleAnchor( + TypedDict, +): + timestamp: NotRequired[int] + """ + A timestamp to use as the subscription's billing cycle anchor. Only valid when `type` is `timestamp`. + """ + type: Union[Literal["now", "timestamp", "unchanged"], str] + """ + Determines how the subscription's billing cycle anchor behaves for the invoice preview. + """ + + class InvoiceCreatePreviewParamsSubscriptionDetailsBillingMode(TypedDict): flexible: NotRequired[ "InvoiceCreatePreviewParamsSubscriptionDetailsBillingModeFlexible" diff --git a/stripe/params/_invoice_item_modify_params.py b/stripe/params/_invoice_item_modify_params.py index a2a09c294..fa0c86bd7 100644 --- a/stripe/params/_invoice_item_modify_params.py +++ b/stripe/params/_invoice_item_modify_params.py @@ -28,6 +28,10 @@ class InvoiceItemModifyParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + invoicing_rules: NotRequired[Literal[""]] + """ + Pass an empty string to remove previously-defined invoicing rules. Setting invoicing rules is not supported. + """ margins: NotRequired["Literal['']|List[str]"] """ The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. diff --git a/stripe/params/_invoice_item_update_params.py b/stripe/params/_invoice_item_update_params.py index df0fcdfcf..b50318ed5 100644 --- a/stripe/params/_invoice_item_update_params.py +++ b/stripe/params/_invoice_item_update_params.py @@ -27,6 +27,10 @@ class InvoiceItemUpdateParams(TypedDict): """ Specifies which fields in the response should be expanded. """ + invoicing_rules: NotRequired[Literal[""]] + """ + Pass an empty string to remove previously-defined invoicing rules. Setting invoicing rules is not supported. + """ margins: NotRequired["Literal['']|List[str]"] """ The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. diff --git a/stripe/params/_invoice_line_item_update_params.py b/stripe/params/_invoice_line_item_update_params.py index 7cbc5c4cb..29612fab7 100644 --- a/stripe/params/_invoice_line_item_update_params.py +++ b/stripe/params/_invoice_line_item_update_params.py @@ -270,7 +270,7 @@ class InvoiceLineItemUpdateParamsTaxAmountTaxRateData(TypedDict): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'vat']|str" + "Literal['amusement_tax', 'communications_tax', 'digital_excise_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'utility_users_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_invoice_update_lines_params.py b/stripe/params/_invoice_update_lines_params.py index 2518c0f28..4461d9bfb 100644 --- a/stripe/params/_invoice_update_lines_params.py +++ b/stripe/params/_invoice_update_lines_params.py @@ -290,7 +290,7 @@ class InvoiceUpdateLinesParamsLineTaxAmountTaxRateData(TypedDict): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'vat']|str" + "Literal['amusement_tax', 'communications_tax', 'digital_excise_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'utility_users_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_payment_attempt_record_report_canceled_params.py b/stripe/params/_payment_attempt_record_report_canceled_params.py index 06aced371..d338cd5f9 100644 --- a/stripe/params/_payment_attempt_record_report_canceled_params.py +++ b/stripe/params/_payment_attempt_record_report_canceled_params.py @@ -26,7 +26,7 @@ class PaymentAttemptRecordReportCanceledParams(RequestOptions): Payment evaluations associated with this reported payment. """ reason: NotRequired[ - "Literal['blocked_for_fraud', 'merchant_canceled']|str" + "Literal['blocked_for_fraud', 'merchant_canceled', 'rerouted']|str" ] """ The reason the payment attempt was canceled. diff --git a/stripe/params/_payment_attempt_record_report_informational_params.py b/stripe/params/_payment_attempt_record_report_informational_params.py index 1b4330d30..72d8cd3f2 100644 --- a/stripe/params/_payment_attempt_record_report_informational_params.py +++ b/stripe/params/_payment_attempt_record_report_informational_params.py @@ -42,7 +42,7 @@ class PaymentAttemptRecordReportInformationalParamsCustomerDetails(TypedDict): """ email: NotRequired[str] """ - The customer's phone number. + The customer's email address. """ name: NotRequired[str] """ diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index d13422285..91b1a23f9 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -31,6 +31,7 @@ class PaymentIntentConfirmParams(RequestOptions): "boleto", "capchase_pay", "card", + "card_present", "cashapp", "check_scan", "click_to_pay", @@ -51,6 +52,7 @@ class PaymentIntentConfirmParams(RequestOptions): "grabpay", "id_bank_transfer", "ideal", + "interac_present", "kakao_pay", "klarna", "knet", @@ -3197,6 +3199,10 @@ class PaymentIntentConfirmParamsPaymentMethodData(TypedDict): """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. """ + sequra: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataSequra"] + """ + If this is a SeQura PaymentMethod, this hash contains details about the SeQura payment method. + """ shared_payment_granted_token: NotRequired[str] """ ID of the SharedPaymentGrantedToken used to confirm this PaymentIntent. @@ -3758,6 +3764,10 @@ class PaymentIntentConfirmParamsPaymentMethodDataSepaDebit(TypedDict): """ +class PaymentIntentConfirmParamsPaymentMethodDataSequra(TypedDict): + pass + + class PaymentIntentConfirmParamsPaymentMethodDataShopeepay(TypedDict): pass @@ -4180,6 +4190,12 @@ class PaymentIntentConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. """ + sequra: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsSequra" + ] + """ + If this is a `sequra` PaymentMethod, this sub-hash contains details about the SeQura payment method options. + """ shopeepay: NotRequired[ "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsShopeepay" ] @@ -4583,7 +4599,15 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsBlik(TypedDict): """ The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. """ - setup_future_usage: NotRequired["Literal['']|Literal['none']"] + mandate_options: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsBlikMandateOptions" + ] + """ + Details of the BLIK mandate + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']|str" + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4597,6 +4621,15 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsBlik(TypedDict): """ +class PaymentIntentConfirmParamsPaymentMethodOptionsBlikMandateOptions( + TypedDict, +): + expires_at: NotRequired[int] + """ + Expiry date of the mandate. + """ + + class PaymentIntentConfirmParamsPaymentMethodOptionsBoleto(TypedDict): expires_after_days: NotRequired[int] """ @@ -4681,6 +4714,10 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): """ Payment details for payment method specific funding fields. """ + request_card_account_update: NotRequired[Literal["if_available", "never"]] + """ + Controls whether Stripe may synchronously request a real-time card account update on this confirmation. Use `if_available` to allow the update and `never` to opt out. Defaults to `if_available` when omitted. Only valid on confirmation; does not affect batch Card Account Updater. + """ request_decremental_authorization: NotRequired[ "Literal['if_available', 'never']|str" ] @@ -4729,6 +4766,12 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): """ When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -4757,6 +4800,18 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): """ Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. """ + stored_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + + When making an off session payment with a previously saved card (that was saved with a SetupIntent or with a PaymentIntent with `setup_future_usage`), set this parameter to indicate the type of transaction. + + You can set this parameter at any time before or during PaymentIntent confirmation, and confirm this PaymentIntent with `off_session=true`. + + Note that this parameter is currently unsupported with the `setup_future_usage` parameter. + """ three_d_secure: NotRequired[ "PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecure" ] @@ -7000,14 +7055,6 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPaypalLineItemTax( class PaymentIntentConfirmParamsPaymentMethodOptionsPaypay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -7296,6 +7343,29 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions( """ +class PaymentIntentConfirmParamsPaymentMethodOptionsSequra(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + class PaymentIntentConfirmParamsPaymentMethodOptionsShopeepay(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index 8bf979b4c..6d2427fd1 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -31,6 +31,7 @@ class PaymentIntentCreateParams(RequestOptions): "boleto", "capchase_pay", "card", + "card_present", "cashapp", "check_scan", "click_to_pay", @@ -51,6 +52,7 @@ class PaymentIntentCreateParams(RequestOptions): "grabpay", "id_bank_transfer", "ideal", + "interac_present", "kakao_pay", "klarna", "knet", @@ -3333,6 +3335,10 @@ class PaymentIntentCreateParamsPaymentMethodData(TypedDict): """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. """ + sequra: NotRequired["PaymentIntentCreateParamsPaymentMethodDataSequra"] + """ + If this is a SeQura PaymentMethod, this hash contains details about the SeQura payment method. + """ shared_payment_granted_token: NotRequired[str] """ ID of the SharedPaymentGrantedToken used to confirm this PaymentIntent. @@ -3894,6 +3900,10 @@ class PaymentIntentCreateParamsPaymentMethodDataSepaDebit(TypedDict): """ +class PaymentIntentCreateParamsPaymentMethodDataSequra(TypedDict): + pass + + class PaymentIntentCreateParamsPaymentMethodDataShopeepay(TypedDict): pass @@ -4316,6 +4326,12 @@ class PaymentIntentCreateParamsPaymentMethodOptions(TypedDict): """ If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. """ + sequra: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsSequra" + ] + """ + If this is a `sequra` PaymentMethod, this sub-hash contains details about the SeQura payment method options. + """ shopeepay: NotRequired[ "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsShopeepay" ] @@ -4717,7 +4733,15 @@ class PaymentIntentCreateParamsPaymentMethodOptionsBlik(TypedDict): """ The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. """ - setup_future_usage: NotRequired["Literal['']|Literal['none']"] + mandate_options: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsBlikMandateOptions" + ] + """ + Details of the BLIK mandate + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']|str" + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4731,6 +4755,15 @@ class PaymentIntentCreateParamsPaymentMethodOptionsBlik(TypedDict): """ +class PaymentIntentCreateParamsPaymentMethodOptionsBlikMandateOptions( + TypedDict, +): + expires_at: NotRequired[int] + """ + Expiry date of the mandate. + """ + + class PaymentIntentCreateParamsPaymentMethodOptionsBoleto(TypedDict): expires_after_days: NotRequired[int] """ @@ -4815,6 +4848,10 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCard(TypedDict): """ Payment details for payment method specific funding fields. """ + request_card_account_update: NotRequired[Literal["if_available", "never"]] + """ + Controls whether Stripe may synchronously request a real-time card account update on this confirmation. Use `if_available` to allow the update and `never` to opt out. Defaults to `if_available` when omitted. Only valid on confirmation; does not affect batch Card Account Updater. + """ request_decremental_authorization: NotRequired[ "Literal['if_available', 'never']|str" ] @@ -4863,6 +4900,12 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCard(TypedDict): """ When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -4891,6 +4934,18 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCard(TypedDict): """ Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. """ + stored_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + + When making an off session payment with a previously saved card (that was saved with a SetupIntent or with a PaymentIntent with `setup_future_usage`), set this parameter to indicate the type of transaction. + + You can set this parameter at any time before or during PaymentIntent confirmation, and confirm this PaymentIntent with `off_session=true`. + + Note that this parameter is currently unsupported with the `setup_future_usage` parameter. + """ three_d_secure: NotRequired[ "PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecure" ] @@ -7128,14 +7183,6 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPaypalLineItemTax( class PaymentIntentCreateParamsPaymentMethodOptionsPaypay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -7424,6 +7471,29 @@ class PaymentIntentCreateParamsPaymentMethodOptionsSepaDebitMandateOptions( """ +class PaymentIntentCreateParamsPaymentMethodOptionsSequra(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + class PaymentIntentCreateParamsPaymentMethodOptionsShopeepay(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index c63ba4753..daea126d5 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -31,6 +31,7 @@ class PaymentIntentModifyParams(RequestOptions): "boleto", "capchase_pay", "card", + "card_present", "cashapp", "check_scan", "click_to_pay", @@ -51,6 +52,7 @@ class PaymentIntentModifyParams(RequestOptions): "grabpay", "id_bank_transfer", "ideal", + "interac_present", "kakao_pay", "klarna", "knet", @@ -3176,6 +3178,10 @@ class PaymentIntentModifyParamsPaymentMethodData(TypedDict): """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. """ + sequra: NotRequired["PaymentIntentModifyParamsPaymentMethodDataSequra"] + """ + If this is a SeQura PaymentMethod, this hash contains details about the SeQura payment method. + """ shared_payment_granted_token: NotRequired[str] """ ID of the SharedPaymentGrantedToken used to confirm this PaymentIntent. @@ -3737,6 +3743,10 @@ class PaymentIntentModifyParamsPaymentMethodDataSepaDebit(TypedDict): """ +class PaymentIntentModifyParamsPaymentMethodDataSequra(TypedDict): + pass + + class PaymentIntentModifyParamsPaymentMethodDataShopeepay(TypedDict): pass @@ -4159,6 +4169,12 @@ class PaymentIntentModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. """ + sequra: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsSequra" + ] + """ + If this is a `sequra` PaymentMethod, this sub-hash contains details about the SeQura payment method options. + """ shopeepay: NotRequired[ "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsShopeepay" ] @@ -4560,7 +4576,15 @@ class PaymentIntentModifyParamsPaymentMethodOptionsBlik(TypedDict): """ The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. """ - setup_future_usage: NotRequired["Literal['']|Literal['none']"] + mandate_options: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsBlikMandateOptions" + ] + """ + Details of the BLIK mandate + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']|str" + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4574,6 +4598,15 @@ class PaymentIntentModifyParamsPaymentMethodOptionsBlik(TypedDict): """ +class PaymentIntentModifyParamsPaymentMethodOptionsBlikMandateOptions( + TypedDict, +): + expires_at: NotRequired[int] + """ + Expiry date of the mandate. + """ + + class PaymentIntentModifyParamsPaymentMethodOptionsBoleto(TypedDict): expires_after_days: NotRequired[int] """ @@ -4658,6 +4691,10 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCard(TypedDict): """ Payment details for payment method specific funding fields. """ + request_card_account_update: NotRequired[Literal["if_available", "never"]] + """ + Controls whether Stripe may synchronously request a real-time card account update on this confirmation. Use `if_available` to allow the update and `never` to opt out. Defaults to `if_available` when omitted. Only valid on confirmation; does not affect batch Card Account Updater. + """ request_decremental_authorization: NotRequired[ "Literal['if_available', 'never']|str" ] @@ -4706,6 +4743,12 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCard(TypedDict): """ When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -4734,6 +4777,18 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCard(TypedDict): """ Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. """ + stored_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + + When making an off session payment with a previously saved card (that was saved with a SetupIntent or with a PaymentIntent with `setup_future_usage`), set this parameter to indicate the type of transaction. + + You can set this parameter at any time before or during PaymentIntent confirmation, and confirm this PaymentIntent with `off_session=true`. + + Note that this parameter is currently unsupported with the `setup_future_usage` parameter. + """ three_d_secure: NotRequired[ "PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecure" ] @@ -6971,14 +7026,6 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPaypalLineItemTax( class PaymentIntentModifyParamsPaymentMethodOptionsPaypay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -7267,6 +7314,29 @@ class PaymentIntentModifyParamsPaymentMethodOptionsSepaDebitMandateOptions( """ +class PaymentIntentModifyParamsPaymentMethodOptionsSequra(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + class PaymentIntentModifyParamsPaymentMethodOptionsShopeepay(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index 66c0a3dea..5d2d9f81b 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -30,6 +30,7 @@ class PaymentIntentUpdateParams(TypedDict): "boleto", "capchase_pay", "card", + "card_present", "cashapp", "check_scan", "click_to_pay", @@ -50,6 +51,7 @@ class PaymentIntentUpdateParams(TypedDict): "grabpay", "id_bank_transfer", "ideal", + "interac_present", "kakao_pay", "klarna", "knet", @@ -3175,6 +3177,10 @@ class PaymentIntentUpdateParamsPaymentMethodData(TypedDict): """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. """ + sequra: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataSequra"] + """ + If this is a SeQura PaymentMethod, this hash contains details about the SeQura payment method. + """ shared_payment_granted_token: NotRequired[str] """ ID of the SharedPaymentGrantedToken used to confirm this PaymentIntent. @@ -3736,6 +3742,10 @@ class PaymentIntentUpdateParamsPaymentMethodDataSepaDebit(TypedDict): """ +class PaymentIntentUpdateParamsPaymentMethodDataSequra(TypedDict): + pass + + class PaymentIntentUpdateParamsPaymentMethodDataShopeepay(TypedDict): pass @@ -4158,6 +4168,12 @@ class PaymentIntentUpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. """ + sequra: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsSequra" + ] + """ + If this is a `sequra` PaymentMethod, this sub-hash contains details about the SeQura payment method options. + """ shopeepay: NotRequired[ "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsShopeepay" ] @@ -4559,7 +4575,15 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsBlik(TypedDict): """ The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. """ - setup_future_usage: NotRequired["Literal['']|Literal['none']"] + mandate_options: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsBlikMandateOptions" + ] + """ + Details of the BLIK mandate + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']|str" + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4573,6 +4597,15 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsBlik(TypedDict): """ +class PaymentIntentUpdateParamsPaymentMethodOptionsBlikMandateOptions( + TypedDict, +): + expires_at: NotRequired[int] + """ + Expiry date of the mandate. + """ + + class PaymentIntentUpdateParamsPaymentMethodOptionsBoleto(TypedDict): expires_after_days: NotRequired[int] """ @@ -4657,6 +4690,10 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): """ Payment details for payment method specific funding fields. """ + request_card_account_update: NotRequired[Literal["if_available", "never"]] + """ + Controls whether Stripe may synchronously request a real-time card account update on this confirmation. Use `if_available` to allow the update and `never` to opt out. Defaults to `if_available` when omitted. Only valid on confirmation; does not affect batch Card Account Updater. + """ request_decremental_authorization: NotRequired[ "Literal['if_available', 'never']|str" ] @@ -4705,6 +4742,12 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): """ When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -4733,6 +4776,18 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): """ Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. """ + stored_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + + When making an off session payment with a previously saved card (that was saved with a SetupIntent or with a PaymentIntent with `setup_future_usage`), set this parameter to indicate the type of transaction. + + You can set this parameter at any time before or during PaymentIntent confirmation, and confirm this PaymentIntent with `off_session=true`. + + Note that this parameter is currently unsupported with the `setup_future_usage` parameter. + """ three_d_secure: NotRequired[ "PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecure" ] @@ -6970,14 +7025,6 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPaypalLineItemTax( class PaymentIntentUpdateParamsPaymentMethodOptionsPaypay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -7266,6 +7313,29 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebitMandateOptions( """ +class PaymentIntentUpdateParamsPaymentMethodOptionsSequra(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + class PaymentIntentUpdateParamsPaymentMethodOptionsShopeepay(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ diff --git a/stripe/params/_payment_link_create_params.py b/stripe/params/_payment_link_create_params.py index d5546edf0..ab33cd7ab 100644 --- a/stripe/params/_payment_link_create_params.py +++ b/stripe/params/_payment_link_create_params.py @@ -48,11 +48,11 @@ class PaymentLinkCreateParams(RequestOptions): """ custom_fields: NotRequired[List["PaymentLinkCreateParamsCustomField"]] """ - Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`. + Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `elements`. """ custom_text: NotRequired["PaymentLinkCreateParamsCustomText"] """ - Display additional text for your customers using custom text. You can't set this parameter if `ui_mode` is `custom`. + Display additional text for your customers using custom text. You can't set this parameter if `ui_mode` is `elements`. """ customer_creation: NotRequired["Literal['always', 'if_required']|str"] """ @@ -160,6 +160,7 @@ class PaymentLinkCreateParams(RequestOptions): "rechnung", "satispay", "sepa_debit", + "sequra", "shopeepay", "sofort", "sunbit", @@ -1178,6 +1179,10 @@ class PaymentLinkCreateParamsSubscriptionDataTrialSettings(TypedDict): class PaymentLinkCreateParamsSubscriptionDataTrialSettingsEndBehavior( TypedDict, ): + billing_cycle_anchor: NotRequired["Literal['now', 'unchanged']|str"] + """ + Indicates how the subscription's billing cycle anchor is reset when a trial ends. Defaults to `now`. + """ missing_payment_method: Union[ Literal["cancel", "create_invoice", "pause"], str ] @@ -1193,7 +1198,7 @@ class PaymentLinkCreateParamsTaxIdCollection(TypedDict): """ required: NotRequired["Literal['if_supported', 'never']|str"] """ - Describes whether a tax ID is required during checkout. Defaults to `never`. You can't set this parameter if `ui_mode` is `custom`. + Describes whether a tax ID is required during checkout. Defaults to `never`. You can't set this parameter if `ui_mode` is `elements`. """ diff --git a/stripe/params/_payment_link_modify_params.py b/stripe/params/_payment_link_modify_params.py index a790809ef..448ca050b 100644 --- a/stripe/params/_payment_link_modify_params.py +++ b/stripe/params/_payment_link_modify_params.py @@ -43,11 +43,11 @@ class PaymentLinkModifyParams(RequestOptions): "Literal['']|List[PaymentLinkModifyParamsCustomField]" ] """ - Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`. + Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `elements`. """ custom_text: NotRequired["PaymentLinkModifyParamsCustomText"] """ - Display additional text for your customers using custom text. You can't set this parameter if `ui_mode` is `custom`. + Display additional text for your customers using custom text. You can't set this parameter if `ui_mode` is `elements`. """ customer_creation: NotRequired["Literal['always', 'if_required']|str"] """ @@ -114,7 +114,7 @@ class PaymentLinkModifyParams(RequestOptions): Payment-method-specific configuration. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" + "Literal['']|List[Union[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'satispay', 'sepa_debit', 'sequra', 'shopeepay', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). @@ -992,6 +992,10 @@ class PaymentLinkModifyParamsSubscriptionDataTrialSettings(TypedDict): class PaymentLinkModifyParamsSubscriptionDataTrialSettingsEndBehavior( TypedDict, ): + billing_cycle_anchor: NotRequired["Literal['now', 'unchanged']|str"] + """ + Indicates how the subscription's billing cycle anchor is reset when a trial ends. Defaults to `now`. + """ missing_payment_method: Union[ Literal["cancel", "create_invoice", "pause"], str ] @@ -1007,7 +1011,7 @@ class PaymentLinkModifyParamsTaxIdCollection(TypedDict): """ required: NotRequired["Literal['if_supported', 'never']|str"] """ - Describes whether a tax ID is required during checkout. Defaults to `never`. You can't set this parameter if `ui_mode` is `custom`. + Describes whether a tax ID is required during checkout. Defaults to `never`. You can't set this parameter if `ui_mode` is `elements`. """ diff --git a/stripe/params/_payment_link_update_params.py b/stripe/params/_payment_link_update_params.py index 7dc172abb..864b0d1da 100644 --- a/stripe/params/_payment_link_update_params.py +++ b/stripe/params/_payment_link_update_params.py @@ -42,11 +42,11 @@ class PaymentLinkUpdateParams(TypedDict): "Literal['']|List[PaymentLinkUpdateParamsCustomField]" ] """ - Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`. + Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `elements`. """ custom_text: NotRequired["PaymentLinkUpdateParamsCustomText"] """ - Display additional text for your customers using custom text. You can't set this parameter if `ui_mode` is `custom`. + Display additional text for your customers using custom text. You can't set this parameter if `ui_mode` is `elements`. """ customer_creation: NotRequired["Literal['always', 'if_required']|str"] """ @@ -113,7 +113,7 @@ class PaymentLinkUpdateParams(TypedDict): Payment-method-specific configuration. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" + "Literal['']|List[Union[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'satispay', 'sepa_debit', 'sequra', 'shopeepay', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). @@ -991,6 +991,10 @@ class PaymentLinkUpdateParamsSubscriptionDataTrialSettings(TypedDict): class PaymentLinkUpdateParamsSubscriptionDataTrialSettingsEndBehavior( TypedDict, ): + billing_cycle_anchor: NotRequired["Literal['now', 'unchanged']|str"] + """ + Indicates how the subscription's billing cycle anchor is reset when a trial ends. Defaults to `now`. + """ missing_payment_method: Union[ Literal["cancel", "create_invoice", "pause"], str ] @@ -1006,7 +1010,7 @@ class PaymentLinkUpdateParamsTaxIdCollection(TypedDict): """ required: NotRequired["Literal['if_supported', 'never']|str"] """ - Describes whether a tax ID is required during checkout. Defaults to `never`. You can't set this parameter if `ui_mode` is `custom`. + Describes whether a tax ID is required during checkout. Defaults to `never`. You can't set this parameter if `ui_mode` is `elements`. """ diff --git a/stripe/params/_payment_method_configuration_create_params.py b/stripe/params/_payment_method_configuration_create_params.py index f3294abfb..3f4e3630d 100644 --- a/stripe/params/_payment_method_configuration_create_params.py +++ b/stripe/params/_payment_method_configuration_create_params.py @@ -262,6 +262,10 @@ class PaymentMethodConfigurationCreateParams(RequestOptions): """ The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://docs.stripe.com/payments/sepa-debit) for more details. """ + sequra: NotRequired["PaymentMethodConfigurationCreateParamsSequra"] + """ + SeQura is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers customers payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with SeQura, then return to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. + """ shopeepay: NotRequired["PaymentMethodConfigurationCreateParamsShopeepay"] """ ShopeePay is a [single use](https://docs.stripe.com/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. @@ -1260,6 +1264,22 @@ class PaymentMethodConfigurationCreateParamsSepaDebitDisplayPreference( """ +class PaymentMethodConfigurationCreateParamsSequra(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsSequraDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsSequraDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationCreateParamsShopeepay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationCreateParamsShopeepayDisplayPreference" diff --git a/stripe/params/_payment_method_configuration_modify_params.py b/stripe/params/_payment_method_configuration_modify_params.py index cd9bee92f..cba3f01fb 100644 --- a/stripe/params/_payment_method_configuration_modify_params.py +++ b/stripe/params/_payment_method_configuration_modify_params.py @@ -262,6 +262,10 @@ class PaymentMethodConfigurationModifyParams(RequestOptions): """ The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://docs.stripe.com/payments/sepa-debit) for more details. """ + sequra: NotRequired["PaymentMethodConfigurationModifyParamsSequra"] + """ + SeQura is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers customers payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with SeQura, then return to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. + """ shopeepay: NotRequired["PaymentMethodConfigurationModifyParamsShopeepay"] """ ShopeePay is a [single use](https://docs.stripe.com/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. @@ -1260,6 +1264,22 @@ class PaymentMethodConfigurationModifyParamsSepaDebitDisplayPreference( """ +class PaymentMethodConfigurationModifyParamsSequra(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsSequraDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsSequraDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationModifyParamsShopeepay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationModifyParamsShopeepayDisplayPreference" diff --git a/stripe/params/_payment_method_configuration_update_params.py b/stripe/params/_payment_method_configuration_update_params.py index f0e44e79f..32e38a767 100644 --- a/stripe/params/_payment_method_configuration_update_params.py +++ b/stripe/params/_payment_method_configuration_update_params.py @@ -261,6 +261,10 @@ class PaymentMethodConfigurationUpdateParams(TypedDict): """ The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://docs.stripe.com/payments/sepa-debit) for more details. """ + sequra: NotRequired["PaymentMethodConfigurationUpdateParamsSequra"] + """ + SeQura is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers customers payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with SeQura, then return to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. + """ shopeepay: NotRequired["PaymentMethodConfigurationUpdateParamsShopeepay"] """ ShopeePay is a [single use](https://docs.stripe.com/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. @@ -1259,6 +1263,22 @@ class PaymentMethodConfigurationUpdateParamsSepaDebitDisplayPreference( """ +class PaymentMethodConfigurationUpdateParamsSequra(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsSequraDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsSequraDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationUpdateParamsShopeepay(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationUpdateParamsShopeepayDisplayPreference" diff --git a/stripe/params/_payment_method_create_params.py b/stripe/params/_payment_method_create_params.py index 78b4eacfc..0d51490ca 100644 --- a/stripe/params/_payment_method_create_params.py +++ b/stripe/params/_payment_method_create_params.py @@ -253,6 +253,10 @@ class PaymentMethodCreateParams(RequestOptions): """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. """ + sequra: NotRequired["PaymentMethodCreateParamsSequra"] + """ + If this is a SeQura PaymentMethod, this hash contains details about the SeQura payment method. + """ shopeepay: NotRequired["PaymentMethodCreateParamsShopeepay"] """ If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. @@ -777,6 +781,10 @@ class PaymentMethodCreateParamsSepaDebit(TypedDict): """ +class PaymentMethodCreateParamsSequra(TypedDict): + pass + + class PaymentMethodCreateParamsShopeepay(TypedDict): pass diff --git a/stripe/params/_payment_method_modify_params.py b/stripe/params/_payment_method_modify_params.py index 0ea1fa8ac..d356b41ba 100644 --- a/stripe/params/_payment_method_modify_params.py +++ b/stripe/params/_payment_method_modify_params.py @@ -35,10 +35,6 @@ class PaymentMethodModifyParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ - payto: NotRequired["PaymentMethodModifyParamsPayto"] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ us_bank_account: NotRequired["PaymentMethodModifyParamsUsBankAccount"] """ If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. @@ -132,21 +128,6 @@ class PaymentMethodModifyParamsCustom(TypedDict): """ -class PaymentMethodModifyParamsPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class PaymentMethodModifyParamsUsBankAccount(TypedDict): account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ diff --git a/stripe/params/_payment_method_update_params.py b/stripe/params/_payment_method_update_params.py index 4867ebd10..763647639 100644 --- a/stripe/params/_payment_method_update_params.py +++ b/stripe/params/_payment_method_update_params.py @@ -34,10 +34,6 @@ class PaymentMethodUpdateParams(TypedDict): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ - payto: NotRequired["PaymentMethodUpdateParamsPayto"] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ us_bank_account: NotRequired["PaymentMethodUpdateParamsUsBankAccount"] """ If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. @@ -131,21 +127,6 @@ class PaymentMethodUpdateParamsCustom(TypedDict): """ -class PaymentMethodUpdateParamsPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class PaymentMethodUpdateParamsUsBankAccount(TypedDict): account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ diff --git a/stripe/params/_payment_record_report_payment_attempt_canceled_params.py b/stripe/params/_payment_record_report_payment_attempt_canceled_params.py index 1d2da1a80..c50a2b151 100644 --- a/stripe/params/_payment_record_report_payment_attempt_canceled_params.py +++ b/stripe/params/_payment_record_report_payment_attempt_canceled_params.py @@ -26,7 +26,7 @@ class PaymentRecordReportPaymentAttemptCanceledParams(RequestOptions): Payment evaluations associated with this reported payment. """ reason: NotRequired[ - "Literal['blocked_for_fraud', 'merchant_canceled']|str" + "Literal['blocked_for_fraud', 'merchant_canceled', 'rerouted']|str" ] """ The reason the payment attempt was canceled. diff --git a/stripe/params/_payment_record_report_payment_attempt_informational_params.py b/stripe/params/_payment_record_report_payment_attempt_informational_params.py index 8e2b9efe1..e868b0926 100644 --- a/stripe/params/_payment_record_report_payment_attempt_informational_params.py +++ b/stripe/params/_payment_record_report_payment_attempt_informational_params.py @@ -44,7 +44,7 @@ class PaymentRecordReportPaymentAttemptInformationalParamsCustomerDetails( """ email: NotRequired[str] """ - The customer's phone number. + The customer's email address. """ name: NotRequired[str] """ diff --git a/stripe/params/_payment_record_report_payment_attempt_params.py b/stripe/params/_payment_record_report_payment_attempt_params.py index c90b686d3..901abd239 100644 --- a/stripe/params/_payment_record_report_payment_attempt_params.py +++ b/stripe/params/_payment_record_report_payment_attempt_params.py @@ -39,7 +39,7 @@ class PaymentRecordReportPaymentAttemptParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ - outcome: NotRequired["Literal['failed', 'guaranteed']|str"] + outcome: NotRequired["Literal['canceled', 'failed', 'guaranteed']|str"] """ The outcome of the reported payment. """ @@ -67,7 +67,7 @@ class PaymentRecordReportPaymentAttemptParamsCanceled(TypedDict): Payment evaluations associated with this reported payment. """ reason: NotRequired[ - "Literal['blocked_for_fraud', 'merchant_canceled']|str" + "Literal['blocked_for_fraud', 'merchant_canceled', 'rerouted']|str" ] """ The reason the payment attempt was canceled. diff --git a/stripe/params/_payment_record_report_payment_params.py b/stripe/params/_payment_record_report_payment_params.py index c75c69972..71eb355f4 100644 --- a/stripe/params/_payment_record_report_payment_params.py +++ b/stripe/params/_payment_record_report_payment_params.py @@ -51,7 +51,7 @@ class PaymentRecordReportPaymentParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ - outcome: NotRequired["Literal['failed', 'guaranteed']|str"] + outcome: NotRequired["Literal['canceled', 'failed', 'guaranteed']|str"] """ The outcome of the reported payment. """ @@ -96,7 +96,7 @@ class PaymentRecordReportPaymentParamsCanceled(TypedDict): Payment evaluations associated with this reported payment. """ reason: NotRequired[ - "Literal['blocked_for_fraud', 'merchant_canceled']|str" + "Literal['blocked_for_fraud', 'merchant_canceled', 'rerouted']|str" ] """ The reason the payment attempt was canceled. @@ -110,7 +110,7 @@ class PaymentRecordReportPaymentParamsCustomerDetails(TypedDict): """ email: NotRequired[str] """ - The customer's phone number. + The customer's email address. """ name: NotRequired[str] """ diff --git a/stripe/params/_plan_create_params.py b/stripe/params/_plan_create_params.py index cdf68a865..98b7c252c 100644 --- a/stripe/params/_plan_create_params.py +++ b/stripe/params/_plan_create_params.py @@ -34,7 +34,7 @@ class PlanCreateParams(RequestOptions): """ id: NotRequired[str] """ - An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. + An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can use the same plan ID in live mode and in your sandboxes. """ interval: Union[Literal["day", "month", "week", "year"], str] """ diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py index eaedba539..9e8c1b408 100644 --- a/stripe/params/_setup_intent_confirm_params.py +++ b/stripe/params/_setup_intent_confirm_params.py @@ -27,6 +27,7 @@ class SetupIntentConfirmParams(RequestOptions): "boleto", "capchase_pay", "card", + "card_present", "cashapp", "check_scan", "click_to_pay", @@ -47,6 +48,7 @@ class SetupIntentConfirmParams(RequestOptions): "grabpay", "id_bank_transfer", "ideal", + "interac_present", "kakao_pay", "klarna", "knet", @@ -474,6 +476,10 @@ class SetupIntentConfirmParamsPaymentMethodData(TypedDict): """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. """ + sequra: NotRequired["SetupIntentConfirmParamsPaymentMethodDataSequra"] + """ + If this is a SeQura PaymentMethod, this hash contains details about the SeQura payment method. + """ shared_payment_granted_token: NotRequired[str] """ ID of the SharedPaymentGrantedToken used to confirm this PaymentIntent. @@ -1035,6 +1041,10 @@ class SetupIntentConfirmParamsPaymentMethodDataSepaDebit(TypedDict): """ +class SetupIntentConfirmParamsPaymentMethodDataSequra(TypedDict): + pass + + class SetupIntentConfirmParamsPaymentMethodDataShopeepay(TypedDict): pass @@ -1155,6 +1165,10 @@ class SetupIntentConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `bizum` SetupIntent, this sub-hash contains details about the Bizum payment method options. """ + blik: NotRequired["SetupIntentConfirmParamsPaymentMethodOptionsBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ card: NotRequired["SetupIntentConfirmParamsPaymentMethodOptionsCard"] """ Configuration for any card setup attempted on this SetupIntent. @@ -1288,6 +1302,28 @@ class SetupIntentConfirmParamsPaymentMethodOptionsBizum(TypedDict): pass +class SetupIntentConfirmParamsPaymentMethodOptionsBlik(TypedDict): + code: NotRequired[str] + """ + The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + """ + mandate_options: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsBlikMandateOptions" + ] + """ + Details of the BLIK mandate + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsBlikMandateOptions( + TypedDict +): + expires_at: NotRequired[int] + """ + Expiry date of the mandate. + """ + + class SetupIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntentConfirmParamsPaymentMethodOptionsCardMandateOptions" @@ -1313,6 +1349,12 @@ class SetupIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): """ 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. If not provided, this value defaults to `automatic`. 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. """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ three_d_secure: NotRequired[ "SetupIntentConfirmParamsPaymentMethodOptionsCardThreeDSecure" ] diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index 51011c5d4..11bbcf604 100644 --- a/stripe/params/_setup_intent_create_params.py +++ b/stripe/params/_setup_intent_create_params.py @@ -27,6 +27,7 @@ class SetupIntentCreateParams(RequestOptions): "boleto", "capchase_pay", "card", + "card_present", "cashapp", "check_scan", "click_to_pay", @@ -47,6 +48,7 @@ class SetupIntentCreateParams(RequestOptions): "grabpay", "id_bank_transfer", "ideal", + "interac_present", "kakao_pay", "klarna", "knet", @@ -618,6 +620,10 @@ class SetupIntentCreateParamsPaymentMethodData(TypedDict): """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. """ + sequra: NotRequired["SetupIntentCreateParamsPaymentMethodDataSequra"] + """ + If this is a SeQura PaymentMethod, this hash contains details about the SeQura payment method. + """ shared_payment_granted_token: NotRequired[str] """ ID of the SharedPaymentGrantedToken used to confirm this PaymentIntent. @@ -1175,6 +1181,10 @@ class SetupIntentCreateParamsPaymentMethodDataSepaDebit(TypedDict): """ +class SetupIntentCreateParamsPaymentMethodDataSequra(TypedDict): + pass + + class SetupIntentCreateParamsPaymentMethodDataShopeepay(TypedDict): pass @@ -1295,6 +1305,10 @@ class SetupIntentCreateParamsPaymentMethodOptions(TypedDict): """ If this is a `bizum` SetupIntent, this sub-hash contains details about the Bizum payment method options. """ + blik: NotRequired["SetupIntentCreateParamsPaymentMethodOptionsBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ card: NotRequired["SetupIntentCreateParamsPaymentMethodOptionsCard"] """ Configuration for any card setup attempted on this SetupIntent. @@ -1428,6 +1442,26 @@ class SetupIntentCreateParamsPaymentMethodOptionsBizum(TypedDict): pass +class SetupIntentCreateParamsPaymentMethodOptionsBlik(TypedDict): + code: NotRequired[str] + """ + The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + """ + mandate_options: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsBlikMandateOptions" + ] + """ + Details of the BLIK mandate + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsBlikMandateOptions(TypedDict): + expires_at: NotRequired[int] + """ + Expiry date of the mandate. + """ + + class SetupIntentCreateParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntentCreateParamsPaymentMethodOptionsCardMandateOptions" @@ -1453,6 +1487,12 @@ class SetupIntentCreateParamsPaymentMethodOptionsCard(TypedDict): """ 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. If not provided, this value defaults to `automatic`. 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. """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ three_d_secure: NotRequired[ "SetupIntentCreateParamsPaymentMethodOptionsCardThreeDSecure" ] diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index 59b52a8e6..5143c5b4d 100644 --- a/stripe/params/_setup_intent_modify_params.py +++ b/stripe/params/_setup_intent_modify_params.py @@ -8,7 +8,7 @@ class SetupIntentModifyParams(RequestOptions): allowed_payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boku_promptpay', 'boleto', 'capchase_pay', 'card', 'cashapp', 'check_scan', 'click_to_pay', 'crypto', 'customer_balance', 'demo_pay', 'duitnow', 'dummy_auth_push', 'dummy_passthrough_card', 'edenred', 'eps', 'fpx', 'gcash', 'getbalance', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'knet', 'konbini', 'kr_card', 'kr_market', 'kriya', 'link', 'mb_way', 'mobilepay', 'momo', 'mondu', 'multibanco', 'naver_pay', 'netbanking', 'ng_bank', 'ng_bank_transfer', 'ng_card', 'ng_market', 'ng_ussd', 'ng_wallet', 'nz_bank_account', 'octopus', 'oxxo', 'p24', 'paper_check', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shop_pay', 'shopeepay', 'sofort', 'south_korea_market', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'test_pay', 'touch_n_go', 'truemoney', 'twint', 'upi', 'us_bank_account', 'us_cash_voucher', 'vipps', 'wechat_pay', 'wero', 'zip'], str]]" + "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boku_promptpay', 'boleto', 'capchase_pay', 'card', 'card_present', 'cashapp', 'check_scan', 'click_to_pay', 'crypto', 'customer_balance', 'demo_pay', 'duitnow', 'dummy_auth_push', 'dummy_passthrough_card', 'edenred', 'eps', 'fpx', 'gcash', 'getbalance', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'interac_present', 'kakao_pay', 'klarna', 'knet', 'konbini', 'kr_card', 'kr_market', 'kriya', 'link', 'mb_way', 'mobilepay', 'momo', 'mondu', 'multibanco', 'naver_pay', 'netbanking', 'ng_bank', 'ng_bank_transfer', 'ng_card', 'ng_market', 'ng_ussd', 'ng_wallet', 'nz_bank_account', 'octopus', 'oxxo', 'p24', 'paper_check', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shop_pay', 'shopeepay', 'sofort', 'south_korea_market', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'test_pay', 'touch_n_go', 'truemoney', 'twint', 'upi', 'us_bank_account', 'us_cash_voucher', 'vipps', 'wechat_pay', 'wero', 'zip'], str]]" ] """ The list of payment method types to allow for this SetupIntent. Stripe will only use methods in this list when determining the payment methods to offer. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). @@ -347,6 +347,10 @@ class SetupIntentModifyParamsPaymentMethodData(TypedDict): """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. """ + sequra: NotRequired["SetupIntentModifyParamsPaymentMethodDataSequra"] + """ + If this is a SeQura PaymentMethod, this hash contains details about the SeQura payment method. + """ shared_payment_granted_token: NotRequired[str] """ ID of the SharedPaymentGrantedToken used to confirm this PaymentIntent. @@ -904,6 +908,10 @@ class SetupIntentModifyParamsPaymentMethodDataSepaDebit(TypedDict): """ +class SetupIntentModifyParamsPaymentMethodDataSequra(TypedDict): + pass + + class SetupIntentModifyParamsPaymentMethodDataShopeepay(TypedDict): pass @@ -1024,6 +1032,10 @@ class SetupIntentModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `bizum` SetupIntent, this sub-hash contains details about the Bizum payment method options. """ + blik: NotRequired["SetupIntentModifyParamsPaymentMethodOptionsBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ card: NotRequired["SetupIntentModifyParamsPaymentMethodOptionsCard"] """ Configuration for any card setup attempted on this SetupIntent. @@ -1157,6 +1169,26 @@ class SetupIntentModifyParamsPaymentMethodOptionsBizum(TypedDict): pass +class SetupIntentModifyParamsPaymentMethodOptionsBlik(TypedDict): + code: NotRequired[str] + """ + The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + """ + mandate_options: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsBlikMandateOptions" + ] + """ + Details of the BLIK mandate + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsBlikMandateOptions(TypedDict): + expires_at: NotRequired[int] + """ + Expiry date of the mandate. + """ + + class SetupIntentModifyParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntentModifyParamsPaymentMethodOptionsCardMandateOptions" @@ -1182,6 +1214,12 @@ class SetupIntentModifyParamsPaymentMethodOptionsCard(TypedDict): """ 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. If not provided, this value defaults to `automatic`. 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. """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ three_d_secure: NotRequired[ "SetupIntentModifyParamsPaymentMethodOptionsCardThreeDSecure" ] diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index 071fbefdf..2d9c78562 100644 --- a/stripe/params/_setup_intent_update_params.py +++ b/stripe/params/_setup_intent_update_params.py @@ -7,7 +7,7 @@ class SetupIntentUpdateParams(TypedDict): allowed_payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boku_promptpay', 'boleto', 'capchase_pay', 'card', 'cashapp', 'check_scan', 'click_to_pay', 'crypto', 'customer_balance', 'demo_pay', 'duitnow', 'dummy_auth_push', 'dummy_passthrough_card', 'edenred', 'eps', 'fpx', 'gcash', 'getbalance', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'knet', 'konbini', 'kr_card', 'kr_market', 'kriya', 'link', 'mb_way', 'mobilepay', 'momo', 'mondu', 'multibanco', 'naver_pay', 'netbanking', 'ng_bank', 'ng_bank_transfer', 'ng_card', 'ng_market', 'ng_ussd', 'ng_wallet', 'nz_bank_account', 'octopus', 'oxxo', 'p24', 'paper_check', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shop_pay', 'shopeepay', 'sofort', 'south_korea_market', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'test_pay', 'touch_n_go', 'truemoney', 'twint', 'upi', 'us_bank_account', 'us_cash_voucher', 'vipps', 'wechat_pay', 'wero', 'zip'], str]]" + "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boku_promptpay', 'boleto', 'capchase_pay', 'card', 'card_present', 'cashapp', 'check_scan', 'click_to_pay', 'crypto', 'customer_balance', 'demo_pay', 'duitnow', 'dummy_auth_push', 'dummy_passthrough_card', 'edenred', 'eps', 'fpx', 'gcash', 'getbalance', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'interac_present', 'kakao_pay', 'klarna', 'knet', 'konbini', 'kr_card', 'kr_market', 'kriya', 'link', 'mb_way', 'mobilepay', 'momo', 'mondu', 'multibanco', 'naver_pay', 'netbanking', 'ng_bank', 'ng_bank_transfer', 'ng_card', 'ng_market', 'ng_ussd', 'ng_wallet', 'nz_bank_account', 'octopus', 'oxxo', 'p24', 'paper_check', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shop_pay', 'shopeepay', 'sofort', 'south_korea_market', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'test_pay', 'touch_n_go', 'truemoney', 'twint', 'upi', 'us_bank_account', 'us_cash_voucher', 'vipps', 'wechat_pay', 'wero', 'zip'], str]]" ] """ The list of payment method types to allow for this SetupIntent. Stripe will only use methods in this list when determining the payment methods to offer. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). @@ -346,6 +346,10 @@ class SetupIntentUpdateParamsPaymentMethodData(TypedDict): """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. """ + sequra: NotRequired["SetupIntentUpdateParamsPaymentMethodDataSequra"] + """ + If this is a SeQura PaymentMethod, this hash contains details about the SeQura payment method. + """ shared_payment_granted_token: NotRequired[str] """ ID of the SharedPaymentGrantedToken used to confirm this PaymentIntent. @@ -903,6 +907,10 @@ class SetupIntentUpdateParamsPaymentMethodDataSepaDebit(TypedDict): """ +class SetupIntentUpdateParamsPaymentMethodDataSequra(TypedDict): + pass + + class SetupIntentUpdateParamsPaymentMethodDataShopeepay(TypedDict): pass @@ -1023,6 +1031,10 @@ class SetupIntentUpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `bizum` SetupIntent, this sub-hash contains details about the Bizum payment method options. """ + blik: NotRequired["SetupIntentUpdateParamsPaymentMethodOptionsBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ card: NotRequired["SetupIntentUpdateParamsPaymentMethodOptionsCard"] """ Configuration for any card setup attempted on this SetupIntent. @@ -1156,6 +1168,26 @@ class SetupIntentUpdateParamsPaymentMethodOptionsBizum(TypedDict): pass +class SetupIntentUpdateParamsPaymentMethodOptionsBlik(TypedDict): + code: NotRequired[str] + """ + The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + """ + mandate_options: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsBlikMandateOptions" + ] + """ + Details of the BLIK mandate + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsBlikMandateOptions(TypedDict): + expires_at: NotRequired[int] + """ + Expiry date of the mandate. + """ + + class SetupIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): mandate_options: NotRequired[ "SetupIntentUpdateParamsPaymentMethodOptionsCardMandateOptions" @@ -1181,6 +1213,12 @@ class SetupIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): """ 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. If not provided, this value defaults to `automatic`. 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. """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ three_d_secure: NotRequired[ "SetupIntentUpdateParamsPaymentMethodOptionsCardThreeDSecure" ] diff --git a/stripe/params/_subscription_create_params.py b/stripe/params/_subscription_create_params.py index 9b80190df..474436db1 100644 --- a/stripe/params/_subscription_create_params.py +++ b/stripe/params/_subscription_create_params.py @@ -168,15 +168,15 @@ class SubscriptionCreateParams(RequestOptions): """ trial_end: NotRequired["Literal['now']|int"] """ - Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://docs.stripe.com/billing/subscriptions/trials) to learn more. + Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://docs.stripe.com/billing/subscriptions/trials/free-trials) to learn more. """ trial_from_plan: NotRequired[bool] """ - 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) to learn more. + 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. """ trial_period_days: NotRequired[int] """ - Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://docs.stripe.com/billing/subscriptions/trials) to learn more. + Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://docs.stripe.com/billing/subscriptions/trials/free-trials) to learn more. """ trial_settings: NotRequired["SubscriptionCreateParamsTrialSettings"] """ @@ -1121,7 +1121,7 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlik( class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions( TypedDict, ): - expires_after: NotRequired[int] + expires_at: NotRequired[int] """ Date when the mandate expires and no further payments will be charged. If not provided, the mandate will be set to be indefinite. """ @@ -1456,8 +1456,8 @@ class SubscriptionCreateParamsTrialSettingsEndBehavior(TypedDict): """ Indicates how the subscription's billing cycle anchor is reset when a trial ends. Defaults to `now`. """ - missing_payment_method: Union[ - Literal["cancel", "create_invoice", "pause"], str + missing_payment_method: NotRequired[ + "Literal['cancel', 'create_invoice', 'pause']|str" ] """ Indicates how the subscription should change when the trial ends if the user did not provide a payment method. diff --git a/stripe/params/_subscription_modify_params.py b/stripe/params/_subscription_modify_params.py index cc0faafd3..28a1f3d47 100644 --- a/stripe/params/_subscription_modify_params.py +++ b/stripe/params/_subscription_modify_params.py @@ -26,9 +26,11 @@ class SubscriptionModifyParams(RequestOptions): """ 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["Literal['now', 'unchanged']|str"] + billing_cycle_anchor: NotRequired[ + "SubscriptionModifyParamsBillingCycleAnchor" + ] """ - Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle). + Controls how the subscription's billing cycle anchor changes. Set `type` to `now` to reset the billing cycle anchor to the current time (in UTC), or `unchanged` to preserve it. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle). """ billing_schedules: NotRequired[ "Literal['']|List[SubscriptionModifyParamsBillingSchedule]" @@ -168,7 +170,7 @@ class SubscriptionModifyParams(RequestOptions): """ trial_from_plan: NotRequired[bool] """ - 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) to learn more. + 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. """ trial_settings: NotRequired["SubscriptionModifyParamsTrialSettings"] """ @@ -344,6 +346,17 @@ class SubscriptionModifyParamsAutomaticTaxLiability(TypedDict): """ +class SubscriptionModifyParamsBillingCycleAnchor(TypedDict): + timestamp: NotRequired[int] + """ + A Unix timestamp within the inclusive bounds of the subscription's current billing period. For subscriptions with multiple items, it must fall within the intersection of their current billing periods. Only valid when `type` is `timestamp`. + """ + type: Union[Literal["now", "timestamp", "unchanged"], str] + """ + Determines how the billing cycle anchor changes when the subscription is updated. + """ + + class SubscriptionModifyParamsBillingSchedule(TypedDict): applies_to: NotRequired[ List["SubscriptionModifyParamsBillingScheduleAppliesTo"] @@ -1101,7 +1114,7 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlik( class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions( TypedDict, ): - expires_after: NotRequired[int] + expires_at: NotRequired[int] """ Date when the mandate expires and no further payments will be charged. If not provided, the mandate will be set to be indefinite. """ @@ -1436,8 +1449,8 @@ class SubscriptionModifyParamsTrialSettingsEndBehavior(TypedDict): """ Indicates how the subscription's billing cycle anchor is reset when a trial ends. Defaults to `now`. """ - missing_payment_method: Union[ - Literal["cancel", "create_invoice", "pause"], str + missing_payment_method: NotRequired[ + "Literal['cancel', 'create_invoice', 'pause']|str" ] """ Indicates how the subscription should change when the trial ends if the user did not provide a payment method. diff --git a/stripe/params/_subscription_resume_params.py b/stripe/params/_subscription_resume_params.py index 49c365aca..73a38e1f9 100644 --- a/stripe/params/_subscription_resume_params.py +++ b/stripe/params/_subscription_resume_params.py @@ -1,12 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List -from typing_extensions import Literal, NotRequired +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict class SubscriptionResumeParams(RequestOptions): - billing_cycle_anchor: NotRequired["Literal['now', 'unchanged']|str"] + billing_cycle_anchor: NotRequired[ + "SubscriptionResumeParamsBillingCycleAnchor" + ] """ The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle). """ @@ -30,3 +32,14 @@ class SubscriptionResumeParams(RequestOptions): """ If set, prorations will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint. """ + + +class SubscriptionResumeParamsBillingCycleAnchor(TypedDict): + timestamp: NotRequired[int] + """ + A Unix timestamp within the inclusive bounds of the subscription's current billing period. For subscriptions with multiple items, it must fall within the intersection of their current billing periods. Only valid when `type` is `timestamp`. + """ + type: Union[Literal["now", "timestamp", "unchanged"], str] + """ + Determines how the billing cycle anchor changes when the subscription resumes. + """ diff --git a/stripe/params/_subscription_schedule_create_params.py b/stripe/params/_subscription_schedule_create_params.py index e00245d2e..e46a8ad36 100644 --- a/stripe/params/_subscription_schedule_create_params.py +++ b/stripe/params/_subscription_schedule_create_params.py @@ -367,7 +367,7 @@ class SubscriptionScheduleCreateParamsPauseSchedulePauseSettings(TypedDict): "Literal['invoice', 'pending_invoice_item']|str" ] """ - Determines whether to generate an invoice for outstanding amounts when pausing. + Determines whether to generate an invoice for outstanding amounts when pausing. When adding a pause schedule, defaults to `pending_invoice_item`. On updates, the existing value is preserved if not provided. """ type: NotRequired["Literal['subscription']|str"] """ @@ -397,7 +397,7 @@ class SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillForOutstandi ): type: NotRequired["Literal['none', 'pause_at']|str"] """ - Determines whether to collect metered usage accrued up to the pause date. + Determines whether to collect metered usage accrued up to the pause date. When adding a pause schedule, defaults to `pause_at`. On updates, the existing value is preserved if not provided. """ @@ -408,7 +408,7 @@ class SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillForUnusedTim "Literal['item_current_period_start', 'none', 'pause_at']|str" ] """ - Determines which point in the billing period unused time is credited from. + Determines which point in the billing period unused time is credited from. When adding a pause schedule, defaults to `pause_at`. On updates, the existing value is preserved if not provided. """ @@ -458,19 +458,19 @@ class SubscriptionScheduleCreateParamsPauseScheduleResumeResumeAtDuration( class SubscriptionScheduleCreateParamsPauseScheduleResumeSettings(TypedDict): billing_cycle_anchor: NotRequired["Literal['resume_at', 'unchanged']|str"] """ - Controls the billing cycle anchor when the subscription resumes. + Controls the billing cycle anchor when the subscription resumes. When adding a pause schedule, defaults to `resume_at`. On updates, the existing value is preserved if not provided. """ payment_behavior: NotRequired[ "Literal['resume_on_payment_attempt', 'resume_on_payment_success']|str" ] """ - Controls whether Stripe attempts payment on the resumption invoice and how payment affects the subscription's status. The default is `resume_on_payment_success`. + Controls whether Stripe attempts payment on the resumption invoice and how payment affects the subscription's status. When adding a pause schedule, defaults to `resume_on_payment_success`. On updates, the existing value is preserved if not provided. """ proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ - Determines how to handle prorations when the subscription resumes. The default is `create_prorations`. + Determines how to handle prorations when the subscription resumes. When adding a pause schedule, defaults to `create_prorations`. On updates, the existing value is preserved if not provided. """ diff --git a/stripe/params/_subscription_schedule_modify_params.py b/stripe/params/_subscription_schedule_modify_params.py index 83c822fe7..1d77d377d 100644 --- a/stripe/params/_subscription_schedule_modify_params.py +++ b/stripe/params/_subscription_schedule_modify_params.py @@ -339,7 +339,7 @@ class SubscriptionScheduleModifyParamsPauseSchedulePauseSettings(TypedDict): "Literal['invoice', 'pending_invoice_item']|str" ] """ - Determines whether to generate an invoice for outstanding amounts when pausing. + Determines whether to generate an invoice for outstanding amounts when pausing. When adding a pause schedule, defaults to `pending_invoice_item`. On updates, the existing value is preserved if not provided. """ type: NotRequired["Literal['subscription']|str"] """ @@ -369,7 +369,7 @@ class SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillForOutstandi ): type: NotRequired["Literal['none', 'pause_at']|str"] """ - Determines whether to collect metered usage accrued up to the pause date. + Determines whether to collect metered usage accrued up to the pause date. When adding a pause schedule, defaults to `pause_at`. On updates, the existing value is preserved if not provided. """ @@ -380,7 +380,7 @@ class SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillForUnusedTim "Literal['item_current_period_start', 'none', 'pause_at']|str" ] """ - Determines which point in the billing period unused time is credited from. + Determines which point in the billing period unused time is credited from. When adding a pause schedule, defaults to `pause_at`. On updates, the existing value is preserved if not provided. """ @@ -432,19 +432,19 @@ class SubscriptionScheduleModifyParamsPauseScheduleResumeResumeAtDuration( class SubscriptionScheduleModifyParamsPauseScheduleResumeSettings(TypedDict): billing_cycle_anchor: NotRequired["Literal['resume_at', 'unchanged']|str"] """ - Controls the billing cycle anchor when the subscription resumes. + Controls the billing cycle anchor when the subscription resumes. When adding a pause schedule, defaults to `resume_at`. On updates, the existing value is preserved if not provided. """ payment_behavior: NotRequired[ "Literal['resume_on_payment_attempt', 'resume_on_payment_success']|str" ] """ - Controls whether Stripe attempts payment on the resumption invoice and how payment affects the subscription's status. The default is `resume_on_payment_success`. + Controls whether Stripe attempts payment on the resumption invoice and how payment affects the subscription's status. When adding a pause schedule, defaults to `resume_on_payment_success`. On updates, the existing value is preserved if not provided. """ proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ - Determines how to handle prorations when the subscription resumes. The default is `create_prorations`. + Determines how to handle prorations when the subscription resumes. When adding a pause schedule, defaults to `create_prorations`. On updates, the existing value is preserved if not provided. """ diff --git a/stripe/params/_subscription_schedule_update_params.py b/stripe/params/_subscription_schedule_update_params.py index cd6149a66..d2bd1ca50 100644 --- a/stripe/params/_subscription_schedule_update_params.py +++ b/stripe/params/_subscription_schedule_update_params.py @@ -338,7 +338,7 @@ class SubscriptionScheduleUpdateParamsPauseSchedulePauseSettings(TypedDict): "Literal['invoice', 'pending_invoice_item']|str" ] """ - Determines whether to generate an invoice for outstanding amounts when pausing. + Determines whether to generate an invoice for outstanding amounts when pausing. When adding a pause schedule, defaults to `pending_invoice_item`. On updates, the existing value is preserved if not provided. """ type: NotRequired["Literal['subscription']|str"] """ @@ -368,7 +368,7 @@ class SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillForOutstandi ): type: NotRequired["Literal['none', 'pause_at']|str"] """ - Determines whether to collect metered usage accrued up to the pause date. + Determines whether to collect metered usage accrued up to the pause date. When adding a pause schedule, defaults to `pause_at`. On updates, the existing value is preserved if not provided. """ @@ -379,7 +379,7 @@ class SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillForUnusedTim "Literal['item_current_period_start', 'none', 'pause_at']|str" ] """ - Determines which point in the billing period unused time is credited from. + Determines which point in the billing period unused time is credited from. When adding a pause schedule, defaults to `pause_at`. On updates, the existing value is preserved if not provided. """ @@ -431,19 +431,19 @@ class SubscriptionScheduleUpdateParamsPauseScheduleResumeResumeAtDuration( class SubscriptionScheduleUpdateParamsPauseScheduleResumeSettings(TypedDict): billing_cycle_anchor: NotRequired["Literal['resume_at', 'unchanged']|str"] """ - Controls the billing cycle anchor when the subscription resumes. + Controls the billing cycle anchor when the subscription resumes. When adding a pause schedule, defaults to `resume_at`. On updates, the existing value is preserved if not provided. """ payment_behavior: NotRequired[ "Literal['resume_on_payment_attempt', 'resume_on_payment_success']|str" ] """ - Controls whether Stripe attempts payment on the resumption invoice and how payment affects the subscription's status. The default is `resume_on_payment_success`. + Controls whether Stripe attempts payment on the resumption invoice and how payment affects the subscription's status. When adding a pause schedule, defaults to `resume_on_payment_success`. On updates, the existing value is preserved if not provided. """ proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ - Determines how to handle prorations when the subscription resumes. The default is `create_prorations`. + Determines how to handle prorations when the subscription resumes. When adding a pause schedule, defaults to `create_prorations`. On updates, the existing value is preserved if not provided. """ diff --git a/stripe/params/_subscription_update_params.py b/stripe/params/_subscription_update_params.py index e60f1205e..c43598848 100644 --- a/stripe/params/_subscription_update_params.py +++ b/stripe/params/_subscription_update_params.py @@ -25,9 +25,11 @@ class SubscriptionUpdateParams(TypedDict): """ 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["Literal['now', 'unchanged']|str"] + billing_cycle_anchor: NotRequired[ + "SubscriptionUpdateParamsBillingCycleAnchor" + ] """ - Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle). + Controls how the subscription's billing cycle anchor changes. Set `type` to `now` to reset the billing cycle anchor to the current time (in UTC), or `unchanged` to preserve it. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle). """ billing_schedules: NotRequired[ "Literal['']|List[SubscriptionUpdateParamsBillingSchedule]" @@ -167,7 +169,7 @@ class SubscriptionUpdateParams(TypedDict): """ trial_from_plan: NotRequired[bool] """ - 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) to learn more. + 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. """ trial_settings: NotRequired["SubscriptionUpdateParamsTrialSettings"] """ @@ -343,6 +345,17 @@ class SubscriptionUpdateParamsAutomaticTaxLiability(TypedDict): """ +class SubscriptionUpdateParamsBillingCycleAnchor(TypedDict): + timestamp: NotRequired[int] + """ + A Unix timestamp within the inclusive bounds of the subscription's current billing period. For subscriptions with multiple items, it must fall within the intersection of their current billing periods. Only valid when `type` is `timestamp`. + """ + type: Union[Literal["now", "timestamp", "unchanged"], str] + """ + Determines how the billing cycle anchor changes when the subscription is updated. + """ + + class SubscriptionUpdateParamsBillingSchedule(TypedDict): applies_to: NotRequired[ List["SubscriptionUpdateParamsBillingScheduleAppliesTo"] @@ -1100,7 +1113,7 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlik( class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions( TypedDict, ): - expires_after: NotRequired[int] + expires_at: NotRequired[int] """ Date when the mandate expires and no further payments will be charged. If not provided, the mandate will be set to be indefinite. """ @@ -1435,8 +1448,8 @@ class SubscriptionUpdateParamsTrialSettingsEndBehavior(TypedDict): """ Indicates how the subscription's billing cycle anchor is reset when a trial ends. Defaults to `now`. """ - missing_payment_method: Union[ - Literal["cancel", "create_invoice", "pause"], str + missing_payment_method: NotRequired[ + "Literal['cancel', 'create_invoice', 'pause']|str" ] """ Indicates how the subscription should change when the trial ends if the user did not provide a payment method. diff --git a/stripe/params/_tax_rate_create_params.py b/stripe/params/_tax_rate_create_params.py index fd468e032..2ca0e360c 100644 --- a/stripe/params/_tax_rate_create_params.py +++ b/stripe/params/_tax_rate_create_params.py @@ -48,7 +48,7 @@ class TaxRateCreateParams(RequestOptions): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'vat']|str" + "Literal['amusement_tax', 'communications_tax', 'digital_excise_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'utility_users_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_tax_rate_modify_params.py b/stripe/params/_tax_rate_modify_params.py index f80102138..d31f79dec 100644 --- a/stripe/params/_tax_rate_modify_params.py +++ b/stripe/params/_tax_rate_modify_params.py @@ -42,7 +42,7 @@ class TaxRateModifyParams(RequestOptions): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'vat']|str" + "Literal['amusement_tax', 'communications_tax', 'digital_excise_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'utility_users_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_tax_rate_update_params.py b/stripe/params/_tax_rate_update_params.py index 6b7fff635..5394fe4e6 100644 --- a/stripe/params/_tax_rate_update_params.py +++ b/stripe/params/_tax_rate_update_params.py @@ -41,7 +41,7 @@ class TaxRateUpdateParams(TypedDict): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'vat']|str" + "Literal['amusement_tax', 'communications_tax', 'digital_excise_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'utility_users_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_topup_create_params.py b/stripe/params/_topup_create_params.py index 930c37cd3..5c28bc286 100644 --- a/stripe/params/_topup_create_params.py +++ b/stripe/params/_topup_create_params.py @@ -41,7 +41,7 @@ class TopupCreateParams(RequestOptions): """ source: NotRequired[str] """ - The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://docs.stripe.com/connect/testing#testing-top-ups)). + The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. While testing, this can be a test bank token (see [Testing Top-ups](https://docs.stripe.com/connect/testing#testing-top-ups)). """ statement_descriptor: NotRequired[str] """ diff --git a/stripe/params/_webhook_endpoint_create_params.py b/stripe/params/_webhook_endpoint_create_params.py index 111b5d5de..d5de75116 100644 --- a/stripe/params/_webhook_endpoint_create_params.py +++ b/stripe/params/_webhook_endpoint_create_params.py @@ -136,6 +136,7 @@ class WebhookEndpointCreateParams(RequestOptions): "2026-06-24.dahlia", "2026-07-29.dahlia", "2026-08-26.dahlia", + "2026-09-30.endive", ] ] """ diff --git a/stripe/params/apps/__init__.py b/stripe/params/apps/__init__.py index dd5370ee8..a169a47af 100644 --- a/stripe/params/apps/__init__.py +++ b/stripe/params/apps/__init__.py @@ -4,6 +4,25 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: + from stripe.params.apps._install_create_params import ( + InstallCreateParams as InstallCreateParams, + ) + from stripe.params.apps._install_list_params import ( + InstallListParams as InstallListParams, + InstallListParamsCreated as InstallListParamsCreated, + ) + from stripe.params.apps._install_modify_params import ( + InstallModifyParams as InstallModifyParams, + ) + from stripe.params.apps._install_retrieve_params import ( + InstallRetrieveParams as InstallRetrieveParams, + ) + from stripe.params.apps._install_uninstall_params import ( + InstallUninstallParams as InstallUninstallParams, + ) + from stripe.params.apps._install_update_params import ( + InstallUpdateParams as InstallUpdateParams, + ) from stripe.params.apps._secret_create_params import ( SecretCreateParams as SecretCreateParams, SecretCreateParamsScope as SecretCreateParamsScope, @@ -23,6 +42,31 @@ # name -> (import_target, is_submodule) _import_map = { + "InstallCreateParams": ( + "stripe.params.apps._install_create_params", + False, + ), + "InstallListParams": ("stripe.params.apps._install_list_params", False), + "InstallListParamsCreated": ( + "stripe.params.apps._install_list_params", + False, + ), + "InstallModifyParams": ( + "stripe.params.apps._install_modify_params", + False, + ), + "InstallRetrieveParams": ( + "stripe.params.apps._install_retrieve_params", + False, + ), + "InstallUninstallParams": ( + "stripe.params.apps._install_uninstall_params", + False, + ), + "InstallUpdateParams": ( + "stripe.params.apps._install_update_params", + False, + ), "SecretCreateParams": ("stripe.params.apps._secret_create_params", False), "SecretCreateParamsScope": ( "stripe.params.apps._secret_create_params", diff --git a/stripe/params/apps/_install_create_params.py b/stripe/params/apps/_install_create_params.py new file mode 100644 index 000000000..0b029cd72 --- /dev/null +++ b/stripe/params/apps/_install_create_params.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import Literal, NotRequired + + +class InstallCreateParams(RequestOptions): + app: str + """ + The ID of the app to install. + """ + channel: NotRequired[ + "Literal['private_live', 'private_test', 'public', 'testing']|str" + ] + """ + The distribution channel to install from. Defaults to `public`, which only app developers and embedding platforms can use. An account installing its own private app must pass `private_test` or `private_live`, matching the mode of the API key. + """ + code_challenge: NotRequired[str] + """ + For OAuth apps, the PKCE code challenge used to issue the `auth_code` returned on the install. Must be 43 to 128 characters and contain only letters, numbers, `-`, `.`, `_`, and `~`. Only applies to installs made by the app developer or an embedding platform; ignored when an account installs its own private app. + """ + code_challenge_method: NotRequired[str] + """ + The method used to derive `code_challenge`. Required when `code_challenge` is provided, and must be `S256`. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/apps/_install_list_params.py b/stripe/params/apps/_install_list_params.py new file mode 100644 index 000000000..208db0fda --- /dev/null +++ b/stripe/params/apps/_install_list_params.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InstallListParams(RequestOptions): + account: NotRequired[str] + """ + Only return installs made by this account. Only useful to an app developer filtering by its own app with its own key, whose list spans the accounts that installed the app; other lists only accept the authenticated account. + """ + app: NotRequired[str] + """ + Only return installs for the app specified by this app ID. + """ + approval_required: NotRequired[bool] + """ + Only return installs whose installer must authorize pending permissions, content security policy entries, or endpoints. + """ + channel: NotRequired[ + "Literal['private_live', 'private_test', 'public', 'testing']|str" + ] + """ + Only return installs in the distribution channel specified by this channel name. + """ + created: NotRequired["InstallListParamsCreated|int"] + """ + Only return app installs that were created during the given date interval. + """ + created_by: NotRequired[str] + """ + Only return installs created by the embedding platform specified by this account ID. + """ + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ + status: NotRequired[ + "Literal['install_failed', 'installed', 'installing', 'uninstall_failed', 'uninstalling']|str" + ] + """ + Only return installs with the given status: `installed`, `installing`, `install_failed`, `uninstalling`, or `uninstall_failed`. + """ + + +class InstallListParamsCreated(TypedDict): + gt: NotRequired[int] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired[int] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired[int] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired[int] + """ + Maximum value to filter by (inclusive) + """ diff --git a/stripe/params/apps/_install_modify_params.py b/stripe/params/apps/_install_modify_params.py new file mode 100644 index 000000000..b2e10ef43 --- /dev/null +++ b/stripe/params/apps/_install_modify_params.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class InstallModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/apps/_install_retrieve_params.py b/stripe/params/apps/_install_retrieve_params.py new file mode 100644 index 000000000..ee3371f49 --- /dev/null +++ b/stripe/params/apps/_install_retrieve_params.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class InstallRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/apps/_install_uninstall_params.py b/stripe/params/apps/_install_uninstall_params.py new file mode 100644 index 000000000..e9a49f93f --- /dev/null +++ b/stripe/params/apps/_install_uninstall_params.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class InstallUninstallParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/apps/_install_update_params.py b/stripe/params/apps/_install_update_params.py new file mode 100644 index 000000000..bd02faf89 --- /dev/null +++ b/stripe/params/apps/_install_update_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class InstallUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing_portal/__init__.py b/stripe/params/billing_portal/__init__.py index aa6f1c82f..0ce9c5308 100644 --- a/stripe/params/billing_portal/__init__.py +++ b/stripe/params/billing_portal/__init__.py @@ -60,6 +60,8 @@ ) from stripe.params.billing_portal._session_create_params import ( SessionCreateParams as SessionCreateParams, + SessionCreateParamsAfterExpiration as SessionCreateParamsAfterExpiration, + SessionCreateParamsAfterExpirationCustomerLogin as SessionCreateParamsAfterExpirationCustomerLogin, SessionCreateParamsFlowData as SessionCreateParamsFlowData, SessionCreateParamsFlowDataAfterCompletion as SessionCreateParamsFlowDataAfterCompletion, SessionCreateParamsFlowDataAfterCompletionHostedConfirmation as SessionCreateParamsFlowDataAfterCompletionHostedConfirmation, @@ -256,6 +258,14 @@ "stripe.params.billing_portal._session_create_params", False, ), + "SessionCreateParamsAfterExpiration": ( + "stripe.params.billing_portal._session_create_params", + False, + ), + "SessionCreateParamsAfterExpirationCustomerLogin": ( + "stripe.params.billing_portal._session_create_params", + False, + ), "SessionCreateParamsFlowData": ( "stripe.params.billing_portal._session_create_params", False, diff --git a/stripe/params/billing_portal/_session_create_params.py b/stripe/params/billing_portal/_session_create_params.py index b1fe9177c..7b0c97f41 100644 --- a/stripe/params/billing_portal/_session_create_params.py +++ b/stripe/params/billing_portal/_session_create_params.py @@ -6,6 +6,10 @@ class SessionCreateParams(RequestOptions): + after_expiration: NotRequired["SessionCreateParamsAfterExpiration"] + """ + Behavior after the portal session expires. + """ configuration: NotRequired[str] """ The ID of an existing [configuration](https://docs.stripe.com/api/customer_portal/configurations) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. @@ -42,6 +46,26 @@ class SessionCreateParams(RequestOptions): """ +class SessionCreateParamsAfterExpiration(TypedDict): + customer_login: NotRequired[ + "SessionCreateParamsAfterExpirationCustomerLogin" + ] + """ + Configuration for authenticating the customer after the session expires. + """ + type: Union[Literal["customer_login"], str] + """ + The behavior to apply when the session expires. + """ + + +class SessionCreateParamsAfterExpirationCustomerLogin(TypedDict): + expires_at: NotRequired[int] + """ + The Unix timestamp after which the customer can no longer recover this session. Leave unset to allow recovery without a deadline. + """ + + class SessionCreateParamsFlowData(TypedDict): after_completion: NotRequired["SessionCreateParamsFlowDataAfterCompletion"] """ diff --git a/stripe/params/checkout/__init__.py b/stripe/params/checkout/__init__.py index 95e584338..ef8c63cde 100644 --- a/stripe/params/checkout/__init__.py +++ b/stripe/params/checkout/__init__.py @@ -137,6 +137,7 @@ SessionCreateParamsPaymentMethodOptionsScalapay as SessionCreateParamsPaymentMethodOptionsScalapay, SessionCreateParamsPaymentMethodOptionsSepaDebit as SessionCreateParamsPaymentMethodOptionsSepaDebit, SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions as SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions, + SessionCreateParamsPaymentMethodOptionsSequra as SessionCreateParamsPaymentMethodOptionsSequra, SessionCreateParamsPaymentMethodOptionsSofort as SessionCreateParamsPaymentMethodOptionsSofort, SessionCreateParamsPaymentMethodOptionsSunbit as SessionCreateParamsPaymentMethodOptionsSunbit, SessionCreateParamsPaymentMethodOptionsSwish as SessionCreateParamsPaymentMethodOptionsSwish, @@ -775,6 +776,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsPaymentMethodOptionsSequra": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsPaymentMethodOptionsSofort": ( "stripe.params.checkout._session_create_params", False, diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index 540bc6f94..ec60b4df9 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -20,6 +20,82 @@ class SessionCreateParams(RequestOptions): """ Enables user redeemable promotion codes. """ + allowed_payment_method_types: NotRequired[ + List[ + Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "shopeepay", + "sofort", + "sunbit", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, + ] + ] + ] + """ + A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. + + Unlike `payment_method_types`, this acts as a filter on the dynamically computed set of + eligible payment methods rather than an explicit static list. Only payment methods that + are both dynamically eligible and present in this list will be offered to the customer. + """ approval_method: NotRequired["Literal['auto', 'manual']|str"] """ Determines whether the customer's attempt to pay must be manually approved. @@ -64,7 +140,7 @@ class SessionCreateParams(RequestOptions): """ custom_fields: NotRequired[List["SessionCreateParamsCustomField"]] """ - Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`. + Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `elements`. """ custom_payment_method_types: NotRequired[List[str]] """ @@ -76,7 +152,7 @@ class SessionCreateParams(RequestOptions): """ custom_text: NotRequired["SessionCreateParamsCustomText"] """ - Display additional text for your customers using custom text. You can't set this parameter if `ui_mode` is `custom`. + Display additional text for your customers using custom text. You can't set this parameter if `ui_mode` is `elements`. """ customer: NotRequired[str] """ @@ -177,6 +253,7 @@ class SessionCreateParams(RequestOptions): "satispay", "scalapay", "sepa_debit", + "sequra", "shopeepay", "sofort", "sunbit", @@ -248,6 +325,10 @@ class SessionCreateParams(RequestOptions): If a [Customer](https://docs.stripe.com/api/customers) is created or provided, the names can be saved to the Customer object as well. """ + on_behalf_of: NotRequired[str] + """ + The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + """ optional_items: NotRequired[List["SessionCreateParamsOptionalItem"]] """ A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://docs.stripe.com/api/prices). @@ -293,91 +374,9 @@ class SessionCreateParams(RequestOptions): """ Payment-method-specific configuration. """ - payment_method_types: NotRequired[ - List[ - Union[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "sequra", - "shopeepay", - "sofort", - "sunbit", - "swish", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", - ], - str, - ] - ] - ] - """ - A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. - - You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). - See [Dynamic Payment Methods](https://docs.stripe.com/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details. - - Read more about the supported payment methods and their requirements in our [payment - method details guide](https://docs.stripe.com/docs/payments/checkout/payment-methods). - - If multiple payment methods are passed, Checkout will dynamically reorder them to - prioritize the most relevant payment methods based on the customer's location and - other characteristics. - """ permissions: NotRequired["SessionCreateParamsPermissions"] """ - This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. Can only be set when creating `embedded` or `custom` sessions. + This property is used to set up permissions for various actions (for example, update) on the CheckoutSession object. Can only be set when creating `embedded_page` or `elements` sessions. For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`. """ @@ -1173,6 +1172,10 @@ class SessionCreateParamsItemSubscriptionTrialSettings(TypedDict): class SessionCreateParamsItemSubscriptionTrialSettingsEndBehavior(TypedDict): + billing_cycle_anchor: NotRequired["Literal['now', 'unchanged']|str"] + """ + Indicates how the subscription's billing cycle anchor is reset when a trial ends. Defaults to `now`. + """ missing_payment_method: Union[ Literal["cancel", "create_invoice", "pause"], str ] @@ -1723,6 +1726,10 @@ class SessionCreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Sepa Debit payment method options. """ + sequra: NotRequired["SessionCreateParamsPaymentMethodOptionsSequra"] + """ + contains details about the SeQura payment method options. + """ sofort: NotRequired["SessionCreateParamsPaymentMethodOptionsSofort"] """ contains details about the Sofort payment method options. @@ -1947,7 +1954,7 @@ class SessionCreateParamsPaymentMethodOptionsBacsDebitMandateOptions( class SessionCreateParamsPaymentMethodOptionsBancontact(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1987,12 +1994,12 @@ class SessionCreateParamsPaymentMethodOptionsBlik(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']|str" + "Literal['']|Literal['none', 'off_session']|str" ] class SessionCreateParamsPaymentMethodOptionsBlikMandateOptions(TypedDict): - expires_after: NotRequired[int] + expires_at: NotRequired[int] """ Date when the mandate expires and no further payments will be charged. If not provided, the mandate will be set to be indefinite. """ @@ -2064,7 +2071,7 @@ class SessionCreateParamsPaymentMethodOptionsCard(TypedDict): "SessionCreateParamsPaymentMethodOptionsCardRestrictions" ] """ - Restrictions to apply to the card payment method. For example, you can block specific card brands. You can't set this parameter if `ui_mode` is `custom`. + Restrictions to apply to the card payment method. For example, you can block specific card brands. You can't set this parameter if `ui_mode` is `elements`. """ setup_future_usage: NotRequired["Literal['off_session', 'on_session']|str"] """ @@ -2793,6 +2800,13 @@ class SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions( """ +class SessionCreateParamsPaymentMethodOptionsSequra(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + + class SessionCreateParamsPaymentMethodOptionsSofort(TypedDict): setup_future_usage: NotRequired[Literal["none"]] """ @@ -3024,6 +3038,10 @@ class SessionCreateParamsSavedPaymentMethodOptions(TypedDict): """ Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout. """ + payment_method_preselect: NotRequired[str] + """ + The ID of a saved payment method to select when the Payment Element renders, for example `pm_1MqLiJLkdIwHu7ixUEgbFdYF`. Takes precedence over the customer's default payment method. If the ID doesn't match one of the payment methods the Element is displaying, the Element selects a payment method as it normally would and no error is returned. Preselecting a payment method never changes which payment methods the Element displays, and never modifies the payment method, the customer, or this session. The preselection is fixed once set. To preselect a different payment method, create a new session. An Element that's already on the page keeps its current selection. + """ payment_method_remove: NotRequired["Literal['disabled', 'enabled']|str"] """ Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. @@ -3600,6 +3618,10 @@ class SessionCreateParamsSubscriptionDataTrialSettings(TypedDict): class SessionCreateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): + billing_cycle_anchor: NotRequired["Literal['now', 'unchanged']|str"] + """ + Indicates how the subscription's billing cycle anchor is reset when a trial ends. Defaults to `now`. + """ missing_payment_method: Union[ Literal["cancel", "create_invoice", "pause"], str ] @@ -3615,7 +3637,7 @@ class SessionCreateParamsTaxIdCollection(TypedDict): """ required: NotRequired["Literal['if_supported', 'never']|str"] """ - Describes whether a tax ID is required during checkout. Defaults to `never`. You can't set this parameter if `ui_mode` is `custom`. + Describes whether a tax ID is required during checkout. Defaults to `never`. You can't set this parameter if `ui_mode` is `elements`. """ diff --git a/stripe/params/checkout/_session_modify_params.py b/stripe/params/checkout/_session_modify_params.py index 18101e317..4abfce70b 100644 --- a/stripe/params/checkout/_session_modify_params.py +++ b/stripe/params/checkout/_session_modify_params.py @@ -16,7 +16,7 @@ class SessionModifyParams(RequestOptions): "SessionModifyParamsCollectedInformation" ] """ - Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions. + Information about the customer collected within the Checkout Session. Can only be set when updating `embedded_page` or `elements` sessions. """ discounts: NotRequired["Literal['']|List[SessionModifyParamsDiscount]"] """ diff --git a/stripe/params/checkout/_session_update_params.py b/stripe/params/checkout/_session_update_params.py index 122499984..4f501de18 100644 --- a/stripe/params/checkout/_session_update_params.py +++ b/stripe/params/checkout/_session_update_params.py @@ -15,7 +15,7 @@ class SessionUpdateParams(TypedDict): "SessionUpdateParamsCollectedInformation" ] """ - Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions. + Information about the customer collected within the Checkout Session. Can only be set when updating `embedded_page` or `elements` sessions. """ discounts: NotRequired["Literal['']|List[SessionUpdateParamsDiscount]"] """ diff --git a/stripe/params/financial_connections/_session_create_params.py b/stripe/params/financial_connections/_session_create_params.py index 34dade117..a7a4d990f 100644 --- a/stripe/params/financial_connections/_session_create_params.py +++ b/stripe/params/financial_connections/_session_create_params.py @@ -108,9 +108,9 @@ class SessionCreateParamsFilters(TypedDict): """ Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. """ - countries: NotRequired[List[str]] + country: NotRequired[str] """ - List of countries from which to filter accounts. + Country from which to collect accounts. """ institution: NotRequired[str] """ diff --git a/stripe/params/issuing/_card_create_params.py b/stripe/params/issuing/_card_create_params.py index 554e93074..bd2ab06e3 100644 --- a/stripe/params/issuing/_card_create_params.py +++ b/stripe/params/issuing/_card_create_params.py @@ -100,9 +100,9 @@ class CardCreateParamsCryptoWallet(TypedDict): """ The cryptocurrency held in the wallet. """ - type: NotRequired["Literal['bridge_wallet', 'standard']|str"] + type: NotRequired["Literal['bridge_wallet', 'squads', 'standard']|str"] """ - The type of wallet (standard or bridge_wallet). + The type of crypto wallet. """ diff --git a/stripe/params/product_catalog/__init__.py b/stripe/params/product_catalog/__init__.py index 924165051..3ad2e93c2 100644 --- a/stripe/params/product_catalog/__init__.py +++ b/stripe/params/product_catalog/__init__.py @@ -15,9 +15,15 @@ TrialOfferListParams as TrialOfferListParams, TrialOfferListParamsCreated as TrialOfferListParamsCreated, ) + from stripe.params.product_catalog._trial_offer_modify_params import ( + TrialOfferModifyParams as TrialOfferModifyParams, + ) from stripe.params.product_catalog._trial_offer_retrieve_params import ( TrialOfferRetrieveParams as TrialOfferRetrieveParams, ) + from stripe.params.product_catalog._trial_offer_update_params import ( + TrialOfferUpdateParams as TrialOfferUpdateParams, + ) # name -> (import_target, is_submodule) _import_map = { @@ -49,10 +55,18 @@ "stripe.params.product_catalog._trial_offer_list_params", False, ), + "TrialOfferModifyParams": ( + "stripe.params.product_catalog._trial_offer_modify_params", + False, + ), "TrialOfferRetrieveParams": ( "stripe.params.product_catalog._trial_offer_retrieve_params", False, ), + "TrialOfferUpdateParams": ( + "stripe.params.product_catalog._trial_offer_update_params", + False, + ), } if not TYPE_CHECKING: diff --git a/stripe/params/product_catalog/_trial_offer_create_params.py b/stripe/params/product_catalog/_trial_offer_create_params.py index 888a1fe89..cab382bbc 100644 --- a/stripe/params/product_catalog/_trial_offer_create_params.py +++ b/stripe/params/product_catalog/_trial_offer_create_params.py @@ -6,6 +6,10 @@ class TrialOfferCreateParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the trial offer can be used for new subscriptions. Defaults to true. + """ duration: "TrialOfferCreateParamsDuration" """ Duration of one service period of the trial. @@ -18,9 +22,9 @@ class TrialOfferCreateParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - name: NotRequired[str] + nickname: NotRequired[str] """ - A brief, user-friendly name for the trial offer-for identification purposes. + A brief description of the trial offer, hidden from customers. """ price: str """ diff --git a/stripe/params/product_catalog/_trial_offer_modify_params.py b/stripe/params/product_catalog/_trial_offer_modify_params.py new file mode 100644 index 000000000..9b6cb3423 --- /dev/null +++ b/stripe/params/product_catalog/_trial_offer_modify_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class TrialOfferModifyParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the trial offer can be used for new purchases. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/product_catalog/_trial_offer_update_params.py b/stripe/params/product_catalog/_trial_offer_update_params.py new file mode 100644 index 000000000..5093edd44 --- /dev/null +++ b/stripe/params/product_catalog/_trial_offer_update_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class TrialOfferUpdateParams(TypedDict): + active: NotRequired[bool] + """ + Whether the trial offer can be used for new purchases. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/radar/__init__.py b/stripe/params/radar/__init__.py index e7f5342f7..3176dca23 100644 --- a/stripe/params/radar/__init__.py +++ b/stripe/params/radar/__init__.py @@ -31,6 +31,20 @@ AccountEvaluationUpdateParamsRegistrationFailed as AccountEvaluationUpdateParamsRegistrationFailed, AccountEvaluationUpdateParamsRegistrationSucceeded as AccountEvaluationUpdateParamsRegistrationSucceeded, ) + from stripe.params.radar._billing_evaluation_create_params import ( + BillingEvaluationCreateParams as BillingEvaluationCreateParams, + BillingEvaluationCreateParamsClientDeviceMetadataDetails as BillingEvaluationCreateParamsClientDeviceMetadataDetails, + BillingEvaluationCreateParamsCustomerDetails as BillingEvaluationCreateParamsCustomerDetails, + BillingEvaluationCreateParamsCustomerDetailsData as BillingEvaluationCreateParamsCustomerDetailsData, + BillingEvaluationCreateParamsPaymentDetails as BillingEvaluationCreateParamsPaymentDetails, + BillingEvaluationCreateParamsPaymentDetailsMoneyMovementDetails as BillingEvaluationCreateParamsPaymentDetailsMoneyMovementDetails, + BillingEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsCard as BillingEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsCard, + BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetails as BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetails, + BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetails as BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetails, + BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetailsAddress as BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetailsAddress, + BillingEvaluationCreateParamsPaymentDetailsShippingDetails as BillingEvaluationCreateParamsPaymentDetailsShippingDetails, + BillingEvaluationCreateParamsPaymentDetailsShippingDetailsAddress as BillingEvaluationCreateParamsPaymentDetailsShippingDetailsAddress, + ) from stripe.params.radar._customer_evaluation_create_params import ( CustomerEvaluationCreateParams as CustomerEvaluationCreateParams, CustomerEvaluationCreateParamsEvaluationContext as CustomerEvaluationCreateParamsEvaluationContext, @@ -191,6 +205,54 @@ "stripe.params.radar._account_evaluation_update_params", False, ), + "BillingEvaluationCreateParams": ( + "stripe.params.radar._billing_evaluation_create_params", + False, + ), + "BillingEvaluationCreateParamsClientDeviceMetadataDetails": ( + "stripe.params.radar._billing_evaluation_create_params", + False, + ), + "BillingEvaluationCreateParamsCustomerDetails": ( + "stripe.params.radar._billing_evaluation_create_params", + False, + ), + "BillingEvaluationCreateParamsCustomerDetailsData": ( + "stripe.params.radar._billing_evaluation_create_params", + False, + ), + "BillingEvaluationCreateParamsPaymentDetails": ( + "stripe.params.radar._billing_evaluation_create_params", + False, + ), + "BillingEvaluationCreateParamsPaymentDetailsMoneyMovementDetails": ( + "stripe.params.radar._billing_evaluation_create_params", + False, + ), + "BillingEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsCard": ( + "stripe.params.radar._billing_evaluation_create_params", + False, + ), + "BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetails": ( + "stripe.params.radar._billing_evaluation_create_params", + False, + ), + "BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetails": ( + "stripe.params.radar._billing_evaluation_create_params", + False, + ), + "BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetailsAddress": ( + "stripe.params.radar._billing_evaluation_create_params", + False, + ), + "BillingEvaluationCreateParamsPaymentDetailsShippingDetails": ( + "stripe.params.radar._billing_evaluation_create_params", + False, + ), + "BillingEvaluationCreateParamsPaymentDetailsShippingDetailsAddress": ( + "stripe.params.radar._billing_evaluation_create_params", + False, + ), "CustomerEvaluationCreateParams": ( "stripe.params.radar._customer_evaluation_create_params", False, diff --git a/stripe/params/radar/_billing_evaluation_create_params.py b/stripe/params/radar/_billing_evaluation_create_params.py new file mode 100644 index 000000000..9be71426a --- /dev/null +++ b/stripe/params/radar/_billing_evaluation_create_params.py @@ -0,0 +1,248 @@ +# -*- 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 BillingEvaluationCreateParams(RequestOptions): + client_device_metadata_details: NotRequired[ + "BillingEvaluationCreateParamsClientDeviceMetadataDetails" + ] + """ + Details about the client device to associate with the billing evaluation. + """ + customer_details: "BillingEvaluationCreateParamsCustomerDetails" + """ + Details about the customer whose upcoming payment is being evaluated. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] + """ + Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment_details: "BillingEvaluationCreateParamsPaymentDetails" + """ + Details about the upcoming payment being evaluated. + """ + + +class BillingEvaluationCreateParamsClientDeviceMetadataDetails(TypedDict): + radar_session: str + """ + ID for the Radar Session to associate with the billing evaluation. A [Radar Session](https://docs.stripe.com/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions about the customer behind the upcoming payment. + """ + + +class BillingEvaluationCreateParamsCustomerDetails(TypedDict): + customer: NotRequired[str] + """ + The ID of the customer whose upcoming payment is being evaluated. + """ + customer_account: NotRequired[str] + """ + The ID of the Account representing the customer whose upcoming payment is being evaluated. + """ + data: NotRequired["BillingEvaluationCreateParamsCustomerDetailsData"] + """ + Attributes of the customer being evaluated. Exactly one of `customer`, `customer_account`, and `data` must be supplied: use `data` when the customer isn't represented by a Customer or an Account. + """ + + +class BillingEvaluationCreateParamsCustomerDetailsData(TypedDict): + email: NotRequired[str] + """ + The email address of the customer being evaluated. + """ + name: NotRequired[str] + """ + The full name or business name of the customer being evaluated. + """ + phone: NotRequired[str] + """ + The phone number of the customer being evaluated. + """ + + +class BillingEvaluationCreateParamsPaymentDetails(TypedDict): + amount: int + """ + The amount that the upcoming payment collects. A positive integer representing how much is charged in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal) (for example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal currency). + """ + currency: str + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + description: NotRequired[str] + """ + An arbitrary description of the upcoming payment. + """ + money_movement_details: NotRequired[ + "BillingEvaluationCreateParamsPaymentDetailsMoneyMovementDetails" + ] + """ + Details about how the money for the upcoming payment moves. + """ + payment_method_details: ( + "BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetails" + ) + """ + Details about the payment method that the upcoming payment is charged to. + """ + shipping_details: NotRequired[ + "BillingEvaluationCreateParamsPaymentDetailsShippingDetails" + ] + """ + Shipping details for the goods or services covered by the upcoming payment. + """ + statement_descriptor: NotRequired[str] + """ + The statement descriptor that appears on the customer's statement for the upcoming payment. + """ + + +class BillingEvaluationCreateParamsPaymentDetailsMoneyMovementDetails( + TypedDict, +): + card: NotRequired[ + "BillingEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsCard" + ] + """ + Describes card money movement details. + """ + money_movement_type: Union[Literal["card"], str] + """ + Describes the type of money movement. Currently only `card` is supported. + """ + + +class BillingEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsCard( + TypedDict, +): + customer_presence: NotRequired["Literal['off_session', 'on_session']|str"] + """ + Describes the presence of the customer during the payment. + """ + payment_type: NotRequired[ + "Literal['one_off', 'recurring', 'setup_one_off', 'setup_recurring']|str" + ] + """ + Describes the type of payment. + """ + + +class BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetails( + TypedDict, +): + billing_details: NotRequired[ + "BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetails" + ] + """ + Billing information associated with the payment method used for the upcoming payment. + """ + payment_method: str + """ + ID of the payment method that the upcoming payment is charged to. + """ + + +class BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetails( + TypedDict, +): + address: NotRequired[ + "BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired[str] + """ + Email address. + """ + name: NotRequired[str] + """ + Full name. + """ + phone: NotRequired[str] + """ + Billing phone number (including extension). + """ + + +class BillingEvaluationCreateParamsPaymentDetailsPaymentMethodDetailsBillingDetailsAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + + +class BillingEvaluationCreateParamsPaymentDetailsShippingDetails(TypedDict): + address: NotRequired[ + "BillingEvaluationCreateParamsPaymentDetailsShippingDetailsAddress" + ] + """ + Shipping address. + """ + name: NotRequired[str] + """ + Shipping name. + """ + phone: NotRequired[str] + """ + Shipping phone number. + """ + + +class BillingEvaluationCreateParamsPaymentDetailsShippingDetailsAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ diff --git a/stripe/params/reserve/__init__.py b/stripe/params/reserve/__init__.py index 83513fd5e..7a962ff10 100644 --- a/stripe/params/reserve/__init__.py +++ b/stripe/params/reserve/__init__.py @@ -10,6 +10,9 @@ from stripe.params.reserve._hold_retrieve_params import ( HoldRetrieveParams as HoldRetrieveParams, ) + from stripe.params.reserve._plan_list_params import ( + PlanListParams as PlanListParams, + ) from stripe.params.reserve._plan_retrieve_params import ( PlanRetrieveParams as PlanRetrieveParams, ) @@ -27,6 +30,7 @@ "stripe.params.reserve._hold_retrieve_params", False, ), + "PlanListParams": ("stripe.params.reserve._plan_list_params", False), "PlanRetrieveParams": ( "stripe.params.reserve._plan_retrieve_params", False, diff --git a/stripe/params/reserve/_plan_list_params.py b/stripe/params/reserve/_plan_list_params.py new file mode 100644 index 000000000..c27cba241 --- /dev/null +++ b/stripe/params/reserve/_plan_list_params.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import Literal, NotRequired + + +class PlanListParams(RequestOptions): + destination: NotRequired[ + "Literal['risk_reserved', 'settlement_reserved']|str" + ] + """ + Only return ReservePlans with the specified destination. If omitted, returns ReservePlans with any destination. + """ + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ + status: NotRequired["Literal['active', 'disabled', 'expired']|str"] + """ + Only return ReservePlans with the specified status. If omitted, returns ReservePlans with any status. + """ diff --git a/stripe/params/tax/__init__.py b/stripe/params/tax/__init__.py index f6f1c4619..f8b583bdf 100644 --- a/stripe/params/tax/__init__.py +++ b/stripe/params/tax/__init__.py @@ -59,7 +59,6 @@ RegistrationCreateParamsCountryOptionsAo as RegistrationCreateParamsCountryOptionsAo, RegistrationCreateParamsCountryOptionsAoStandard as RegistrationCreateParamsCountryOptionsAoStandard, RegistrationCreateParamsCountryOptionsAt as RegistrationCreateParamsCountryOptionsAt, - RegistrationCreateParamsCountryOptionsAtIgic as RegistrationCreateParamsCountryOptionsAtIgic, RegistrationCreateParamsCountryOptionsAtStandard as RegistrationCreateParamsCountryOptionsAtStandard, RegistrationCreateParamsCountryOptionsAu as RegistrationCreateParamsCountryOptionsAu, RegistrationCreateParamsCountryOptionsAuStandard as RegistrationCreateParamsCountryOptionsAuStandard, @@ -73,12 +72,10 @@ RegistrationCreateParamsCountryOptionsBd as RegistrationCreateParamsCountryOptionsBd, RegistrationCreateParamsCountryOptionsBdStandard as RegistrationCreateParamsCountryOptionsBdStandard, RegistrationCreateParamsCountryOptionsBe as RegistrationCreateParamsCountryOptionsBe, - RegistrationCreateParamsCountryOptionsBeIgic as RegistrationCreateParamsCountryOptionsBeIgic, RegistrationCreateParamsCountryOptionsBeStandard as RegistrationCreateParamsCountryOptionsBeStandard, RegistrationCreateParamsCountryOptionsBf as RegistrationCreateParamsCountryOptionsBf, RegistrationCreateParamsCountryOptionsBfStandard as RegistrationCreateParamsCountryOptionsBfStandard, RegistrationCreateParamsCountryOptionsBg as RegistrationCreateParamsCountryOptionsBg, - RegistrationCreateParamsCountryOptionsBgIgic as RegistrationCreateParamsCountryOptionsBgIgic, RegistrationCreateParamsCountryOptionsBgStandard as RegistrationCreateParamsCountryOptionsBgStandard, RegistrationCreateParamsCountryOptionsBh as RegistrationCreateParamsCountryOptionsBh, RegistrationCreateParamsCountryOptionsBhStandard as RegistrationCreateParamsCountryOptionsBhStandard, @@ -98,20 +95,15 @@ RegistrationCreateParamsCountryOptionsCr as RegistrationCreateParamsCountryOptionsCr, RegistrationCreateParamsCountryOptionsCv as RegistrationCreateParamsCountryOptionsCv, RegistrationCreateParamsCountryOptionsCy as RegistrationCreateParamsCountryOptionsCy, - RegistrationCreateParamsCountryOptionsCyIgic as RegistrationCreateParamsCountryOptionsCyIgic, RegistrationCreateParamsCountryOptionsCyStandard as RegistrationCreateParamsCountryOptionsCyStandard, RegistrationCreateParamsCountryOptionsCz as RegistrationCreateParamsCountryOptionsCz, - RegistrationCreateParamsCountryOptionsCzIgic as RegistrationCreateParamsCountryOptionsCzIgic, RegistrationCreateParamsCountryOptionsCzStandard as RegistrationCreateParamsCountryOptionsCzStandard, RegistrationCreateParamsCountryOptionsDe as RegistrationCreateParamsCountryOptionsDe, - RegistrationCreateParamsCountryOptionsDeIgic as RegistrationCreateParamsCountryOptionsDeIgic, RegistrationCreateParamsCountryOptionsDeStandard as RegistrationCreateParamsCountryOptionsDeStandard, RegistrationCreateParamsCountryOptionsDk as RegistrationCreateParamsCountryOptionsDk, - RegistrationCreateParamsCountryOptionsDkIgic as RegistrationCreateParamsCountryOptionsDkIgic, RegistrationCreateParamsCountryOptionsDkStandard as RegistrationCreateParamsCountryOptionsDkStandard, RegistrationCreateParamsCountryOptionsEc as RegistrationCreateParamsCountryOptionsEc, RegistrationCreateParamsCountryOptionsEe as RegistrationCreateParamsCountryOptionsEe, - RegistrationCreateParamsCountryOptionsEeIgic as RegistrationCreateParamsCountryOptionsEeIgic, RegistrationCreateParamsCountryOptionsEeStandard as RegistrationCreateParamsCountryOptionsEeStandard, RegistrationCreateParamsCountryOptionsEg as RegistrationCreateParamsCountryOptionsEg, RegistrationCreateParamsCountryOptionsEs as RegistrationCreateParamsCountryOptionsEs, @@ -120,10 +112,8 @@ RegistrationCreateParamsCountryOptionsEt as RegistrationCreateParamsCountryOptionsEt, RegistrationCreateParamsCountryOptionsEtStandard as RegistrationCreateParamsCountryOptionsEtStandard, RegistrationCreateParamsCountryOptionsFi as RegistrationCreateParamsCountryOptionsFi, - RegistrationCreateParamsCountryOptionsFiIgic as RegistrationCreateParamsCountryOptionsFiIgic, RegistrationCreateParamsCountryOptionsFiStandard as RegistrationCreateParamsCountryOptionsFiStandard, RegistrationCreateParamsCountryOptionsFr as RegistrationCreateParamsCountryOptionsFr, - RegistrationCreateParamsCountryOptionsFrIgic as RegistrationCreateParamsCountryOptionsFrIgic, RegistrationCreateParamsCountryOptionsFrStandard as RegistrationCreateParamsCountryOptionsFrStandard, RegistrationCreateParamsCountryOptionsGb as RegistrationCreateParamsCountryOptionsGb, RegistrationCreateParamsCountryOptionsGbStandard as RegistrationCreateParamsCountryOptionsGbStandard, @@ -131,23 +121,18 @@ RegistrationCreateParamsCountryOptionsGn as RegistrationCreateParamsCountryOptionsGn, RegistrationCreateParamsCountryOptionsGnStandard as RegistrationCreateParamsCountryOptionsGnStandard, RegistrationCreateParamsCountryOptionsGr as RegistrationCreateParamsCountryOptionsGr, - RegistrationCreateParamsCountryOptionsGrIgic as RegistrationCreateParamsCountryOptionsGrIgic, RegistrationCreateParamsCountryOptionsGrStandard as RegistrationCreateParamsCountryOptionsGrStandard, RegistrationCreateParamsCountryOptionsHr as RegistrationCreateParamsCountryOptionsHr, - RegistrationCreateParamsCountryOptionsHrIgic as RegistrationCreateParamsCountryOptionsHrIgic, RegistrationCreateParamsCountryOptionsHrStandard as RegistrationCreateParamsCountryOptionsHrStandard, RegistrationCreateParamsCountryOptionsHu as RegistrationCreateParamsCountryOptionsHu, - RegistrationCreateParamsCountryOptionsHuIgic as RegistrationCreateParamsCountryOptionsHuIgic, RegistrationCreateParamsCountryOptionsHuStandard as RegistrationCreateParamsCountryOptionsHuStandard, RegistrationCreateParamsCountryOptionsId as RegistrationCreateParamsCountryOptionsId, RegistrationCreateParamsCountryOptionsIe as RegistrationCreateParamsCountryOptionsIe, - RegistrationCreateParamsCountryOptionsIeIgic as RegistrationCreateParamsCountryOptionsIeIgic, RegistrationCreateParamsCountryOptionsIeStandard as RegistrationCreateParamsCountryOptionsIeStandard, RegistrationCreateParamsCountryOptionsIn as RegistrationCreateParamsCountryOptionsIn, RegistrationCreateParamsCountryOptionsIs as RegistrationCreateParamsCountryOptionsIs, RegistrationCreateParamsCountryOptionsIsStandard as RegistrationCreateParamsCountryOptionsIsStandard, RegistrationCreateParamsCountryOptionsIt as RegistrationCreateParamsCountryOptionsIt, - RegistrationCreateParamsCountryOptionsItIgic as RegistrationCreateParamsCountryOptionsItIgic, RegistrationCreateParamsCountryOptionsItStandard as RegistrationCreateParamsCountryOptionsItStandard, RegistrationCreateParamsCountryOptionsJp as RegistrationCreateParamsCountryOptionsJp, RegistrationCreateParamsCountryOptionsJpStandard as RegistrationCreateParamsCountryOptionsJpStandard, @@ -159,13 +144,10 @@ RegistrationCreateParamsCountryOptionsLa as RegistrationCreateParamsCountryOptionsLa, RegistrationCreateParamsCountryOptionsLk as RegistrationCreateParamsCountryOptionsLk, RegistrationCreateParamsCountryOptionsLt as RegistrationCreateParamsCountryOptionsLt, - RegistrationCreateParamsCountryOptionsLtIgic as RegistrationCreateParamsCountryOptionsLtIgic, RegistrationCreateParamsCountryOptionsLtStandard as RegistrationCreateParamsCountryOptionsLtStandard, RegistrationCreateParamsCountryOptionsLu as RegistrationCreateParamsCountryOptionsLu, - RegistrationCreateParamsCountryOptionsLuIgic as RegistrationCreateParamsCountryOptionsLuIgic, RegistrationCreateParamsCountryOptionsLuStandard as RegistrationCreateParamsCountryOptionsLuStandard, RegistrationCreateParamsCountryOptionsLv as RegistrationCreateParamsCountryOptionsLv, - RegistrationCreateParamsCountryOptionsLvIgic as RegistrationCreateParamsCountryOptionsLvIgic, RegistrationCreateParamsCountryOptionsLvStandard as RegistrationCreateParamsCountryOptionsLvStandard, RegistrationCreateParamsCountryOptionsMa as RegistrationCreateParamsCountryOptionsMa, RegistrationCreateParamsCountryOptionsMd as RegistrationCreateParamsCountryOptionsMd, @@ -176,13 +158,11 @@ RegistrationCreateParamsCountryOptionsMr as RegistrationCreateParamsCountryOptionsMr, RegistrationCreateParamsCountryOptionsMrStandard as RegistrationCreateParamsCountryOptionsMrStandard, RegistrationCreateParamsCountryOptionsMt as RegistrationCreateParamsCountryOptionsMt, - RegistrationCreateParamsCountryOptionsMtIgic as RegistrationCreateParamsCountryOptionsMtIgic, RegistrationCreateParamsCountryOptionsMtStandard as RegistrationCreateParamsCountryOptionsMtStandard, RegistrationCreateParamsCountryOptionsMx as RegistrationCreateParamsCountryOptionsMx, RegistrationCreateParamsCountryOptionsMy as RegistrationCreateParamsCountryOptionsMy, RegistrationCreateParamsCountryOptionsNg as RegistrationCreateParamsCountryOptionsNg, RegistrationCreateParamsCountryOptionsNl as RegistrationCreateParamsCountryOptionsNl, - RegistrationCreateParamsCountryOptionsNlIgic as RegistrationCreateParamsCountryOptionsNlIgic, RegistrationCreateParamsCountryOptionsNlStandard as RegistrationCreateParamsCountryOptionsNlStandard, RegistrationCreateParamsCountryOptionsNo as RegistrationCreateParamsCountryOptionsNo, RegistrationCreateParamsCountryOptionsNoStandard as RegistrationCreateParamsCountryOptionsNoStandard, @@ -194,28 +174,22 @@ RegistrationCreateParamsCountryOptionsPe as RegistrationCreateParamsCountryOptionsPe, RegistrationCreateParamsCountryOptionsPh as RegistrationCreateParamsCountryOptionsPh, RegistrationCreateParamsCountryOptionsPl as RegistrationCreateParamsCountryOptionsPl, - RegistrationCreateParamsCountryOptionsPlIgic as RegistrationCreateParamsCountryOptionsPlIgic, RegistrationCreateParamsCountryOptionsPlStandard as RegistrationCreateParamsCountryOptionsPlStandard, RegistrationCreateParamsCountryOptionsPt as RegistrationCreateParamsCountryOptionsPt, - RegistrationCreateParamsCountryOptionsPtIgic as RegistrationCreateParamsCountryOptionsPtIgic, RegistrationCreateParamsCountryOptionsPtStandard as RegistrationCreateParamsCountryOptionsPtStandard, RegistrationCreateParamsCountryOptionsRo as RegistrationCreateParamsCountryOptionsRo, - RegistrationCreateParamsCountryOptionsRoIgic as RegistrationCreateParamsCountryOptionsRoIgic, RegistrationCreateParamsCountryOptionsRoStandard as RegistrationCreateParamsCountryOptionsRoStandard, RegistrationCreateParamsCountryOptionsRs as RegistrationCreateParamsCountryOptionsRs, RegistrationCreateParamsCountryOptionsRsStandard as RegistrationCreateParamsCountryOptionsRsStandard, RegistrationCreateParamsCountryOptionsRu as RegistrationCreateParamsCountryOptionsRu, RegistrationCreateParamsCountryOptionsSa as RegistrationCreateParamsCountryOptionsSa, RegistrationCreateParamsCountryOptionsSe as RegistrationCreateParamsCountryOptionsSe, - RegistrationCreateParamsCountryOptionsSeIgic as RegistrationCreateParamsCountryOptionsSeIgic, RegistrationCreateParamsCountryOptionsSeStandard as RegistrationCreateParamsCountryOptionsSeStandard, RegistrationCreateParamsCountryOptionsSg as RegistrationCreateParamsCountryOptionsSg, RegistrationCreateParamsCountryOptionsSgStandard as RegistrationCreateParamsCountryOptionsSgStandard, RegistrationCreateParamsCountryOptionsSi as RegistrationCreateParamsCountryOptionsSi, - RegistrationCreateParamsCountryOptionsSiIgic as RegistrationCreateParamsCountryOptionsSiIgic, RegistrationCreateParamsCountryOptionsSiStandard as RegistrationCreateParamsCountryOptionsSiStandard, RegistrationCreateParamsCountryOptionsSk as RegistrationCreateParamsCountryOptionsSk, - RegistrationCreateParamsCountryOptionsSkIgic as RegistrationCreateParamsCountryOptionsSkIgic, RegistrationCreateParamsCountryOptionsSkStandard as RegistrationCreateParamsCountryOptionsSkStandard, RegistrationCreateParamsCountryOptionsSn as RegistrationCreateParamsCountryOptionsSn, RegistrationCreateParamsCountryOptionsSr as RegistrationCreateParamsCountryOptionsSr, @@ -413,10 +387,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsAtIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsAtStandard": ( "stripe.params.tax._registration_create_params", False, @@ -469,10 +439,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsBeIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsBeStandard": ( "stripe.params.tax._registration_create_params", False, @@ -489,10 +455,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsBgIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsBgStandard": ( "stripe.params.tax._registration_create_params", False, @@ -569,10 +531,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsCyIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsCyStandard": ( "stripe.params.tax._registration_create_params", False, @@ -581,10 +539,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsCzIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsCzStandard": ( "stripe.params.tax._registration_create_params", False, @@ -593,10 +547,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsDeIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsDeStandard": ( "stripe.params.tax._registration_create_params", False, @@ -605,10 +555,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsDkIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsDkStandard": ( "stripe.params.tax._registration_create_params", False, @@ -621,10 +567,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsEeIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsEeStandard": ( "stripe.params.tax._registration_create_params", False, @@ -657,10 +599,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsFiIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsFiStandard": ( "stripe.params.tax._registration_create_params", False, @@ -669,10 +607,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsFrIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsFrStandard": ( "stripe.params.tax._registration_create_params", False, @@ -701,10 +635,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsGrIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsGrStandard": ( "stripe.params.tax._registration_create_params", False, @@ -713,10 +643,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsHrIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsHrStandard": ( "stripe.params.tax._registration_create_params", False, @@ -725,10 +651,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsHuIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsHuStandard": ( "stripe.params.tax._registration_create_params", False, @@ -741,10 +663,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsIeIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsIeStandard": ( "stripe.params.tax._registration_create_params", False, @@ -765,10 +683,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsItIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsItStandard": ( "stripe.params.tax._registration_create_params", False, @@ -813,10 +727,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsLtIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsLtStandard": ( "stripe.params.tax._registration_create_params", False, @@ -825,10 +735,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsLuIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsLuStandard": ( "stripe.params.tax._registration_create_params", False, @@ -837,10 +743,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsLvIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsLvStandard": ( "stripe.params.tax._registration_create_params", False, @@ -881,10 +783,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsMtIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsMtStandard": ( "stripe.params.tax._registration_create_params", False, @@ -905,10 +803,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsNlIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsNlStandard": ( "stripe.params.tax._registration_create_params", False, @@ -953,10 +847,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsPlIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsPlStandard": ( "stripe.params.tax._registration_create_params", False, @@ -965,10 +855,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsPtIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsPtStandard": ( "stripe.params.tax._registration_create_params", False, @@ -977,10 +863,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsRoIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsRoStandard": ( "stripe.params.tax._registration_create_params", False, @@ -1005,10 +887,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsSeIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsSeStandard": ( "stripe.params.tax._registration_create_params", False, @@ -1025,10 +903,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsSiIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsSiStandard": ( "stripe.params.tax._registration_create_params", False, @@ -1037,10 +911,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsSkIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsSkStandard": ( "stripe.params.tax._registration_create_params", False, diff --git a/stripe/params/tax/_form_list_params.py b/stripe/params/tax/_form_list_params.py index 86cd786d3..27bb9a4a6 100644 --- a/stripe/params/tax/_form_list_params.py +++ b/stripe/params/tax/_form_list_params.py @@ -26,6 +26,10 @@ class FormListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ + status: NotRequired["Literal['draft', 'finalized']|str"] + """ + Filter forms by draft or finalized status. + """ type: NotRequired[ "Literal['au_serr', 'ca_mrdp', 'eu_dac7', 'gb_mrdp', 'nz_mrdp', 'us_1099_k', 'us_1099_misc', 'us_1099_nec']|str" ] diff --git a/stripe/params/tax/_registration_create_params.py b/stripe/params/tax/_registration_create_params.py index 4720ec44a..dde67f6cb 100644 --- a/stripe/params/tax/_registration_create_params.py +++ b/stripe/params/tax/_registration_create_params.py @@ -506,10 +506,6 @@ class RegistrationCreateParamsCountryOptionsAoStandard(TypedDict): class RegistrationCreateParamsCountryOptionsAt(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsAtIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsAtStandard"] """ Options for the standard registration. @@ -520,13 +516,6 @@ class RegistrationCreateParamsCountryOptionsAt(TypedDict): """ -class RegistrationCreateParamsCountryOptionsAtIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsAtStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -644,10 +633,6 @@ class RegistrationCreateParamsCountryOptionsBdStandard(TypedDict): class RegistrationCreateParamsCountryOptionsBe(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsBeIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsBeStandard"] """ Options for the standard registration. @@ -658,13 +643,6 @@ class RegistrationCreateParamsCountryOptionsBe(TypedDict): """ -class RegistrationCreateParamsCountryOptionsBeIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsBeStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -695,10 +673,6 @@ class RegistrationCreateParamsCountryOptionsBfStandard(TypedDict): class RegistrationCreateParamsCountryOptionsBg(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsBgIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsBgStandard"] """ Options for the standard registration. @@ -709,13 +683,6 @@ class RegistrationCreateParamsCountryOptionsBg(TypedDict): """ -class RegistrationCreateParamsCountryOptionsBgIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsBgStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -875,10 +842,6 @@ class RegistrationCreateParamsCountryOptionsCv(TypedDict): class RegistrationCreateParamsCountryOptionsCy(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsCyIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsCyStandard"] """ Options for the standard registration. @@ -889,13 +852,6 @@ class RegistrationCreateParamsCountryOptionsCy(TypedDict): """ -class RegistrationCreateParamsCountryOptionsCyIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsCyStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -906,10 +862,6 @@ class RegistrationCreateParamsCountryOptionsCyStandard(TypedDict): class RegistrationCreateParamsCountryOptionsCz(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsCzIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsCzStandard"] """ Options for the standard registration. @@ -920,13 +872,6 @@ class RegistrationCreateParamsCountryOptionsCz(TypedDict): """ -class RegistrationCreateParamsCountryOptionsCzIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsCzStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -937,10 +882,6 @@ class RegistrationCreateParamsCountryOptionsCzStandard(TypedDict): class RegistrationCreateParamsCountryOptionsDe(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsDeIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsDeStandard"] """ Options for the standard registration. @@ -951,13 +892,6 @@ class RegistrationCreateParamsCountryOptionsDe(TypedDict): """ -class RegistrationCreateParamsCountryOptionsDeIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsDeStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -968,10 +902,6 @@ class RegistrationCreateParamsCountryOptionsDeStandard(TypedDict): class RegistrationCreateParamsCountryOptionsDk(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsDkIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsDkStandard"] """ Options for the standard registration. @@ -982,13 +912,6 @@ class RegistrationCreateParamsCountryOptionsDk(TypedDict): """ -class RegistrationCreateParamsCountryOptionsDkIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsDkStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1006,10 +929,6 @@ class RegistrationCreateParamsCountryOptionsEc(TypedDict): class RegistrationCreateParamsCountryOptionsEe(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsEeIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsEeStandard"] """ Options for the standard registration. @@ -1020,13 +939,6 @@ class RegistrationCreateParamsCountryOptionsEe(TypedDict): """ -class RegistrationCreateParamsCountryOptionsEeIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsEeStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1052,9 +964,11 @@ class RegistrationCreateParamsCountryOptionsEs(TypedDict): """ Options for the standard registration. """ - type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] + type: Union[ + Literal["igic", "ioss", "oss_non_union", "oss_union", "standard"], str + ] """ - Type of registration to be created in an EU country. + Type of registration to be created in ES. """ @@ -1095,10 +1009,6 @@ class RegistrationCreateParamsCountryOptionsEtStandard(TypedDict): class RegistrationCreateParamsCountryOptionsFi(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsFiIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsFiStandard"] """ Options for the standard registration. @@ -1109,13 +1019,6 @@ class RegistrationCreateParamsCountryOptionsFi(TypedDict): """ -class RegistrationCreateParamsCountryOptionsFiIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsFiStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1126,10 +1029,6 @@ class RegistrationCreateParamsCountryOptionsFiStandard(TypedDict): class RegistrationCreateParamsCountryOptionsFr(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsFrIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsFrStandard"] """ Options for the standard registration. @@ -1140,13 +1039,6 @@ class RegistrationCreateParamsCountryOptionsFr(TypedDict): """ -class RegistrationCreateParamsCountryOptionsFrIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsFrStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1204,10 +1096,6 @@ class RegistrationCreateParamsCountryOptionsGnStandard(TypedDict): class RegistrationCreateParamsCountryOptionsGr(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsGrIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsGrStandard"] """ Options for the standard registration. @@ -1218,13 +1106,6 @@ class RegistrationCreateParamsCountryOptionsGr(TypedDict): """ -class RegistrationCreateParamsCountryOptionsGrIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsGrStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1235,10 +1116,6 @@ class RegistrationCreateParamsCountryOptionsGrStandard(TypedDict): class RegistrationCreateParamsCountryOptionsHr(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsHrIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsHrStandard"] """ Options for the standard registration. @@ -1249,13 +1126,6 @@ class RegistrationCreateParamsCountryOptionsHr(TypedDict): """ -class RegistrationCreateParamsCountryOptionsHrIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsHrStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1266,10 +1136,6 @@ class RegistrationCreateParamsCountryOptionsHrStandard(TypedDict): class RegistrationCreateParamsCountryOptionsHu(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsHuIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsHuStandard"] """ Options for the standard registration. @@ -1280,13 +1146,6 @@ class RegistrationCreateParamsCountryOptionsHu(TypedDict): """ -class RegistrationCreateParamsCountryOptionsHuIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsHuStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1304,10 +1163,6 @@ class RegistrationCreateParamsCountryOptionsId(TypedDict): class RegistrationCreateParamsCountryOptionsIe(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsIeIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsIeStandard"] """ Options for the standard registration. @@ -1318,13 +1173,6 @@ class RegistrationCreateParamsCountryOptionsIe(TypedDict): """ -class RegistrationCreateParamsCountryOptionsIeIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsIeStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1362,10 +1210,6 @@ class RegistrationCreateParamsCountryOptionsIsStandard(TypedDict): class RegistrationCreateParamsCountryOptionsIt(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsItIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsItStandard"] """ Options for the standard registration. @@ -1376,13 +1220,6 @@ class RegistrationCreateParamsCountryOptionsIt(TypedDict): """ -class RegistrationCreateParamsCountryOptionsItIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsItStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1462,10 +1299,6 @@ class RegistrationCreateParamsCountryOptionsLk(TypedDict): class RegistrationCreateParamsCountryOptionsLt(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsLtIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsLtStandard"] """ Options for the standard registration. @@ -1476,13 +1309,6 @@ class RegistrationCreateParamsCountryOptionsLt(TypedDict): """ -class RegistrationCreateParamsCountryOptionsLtIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsLtStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1493,10 +1319,6 @@ class RegistrationCreateParamsCountryOptionsLtStandard(TypedDict): class RegistrationCreateParamsCountryOptionsLu(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsLuIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsLuStandard"] """ Options for the standard registration. @@ -1507,13 +1329,6 @@ class RegistrationCreateParamsCountryOptionsLu(TypedDict): """ -class RegistrationCreateParamsCountryOptionsLuIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsLuStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1524,10 +1339,6 @@ class RegistrationCreateParamsCountryOptionsLuStandard(TypedDict): class RegistrationCreateParamsCountryOptionsLv(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsLvIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsLvStandard"] """ Options for the standard registration. @@ -1538,13 +1349,6 @@ class RegistrationCreateParamsCountryOptionsLv(TypedDict): """ -class RegistrationCreateParamsCountryOptionsLvIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsLvStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1629,10 +1433,6 @@ class RegistrationCreateParamsCountryOptionsMrStandard(TypedDict): class RegistrationCreateParamsCountryOptionsMt(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsMtIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsMtStandard"] """ Options for the standard registration. @@ -1643,13 +1443,6 @@ class RegistrationCreateParamsCountryOptionsMt(TypedDict): """ -class RegistrationCreateParamsCountryOptionsMtIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsMtStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1681,10 +1474,6 @@ class RegistrationCreateParamsCountryOptionsNg(TypedDict): class RegistrationCreateParamsCountryOptionsNl(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsNlIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsNlStandard"] """ Options for the standard registration. @@ -1695,13 +1484,6 @@ class RegistrationCreateParamsCountryOptionsNl(TypedDict): """ -class RegistrationCreateParamsCountryOptionsNlIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsNlStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1793,10 +1575,6 @@ class RegistrationCreateParamsCountryOptionsPh(TypedDict): class RegistrationCreateParamsCountryOptionsPl(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsPlIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsPlStandard"] """ Options for the standard registration. @@ -1807,13 +1585,6 @@ class RegistrationCreateParamsCountryOptionsPl(TypedDict): """ -class RegistrationCreateParamsCountryOptionsPlIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsPlStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1824,10 +1595,6 @@ class RegistrationCreateParamsCountryOptionsPlStandard(TypedDict): class RegistrationCreateParamsCountryOptionsPt(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsPtIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsPtStandard"] """ Options for the standard registration. @@ -1838,13 +1605,6 @@ class RegistrationCreateParamsCountryOptionsPt(TypedDict): """ -class RegistrationCreateParamsCountryOptionsPtIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsPtStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1855,10 +1615,6 @@ class RegistrationCreateParamsCountryOptionsPtStandard(TypedDict): class RegistrationCreateParamsCountryOptionsRo(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsRoIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsRoStandard"] """ Options for the standard registration. @@ -1869,13 +1625,6 @@ class RegistrationCreateParamsCountryOptionsRo(TypedDict): """ -class RegistrationCreateParamsCountryOptionsRoIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsRoStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1920,10 +1669,6 @@ class RegistrationCreateParamsCountryOptionsSa(TypedDict): class RegistrationCreateParamsCountryOptionsSe(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsSeIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsSeStandard"] """ Options for the standard registration. @@ -1934,13 +1679,6 @@ class RegistrationCreateParamsCountryOptionsSe(TypedDict): """ -class RegistrationCreateParamsCountryOptionsSeIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsSeStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1971,10 +1709,6 @@ class RegistrationCreateParamsCountryOptionsSgStandard(TypedDict): class RegistrationCreateParamsCountryOptionsSi(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsSiIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsSiStandard"] """ Options for the standard registration. @@ -1985,13 +1719,6 @@ class RegistrationCreateParamsCountryOptionsSi(TypedDict): """ -class RegistrationCreateParamsCountryOptionsSiIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsSiStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -2002,10 +1729,6 @@ class RegistrationCreateParamsCountryOptionsSiStandard(TypedDict): class RegistrationCreateParamsCountryOptionsSk(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsSkIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsSkStandard"] """ Options for the standard registration. @@ -2016,13 +1739,6 @@ class RegistrationCreateParamsCountryOptionsSk(TypedDict): """ -class RegistrationCreateParamsCountryOptionsSkIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - - class RegistrationCreateParamsCountryOptionsSkStandard(TypedDict): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str diff --git a/stripe/params/terminal/_configuration_create_params.py b/stripe/params/terminal/_configuration_create_params.py index cd759e341..1dc75052c 100644 --- a/stripe/params/terminal/_configuration_create_params.py +++ b/stripe/params/terminal/_configuration_create_params.py @@ -95,14 +95,14 @@ class ConfigurationCreateParamsBbposWiseposE(TypedDict): class ConfigurationCreateParamsCellular(TypedDict): enabled: bool """ - Determines whether to allow the reader to connect to a cellular network. Defaults to false. + Determines whether to allow the reader to connect to a cellular network. """ class ConfigurationCreateParamsOffline(TypedDict): enabled: bool """ - Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + Determines whether to allow transactions to be collected while reader is offline. """ diff --git a/stripe/params/terminal/_configuration_modify_params.py b/stripe/params/terminal/_configuration_modify_params.py index cea171fd8..d64fabbc6 100644 --- a/stripe/params/terminal/_configuration_modify_params.py +++ b/stripe/params/terminal/_configuration_modify_params.py @@ -111,14 +111,14 @@ class ConfigurationModifyParamsBbposWiseposE(TypedDict): class ConfigurationModifyParamsCellular(TypedDict): enabled: bool """ - Determines whether to allow the reader to connect to a cellular network. Defaults to false. + Determines whether to allow the reader to connect to a cellular network. """ class ConfigurationModifyParamsOffline(TypedDict): enabled: bool """ - Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + Determines whether to allow transactions to be collected while reader is offline. """ diff --git a/stripe/params/terminal/_configuration_update_params.py b/stripe/params/terminal/_configuration_update_params.py index 6b5dfae23..d19c8dbf8 100644 --- a/stripe/params/terminal/_configuration_update_params.py +++ b/stripe/params/terminal/_configuration_update_params.py @@ -110,14 +110,14 @@ class ConfigurationUpdateParamsBbposWiseposE(TypedDict): class ConfigurationUpdateParamsCellular(TypedDict): enabled: bool """ - Determines whether to allow the reader to connect to a cellular network. Defaults to false. + Determines whether to allow the reader to connect to a cellular network. """ class ConfigurationUpdateParamsOffline(TypedDict): enabled: bool """ - Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + Determines whether to allow transactions to be collected while reader is offline. """ diff --git a/stripe/params/terminal/_reader_list_params.py b/stripe/params/terminal/_reader_list_params.py index 42b2c4058..becba0d89 100644 --- a/stripe/params/terminal/_reader_list_params.py +++ b/stripe/params/terminal/_reader_list_params.py @@ -40,7 +40,3 @@ class ReaderListParams(RequestOptions): """ A status filter to filter readers to only offline or online readers """ - tamper_state: NotRequired["Literal['secure', 'tampered']|str"] - """ - Filters readers by tamper state. - """ diff --git a/stripe/params/test_helpers/__init__.py b/stripe/params/test_helpers/__init__.py index 957b27003..0d2d423df 100644 --- a/stripe/params/test_helpers/__init__.py +++ b/stripe/params/test_helpers/__init__.py @@ -71,6 +71,7 @@ ConfirmationTokenCreateParamsPaymentMethodDataSatispay as ConfirmationTokenCreateParamsPaymentMethodDataSatispay, ConfirmationTokenCreateParamsPaymentMethodDataScalapay as ConfirmationTokenCreateParamsPaymentMethodDataScalapay, ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit as ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit, + ConfirmationTokenCreateParamsPaymentMethodDataSequra as ConfirmationTokenCreateParamsPaymentMethodDataSequra, ConfirmationTokenCreateParamsPaymentMethodDataShopeepay as ConfirmationTokenCreateParamsPaymentMethodDataShopeepay, ConfirmationTokenCreateParamsPaymentMethodDataSofort as ConfirmationTokenCreateParamsPaymentMethodDataSofort, ConfirmationTokenCreateParamsPaymentMethodDataStripeBalance as ConfirmationTokenCreateParamsPaymentMethodDataStripeBalance, @@ -359,6 +360,10 @@ "stripe.params.test_helpers._confirmation_token_create_params", False, ), + "ConfirmationTokenCreateParamsPaymentMethodDataSequra": ( + "stripe.params.test_helpers._confirmation_token_create_params", + False, + ), "ConfirmationTokenCreateParamsPaymentMethodDataShopeepay": ( "stripe.params.test_helpers._confirmation_token_create_params", False, diff --git a/stripe/params/test_helpers/_confirmation_token_create_params.py b/stripe/params/test_helpers/_confirmation_token_create_params.py index 495520d0b..9f8198624 100644 --- a/stripe/params/test_helpers/_confirmation_token_create_params.py +++ b/stripe/params/test_helpers/_confirmation_token_create_params.py @@ -329,6 +329,10 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. """ + sequra: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSequra"] + """ + If this is a SeQura PaymentMethod, this hash contains details about the SeQura payment method. + """ shared_payment_granted_token: NotRequired[str] """ ID of the SharedPaymentGrantedToken used to confirm this PaymentIntent. @@ -892,6 +896,10 @@ class ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit(TypedDict): """ +class ConfirmationTokenCreateParamsPaymentMethodDataSequra(TypedDict): + pass + + class ConfirmationTokenCreateParamsPaymentMethodDataShopeepay(TypedDict): pass diff --git a/stripe/params/test_helpers/treasury/_received_credit_create_params.py b/stripe/params/test_helpers/treasury/_received_credit_create_params.py index b1735a925..0ca81305a 100644 --- a/stripe/params/test_helpers/treasury/_received_credit_create_params.py +++ b/stripe/params/test_helpers/treasury/_received_credit_create_params.py @@ -31,7 +31,7 @@ class ReceivedCreditCreateParams(TypedDict): """ Initiating payment method details for the object. """ - network: Union[Literal["ach", "us_domestic_wire"], str] + network: Union[Literal["ach", "rtp", "us_domestic_wire"], str] """ Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. """ diff --git a/stripe/params/three_d_secure/__init__.py b/stripe/params/three_d_secure/__init__.py new file mode 100644 index 000000000..0af5982e0 --- /dev/null +++ b/stripe/params/three_d_secure/__init__.py @@ -0,0 +1,155 @@ +# -*- 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.three_d_secure._authentication_cancel_params import ( + AuthenticationCancelParams as AuthenticationCancelParams, + ) + from stripe.params.three_d_secure._authentication_create_params import ( + AuthenticationCreateParams as AuthenticationCreateParams, + AuthenticationCreateParamsAcquirerDetails as AuthenticationCreateParamsAcquirerDetails, + AuthenticationCreateParamsChannel as AuthenticationCreateParamsChannel, + AuthenticationCreateParamsChannelBrowser as AuthenticationCreateParamsChannelBrowser, + AuthenticationCreateParamsChannelThreeRI as AuthenticationCreateParamsChannelThreeRI, + AuthenticationCreateParamsFlowPreference as AuthenticationCreateParamsFlowPreference, + AuthenticationCreateParamsFlowPreferenceChallenge as AuthenticationCreateParamsFlowPreferenceChallenge, + AuthenticationCreateParamsFlowPreferenceDataShare as AuthenticationCreateParamsFlowPreferenceDataShare, + AuthenticationCreateParamsFlowPreferenceFrictionless as AuthenticationCreateParamsFlowPreferenceFrictionless, + AuthenticationCreateParamsFutureUsage as AuthenticationCreateParamsFutureUsage, + AuthenticationCreateParamsFutureUsageInstallment as AuthenticationCreateParamsFutureUsageInstallment, + AuthenticationCreateParamsFutureUsageInstallmentExpiry as AuthenticationCreateParamsFutureUsageInstallmentExpiry, + AuthenticationCreateParamsFutureUsageRecurring as AuthenticationCreateParamsFutureUsageRecurring, + AuthenticationCreateParamsFutureUsageRecurringExpiry as AuthenticationCreateParamsFutureUsageRecurringExpiry, + AuthenticationCreateParamsPaymentMethodData as AuthenticationCreateParamsPaymentMethodData, + AuthenticationCreateParamsPaymentMethodDataBillingDetails as AuthenticationCreateParamsPaymentMethodDataBillingDetails, + AuthenticationCreateParamsPaymentMethodDataBillingDetailsAddress as AuthenticationCreateParamsPaymentMethodDataBillingDetailsAddress, + AuthenticationCreateParamsPaymentMethodDataCard as AuthenticationCreateParamsPaymentMethodDataCard, + AuthenticationCreateParamsShippingAddress as AuthenticationCreateParamsShippingAddress, + ) + from stripe.params.three_d_secure._authentication_list_params import ( + AuthenticationListParams as AuthenticationListParams, + AuthenticationListParamsCreated as AuthenticationListParamsCreated, + ) + from stripe.params.three_d_secure._authentication_retrieve_params import ( + AuthenticationRetrieveParams as AuthenticationRetrieveParams, + ) + from stripe.params.three_d_secure._authentication_submit_params import ( + AuthenticationSubmitParams as AuthenticationSubmitParams, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "AuthenticationCancelParams": ( + "stripe.params.three_d_secure._authentication_cancel_params", + False, + ), + "AuthenticationCreateParams": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsAcquirerDetails": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsChannel": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsChannelBrowser": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsChannelThreeRI": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsFlowPreference": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsFlowPreferenceChallenge": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsFlowPreferenceDataShare": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsFlowPreferenceFrictionless": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsFutureUsage": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsFutureUsageInstallment": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsFutureUsageInstallmentExpiry": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsFutureUsageRecurring": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsFutureUsageRecurringExpiry": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsPaymentMethodData": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsPaymentMethodDataBillingDetails": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsPaymentMethodDataBillingDetailsAddress": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsPaymentMethodDataCard": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationCreateParamsShippingAddress": ( + "stripe.params.three_d_secure._authentication_create_params", + False, + ), + "AuthenticationListParams": ( + "stripe.params.three_d_secure._authentication_list_params", + False, + ), + "AuthenticationListParamsCreated": ( + "stripe.params.three_d_secure._authentication_list_params", + False, + ), + "AuthenticationRetrieveParams": ( + "stripe.params.three_d_secure._authentication_retrieve_params", + False, + ), + "AuthenticationSubmitParams": ( + "stripe.params.three_d_secure._authentication_submit_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/three_d_secure/_authentication_cancel_params.py b/stripe/params/three_d_secure/_authentication_cancel_params.py new file mode 100644 index 000000000..972a963c4 --- /dev/null +++ b/stripe/params/three_d_secure/_authentication_cancel_params.py @@ -0,0 +1,19 @@ +# -*- 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 + + +class AuthenticationCancelParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[ + "Literal['']|Dict[str, str]|UntypedStripeObject[str]" + ] + """ + Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/three_d_secure/_authentication_create_params.py b/stripe/params/three_d_secure/_authentication_create_params.py new file mode 100644 index 000000000..75a28293c --- /dev/null +++ b/stripe/params/three_d_secure/_authentication_create_params.py @@ -0,0 +1,430 @@ +# -*- 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 AuthenticationCreateParams(RequestOptions): + acquirer_details: NotRequired["AuthenticationCreateParamsAcquirerDetails"] + """ + Contains additional details about the acquirer for this 3DS Authentication. + + Refer to the [Pass acquirer details and directory server section of the standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#pass-acquirer-details-and-directory-server) for more information. + """ + amount: NotRequired[int] + """ + A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). You can't include this parameter if `message_category` is `non_payment_authentication` + """ + channel: "AuthenticationCreateParamsChannel" + """ + Contains additional details on the channel used for this 3DS Authentication. + """ + currency: NotRequired[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). + """ + directory_server: NotRequired[ + "Literal['american_express', 'cartes_bancaires', 'discover', 'mastercard', 'visa']|str" + ] + """ + The 3DS directory server with which this 3DS Authentication was processed. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + flow_preference: NotRequired["AuthenticationCreateParamsFlowPreference"] + """ + Contains additional details on your flow preference for this 3DS Authentication. + + Refer to the [Specify a flow preference section of the standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#specify-a-flow-preference) for more information. + """ + future_usage: NotRequired["AuthenticationCreateParamsFutureUsage"] + """ + Contains information about future usage of this 3DS Authentication + """ + message_category: Union[ + Literal["non_payment_authentication", "payment_authentication"], str + ] + """ + Indicates whether this 3DS Authentication is being performed for a payment or non-payment use case. + """ + metadata: NotRequired[ + "Literal['']|Dict[str, str]|UntypedStripeObject[str]" + ] + """ + Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment_method: NotRequired[str] + """ + ID of the payment method (a PaymentMethod object) to attach to this 3DS Authentication. + """ + payment_method_data: NotRequired[ + "AuthenticationCreateParamsPaymentMethodData" + ] + """ + Hash used to generate the PaymentMethod to be used for this Authentication. This is mutually exclusive with the `payment_method` parameter. + """ + reason: NotRequired[ + "Literal['cardholder_authentication', 'issuer_requested', 'liability_shift', 'processing_costs', 'regulatory_compliance']|str" + ] + """ + The reason for invoking standalone 3DS. This is tailored specifically for cases when you want Stripe to help determine the standalone 3DS flow to fit your use case instead of needing to select a specific 3DS flow. + + This parameter is exclusive with `flow_preference`. You can either use `reason` for controlling 3DS according to your business requirements, or use `flow_preference` for having fine-grained control over your 3DS flow preference. + """ + shipping_address: NotRequired["AuthenticationCreateParamsShippingAddress"] + """ + The shipping address requested by the cardholder. You should try to include as complete address information as possible. + """ + submit: NotRequired[ + "Literal['always', 'if_fingerprinting_not_supported', 'never']|str" + ] + """ + Set to `always` to skip the fingerprinting step and submit this Authentication immediately or `if_fingerprinting_not_supported` to submit this Authentication only if fingerprinting is not available. This parameter defaults to `never`. + + Refer to the [Submit at creation section of the standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-at-creation) for more information. + """ + + +class AuthenticationCreateParamsAcquirerDetails(TypedDict): + acquirer_bin: str + """ + The Acquirer BIN (specific to the directory_server). + """ + acquirer_country: str + """ + The two-letter country code of the acquirer ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + acquirer_merchant_id: str + """ + The Merchant ID (or Card Acceptor ID) that your acquirer assigned you (specific to the directory_server). + """ + mcc: NotRequired[str] + """ + The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) as defined by each payment system or directory server. + """ + merchant_name: NotRequired[str] + """ + The merchant name assigned by the acquirer or payment system. Same name used in the authorization message as defined in [ISO 8583](https://en.wikipedia.org/wiki/ISO_8583). + """ + requestor_id: NotRequired[str] + """ + Requestor ID if you're enrolled in the card network's 3DS program. Otherwise, you can omit this field because Stripe assigns a Requestor ID with the card networks. + """ + + +class AuthenticationCreateParamsChannel(TypedDict): + browser: NotRequired["AuthenticationCreateParamsChannelBrowser"] + """ + Contains additional details about the browser details you collected. + """ + three_r_i: NotRequired["AuthenticationCreateParamsChannelThreeRI"] + """ + Contains additional details about the 3DS Requestor Initiated (3RI) channel. + """ + type: Union[Literal["browser", "three_r_i"], str] + """ + Type of channel you would prefer to use for this 3DS Authentication. + """ + + +class AuthenticationCreateParamsChannelBrowser(TypedDict): + accept_header: str + """ + The HTTP accept headers from the cardholder's browser. Collected server-side. + """ + color_depth: NotRequired[int] + """ + The color depth of the cardholder's screen. + + Returned from the `screen.colorDepth` property. + """ + device_id: NotRequired[str] + """ + Unique and immutable identifier linked to a device that is consistent across 3DS transactions for the specific user device. For example: hardware device ID or a platform-calculated device fingerprint. + """ + ip_address: str + """ + The IP address of the browser. Included in the HTTP request to your server before you create the 3DS Authentication. + + Collected server-side. + """ + java_enabled: NotRequired[bool] + """ + The cardholder browser's ability to execute Java. Returned from the navigator.javaEnabled property. + """ + javascript_enabled: bool + """ + The cardholder browser's ability to execute JavaScript. + """ + language: str + """ + An IETF BCP 47 language tag representing the browser language. Typically returned from the `navigator.language` property, but might also be returned from `navigator.languages` or `navigator.browserLanguage`. + + In some cases, this value might be an array. To cast it to a string or null value, you can use the `getBrowserLanguage()` [example function](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#pass-client-side-collected-channel-information). + """ + screen_height: NotRequired[int] + """ + The total height of the cardholder's screen in pixels. + + Returned from the `screen.height` property. + """ + screen_width: NotRequired[int] + """ + The total width of the cardholder's screen in pixels. + + Returned from the `screen.width` property. + """ + timezone_offset: NotRequired[int] + """ + The time difference between UTC time and the local time of the cardholder's browser, in minutes. + + Returned by `new Date().getTimezoneOffset()` + """ + user_agent: str + """ + The browser user agent. You can retrieve this value on the client side using the `navigator.userAgent` property, or in the HTTP request to your server before you create the 3DS Authentication. + """ + + +class AuthenticationCreateParamsChannelThreeRI(TypedDict): + previous_authentication: str + """ + ID of a prior `Authentication`. For example, the first recurring transaction that was authenticated by the cardholder. + """ + type: Union[ + Literal[ + "delayed_shipment", "other_payment", "recurring", "split_shipment" + ], + str, + ] + """ + It provides additional information to the ACS to determine the best approach for handling a 3RI request. + """ + + +class AuthenticationCreateParamsFlowPreference(TypedDict): + challenge: NotRequired["AuthenticationCreateParamsFlowPreferenceChallenge"] + """ + Contains additional details about your challenge flow preference for this 3DS Authentication. + """ + data_share: NotRequired[ + "AuthenticationCreateParamsFlowPreferenceDataShare" + ] + """ + Contains additional details about your data share only flow preference for this 3DS Authentication. + """ + frictionless: NotRequired[ + "AuthenticationCreateParamsFlowPreferenceFrictionless" + ] + """ + Contains additional details about your frictionless flow preference for this 3DS Authentication. + """ + type: Union[Literal["challenge", "data_share", "frictionless"], str] + """ + Type of flow you requested for this 3DS Authentication. + """ + + +class AuthenticationCreateParamsFlowPreferenceChallenge(TypedDict): + type: Union[Literal["mandated", "preferred"], str] + """ + Type of challenge flow you requested for this 3DS Authentication. + """ + + +class AuthenticationCreateParamsFlowPreferenceDataShare(TypedDict): + type: Union[Literal["ds_specific", "emv_standard"], str] + """ + Type of data share only flow you requested for this 3DS Authentication. + """ + + +class AuthenticationCreateParamsFlowPreferenceFrictionless(TypedDict): + type: Union[Literal["low_risk", "none"], str] + """ + Type of frictionless flow you requested for this 3DS Authentication. + """ + + +class AuthenticationCreateParamsFutureUsage(TypedDict): + installment: NotRequired[ + "AuthenticationCreateParamsFutureUsageInstallment" + ] + """ + Parameters related to an installment payment. + """ + recurring: NotRequired["AuthenticationCreateParamsFutureUsageRecurring"] + """ + Parameters related to a recurring payment. + """ + type: Union[Literal["card_on_file", "installment", "recurring"], str] + """ + The type of future usage declared for this 3DS Authentication + """ + + +class AuthenticationCreateParamsFutureUsageInstallment(TypedDict): + amount: int + """ + A non-negative integer representing the future authorizations' amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + """ + expiry: "AuthenticationCreateParamsFutureUsageInstallmentExpiry" + """ + Information about the expiry of the future usage of this authentication. + """ + interval: NotRequired[Literal["day"]] + """ + The unit of time for `interval_count`. + """ + interval_count: NotRequired[int] + """ + The minimum number of time intervals between authorizations. Must be greater than 0, and defaults to 1. + """ + number: int + """ + The maximum number of installments. Must be greater than 1. + """ + + +class AuthenticationCreateParamsFutureUsageInstallmentExpiry(TypedDict): + date: NotRequired[str] + """ + The date before which the last authorization related to this authentication will occur. + """ + type: Union[Literal["date", "never"], str] + """ + The type of expiry for the future use of this authentication. + """ + + +class AuthenticationCreateParamsFutureUsageRecurring(TypedDict): + amount: int + """ + A non-negative integer representing the future authorizations' amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + """ + expiry: "AuthenticationCreateParamsFutureUsageRecurringExpiry" + """ + Information about the expiry of the future usage of this authentication. + """ + interval: NotRequired[Literal["day"]] + """ + The unit of time for `interval_count`. + """ + interval_count: NotRequired[int] + """ + The minimum number of time intervals between authorizations. Must be greater than 0, and defaults to 1. + """ + + +class AuthenticationCreateParamsFutureUsageRecurringExpiry(TypedDict): + date: NotRequired[str] + """ + The date before which the last authorization related to this authentication will occur. + """ + type: Union[Literal["date", "never"], str] + """ + The type of expiry for the future use of this authentication. + """ + + +class AuthenticationCreateParamsPaymentMethodData(TypedDict): + billing_details: NotRequired[ + "AuthenticationCreateParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + card: "AuthenticationCreateParamsPaymentMethodDataCard" + type: Literal["card"] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + + +class AuthenticationCreateParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "AuthenticationCreateParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired[str] + """ + Email address. + """ + name: NotRequired[str] + """ + Full name. + """ + phone: NotRequired[str] + """ + Billing phone number (including extension). + """ + + +class AuthenticationCreateParamsPaymentMethodDataBillingDetailsAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + Country subdivision code defined in ISO 3166-2. + """ + + +class AuthenticationCreateParamsPaymentMethodDataCard(TypedDict): + cvc: NotRequired[str] + exp_month: NotRequired[int] + exp_year: NotRequired[int] + number: NotRequired[str] + token: NotRequired[str] + + +class AuthenticationCreateParamsShippingAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + Country subdivision code defined in ISO 3166-2. + """ diff --git a/stripe/params/three_d_secure/_authentication_list_params.py b/stripe/params/three_d_secure/_authentication_list_params.py new file mode 100644 index 000000000..4cdd49167 --- /dev/null +++ b/stripe/params/three_d_secure/_authentication_list_params.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AuthenticationListParams(RequestOptions): + created: NotRequired["AuthenticationListParamsCreated|int"] + """ + A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. + """ + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ + status: NotRequired[ + "Literal['canceled', 'error', 'failed', 'requires_challenge', 'requires_submission', 'succeeded']|str" + ] + """ + Only return 3D Secure Authentications for specified status. + """ + + +class AuthenticationListParamsCreated(TypedDict): + gt: NotRequired[int] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired[int] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired[int] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired[int] + """ + Maximum value to filter by (inclusive) + """ diff --git a/stripe/params/three_d_secure/_authentication_retrieve_params.py b/stripe/params/three_d_secure/_authentication_retrieve_params.py new file mode 100644 index 000000000..c331c241a --- /dev/null +++ b/stripe/params/three_d_secure/_authentication_retrieve_params.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class AuthenticationRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/three_d_secure/_authentication_submit_params.py b/stripe/params/three_d_secure/_authentication_submit_params.py new file mode 100644 index 000000000..84bdd02ee --- /dev/null +++ b/stripe/params/three_d_secure/_authentication_submit_params.py @@ -0,0 +1,25 @@ +# -*- 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 + + +class AuthenticationSubmitParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fingerprinting_result: NotRequired[str] + """ + The fingerprinting result of the issuer fingerprinting step. + + Refer to the [Issuer fingerprinting section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#issuer-fingerprinting) for more information. + """ + metadata: NotRequired[ + "Literal['']|Dict[str, str]|UntypedStripeObject[str]" + ] + """ + Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/treasury/_received_credit_create_params.py b/stripe/params/treasury/_received_credit_create_params.py index 8797a0097..f59d7aa3e 100644 --- a/stripe/params/treasury/_received_credit_create_params.py +++ b/stripe/params/treasury/_received_credit_create_params.py @@ -32,7 +32,7 @@ class ReceivedCreditCreateParams(RequestOptions): """ Initiating payment method details for the object. """ - network: Union[Literal["ach", "us_domestic_wire"], str] + network: Union[Literal["ach", "rtp", "us_domestic_wire"], str] """ Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. """ diff --git a/stripe/params/v2/__init__.py b/stripe/params/v2/__init__.py index ac2b6fca5..5d5b2b79d 100644 --- a/stripe/params/v2/__init__.py +++ b/stripe/params/v2/__init__.py @@ -7,6 +7,7 @@ from stripe.params.v2 import ( billing as billing, core as core, + data as data, extend as extend, iam as iam, money_management as money_management, @@ -25,6 +26,7 @@ _import_map = { "billing": ("stripe.params.v2.billing", True), "core": ("stripe.params.v2.core", True), + "data": ("stripe.params.v2.data", True), "extend": ("stripe.params.v2.extend", True), "iam": ("stripe.params.v2.iam", True), "money_management": ("stripe.params.v2.money_management", True), diff --git a/stripe/params/v2/billing/__init__.py b/stripe/params/v2/billing/__init__.py index 272ab22ad..49f1b610a 100644 --- a/stripe/params/v2/billing/__init__.py +++ b/stripe/params/v2/billing/__init__.py @@ -159,6 +159,14 @@ ) from stripe.params.v2.billing._contract_update_params import ( ContractUpdateParams as ContractUpdateParams, + ContractUpdateParamsBillingSettings as ContractUpdateParamsBillingSettings, + ContractUpdateParamsBillingSettingsBillSettingsDetails as ContractUpdateParamsBillingSettingsBillSettingsDetails, + ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculation as ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculation, + ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculationTax as ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculationTax, + ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoice as ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoice, + ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoiceTimeUntilDue as ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoiceTimeUntilDue, + ContractUpdateParamsBillingSettingsBillingProfileDetails as ContractUpdateParamsBillingSettingsBillingProfileDetails, + ContractUpdateParamsBillingSettingsCollectionSettingsDetails as ContractUpdateParamsBillingSettingsCollectionSettingsDetails, ContractUpdateParamsOneTimeFeeAction as ContractUpdateParamsOneTimeFeeAction, ContractUpdateParamsOneTimeFeeActionAdd as ContractUpdateParamsOneTimeFeeActionAdd, ContractUpdateParamsOneTimeFeeActionAddBillAt as ContractUpdateParamsOneTimeFeeActionAddBillAt, @@ -908,6 +916,38 @@ "stripe.params.v2.billing._contract_update_params", False, ), + "ContractUpdateParamsBillingSettings": ( + "stripe.params.v2.billing._contract_update_params", + False, + ), + "ContractUpdateParamsBillingSettingsBillSettingsDetails": ( + "stripe.params.v2.billing._contract_update_params", + False, + ), + "ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculation": ( + "stripe.params.v2.billing._contract_update_params", + False, + ), + "ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculationTax": ( + "stripe.params.v2.billing._contract_update_params", + False, + ), + "ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoice": ( + "stripe.params.v2.billing._contract_update_params", + False, + ), + "ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoiceTimeUntilDue": ( + "stripe.params.v2.billing._contract_update_params", + False, + ), + "ContractUpdateParamsBillingSettingsBillingProfileDetails": ( + "stripe.params.v2.billing._contract_update_params", + False, + ), + "ContractUpdateParamsBillingSettingsCollectionSettingsDetails": ( + "stripe.params.v2.billing._contract_update_params", + False, + ), "ContractUpdateParamsOneTimeFeeAction": ( "stripe.params.v2.billing._contract_update_params", False, diff --git a/stripe/params/v2/billing/_contract_create_params.py b/stripe/params/v2/billing/_contract_create_params.py index a6f89ea3c..8d9f1d0a3 100644 --- a/stripe/params/v2/billing/_contract_create_params.py +++ b/stripe/params/v2/billing/_contract_create_params.py @@ -358,9 +358,9 @@ class ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideEndsAt( class ContractCreateParamsPricingLinePricingPriceDetailsPricingOverrideOverwritePrice( TypedDict, ): - unit_amount: NotRequired[str] + unit_amount: NotRequired[Decimal] """ - The per-unit amount to be charged, represented as a decimal string in minor currency units. + The per-unit amount to be charged in minor currency units. """ @@ -465,9 +465,9 @@ class ContractCreateParamsPricingOverrideMultiplyPricing(TypedDict): """ Criteria determining which rates the multiply_pricing override applies to. """ - factor: str + factor: Decimal """ - The multiply_pricing factor, represented as a decimal string. e.g. "0.8" for a 20% reduction. + The multiply_pricing factor. e.g. "0.8" for a 20% reduction. """ diff --git a/stripe/params/v2/billing/_contract_update_params.py b/stripe/params/v2/billing/_contract_update_params.py index f801c74df..32f2aad4d 100644 --- a/stripe/params/v2/billing/_contract_update_params.py +++ b/stripe/params/v2/billing/_contract_update_params.py @@ -8,6 +8,10 @@ class ContractUpdateParams(TypedDict): + billing_settings: NotRequired["ContractUpdateParamsBillingSettings"] + """ + The billing settings to update on the contract. + """ include: NotRequired[ List[ Union[ @@ -50,6 +54,105 @@ class ContractUpdateParams(TypedDict): """ +class ContractUpdateParamsBillingSettings(TypedDict): + bill_settings_details: NotRequired[ + "ContractUpdateParamsBillingSettingsBillSettingsDetails" + ] + """ + The bill settings to update (tax calculation type and/or invoice time until due). + """ + billing_profile_details: NotRequired[ + "ContractUpdateParamsBillingSettingsBillingProfileDetails" + ] + """ + 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. + """ + + +class ContractUpdateParamsBillingSettingsBillSettingsDetailsCalculationTax( + TypedDict, +): + type: Literal["automatic", "manual"] + """ + The type of tax calculation. + """ + + +class ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoice(TypedDict): + time_until_due: NotRequired[ + "ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoiceTimeUntilDue" + ] + """ + How long the customer has to pay the invoice before it's past due. + """ + + +class ContractUpdateParamsBillingSettingsBillSettingsDetailsInvoiceTimeUntilDue( + 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"] """ @@ -295,9 +398,9 @@ class ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverride class ContractUpdateParamsPricingLineActionAddPricingPriceDetailsPricingOverrideOverwritePrice( TypedDict, ): - unit_amount: NotRequired[str] + unit_amount: NotRequired[Decimal] """ - The per-unit amount to be charged, represented as a decimal string in minor currency units. + The per-unit amount to be charged in minor currency units. """ @@ -506,9 +609,9 @@ class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverr class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverrideActionAddOverwritePrice( TypedDict, ): - unit_amount: NotRequired[str] + unit_amount: NotRequired[Decimal] """ - The per-unit amount to be charged, represented as a decimal string in minor currency units. + The per-unit amount to be charged in minor currency units. """ diff --git a/stripe/params/v2/core/__init__.py b/stripe/params/v2/core/__init__.py index 9b19e6c75..e0efa49c3 100644 --- a/stripe/params/v2/core/__init__.py +++ b/stripe/params/v2/core/__init__.py @@ -207,12 +207,18 @@ AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigration, + AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtections, + AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtectionsPspMigration, AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigration, AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigration, + AccountCreateParamsConfigurationMerchantCapabilitiesSequraPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSequraPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtections, + AccountCreateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtectionsPspMigration, AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPaymentsProtectionsPspMigration, @@ -237,6 +243,7 @@ AccountCreateParamsConfigurationMerchantScriptStatementDescriptor as AccountCreateParamsConfigurationMerchantScriptStatementDescriptor, AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKana as AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKana, AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji as AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji, + AccountCreateParamsConfigurationMerchantSepaDebitPayments as AccountCreateParamsConfigurationMerchantSepaDebitPayments, AccountCreateParamsConfigurationMerchantSmartDisputes as AccountCreateParamsConfigurationMerchantSmartDisputes, AccountCreateParamsConfigurationMerchantSmartDisputesAutoRespond as AccountCreateParamsConfigurationMerchantSmartDisputesAutoRespond, AccountCreateParamsConfigurationMerchantStatementDescriptor as AccountCreateParamsConfigurationMerchantStatementDescriptor, @@ -258,6 +265,9 @@ AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtectionsPspMigration, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtections, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtectionsPspMigration, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtectionsPspMigration, @@ -277,6 +287,9 @@ AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtectionsPspMigration, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtections, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtectionsPspMigration, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtections as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtections, AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtectionsPspMigration as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtectionsPspMigration, @@ -824,12 +837,18 @@ AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigration, + AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtections, + AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtectionsPspMigration, AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigration, AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigration, + AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtections, + AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtectionsPspMigration, AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPaymentsProtectionsPspMigration, @@ -854,6 +873,7 @@ AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor, AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKana as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKana, AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji, + AccountUpdateParamsConfigurationMerchantSepaDebitPayments as AccountUpdateParamsConfigurationMerchantSepaDebitPayments, AccountUpdateParamsConfigurationMerchantSmartDisputes as AccountUpdateParamsConfigurationMerchantSmartDisputes, AccountUpdateParamsConfigurationMerchantSmartDisputesAutoRespond as AccountUpdateParamsConfigurationMerchantSmartDisputesAutoRespond, AccountUpdateParamsConfigurationMerchantStatementDescriptor as AccountUpdateParamsConfigurationMerchantStatementDescriptor, @@ -875,6 +895,9 @@ AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbpProtectionsPspMigration, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtections, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtectionsPspMigration, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsdProtectionsPspMigration, @@ -894,6 +917,9 @@ AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbpProtectionsPspMigration, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtections, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtectionsPspMigration, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtections as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtections, AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtectionsPspMigration as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsdProtectionsPspMigration, @@ -2010,6 +2036,18 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -2034,6 +2072,18 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantCapabilitiesSequraPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -2130,6 +2180,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantSepaDebitPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantSmartDisputes": ( "stripe.params.v2.core._account_create_params", False, @@ -2214,6 +2268,18 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd": ( "stripe.params.v2.core._account_create_params", False, @@ -2290,6 +2356,18 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd": ( "stripe.params.v2.core._account_create_params", False, @@ -4419,6 +4497,18 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments": ( "stripe.params.v2.core._account_update_params", False, @@ -4443,6 +4533,18 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments": ( "stripe.params.v2.core._account_update_params", False, @@ -4539,6 +4641,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantSepaDebitPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantSmartDisputes": ( "stripe.params.v2.core._account_update_params", False, @@ -4623,6 +4729,18 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd": ( "stripe.params.v2.core._account_update_params", False, @@ -4699,6 +4817,18 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd": ( "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 5d462230e..7154d1b0b 100644 --- a/stripe/params/v2/core/_account_create_params.py +++ b/stripe/params/v2/core/_account_create_params.py @@ -1055,6 +1055,12 @@ class AccountCreateParamsConfigurationMerchant(TypedDict): """ Settings for the default text that appears on statements for language variations. """ + sepa_debit_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantSepaDebitPayments" + ] + """ + Settings used for SEPA Direct Debit payments. + """ smart_disputes: NotRequired[ "AccountCreateParamsConfigurationMerchantSmartDisputes" ] @@ -1334,6 +1340,12 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process Samsung Pay payments. """ + satispay_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPayments" + ] + """ + Allow the merchant to process Satispay payments. + """ sepa_bank_transfer_payments: NotRequired[ "AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments" ] @@ -1346,6 +1358,12 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process SEPA Direct Debit payments. """ + sequra_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesSequraPayments" + ] + """ + Allow the merchant to process SeQura payments. + """ sunbit_payments: NotRequired[ "AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments" ] @@ -2665,6 +2683,39 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPaymentsProt """ +class AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPayments( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtections" + ] + """ + 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 AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments( TypedDict, ): @@ -2731,6 +2782,39 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPaymentsProte """ +class AccountCreateParamsConfigurationMerchantCapabilitiesSequraPayments( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtections" + ] + """ + 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 AccountCreateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments( TypedDict, ): @@ -3007,6 +3091,13 @@ class AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji( """ +class AccountCreateParamsConfigurationMerchantSepaDebitPayments(TypedDict): + creditor_id: NotRequired[str] + """ + Creditor ID for SEPA Direct Debit payments. + """ + + class AccountCreateParamsConfigurationMerchantSmartDisputes(TypedDict): auto_respond: NotRequired[ "AccountCreateParamsConfigurationMerchantSmartDisputesAutoRespond" @@ -3255,6 +3346,12 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInb """ Can receive business storage-type funds on Stripe in GBP. """ + ousd: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd" + ] + """ + Can receive business storage-type funds on Stripe in OUSD. + """ usd: NotRequired[ "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd" ] @@ -3401,6 +3498,39 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInb """ +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtections" + ] + """ + 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 AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd( TypedDict, ): @@ -3494,6 +3624,12 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOut """ Can send business storage-type funds on Stripe in GBP. """ + ousd: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd" + ] + """ + Can send business storage-type funds on Stripe in OUSD. + """ usd: NotRequired[ "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd" ] @@ -3640,6 +3776,39 @@ class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOut """ +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtections" + ] + """ + 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 AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd( TypedDict, ): diff --git a/stripe/params/v2/core/_account_link_create_params.py b/stripe/params/v2/core/_account_link_create_params.py index a1aee0430..2714bec65 100644 --- a/stripe/params/v2/core/_account_link_create_params.py +++ b/stripe/params/v2/core/_account_link_create_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List, Union +from typing import Union from typing_extensions import Literal, NotRequired, TypedDict @@ -11,7 +11,9 @@ class AccountLinkCreateParams(TypedDict): """ use_case: "AccountLinkCreateParamsUseCase" """ - The use case of the AccountLink. + Specifies the Stripe-hosted flow for this Account Link. Set `type` and the matching options hash—for example, + `account_onboarding`—to configure the flow, including which Account configurations to collect information for and + any flow-specific collection or redirect options. """ @@ -59,22 +61,6 @@ class AccountLinkCreateParamsUseCaseAccountOnboarding(TypedDict): """ Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ - configurations: List[ - Union[ - Literal[ - "customer", - "developer", - "merchant", - "money_manager", - "recipient", - "storer", - ], - str, - ] - ] - """ - Open Enum. A v2/core/account can be configured to enable certain functionality. The configuration param targets the v2/core/account_link to collect information for the specified v2/core/account configuration/s. - """ refresh_url: str """ The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink's URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party. @@ -105,22 +91,6 @@ class AccountLinkCreateParamsUseCaseAccountUpdate(TypedDict): """ Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ - configurations: List[ - Union[ - Literal[ - "customer", - "developer", - "merchant", - "money_manager", - "recipient", - "storer", - ], - str, - ] - ] - """ - Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s. - """ refresh_url: str """ The URL the user will be redirected to if the Account Link is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new Account Link with the same parameters used to create the original Account Link, then redirect the user to the new Account Link URL so they can continue the flow. Make sure to authenticate the user before redirecting to the new Account Link, in case the URL leaks to a third party. If a new Account Link can't be generated, or if the redirect fails, you should display a useful error to the user. @@ -149,10 +119,6 @@ class AccountLinkCreateParamsUseCaseRecipientOnboarding(TypedDict): """ Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ - configurations: List[Union[Literal["recipient"], str]] - """ - Open Enum. A v2/core/account can be configured to enable certain functionality. The configuration param targets the v2/core/account_link to collect information for the specified v2/core/account configuration/s. - """ refresh_url: str """ The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink's URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party. @@ -183,10 +149,6 @@ class AccountLinkCreateParamsUseCaseRecipientUpdate(TypedDict): """ Specifies the requirements that Stripe collects from v2/core/accounts in the Update flow. """ - configurations: List[Union[Literal["recipient"], str]] - """ - Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s. - """ refresh_url: str """ The URL the user will be redirected to if the Account Link is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new Account Link with the same parameters used to create the original Account Link, then redirect the user to the new Account Link URL so they can continue the flow. Make sure to authenticate the user before redirecting to the new Account Link, in case the URL leaks to a third party. If a new Account Link can't be generated, or if the redirect fails, you should display a useful error to the user. diff --git a/stripe/params/v2/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py index 0b765b60a..0addc03d9 100644 --- a/stripe/params/v2/core/_account_update_params.py +++ b/stripe/params/v2/core/_account_update_params.py @@ -1081,6 +1081,12 @@ class AccountUpdateParamsConfigurationMerchant(TypedDict): """ Settings for the default text that appears on statements for language variations. """ + sepa_debit_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantSepaDebitPayments" + ] + """ + Settings for SEPA Direct Debit payments. + """ smart_disputes: NotRequired[ "AccountUpdateParamsConfigurationMerchantSmartDisputes" ] @@ -1360,6 +1366,12 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process Samsung Pay payments. """ + satispay_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPayments" + ] + """ + Allow the merchant to process Satispay payments. + """ sepa_bank_transfer_payments: NotRequired[ "AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments" ] @@ -1372,6 +1384,12 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process SEPA Direct Debit payments. """ + sequra_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPayments" + ] + """ + Allow the merchant to process SeQura payments. + """ sunbit_payments: NotRequired[ "AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments" ] @@ -2691,6 +2709,39 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPaymentsProt """ +class AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPayments( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtections" + ] + """ + 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 AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments( TypedDict, ): @@ -2757,6 +2808,39 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPaymentsProte """ +class AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPayments( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtections" + ] + """ + 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 AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments( TypedDict, ): @@ -3033,6 +3117,13 @@ class AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji( """ +class AccountUpdateParamsConfigurationMerchantSepaDebitPayments(TypedDict): + creditor_id: NotRequired[str] + """ + Creditor ID for SEPA Direct Debit payments. + """ + + class AccountUpdateParamsConfigurationMerchantSmartDisputes(TypedDict): auto_respond: NotRequired[ "AccountUpdateParamsConfigurationMerchantSmartDisputesAutoRespond" @@ -3285,6 +3376,12 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInb """ Can receive business storage-type funds on Stripe in GBP. """ + ousd: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd" + ] + """ + Can receive business storage-type funds on Stripe in OUSD. + """ usd: NotRequired[ "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd" ] @@ -3431,6 +3528,39 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInb """ +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusd( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtections" + ] + """ + 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 AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundOusdProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd( TypedDict, ): @@ -3524,6 +3654,12 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOut """ Can send business storage-type funds on Stripe in GBP. """ + ousd: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd" + ] + """ + Can send business storage-type funds on Stripe in OUSD. + """ usd: NotRequired[ "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd" ] @@ -3670,6 +3806,39 @@ class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOut """ +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusd( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtections" + ] + """ + 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 AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundOusdProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd( TypedDict, ): diff --git a/stripe/params/v2/core/_event_destination_create_params.py b/stripe/params/v2/core/_event_destination_create_params.py index 4e3f42040..7396977c0 100644 --- a/stripe/params/v2/core/_event_destination_create_params.py +++ b/stripe/params/v2/core/_event_destination_create_params.py @@ -10,29 +10,29 @@ class EventDestinationCreateParams(TypedDict): "EventDestinationCreateParamsAmazonEventbridge" ] """ - Amazon EventBridge configuration. + AWS account and region where Stripe creates the EventBridge partner event source. """ azure_event_grid: NotRequired["EventDestinationCreateParamsAzureEventGrid"] """ - Azure Event Grid configuration. + Azure subscription, resource group, and region where Stripe creates the partner topic. """ description: NotRequired[str] """ - An optional description of what the event destination is used for. + An optional user-defined description of the destination's purpose. """ enabled_events: List[str] """ - The list of events to enable for this endpoint. + The list of event types enabled for delivery to this destination. """ event_payload: Literal["snapshot", "thin"] """ - Payload type of events being subscribed to. + Whether to deliver as snapshot or thin events. """ events_from: NotRequired[List[str]] """ - Specifies which accounts' events route to this destination. + The account or organization scopes that can supply events. Use this with `enabled_events` to define the subscription. `@self`: Receive events from the account that owns the event destination. - `@accounts`: Receive events emitted from other accounts you manage which includes your v1 and v2 accounts. + `@accounts`: Receive events emitted from other accounts you manage, including your v1 and v2 accounts. `@organization_members`: Receive events from accounts directly linked to the organization. `@organization_members/@accounts`: Receive events from all accounts connected to any platform accounts in the organization. """ @@ -47,63 +47,63 @@ class EventDestinationCreateParams(TypedDict): ] ] """ - Additional fields to include in the response. + Include normally redacted webhook fields in the create response. Public API clients must include `webhook_endpoint.signing_secret` to receive the signing secret. """ metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] """ - Metadata. + User-defined key/value data for the destination. """ name: str """ - Event destination name. + A user-defined label for identifying the destination. """ snapshot_api_version: NotRequired[str] """ - If using the snapshot event payload, the API version events are rendered as. + For snapshot events only, the Stripe API version used to render event objects; do not provide this for thin events. """ type: Union[ Literal["amazon_eventbridge", "azure_event_grid", "webhook_endpoint"], str, ] """ - Event destination type. + The delivery transport. Chosen when the destination is created and cannot be changed by update. """ webhook_endpoint: NotRequired[ "EventDestinationCreateParamsWebhookEndpoint" ] """ - Webhook endpoint configuration. + Delivery target for the webhook endpoint. Live mode requires HTTPS; sandbox mode also supports HTTP. """ class EventDestinationCreateParamsAmazonEventbridge(TypedDict): aws_account_id: str """ - The AWS account ID. + Your AWS account where Stripe creates the partner event source. """ aws_region: str """ - The region of the AWS event source. + The AWS region where Stripe creates the partner event source. """ class EventDestinationCreateParamsAzureEventGrid(TypedDict): azure_region: str """ - The Azure region. + The Azure region where Stripe creates the partner topic. """ azure_resource_group_name: str """ - The name of the Azure resource group. + The Azure resource group where Stripe creates the partner topic. """ azure_subscription_id: str """ - The Azure subscription ID. + The Azure subscription where Stripe creates the partner topic. """ class EventDestinationCreateParamsWebhookEndpoint(TypedDict): url: str """ - The URL of the webhook endpoint. + The URL where Stripe sends matching events. Live mode requires HTTPS; sandbox mode also supports HTTP. """ diff --git a/stripe/params/v2/core/_event_destination_list_params.py b/stripe/params/v2/core/_event_destination_list_params.py index d0cd324a3..74743a4f1 100644 --- a/stripe/params/v2/core/_event_destination_list_params.py +++ b/stripe/params/v2/core/_event_destination_list_params.py @@ -7,7 +7,7 @@ class EventDestinationListParams(TypedDict): include: NotRequired[List[Union[Literal["webhook_endpoint.url"], str]]] """ - Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + Include the normally redacted `webhook_endpoint.url` in each returned destination. """ limit: NotRequired[int] """ diff --git a/stripe/params/v2/core/_event_destination_update_params.py b/stripe/params/v2/core/_event_destination_update_params.py index b9b59ba83..f86bd85a4 100644 --- a/stripe/params/v2/core/_event_destination_update_params.py +++ b/stripe/params/v2/core/_event_destination_update_params.py @@ -8,15 +8,15 @@ class EventDestinationUpdateParams(TypedDict): description: NotRequired[str] """ - An optional description of what the event destination is used for. + An optional user-defined description of the destination's purpose; it does not control routing. """ enabled_events: NotRequired[List[str]] """ - The list of events to enable for this endpoint. + The list of event types enabled for delivery to this destination. Event scopes are configured when the destination is created. """ include: NotRequired[List[Union[Literal["webhook_endpoint.url"], str]]] """ - Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + Include the normally redacted `webhook_endpoint.url` in the response. """ metadata: NotRequired[ "Dict[str, Optional[str]]|UntypedStripeObject[Optional[str]]" @@ -26,18 +26,18 @@ class EventDestinationUpdateParams(TypedDict): """ name: NotRequired[str] """ - Event destination name. + A user-defined label for identifying the destination; it does not control routing. """ webhook_endpoint: NotRequired[ "EventDestinationUpdateParamsWebhookEndpoint" ] """ - Webhook endpoint configuration. + New delivery target for the webhook endpoint. Live mode requires HTTPS; sandbox mode also supports HTTP. """ class EventDestinationUpdateParamsWebhookEndpoint(TypedDict): url: str """ - The URL of the webhook endpoint. + The URL where Stripe sends matching events. Live mode requires HTTPS; sandbox mode also supports HTTP. """ diff --git a/stripe/params/v2/core/vault/_network_token_create_from_credential_params.py b/stripe/params/v2/core/vault/_network_token_create_from_credential_params.py index 686f41cb8..5f3ef018f 100644 --- a/stripe/params/v2/core/vault/_network_token_create_from_credential_params.py +++ b/stripe/params/v2/core/vault/_network_token_create_from_credential_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from typing import Union from typing_extensions import Literal, NotRequired, TypedDict @@ -8,14 +9,14 @@ class NetworkTokenCreateFromCredentialParams(TypedDict): """ The existing Stripe card reference to provision or resolve. """ - type: Literal["card"] + type: Union[Literal["card"], str] """ Private preview supports card only. """ class NetworkTokenCreateFromCredentialParamsCard(TypedDict): - origin: NotRequired[Literal["card_on_file"]] + origin: NotRequired["Literal['card_on_file', 'wallet']|str"] """ The optional origin attestation for the referenced card. """ diff --git a/stripe/params/v2/core/vault/_network_token_create_params.py b/stripe/params/v2/core/vault/_network_token_create_params.py index fd561504b..6b0009f65 100644 --- a/stripe/params/v2/core/vault/_network_token_create_params.py +++ b/stripe/params/v2/core/vault/_network_token_create_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from typing import Union from typing_extensions import Literal, NotRequired, TypedDict @@ -8,7 +9,7 @@ class NetworkTokenCreateParams(TypedDict): """ Raw card values used to provision the network token. """ - type: Literal["card"] + type: Union[Literal["card"], str] """ Private preview supports card only. """ @@ -27,7 +28,7 @@ class NetworkTokenCreateParamsCard(TypedDict): """ The card number. """ - origin: NotRequired[Literal["card_on_file"]] + origin: NotRequired["Literal['card_on_file', 'wallet']|str"] """ The optional origin attestation for the card. """ diff --git a/stripe/params/v2/core/vault/_network_token_generate_cryptogram_params.py b/stripe/params/v2/core/vault/_network_token_generate_cryptogram_params.py index 7ec78f46a..3db89ff5c 100644 --- a/stripe/params/v2/core/vault/_network_token_generate_cryptogram_params.py +++ b/stripe/params/v2/core/vault/_network_token_generate_cryptogram_params.py @@ -4,7 +4,7 @@ class NetworkTokenGenerateCryptogramParams(TypedDict): - type: NotRequired[Literal["token_cryptogram"]] + type: NotRequired["Literal['token_cryptogram']|str"] """ The cryptogram type. When omitted, token_cryptogram is used. """ diff --git a/stripe/params/v2/data/__init__.py b/stripe/params/v2/data/__init__.py index 71892b1d6..18d94a4ae 100644 --- a/stripe/params/v2/data/__init__.py +++ b/stripe/params/v2/data/__init__.py @@ -8,11 +8,81 @@ analytics as analytics, reporting as reporting, ) + from stripe.params.v2.data._query_run_create_params import ( + QueryRunCreateParams as QueryRunCreateParams, + QueryRunCreateParamsQuery as QueryRunCreateParamsQuery, + QueryRunCreateParamsResultOptions as QueryRunCreateParamsResultOptions, + ) + from stripe.params.v2.data._query_run_retrieve_params import ( + QueryRunRetrieveParams as QueryRunRetrieveParams, + ) + from stripe.params.v2.data._report_list_params import ( + ReportListParams as ReportListParams, + ) + from stripe.params.v2.data._report_retrieve_params import ( + ReportRetrieveParams as ReportRetrieveParams, + ) + from stripe.params.v2.data._report_run_create_params import ( + ReportRunCreateParams as ReportRunCreateParams, + ReportRunCreateParamsReport as ReportRunCreateParamsReport, + ReportRunCreateParamsResultOptions as ReportRunCreateParamsResultOptions, + ) + from stripe.params.v2.data._report_run_retrieve_params import ( + ReportRunRetrieveParams as ReportRunRetrieveParams, + ) + from stripe.params.v2.data._schema_list_params import ( + SchemaListParams as SchemaListParams, + ) + from stripe.params.v2.data._schema_retrieve_params import ( + SchemaRetrieveParams as SchemaRetrieveParams, + ) # name -> (import_target, is_submodule) _import_map = { "analytics": ("stripe.params.v2.data.analytics", True), "reporting": ("stripe.params.v2.data.reporting", True), + "QueryRunCreateParams": ( + "stripe.params.v2.data._query_run_create_params", + False, + ), + "QueryRunCreateParamsQuery": ( + "stripe.params.v2.data._query_run_create_params", + False, + ), + "QueryRunCreateParamsResultOptions": ( + "stripe.params.v2.data._query_run_create_params", + False, + ), + "QueryRunRetrieveParams": ( + "stripe.params.v2.data._query_run_retrieve_params", + False, + ), + "ReportListParams": ("stripe.params.v2.data._report_list_params", False), + "ReportRetrieveParams": ( + "stripe.params.v2.data._report_retrieve_params", + False, + ), + "ReportRunCreateParams": ( + "stripe.params.v2.data._report_run_create_params", + False, + ), + "ReportRunCreateParamsReport": ( + "stripe.params.v2.data._report_run_create_params", + False, + ), + "ReportRunCreateParamsResultOptions": ( + "stripe.params.v2.data._report_run_create_params", + False, + ), + "ReportRunRetrieveParams": ( + "stripe.params.v2.data._report_run_retrieve_params", + False, + ), + "SchemaListParams": ("stripe.params.v2.data._schema_list_params", False), + "SchemaRetrieveParams": ( + "stripe.params.v2.data._schema_retrieve_params", + False, + ), } if not TYPE_CHECKING: diff --git a/stripe/params/v2/data/_query_run_create_params.py b/stripe/params/v2/data/_query_run_create_params.py new file mode 100644 index 000000000..b6bf413ea --- /dev/null +++ b/stripe/params/v2/data/_query_run_create_params.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class QueryRunCreateParams(TypedDict): + dataset: Union[Literal["analytical"], str] + """ + The dataset to query. + """ + format: Union[Literal["csv"], str] + """ + The file format for the result. + """ + query: "QueryRunCreateParamsQuery" + """ + The query to execute. + """ + result_options: NotRequired["QueryRunCreateParamsResultOptions"] + """ + Optional settings that customize the generated result file. + """ + + +class QueryRunCreateParamsQuery(TypedDict): + sql: NotRequired[str] + """ + Ad-hoc SQL to execute. + """ + + +class QueryRunCreateParamsResultOptions(TypedDict): + compress_file: NotRequired[bool] + """ + If set, the generated result file is compressed into a ZIP archive before + it is stored. This applies only to downloadable file results. + """ diff --git a/stripe/params/v2/data/_query_run_retrieve_params.py b/stripe/params/v2/data/_query_run_retrieve_params.py new file mode 100644 index 000000000..c20c20681 --- /dev/null +++ b/stripe/params/v2/data/_query_run_retrieve_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class QueryRunRetrieveParams(TypedDict): + include: NotRequired[List[Union[Literal["result.inline"], str]]] + """ + Any optional includes (see https://docs.stripe.com/api-includable-response-values). + """ + limit: NotRequired[int] + """ + The maximum number of inline `QueryRun` result rows to return. Defaults to 10. Maximum is 1000. + """ + page: NotRequired[str] + """ + The page token for paginating the inline `QueryRun` result rows. + """ diff --git a/stripe/params/v2/data/_report_list_params.py b/stripe/params/v2/data/_report_list_params.py new file mode 100644 index 000000000..9ceefdc3e --- /dev/null +++ b/stripe/params/v2/data/_report_list_params.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class ReportListParams(TypedDict): + include: NotRequired[ + List[Union[Literal["default_sql", "parameters"], str]] + ] + """ + Any optional includes (see https://docs.stripe.com/api-includable-response-values). + """ + limit: NotRequired[int] + """ + The maximum number of results per page. Defaults to 10. Maximum is 100. + """ + name: NotRequired[str] + """ + If supplied, only return reports with this exact, case-sensitive name. + """ diff --git a/stripe/params/v2/data/_report_retrieve_params.py b/stripe/params/v2/data/_report_retrieve_params.py new file mode 100644 index 000000000..c8b94d16b --- /dev/null +++ b/stripe/params/v2/data/_report_retrieve_params.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class ReportRetrieveParams(TypedDict): + include: NotRequired[ + List[Union[Literal["default_sql", "parameters"], str]] + ] + """ + Any optional includes (see https://docs.stripe.com/api-includable-response-values). + """ diff --git a/stripe/params/v2/data/_report_run_create_params.py b/stripe/params/v2/data/_report_run_create_params.py new file mode 100644 index 000000000..49568b927 --- /dev/null +++ b/stripe/params/v2/data/_report_run_create_params.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import UntypedStripeObject +from typing import Any, Dict, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class ReportRunCreateParams(TypedDict): + format: Union[Literal["csv"], str] + """ + The file format for the result. + """ + parameters: "Dict[str, Any]|UntypedStripeObject[Any]" + """ + A map of parameter names to values, specifying how the report should be customized. + The accepted parameters depend on the specific `Report` being run. + """ + report: "ReportRunCreateParamsReport" + """ + A reference to the `Report` to run, by ID or name. + """ + result_options: NotRequired["ReportRunCreateParamsResultOptions"] + """ + Optional settings that customize the generated result file. + """ + + +class ReportRunCreateParamsReport(TypedDict): + id: NotRequired[str] + """ + The unique identifier of the `Report`. + """ + name: NotRequired[str] + """ + The human-readable name of the `Report`. + """ + + +class ReportRunCreateParamsResultOptions(TypedDict): + compress_file: NotRequired[bool] + """ + If set, the generated result file is compressed into a ZIP archive before + it is stored. This applies only to downloadable file results. + """ diff --git a/stripe/params/v2/data/_report_run_retrieve_params.py b/stripe/params/v2/data/_report_run_retrieve_params.py new file mode 100644 index 000000000..9677ba7b1 --- /dev/null +++ b/stripe/params/v2/data/_report_run_retrieve_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class ReportRunRetrieveParams(TypedDict): + include: NotRequired[List[Union[Literal["result.inline", "sql"], str]]] + """ + Any optional includes (see https://docs.stripe.com/api-includable-response-values). + """ + limit: NotRequired[int] + """ + The maximum number of inline `ReportRun` result rows to return. Defaults to 10. Maximum is 1000. + """ + page: NotRequired[str] + """ + The page token for paginating the inline `ReportRun` result rows. + """ diff --git a/stripe/params/v2/data/_schema_list_params.py b/stripe/params/v2/data/_schema_list_params.py new file mode 100644 index 000000000..d29135298 --- /dev/null +++ b/stripe/params/v2/data/_schema_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class SchemaListParams(TypedDict): + dataset: NotRequired["Literal['analytical']|str"] + """ + If supplied, only return schemas belonging to this dataset. + """ + include: NotRequired[List[Union[Literal["columns"], str]]] + """ + Any optional includes (see https://docs.stripe.com/api-includable-response-values). + """ + limit: NotRequired[int] + """ + The maximum number of results per page. Defaults to 10. Maximum is 100. + """ + name: NotRequired[str] + """ + If supplied, only return schemas with this name. + """ diff --git a/stripe/params/v2/data/_schema_retrieve_params.py b/stripe/params/v2/data/_schema_retrieve_params.py new file mode 100644 index 000000000..788a47c13 --- /dev/null +++ b/stripe/params/v2/data/_schema_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class SchemaRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/iam/_activity_log_list_params.py b/stripe/params/v2/iam/_activity_log_list_params.py index 6d05526f7..232cbbda9 100644 --- a/stripe/params/v2/iam/_activity_log_list_params.py +++ b/stripe/params/v2/iam/_activity_log_list_params.py @@ -8,7 +8,19 @@ class ActivityLogListParams(TypedDict): action_groups: NotRequired[ List[ Union[ - Literal["api_key", "user_access", "user_invite", "user_roles"], + Literal[ + "account_security", + "api_key", + "authentication", + "issuing", + "payout", + "scim", + "sso", + "user_access", + "user_invite", + "user_profile", + "user_roles", + ], str, ] ] @@ -20,16 +32,66 @@ class ActivityLogListParams(TypedDict): List[ Union[ Literal[ + "anomaly_detection_settings_updated", "api_key_created", "api_key_deleted", "api_key_updated", "api_key_viewed", + "issuing_activated", + "issuing_balance_transfer_created", + "issuing_cardholder_created", + "issuing_cardholder_updated", + "issuing_card_created", + "issuing_card_sensitive_details_viewed", + "issuing_card_updated", + "issuing_dispute_created", + "issuing_dispute_submitted", + "issuing_dispute_updated", + "manual_payouts_disabled", + "manual_payouts_enabled", + "payout_destination_added", + "payout_destination_removed", + "payout_destination_updated", + "payout_schedule_edits_disabled", + "payout_schedule_edits_enabled", + "scim_group_deleted", + "scim_group_member_added", + "scim_group_member_removed", + "scim_group_roles_updated", + "scim_group_updated", + "sso_domain_verified", + "sso_settings_created", + "sso_settings_deleted", + "sso_settings_updated", + "two_step_authentication_mandate_disabled", + "two_step_authentication_mandate_enabled", "user_access_started", + "user_auth_challenge_failed", + "user_email_changed", + "user_email_verified", + "user_express_phone_number_changed", + "user_google_account_connected", + "user_google_account_disconnected", "user_invite_accepted", "user_invite_created", "user_invite_deleted", + "user_passkey_added", + "user_passkey_removed", + "user_passkey_updated", + "user_passkey_upgraded", + "user_password_changed", + "user_password_initialized", + "user_password_reset_failed", + "user_password_reset_requested", + "user_password_reset_succeeded", "user_roles_deleted", "user_roles_updated", + "user_two_step_authentication_backup_code_used", + "user_two_step_authentication_method_added", + "user_two_step_authentication_method_removed", + "user_two_step_authentication_method_reset", + "user_two_step_authentication_method_updated", + "user_two_step_authentication_reset_requested", ], str, ] diff --git a/stripe/params/v2/money_management/__init__.py b/stripe/params/v2/money_management/__init__.py index ca6df2db2..9968af464 100644 --- a/stripe/params/v2/money_management/__init__.py +++ b/stripe/params/v2/money_management/__init__.py @@ -10,6 +10,7 @@ ) from stripe.params.v2.money_management._adjustment_list_params import ( AdjustmentListParams as AdjustmentListParams, + AdjustmentListParamsCreated as AdjustmentListParamsCreated, ) from stripe.params.v2.money_management._adjustment_retrieve_params import ( AdjustmentRetrieveParams as AdjustmentRetrieveParams, @@ -35,6 +36,12 @@ from stripe.params.v2.money_management._debit_dispute_retrieve_params import ( DebitDisputeRetrieveParams as DebitDisputeRetrieveParams, ) + from stripe.params.v2.money_management._earned_credit_list_params import ( + EarnedCreditListParams as EarnedCreditListParams, + ) + from stripe.params.v2.money_management._earned_credit_retrieve_params import ( + EarnedCreditRetrieveParams as EarnedCreditRetrieveParams, + ) from stripe.params.v2.money_management._financial_account_close_params import ( FinancialAccountCloseParams as FinancialAccountCloseParams, FinancialAccountCloseParamsForwardingSettings as FinancialAccountCloseParamsForwardingSettings, @@ -44,6 +51,7 @@ FinancialAccountCreateParamsSavings as FinancialAccountCreateParamsSavings, FinancialAccountCreateParamsStorage as FinancialAccountCreateParamsStorage, FinancialAccountCreateParamsStorageCrypto as FinancialAccountCreateParamsStorageCrypto, + FinancialAccountCreateParamsStorageDepositInsuranceEligibility as FinancialAccountCreateParamsStorageDepositInsuranceEligibility, ) from stripe.params.v2.money_management._financial_account_list_params import ( FinancialAccountListParams as FinancialAccountListParams, @@ -75,6 +83,7 @@ ) from stripe.params.v2.money_management._inbound_transfer_list_params import ( InboundTransferListParams as InboundTransferListParams, + InboundTransferListParamsCreated as InboundTransferListParamsCreated, ) from stripe.params.v2.money_management._inbound_transfer_retrieve_params import ( InboundTransferRetrieveParams as InboundTransferRetrieveParams, @@ -118,6 +127,7 @@ ) from stripe.params.v2.money_management._outbound_setup_intent_create_params import ( OutboundSetupIntentCreateParams as OutboundSetupIntentCreateParams, + OutboundSetupIntentCreateParamsFromResource as OutboundSetupIntentCreateParamsFromResource, OutboundSetupIntentCreateParamsPayoutMethodData as OutboundSetupIntentCreateParamsPayoutMethodData, OutboundSetupIntentCreateParamsPayoutMethodDataApplePay as OutboundSetupIntentCreateParamsPayoutMethodDataApplePay, OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount as OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount, @@ -213,6 +223,7 @@ ) from stripe.params.v2.money_management._received_credit_list_params import ( ReceivedCreditListParams as ReceivedCreditListParams, + ReceivedCreditListParamsCreated as ReceivedCreditListParamsCreated, ) from stripe.params.v2.money_management._received_credit_retrieve_params import ( ReceivedCreditRetrieveParams as ReceivedCreditRetrieveParams, @@ -241,14 +252,22 @@ from stripe.params.v2.money_management._recipient_verification_retrieve_params import ( RecipientVerificationRetrieveParams as RecipientVerificationRetrieveParams, ) + from stripe.params.v2.money_management._test_helper_earned_credits_params import ( + TestHelperEarnedCreditsParams as TestHelperEarnedCreditsParams, + ) from stripe.params.v2.money_management._transaction_entry_list_params import ( TransactionEntryListParams as TransactionEntryListParams, + TransactionEntryListParamsCreated as TransactionEntryListParamsCreated, ) from stripe.params.v2.money_management._transaction_entry_retrieve_params import ( TransactionEntryRetrieveParams as TransactionEntryRetrieveParams, ) from stripe.params.v2.money_management._transaction_list_params import ( TransactionListParams as TransactionListParams, + TransactionListParamsCreated as TransactionListParamsCreated, + ) + from stripe.params.v2.money_management._transaction_refresh_regulatory_receipt_params import ( + TransactionRefreshRegulatoryReceiptParams as TransactionRefreshRegulatoryReceiptParams, ) from stripe.params.v2.money_management._transaction_retrieve_params import ( TransactionRetrieveParams as TransactionRetrieveParams, @@ -268,6 +287,10 @@ "stripe.params.v2.money_management._adjustment_list_params", False, ), + "AdjustmentListParamsCreated": ( + "stripe.params.v2.money_management._adjustment_list_params", + False, + ), "AdjustmentRetrieveParams": ( "stripe.params.v2.money_management._adjustment_retrieve_params", False, @@ -308,6 +331,14 @@ "stripe.params.v2.money_management._debit_dispute_retrieve_params", False, ), + "EarnedCreditListParams": ( + "stripe.params.v2.money_management._earned_credit_list_params", + False, + ), + "EarnedCreditRetrieveParams": ( + "stripe.params.v2.money_management._earned_credit_retrieve_params", + False, + ), "FinancialAccountCloseParams": ( "stripe.params.v2.money_management._financial_account_close_params", False, @@ -332,6 +363,10 @@ "stripe.params.v2.money_management._financial_account_create_params", False, ), + "FinancialAccountCreateParamsStorageDepositInsuranceEligibility": ( + "stripe.params.v2.money_management._financial_account_create_params", + False, + ), "FinancialAccountListParams": ( "stripe.params.v2.money_management._financial_account_list_params", False, @@ -392,6 +427,10 @@ "stripe.params.v2.money_management._inbound_transfer_list_params", False, ), + "InboundTransferListParamsCreated": ( + "stripe.params.v2.money_management._inbound_transfer_list_params", + False, + ), "InboundTransferRetrieveParams": ( "stripe.params.v2.money_management._inbound_transfer_retrieve_params", False, @@ -492,6 +531,10 @@ "stripe.params.v2.money_management._outbound_setup_intent_create_params", False, ), + "OutboundSetupIntentCreateParamsFromResource": ( + "stripe.params.v2.money_management._outbound_setup_intent_create_params", + False, + ), "OutboundSetupIntentCreateParamsPayoutMethodData": ( "stripe.params.v2.money_management._outbound_setup_intent_create_params", False, @@ -704,6 +747,10 @@ "stripe.params.v2.money_management._received_credit_list_params", False, ), + "ReceivedCreditListParamsCreated": ( + "stripe.params.v2.money_management._received_credit_list_params", + False, + ), "ReceivedCreditRetrieveParams": ( "stripe.params.v2.money_management._received_credit_retrieve_params", False, @@ -740,10 +787,18 @@ "stripe.params.v2.money_management._recipient_verification_retrieve_params", False, ), + "TestHelperEarnedCreditsParams": ( + "stripe.params.v2.money_management._test_helper_earned_credits_params", + False, + ), "TransactionEntryListParams": ( "stripe.params.v2.money_management._transaction_entry_list_params", False, ), + "TransactionEntryListParamsCreated": ( + "stripe.params.v2.money_management._transaction_entry_list_params", + False, + ), "TransactionEntryRetrieveParams": ( "stripe.params.v2.money_management._transaction_entry_retrieve_params", False, @@ -752,6 +807,14 @@ "stripe.params.v2.money_management._transaction_list_params", False, ), + "TransactionListParamsCreated": ( + "stripe.params.v2.money_management._transaction_list_params", + False, + ), + "TransactionRefreshRegulatoryReceiptParams": ( + "stripe.params.v2.money_management._transaction_refresh_regulatory_receipt_params", + False, + ), "TransactionRetrieveParams": ( "stripe.params.v2.money_management._transaction_retrieve_params", False, diff --git a/stripe/params/v2/money_management/_adjustment_list_params.py b/stripe/params/v2/money_management/_adjustment_list_params.py index 1a7715c28..65f32e3f2 100644 --- a/stripe/params/v2/money_management/_adjustment_list_params.py +++ b/stripe/params/v2/money_management/_adjustment_list_params.py @@ -8,32 +8,34 @@ class AdjustmentListParams(TypedDict): """ Filter for Adjustments linked to a Flow. """ - created: NotRequired[str] + created: NotRequired["AdjustmentListParamsCreated"] """ - Filter for objects created at the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + Set of filters to query Adjustments within a range of `created` timestamps. + """ + limit: NotRequired[int] """ - created_gt: NotRequired[str] + The page limit. + """ + + +class AdjustmentListParamsCreated(TypedDict): + gt: NotRequired[str] """ Filter for objects created after the specified timestamp. Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ - created_gte: NotRequired[str] + gte: NotRequired[str] """ Filter for objects created on or after the specified timestamp. Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ - created_lt: NotRequired[str] + lt: NotRequired[str] """ Filter for objects created before the specified timestamp. Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ - created_lte: NotRequired[str] + lte: NotRequired[str] """ Filter for objects created on or before the specified timestamp. Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ - limit: NotRequired[int] - """ - The page limit. - """ diff --git a/stripe/params/v2/money_management/_earned_credit_list_params.py b/stripe/params/v2/money_management/_earned_credit_list_params.py new file mode 100644 index 000000000..c962bc6f4 --- /dev/null +++ b/stripe/params/v2/money_management/_earned_credit_list_params.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class EarnedCreditListParams(TypedDict): + financial_account: NotRequired[str] + """ + The FinancialAccount to list EarnedCredits for. + """ + limit: NotRequired[int] + """ + The maximum number of EarnedCredits to return. + """ diff --git a/stripe/params/v2/money_management/_earned_credit_retrieve_params.py b/stripe/params/v2/money_management/_earned_credit_retrieve_params.py new file mode 100644 index 000000000..f5236645e --- /dev/null +++ b/stripe/params/v2/money_management/_earned_credit_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class EarnedCreditRetrieveParams(TypedDict): + pass 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 9aa71009c..9dd561fca 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. Only populated when `storage.crypto` is passed in the `include` parameter and the FinancialAccount stores crypto assets. Fiat currencies remain configured only through `holds_currencies`. """ + deposit_insurance_eligibility: NotRequired[ + List["FinancialAccountCreateParamsStorageDepositInsuranceEligibility"] + ] + """ + Array of eligibility objects, segmented by bank name and deposit insurance scheme. + """ funds_usage_type: NotRequired["Literal['business', 'consumer']|str"] """ The usage type for funds in this FinancialAccount. Can be used to specify that the funds are for Consumer activity. @@ -59,3 +65,20 @@ class FinancialAccountCreateParamsStorageCrypto(TypedDict): """ Describes who controls the private keys for the crypto storage. """ + + +class FinancialAccountCreateParamsStorageDepositInsuranceEligibility( + TypedDict +): + bank_name: Union[Literal["fifth_third"], str] + """ + The bank where funds are stored. + """ + currencies: List[str] + """ + Currencies eligible for deposit insurance at this bank under this scheme. + """ + type: Union[Literal["fdic", "fdic_passthrough"], str] + """ + The deposit insurance scheme. + """ 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 cd2a29299..169442912 100644 --- a/stripe/params/v2/money_management/_financial_account_list_params.py +++ b/stripe/params/v2/money_management/_financial_account_list_params.py @@ -6,7 +6,13 @@ class FinancialAccountListParams(TypedDict): include: NotRequired[ - List[Literal["payments.balance_by_funds_type", "storage.crypto"]] + List[ + Literal[ + "payments.balance_by_funds_type", + "storage.crypto", + "storage.deposit_insurance_eligibility", + ] + ] ] """ Additional fields to include in the response. diff --git a/stripe/params/v2/money_management/_financial_account_retrieve_params.py b/stripe/params/v2/money_management/_financial_account_retrieve_params.py index 71f46233f..86b52bb39 100644 --- a/stripe/params/v2/money_management/_financial_account_retrieve_params.py +++ b/stripe/params/v2/money_management/_financial_account_retrieve_params.py @@ -6,7 +6,13 @@ class FinancialAccountRetrieveParams(TypedDict): include: NotRequired[ - List[Literal["payments.balance_by_funds_type", "storage.crypto"]] + List[ + Literal[ + "payments.balance_by_funds_type", + "storage.crypto", + "storage.deposit_insurance_eligibility", + ] + ] ] """ Additional fields to include in the response. diff --git a/stripe/params/v2/money_management/_inbound_transfer_create_params.py b/stripe/params/v2/money_management/_inbound_transfer_create_params.py index db5250ed2..112b7cd87 100644 --- a/stripe/params/v2/money_management/_inbound_transfer_create_params.py +++ b/stripe/params/v2/money_management/_inbound_transfer_create_params.py @@ -18,6 +18,11 @@ class InboundTransferCreateParams(_InboundTransferCreateParamsBase): """ An optional, freeform description field intended to store metadata. """ + statement_descriptor: NotRequired[str] + """ + An optional statement descriptor surfaced on the payer's bank statement. Max 10 characters. + When omitted, Stripe sends its default descriptor. + """ to: "InboundTransferCreateParamsTo" """ Object containing details about where the funds will land. diff --git a/stripe/params/v2/money_management/_inbound_transfer_list_params.py b/stripe/params/v2/money_management/_inbound_transfer_list_params.py index 5f1cf063f..42a4e77b9 100644 --- a/stripe/params/v2/money_management/_inbound_transfer_list_params.py +++ b/stripe/params/v2/money_management/_inbound_transfer_list_params.py @@ -4,32 +4,34 @@ class InboundTransferListParams(TypedDict): - created: NotRequired[str] + created: NotRequired["InboundTransferListParamsCreated"] """ - Filter for objects created at the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + Hash of options for filtering on creation time. + """ + limit: NotRequired[int] """ - created_gt: NotRequired[str] + The page limit. + """ + + +class InboundTransferListParamsCreated(TypedDict): + gt: NotRequired[str] """ Filter for objects created after the specified timestamp. Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ - created_gte: NotRequired[str] + gte: NotRequired[str] """ Filter for objects created on or after the specified timestamp. Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ - created_lt: NotRequired[str] + lt: NotRequired[str] """ Filter for objects created before the specified timestamp. Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ - created_lte: NotRequired[str] + lte: NotRequired[str] """ Filter for objects created on or before the specified timestamp. Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ - limit: NotRequired[int] - """ - The page limit. - """ diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py index 0e6c589ee..542bd92e9 100644 --- a/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py +++ b/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py @@ -5,6 +5,10 @@ class OutboundSetupIntentCreateParams(TypedDict): + from_resource: NotRequired["OutboundSetupIntentCreateParamsFromResource"] + """ + An existing resource to use as the source for setting up outbound credentials. + """ payout_method: NotRequired[str] """ If provided, the existing payout method resource to link to this setup intent. @@ -24,6 +28,17 @@ class OutboundSetupIntentCreateParams(TypedDict): """ +class OutboundSetupIntentCreateParamsFromResource(TypedDict): + id: str + """ + The identifier of the source resource. + """ + type: Union[Literal["payment_method"], str] + """ + The type of the source resource. + """ + + class OutboundSetupIntentCreateParamsPayoutMethodData(TypedDict): apple_pay: NotRequired[ "OutboundSetupIntentCreateParamsPayoutMethodDataApplePay" diff --git a/stripe/params/v2/money_management/_payout_method_list_params.py b/stripe/params/v2/money_management/_payout_method_list_params.py index 7dbcf067e..693f83887 100644 --- a/stripe/params/v2/money_management/_payout_method_list_params.py +++ b/stripe/params/v2/money_management/_payout_method_list_params.py @@ -17,13 +17,29 @@ class PayoutMethodListParams(TypedDict): class PayoutMethodListParamsUsageStatus(TypedDict): payments: NotRequired[ - List[Literal["disabled", "eligible", "invalid", "requires_action"]] + List[ + Literal[ + "disabled", + "eligible", + "ineligible", + "invalid", + "requires_action", + ] + ] ] """ List of payments status to filter by. """ transfers: NotRequired[ - List[Literal["disabled", "eligible", "invalid", "requires_action"]] + List[ + Literal[ + "disabled", + "eligible", + "ineligible", + "invalid", + "requires_action", + ] + ] ] """ List of transfers status to filter by. diff --git a/stripe/params/v2/money_management/_received_credit_list_params.py b/stripe/params/v2/money_management/_received_credit_list_params.py index dc189bfce..5ffdc71cf 100644 --- a/stripe/params/v2/money_management/_received_credit_list_params.py +++ b/stripe/params/v2/money_management/_received_credit_list_params.py @@ -4,32 +4,34 @@ class ReceivedCreditListParams(TypedDict): - created: NotRequired[str] + created: NotRequired["ReceivedCreditListParamsCreated"] """ - Filter for objects created at the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + Hash of options for filtering on creation time. + """ + limit: NotRequired[int] """ - created_gt: NotRequired[str] + The page limit. + """ + + +class ReceivedCreditListParamsCreated(TypedDict): + gt: NotRequired[str] """ Filter for objects created after the specified timestamp. Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ - created_gte: NotRequired[str] + gte: NotRequired[str] """ Filter for objects created on or after the specified timestamp. Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ - created_lt: NotRequired[str] + lt: NotRequired[str] """ Filter for objects created before the specified timestamp. Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ - created_lte: NotRequired[str] + lte: NotRequired[str] """ Filter for objects created on or before the specified timestamp. Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ - limit: NotRequired[int] - """ - The page limit. - """ diff --git a/stripe/params/v2/money_management/_test_helper_earned_credits_params.py b/stripe/params/v2/money_management/_test_helper_earned_credits_params.py new file mode 100644 index 000000000..0d6bd61eb --- /dev/null +++ b/stripe/params/v2/money_management/_test_helper_earned_credits_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam +from typing import Union +from typing_extensions import Literal, TypedDict + + +class TestHelperEarnedCreditsParams(TypedDict): + amount: AmountParam + """ + The amount and currency of the EarnedCredit. + """ + financial_account: str + """ + The FinancialAccount to simulate the EarnedCredit for. + """ + type: Union[Literal["interest"], str] + """ + The type of EarnedCredit to create. Currently only interest is supported. + """ diff --git a/stripe/params/v2/money_management/_transaction_entry_list_params.py b/stripe/params/v2/money_management/_transaction_entry_list_params.py index 4b1511b96..1da0085a6 100644 --- a/stripe/params/v2/money_management/_transaction_entry_list_params.py +++ b/stripe/params/v2/money_management/_transaction_entry_list_params.py @@ -4,31 +4,34 @@ class TransactionEntryListParams(TypedDict): - created: NotRequired[str] + created: NotRequired["TransactionEntryListParamsCreated"] """ - Filter for Transactions created at an exact time. + Set of filters to query TransactionEntries within a range of `created` timestamps. """ - created_gt: NotRequired[str] + limit: NotRequired[int] """ - Filter for Transactions created after the specified timestamp. + The page limit. """ - created_gte: NotRequired[str] + transaction: NotRequired[str] """ - Filter for Transactions created at or after the specified timestamp. + Filter for TransactionEntries belonging to a Transaction. """ - created_lt: NotRequired[str] + + +class TransactionEntryListParamsCreated(TypedDict): + gt: NotRequired[str] """ - Filter for Transactions created before the specified timestamp. + Filter for Transactions created after the specified timestamp. """ - created_lte: NotRequired[str] + gte: NotRequired[str] """ - Filter for Transactions created at or before the specified timestamp. + Filter for Transactions created at or after the specified timestamp. """ - limit: NotRequired[int] + lt: NotRequired[str] """ - The page limit. + Filter for Transactions created before the specified timestamp. """ - transaction: NotRequired[str] + lte: NotRequired[str] """ - Filter for TransactionEntries belonging to a Transaction. + Filter for Transactions created at or before the specified timestamp. """ diff --git a/stripe/params/v2/money_management/_transaction_list_params.py b/stripe/params/v2/money_management/_transaction_list_params.py index 1391fcfc3..d9a2a2d34 100644 --- a/stripe/params/v2/money_management/_transaction_list_params.py +++ b/stripe/params/v2/money_management/_transaction_list_params.py @@ -4,35 +4,38 @@ class TransactionListParams(TypedDict): - created: NotRequired[str] + created: NotRequired["TransactionListParamsCreated"] """ - Filter for Transactions created at an exact time. + Set of filters to query Transactions within a range of `created` timestamps. """ - created_gt: NotRequired[str] + financial_account: NotRequired[str] """ - Filter for Transactions created after the specified timestamp. + Filter for Transactions belonging to a FinancialAccount. """ - created_gte: NotRequired[str] + flow: NotRequired[str] """ - Filter for Transactions created at or after the specified timestamp. + Filter for Transactions corresponding to a Flow. """ - created_lt: NotRequired[str] + limit: NotRequired[int] """ - Filter for Transactions created before the specified timestamp. + The page limit. """ - created_lte: NotRequired[str] + + +class TransactionListParamsCreated(TypedDict): + gt: NotRequired[str] """ - Filter for Transactions created at or before the specified timestamp. + Filter for Transactions created after the specified timestamp. """ - financial_account: NotRequired[str] + gte: NotRequired[str] """ - Filter for Transactions belonging to a FinancialAccount. + Filter for Transactions created at or after the specified timestamp. """ - flow: NotRequired[str] + lt: NotRequired[str] """ - Filter for Transactions corresponding to a Flow. + Filter for Transactions created before the specified timestamp. """ - limit: NotRequired[int] + lte: NotRequired[str] """ - The page limit. + Filter for Transactions created at or before the specified timestamp. """ diff --git a/stripe/params/v2/money_management/_transaction_refresh_regulatory_receipt_params.py b/stripe/params/v2/money_management/_transaction_refresh_regulatory_receipt_params.py new file mode 100644 index 000000000..677744618 --- /dev/null +++ b/stripe/params/v2/money_management/_transaction_refresh_regulatory_receipt_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class TransactionRefreshRegulatoryReceiptParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/test_helpers/__init__.py b/stripe/params/v2/money_management/test_helpers/__init__.py index ba62e156f..dca108b13 100644 --- a/stripe/params/v2/money_management/test_helpers/__init__.py +++ b/stripe/params/v2/money_management/test_helpers/__init__.py @@ -4,16 +4,30 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: + from stripe.params.v2.money_management.test_helpers._financial_address_credit_params import ( + FinancialAddressCreditParams as FinancialAddressCreditParams, + ) from stripe.params.v2.money_management.test_helpers._financial_address_debit_params import ( FinancialAddressDebitParams as FinancialAddressDebitParams, ) + from stripe.params.v2.money_management.test_helpers._financial_address_generate_microdeposits_params import ( + FinancialAddressGenerateMicrodepositsParams as FinancialAddressGenerateMicrodepositsParams, + ) # name -> (import_target, is_submodule) _import_map = { + "FinancialAddressCreditParams": ( + "stripe.params.v2.money_management.test_helpers._financial_address_credit_params", + False, + ), "FinancialAddressDebitParams": ( "stripe.params.v2.money_management.test_helpers._financial_address_debit_params", False, ), + "FinancialAddressGenerateMicrodepositsParams": ( + "stripe.params.v2.money_management.test_helpers._financial_address_generate_microdeposits_params", + False, + ), } if not TYPE_CHECKING: diff --git a/stripe/params/v2/test_helpers/_financial_address_credit_params.py b/stripe/params/v2/money_management/test_helpers/_financial_address_credit_params.py similarity index 97% rename from stripe/params/v2/test_helpers/_financial_address_credit_params.py rename to stripe/params/v2/money_management/test_helpers/_financial_address_credit_params.py index c60b165f7..e4fb861f6 100644 --- a/stripe/params/v2/test_helpers/_financial_address_credit_params.py +++ b/stripe/params/v2/money_management/test_helpers/_financial_address_credit_params.py @@ -18,6 +18,7 @@ class FinancialAddressCreditParams(TypedDict): "fps", "rtp", "sepa_credit_transfer", + "swift", "wire", ], str, diff --git a/stripe/params/v2/test_helpers/_financial_address_generate_microdeposits_params.py b/stripe/params/v2/money_management/test_helpers/_financial_address_generate_microdeposits_params.py similarity index 100% rename from stripe/params/v2/test_helpers/_financial_address_generate_microdeposits_params.py rename to stripe/params/v2/money_management/test_helpers/_financial_address_generate_microdeposits_params.py diff --git a/stripe/params/v2/payments/_off_session_payment_create_params.py b/stripe/params/v2/payments/_off_session_payment_create_params.py index 49853c6ae..8558ed737 100644 --- a/stripe/params/v2/payments/_off_session_payment_create_params.py +++ b/stripe/params/v2/payments/_off_session_payment_create_params.py @@ -285,10 +285,6 @@ class OffSessionPaymentCreateParamsPaymentMethodDataBillingDetailsAddress( class OffSessionPaymentCreateParamsPaymentMethodDataCard(TypedDict): - cvc: NotRequired[str] - """ - The card CVC. - """ exp_month: str """ The card expiration month. diff --git a/stripe/params/v2/provisioning/__init__.py b/stripe/params/v2/provisioning/__init__.py index 1ea68c2f2..25222edee 100644 --- a/stripe/params/v2/provisioning/__init__.py +++ b/stripe/params/v2/provisioning/__init__.py @@ -49,6 +49,9 @@ from stripe.params.v2.provisioning._resource_retrieve_params import ( ResourceRetrieveParams as ResourceRetrieveParams, ) + from stripe.params.v2.provisioning._resource_reveal_access_configuration_params import ( + ResourceRevealAccessConfigurationParams as ResourceRevealAccessConfigurationParams, + ) from stripe.params.v2.provisioning._resource_rotate_credentials_params import ( ResourceRotateCredentialsParams as ResourceRotateCredentialsParams, ) @@ -129,6 +132,10 @@ "stripe.params.v2.provisioning._resource_retrieve_params", False, ), + "ResourceRevealAccessConfigurationParams": ( + "stripe.params.v2.provisioning._resource_reveal_access_configuration_params", + False, + ), "ResourceRotateCredentialsParams": ( "stripe.params.v2.provisioning._resource_rotate_credentials_params", False, diff --git a/stripe/params/v2/provisioning/_resource_create_params.py b/stripe/params/v2/provisioning/_resource_create_params.py index ad498ec67..f660c160e 100644 --- a/stripe/params/v2/provisioning/_resource_create_params.py +++ b/stripe/params/v2/provisioning/_resource_create_params.py @@ -20,7 +20,8 @@ class ResourceCreateParams(TypedDict): """ livemode: NotRequired[bool] """ - Whether the resource should use Stripe live-mode objects. When omitted, this resolves to true. + Whether the resource should use Stripe live-mode objects. When omitted, this resolves to false + for a sandbox target and true otherwise. Sandbox targets cannot create live-mode resources. """ name: NotRequired[str] """ diff --git a/stripe/params/v2/provisioning/_resource_link_params.py b/stripe/params/v2/provisioning/_resource_link_params.py index f32a067b2..242a5db80 100644 --- a/stripe/params/v2/provisioning/_resource_link_params.py +++ b/stripe/params/v2/provisioning/_resource_link_params.py @@ -14,7 +14,8 @@ class ResourceLinkParams(TypedDict): """ livemode: NotRequired[bool] """ - Whether the resource should use Stripe live-mode objects. When omitted, this resolves to true. + Whether the resource should use Stripe live-mode objects. When omitted, this resolves to false + for a sandbox target and true otherwise. Sandbox targets cannot link live-mode resources. """ project: NotRequired[str] """ diff --git a/stripe/params/v2/provisioning/_resource_reveal_access_configuration_params.py b/stripe/params/v2/provisioning/_resource_reveal_access_configuration_params.py new file mode 100644 index 000000000..0f417fbcd --- /dev/null +++ b/stripe/params/v2/provisioning/_resource_reveal_access_configuration_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ResourceRevealAccessConfigurationParams(TypedDict): + pass diff --git a/stripe/params/v2/test_helpers/__init__.py b/stripe/params/v2/test_helpers/__init__.py index ac9619333..c998edf88 100644 --- a/stripe/params/v2/test_helpers/__init__.py +++ b/stripe/params/v2/test_helpers/__init__.py @@ -4,26 +4,12 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: - from stripe.params.v2.test_helpers._financial_address_credit_params import ( - FinancialAddressCreditParams as FinancialAddressCreditParams, - ) - from stripe.params.v2.test_helpers._financial_address_generate_microdeposits_params import ( - FinancialAddressGenerateMicrodepositsParams as FinancialAddressGenerateMicrodepositsParams, - ) from stripe.params.v2.test_helpers._money_management_recipient_verifications_params import ( MoneyManagementRecipientVerificationsParams as MoneyManagementRecipientVerificationsParams, ) # name -> (import_target, is_submodule) _import_map = { - "FinancialAddressCreditParams": ( - "stripe.params.v2.test_helpers._financial_address_credit_params", - False, - ), - "FinancialAddressGenerateMicrodepositsParams": ( - "stripe.params.v2.test_helpers._financial_address_generate_microdeposits_params", - False, - ), "MoneyManagementRecipientVerificationsParams": ( "stripe.params.v2.test_helpers._money_management_recipient_verifications_params", False, diff --git a/stripe/privacy/_redaction_job.py b/stripe/privacy/_redaction_job.py index befd30f72..61d18df91 100644 --- a/stripe/privacy/_redaction_job.py +++ b/stripe/privacy/_redaction_job.py @@ -184,7 +184,7 @@ def cancel( ... @class_method_variant("_cls_cancel") - def cancel( # pyright: ignore[reportGeneralTypeIssues] + def cancel( self, **params: Unpack["RedactionJobCancelParams"] ) -> "RedactionJob": """ @@ -247,7 +247,7 @@ async def cancel_async( ... @class_method_variant("_cls_cancel_async") - async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_async( self, **params: Unpack["RedactionJobCancelParams"] ) -> "RedactionJob": """ @@ -340,7 +340,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["RedactionJobModifyParams"] + cls, id: str, /, **params: Unpack["RedactionJobModifyParams"] ) -> "RedactionJob": """ Updates the properties of a redaction job without running or canceling the job. @@ -359,7 +359,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["RedactionJobModifyParams"] + cls, id: str, /, **params: Unpack["RedactionJobModifyParams"] ) -> "RedactionJob": """ Updates the properties of a redaction job without running or canceling the job. @@ -446,9 +446,7 @@ def run(self, **params: Unpack["RedactionJobRunParams"]) -> "RedactionJob": ... @class_method_variant("_cls_run") - def run( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["RedactionJobRunParams"] - ) -> "RedactionJob": + def run(self, **params: Unpack["RedactionJobRunParams"]) -> "RedactionJob": """ Run a redaction job in a ready status. @@ -517,7 +515,7 @@ async def run_async( ... @class_method_variant("_cls_run_async") - async def run_async( # pyright: ignore[reportGeneralTypeIssues] + async def run_async( self, **params: Unpack["RedactionJobRunParams"] ) -> "RedactionJob": """ @@ -588,7 +586,7 @@ def validate( ... @class_method_variant("_cls_validate") - def validate( # pyright: ignore[reportGeneralTypeIssues] + def validate( self, **params: Unpack["RedactionJobValidateParams"] ) -> "RedactionJob": """ @@ -659,7 +657,7 @@ async def validate_async( ... @class_method_variant("_cls_validate_async") - async def validate_async( # pyright: ignore[reportGeneralTypeIssues] + async def validate_async( self, **params: Unpack["RedactionJobValidateParams"] ) -> "RedactionJob": """ diff --git a/stripe/product_catalog/_trial_offer.py b/stripe/product_catalog/_trial_offer.py index 1267e3598..af07b56d1 100644 --- a/stripe/product_catalog/_trial_offer.py +++ b/stripe/product_catalog/_trial_offer.py @@ -5,6 +5,8 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject +from stripe._updateable_api_resource import UpdateableAPIResource +from stripe._util import sanitize_id from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING @@ -16,6 +18,9 @@ from stripe.params.product_catalog._trial_offer_list_params import ( TrialOfferListParams, ) + from stripe.params.product_catalog._trial_offer_modify_params import ( + TrialOfferModifyParams, + ) from stripe.params.product_catalog._trial_offer_retrieve_params import ( TrialOfferRetrieveParams, ) @@ -24,6 +29,7 @@ class TrialOffer( CreateableAPIResource["TrialOffer"], ListableAPIResource["TrialOffer"], + UpdateableAPIResource["TrialOffer"], ): """ Trial offers let you define free or paid introductory pricing for a subscription item. @@ -65,6 +71,10 @@ class Transition(StripeObject): """ _inner_class_types = {"transition": Transition} + active: bool + """ + Whether the trial offer is active. Set to false to archive the trial offer. + """ duration: Duration end_behavior: EndBehavior id: str @@ -75,9 +85,9 @@ class Transition(StripeObject): """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ - name: Optional[str] + nickname: Optional[str] """ - A brief, user-friendly name for the trial offer-for identification purposes. + A brief description of the trial offer, hidden from customers. """ object: Literal["product_catalog.trial_offer"] """ @@ -160,6 +170,40 @@ async def list_async( return result + @classmethod + def modify( + cls, id: str, /, **params: Unpack["TrialOfferModifyParams"] + ) -> "TrialOffer": + """ + Updates the specified trial offer by setting the values of the parameters passed. Any parameters not provided are left unchanged. + """ + url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + return cast( + "TrialOffer", + cls._static_request( + "post", + url, + params=params, + ), + ) + + @classmethod + async def modify_async( + cls, id: str, /, **params: Unpack["TrialOfferModifyParams"] + ) -> "TrialOffer": + """ + Updates the specified trial offer by setting the values of the parameters passed. Any parameters not provided are left unchanged. + """ + url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + return cast( + "TrialOffer", + await cls._static_request_async( + "post", + url, + params=params, + ), + ) + @classmethod def retrieve( cls, id: str, **params: Unpack["TrialOfferRetrieveParams"] diff --git a/stripe/product_catalog/_trial_offer_service.py b/stripe/product_catalog/_trial_offer_service.py index ca47f69b3..448e9205e 100644 --- a/stripe/product_catalog/_trial_offer_service.py +++ b/stripe/product_catalog/_trial_offer_service.py @@ -17,6 +17,9 @@ from stripe.params.product_catalog._trial_offer_retrieve_params import ( TrialOfferRetrieveParams, ) + from stripe.params.product_catalog._trial_offer_update_params import ( + TrialOfferUpdateParams, + ) from stripe.product_catalog._trial_offer import TrialOffer @@ -142,3 +145,49 @@ async def retrieve_async( options=options, ), ) + + def update( + self, + id: str, + /, + params: Optional["TrialOfferUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "TrialOffer": + """ + Updates the specified trial offer by setting the values of the parameters passed. Any parameters not provided are left unchanged. + """ + return cast( + "TrialOffer", + self._request( + "post", + "/v1/product_catalog/trial_offers/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + id: str, + /, + params: Optional["TrialOfferUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "TrialOffer": + """ + Updates the specified trial offer by setting the values of the parameters passed. Any parameters not provided are left unchanged. + """ + return cast( + "TrialOffer", + await self._request_async( + "post", + "/v1/product_catalog/trial_offers/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/radar/__init__.py b/stripe/radar/__init__.py index b41469436..2a6f65a74 100644 --- a/stripe/radar/__init__.py +++ b/stripe/radar/__init__.py @@ -10,6 +10,12 @@ from stripe.radar._account_evaluation_service import ( AccountEvaluationService as AccountEvaluationService, ) + from stripe.radar._billing_evaluation import ( + BillingEvaluation as BillingEvaluation, + ) + from stripe.radar._billing_evaluation_service import ( + BillingEvaluationService as BillingEvaluationService, + ) from stripe.radar._customer_evaluation import ( CustomerEvaluation as CustomerEvaluation, ) @@ -50,6 +56,11 @@ "stripe.radar._account_evaluation_service", False, ), + "BillingEvaluation": ("stripe.radar._billing_evaluation", False), + "BillingEvaluationService": ( + "stripe.radar._billing_evaluation_service", + False, + ), "CustomerEvaluation": ("stripe.radar._customer_evaluation", False), "CustomerEvaluationService": ( "stripe.radar._customer_evaluation_service", diff --git a/stripe/radar/_account_evaluation.py b/stripe/radar/_account_evaluation.py index 47f075baa..b5a1de1ea 100644 --- a/stripe/radar/_account_evaluation.py +++ b/stripe/radar/_account_evaluation.py @@ -174,7 +174,7 @@ async def create_async( @classmethod def modify( - cls, id: str, **params: Unpack["AccountEvaluationModifyParams"] + cls, id: str, /, **params: Unpack["AccountEvaluationModifyParams"] ) -> "AccountEvaluation": """ Reports an event on an AccountEvaluation object. @@ -191,7 +191,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["AccountEvaluationModifyParams"] + cls, id: str, /, **params: Unpack["AccountEvaluationModifyParams"] ) -> "AccountEvaluation": """ Reports an event on an AccountEvaluation object. diff --git a/stripe/radar/_billing_evaluation.py b/stripe/radar/_billing_evaluation.py new file mode 100644 index 000000000..0d646ab7f --- /dev/null +++ b/stripe/radar/_billing_evaluation.py @@ -0,0 +1,324 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._createable_api_resource import CreateableAPIResource +from stripe._stripe_object import StripeObject, UntypedStripeObject +from typing import ClassVar, Optional, Union, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.radar._billing_evaluation_create_params import ( + BillingEvaluationCreateParams, + ) + + +class BillingEvaluation(CreateableAPIResource["BillingEvaluation"]): + """ + Billing Evaluations represent Stripe Radar's assessment of the non-payment abuse risk of an upcoming charge. Unlike a [Payment Evaluation](https://docs.stripe.com/api/radar/payment-evaluation), a billing evaluation is created before the payment is attempted and returns the `non_payment_abuse` signal only. + """ + + OBJECT_NAME: ClassVar[Literal["radar.billing_evaluation"]] = ( + "radar.billing_evaluation" + ) + + class ClientDeviceMetadataDetails(StripeObject): + radar_session: Optional[str] + """ + ID for the Radar Session associated with the billing evaluation. A [Radar Session](https://docs.stripe.com/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + class CustomerDetails(StripeObject): + class Data(StripeObject): + email: Optional[str] + """ + The customer's email address. + """ + name: Optional[str] + """ + The customer's full name or business name. + """ + phone: Optional[str] + """ + The customer's phone number. + """ + + customer: Optional[str] + """ + The ID of the customer whose upcoming payment was evaluated. + """ + customer_account: Optional[str] + """ + The ID of the Account representing the customer whose upcoming payment was evaluated. + """ + data: Optional[Data] + """ + Attributes of the customer being evaluated, as supplied on the request. Null when the customer was identified by `customer` or `customer_account`. + """ + _inner_class_types = {"data": Data} + + class PaymentDetails(StripeObject): + class MoneyMovementDetails(StripeObject): + class Card(StripeObject): + customer_presence: Optional[ + Union[Literal["off_session", "on_session"], str] + ] + """ + Describes the presence of the customer during the payment. + """ + payment_type: Optional[ + Union[ + Literal[ + "one_off", + "recurring", + "setup_one_off", + "setup_recurring", + ], + str, + ] + ] + """ + Describes the type of payment. + """ + + card: Optional[Card] + """ + Describes card money movement details. + """ + money_movement_type: Union[Literal["card"], str] + """ + Describes the type of money movement. Currently only `card` is supported. + """ + _inner_class_types = {"card": Card} + + class PaymentMethodDetails(StripeObject): + class BillingDetails(StripeObject): + class Address(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: Optional[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + + address: Address + """ + Address data. + """ + email: Optional[str] + """ + Email address. + """ + name: Optional[str] + """ + Full name. + """ + phone: Optional[str] + """ + Billing phone number (including extension). + """ + _inner_class_types = {"address": Address} + + billing_details: Optional[BillingDetails] + """ + Billing information associated with the billing evaluation. + """ + payment_method: Optional[str] + """ + The payment method that will be charged. + """ + _inner_class_types = {"billing_details": BillingDetails} + + class ShippingDetails(StripeObject): + class Address(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: Optional[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + + address: Address + """ + Address data. + """ + name: Optional[str] + """ + Shipping name. + """ + phone: Optional[str] + """ + Shipping phone number. + """ + _inner_class_types = {"address": Address} + + amount: int + """ + Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://docs.stripe.com/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + """ + currency: str + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + description: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + money_movement_details: Optional[MoneyMovementDetails] + """ + Details about the payment's customer presence and type. + """ + payment_method_details: Optional[PaymentMethodDetails] + """ + Details about the payment method that will be charged. + """ + shipping_details: Optional[ShippingDetails] + """ + Shipping details for the billing evaluation. + """ + statement_descriptor: Optional[str] + """ + Payment statement descriptor. + """ + _inner_class_types = { + "money_movement_details": MoneyMovementDetails, + "payment_method_details": PaymentMethodDetails, + "shipping_details": ShippingDetails, + } + + class Signals(StripeObject): + class NonPaymentAbuse(StripeObject): + evaluated_at: int + """ + The time when this signal was evaluated. + """ + risk_level: Union[ + Literal[ + "elevated", + "highest", + "low", + "normal", + "not_assessed", + "unknown", + ], + str, + ] + """ + Risk level. + """ + + non_payment_abuse: Optional[NonPaymentAbuse] + """ + Stripe Radar's assessment of the likelihood that the upcoming charge results in non-payment abuse. + """ + _inner_class_types = {"non_payment_abuse": NonPaymentAbuse} + + client_device_metadata_details: Optional[ClientDeviceMetadataDetails] + """ + Client device metadata attached to this billing evaluation. + """ + created_at: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ + customer_details: Optional[CustomerDetails] + """ + Details of the customer this billing evaluation assesses. + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. + """ + metadata: Optional[UntypedStripeObject[str]] + """ + Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + object: Literal["radar.billing_evaluation"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + payment_details: Optional[PaymentDetails] + """ + Payment details for the upcoming charge this billing evaluation assesses. + """ + signals: Signals + """ + Stripe Radar's signals for the upcoming charge this billing evaluation assesses. + """ + + @classmethod + def create( + cls, **params: Unpack["BillingEvaluationCreateParams"] + ) -> "BillingEvaluation": + """ + Request Stripe Radar's assessment of the non-payment abuse risk of an upcoming charge, before the payment is attempted. + """ + return cast( + "BillingEvaluation", + cls._static_request( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + async def create_async( + cls, **params: Unpack["BillingEvaluationCreateParams"] + ) -> "BillingEvaluation": + """ + Request Stripe Radar's assessment of the non-payment abuse risk of an upcoming charge, before the payment is attempted. + """ + return cast( + "BillingEvaluation", + await cls._static_request_async( + "post", + cls.class_url(), + params=params, + ), + ) + + _inner_class_types = { + "client_device_metadata_details": ClientDeviceMetadataDetails, + "customer_details": CustomerDetails, + "payment_details": PaymentDetails, + "signals": Signals, + } diff --git a/stripe/radar/_billing_evaluation_service.py b/stripe/radar/_billing_evaluation_service.py new file mode 100644 index 000000000..df8501c06 --- /dev/null +++ b/stripe/radar/_billing_evaluation_service.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.radar._billing_evaluation_create_params import ( + BillingEvaluationCreateParams, + ) + from stripe.radar._billing_evaluation import BillingEvaluation + + +class BillingEvaluationService(StripeService): + def create( + self, + params: "BillingEvaluationCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "BillingEvaluation": + """ + Request Stripe Radar's assessment of the non-payment abuse risk of an upcoming charge, before the payment is attempted. + """ + return cast( + "BillingEvaluation", + self._request( + "post", + "/v1/radar/billing_evaluations", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "BillingEvaluationCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "BillingEvaluation": + """ + Request Stripe Radar's assessment of the non-payment abuse risk of an upcoming charge, before the payment is attempted. + """ + return cast( + "BillingEvaluation", + await self._request_async( + "post", + "/v1/radar/billing_evaluations", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/radar/_customer_evaluation.py b/stripe/radar/_customer_evaluation.py index ebd2356a7..270269038 100644 --- a/stripe/radar/_customer_evaluation.py +++ b/stripe/radar/_customer_evaluation.py @@ -196,7 +196,7 @@ async def create_async( @classmethod def modify( - cls, id: str, **params: Unpack["CustomerEvaluationModifyParams"] + cls, id: str, /, **params: Unpack["CustomerEvaluationModifyParams"] ) -> "CustomerEvaluation": """ Reports an event on a CustomerEvaluation object. @@ -213,7 +213,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["CustomerEvaluationModifyParams"] + cls, id: str, /, **params: Unpack["CustomerEvaluationModifyParams"] ) -> "CustomerEvaluation": """ Reports an event on a CustomerEvaluation object. diff --git a/stripe/radar/_payment_evaluation.py b/stripe/radar/_payment_evaluation.py index 44cd8a612..ef40ecc54 100644 --- a/stripe/radar/_payment_evaluation.py +++ b/stripe/radar/_payment_evaluation.py @@ -557,7 +557,7 @@ class EarlyFraudWarning(StripeObject): """ Risk level of this signal, based on the score. """ - score: float + score: Optional[float] """ Numeric score for this signal, returned with two decimal places. Possible values for evaluated payments are between 0 and 100, where higher scores indicate a higher likelihood of the signal being true. """ @@ -581,7 +581,7 @@ class FraudulentDispute(StripeObject): """ Risk level of this signal, based on the score. """ - score: float + score: Optional[float] """ Numeric score for this signal, returned with two decimal places. Possible values for evaluated payments are between 0 and 100, where higher scores indicate a higher likelihood of the signal being true. """ @@ -605,7 +605,7 @@ class FraudulentPayment(StripeObject): """ Risk level of this signal, based on the score. """ - score: float + score: Optional[float] """ Numeric score for this signal, returned with two decimal places. Possible values for evaluated payments are between 0 and 100, where higher scores indicate a higher likelihood of the signal being true. """ diff --git a/stripe/radar/_value_list.py b/stripe/radar/_value_list.py index 956947e0f..0926f50a3 100644 --- a/stripe/radar/_value_list.py +++ b/stripe/radar/_value_list.py @@ -133,7 +133,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["ValueListDeleteParams"] + cls, sid: str, /, **params: Unpack["ValueListDeleteParams"] ) -> "ValueList": """ Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. @@ -151,7 +151,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["ValueListDeleteParams"] + sid: str, /, **params: Unpack["ValueListDeleteParams"] ) -> "ValueList": """ Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. @@ -166,9 +166,7 @@ def delete(self, **params: Unpack["ValueListDeleteParams"]) -> "ValueList": ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["ValueListDeleteParams"] - ) -> "ValueList": + def delete(self, **params: Unpack["ValueListDeleteParams"]) -> "ValueList": """ Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. """ @@ -180,7 +178,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["ValueListDeleteParams"] + cls, sid: str, /, **params: Unpack["ValueListDeleteParams"] ) -> "ValueList": """ Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. @@ -198,7 +196,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["ValueListDeleteParams"] + sid: str, /, **params: Unpack["ValueListDeleteParams"] ) -> "ValueList": """ Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. @@ -215,7 +213,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["ValueListDeleteParams"] ) -> "ValueList": """ @@ -269,7 +267,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["ValueListModifyParams"] + cls, id: str, /, **params: Unpack["ValueListModifyParams"] ) -> "ValueList": """ Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable. @@ -286,7 +284,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["ValueListModifyParams"] + cls, id: str, /, **params: Unpack["ValueListModifyParams"] ) -> "ValueList": """ Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable. diff --git a/stripe/radar/_value_list_item.py b/stripe/radar/_value_list_item.py index 6426d7119..8785b1f0e 100644 --- a/stripe/radar/_value_list_item.py +++ b/stripe/radar/_value_list_item.py @@ -116,7 +116,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["ValueListItemDeleteParams"] + cls, sid: str, /, **params: Unpack["ValueListItemDeleteParams"] ) -> "ValueListItem": """ Deletes a ValueListItem object, removing it from its parent value list. @@ -134,7 +134,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["ValueListItemDeleteParams"] + sid: str, /, **params: Unpack["ValueListItemDeleteParams"] ) -> "ValueListItem": """ Deletes a ValueListItem object, removing it from its parent value list. @@ -151,7 +151,7 @@ def delete( ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] + def delete( self, **params: Unpack["ValueListItemDeleteParams"] ) -> "ValueListItem": """ @@ -165,7 +165,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["ValueListItemDeleteParams"] + cls, sid: str, /, **params: Unpack["ValueListItemDeleteParams"] ) -> "ValueListItem": """ Deletes a ValueListItem object, removing it from its parent value list. @@ -183,7 +183,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["ValueListItemDeleteParams"] + sid: str, /, **params: Unpack["ValueListItemDeleteParams"] ) -> "ValueListItem": """ Deletes a ValueListItem object, removing it from its parent value list. @@ -200,7 +200,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["ValueListItemDeleteParams"] ) -> "ValueListItem": """ diff --git a/stripe/reserve/_hold.py b/stripe/reserve/_hold.py index d8ca77852..878db9dbf 100644 --- a/stripe/reserve/_hold.py +++ b/stripe/reserve/_hold.py @@ -61,6 +61,10 @@ class ReleaseSchedule(StripeObject): """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ + destination: Literal["other", "risk_reserved", "settlement_reserved"] + """ + The balance destination to which the reserved funds are sent. + """ id: str """ Unique identifier for the object. diff --git a/stripe/reserve/_plan.py b/stripe/reserve/_plan.py index 3314d5cf6..25f54030d 100644 --- a/stripe/reserve/_plan.py +++ b/stripe/reserve/_plan.py @@ -1,15 +1,17 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe._api_resource import APIResource +from stripe._list_object import ListObject +from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject from typing import ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: + from stripe.params.reserve._plan_list_params import PlanListParams from stripe.params.reserve._plan_retrieve_params import PlanRetrieveParams -class Plan(APIResource["Plan"]): +class Plan(ListableAPIResource["Plan"]): """ ReservePlans are used to automatically place holds on a merchant's funds until the plan expires. It takes a portion of each incoming Charge (including those resulting from a Transfer from a platform account). """ @@ -26,6 +28,9 @@ class FixedRelease(StripeObject): The time at which reserved funds are scheduled for release, automatically set to midnight UTC of the day after `release_after`. """ + class ManualRelease(StripeObject): + pass + class RollingRelease(StripeObject): days_after_charge: int """ @@ -48,6 +53,10 @@ class RollingRelease(StripeObject): """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). An unset currency indicates that the plan applies to all currencies. """ + destination: Literal["other", "risk_reserved", "settlement_reserved"] + """ + The balance destination to which the reserved funds are sent. + """ disabled_at: Optional[int] """ Time at which the ReservePlan was disabled. @@ -61,6 +70,7 @@ class RollingRelease(StripeObject): """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ + manual_release: Optional[ManualRelease] metadata: Optional[UntypedStripeObject[str]] """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. @@ -74,15 +84,55 @@ class RollingRelease(StripeObject): The percent of each Charge to reserve. """ rolling_release: Optional[RollingRelease] - status: Union[Literal["active", "disabled", "expired"], str] + status: Literal["active", "disabled", "expired", "other"] """ The current status of the ReservePlan. The ReservePlan only affects charges if it is `active`. """ - type: Union[Literal["fixed_release", "rolling_release"], str] + type: Literal[ + "fixed_release", "manual_release", "other", "rolling_release" + ] """ The type of the ReservePlan. """ + @classmethod + def list(cls, **params: Unpack["PlanListParams"]) -> ListObject["Plan"]: + """ + Returns a list of ReservePlans previously created. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first. + """ + result = cls._static_request( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + async def list_async( + cls, **params: Unpack["PlanListParams"] + ) -> ListObject["Plan"]: + """ + Returns a list of ReservePlans previously created. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first. + """ + result = await cls._static_request_async( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + @classmethod def retrieve( cls, id: str, **params: Unpack["PlanRetrieveParams"] @@ -107,5 +157,6 @@ async def retrieve_async( _inner_class_types = { "fixed_release": FixedRelease, + "manual_release": ManualRelease, "rolling_release": RollingRelease, } diff --git a/stripe/reserve/_plan_service.py b/stripe/reserve/_plan_service.py index 872831dc9..c987e6507 100644 --- a/stripe/reserve/_plan_service.py +++ b/stripe/reserve/_plan_service.py @@ -6,12 +6,52 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: + from stripe._list_object import ListObject from stripe._request_options import RequestOptions + from stripe.params.reserve._plan_list_params import PlanListParams from stripe.params.reserve._plan_retrieve_params import PlanRetrieveParams from stripe.reserve._plan import Plan class PlanService(StripeService): + def list( + self, + params: Optional["PlanListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Plan]": + """ + Returns a list of ReservePlans previously created. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first. + """ + return cast( + "ListObject[Plan]", + self._request( + "get", + "/v1/reserve/plans", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["PlanListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Plan]": + """ + Returns a list of ReservePlans previously created. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first. + """ + return cast( + "ListObject[Plan]", + await self._request_async( + "get", + "/v1/reserve/plans", + base_address="api", + params=params, + options=options, + ), + ) + def retrieve( self, id: str, diff --git a/stripe/reserve/_release.py b/stripe/reserve/_release.py index e7fdc2626..222f02ed9 100644 --- a/stripe/reserve/_release.py +++ b/stripe/reserve/_release.py @@ -55,6 +55,10 @@ class SourceTransaction(StripeObject): """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ + destination: Literal["other", "payments"] + """ + The balance destination to which the released funds are sent. + """ id: str """ Unique identifier for the object. @@ -73,7 +77,7 @@ class SourceTransaction(StripeObject): """ reason: Union[ Literal[ - "bulk_hold_expiry", + "hold_expired", "hold_released_early", "hold_reversed", "plan_disabled", diff --git a/stripe/shared_payment/_granted_token.py b/stripe/shared_payment/_granted_token.py index e5fa8d377..767d23003 100644 --- a/stripe/shared_payment/_granted_token.py +++ b/stripe/shared_payment/_granted_token.py @@ -719,7 +719,7 @@ def revoke( ... @class_method_variant("_cls_revoke") - def revoke( # pyright: ignore[reportGeneralTypeIssues] + def revoke( self, **params: Unpack["GrantedTokenRevokeParams"] ) -> "GrantedToken": """ @@ -783,7 +783,7 @@ async def revoke_async( ... @class_method_variant("_cls_revoke_async") - async def revoke_async( # pyright: ignore[reportGeneralTypeIssues] + async def revoke_async( self, **params: Unpack["GrantedTokenRevokeParams"] ) -> "GrantedToken": """ diff --git a/stripe/shared_payment/_issued_token.py b/stripe/shared_payment/_issued_token.py index a84073d7f..54eaa3f88 100644 --- a/stripe/shared_payment/_issued_token.py +++ b/stripe/shared_payment/_issued_token.py @@ -381,7 +381,7 @@ def revoke( ... @class_method_variant("_cls_revoke") - def revoke( # pyright: ignore[reportGeneralTypeIssues] + def revoke( self, **params: Unpack["IssuedTokenRevokeParams"] ) -> "IssuedToken": """ @@ -445,7 +445,7 @@ async def revoke_async( ... @class_method_variant("_cls_revoke_async") - async def revoke_async( # pyright: ignore[reportGeneralTypeIssues] + async def revoke_async( self, **params: Unpack["IssuedTokenRevokeParams"] ) -> "IssuedToken": """ diff --git a/stripe/sigma/_scheduled_query_run.py b/stripe/sigma/_scheduled_query_run.py index 00e1460bd..06a874876 100644 --- a/stripe/sigma/_scheduled_query_run.py +++ b/stripe/sigma/_scheduled_query_run.py @@ -121,7 +121,7 @@ def retrieve( cls, id: str, **params: Unpack["ScheduledQueryRunRetrieveParams"] ) -> "ScheduledQueryRun": """ - Retrieves the details of an scheduled query run. + Retrieves the details of a scheduled query run. """ instance = cls(id, **params) instance.refresh() @@ -132,7 +132,7 @@ async def retrieve_async( cls, id: str, **params: Unpack["ScheduledQueryRunRetrieveParams"] ) -> "ScheduledQueryRun": """ - Retrieves the details of an scheduled query run. + Retrieves the details of a scheduled query run. """ instance = cls(id, **params) await instance.refresh_async() diff --git a/stripe/sigma/_scheduled_query_run_service.py b/stripe/sigma/_scheduled_query_run_service.py index 77196be6a..4a75f9190 100644 --- a/stripe/sigma/_scheduled_query_run_service.py +++ b/stripe/sigma/_scheduled_query_run_service.py @@ -64,7 +64,7 @@ def retrieve( options: Optional["RequestOptions"] = None, ) -> "ScheduledQueryRun": """ - Retrieves the details of an scheduled query run. + Retrieves the details of a scheduled query run. """ return cast( "ScheduledQueryRun", @@ -87,7 +87,7 @@ async def retrieve_async( options: Optional["RequestOptions"] = None, ) -> "ScheduledQueryRun": """ - Retrieves the details of an scheduled query run. + Retrieves the details of a scheduled query run. """ return cast( "ScheduledQueryRun", diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index e0d67cbdd..359141e18 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -629,7 +629,7 @@ def list_line_items( ... @class_method_variant("_cls_list_line_items") - def list_line_items( # pyright: ignore[reportGeneralTypeIssues] + def list_line_items( self, **params: Unpack["CalculationListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ @@ -687,7 +687,7 @@ async def list_line_items_async( ... @class_method_variant("_cls_list_line_items_async") - async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] + async def list_line_items_async( self, **params: Unpack["CalculationListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ diff --git a/stripe/tax/_form.py b/stripe/tax/_form.py index c276dabf4..cd6d2e676 100644 --- a/stripe/tax/_form.py +++ b/stripe/tax/_form.py @@ -115,22 +115,419 @@ class Payee(StripeObject): """ class Us1099K(StripeObject): + class CardNotPresentTransactions(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class CashTips(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class FederalIncomeTaxWithheld(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class MonthlyVolume(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class PaymentTransactionsCount(StripeObject): + count: Optional[int] + """ + The effective number of transactions. + """ + delta: Optional[int] + """ + The signed adjustment included in the effective count. Only present for drafts. + """ + + class StateIncomeTaxWithheld(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + card_not_present_transactions: Optional[CardNotPresentTransactions] + cash_tips: Optional[CashTips] + currency: Optional[str] + """ + The currency of the amounts on the form. Always `usd`. + """ + federal_income_tax_withheld: Optional[FederalIncomeTaxWithheld] + gross_amount_of_transactions_decimal: Optional[str] + """ + The gross amount of payment transactions, as a decimal string in USD. + """ + monthly_volumes: Optional[List[MonthlyVolume]] + """ + The gross amounts for each month, ordered from January through December. + """ + payment_transactions_count: Optional[PaymentTransactionsCount] reporting_year: int """ Year represented by the information reported on the tax form. """ + state_income_tax_withheld: Optional[StateIncomeTaxWithheld] + _inner_class_types = { + "card_not_present_transactions": CardNotPresentTransactions, + "cash_tips": CashTips, + "federal_income_tax_withheld": FederalIncomeTaxWithheld, + "monthly_volumes": MonthlyVolume, + "payment_transactions_count": PaymentTransactionsCount, + "state_income_tax_withheld": StateIncomeTaxWithheld, + } class Us1099Misc(StripeObject): + class CashTips(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class CropInsuranceProceeds(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class ExcessGoldenParachutePayments(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class FederalIncomeTaxWithheld(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class FishPurchasedForResale(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class FishingBoatProceeds(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class GrossProceedsPaidToAnAttorney(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class MedicalAndHealthCarePayments(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class NonqualifiedDeferredCompensation(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class OtherIncome(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class OvertimeCompensation(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class Rents(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class Royalties(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class Section409aDeferrals(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class StateIncome(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class StateTaxWithheld(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class SubstitutePayments(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + cash_tips: Optional[CashTips] + crop_insurance_proceeds: Optional[CropInsuranceProceeds] + currency: Optional[str] + """ + The currency of the amounts on the form. Always `usd`. + """ + direct_sales_for_resale: Optional[bool] + """ + Whether direct sales of at least $5,000 of consumer products were made for resale. + """ + excess_golden_parachute_payments: Optional[ + ExcessGoldenParachutePayments + ] + fatca_filing_required: Optional[bool] + """ + Whether the FATCA filing requirement applies. + """ + federal_income_tax_withheld: Optional[FederalIncomeTaxWithheld] + fish_purchased_for_resale: Optional[FishPurchasedForResale] + fishing_boat_proceeds: Optional[FishingBoatProceeds] + gross_proceeds_paid_to_an_attorney: Optional[ + GrossProceedsPaidToAnAttorney + ] + medical_and_health_care_payments: Optional[ + MedicalAndHealthCarePayments + ] + nonqualified_deferred_compensation: Optional[ + NonqualifiedDeferredCompensation + ] + other_income: Optional[OtherIncome] + overtime_compensation: Optional[OvertimeCompensation] + rents: Optional[Rents] reporting_year: int """ Year represented by the information reported on the tax form. """ + royalties: Optional[Royalties] + section_409a_deferrals: Optional[Section409aDeferrals] + state_income: Optional[StateIncome] + state_tax_withheld: Optional[StateTaxWithheld] + substitute_payments: Optional[SubstitutePayments] + _inner_class_types = { + "cash_tips": CashTips, + "crop_insurance_proceeds": CropInsuranceProceeds, + "excess_golden_parachute_payments": ExcessGoldenParachutePayments, + "federal_income_tax_withheld": FederalIncomeTaxWithheld, + "fish_purchased_for_resale": FishPurchasedForResale, + "fishing_boat_proceeds": FishingBoatProceeds, + "gross_proceeds_paid_to_an_attorney": GrossProceedsPaidToAnAttorney, + "medical_and_health_care_payments": MedicalAndHealthCarePayments, + "nonqualified_deferred_compensation": NonqualifiedDeferredCompensation, + "other_income": OtherIncome, + "overtime_compensation": OvertimeCompensation, + "rents": Rents, + "royalties": Royalties, + "section_409a_deferrals": Section409aDeferrals, + "state_income": StateIncome, + "state_tax_withheld": StateTaxWithheld, + "substitute_payments": SubstitutePayments, + } class Us1099Nec(StripeObject): + class CashTips(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class FederalIncomeTaxWithheld(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class NonemployeeCompensation(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class OvertimeCompensation(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class StateIncome(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + class StateTaxWithheld(StripeObject): + delta_decimal: Optional[str] + """ + The signed adjustment included in the effective amount, as a decimal string. Only present for drafts. + """ + volume_decimal: Optional[str] + """ + The effective amount in the form's currency, as a decimal string. + """ + + cash_tips: Optional[CashTips] + currency: Optional[str] + """ + The currency of the amounts on the form. Always `usd`. + """ + direct_sales_indicator: Optional[bool] + """ + Whether direct sales of at least $5,000 of consumer products were made for resale. + """ + fatca_filing_requirement: Optional[bool] + """ + Whether the FATCA filing requirement applies. + """ + federal_income_tax_withheld: Optional[FederalIncomeTaxWithheld] + nonemployee_compensation: Optional[NonemployeeCompensation] + overtime_compensation: Optional[OvertimeCompensation] reporting_year: int """ Year represented by the information reported on the tax form. """ + state_income: Optional[StateIncome] + state_tax_withheld: Optional[StateTaxWithheld] + _inner_class_types = { + "cash_tips": CashTips, + "federal_income_tax_withheld": FederalIncomeTaxWithheld, + "nonemployee_compensation": NonemployeeCompensation, + "overtime_compensation": OvertimeCompensation, + "state_income": StateIncome, + "state_tax_withheld": StateTaxWithheld, + } au_serr: Optional[AuSerr] ca_mrdp: Optional[CaMrdp] @@ -162,6 +559,10 @@ class Us1099Nec(StripeObject): String representing the object's type. Objects of the same type share the same value. """ payee: Payee + status: Optional[Literal["draft", "finalized"]] + """ + Whether the tax form is a mutable draft or a finalized form. + """ type: Union[ Literal[ "au_serr", @@ -251,9 +652,7 @@ def pdf(self, **params: Unpack["FormPdfParams"]) -> Any: ... @class_method_variant("_cls_pdf") - def pdf( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["FormPdfParams"] - ) -> Any: + def pdf(self, **params: Unpack["FormPdfParams"]) -> Any: """ Download the PDF for a tax form. """ @@ -302,9 +701,7 @@ async def pdf_async(self, **params: Unpack["FormPdfParams"]) -> Any: ... @class_method_variant("_cls_pdf_async") - async def pdf_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["FormPdfParams"] - ) -> Any: + async def pdf_async(self, **params: Unpack["FormPdfParams"]) -> Any: """ Download the PDF for a tax form. """ diff --git a/stripe/tax/_registration.py b/stripe/tax/_registration.py index 242640fde..19bd6a291 100644 --- a/stripe/tax/_registration.py +++ b/stripe/tax/_registration.py @@ -1540,7 +1540,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["RegistrationModifyParams"] + cls, id: str, /, **params: Unpack["RegistrationModifyParams"] ) -> "Registration": """ Updates an existing Tax Registration object. @@ -1559,7 +1559,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["RegistrationModifyParams"] + cls, id: str, /, **params: Unpack["RegistrationModifyParams"] ) -> "Registration": """ Updates an existing Tax Registration object. diff --git a/stripe/tax/_settings.py b/stripe/tax/_settings.py index c180373d6..c47640ca0 100644 --- a/stripe/tax/_settings.py +++ b/stripe/tax/_settings.py @@ -102,14 +102,14 @@ class Pending(StripeObject): """ status: Union[Literal["active", "pending"], str] """ - The status of the Tax `Settings`. + Whether these settings have the information Stripe Tax needs to calculate tax. It doesn't reflect whether your integration is ready to collect tax. """ status_details: StatusDetails @classmethod def modify(cls, **params: Unpack["SettingsModifyParams"]) -> "Settings": """ - Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set. + Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set. Check the returned Tax Settings object and validate that its status is active. """ return cast( "Settings", @@ -125,7 +125,7 @@ async def modify_async( cls, **params: Unpack["SettingsModifyParams"] ) -> "Settings": """ - Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set. + Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set. Check the returned Tax Settings object and validate that its status is active. """ return cast( "Settings", diff --git a/stripe/tax/_settings_service.py b/stripe/tax/_settings_service.py index b553dd849..93925aff4 100644 --- a/stripe/tax/_settings_service.py +++ b/stripe/tax/_settings_service.py @@ -61,7 +61,7 @@ def update( options: Optional["RequestOptions"] = None, ) -> "Settings": """ - Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set. + Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set. Check the returned Tax Settings object and validate that its status is active. """ return cast( "Settings", @@ -80,7 +80,7 @@ async def update_async( options: Optional["RequestOptions"] = None, ) -> "Settings": """ - Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set. + Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set. Check the returned Tax Settings object and validate that its status is active. """ return cast( "Settings", diff --git a/stripe/tax/_transaction.py b/stripe/tax/_transaction.py index 03f1f4d2c..d575f153e 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -563,7 +563,7 @@ def list_line_items( ... @class_method_variant("_cls_list_line_items") - def list_line_items( # pyright: ignore[reportGeneralTypeIssues] + def list_line_items( self, **params: Unpack["TransactionListLineItemsParams"] ) -> ListObject["TransactionLineItem"]: """ @@ -621,7 +621,7 @@ async def list_line_items_async( ... @class_method_variant("_cls_list_line_items_async") - async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] + async def list_line_items_async( self, **params: Unpack["TransactionListLineItemsParams"] ) -> ListObject["TransactionLineItem"]: """ diff --git a/stripe/terminal/_configuration.py b/stripe/terminal/_configuration.py index fd47c40b0..bbaf39987 100644 --- a/stripe/terminal/_configuration.py +++ b/stripe/terminal/_configuration.py @@ -610,7 +610,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["ConfigurationDeleteParams"] + cls, sid: str, /, **params: Unpack["ConfigurationDeleteParams"] ) -> "Configuration": """ Deletes a Configuration object. @@ -628,7 +628,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["ConfigurationDeleteParams"] + sid: str, /, **params: Unpack["ConfigurationDeleteParams"] ) -> "Configuration": """ Deletes a Configuration object. @@ -645,7 +645,7 @@ def delete( ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] + def delete( self, **params: Unpack["ConfigurationDeleteParams"] ) -> "Configuration": """ @@ -659,7 +659,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["ConfigurationDeleteParams"] + cls, sid: str, /, **params: Unpack["ConfigurationDeleteParams"] ) -> "Configuration": """ Deletes a Configuration object. @@ -677,7 +677,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["ConfigurationDeleteParams"] + sid: str, /, **params: Unpack["ConfigurationDeleteParams"] ) -> "Configuration": """ Deletes a Configuration object. @@ -694,7 +694,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["ConfigurationDeleteParams"] ) -> "Configuration": """ @@ -748,7 +748,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["ConfigurationModifyParams"] + cls, id: str, /, **params: Unpack["ConfigurationModifyParams"] ) -> "Configuration": """ Updates a new Configuration object. @@ -765,7 +765,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["ConfigurationModifyParams"] + cls, id: str, /, **params: Unpack["ConfigurationModifyParams"] ) -> "Configuration": """ Updates a new Configuration object. diff --git a/stripe/terminal/_location.py b/stripe/terminal/_location.py index 0c457d074..c27d58d06 100644 --- a/stripe/terminal/_location.py +++ b/stripe/terminal/_location.py @@ -204,7 +204,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["LocationDeleteParams"] + cls, sid: str, /, **params: Unpack["LocationDeleteParams"] ) -> "Location": """ Deletes a Location object. @@ -222,7 +222,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["LocationDeleteParams"] + sid: str, /, **params: Unpack["LocationDeleteParams"] ) -> "Location": """ Deletes a Location object. @@ -237,9 +237,7 @@ def delete(self, **params: Unpack["LocationDeleteParams"]) -> "Location": ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["LocationDeleteParams"] - ) -> "Location": + def delete(self, **params: Unpack["LocationDeleteParams"]) -> "Location": """ Deletes a Location object. """ @@ -251,7 +249,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["LocationDeleteParams"] + cls, sid: str, /, **params: Unpack["LocationDeleteParams"] ) -> "Location": """ Deletes a Location object. @@ -269,7 +267,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["LocationDeleteParams"] + sid: str, /, **params: Unpack["LocationDeleteParams"] ) -> "Location": """ Deletes a Location object. @@ -286,7 +284,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["LocationDeleteParams"] ) -> "Location": """ @@ -340,7 +338,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["LocationModifyParams"] + cls, id: str, /, **params: Unpack["LocationModifyParams"] ) -> "Location": """ Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -357,7 +355,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["LocationModifyParams"] + cls, id: str, /, **params: Unpack["LocationModifyParams"] ) -> "Location": """ Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index 043899407..bcf30e74d 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -107,7 +107,7 @@ class ActivateGiftCard(StripeObject): class ApiError(StripeObject): advice_code: Optional[str] """ - For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines#retrying-issuer-declines) if they provide one. + For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines/card#retrying-issuer-declines) if they provide one. """ charge: Optional[str] """ @@ -168,6 +168,7 @@ class ApiError(StripeObject): "customer_session_expired", "customer_tax_location_invalid", "debit_not_authorized", + "dispute_evidence_page_limit_exceeded", "email_invalid", "expired_card", "expired_payment_method", @@ -178,6 +179,8 @@ class ApiError(StripeObject): "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", + "financial_connections_consent_locale_invalid", + "financial_connections_consent_locale_unsupported", "financial_connections_institution_unavailable", "financial_connections_no_successful_transaction_refresh", "forwarding_api_inactive", @@ -232,6 +235,7 @@ class ApiError(StripeObject): "parameter_missing", "parameter_unknown", "parameters_exclusive", + "payment_evaluation_on_api_version_not_supported", "payment_intent_action_required", "payment_intent_authentication_failure", "payment_intent_incompatible_payment_method", @@ -1121,7 +1125,7 @@ def activate_gift_card( ... @class_method_variant("_cls_activate_gift_card") - def activate_gift_card( # pyright: ignore[reportGeneralTypeIssues] + def activate_gift_card( self, **params: Unpack["ReaderActivateGiftCardParams"] ) -> "Reader": """ @@ -1176,7 +1180,7 @@ async def activate_gift_card_async( ... @class_method_variant("_cls_activate_gift_card_async") - async def activate_gift_card_async( # pyright: ignore[reportGeneralTypeIssues] + async def activate_gift_card_async( self, **params: Unpack["ReaderActivateGiftCardParams"] ) -> "Reader": """ @@ -1231,7 +1235,7 @@ def cancel_action( ... @class_method_variant("_cls_cancel_action") - def cancel_action( # pyright: ignore[reportGeneralTypeIssues] + def cancel_action( self, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ @@ -1286,7 +1290,7 @@ async def cancel_action_async( ... @class_method_variant("_cls_cancel_action_async") - async def cancel_action_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_action_async( self, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ @@ -1341,7 +1345,7 @@ def cashout_gift_card( ... @class_method_variant("_cls_cashout_gift_card") - def cashout_gift_card( # pyright: ignore[reportGeneralTypeIssues] + def cashout_gift_card( self, **params: Unpack["ReaderCashoutGiftCardParams"] ) -> "Reader": """ @@ -1396,7 +1400,7 @@ async def cashout_gift_card_async( ... @class_method_variant("_cls_cashout_gift_card_async") - async def cashout_gift_card_async( # pyright: ignore[reportGeneralTypeIssues] + async def cashout_gift_card_async( self, **params: Unpack["ReaderCashoutGiftCardParams"] ) -> "Reader": """ @@ -1454,7 +1458,7 @@ def check_gift_card_balance( ... @class_method_variant("_cls_check_gift_card_balance") - def check_gift_card_balance( # pyright: ignore[reportGeneralTypeIssues] + def check_gift_card_balance( self, **params: Unpack["ReaderCheckGiftCardBalanceParams"] ) -> "Reader": """ @@ -1512,7 +1516,7 @@ async def check_gift_card_balance_async( ... @class_method_variant("_cls_check_gift_card_balance_async") - async def check_gift_card_balance_async( # pyright: ignore[reportGeneralTypeIssues] + async def check_gift_card_balance_async( self, **params: Unpack["ReaderCheckGiftCardBalanceParams"] ) -> "Reader": """ @@ -1567,7 +1571,7 @@ def collect_inputs( ... @class_method_variant("_cls_collect_inputs") - def collect_inputs( # pyright: ignore[reportGeneralTypeIssues] + def collect_inputs( self, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ @@ -1622,7 +1626,7 @@ async def collect_inputs_async( ... @class_method_variant("_cls_collect_inputs_async") - async def collect_inputs_async( # pyright: ignore[reportGeneralTypeIssues] + async def collect_inputs_async( self, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ @@ -1680,7 +1684,7 @@ def collect_payment_method( ... @class_method_variant("_cls_collect_payment_method") - def collect_payment_method( # pyright: ignore[reportGeneralTypeIssues] + def collect_payment_method( self, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ @@ -1738,7 +1742,7 @@ async def collect_payment_method_async( ... @class_method_variant("_cls_collect_payment_method_async") - async def collect_payment_method_async( # pyright: ignore[reportGeneralTypeIssues] + async def collect_payment_method_async( self, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ @@ -1796,7 +1800,7 @@ def confirm_payment_intent( ... @class_method_variant("_cls_confirm_payment_intent") - def confirm_payment_intent( # pyright: ignore[reportGeneralTypeIssues] + def confirm_payment_intent( self, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ @@ -1854,7 +1858,7 @@ async def confirm_payment_intent_async( ... @class_method_variant("_cls_confirm_payment_intent_async") - async def confirm_payment_intent_async( # pyright: ignore[reportGeneralTypeIssues] + async def confirm_payment_intent_async( self, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ @@ -1903,7 +1907,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["ReaderDeleteParams"] + cls, sid: str, /, **params: Unpack["ReaderDeleteParams"] ) -> "Reader": """ Deletes a Reader object. @@ -1920,7 +1924,9 @@ def _cls_delete( @overload @staticmethod - def delete(sid: str, **params: Unpack["ReaderDeleteParams"]) -> "Reader": + def delete( + sid: str, /, **params: Unpack["ReaderDeleteParams"] + ) -> "Reader": """ Deletes a Reader object. """ @@ -1934,9 +1940,7 @@ def delete(self, **params: Unpack["ReaderDeleteParams"]) -> "Reader": ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["ReaderDeleteParams"] - ) -> "Reader": + def delete(self, **params: Unpack["ReaderDeleteParams"]) -> "Reader": """ Deletes a Reader object. """ @@ -1948,7 +1952,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["ReaderDeleteParams"] + cls, sid: str, /, **params: Unpack["ReaderDeleteParams"] ) -> "Reader": """ Deletes a Reader object. @@ -1966,7 +1970,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["ReaderDeleteParams"] + sid: str, /, **params: Unpack["ReaderDeleteParams"] ) -> "Reader": """ Deletes a Reader object. @@ -1983,7 +1987,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["ReaderDeleteParams"] ) -> "Reader": """ @@ -2037,7 +2041,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["ReaderModifyParams"] + cls, id: str, /, **params: Unpack["ReaderModifyParams"] ) -> "Reader": """ Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -2054,7 +2058,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["ReaderModifyParams"] + cls, id: str, /, **params: Unpack["ReaderModifyParams"] ) -> "Reader": """ Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -2110,7 +2114,7 @@ def process_payment_intent( ... @class_method_variant("_cls_process_payment_intent") - def process_payment_intent( # pyright: ignore[reportGeneralTypeIssues] + def process_payment_intent( self, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ @@ -2168,7 +2172,7 @@ async def process_payment_intent_async( ... @class_method_variant("_cls_process_payment_intent_async") - async def process_payment_intent_async( # pyright: ignore[reportGeneralTypeIssues] + async def process_payment_intent_async( self, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ @@ -2223,7 +2227,7 @@ def process_setup_intent( ... @class_method_variant("_cls_process_setup_intent") - def process_setup_intent( # pyright: ignore[reportGeneralTypeIssues] + def process_setup_intent( self, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ @@ -2278,7 +2282,7 @@ async def process_setup_intent_async( ... @class_method_variant("_cls_process_setup_intent_async") - async def process_setup_intent_async( # pyright: ignore[reportGeneralTypeIssues] + async def process_setup_intent_async( self, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ @@ -2333,7 +2337,7 @@ def refund_payment( ... @class_method_variant("_cls_refund_payment") - def refund_payment( # pyright: ignore[reportGeneralTypeIssues] + def refund_payment( self, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ @@ -2388,7 +2392,7 @@ async def refund_payment_async( ... @class_method_variant("_cls_refund_payment_async") - async def refund_payment_async( # pyright: ignore[reportGeneralTypeIssues] + async def refund_payment_async( self, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ @@ -2443,7 +2447,7 @@ def reload_gift_card( ... @class_method_variant("_cls_reload_gift_card") - def reload_gift_card( # pyright: ignore[reportGeneralTypeIssues] + def reload_gift_card( self, **params: Unpack["ReaderReloadGiftCardParams"] ) -> "Reader": """ @@ -2498,7 +2502,7 @@ async def reload_gift_card_async( ... @class_method_variant("_cls_reload_gift_card_async") - async def reload_gift_card_async( # pyright: ignore[reportGeneralTypeIssues] + async def reload_gift_card_async( self, **params: Unpack["ReaderReloadGiftCardParams"] ) -> "Reader": """ @@ -2575,7 +2579,7 @@ def set_reader_display( ... @class_method_variant("_cls_set_reader_display") - def set_reader_display( # pyright: ignore[reportGeneralTypeIssues] + def set_reader_display( self, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ @@ -2630,7 +2634,7 @@ async def set_reader_display_async( ... @class_method_variant("_cls_set_reader_display_async") - async def set_reader_display_async( # pyright: ignore[reportGeneralTypeIssues] + async def set_reader_display_async( self, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ @@ -2693,7 +2697,7 @@ def present_payment_method( ... @class_method_variant("_cls_present_payment_method") - def present_payment_method( # pyright: ignore[reportGeneralTypeIssues] + def present_payment_method( self, **params: Unpack["ReaderPresentPaymentMethodParams"] ) -> "Reader": """ @@ -2753,7 +2757,7 @@ async def present_payment_method_async( ... @class_method_variant("_cls_present_payment_method_async") - async def present_payment_method_async( # pyright: ignore[reportGeneralTypeIssues] + async def present_payment_method_async( self, **params: Unpack["ReaderPresentPaymentMethodParams"] ) -> "Reader": """ @@ -2813,7 +2817,7 @@ def succeed_input_collection( ... @class_method_variant("_cls_succeed_input_collection") - def succeed_input_collection( # pyright: ignore[reportGeneralTypeIssues] + def succeed_input_collection( self, **params: Unpack["ReaderSucceedInputCollectionParams"] ) -> "Reader": """ @@ -2873,7 +2877,7 @@ async def succeed_input_collection_async( ... @class_method_variant("_cls_succeed_input_collection_async") - async def succeed_input_collection_async( # pyright: ignore[reportGeneralTypeIssues] + async def succeed_input_collection_async( self, **params: Unpack["ReaderSucceedInputCollectionParams"] ) -> "Reader": """ @@ -2933,7 +2937,7 @@ def timeout_input_collection( ... @class_method_variant("_cls_timeout_input_collection") - def timeout_input_collection( # pyright: ignore[reportGeneralTypeIssues] + def timeout_input_collection( self, **params: Unpack["ReaderTimeoutInputCollectionParams"] ) -> "Reader": """ @@ -2993,7 +2997,7 @@ async def timeout_input_collection_async( ... @class_method_variant("_cls_timeout_input_collection_async") - async def timeout_input_collection_async( # pyright: ignore[reportGeneralTypeIssues] + async def timeout_input_collection_async( self, **params: Unpack["ReaderTimeoutInputCollectionParams"] ) -> "Reader": """ diff --git a/stripe/test_helpers/_test_clock.py b/stripe/test_helpers/_test_clock.py index 5cfc58f8f..c653987db 100644 --- a/stripe/test_helpers/_test_clock.py +++ b/stripe/test_helpers/_test_clock.py @@ -128,7 +128,7 @@ def advance( ... @class_method_variant("_cls_advance") - def advance( # pyright: ignore[reportGeneralTypeIssues] + def advance( self, **params: Unpack["TestClockAdvanceParams"] ) -> "TestClock": """ @@ -183,7 +183,7 @@ async def advance_async( ... @class_method_variant("_cls_advance_async") - async def advance_async( # pyright: ignore[reportGeneralTypeIssues] + async def advance_async( self, **params: Unpack["TestClockAdvanceParams"] ) -> "TestClock": """ @@ -232,7 +232,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["TestClockDeleteParams"] + cls, sid: str, /, **params: Unpack["TestClockDeleteParams"] ) -> "TestClock": """ Deletes a test clock. @@ -250,7 +250,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["TestClockDeleteParams"] + sid: str, /, **params: Unpack["TestClockDeleteParams"] ) -> "TestClock": """ Deletes a test clock. @@ -265,9 +265,7 @@ def delete(self, **params: Unpack["TestClockDeleteParams"]) -> "TestClock": ... @class_method_variant("_cls_delete") - def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["TestClockDeleteParams"] - ) -> "TestClock": + def delete(self, **params: Unpack["TestClockDeleteParams"]) -> "TestClock": """ Deletes a test clock. """ @@ -279,7 +277,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["TestClockDeleteParams"] + cls, sid: str, /, **params: Unpack["TestClockDeleteParams"] ) -> "TestClock": """ Deletes a test clock. @@ -297,7 +295,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["TestClockDeleteParams"] + sid: str, /, **params: Unpack["TestClockDeleteParams"] ) -> "TestClock": """ Deletes a test clock. @@ -314,7 +312,7 @@ async def delete_async( ... @class_method_variant("_cls_delete_async") - async def delete_async( # pyright: ignore[reportGeneralTypeIssues] + async def delete_async( self, **params: Unpack["TestClockDeleteParams"] ) -> "TestClock": """ diff --git a/stripe/three_d_secure/__init__.py b/stripe/three_d_secure/__init__.py new file mode 100644 index 000000000..bcc75aaae --- /dev/null +++ b/stripe/three_d_secure/__init__.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.three_d_secure._authentication import ( + Authentication as Authentication, + ) + from stripe.three_d_secure._authentication_service import ( + AuthenticationService as AuthenticationService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "Authentication": ("stripe.three_d_secure._authentication", False), + "AuthenticationService": ( + "stripe.three_d_secure._authentication_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/three_d_secure/_authentication.py b/stripe/three_d_secure/_authentication.py new file mode 100644 index 000000000..52a037291 --- /dev/null +++ b/stripe/three_d_secure/_authentication.py @@ -0,0 +1,829 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._createable_api_resource import CreateableAPIResource +from stripe._expandable_field import ExpandableField +from stripe._list_object import ListObject +from stripe._listable_api_resource import ListableAPIResource +from stripe._stripe_object import StripeObject, UntypedStripeObject +from stripe._util import class_method_variant, sanitize_id +from typing import ClassVar, Optional, Union, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._payment_method import PaymentMethod + from stripe.params.three_d_secure._authentication_cancel_params import ( + AuthenticationCancelParams, + ) + from stripe.params.three_d_secure._authentication_create_params import ( + AuthenticationCreateParams, + ) + from stripe.params.three_d_secure._authentication_list_params import ( + AuthenticationListParams, + ) + from stripe.params.three_d_secure._authentication_retrieve_params import ( + AuthenticationRetrieveParams, + ) + from stripe.params.three_d_secure._authentication_submit_params import ( + AuthenticationSubmitParams, + ) + + +class Authentication( + CreateableAPIResource["Authentication"], + ListableAPIResource["Authentication"], +): + """ + The Standalone 3DS API allows you to run EMV 3D Secure (3DS) authentication using Stripe while authorizing the payment with any PSP. + + Related guide: [Standalone 3DS](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure) + """ + + OBJECT_NAME: ClassVar[Literal["three_d_secure.authentication"]] = ( + "three_d_secure.authentication" + ) + + class AcquirerDetails(StripeObject): + acquirer_bin: Optional[str] + """ + The Acquirer BIN (specific to the directory_server). + """ + acquirer_country: Optional[str] + """ + The two-letter country code of the acquirer ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + acquirer_merchant_id: Optional[str] + """ + The Merchant ID (or Card Acceptor ID) that your acquirer assigned you (specific to the directory_server). + """ + mcc: Optional[str] + """ + The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) as defined by each payment system or directory server. + """ + merchant_name: Optional[str] + """ + The merchant name assigned by the acquirer or payment system. Same name used in the authorization message as defined in [ISO 8583](https://en.wikipedia.org/wiki/ISO_8583). + """ + requestor_id: Optional[str] + """ + Requestor ID if you're enrolled in the card network's 3DS program. Otherwise, you can omit this field because Stripe assigns a Requestor ID with the card networks. + """ + + class Channel(StripeObject): + class Browser(StripeObject): + accept_header: str + """ + The HTTP accept headers from the cardholder's browser. + """ + color_depth: Optional[int] + """ + The color depth of the cardholder's screen. + """ + ip_address: str + """ + The IP address of the browser. + """ + java_enabled: Optional[bool] + """ + The cardholder browser's ability to execute Java. + """ + javascript_enabled: bool + """ + The cardholder browser's ability to execute JavaScript. + """ + language: str + """ + An IETF BCP 47 language tag representing the browser language. + """ + screen_height: Optional[int] + """ + The total height of the cardholder's screen in pixels. + """ + screen_width: Optional[int] + """ + The total width of the cardholder's screen in pixels. + """ + timezone_offset: Optional[int] + """ + The time difference between UTC time and the local time of the cardholder's browser, in minutes. + """ + user_agent: str + """ + The browser user agent. + """ + + class ThreeRI(StripeObject): + previous_authentication: str + """ + ID of the previous initial authenticated 3DS Authentication object. + """ + type: Union[ + Literal[ + "delayed_shipment", + "other_payment", + "recurring", + "split_shipment", + ], + str, + ] + """ + Type of the 3RI Authentication. + """ + + browser: Optional[Browser] + """ + Contains details on the browser for a standalone 3DS Authentication. + """ + three_r_i: Optional[ThreeRI] + """ + Contains details for a 3RI standalone 3DS Authentication. + """ + type: Union[Literal["browser", "three_r_i"], str] + """ + Type of channel you would prefer to use for this 3DS Authentication. Only browser. + """ + _inner_class_types = {"browser": Browser, "three_r_i": ThreeRI} + + class FlowPreference(StripeObject): + class Challenge(StripeObject): + type: Union[Literal["mandated", "preferred"], str] + """ + Type of challenge flow you requested for this 3DS Authentication. + """ + + class DataShare(StripeObject): + type: Union[Literal["ds_specific", "emv_standard"], str] + """ + Type of data share flow you requested for this 3DS Authentication. + """ + + class Frictionless(StripeObject): + type: Union[Literal["low_risk", "none"], str] + """ + Type of frictionless flow you requested for this 3DS Authentication. + """ + + challenge: Optional[Challenge] + data_share: Optional[DataShare] + frictionless: Optional[Frictionless] + type: Union[Literal["challenge", "data_share", "frictionless"], str] + """ + Type of flow you requested for this 3DS Authentication. + """ + _inner_class_types = { + "challenge": Challenge, + "data_share": DataShare, + "frictionless": Frictionless, + } + + class FutureUsage(StripeObject): + class Installment(StripeObject): + class Expiry(StripeObject): + date: Optional[str] + type: Union[Literal["date", "never"], str] + + amount: Optional[int] + """ + A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + """ + expiry: Expiry + """ + Information about recurring payment expiry + """ + interval: Literal["day"] + """ + The unit of time for `interval_count`. + """ + interval_count: int + """ + The minimum number of time intervals between authorizations. + """ + number: int + """ + The maximum number of installments. + """ + _inner_class_types = {"expiry": Expiry} + + class Recurring(StripeObject): + class Expiry(StripeObject): + date: Optional[str] + type: Union[Literal["date", "never"], str] + + amount: Optional[int] + """ + A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + """ + expiry: Expiry + """ + Information about recurring payment expiry + """ + interval: Literal["day"] + """ + The unit of time for `interval_count`. + """ + interval_count: int + """ + The minimum number of time intervals between authorizations. + """ + _inner_class_types = {"expiry": Expiry} + + installment: Optional[Installment] + """ + Details about installment payments + """ + recurring: Optional[Recurring] + """ + Details about recurring payments + """ + type: Union[Literal["card_on_file", "installment", "recurring"], str] + """ + The type of future usage declared for this 3DS Authentication. + """ + _inner_class_types = { + "installment": Installment, + "recurring": Recurring, + } + + class OutcomeDetails(StripeObject): + class NetworkDetails(StripeObject): + class CartesBancaires(StripeObject): + avalgo: str + """ + The cryptogram calculation algorithm used by the card Issuer's ACS to calculate the Authentication cryptogram. Also known as cavvAlgorithm. ARes/RReq messageExtension: `CB-AVALGO` + """ + cb_exemption: Optional[str] + """ + The exemption indicator returned from Cartes Bancaires in the ARes. This is a 3 byte bitmap (lowest significant byte first and most significant bit first) that has been Base64 encoded. String (4 characters). ARes message extension: `CB-EXEMPTION` + """ + cb_score: Optional[str] + """ + The risk score returned from Cartes Bancaires in the ARes. Numeric value 0-99. ARes/RReq message extension: `CB-SCORE` + """ + + cartes_bancaires: Optional[CartesBancaires] + """ + Contains details for Cartes Bancaires specific fields in the authentication outcomes. + """ + _inner_class_types = {"cartes_bancaires": CartesBancaires} + + acs_transaction_id: Optional[str] + """ + Universally unique transaction identifier assigned by the issuer to identify the transaction. + """ + ares: Optional[str] + """ + The Authentication Response Message (ARes) is the issuer's response to the AReq message. + """ + ares_trans_status: Optional[ + Union[Literal["A", "C", "D", "I", "N", "R", "S", "U", "Y"], str] + ] + """ + TransStatus field on the ARes + """ + cryptogram: Optional[str] + """ + A 28-character Base64 string proving that 3DS was completed. Store this value securely, and don't reuse it for multiple authorizations. + """ + ds_transaction_id: Optional[str] + """ + The 3DS2 Directory Server Transaction ID. + """ + eci: Optional[str] + """ + Electronic Commerce Indicator provided by the issuer to indicate the result of this 3DS Authentication. + """ + network_details: Optional[NetworkDetails] + """ + Contains details specific to the individual network. + """ + protocol_version: Union[Literal["2.1.0", "2.2.0", "2.3.1"], str] + """ + The 3DS protocol version used for this 3DS Authentication. + """ + requestor_challenge_indicator: Optional[ + Union[Literal["01", "02", "03", "04", "05", "06"], str] + ] + """ + The indicator provided to the issuer by Stripe in the AReq that indicates whether a challenge is requested for this Authentication. This indicator should match the flow_preference you specified but may be overridden (for compliance reasons for example). + """ + rreq: Optional[str] + """ + The Results Request Message (RReq) communicates the results of the authentication or verification. + """ + rreq_trans_status: Optional[ + Union[Literal["A", "C", "D", "I", "N", "R", "S", "U", "Y"], str] + ] + """ + TransStatus field on the RReq + """ + three_ds_server_transaction_id: str + """ + Universally unique transaction identifier assigned by Stripe to identify the transaction. + """ + _inner_class_types = {"network_details": NetworkDetails} + + class ShippingAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: Optional[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + + acquirer_details: Optional[AcquirerDetails] + """ + Contains additional details about the acquirer for a 3DS Authentication. + """ + amount: Optional[int] + """ + The amount for this 3DS Authentication. + """ + challenge_url: Optional[str] + """ + The URL for presenting a challenge to your cardholder, present if status is requires_challenge. + """ + channel: Channel + """ + Contains details on the channel used (browser, 3RI) for a standalone 3DS Authentication. + """ + created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ + 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). + """ + directory_server: Union[ + Literal[ + "american_express", + "cartes_bancaires", + "discover", + "mastercard", + "visa", + ], + str, + ] + """ + The 3DS directory server with which this 3DS Authentication was processed. + """ + fingerprinting_url: Optional[str] + """ + The URL for performing issuer fingerprinting, present if fingerprinting is supported for the given payment method. + """ + flow_preference: Optional[FlowPreference] + """ + Contains details of the flow preference used for a standalone 3DS Authentication. + """ + future_usage: Optional[FutureUsage] + """ + Contains information about the future authorisations related to this authentication + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. + """ + message_category: Union[ + Literal["non_payment_authentication", "payment_authentication"], str + ] + """ + Indicates whether this 3DS Authentication is being performed for a payment or non-payment use case. + """ + metadata: Optional[UntypedStripeObject[str]] + """ + Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + object: Literal["three_d_secure.authentication"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + outcome: Optional[ + Union[ + Literal[ + "abandoned", + "attempt_acknowledged", + "authenticated", + "canceled", + "denied", + "informational", + "internal_error", + "not_supported", + "not_triggered", + "processing_error", + "rejected", + ], + str, + ] + ] + """ + The outcome of this 3DS Authentication. + """ + outcome_details: Optional[OutcomeDetails] + """ + Contains details on the result for a standalone 3DS Authentication. + """ + payment_method: ExpandableField["PaymentMethod"] + """ + ID of the payment method (a PaymentMethod object) to attach to this 3DS Authentication. + """ + reason: Optional[ + Union[ + Literal[ + "cardholder_authentication", + "issuer_requested", + "liability_shift", + "processing_costs", + "regulatory_compliance", + ], + str, + ] + ] + """ + The reason for invoking this 3DS Authentication. + """ + shipping_address: Optional[ShippingAddress] + """ + Contains details about the shipping address for a 3DS Authentication. + """ + status: Union[ + Literal[ + "canceled", + "error", + "failed", + "requires_challenge", + "requires_submission", + "succeeded", + ], + str, + ] + """ + Status of this Authentication. + """ + + @classmethod + def _cls_cancel( + cls, + authentication: str, + /, + **params: Unpack["AuthenticationCancelParams"], + ) -> "Authentication": + """ + This endpoint cancels a 3DS Authentication. You can cancel a 3DS Authentication object when it's in a non-final status: + requires_submission or requires_challenge. + """ + return cast( + "Authentication", + cls._static_request( + "post", + "/v1/three_d_secure/authentications/{authentication}/cancel".format( + authentication=sanitize_id(authentication) + ), + params=params, + ), + ) + + @overload + @staticmethod + def cancel( + authentication: str, /, **params: Unpack["AuthenticationCancelParams"] + ) -> "Authentication": + """ + This endpoint cancels a 3DS Authentication. You can cancel a 3DS Authentication object when it's in a non-final status: + requires_submission or requires_challenge. + """ + ... + + @overload + def cancel( + self, **params: Unpack["AuthenticationCancelParams"] + ) -> "Authentication": + """ + This endpoint cancels a 3DS Authentication. You can cancel a 3DS Authentication object when it's in a non-final status: + requires_submission or requires_challenge. + """ + ... + + @class_method_variant("_cls_cancel") + def cancel( + self, **params: Unpack["AuthenticationCancelParams"] + ) -> "Authentication": + """ + This endpoint cancels a 3DS Authentication. You can cancel a 3DS Authentication object when it's in a non-final status: + requires_submission or requires_challenge. + """ + return cast( + "Authentication", + self._request( + "post", + "/v1/three_d_secure/authentications/{authentication}/cancel".format( + authentication=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_cancel_async( + cls, + authentication: str, + /, + **params: Unpack["AuthenticationCancelParams"], + ) -> "Authentication": + """ + This endpoint cancels a 3DS Authentication. You can cancel a 3DS Authentication object when it's in a non-final status: + requires_submission or requires_challenge. + """ + return cast( + "Authentication", + await cls._static_request_async( + "post", + "/v1/three_d_secure/authentications/{authentication}/cancel".format( + authentication=sanitize_id(authentication) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def cancel_async( + authentication: str, /, **params: Unpack["AuthenticationCancelParams"] + ) -> "Authentication": + """ + This endpoint cancels a 3DS Authentication. You can cancel a 3DS Authentication object when it's in a non-final status: + requires_submission or requires_challenge. + """ + ... + + @overload + async def cancel_async( + self, **params: Unpack["AuthenticationCancelParams"] + ) -> "Authentication": + """ + This endpoint cancels a 3DS Authentication. You can cancel a 3DS Authentication object when it's in a non-final status: + requires_submission or requires_challenge. + """ + ... + + @class_method_variant("_cls_cancel_async") + async def cancel_async( + self, **params: Unpack["AuthenticationCancelParams"] + ) -> "Authentication": + """ + This endpoint cancels a 3DS Authentication. You can cancel a 3DS Authentication object when it's in a non-final status: + requires_submission or requires_challenge. + """ + return cast( + "Authentication", + await self._request_async( + "post", + "/v1/three_d_secure/authentications/{authentication}/cancel".format( + authentication=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + def create( + cls, **params: Unpack["AuthenticationCreateParams"] + ) -> "Authentication": + """ + This endpoint creates a 3DS Authentication. Refer to the [Create a 3DS Authentication object section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#create-a-3ds-authentication-object) for more information. + + You can pass the submit parameter to automatically submit the 3DS Authentication object when you create it. Refer to the [Submit at creation section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-at-creation) for more information. + """ + return cast( + "Authentication", + cls._static_request( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + async def create_async( + cls, **params: Unpack["AuthenticationCreateParams"] + ) -> "Authentication": + """ + This endpoint creates a 3DS Authentication. Refer to the [Create a 3DS Authentication object section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#create-a-3ds-authentication-object) for more information. + + You can pass the submit parameter to automatically submit the 3DS Authentication object when you create it. Refer to the [Submit at creation section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-at-creation) for more information. + """ + return cast( + "Authentication", + await cls._static_request_async( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + def list( + cls, **params: Unpack["AuthenticationListParams"] + ) -> ListObject["Authentication"]: + """ + Returns a list of 3D Secure Authentications. + """ + result = cls._static_request( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + async def list_async( + cls, **params: Unpack["AuthenticationListParams"] + ) -> ListObject["Authentication"]: + """ + Returns a list of 3D Secure Authentications. + """ + result = await cls._static_request_async( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + def retrieve( + cls, id: str, **params: Unpack["AuthenticationRetrieveParams"] + ) -> "Authentication": + """ + This endpoint retrieves a 3DS Authentication. + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["AuthenticationRetrieveParams"] + ) -> "Authentication": + """ + This endpoint retrieves a 3DS Authentication. + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + + @classmethod + def _cls_submit( + cls, + authentication: str, + /, + **params: Unpack["AuthenticationSubmitParams"], + ) -> "Authentication": + """ + This endpoint submits a 3DS Authentication. You can submit a 3DS Authentication object when it has status requires_submission. Refer to the [Submit the 3DS Authentication object section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-the-3ds-authentication-object) for more information. + """ + return cast( + "Authentication", + cls._static_request( + "post", + "/v1/three_d_secure/authentications/{authentication}/submit".format( + authentication=sanitize_id(authentication) + ), + params=params, + ), + ) + + @overload + @staticmethod + def submit( + authentication: str, /, **params: Unpack["AuthenticationSubmitParams"] + ) -> "Authentication": + """ + This endpoint submits a 3DS Authentication. You can submit a 3DS Authentication object when it has status requires_submission. Refer to the [Submit the 3DS Authentication object section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-the-3ds-authentication-object) for more information. + """ + ... + + @overload + def submit( + self, **params: Unpack["AuthenticationSubmitParams"] + ) -> "Authentication": + """ + This endpoint submits a 3DS Authentication. You can submit a 3DS Authentication object when it has status requires_submission. Refer to the [Submit the 3DS Authentication object section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-the-3ds-authentication-object) for more information. + """ + ... + + @class_method_variant("_cls_submit") + def submit( + self, **params: Unpack["AuthenticationSubmitParams"] + ) -> "Authentication": + """ + This endpoint submits a 3DS Authentication. You can submit a 3DS Authentication object when it has status requires_submission. Refer to the [Submit the 3DS Authentication object section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-the-3ds-authentication-object) for more information. + """ + return cast( + "Authentication", + self._request( + "post", + "/v1/three_d_secure/authentications/{authentication}/submit".format( + authentication=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_submit_async( + cls, + authentication: str, + /, + **params: Unpack["AuthenticationSubmitParams"], + ) -> "Authentication": + """ + This endpoint submits a 3DS Authentication. You can submit a 3DS Authentication object when it has status requires_submission. Refer to the [Submit the 3DS Authentication object section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-the-3ds-authentication-object) for more information. + """ + return cast( + "Authentication", + await cls._static_request_async( + "post", + "/v1/three_d_secure/authentications/{authentication}/submit".format( + authentication=sanitize_id(authentication) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def submit_async( + authentication: str, /, **params: Unpack["AuthenticationSubmitParams"] + ) -> "Authentication": + """ + This endpoint submits a 3DS Authentication. You can submit a 3DS Authentication object when it has status requires_submission. Refer to the [Submit the 3DS Authentication object section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-the-3ds-authentication-object) for more information. + """ + ... + + @overload + async def submit_async( + self, **params: Unpack["AuthenticationSubmitParams"] + ) -> "Authentication": + """ + This endpoint submits a 3DS Authentication. You can submit a 3DS Authentication object when it has status requires_submission. Refer to the [Submit the 3DS Authentication object section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-the-3ds-authentication-object) for more information. + """ + ... + + @class_method_variant("_cls_submit_async") + async def submit_async( + self, **params: Unpack["AuthenticationSubmitParams"] + ) -> "Authentication": + """ + This endpoint submits a 3DS Authentication. You can submit a 3DS Authentication object when it has status requires_submission. Refer to the [Submit the 3DS Authentication object section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-the-3ds-authentication-object) for more information. + """ + return cast( + "Authentication", + await self._request_async( + "post", + "/v1/three_d_secure/authentications/{authentication}/submit".format( + authentication=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + _inner_class_types = { + "acquirer_details": AcquirerDetails, + "channel": Channel, + "flow_preference": FlowPreference, + "future_usage": FutureUsage, + "outcome_details": OutcomeDetails, + "shipping_address": ShippingAddress, + } diff --git a/stripe/three_d_secure/_authentication_service.py b/stripe/three_d_secure/_authentication_service.py new file mode 100644 index 000000000..5b948b72d --- /dev/null +++ b/stripe/three_d_secure/_authentication_service.py @@ -0,0 +1,248 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._list_object import ListObject + from stripe._request_options import RequestOptions + from stripe.params.three_d_secure._authentication_cancel_params import ( + AuthenticationCancelParams, + ) + from stripe.params.three_d_secure._authentication_create_params import ( + AuthenticationCreateParams, + ) + from stripe.params.three_d_secure._authentication_list_params import ( + AuthenticationListParams, + ) + from stripe.params.three_d_secure._authentication_retrieve_params import ( + AuthenticationRetrieveParams, + ) + from stripe.params.three_d_secure._authentication_submit_params import ( + AuthenticationSubmitParams, + ) + from stripe.three_d_secure._authentication import Authentication + + +class AuthenticationService(StripeService): + def list( + self, + params: Optional["AuthenticationListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Authentication]": + """ + Returns a list of 3D Secure Authentications. + """ + return cast( + "ListObject[Authentication]", + self._request( + "get", + "/v1/three_d_secure/authentications", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["AuthenticationListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Authentication]": + """ + Returns a list of 3D Secure Authentications. + """ + return cast( + "ListObject[Authentication]", + await self._request_async( + "get", + "/v1/three_d_secure/authentications", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "AuthenticationCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "Authentication": + """ + This endpoint creates a 3DS Authentication. Refer to the [Create a 3DS Authentication object section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#create-a-3ds-authentication-object) for more information. + + You can pass the submit parameter to automatically submit the 3DS Authentication object when you create it. Refer to the [Submit at creation section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-at-creation) for more information. + """ + return cast( + "Authentication", + self._request( + "post", + "/v1/three_d_secure/authentications", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "AuthenticationCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "Authentication": + """ + This endpoint creates a 3DS Authentication. Refer to the [Create a 3DS Authentication object section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#create-a-3ds-authentication-object) for more information. + + You can pass the submit parameter to automatically submit the 3DS Authentication object when you create it. Refer to the [Submit at creation section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-at-creation) for more information. + """ + return cast( + "Authentication", + await self._request_async( + "post", + "/v1/three_d_secure/authentications", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + authentication: str, + /, + params: Optional["AuthenticationRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Authentication": + """ + This endpoint retrieves a 3DS Authentication. + """ + return cast( + "Authentication", + self._request( + "get", + "/v1/three_d_secure/authentications/{authentication}".format( + authentication=sanitize_id(authentication), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + authentication: str, + /, + params: Optional["AuthenticationRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Authentication": + """ + This endpoint retrieves a 3DS Authentication. + """ + return cast( + "Authentication", + await self._request_async( + "get", + "/v1/three_d_secure/authentications/{authentication}".format( + authentication=sanitize_id(authentication), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def cancel( + self, + authentication: str, + /, + params: Optional["AuthenticationCancelParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Authentication": + """ + This endpoint cancels a 3DS Authentication. You can cancel a 3DS Authentication object when it's in a non-final status: + requires_submission or requires_challenge. + """ + return cast( + "Authentication", + self._request( + "post", + "/v1/three_d_secure/authentications/{authentication}/cancel".format( + authentication=sanitize_id(authentication), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def cancel_async( + self, + authentication: str, + /, + params: Optional["AuthenticationCancelParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Authentication": + """ + This endpoint cancels a 3DS Authentication. You can cancel a 3DS Authentication object when it's in a non-final status: + requires_submission or requires_challenge. + """ + return cast( + "Authentication", + await self._request_async( + "post", + "/v1/three_d_secure/authentications/{authentication}/cancel".format( + authentication=sanitize_id(authentication), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def submit( + self, + authentication: str, + /, + params: Optional["AuthenticationSubmitParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Authentication": + """ + This endpoint submits a 3DS Authentication. You can submit a 3DS Authentication object when it has status requires_submission. Refer to the [Submit the 3DS Authentication object section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-the-3ds-authentication-object) for more information. + """ + return cast( + "Authentication", + self._request( + "post", + "/v1/three_d_secure/authentications/{authentication}/submit".format( + authentication=sanitize_id(authentication), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def submit_async( + self, + authentication: str, + /, + params: Optional["AuthenticationSubmitParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Authentication": + """ + This endpoint submits a 3DS Authentication. You can submit a 3DS Authentication object when it has status requires_submission. Refer to the [Submit the 3DS Authentication object section of the Standalone 3DS guide](https://docs.stripe.com/payments/3d-secure/standalone-3d-secure#submit-the-3ds-authentication-object) for more information. + """ + return cast( + "Authentication", + await self._request_async( + "post", + "/v1/three_d_secure/authentications/{authentication}/submit".format( + authentication=sanitize_id(authentication), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/treasury/_financial_account.py b/stripe/treasury/_financial_account.py index c0277f1c1..5311aaab0 100644 --- a/stripe/treasury/_financial_account.py +++ b/stripe/treasury/_financial_account.py @@ -307,7 +307,7 @@ def close( ... @class_method_variant("_cls_close") - def close( # pyright: ignore[reportGeneralTypeIssues] + def close( self, **params: Unpack["FinancialAccountCloseParams"] ) -> "FinancialAccount": """ @@ -367,7 +367,7 @@ async def close_async( ... @class_method_variant("_cls_close_async") - async def close_async( # pyright: ignore[reportGeneralTypeIssues] + async def close_async( self, **params: Unpack["FinancialAccountCloseParams"] ) -> "FinancialAccount": """ @@ -458,7 +458,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["FinancialAccountModifyParams"] + cls, id: str, /, **params: Unpack["FinancialAccountModifyParams"] ) -> "FinancialAccount": """ Updates the details of a FinancialAccount. @@ -475,7 +475,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["FinancialAccountModifyParams"] + cls, id: str, /, **params: Unpack["FinancialAccountModifyParams"] ) -> "FinancialAccount": """ Updates the details of a FinancialAccount. @@ -555,7 +555,7 @@ def retrieve_features( ... @class_method_variant("_cls_retrieve_features") - def retrieve_features( # pyright: ignore[reportGeneralTypeIssues] + def retrieve_features( self, **params: Unpack["FinancialAccountRetrieveFeaturesParams"] ) -> "FinancialAccountFeatures": """ @@ -615,7 +615,7 @@ async def retrieve_features_async( ... @class_method_variant("_cls_retrieve_features_async") - async def retrieve_features_async( # pyright: ignore[reportGeneralTypeIssues] + async def retrieve_features_async( self, **params: Unpack["FinancialAccountRetrieveFeaturesParams"] ) -> "FinancialAccountFeatures": """ @@ -675,7 +675,7 @@ def update_features( ... @class_method_variant("_cls_update_features") - def update_features( # pyright: ignore[reportGeneralTypeIssues] + def update_features( self, **params: Unpack["FinancialAccountUpdateFeaturesParams"] ) -> "FinancialAccountFeatures": """ @@ -735,7 +735,7 @@ async def update_features_async( ... @class_method_variant("_cls_update_features_async") - async def update_features_async( # pyright: ignore[reportGeneralTypeIssues] + async def update_features_async( self, **params: Unpack["FinancialAccountUpdateFeaturesParams"] ) -> "FinancialAccountFeatures": """ diff --git a/stripe/treasury/_inbound_transfer.py b/stripe/treasury/_inbound_transfer.py index cfcd6e5dc..727f28f97 100644 --- a/stripe/treasury/_inbound_transfer.py +++ b/stripe/treasury/_inbound_transfer.py @@ -310,7 +310,7 @@ def cancel( ... @class_method_variant("_cls_cancel") - def cancel( # pyright: ignore[reportGeneralTypeIssues] + def cancel( self, **params: Unpack["InboundTransferCancelParams"] ) -> "InboundTransfer": """ @@ -370,7 +370,7 @@ async def cancel_async( ... @class_method_variant("_cls_cancel_async") - async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_async( self, **params: Unpack["InboundTransferCancelParams"] ) -> "InboundTransfer": """ @@ -522,7 +522,7 @@ def fail( ... @class_method_variant("_cls_fail") - def fail( # pyright: ignore[reportGeneralTypeIssues] + def fail( self, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ @@ -577,7 +577,7 @@ async def fail_async( ... @class_method_variant("_cls_fail_async") - async def fail_async( # pyright: ignore[reportGeneralTypeIssues] + async def fail_async( self, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ @@ -638,7 +638,7 @@ def return_inbound_transfer( ... @class_method_variant("_cls_return_inbound_transfer") - def return_inbound_transfer( # pyright: ignore[reportGeneralTypeIssues] + def return_inbound_transfer( self, **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": @@ -700,7 +700,7 @@ async def return_inbound_transfer_async( ... @class_method_variant("_cls_return_inbound_transfer_async") - async def return_inbound_transfer_async( # pyright: ignore[reportGeneralTypeIssues] + async def return_inbound_transfer_async( self, **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": @@ -756,7 +756,7 @@ def succeed( ... @class_method_variant("_cls_succeed") - def succeed( # pyright: ignore[reportGeneralTypeIssues] + def succeed( self, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ @@ -811,7 +811,7 @@ async def succeed_async( ... @class_method_variant("_cls_succeed_async") - async def succeed_async( # pyright: ignore[reportGeneralTypeIssues] + async def succeed_async( self, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ diff --git a/stripe/treasury/_outbound_payment.py b/stripe/treasury/_outbound_payment.py index 3206ceb4b..c4fedcf36 100644 --- a/stripe/treasury/_outbound_payment.py +++ b/stripe/treasury/_outbound_payment.py @@ -366,7 +366,7 @@ def cancel( ... @class_method_variant("_cls_cancel") - def cancel( # pyright: ignore[reportGeneralTypeIssues] + def cancel( self, **params: Unpack["OutboundPaymentCancelParams"] ) -> "OutboundPayment": """ @@ -421,7 +421,7 @@ async def cancel_async( ... @class_method_variant("_cls_cancel_async") - async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_async( self, **params: Unpack["OutboundPaymentCancelParams"] ) -> "OutboundPayment": """ @@ -573,7 +573,7 @@ def fail( ... @class_method_variant("_cls_fail") - def fail( # pyright: ignore[reportGeneralTypeIssues] + def fail( self, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ @@ -628,7 +628,7 @@ async def fail_async( ... @class_method_variant("_cls_fail_async") - async def fail_async( # pyright: ignore[reportGeneralTypeIssues] + async def fail_async( self, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ @@ -683,7 +683,7 @@ def post( ... @class_method_variant("_cls_post") - def post( # pyright: ignore[reportGeneralTypeIssues] + def post( self, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ @@ -738,7 +738,7 @@ async def post_async( ... @class_method_variant("_cls_post_async") - async def post_async( # pyright: ignore[reportGeneralTypeIssues] + async def post_async( self, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ @@ -799,7 +799,7 @@ def return_outbound_payment( ... @class_method_variant("_cls_return_outbound_payment") - def return_outbound_payment( # pyright: ignore[reportGeneralTypeIssues] + def return_outbound_payment( self, **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": @@ -861,7 +861,7 @@ async def return_outbound_payment_async( ... @class_method_variant("_cls_return_outbound_payment_async") - async def return_outbound_payment_async( # pyright: ignore[reportGeneralTypeIssues] + async def return_outbound_payment_async( self, **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": @@ -917,7 +917,7 @@ def update( ... @class_method_variant("_cls_update") - def update( # pyright: ignore[reportGeneralTypeIssues] + def update( self, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ @@ -972,7 +972,7 @@ async def update_async( ... @class_method_variant("_cls_update_async") - async def update_async( # pyright: ignore[reportGeneralTypeIssues] + async def update_async( self, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ diff --git a/stripe/treasury/_outbound_transfer.py b/stripe/treasury/_outbound_transfer.py index 072146352..f2d5990f2 100644 --- a/stripe/treasury/_outbound_transfer.py +++ b/stripe/treasury/_outbound_transfer.py @@ -365,7 +365,7 @@ def cancel( ... @class_method_variant("_cls_cancel") - def cancel( # pyright: ignore[reportGeneralTypeIssues] + def cancel( self, **params: Unpack["OutboundTransferCancelParams"] ) -> "OutboundTransfer": """ @@ -425,7 +425,7 @@ async def cancel_async( ... @class_method_variant("_cls_cancel_async") - async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] + async def cancel_async( self, **params: Unpack["OutboundTransferCancelParams"] ) -> "OutboundTransfer": """ @@ -582,7 +582,7 @@ def fail( ... @class_method_variant("_cls_fail") - def fail( # pyright: ignore[reportGeneralTypeIssues] + def fail( self, **params: Unpack["OutboundTransferFailParams"] ) -> "OutboundTransfer": """ @@ -644,7 +644,7 @@ async def fail_async( ... @class_method_variant("_cls_fail_async") - async def fail_async( # pyright: ignore[reportGeneralTypeIssues] + async def fail_async( self, **params: Unpack["OutboundTransferFailParams"] ) -> "OutboundTransfer": """ @@ -706,7 +706,7 @@ def post( ... @class_method_variant("_cls_post") - def post( # pyright: ignore[reportGeneralTypeIssues] + def post( self, **params: Unpack["OutboundTransferPostParams"] ) -> "OutboundTransfer": """ @@ -768,7 +768,7 @@ async def post_async( ... @class_method_variant("_cls_post_async") - async def post_async( # pyright: ignore[reportGeneralTypeIssues] + async def post_async( self, **params: Unpack["OutboundTransferPostParams"] ) -> "OutboundTransfer": """ @@ -831,7 +831,7 @@ def return_outbound_transfer( ... @class_method_variant("_cls_return_outbound_transfer") - def return_outbound_transfer( # pyright: ignore[reportGeneralTypeIssues] + def return_outbound_transfer( self, **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": @@ -895,7 +895,7 @@ async def return_outbound_transfer_async( ... @class_method_variant("_cls_return_outbound_transfer_async") - async def return_outbound_transfer_async( # pyright: ignore[reportGeneralTypeIssues] + async def return_outbound_transfer_async( self, **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": @@ -958,7 +958,7 @@ def update( ... @class_method_variant("_cls_update") - def update( # pyright: ignore[reportGeneralTypeIssues] + def update( self, **params: Unpack["OutboundTransferUpdateParams"] ) -> "OutboundTransfer": """ @@ -1020,7 +1020,7 @@ async def update_async( ... @class_method_variant("_cls_update_async") - async def update_async( # pyright: ignore[reportGeneralTypeIssues] + async def update_async( self, **params: Unpack["OutboundTransferUpdateParams"] ) -> "OutboundTransfer": """ diff --git a/stripe/treasury/_received_credit.py b/stripe/treasury/_received_credit.py index c59a9a577..d6572455c 100644 --- a/stripe/treasury/_received_credit.py +++ b/stripe/treasury/_received_credit.py @@ -286,7 +286,9 @@ class ReversalDetails(StripeObject): """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ - network: Union[Literal["ach", "card", "stripe", "us_domestic_wire"], str] + network: Union[ + Literal["ach", "card", "rtp", "stripe", "us_domestic_wire"], str + ] """ The rails used to send the funds. """ diff --git a/stripe/v2/__init__.py b/stripe/v2/__init__.py index 8ed17d345..013767ab9 100644 --- a/stripe/v2/__init__.py +++ b/stripe/v2/__init__.py @@ -31,12 +31,6 @@ from stripe.v2._data_service import DataService as DataService from stripe.v2._deleted_object import DeletedObject as DeletedObject from stripe.v2._extend_service import ExtendService as ExtendService - from stripe.v2._financial_address_credit_simulation import ( - FinancialAddressCreditSimulation as FinancialAddressCreditSimulation, - ) - from stripe.v2._financial_address_generated_microdeposits import ( - FinancialAddressGeneratedMicrodeposits as FinancialAddressGeneratedMicrodeposits, - ) from stripe.v2._iam_service import IamService as IamService from stripe.v2._money_management_service import ( MoneyManagementService as MoneyManagementService, @@ -83,14 +77,6 @@ "DataService": ("stripe.v2._data_service", False), "DeletedObject": ("stripe.v2._deleted_object", False), "ExtendService": ("stripe.v2._extend_service", False), - "FinancialAddressCreditSimulation": ( - "stripe.v2._financial_address_credit_simulation", - False, - ), - "FinancialAddressGeneratedMicrodeposits": ( - "stripe.v2._financial_address_generated_microdeposits", - False, - ), "IamService": ("stripe.v2._iam_service", False), "MoneyManagementService": ("stripe.v2._money_management_service", False), "NetworkService": ("stripe.v2._network_service", False), diff --git a/stripe/v2/_data_service.py b/stripe/v2/_data_service.py index dc00ccddd..78c9a6e56 100644 --- a/stripe/v2/_data_service.py +++ b/stripe/v2/_data_service.py @@ -6,17 +6,29 @@ if TYPE_CHECKING: from stripe.v2.data._analytics_service import AnalyticsService + from stripe.v2.data._query_run_service import QueryRunService + from stripe.v2.data._report_run_service import ReportRunService + from stripe.v2.data._report_service import ReportService from stripe.v2.data._reporting_service import ReportingService + from stripe.v2.data._schema_service import SchemaService _subservices = { "analytics": ["stripe.v2.data._analytics_service", "AnalyticsService"], + "query_runs": ["stripe.v2.data._query_run_service", "QueryRunService"], + "reports": ["stripe.v2.data._report_service", "ReportService"], + "report_runs": ["stripe.v2.data._report_run_service", "ReportRunService"], "reporting": ["stripe.v2.data._reporting_service", "ReportingService"], + "schemas": ["stripe.v2.data._schema_service", "SchemaService"], } class DataService(StripeService): analytics: "AnalyticsService" + query_runs: "QueryRunService" + reports: "ReportService" + report_runs: "ReportRunService" reporting: "ReportingService" + schemas: "SchemaService" def __init__(self, requestor): super().__init__(requestor) diff --git a/stripe/v2/_money_management_service.py b/stripe/v2/_money_management_service.py index 905f756ec..5c634ffb6 100644 --- a/stripe/v2/_money_management_service.py +++ b/stripe/v2/_money_management_service.py @@ -14,6 +14,9 @@ from stripe.v2.money_management._debit_dispute_service import ( DebitDisputeService, ) + from stripe.v2.money_management._earned_credit_service import ( + EarnedCreditService, + ) from stripe.v2.money_management._financial_account_service import ( FinancialAccountService, ) @@ -56,8 +59,8 @@ from stripe.v2.money_management._recipient_verification_service import ( RecipientVerificationService, ) - from stripe.v2.money_management._test_helpers_service import ( - TestHelpersService, + from stripe.v2.money_management._test_helper_service import ( + TestHelperService, ) from stripe.v2.money_management._transaction_entry_service import ( TransactionEntryService, @@ -79,6 +82,10 @@ "stripe.v2.money_management._debit_dispute_service", "DebitDisputeService", ], + "earned_credits": [ + "stripe.v2.money_management._earned_credit_service", + "EarnedCreditService", + ], "financial_accounts": [ "stripe.v2.money_management._financial_account_service", "FinancialAccountService", @@ -136,8 +143,8 @@ "RecipientVerificationService", ], "test_helpers": [ - "stripe.v2.money_management._test_helpers_service", - "TestHelpersService", + "stripe.v2.money_management._test_helper_service", + "TestHelperService", ], "transactions": [ "stripe.v2.money_management._transaction_service", @@ -154,6 +161,7 @@ class MoneyManagementService(StripeService): adjustments: "AdjustmentService" currency_conversions: "CurrencyConversionService" debit_disputes: "DebitDisputeService" + earned_credits: "EarnedCreditService" financial_accounts: "FinancialAccountService" financial_addresses: "FinancialAddressService" inbound_transfers: "InboundTransferService" @@ -168,7 +176,7 @@ class MoneyManagementService(StripeService): received_debits: "ReceivedDebitService" received_debit_mandates: "ReceivedDebitMandateService" recipient_verifications: "RecipientVerificationService" - test_helpers: "TestHelpersService" + test_helpers: "TestHelperService" transactions: "TransactionService" transaction_entries: "TransactionEntryService" diff --git a/stripe/v2/_signals_service.py b/stripe/v2/_signals_service.py index 7955b4b8d..dd9fa9af0 100644 --- a/stripe/v2/_signals_service.py +++ b/stripe/v2/_signals_service.py @@ -20,7 +20,7 @@ ) _subservices = { - "account_activity": [ + "account_activities": [ "stripe.v2.signals._account_activity_service", "AccountActivityService", ], @@ -44,7 +44,7 @@ class SignalsService(StripeService): - account_activity: "AccountActivityService" + account_activities: "AccountActivityService" account_evaluations: "AccountEvaluationService" account_signals: "AccountSignalService" payment_retry_evaluations: "PaymentRetryEvaluationService" diff --git a/stripe/v2/_test_helper_service.py b/stripe/v2/_test_helper_service.py index 4d461ae25..f2868cf08 100644 --- a/stripe/v2/_test_helper_service.py +++ b/stripe/v2/_test_helper_service.py @@ -5,18 +5,11 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: - from stripe.v2.test_helpers._financial_address_service import ( - FinancialAddressService, - ) from stripe.v2.test_helpers._money_management_service import ( MoneyManagementService, ) _subservices = { - "financial_addresses": [ - "stripe.v2.test_helpers._financial_address_service", - "FinancialAddressService", - ], "money_management": [ "stripe.v2.test_helpers._money_management_service", "MoneyManagementService", @@ -25,7 +18,6 @@ class TestHelperService(StripeService): - financial_addresses: "FinancialAddressService" money_management: "MoneyManagementService" def __init__(self, requestor): diff --git a/stripe/v2/billing/_contract_service.py b/stripe/v2/billing/_contract_service.py index 644d2ba79..74c70acb7 100644 --- a/stripe/v2/billing/_contract_service.py +++ b/stripe/v2/billing/_contract_service.py @@ -125,12 +125,20 @@ def create( "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"}, + }, }, ), options=options, @@ -157,12 +165,20 @@ async def create_async( "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"}, + }, }, ), options=options, @@ -276,6 +292,11 @@ def update( "add": { "pricing": { "price_details": { + "pricing_overrides": { + "overwrite_price": { + "unit_amount": "decimal_string", + }, + }, "quantity_changes": { "set": "decimal_string", }, @@ -285,6 +306,13 @@ def update( "update": { "pricing": { "price_details": { + "pricing_override_actions": { + "add": { + "overwrite_price": { + "unit_amount": "decimal_string", + }, + }, + }, "quantity_changes": { "set": "decimal_string", }, @@ -321,6 +349,11 @@ async def update_async( "add": { "pricing": { "price_details": { + "pricing_overrides": { + "overwrite_price": { + "unit_amount": "decimal_string", + }, + }, "quantity_changes": { "set": "decimal_string", }, @@ -330,6 +363,13 @@ async def update_async( "update": { "pricing": { "price_details": { + "pricing_override_actions": { + "add": { + "overwrite_price": { + "unit_amount": "decimal_string", + }, + }, + }, "quantity_changes": { "set": "decimal_string", }, diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index a880a0eea..65eddc57b 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -56,6 +56,14 @@ class PspMigration(StripeObject): 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", @@ -82,6 +90,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -133,6 +142,14 @@ class PspMigration(StripeObject): 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", @@ -159,6 +176,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -224,6 +242,14 @@ class PspMigration(StripeObject): 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", @@ -250,6 +276,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -301,6 +328,14 @@ class PspMigration(StripeObject): 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", @@ -327,6 +362,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -378,6 +414,14 @@ class PspMigration(StripeObject): 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", @@ -404,6 +448,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -474,6 +519,14 @@ class PspMigration(StripeObject): 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", @@ -500,6 +553,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -558,6 +612,14 @@ class PspMigration(StripeObject): 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", @@ -584,6 +646,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -642,6 +705,14 @@ class PspMigration(StripeObject): 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", @@ -668,6 +739,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -719,6 +791,14 @@ class PspMigration(StripeObject): 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", @@ -745,6 +825,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -796,6 +877,14 @@ class PspMigration(StripeObject): 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", @@ -822,6 +911,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -921,6 +1011,14 @@ class PspMigration(StripeObject): 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", @@ -947,6 +1045,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -1007,6 +1106,14 @@ class PspMigration(StripeObject): 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", @@ -1033,6 +1140,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -1091,6 +1199,14 @@ class PspMigration(StripeObject): 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", @@ -1117,6 +1233,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -1168,6 +1285,14 @@ class PspMigration(StripeObject): 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", @@ -1194,6 +1319,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -1391,6 +1517,14 @@ class PspMigration(StripeObject): 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", @@ -1413,7 +1547,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1540,6 +1678,14 @@ class PspMigration(StripeObject): 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", @@ -1562,7 +1708,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1653,6 +1803,14 @@ class PspMigration(StripeObject): 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", @@ -1675,7 +1833,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1720,6 +1882,14 @@ class PspMigration(StripeObject): 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", @@ -1742,7 +1912,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1787,6 +1961,14 @@ class PspMigration(StripeObject): 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", @@ -1809,7 +1991,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1854,6 +2040,14 @@ class PspMigration(StripeObject): 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", @@ -1876,7 +2070,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1921,6 +2119,14 @@ class PspMigration(StripeObject): 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", @@ -1943,7 +2149,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1988,6 +2198,14 @@ class PspMigration(StripeObject): 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", @@ -2010,7 +2228,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2055,6 +2277,14 @@ class PspMigration(StripeObject): 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", @@ -2077,7 +2307,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2122,6 +2356,14 @@ class PspMigration(StripeObject): 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", @@ -2144,7 +2386,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2189,6 +2435,14 @@ class PspMigration(StripeObject): 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", @@ -2211,7 +2465,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2256,6 +2514,14 @@ class PspMigration(StripeObject): 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", @@ -2278,7 +2544,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2323,6 +2593,14 @@ class PspMigration(StripeObject): 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", @@ -2345,7 +2623,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2390,6 +2672,14 @@ class PspMigration(StripeObject): 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", @@ -2412,7 +2702,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2457,6 +2751,14 @@ class PspMigration(StripeObject): 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", @@ -2479,7 +2781,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2524,6 +2830,14 @@ class PspMigration(StripeObject): 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", @@ -2546,7 +2860,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2591,6 +2909,14 @@ class PspMigration(StripeObject): 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", @@ -2613,7 +2939,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2658,6 +2988,14 @@ class PspMigration(StripeObject): 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", @@ -2680,7 +3018,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2725,6 +3067,14 @@ class PspMigration(StripeObject): 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", @@ -2747,7 +3097,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2792,6 +3146,14 @@ class PspMigration(StripeObject): 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", @@ -2814,7 +3176,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2859,6 +3225,14 @@ class PspMigration(StripeObject): 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", @@ -2881,7 +3255,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2926,6 +3304,14 @@ class PspMigration(StripeObject): 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", @@ -2948,7 +3334,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2993,6 +3383,14 @@ class PspMigration(StripeObject): 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", @@ -3015,7 +3413,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3060,6 +3462,14 @@ class PspMigration(StripeObject): 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", @@ -3082,7 +3492,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3127,6 +3541,14 @@ class PspMigration(StripeObject): 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", @@ -3149,7 +3571,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3194,6 +3620,14 @@ class PspMigration(StripeObject): 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", @@ -3216,7 +3650,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3261,6 +3699,14 @@ class PspMigration(StripeObject): 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", @@ -3283,7 +3729,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3328,6 +3778,14 @@ class PspMigration(StripeObject): 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", @@ -3350,7 +3808,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3395,6 +3857,14 @@ class PspMigration(StripeObject): 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", @@ -3417,7 +3887,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3462,6 +3936,14 @@ class PspMigration(StripeObject): 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", @@ -3484,7 +3966,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3529,6 +4015,14 @@ class PspMigration(StripeObject): 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", @@ -3551,7 +4045,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3596,6 +4094,14 @@ class PspMigration(StripeObject): 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", @@ -3618,7 +4124,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3663,6 +4173,14 @@ class PspMigration(StripeObject): 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", @@ -3685,7 +4203,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3730,6 +4252,14 @@ class PspMigration(StripeObject): 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", @@ -3752,7 +4282,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3797,6 +4331,14 @@ class PspMigration(StripeObject): 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", @@ -3819,7 +4361,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3864,6 +4410,14 @@ class PspMigration(StripeObject): 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", @@ -3886,7 +4440,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3931,6 +4489,14 @@ class PspMigration(StripeObject): 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", @@ -3953,7 +4519,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -3998,6 +4568,14 @@ class PspMigration(StripeObject): 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", @@ -4020,7 +4598,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -4065,6 +4647,14 @@ class PspMigration(StripeObject): 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", @@ -4087,7 +4677,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -4132,6 +4726,14 @@ class PspMigration(StripeObject): 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", @@ -4154,7 +4756,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -4199,6 +4805,14 @@ class PspMigration(StripeObject): 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", @@ -4221,7 +4835,90 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "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 SatispayPayments(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. @@ -4266,6 +4963,14 @@ class PspMigration(StripeObject): 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", @@ -4288,7 +4993,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -4333,6 +5042,14 @@ class PspMigration(StripeObject): 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", @@ -4355,7 +5072,90 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "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 SequraPayments(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. @@ -4406,6 +5206,14 @@ class PspMigration(StripeObject): 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", @@ -4430,7 +5238,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -4481,6 +5293,14 @@ class PspMigration(StripeObject): 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", @@ -4503,7 +5323,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -4548,6 +5372,14 @@ class PspMigration(StripeObject): 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", @@ -4570,7 +5402,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -4615,6 +5451,14 @@ class PspMigration(StripeObject): 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", @@ -4637,7 +5481,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -4682,6 +5530,14 @@ class PspMigration(StripeObject): 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", @@ -4704,7 +5560,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -4749,6 +5609,14 @@ class PspMigration(StripeObject): 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", @@ -4771,7 +5639,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -4941,6 +5813,10 @@ class StatusDetail(StripeObject): """ Allow the merchant to process Samsung Pay payments. """ + satispay_payments: Optional[SatispayPayments] + """ + Allow the merchant to process Satispay payments. + """ sepa_bank_transfer_payments: Optional[SepaBankTransferPayments] """ Allow the merchant to process SEPA bank transfer payments. @@ -4949,6 +5825,10 @@ class StatusDetail(StripeObject): """ Allow the merchant to process SEPA Direct Debit payments. """ + sequra_payments: Optional[SequraPayments] + """ + Allow the merchant to process SeQura payments. + """ stripe_balance: Optional[StripeBalance] """ Capabilities that enable the merchant to manage their Stripe Balance (/v1/balance). @@ -5013,8 +5893,10 @@ class StatusDetail(StripeObject): "promptpay_payments": PromptpayPayments, "revolut_pay_payments": RevolutPayPayments, "samsung_pay_payments": SamsungPayPayments, + "satispay_payments": SatispayPayments, "sepa_bank_transfer_payments": SepaBankTransferPayments, "sepa_debit_payments": SepaDebitPayments, + "sequra_payments": SequraPayments, "stripe_balance": StripeBalance, "sunbit_payments": SunbitPayments, "swish_payments": SwishPayments, @@ -5297,6 +6179,14 @@ class PspMigration(StripeObject): 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", @@ -5323,6 +6213,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -5374,6 +6265,14 @@ class PspMigration(StripeObject): 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", @@ -5400,6 +6299,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -5451,6 +6351,14 @@ class PspMigration(StripeObject): 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", @@ -5477,6 +6385,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -5528,6 +6437,100 @@ class PspMigration(StripeObject): class StatusDetail(StripeObject): code: Literal[ "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class Ousd(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = { + "psp_migration": PspMigration, + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", "requirements_past_due", "requirements_pending_verification", "restricted_other", @@ -5554,6 +6557,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -5605,6 +6609,14 @@ class PspMigration(StripeObject): 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", @@ -5631,6 +6643,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -5682,6 +6695,14 @@ class PspMigration(StripeObject): 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", @@ -5708,6 +6729,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -5739,6 +6761,10 @@ class StatusDetail(StripeObject): """ Can receive business storage-type funds on Stripe in GBP. """ + ousd: Optional[Ousd] + """ + Can receive business storage-type funds on Stripe in OUSD. + """ usd: Optional[Usd] """ Can receive business storage-type funds on Stripe in USD. @@ -5752,6 +6778,7 @@ class StatusDetail(StripeObject): "cad": Cad, "eur": Eur, "gbp": Gbp, + "ousd": Ousd, "usd": Usd, "usdc": Usdc, } @@ -5793,6 +6820,14 @@ class PspMigration(StripeObject): 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", @@ -5819,6 +6854,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -5870,6 +6906,14 @@ class PspMigration(StripeObject): 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", @@ -5896,6 +6940,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -5947,6 +6992,14 @@ class PspMigration(StripeObject): 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", @@ -5973,6 +7026,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -6024,6 +7078,14 @@ class PspMigration(StripeObject): 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", @@ -6050,6 +7112,93 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + + class Ousd(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", + "disrupted", + "expired", + "inactive", + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = { + "psp_migration": PspMigration, + } + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", + "pending", + "rejected", "restricted", "unsupported", ] @@ -6101,6 +7250,14 @@ class PspMigration(StripeObject): 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", @@ -6127,6 +7284,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -6178,6 +7336,14 @@ class PspMigration(StripeObject): 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", @@ -6204,6 +7370,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -6235,6 +7402,10 @@ class StatusDetail(StripeObject): """ Can send business storage-type funds on Stripe in GBP. """ + ousd: Optional[Ousd] + """ + Can send business storage-type funds on Stripe in OUSD. + """ usd: Optional[Usd] """ Can send business storage-type funds on Stripe in USD. @@ -6248,6 +7419,7 @@ class StatusDetail(StripeObject): "cad": Cad, "eur": Eur, "gbp": Gbp, + "ousd": Ousd, "usd": Usd, "usdc": Usdc, } @@ -6303,6 +7475,14 @@ class PspMigration(StripeObject): 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", @@ -6329,6 +7509,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -6380,6 +7561,14 @@ class PspMigration(StripeObject): 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", @@ -6406,6 +7595,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -6468,6 +7658,14 @@ class PspMigration(StripeObject): 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", @@ -6494,6 +7692,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -6545,6 +7744,14 @@ class PspMigration(StripeObject): 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", @@ -6571,6 +7778,7 @@ class StatusDetail(StripeObject): status: Literal[ "active", "pending", + "rejected", "restricted", "unsupported", ] @@ -6646,6 +7854,14 @@ class PspMigration(StripeObject): 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", @@ -6670,7 +7886,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -6727,6 +7947,14 @@ class PspMigration(StripeObject): 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", @@ -6751,7 +7979,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -6801,6 +8033,14 @@ class PspMigration(StripeObject): 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", @@ -6825,7 +8065,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -6875,6 +8119,14 @@ class PspMigration(StripeObject): 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", @@ -6899,7 +8151,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -6949,6 +8205,14 @@ class PspMigration(StripeObject): 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", @@ -6973,7 +8237,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -7023,6 +8291,14 @@ class PspMigration(StripeObject): 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", @@ -7047,7 +8323,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -7126,6 +8406,14 @@ class PspMigration(StripeObject): 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", @@ -7150,7 +8438,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -7200,6 +8492,14 @@ class PspMigration(StripeObject): 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", @@ -7224,7 +8524,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -7274,6 +8578,14 @@ class PspMigration(StripeObject): 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", @@ -7298,7 +8610,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -7367,6 +8683,14 @@ class PspMigration(StripeObject): 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", @@ -7391,7 +8715,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -7441,6 +8769,14 @@ class PspMigration(StripeObject): 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", @@ -7465,7 +8801,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -7529,6 +8869,14 @@ class PspMigration(StripeObject): 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", @@ -7553,7 +8901,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -7781,6 +9133,14 @@ class PspMigration(StripeObject): 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", @@ -7805,7 +9165,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -7855,6 +9219,14 @@ class PspMigration(StripeObject): 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", @@ -7879,7 +9251,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -7929,6 +9305,14 @@ class PspMigration(StripeObject): 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", @@ -7953,7 +9337,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -8003,6 +9391,14 @@ class PspMigration(StripeObject): 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", @@ -8027,7 +9423,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -8077,6 +9477,14 @@ class PspMigration(StripeObject): 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", @@ -8101,7 +9509,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -8151,6 +9563,14 @@ class PspMigration(StripeObject): 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", @@ -8175,7 +9595,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -8225,6 +9649,14 @@ class PspMigration(StripeObject): 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", @@ -8249,7 +9681,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -8299,6 +9735,14 @@ class PspMigration(StripeObject): 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", @@ -8323,7 +9767,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -8373,6 +9821,14 @@ class PspMigration(StripeObject): 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", @@ -8397,7 +9853,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -8447,6 +9907,14 @@ class PspMigration(StripeObject): 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", @@ -8471,7 +9939,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -8521,6 +9993,14 @@ class PspMigration(StripeObject): 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", @@ -8545,7 +10025,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -8595,6 +10079,14 @@ class PspMigration(StripeObject): 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", @@ -8619,7 +10111,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -8669,6 +10165,14 @@ class PspMigration(StripeObject): 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", @@ -8693,7 +10197,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -8806,6 +10314,14 @@ class PspMigration(StripeObject): 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", @@ -8828,7 +10344,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -8873,6 +10393,14 @@ class PspMigration(StripeObject): 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", @@ -8895,7 +10423,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -8940,6 +10472,14 @@ class PspMigration(StripeObject): 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", @@ -8962,7 +10502,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -9013,6 +10557,14 @@ class PspMigration(StripeObject): 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", @@ -9037,7 +10589,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -9087,6 +10643,14 @@ class PspMigration(StripeObject): 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", @@ -9111,7 +10675,11 @@ class StatusDetail(StripeObject): Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -9518,8 +11086,10 @@ class Error(StripeObject): code: Union[ Literal[ "invalid_address_city_state_postal_code", + "invalid_address_cmra_address", "invalid_address_highway_contract_box", "invalid_address_private_mailbox", + "invalid_address_registered_agent_address", "invalid_business_profile_name", "invalid_business_profile_name_denylisted", "invalid_company_name_denylisted", @@ -9729,6 +11299,7 @@ class Deadline(StripeObject): "received_debits.bank_accounts", "revolut_pay_payments", "samsung_pay_payments", + "satispay_payments", "sepa_bank_transfer_payments", "sepa_debit_payments", "stripe_balance.payouts", @@ -12360,7 +13931,7 @@ class RelatedNetworkObject(StripeObject): """ type: Union[Literal["link", "network_business_profile"], str] """ - Closed Enum. The type of related network object. + Open Enum. The type of related network object. """ class Requirements(StripeObject): @@ -12369,8 +13940,10 @@ class Error(StripeObject): code: Union[ Literal[ "invalid_address_city_state_postal_code", + "invalid_address_cmra_address", "invalid_address_highway_contract_box", "invalid_address_private_mailbox", + "invalid_address_registered_agent_address", "invalid_business_profile_name", "invalid_business_profile_name_denylisted", "invalid_company_name_denylisted", @@ -12580,6 +14153,7 @@ class Deadline(StripeObject): "received_debits.bank_accounts", "revolut_pay_payments", "samsung_pay_payments", + "satispay_payments", "sepa_bank_transfer_payments", "sepa_debit_payments", "stripe_balance.payouts", diff --git a/stripe/v2/core/_account_link.py b/stripe/v2/core/_account_link.py index 067ed1c7e..804a43c5b 100644 --- a/stripe/v2/core/_account_link.py +++ b/stripe/v2/core/_account_link.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional, Union +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -34,22 +34,6 @@ class CollectionOptions(StripeObject): """ Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ - configurations: List[ - Union[ - Literal[ - "customer", - "developer", - "merchant", - "money_manager", - "recipient", - "storer", - ], - str, - ] - ] - """ - Open Enum. A v2/core/account can be configured to enable certain functionality. The configuration param targets the v2/core/account_link to collect information for the specified v2/core/account configuration/s. - """ refresh_url: str """ The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink's URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party. @@ -79,22 +63,6 @@ class CollectionOptions(StripeObject): """ Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ - configurations: List[ - Union[ - Literal[ - "customer", - "developer", - "merchant", - "money_manager", - "recipient", - "storer", - ], - str, - ] - ] - """ - Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s. - """ refresh_url: str """ The URL the user will be redirected to if the Account Link is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new Account Link with the same parameters used to create the original Account Link, then redirect the user to the new Account Link URL so they can continue the flow. Make sure to authenticate the user before redirecting to the new Account Link, in case the URL leaks to a third party. If a new Account Link can't be generated, or if the redirect fails, you should display a useful error to the user. @@ -124,10 +92,6 @@ class CollectionOptions(StripeObject): """ Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ - configurations: List[Union[Literal["recipient"], str]] - """ - Open Enum. A v2/core/account can be configured to enable certain functionality. The configuration param targets the v2/core/account_link to collect information for the specified v2/core/account configuration/s. - """ refresh_url: str """ The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink's URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party. @@ -157,10 +121,6 @@ class CollectionOptions(StripeObject): """ Specifies the requirements that Stripe collects from v2/core/accounts in the Update flow. """ - configurations: List[Union[Literal["recipient"], str]] - """ - Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s. - """ refresh_url: str """ The URL the user will be redirected to if the Account Link is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new Account Link with the same parameters used to create the original Account Link, then redirect the user to the new Account Link URL so they can continue the flow. Make sure to authenticate the user before redirecting to the new Account Link, in case the URL leaks to a third party. If a new Account Link can't be generated, or if the redirect fails, you should display a useful error to the user. @@ -232,6 +192,6 @@ class CollectionOptions(StripeObject): """ use_case: UseCase """ - Hash containing usage options. + Describes the Stripe-hosted flow for this Account Link, including its type and flow-specific configuration. """ _inner_class_types = {"use_case": UseCase} diff --git a/stripe/v2/core/_event_destination.py b/stripe/v2/core/_event_destination.py index f95a80033..1ad0377b9 100644 --- a/stripe/v2/core/_event_destination.py +++ b/stripe/v2/core/_event_destination.py @@ -17,41 +17,41 @@ class EventDestination(StripeObject): class AmazonEventbridge(StripeObject): aws_account_id: str """ - The AWS account ID. + The AWS account ID that owns the event bus receiving events. """ aws_event_source_arn: str """ - The ARN of the AWS event source. + The ARN of the Stripe-created partner event source in your AWS account. """ aws_event_source_status: Literal[ "active", "deleted", "pending", "unknown" ] """ - The state of the AWS event source. + The AWS-reported lifecycle state of the partner event source. """ class AzureEventGrid(StripeObject): azure_partner_topic_name: str """ - The name of the Azure partner topic. + The name of the Stripe-created partner topic that receives events. """ azure_partner_topic_status: Union[ Literal["activated", "deleted", "never_activated", "unknown"], str ] """ - The status of the Azure partner topic. + The Azure-reported lifecycle state of the partner topic. """ azure_region: str """ - The Azure region. + The Azure region where the partner topic is located. """ azure_resource_group_name: str """ - The name of the Azure resource group. + The Azure resource group containing the partner topic. """ azure_subscription_id: str """ - The Azure subscription ID. + The Azure subscription containing the resource group and partner topic. """ class StatusDetails(StripeObject): @@ -70,43 +70,43 @@ class Disabled(StripeObject): disabled: Optional[Disabled] """ - Details about why the event destination has been disabled. + Present when the destination was disabled; identifies the cause, time, and provider-side object involved when available. """ _inner_class_types = {"disabled": Disabled} class WebhookEndpoint(StripeObject): signing_secret: Optional[str] """ - The signing secret of the webhook endpoint, only includable on creation. + The secret used to verify Stripe signatures on delivered events. Returned only in the create response when explicitly included; public API clients cannot retrieve it later. """ url: Optional[str] """ - The URL of the webhook endpoint, includable. + The URL where Stripe sends matching events. Live mode requires HTTPS; sandbox mode also supports HTTP. Returned only when explicitly included. """ amazon_eventbridge: Optional[AmazonEventbridge] """ - Amazon EventBridge configuration. + Configuration for delivering events through an Amazon EventBridge partner event source. """ azure_event_grid: Optional[AzureEventGrid] """ - Azure Event Grid configuration. + Configuration for delivering events through an Azure Event Grid partner topic. """ created: str """ - Time at which the object was created. + The time when the destination was created. """ description: str """ - An optional description of what the event destination is used for. + An optional user-defined description of the destination's purpose. """ enabled_events: List[str] """ - The list of events to enable for this endpoint. + The list of event types enabled for delivery to this destination. """ event_payload: Literal["snapshot", "thin"] """ - Payload type of events being subscribed to. + Whether to deliver as snapshot or thin events. """ events_from: Optional[List[str]] """ @@ -126,11 +126,11 @@ class WebhookEndpoint(StripeObject): """ metadata: Optional[UntypedStripeObject[str]] """ - Metadata. + User-defined key/value data for the destination; it has no effect on event matching or delivery. """ name: str """ - Event destination name. + A user-defined label for identifying the destination in Stripe. """ object: Literal["v2.core.event_destination"] """ @@ -138,30 +138,30 @@ class WebhookEndpoint(StripeObject): """ snapshot_api_version: Optional[str] """ - If using the snapshot event payload, the API version events are rendered as. + For snapshot events only, the Stripe API version used to render event objects. You can't change this value after you create the event destination. Thin events are not pinned to an API version. """ status: Literal["disabled", "enabled"] """ - Status. It can be set to either enabled or disabled. + Whether Stripe currently attempts delivery. Stripe attempts delivery to enabled destinations when their provider configuration is active; disabled destinations do not receive delivery attempts. """ status_details: Optional[StatusDetails] """ - Additional information about event destination status. + Additional lifecycle context for the destination status, when available. """ type: Union[ Literal["amazon_eventbridge", "azure_event_grid", "webhook_endpoint"], str, ] """ - Event destination type. + The delivery transport. Chosen when the destination is created and cannot be changed by update. """ updated: str """ - Time at which the object was last updated. + The time when the destination object was last updated. """ webhook_endpoint: Optional[WebhookEndpoint] """ - Webhook endpoint configuration. + Configuration for delivering events to a webhook endpoint. Live mode requires HTTPS; sandbox mode also supports HTTP. """ _inner_class_types = { "amazon_eventbridge": AmazonEventbridge, diff --git a/stripe/v2/core/vault/_network_token.py b/stripe/v2/core/vault/_network_token.py index 3e3d828ef..8f3d7060e 100644 --- a/stripe/v2/core/vault/_network_token.py +++ b/stripe/v2/core/vault/_network_token.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 +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -60,7 +60,11 @@ class Cryptogram(StripeObject): """ String representing the object's type. Objects of the same type share the same value of the object field. """ - status: Literal["active", "deactivated", "suspended"] + origin: Union[Literal["card_on_file", "wallet"], str] + """ + The origin of the resource used to provision this network token. + """ + status: Union[Literal["active", "deactivated", "suspended"], str] """ Closed Enum. The status of the network token. """ diff --git a/stripe/v2/data/__init__.py b/stripe/v2/data/__init__.py index c4f116d27..9b91a9ac5 100644 --- a/stripe/v2/data/__init__.py +++ b/stripe/v2/data/__init__.py @@ -8,16 +8,36 @@ from stripe.v2.data._analytics_service import ( AnalyticsService as AnalyticsService, ) + from stripe.v2.data._query_run import QueryRun as QueryRun + from stripe.v2.data._query_run_service import ( + QueryRunService as QueryRunService, + ) + from stripe.v2.data._report import Report as Report + from stripe.v2.data._report_run import ReportRun as ReportRun + from stripe.v2.data._report_run_service import ( + ReportRunService as ReportRunService, + ) + from stripe.v2.data._report_service import ReportService as ReportService from stripe.v2.data._reporting_service import ( ReportingService as ReportingService, ) + from stripe.v2.data._schema import Schema as Schema + from stripe.v2.data._schema_service import SchemaService as SchemaService # name -> (import_target, is_submodule) _import_map = { "analytics": ("stripe.v2.data.analytics", True), "reporting": ("stripe.v2.data.reporting", True), "AnalyticsService": ("stripe.v2.data._analytics_service", False), + "QueryRun": ("stripe.v2.data._query_run", False), + "QueryRunService": ("stripe.v2.data._query_run_service", False), + "Report": ("stripe.v2.data._report", False), + "ReportRun": ("stripe.v2.data._report_run", False), + "ReportRunService": ("stripe.v2.data._report_run_service", False), + "ReportService": ("stripe.v2.data._report_service", False), "ReportingService": ("stripe.v2.data._reporting_service", False), + "Schema": ("stripe.v2.data._schema", False), + "SchemaService": ("stripe.v2.data._schema_service", False), } if not TYPE_CHECKING: diff --git a/stripe/v2/data/_query_run.py b/stripe/v2/data/_query_run.py new file mode 100644 index 000000000..ffd2a892b --- /dev/null +++ b/stripe/v2/data/_query_run.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject, UntypedStripeObject +from typing import Any, ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class QueryRun(StripeObject): + """ + The `QueryRun` resource represents an execution of ad-hoc SQL against a dataset. Once + created, Stripe processes the query. When the query has finished running, the object + provides a reference to the results. + """ + + OBJECT_NAME: ClassVar[Literal["v2.data.query_run"]] = "v2.data.query_run" + + class Query(StripeObject): + sql: Optional[str] + """ + Ad-hoc SQL to execute. + """ + + class Result(StripeObject): + class File(StripeObject): + class Column(StripeObject): + name: str + """ + The name of the column. + """ + type: Union[ + Literal[ + "bigint", + "boolean", + "date", + "datetime", + "decimal", + "double", + "integer", + "timestamp", + "varchar", + ], + str, + ] + """ + The data type of the column. + """ + + class DownloadUrl(StripeObject): + expires_at: Optional[str] + """ + The time that the URL expires. + """ + url: str + """ + The URL that can be used for accessing the file. + """ + + columns: List[Column] + """ + The schema of the result data. + """ + content_type: Union[Literal["csv"], str] + """ + The content type of the file. + """ + download_url: DownloadUrl + """ + A pre-signed URL that allows secure, time-limited access to download the file. + """ + size: int + """ + The total size of the file in bytes. + """ + _inner_class_types = { + "columns": Column, + "download_url": DownloadUrl, + } + _field_encodings = {"size": "int64_string"} + + class Inline(StripeObject): + class Column(StripeObject): + name: str + """ + The name of the column. + """ + type: Union[ + Literal[ + "bigint", + "boolean", + "date", + "datetime", + "decimal", + "double", + "integer", + "timestamp", + "varchar", + ], + str, + ] + """ + The data type of the column. + """ + + class Row(StripeObject): + data: UntypedStripeObject[Any] + """ + The column data in this row, keyed by column name. + """ + + columns: List[Column] + """ + The schema of the result data. + """ + next_page_url: Optional[str] + """ + Token for the next page of rows. + """ + previous_page_url: Optional[str] + """ + Token for the previous page of rows. + """ + rows: List[Row] + """ + The result rows, each represented as a map of column name to value. + """ + _inner_class_types = {"columns": Column, "rows": Row} + + col_count: Optional[int] + """ + The total number of columns in the result. + """ + file: Optional[File] + """ + File result with a download URL. This is the default result type. + """ + inline: Optional[Inline] + """ + Inline result with data returned directly. Only present when requested via + `include[0]=result.inline`. + """ + row_count: Optional[int] + """ + The total number of data rows in the result, excluding any header row. + """ + _inner_class_types = {"file": File, "inline": Inline} + _field_encodings = { + "col_count": "int64_string", + "row_count": "int64_string", + } + + class ResultOptions(StripeObject): + compress_file: Optional[bool] + """ + If set, the generated result file is compressed into a ZIP archive before + it is stored. This applies only to downloadable file results. + """ + + class StatusDetails(StripeObject): + canceled_at: Optional[str] + """ + Time at which the run was canceled. Populated when the run is in the `canceled` state. + """ + code: Optional[ + Union[ + Literal[ + "file_size_above_limit", + "internal_error", + "query_run_invalid_sql", + ], + str, + ] + ] + """ + Error code categorizing the reason the run failed. + """ + message: Optional[str] + """ + Error message with additional details about the failure. + """ + + created: str + """ + Time at which the `QueryRun` was created. + """ + dataset: Union[Literal["analytical"], str] + """ + The dataset that was queried. + """ + format: Union[Literal["csv"], str] + """ + The file format of the result. Only applicable when the result is a file. + """ + id: str + """ + The unique identifier of the `QueryRun`. + """ + livemode: bool + """ + Whether the `QueryRun` was executed in live mode. + """ + object: Literal["v2.data.query_run"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + query: Query + """ + The query that was submitted for execution. + """ + refreshed_at: Optional[str] + """ + Time at which the data used by this query was last refreshed. + """ + result: Optional[Result] + """ + The result of the `QueryRun`, populated when it has completed. + """ + result_options: Optional[ResultOptions] + """ + Settings applied to the generated result file. + """ + status: Union[Literal["canceled", "failed", "running", "succeeded"], str] + """ + The current status of the `QueryRun`. + """ + status_details: Optional[StatusDetails] + """ + Additional details about the current state of the `QueryRun`. + """ + _inner_class_types = { + "query": Query, + "result": Result, + "result_options": ResultOptions, + "status_details": StatusDetails, + } diff --git a/stripe/v2/data/_query_run_service.py b/stripe/v2/data/_query_run_service.py new file mode 100644 index 000000000..e200291a0 --- /dev/null +++ b/stripe/v2/data/_query_run_service.py @@ -0,0 +1,100 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.data._query_run_create_params import ( + QueryRunCreateParams, + ) + from stripe.params.v2.data._query_run_retrieve_params import ( + QueryRunRetrieveParams, + ) + from stripe.v2.data._query_run import QueryRun + + +class QueryRunService(StripeService): + def create( + self, + params: "QueryRunCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "QueryRun": + """ + Submits a SQL query for execution against a dataset and returns a `QueryRun` object + to track progress and retrieve results. + """ + return cast( + "QueryRun", + self._request( + "post", + "/v2/data/query_runs", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "QueryRunCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "QueryRun": + """ + Submits a SQL query for execution against a dataset and returns a `QueryRun` object + to track progress and retrieve results. + """ + return cast( + "QueryRun", + await self._request_async( + "post", + "/v2/data/query_runs", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["QueryRunRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "QueryRun": + """ + Retrieves the status and results of a previously created `QueryRun`. + """ + return cast( + "QueryRun", + self._request( + "get", + "/v2/data/query_runs/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["QueryRunRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "QueryRun": + """ + Retrieves the status and results of a previously created `QueryRun`. + """ + return cast( + "QueryRun", + await self._request_async( + "get", + "/v2/data/query_runs/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/data/_report.py b/stripe/v2/data/_report.py new file mode 100644 index 000000000..a326429c7 --- /dev/null +++ b/stripe/v2/data/_report.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject, UntypedStripeObject +from typing import ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class Report(StripeObject): + """ + The `Report` resource represents a Stripe-defined, parameterized report that provides + insights into various aspects of your Stripe integration. + """ + + OBJECT_NAME: ClassVar[Literal["v2.data.report"]] = "v2.data.report" + + class Parameters(StripeObject): + class ArrayDetails(StripeObject): + class EnumDetails(StripeObject): + allowed_values: List[str] + """ + Allowed values of the enum. + """ + + element_type: Union[ + Literal["array", "enum", "string", "timestamp"], str + ] + """ + The data type of the elements in the array. + """ + enum_details: Optional[EnumDetails] + """ + Details about enum elements in the array. + """ + _inner_class_types = {"enum_details": EnumDetails} + + class EnumDetails(StripeObject): + allowed_values: List[str] + """ + Allowed values of the enum. + """ + + array_details: Optional[ArrayDetails] + """ + For array parameters, provides details about the array elements. + """ + description: str + """ + Explains the purpose and usage of the parameter. + """ + enum_details: Optional[EnumDetails] + """ + For enum parameters, provides the list of allowed values. + """ + required: bool + """ + Indicates whether the parameter must be provided. + """ + type: Union[Literal["array", "enum", "string", "timestamp"], str] + """ + The data type of the parameter. + """ + _inner_class_types = { + "array_details": ArrayDetails, + "enum_details": EnumDetails, + } + + default_sql: Optional[str] + """ + Representative SQL generated using common parameter values, or an explanatory message when + the report's SQL cannot be exposed. Only present when requested via `include[0]=default_sql`. + """ + description: str + """ + A human-readable description of what this report contains. + """ + id: str + """ + The unique identifier of the `Report`. + """ + livemode: bool + """ + Whether this `Report` is available in live mode. + """ + name: str + """ + The human-readable name of the `Report`. + """ + object: Literal["v2.data.report"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + parameters: Optional[UntypedStripeObject[Parameters]] + """ + Specification of the parameters that the `Report` accepts, keyed by parameter name. + """ + _inner_class_types = {"parameters": Parameters} diff --git a/stripe/v2/data/_report_run.py b/stripe/v2/data/_report_run.py new file mode 100644 index 000000000..52b660216 --- /dev/null +++ b/stripe/v2/data/_report_run.py @@ -0,0 +1,232 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject, UntypedStripeObject +from typing import Any, ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class ReportRun(StripeObject): + """ + The `ReportRun` resource represents an instance of a `Report` generated with specific + parameter values. Once the object is created, Stripe begins processing the report. When + the report has finished running, it provides a reference to the results. + """ + + OBJECT_NAME: ClassVar[Literal["v2.data.report_run"]] = "v2.data.report_run" + + class Result(StripeObject): + class File(StripeObject): + class Column(StripeObject): + name: str + """ + The name of the column. + """ + type: Union[ + Literal[ + "bigint", + "boolean", + "date", + "datetime", + "decimal", + "double", + "integer", + "timestamp", + "varchar", + ], + str, + ] + """ + The data type of the column. + """ + + class DownloadUrl(StripeObject): + expires_at: Optional[str] + """ + The time that the URL expires. + """ + url: str + """ + The URL that can be used for accessing the file. + """ + + columns: List[Column] + """ + The schema of the result data. + """ + content_type: Union[Literal["csv"], str] + """ + The content type of the file. + """ + download_url: DownloadUrl + """ + A pre-signed URL that allows secure, time-limited access to download the file. + """ + size: int + """ + The total size of the file in bytes. + """ + _inner_class_types = { + "columns": Column, + "download_url": DownloadUrl, + } + _field_encodings = {"size": "int64_string"} + + class Inline(StripeObject): + class Column(StripeObject): + name: str + """ + The name of the column. + """ + type: Union[ + Literal[ + "bigint", + "boolean", + "date", + "datetime", + "decimal", + "double", + "integer", + "timestamp", + "varchar", + ], + str, + ] + """ + The data type of the column. + """ + + class Row(StripeObject): + data: UntypedStripeObject[Any] + """ + The column data in this row, keyed by column name. + """ + + columns: List[Column] + """ + The schema of the result data. + """ + next_page_url: Optional[str] + """ + Token for the next page of rows. + """ + previous_page_url: Optional[str] + """ + Token for the previous page of rows. + """ + rows: List[Row] + """ + The result rows, each represented as a map of column name to value. + """ + _inner_class_types = {"columns": Column, "rows": Row} + + col_count: Optional[int] + """ + The total number of columns in the result. + """ + file: Optional[File] + """ + File result with a download URL. This is the default result type. + """ + inline: Optional[Inline] + """ + Inline result with data returned directly. Only present when requested via + `include[0]=result.inline`. + """ + row_count: Optional[int] + """ + The total number of data rows in the result, excluding any header row. + """ + _inner_class_types = {"file": File, "inline": Inline} + _field_encodings = { + "col_count": "int64_string", + "row_count": "int64_string", + } + + class ResultOptions(StripeObject): + compress_file: Optional[bool] + """ + If set, the generated result file is compressed into a ZIP archive before + it is stored. This applies only to downloadable file results. + """ + + class StatusDetails(StripeObject): + canceled_at: Optional[str] + """ + Time at which the run was canceled. Populated when the run is in the `canceled` state. + """ + code: Optional[ + Union[ + Literal[ + "file_size_above_limit", + "internal_error", + "query_run_invalid_sql", + ], + str, + ] + ] + """ + Error code categorizing the reason the run failed. + """ + message: Optional[str] + """ + Error message with additional details about the failure. + """ + + created: str + """ + Time at which the `ReportRun` was created. + """ + id: str + """ + The unique identifier of the `ReportRun`. + """ + livemode: bool + """ + Whether the `ReportRun` was executed in live mode. + """ + name: str + """ + The human-readable name of the `Report` which was run. + """ + object: Literal["v2.data.report_run"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + parameters: UntypedStripeObject[Any] + """ + The parameters used to customize the generation of the report. + """ + refreshed_at: Optional[str] + """ + Time at which the data used by this report was last refreshed. + """ + report: str + """ + The unique identifier of the `Report` which was run. + """ + result: Optional[Result] + """ + The result of the `ReportRun`, populated when it has completed. + """ + result_options: Optional[ResultOptions] + """ + Settings applied to the generated result file. + """ + sql: Optional[str] + """ + The fully-resolved SQL that was executed. Only present when requested via + `include[0]=sql`. + """ + status: Union[Literal["canceled", "failed", "running", "succeeded"], str] + """ + The current status of the `ReportRun`. + """ + status_details: Optional[StatusDetails] + """ + Additional details about the current state of the `ReportRun`. + """ + _inner_class_types = { + "result": Result, + "result_options": ResultOptions, + "status_details": StatusDetails, + } diff --git a/stripe/v2/data/_report_run_service.py b/stripe/v2/data/_report_run_service.py new file mode 100644 index 000000000..0db38faa3 --- /dev/null +++ b/stripe/v2/data/_report_run_service.py @@ -0,0 +1,104 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.data._report_run_create_params import ( + ReportRunCreateParams, + ) + from stripe.params.v2.data._report_run_retrieve_params import ( + ReportRunRetrieveParams, + ) + from stripe.v2.data._report_run import ReportRun + + +class ReportRunService(StripeService): + def create( + self, + params: "ReportRunCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "ReportRun": + """ + Initiates the generation of a `ReportRun` based on the specified `Report` and + caller-provided parameters. Returns a `ReportRun` object which can be used to track + the progress and retrieve the results of the report. + """ + return cast( + "ReportRun", + self._request( + "post", + "/v2/data/report_runs", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "ReportRunCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "ReportRun": + """ + Initiates the generation of a `ReportRun` based on the specified `Report` and + caller-provided parameters. Returns a `ReportRun` object which can be used to track + the progress and retrieve the results of the report. + """ + return cast( + "ReportRun", + await self._request_async( + "post", + "/v2/data/report_runs", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["ReportRunRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ReportRun": + """ + Fetches the current state and details of a previously created `ReportRun`. If the + `ReportRun` has succeeded, the endpoint provides details for how to retrieve the results. + """ + return cast( + "ReportRun", + self._request( + "get", + "/v2/data/report_runs/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["ReportRunRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ReportRun": + """ + Fetches the current state and details of a previously created `ReportRun`. If the + `ReportRun` has succeeded, the endpoint provides details for how to retrieve the results. + """ + return cast( + "ReportRun", + await self._request_async( + "get", + "/v2/data/report_runs/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/data/_report_service.py b/stripe/v2/data/_report_service.py new file mode 100644 index 000000000..d1d7ce221 --- /dev/null +++ b/stripe/v2/data/_report_service.py @@ -0,0 +1,101 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.data._report_list_params import ReportListParams + from stripe.params.v2.data._report_retrieve_params import ( + ReportRetrieveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.data._report import Report + + +class ReportService(StripeService): + def list( + self, + params: Optional["ReportListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Report]": + """ + Returns a list of Stripe-defined reports that the caller can create a `ReportRun` for. + """ + return cast( + "ListObject[Report]", + self._request( + "get", + "/v2/data/reports", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["ReportListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Report]": + """ + Returns a list of Stripe-defined reports that the caller can create a `ReportRun` for. + """ + return cast( + "ListObject[Report]", + await self._request_async( + "get", + "/v2/data/reports", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["ReportRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Report": + """ + Retrieves metadata about a specific `Report`, including its name, description, and + the parameters it accepts. It's useful for understanding the capabilities and + requirements of a particular `Report` before requesting a `ReportRun`. + """ + return cast( + "Report", + self._request( + "get", + "/v2/data/reports/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["ReportRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Report": + """ + Retrieves metadata about a specific `Report`, including its name, description, and + the parameters it accepts. It's useful for understanding the capabilities and + requirements of a particular `Report` before requesting a `ReportRun`. + """ + return cast( + "Report", + await self._request_async( + "get", + "/v2/data/reports/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/data/_schema.py b/stripe/v2/data/_schema.py new file mode 100644 index 000000000..bdc5f8fec --- /dev/null +++ b/stripe/v2/data/_schema.py @@ -0,0 +1,136 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class Schema(StripeObject): + """ + The `Schema` resource describes the columns, types, and relationships of a table that + can be queried. + """ + + OBJECT_NAME: ClassVar[Literal["v2.data.schema"]] = "v2.data.schema" + + class Column(StripeObject): + class ForeignKeysFrom(StripeObject): + column: str + """ + The name of the referenced column. + """ + schema: str + """ + The identifier of the referenced schema. + """ + + class ForeignKeysTo(StripeObject): + column: str + """ + The name of the referenced column. + """ + schema: str + """ + The identifier of the referenced schema. + """ + + description: str + """ + A description of what the column represents. + """ + foreign_keys_from: List[ForeignKeysFrom] + """ + Columns in other schemas that reference this column as a foreign key. + """ + foreign_keys_to: List[ForeignKeysTo] + """ + Columns in other schemas that this column references as a foreign key. + """ + is_primary_key: bool + """ + Whether the column forms part of the table's primary key. + """ + name: str + """ + The name of the column. + """ + type: Union[ + Literal[ + "bigint", + "boolean", + "date", + "datetime", + "decimal", + "double", + "integer", + "timestamp", + "varchar", + ], + str, + ] + """ + The data type of the column. + """ + _inner_class_types = { + "foreign_keys_from": ForeignKeysFrom, + "foreign_keys_to": ForeignKeysTo, + } + + class RelevantReport(StripeObject): + description: str + """ + A description of the `Report`. + """ + id: str + """ + The unique identifier of the `Report`. + """ + name: str + """ + The human-readable name of the `Report`. + """ + + columns: List[Column] + """ + The columns of the table. + """ + dataset: Union[Literal["analytical"], str] + """ + The dataset the table belongs to. + """ + description: str + """ + A description of the table. + """ + extended_description: Optional[str] + """ + An extended, LLM-friendly description of the table, useful for query generation. + """ + id: str + """ + The unique identifier of the `Schema`. + """ + livemode: bool + """ + Whether this `Schema` describes live mode data. + """ + name: str + """ + The human-readable name of the table. + """ + object: Literal["v2.data.schema"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + refreshed_at: str + """ + Time at which the table's schema was last refreshed. + """ + relevant_reports: List[RelevantReport] + """ + Reports relevant to this table. + """ + _inner_class_types = { + "columns": Column, + "relevant_reports": RelevantReport, + } diff --git a/stripe/v2/data/_schema_service.py b/stripe/v2/data/_schema_service.py new file mode 100644 index 000000000..cea32bdbd --- /dev/null +++ b/stripe/v2/data/_schema_service.py @@ -0,0 +1,97 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.data._schema_list_params import SchemaListParams + from stripe.params.v2.data._schema_retrieve_params import ( + SchemaRetrieveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.data._schema import Schema + + +class SchemaService(StripeService): + def list( + self, + params: Optional["SchemaListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Schema]": + """ + Returns a list of schemas describing the tables available to query. + """ + return cast( + "ListObject[Schema]", + self._request( + "get", + "/v2/data/schemas", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["SchemaListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Schema]": + """ + Returns a list of schemas describing the tables available to query. + """ + return cast( + "ListObject[Schema]", + await self._request_async( + "get", + "/v2/data/schemas", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["SchemaRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Schema": + """ + Retrieves the schema for a particular table. + """ + return cast( + "Schema", + self._request( + "get", + "/v2/data/schemas/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["SchemaRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Schema": + """ + Retrieves the schema for a particular table. + """ + return cast( + "Schema", + await self._request_async( + "get", + "/v2/data/schemas/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/iam/_activity_log.py b/stripe/v2/iam/_activity_log.py index f021e7ea9..b66acf87d 100644 --- a/stripe/v2/iam/_activity_log.py +++ b/stripe/v2/iam/_activity_log.py @@ -31,7 +31,7 @@ class User(StripeObject): """ Set when the actor is an API key. """ - type: Literal["api_key", "user"] + type: Literal["api_key", "stripe_action", "user"] """ The type of actor. """ @@ -42,6 +42,48 @@ class User(StripeObject): _inner_class_types = {"api_key": ApiKey, "user": User} class Details(StripeObject): + class AccountSecurity(StripeObject): + class NewAnomalySettings(StripeObject): + dormant_api_key_protection_enabled: Optional[bool] + """ + Whether dormant API key protection is enabled. + """ + money_movement_anomaly_detection_enabled: Optional[bool] + """ + Whether money movement anomaly detection is enabled. + """ + request_level_anomaly_detection_enabled: Optional[bool] + """ + Whether request-level anomaly detection is enabled. + """ + + class OldAnomalySettings(StripeObject): + dormant_api_key_protection_enabled: Optional[bool] + """ + Whether dormant API key protection is enabled. + """ + money_movement_anomaly_detection_enabled: Optional[bool] + """ + Whether money movement anomaly detection is enabled. + """ + request_level_anomaly_detection_enabled: Optional[bool] + """ + Whether request-level anomaly detection is enabled. + """ + + new_anomaly_settings: Optional[NewAnomalySettings] + """ + Anomaly detection settings after the change. + """ + old_anomaly_settings: Optional[OldAnomalySettings] + """ + Anomaly detection settings before the change. + """ + _inner_class_types = { + "new_anomaly_settings": NewAnomalySettings, + "old_anomaly_settings": OldAnomalySettings, + } + class ApiKey(StripeObject): class ManagedBy(StripeObject): class Application(StripeObject): @@ -98,6 +140,66 @@ class Application(StripeObject): """ _inner_class_types = {"managed_by": ManagedBy} + class Authentication(StripeObject): + backup_email: Optional[str] + """ + Backup email address involved in the authentication. + """ + challenge_type: Optional[ + Union[ + Literal[ + "external_account_code", + "oauth", + "previous_account_number", + "reverse_sms", + "sms", + "stripe_identity", + "totp", + "webauthn", + ], + str, + ] + ] + """ + Type of challenge used for the authentication. + """ + surface: Optional[Union[Literal["dashboard", "express"], str]] + """ + Surface where the authentication occurred. + """ + target_email: Optional[str] + """ + Target email address involved in the authentication. + """ + + class Scim(StripeObject): + group_name: str + """ + Name of the SCIM group. + """ + new_roles: List[str] + """ + Group roles after the change; only set for the group roles-updated action (scim_group_roles_updated). + """ + old_roles: List[str] + """ + Group roles before the change; only set for the group roles-updated action (scim_group_roles_updated). + """ + role_assigned_context: Optional[str] + """ + The context the roles were assigned in. + """ + user_email: Optional[str] + """ + Email address of the affected member. + """ + + class Sso(StripeObject): + mandate: Optional[Literal["off", "optional", "required"]] + """ + SSO enforcement level. + """ + class UserAccess(StripeObject): class Authentication(StripeObject): class PrimaryFactor(StripeObject): @@ -271,6 +373,24 @@ class UserInvite(StripeObject): Roles assigned to the invited user. """ + class UserProfile(StripeObject): + new_email: Optional[str] + """ + Email address after the change. + """ + new_redacted_phone_number: Optional[str] + """ + Redacted phone number after the change. + """ + old_email: Optional[str] + """ + Email address before the change. + """ + old_redacted_phone_number: Optional[str] + """ + Redacted phone number before the change. + """ + class UserRoles(StripeObject): new_roles: List[str] """ @@ -289,12 +409,41 @@ class UserRoles(StripeObject): Email address of the user whose roles were changed. """ + account_security: Optional[AccountSecurity] + """ + Details of an account security action. + """ api_key: Optional[ApiKey] """ Details of an API key action. """ + authentication: Optional[Authentication] + """ + Details of an authentication action. + """ + scim: Optional[Scim] + """ + Details of a SCIM action. + """ + sso: Optional[Sso] + """ + Details of an SSO action. + """ type: Union[ - Literal["api_key", "user_access", "user_invite", "user_roles"], str + Literal[ + "account_security", + "api_key", + "authentication", + "issuing", + "payout", + "scim", + "sso", + "user_access", + "user_invite", + "user_profile", + "user_roles", + ], + str, ] """ The action group type of the activity log entry. @@ -307,17 +456,53 @@ class UserRoles(StripeObject): """ Details of a user invite action. """ + user_profile: Optional[UserProfile] + """ + Details of a user profile action. + """ user_roles: Optional[UserRoles] """ Details of a user role change action. """ _inner_class_types = { + "account_security": AccountSecurity, "api_key": ApiKey, + "authentication": Authentication, + "scim": Scim, + "sso": Sso, "user_access": UserAccess, "user_invite": UserInvite, + "user_profile": UserProfile, "user_roles": UserRoles, } + class RelatedObject(StripeObject): + id: str + """ + Unique identifier of the object. + """ + type: Union[ + Literal[ + "balance_transfer", + "bank_account", + "blockchain_address", + "card", + "issuing.card", + "issuing.cardholder", + "issuing.dispute", + ], + str, + ] + """ + Type of the object. + """ + + class Request(StripeObject): + id: str + """ + ID of the API request. + """ + actor: Actor """ The actor that performed the action. @@ -346,22 +531,85 @@ class UserRoles(StripeObject): """ String representing the object's type. Objects of the same type share the same value of the object field. """ + related_object: Optional[RelatedObject] + """ + The object related to the activity log entry. + """ + request: Optional[Request] + """ + The API request that instigated the action. + """ type: Union[ Literal[ + "anomaly_detection_settings_updated", "api_key_created", "api_key_deleted", "api_key_updated", "api_key_viewed", + "issuing_activated", + "issuing_balance_transfer_created", + "issuing_cardholder_created", + "issuing_cardholder_updated", + "issuing_card_created", + "issuing_card_sensitive_details_viewed", + "issuing_card_updated", + "issuing_dispute_created", + "issuing_dispute_submitted", + "issuing_dispute_updated", + "manual_payouts_disabled", + "manual_payouts_enabled", + "payout_destination_added", + "payout_destination_removed", + "payout_destination_updated", + "payout_schedule_edits_disabled", + "payout_schedule_edits_enabled", + "scim_group_deleted", + "scim_group_member_added", + "scim_group_member_removed", + "scim_group_roles_updated", + "scim_group_updated", + "sso_domain_verified", + "sso_settings_created", + "sso_settings_deleted", + "sso_settings_updated", + "two_step_authentication_mandate_disabled", + "two_step_authentication_mandate_enabled", "user_access_started", + "user_auth_challenge_failed", + "user_email_changed", + "user_email_verified", + "user_express_phone_number_changed", + "user_google_account_connected", + "user_google_account_disconnected", "user_invite_accepted", "user_invite_created", "user_invite_deleted", + "user_passkey_added", + "user_passkey_removed", + "user_passkey_updated", + "user_passkey_upgraded", + "user_password_changed", + "user_password_initialized", + "user_password_reset_failed", + "user_password_reset_requested", + "user_password_reset_succeeded", "user_roles_deleted", "user_roles_updated", + "user_two_step_authentication_backup_code_used", + "user_two_step_authentication_method_added", + "user_two_step_authentication_method_removed", + "user_two_step_authentication_method_reset", + "user_two_step_authentication_method_updated", + "user_two_step_authentication_reset_requested", ], str, ] """ The type of action that was performed. """ - _inner_class_types = {"actor": Actor, "details": Details} + _inner_class_types = { + "actor": Actor, + "details": Details, + "related_object": RelatedObject, + "request": Request, + } diff --git a/stripe/v2/money_management/__init__.py b/stripe/v2/money_management/__init__.py index b90a06f5e..106123af8 100644 --- a/stripe/v2/money_management/__init__.py +++ b/stripe/v2/money_management/__init__.py @@ -24,6 +24,15 @@ from stripe.v2.money_management._debit_dispute_service import ( DebitDisputeService as DebitDisputeService, ) + from stripe.v2.money_management._earned_credit import ( + EarnedCredit as EarnedCredit, + ) + from stripe.v2.money_management._earned_credit_service import ( + EarnedCreditService as EarnedCreditService, + ) + from stripe.v2.money_management._earned_credit_simulation import ( + EarnedCreditSimulation as EarnedCreditSimulation, + ) from stripe.v2.money_management._financial_account import ( FinancialAccount as FinancialAccount, ) @@ -42,9 +51,15 @@ from stripe.v2.money_management._financial_address import ( FinancialAddress as FinancialAddress, ) + from stripe.v2.money_management._financial_address_credit_simulation import ( + FinancialAddressCreditSimulation as FinancialAddressCreditSimulation, + ) from stripe.v2.money_management._financial_address_debit_simulation import ( FinancialAddressDebitSimulation as FinancialAddressDebitSimulation, ) + from stripe.v2.money_management._financial_address_generated_microdeposits import ( + FinancialAddressGeneratedMicrodeposits as FinancialAddressGeneratedMicrodeposits, + ) from stripe.v2.money_management._financial_address_service import ( FinancialAddressService as FinancialAddressService, ) @@ -120,8 +135,8 @@ from stripe.v2.money_management._recipient_verification_service import ( RecipientVerificationService as RecipientVerificationService, ) - from stripe.v2.money_management._test_helpers_service import ( - TestHelpersService as TestHelpersService, + from stripe.v2.money_management._test_helper_service import ( + TestHelperService as TestHelperService, ) from stripe.v2.money_management._transaction import ( Transaction as Transaction, @@ -161,6 +176,15 @@ "stripe.v2.money_management._debit_dispute_service", False, ), + "EarnedCredit": ("stripe.v2.money_management._earned_credit", False), + "EarnedCreditService": ( + "stripe.v2.money_management._earned_credit_service", + False, + ), + "EarnedCreditSimulation": ( + "stripe.v2.money_management._earned_credit_simulation", + False, + ), "FinancialAccount": ( "stripe.v2.money_management._financial_account", False, @@ -185,10 +209,18 @@ "stripe.v2.money_management._financial_address", False, ), + "FinancialAddressCreditSimulation": ( + "stripe.v2.money_management._financial_address_credit_simulation", + False, + ), "FinancialAddressDebitSimulation": ( "stripe.v2.money_management._financial_address_debit_simulation", False, ), + "FinancialAddressGeneratedMicrodeposits": ( + "stripe.v2.money_management._financial_address_generated_microdeposits", + False, + ), "FinancialAddressService": ( "stripe.v2.money_management._financial_address_service", False, @@ -271,8 +303,8 @@ "stripe.v2.money_management._recipient_verification_service", False, ), - "TestHelpersService": ( - "stripe.v2.money_management._test_helpers_service", + "TestHelperService": ( + "stripe.v2.money_management._test_helper_service", False, ), "Transaction": ("stripe.v2.money_management._transaction", False), diff --git a/stripe/v2/money_management/_adjustment.py b/stripe/v2/money_management/_adjustment.py index 59653e5d8..9dad2daaa 100644 --- a/stripe/v2/money_management/_adjustment.py +++ b/stripe/v2/money_management/_adjustment.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject from stripe.v2._amount import Amount -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -40,18 +40,21 @@ class AdjustedFlow(StripeObject): """ If applicable, the ID of the ReceivedDebit linked to this Adjustment. """ - type: Literal[ - "adjustment", - "balance_exchange", - "inbound_payment", - "inbound_transfer", - "outbound_payment", - "outbound_transfer", - "received_credit", - "received_debit", + type: Union[ + Literal[ + "adjustment", + "balance_exchange", + "inbound_payment", + "inbound_transfer", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit", + ], + str, ] """ - Closed Enum. If applicable, the type of flow linked to this Adjustment. The field matching this value will contain the ID of the flow. + Open Enum. If applicable, the type of flow linked to this Adjustment. The field matching this value will contain the ID of the flow. """ adjusted_flow: Optional[AdjustedFlow] diff --git a/stripe/v2/money_management/_earned_credit.py b/stripe/v2/money_management/_earned_credit.py new file mode 100644 index 000000000..07b19b910 --- /dev/null +++ b/stripe/v2/money_management/_earned_credit.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount +from typing import ClassVar, Optional, Union +from typing_extensions import Literal + + +class EarnedCredit(StripeObject): + """ + The EarnedCredit object. + """ + + OBJECT_NAME: ClassVar[Literal["v2.money_management.earned_credit"]] = ( + "v2.money_management.earned_credit" + ) + + class Period(StripeObject): + end_date: str + """ + The end date of the period during which the credit was earned, inclusive. + """ + start_date: str + """ + The start date of the period during which the credit was earned, inclusive. + """ + + class RevenueShare(StripeObject): + type: Union[ + Literal["administrative_facilitation_fee", "savings_referral"], str + ] + """ + The type of revenue share that caused the EarnedCredit. + """ + + class Reward(StripeObject): + earned_from: Union[Literal["platform_cash_rewards"], str] + """ + The program from which the reward was earned. + """ + from_account: str + """ + The Account that funded the reward. + """ + outbound_payment: str + """ + The OutboundPayment that delivered the reward. + """ + + class StatusTransitions(StripeObject): + succeeded_at: Optional[str] + """ + The time at which the EarnedCredit succeeded. + """ + + amount: Amount + """ + The amount and currency of the EarnedCredit. + """ + created: str + """ + Time at which the EarnedCredit was created. + """ + description: str + """ + Description of the EarnedCredit. + """ + financial_account: str + """ + The FinancialAccount that earned the credit. + """ + id: str + """ + Unique identifier for the EarnedCredit. + """ + livemode: bool + """ + Has the value true if the object exists in live mode. + """ + object: Literal["v2.money_management.earned_credit"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + period: Optional[Period] + """ + The period during which the credit was earned. + """ + revenue_share: Optional[RevenueShare] + """ + Details about the revenue share that caused the EarnedCredit. + """ + reward: Optional[Reward] + """ + Details about the reward that caused the EarnedCredit. + """ + status: Union[Literal["succeeded"], str] + """ + The status of the EarnedCredit. + """ + status_transitions: StatusTransitions + """ + Timestamps for EarnedCredit status transitions. + """ + type: Union[Literal["interest", "revenue_share", "reward"], str] + """ + The type of flow that caused the EarnedCredit. + """ + _inner_class_types = { + "period": Period, + "revenue_share": RevenueShare, + "reward": Reward, + "status_transitions": StatusTransitions, + } diff --git a/stripe/v2/money_management/_earned_credit_service.py b/stripe/v2/money_management/_earned_credit_service.py new file mode 100644 index 000000000..01343811e --- /dev/null +++ b/stripe/v2/money_management/_earned_credit_service.py @@ -0,0 +1,103 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._earned_credit_list_params import ( + EarnedCreditListParams, + ) + from stripe.params.v2.money_management._earned_credit_retrieve_params import ( + EarnedCreditRetrieveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.money_management._earned_credit import EarnedCredit + + +class EarnedCreditService(StripeService): + def list( + self, + params: Optional["EarnedCreditListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[EarnedCredit]": + """ + Returns a list of EarnedCredits. + """ + return cast( + "ListObject[EarnedCredit]", + self._request( + "get", + "/v2/money_management/earned_credits", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["EarnedCreditListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[EarnedCredit]": + """ + Returns a list of EarnedCredits. + """ + return cast( + "ListObject[EarnedCredit]", + await self._request_async( + "get", + "/v2/money_management/earned_credits", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["EarnedCreditRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "EarnedCredit": + """ + Retrieves an EarnedCredit. + """ + return cast( + "EarnedCredit", + self._request( + "get", + "/v2/money_management/earned_credits/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["EarnedCreditRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "EarnedCredit": + """ + Retrieves an EarnedCredit. + """ + return cast( + "EarnedCredit", + await self._request_async( + "get", + "/v2/money_management/earned_credits/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_earned_credit_simulation.py b/stripe/v2/money_management/_earned_credit_simulation.py new file mode 100644 index 000000000..46f24db9c --- /dev/null +++ b/stripe/v2/money_management/_earned_credit_simulation.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Union +from typing_extensions import Literal + + +class EarnedCreditSimulation(StripeObject): + """ + EarnedCredit Simulations represent simulated EarnedCredit creation requests for testing purposes. + """ + + OBJECT_NAME: ClassVar[ + Literal["v2.money_management.earned_credit_simulation"] + ] = "v2.money_management.earned_credit_simulation" + livemode: bool + """ + Has the value true if the object exists in live mode. + """ + object: Literal["v2.money_management.earned_credit_simulation"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + status: Union[Literal["accepted"], str] + """ + The status of the request, signifying whether simulated EarnedCredit creation was initiated. + """ diff --git a/stripe/v2/money_management/_financial_account.py b/stripe/v2/money_management/_financial_account.py index 5b96043c9..2608b17c0 100644 --- a/stripe/v2/money_management/_financial_account.py +++ b/stripe/v2/money_management/_financial_account.py @@ -229,10 +229,30 @@ class Crypto(StripeObject): Describes who controls the private keys for the crypto storage. """ + class DepositInsuranceEligibility(StripeObject): + bank_name: Union[Literal["fifth_third"], str] + """ + The bank where funds are stored. + """ + currencies: List[str] + """ + Currencies eligible for deposit insurance at this bank under this scheme. + """ + type: Union[Literal["fdic", "fdic_passthrough"], str] + """ + The deposit insurance scheme. + """ + crypto: Optional[Crypto] """ Crypto-specific storage configuration. Only populated when `storage.crypto` is passed in the `include` parameter and the FinancialAccount stores crypto assets. Fiat currencies remain configured only through `holds_currencies`. """ + deposit_insurance_eligibility: Optional[ + List[DepositInsuranceEligibility] + ] + """ + Array of eligibility objects, segmented by bank name and deposit insurance scheme. + """ 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. @@ -241,7 +261,10 @@ class Crypto(StripeObject): """ The currencies that this FinancialAccount can hold. """ - _inner_class_types = {"crypto": Crypto} + _inner_class_types = { + "crypto": Crypto, + "deposit_insurance_eligibility": DepositInsuranceEligibility, + } accrued_fees: Optional[AccruedFees] """ diff --git a/stripe/v2/money_management/_financial_address.py b/stripe/v2/money_management/_financial_address.py index 06ba1b1e4..7eec97791 100644 --- a/stripe/v2/money_management/_financial_address.py +++ b/stripe/v2/money_management/_financial_address.py @@ -62,6 +62,10 @@ class AccountHolderAddress(StripeObject): """ The name of the bank. """ + bic: Optional[str] + """ + The SWIFT/BIC code. + """ last4: str """ The last four digits of the account number. @@ -97,6 +101,10 @@ class Cpa(StripeObject): """ The name of the bank. """ + bic: Optional[str] + """ + The SWIFT/BIC code. + """ institution_number: str """ The institution number. @@ -119,6 +127,10 @@ class Iban(StripeObject): """ The name of the bank. """ + bic: str + """ + The SWIFT/BIC code. + """ country: str """ The country of the bank account. @@ -141,6 +153,14 @@ class SortCode(StripeObject): """ The full account number. """ + bic: Optional[str] + """ + The SWIFT/BIC code. + """ + iban: Optional[str] + """ + The full IBAN. + """ last4: str """ The last four digits of the account number. diff --git a/stripe/v2/_financial_address_credit_simulation.py b/stripe/v2/money_management/_financial_address_credit_simulation.py similarity index 75% rename from stripe/v2/_financial_address_credit_simulation.py rename to stripe/v2/money_management/_financial_address_credit_simulation.py index 8c24a1ac5..06bd0c7d3 100644 --- a/stripe/v2/_financial_address_credit_simulation.py +++ b/stripe/v2/money_management/_financial_address_credit_simulation.py @@ -10,14 +10,14 @@ class FinancialAddressCreditSimulation(StripeObject): Credit Simulations represent simulated credit transactions applied to financial addresses for testing purposes. """ - OBJECT_NAME: ClassVar[Literal["financial_address_credit_simulation"]] = ( - "financial_address_credit_simulation" - ) + OBJECT_NAME: ClassVar[ + Literal["v2.money_management.financial_address_credit_simulation"] + ] = "v2.money_management.financial_address_credit_simulation" 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["financial_address_credit_simulation"] + object: Literal["v2.money_management.financial_address_credit_simulation"] """ String representing the object's type. Objects of the same type share the same value of the object field. """ diff --git a/stripe/v2/_financial_address_generated_microdeposits.py b/stripe/v2/money_management/_financial_address_generated_microdeposits.py similarity index 77% rename from stripe/v2/_financial_address_generated_microdeposits.py rename to stripe/v2/money_management/_financial_address_generated_microdeposits.py index f1c345be7..260a89109 100644 --- a/stripe/v2/_financial_address_generated_microdeposits.py +++ b/stripe/v2/money_management/_financial_address_generated_microdeposits.py @@ -12,8 +12,10 @@ class FinancialAddressGeneratedMicrodeposits(StripeObject): """ OBJECT_NAME: ClassVar[ - Literal["financial_address_generated_microdeposits"] - ] = "financial_address_generated_microdeposits" + Literal[ + "v2.money_management.financial_address_generated_microdeposits" + ] + ] = "v2.money_management.financial_address_generated_microdeposits" amounts: List[Amount] """ The amounts of the microdeposits that were generated. @@ -22,7 +24,9 @@ class FinancialAddressGeneratedMicrodeposits(StripeObject): """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. """ - object: Literal["financial_address_generated_microdeposits"] + object: Literal[ + "v2.money_management.financial_address_generated_microdeposits" + ] """ String representing the object's type. Objects of the same type share the same value of the object field. """ diff --git a/stripe/v2/money_management/_inbound_transfer.py b/stripe/v2/money_management/_inbound_transfer.py index 1596cbf70..0ff3ab4a6 100644 --- a/stripe/v2/money_management/_inbound_transfer.py +++ b/stripe/v2/money_management/_inbound_transfer.py @@ -119,10 +119,6 @@ class BankDebitSucceeded(StripeObject): """ A unique ID for the HistoryEntry. """ - level: Union[Literal["canonical", "debug"], str] - """ - Open Enum. The Level of the HistoryEntry. - """ type: Union[ Literal[ "bank_debit_failed", @@ -176,6 +172,10 @@ class BankDebitSucceeded(StripeObject): """ A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. """ + statement_descriptor: Optional[str] + """ + The statement descriptor surfaced on the payer's bank statement. Echoes the submitted value. + """ to: To """ A nested object containing information about the destination of the InboundTransfer. diff --git a/stripe/v2/money_management/_outbound_payment_quote.py b/stripe/v2/money_management/_outbound_payment_quote.py index 09d52d590..28739bafe 100644 --- a/stripe/v2/money_management/_outbound_payment_quote.py +++ b/stripe/v2/money_management/_outbound_payment_quote.py @@ -30,6 +30,47 @@ class DeliveryOptions(StripeObject): """ class EstimatedFee(StripeObject): + class NetworkFeeDetails(StripeObject): + class NetworkOptions(StripeObject): + class Ach(StripeObject): + submission: Optional[ + Union[Literal["next_day", "same_day"], str] + ] + """ + Open Enum. ACH submission timing. + """ + + ach: Optional[Ach] + """ + ACH-specific network fee options. + """ + _inner_class_types = {"ach": Ach} + + network: Union[ + Literal[ + "ach", + "becs", + "eft", + "fedwire", + "fps", + "local", + "npp", + "rtp", + "sepa", + "sepa_instant", + "swift", + ], + str, + ] + """ + The network associated with the fee. + """ + network_options: NetworkOptions + """ + Per-network options that affect the fee. + """ + _inner_class_types = {"network_options": NetworkOptions} + class TaxAmount(StripeObject): currency: str """ @@ -44,6 +85,10 @@ class TaxAmount(StripeObject): """ The fee amount for corresponding fee type. """ + network_fee_details: Optional[NetworkFeeDetails] + """ + Details about the network and options associated with this fee. Present when type is network_fee. + """ tax_amount: Optional[TaxAmount] """ Tax charged for this fee, if applicable. Value expressed as a decimal string in major units. @@ -53,6 +98,7 @@ class TaxAmount(StripeObject): "cross_border_payout_fee", "foreign_exchange_fee", "instant_payout_fee", + "network_fee", "next_day_payout_fee", "real_time_payout_fee", "standard_payout_fee", @@ -63,7 +109,10 @@ class TaxAmount(StripeObject): """ The fee type. """ - _inner_class_types = {"tax_amount": TaxAmount} + _inner_class_types = { + "network_fee_details": NetworkFeeDetails, + "tax_amount": TaxAmount, + } class From(StripeObject): debited: Amount diff --git a/stripe/v2/money_management/_payout_intent.py b/stripe/v2/money_management/_payout_intent.py index 2b66841fc..d1d89ba9d 100644 --- a/stripe/v2/money_management/_payout_intent.py +++ b/stripe/v2/money_management/_payout_intent.py @@ -16,6 +16,47 @@ class PayoutIntent(StripeObject): ) class EstimatedFee(StripeObject): + class NetworkFeeDetails(StripeObject): + class NetworkOptions(StripeObject): + class Ach(StripeObject): + submission: Optional[ + Union[Literal["next_day", "same_day"], str] + ] + """ + Open Enum. ACH submission timing. + """ + + ach: Optional[Ach] + """ + ACH-specific network fee options. + """ + _inner_class_types = {"ach": Ach} + + network: Union[ + Literal[ + "ach", + "becs", + "eft", + "fedwire", + "fps", + "local", + "npp", + "rtp", + "sepa", + "sepa_instant", + "swift", + ], + str, + ] + """ + The network associated with the fee. + """ + network_options: NetworkOptions + """ + Per-network options that affect the fee. + """ + _inner_class_types = {"network_options": NetworkOptions} + class TaxAmount(StripeObject): currency: str """ @@ -30,6 +71,10 @@ class TaxAmount(StripeObject): """ The fee amount. """ + network_fee_details: Optional[NetworkFeeDetails] + """ + Details about the network and options associated with this fee. Present when type is network_fee. + """ tax_amount: Optional[TaxAmount] """ Tax charged for this fee, if applicable. Value expressed as a decimal string in major units. @@ -39,6 +84,7 @@ class TaxAmount(StripeObject): "cross_border_fee", "foreign_exchange_fee", "instant_card_payout_fee", + "network_fee", "next_day_payout_fee", "real_time_payout_fee", "stablecoin_payout_fee", @@ -51,7 +97,10 @@ class TaxAmount(StripeObject): """ Open Enum. The type of fee. """ - _inner_class_types = {"tax_amount": TaxAmount} + _inner_class_types = { + "network_fee_details": NetworkFeeDetails, + "tax_amount": TaxAmount, + } class From(StripeObject): currency: str diff --git a/stripe/v2/money_management/_payout_method.py b/stripe/v2/money_management/_payout_method.py index dcb2e5ada..3e329ffd1 100644 --- a/stripe/v2/money_management/_payout_method.py +++ b/stripe/v2/money_management/_payout_method.py @@ -52,12 +52,6 @@ class ApplePay(StripeObject): """ class BankAccount(StripeObject): - archived: bool - """ - Whether this PayoutMethodBankAccount object was archived. PayoutMethodBankAccount objects can be archived through - the /archive API, and they will not be automatically archived by Stripe. Archived PayoutMethodBankAccount objects - cannot be used as payout methods and will not appear in the payout method list. - """ bank_account_type: Literal["checking", "futsu", "savings", "toza"] """ The type of bank account (checking or savings). @@ -100,12 +94,6 @@ class BankAccount(StripeObject): """ class Card(StripeObject): - archived: bool - """ - Whether the PayoutMethodCard object was archived. PayoutMethodCard objects can be archived through - the /archive API, and they will not be automatically archived by Stripe. Archived PayoutMethodCard objects - cannot be used as payout methods and will not appear in the payout method list. - """ exp_month: str """ The month the card expires. @@ -133,12 +121,6 @@ class CryptoWallet(StripeObject): """ Destination wallet address. """ - archived: bool - """ - Whether the crypto wallet was archived. Crypto wallets can be archived through the /archive API, - and they will not be automatically archived by Stripe. Archived crypto wallets cannot be used as - payout method and will not appear in the payout method list. - """ memo: Optional[str] """ Optional field, required if network supports memos (only "stellar" currently). @@ -168,13 +150,15 @@ class NetworkBusinessProfileWallet(StripeObject): """ class UsageStatus(StripeObject): - payments: Literal["disabled", "eligible", "invalid", "requires_action"] + payments: Literal[ + "disabled", "eligible", "ineligible", "invalid", "requires_action" + ] """ Payments status - used when sending OutboundPayments (sending funds to recipients). If disabled, enable the payout method by creating an OutboundSetupIntent using [`POST /v2/money_management/outbound_setup_intents`](https://docs.stripe.com/api/v2/money-management/outbound-setup-intents/create). """ transfers: Literal[ - "disabled", "eligible", "invalid", "requires_action" + "disabled", "eligible", "ineligible", "invalid", "requires_action" ] """ Transfers status - used when making an OutboundTransfer (sending funds to yourself). @@ -189,6 +173,12 @@ class UsageStatus(StripeObject): """ The PayoutMethodApplePay object details. """ + archived: bool + """ + Whether the payout method was archived. Payout methods can be archived through the /archive API, + and they will not be automatically archived by Stripe. Archived payout methods cannot be used + for outbound money movement. + """ available_payout_speeds: List[Literal["instant", "standard"]] """ A set of available payout speeds for this payout method. diff --git a/stripe/v2/money_management/_received_credit.py b/stripe/v2/money_management/_received_credit.py index 7db20a66a..3a72f28e0 100644 --- a/stripe/v2/money_management/_received_credit.py +++ b/stripe/v2/money_management/_received_credit.py @@ -65,7 +65,7 @@ class CaBankAccount(StripeObject): The last 4 digits of the account number that originated the transfer. Depending on the bank, this may instead be the last 4 digits of the return account number. """ - network: Union[Literal["acss"], str] + network: Union[Literal["acss", "swift"], str] """ Open Enum. The money transmission network used to send funds for this ReceivedCredit. """ @@ -105,7 +105,7 @@ class GbBankAccount(StripeObject): """ The last 4 digits of the account number that originated the transfer. """ - network: Union[Literal["chaps", "fps"], str] + network: Union[Literal["chaps", "fps", "swift"], str] """ Open Enum. The money transmission network used to send funds for this ReceivedCredit. """ @@ -201,7 +201,9 @@ class Aba(StripeObject): """ The last 4 digits of the account number that originated the transfer. """ - network: Union[Literal["ach", "rtp", "us_domestic_wire"], str] + network: Union[ + Literal["ach", "rtp", "swift", "us_domestic_wire"], str + ] """ Open Enum. The money transmission network used to send funds for this ReceivedCredit. """ @@ -249,7 +251,7 @@ class Cpa(StripeObject): """ The last 4 digits of the account number that originated the transfer. """ - network: Union[Literal["acss"], str] + network: Union[Literal["acss", "swift"], str] """ Open Enum. The money transmission network used to send funds for this ReceivedCredit. """ @@ -275,7 +277,7 @@ class Iban(StripeObject): """ The IBAN that originated the transfer. """ - network: Union[Literal["sepa_credit_transfer"], str] + network: Union[Literal["sepa_credit_transfer", "swift"], str] """ Open Enum. The money transmission network used to send funds for this ReceivedCredit. """ @@ -293,7 +295,7 @@ class SortCode(StripeObject): """ The last 4 digits of the account number that originated the transfer. """ - network: Union[Literal["chaps", "fps"], str] + network: Union[Literal["chaps", "fps", "swift"], str] """ Open Enum. The money transmission network used to send funds for this ReceivedCredit. """ @@ -357,7 +359,7 @@ class SepaBankAccount(StripeObject): """ The IBAN that originated the transfer. """ - network: Union[Literal["sepa_credit_transfer"], str] + network: Union[Literal["sepa_credit_transfer", "swift"], str] """ The money transmission network used to send funds for this ReceivedCredit. """ @@ -375,7 +377,9 @@ class UsBankAccount(StripeObject): """ The last 4 digits of the account number that originated the transfer. """ - network: Union[Literal["ach", "rtp", "us_domestic_wire"], str] + network: Union[ + Literal["ach", "rtp", "swift", "us_domestic_wire"], str + ] """ Open Enum. The money transmission network used to send funds for this ReceivedCredit. """ diff --git a/stripe/v2/money_management/_received_debit.py b/stripe/v2/money_management/_received_debit.py index 81a0381c5..e5526bfaa 100644 --- a/stripe/v2/money_management/_received_debit.py +++ b/stripe/v2/money_management/_received_debit.py @@ -56,6 +56,61 @@ class GbBankAccount(StripeObject): The sort code of the bank that originated the debit. """ + class NetworkDetails(StripeObject): + class Ach(StripeObject): + addenda: Optional[str] + """ + Additional information included with the ACH debit. + """ + originator_company_entry_description: Optional[str] + """ + The entry description supplied by the company that originated the ACH debit. + """ + originator_company_id: Optional[str] + """ + The identifier of the company that originated the ACH debit. + """ + originator_company_name: Optional[str] + """ + The name of the company that originated the ACH debit. + """ + receiver_id_number: Optional[str] + """ + The identifier assigned to the receiver of the ACH debit. + """ + receiver_name: Optional[str] + """ + The name of the receiver of the ACH debit. + """ + standard_entry_class_code: Optional[ + Union[ + Literal[ + "ccd", + "cie", + "ctx", + "iat", + "pos", + "ppd", + "tel", + "web", + ], + str, + ] + ] + """ + Open Enum. The standard entry class code for the ACH debit. + """ + trace_id: Optional[str] + """ + The trace identifier for the ACH debit. + """ + + ach: Optional[Ach] + """ + ACH-specific network details. + """ + _inner_class_types = {"ach": Ach} + class UsBankAccount(StripeObject): bank_name: Optional[str] """ @@ -79,6 +134,10 @@ class UsBankAccount(StripeObject): Object containing details of the GB Bank Account that originated the debit. Present when the debit was originated via BACS. """ + network_details: Optional[NetworkDetails] + """ + Network-specific details about the bank transfer. + """ origin_type: Union[Literal["gb_bank_account", "us_bank_account"], str] """ Open Enum. Indicates the origin type through which this debit was initiated. @@ -100,6 +159,7 @@ class UsBankAccount(StripeObject): """ _inner_class_types = { "gb_bank_account": GbBankAccount, + "network_details": NetworkDetails, "us_bank_account": UsBankAccount, } diff --git a/stripe/v2/money_management/_test_helper_service.py b/stripe/v2/money_management/_test_helper_service.py new file mode 100644 index 000000000..f1b04ee6a --- /dev/null +++ b/stripe/v2/money_management/_test_helper_service.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +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.money_management._test_helper_earned_credits_params import ( + TestHelperEarnedCreditsParams, + ) + from stripe.v2.money_management._earned_credit_simulation import ( + EarnedCreditSimulation, + ) + from stripe.v2.money_management.test_helpers._financial_address_service import ( + FinancialAddressService, + ) + +_subservices = { + "financial_addresses": [ + "stripe.v2.money_management.test_helpers._financial_address_service", + "FinancialAddressService", + ], +} + + +class TestHelperService(StripeService): + financial_addresses: "FinancialAddressService" + + 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 earned_credits( + self, + params: "TestHelperEarnedCreditsParams", + options: Optional["RequestOptions"] = None, + ) -> "EarnedCreditSimulation": + """ + Creates an EarnedCredit in a Sandbox environment for testing purposes. + """ + return cast( + "EarnedCreditSimulation", + self._request( + "post", + "/v2/money_management/test_helpers/earned_credits", + base_address="api", + params=params, + options=options, + ), + ) + + async def earned_credits_async( + self, + params: "TestHelperEarnedCreditsParams", + options: Optional["RequestOptions"] = None, + ) -> "EarnedCreditSimulation": + """ + Creates an EarnedCredit in a Sandbox environment for testing purposes. + """ + return cast( + "EarnedCreditSimulation", + await self._request_async( + "post", + "/v2/money_management/test_helpers/earned_credits", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_transaction.py b/stripe/v2/money_management/_transaction.py index b16577127..aad698f73 100644 --- a/stripe/v2/money_management/_transaction.py +++ b/stripe/v2/money_management/_transaction.py @@ -68,6 +68,10 @@ class Flow(StripeObject): """ If applicable, the ID of the Dispute that created this Transaction. """ + earned_credit: Optional[str] + """ + If applicable, the ID of the EarnedCredit that created this Transaction. + """ fee_transaction: Optional[str] """ If applicable, the ID of the FeeTransaction that created this Transaction. @@ -177,6 +181,7 @@ class Flow(StripeObject): "currency_conversion", "debit_dispute", "dispute", + "earned_credit", "fee_transaction", "inbound_transfer", "issuing_authorization", @@ -210,6 +215,22 @@ class Flow(StripeObject): Open Enum. Type of the flow that created the Transaction. The field matching this value will contain the ID of the flow. """ + class RegulatoryReceipt(StripeObject): + status: Literal[ + "available", "not_applicable", "pending", "url_expired" + ] + """ + Current availability of the regulatory receipt. + """ + url: Optional[str] + """ + Hosted URL for the receipt. + """ + url_expires_at: Optional[str] + """ + Time until which `url` is valid. + """ + class StatusTransitions(StripeObject): posted_at: Optional[str] """ @@ -245,6 +266,7 @@ class StatusTransitions(StripeObject): "debit_dispute", "dispute", "dispute_reversal", + "earned_credit", "financing_paydown", "financing_paydown_reversal", "inbound_payment", @@ -331,6 +353,10 @@ class StatusTransitions(StripeObject): """ String representing the object's type. Objects of the same type share the same value of the object field. """ + regulatory_receipt: RegulatoryReceipt + """ + Hosted transaction receipt that is provided when money movement is considered regulated under Stripe's money transmission licenses. If not applicable, `regulatory_receipt.status` will be `not_applicable` and no URL will be provided. + """ status: Literal["pending", "posted", "void"] """ Closed Enum. Current status of the Transaction. @@ -351,5 +377,6 @@ class StatusTransitions(StripeObject): "balance_impact": BalanceImpact, "counterparty": Counterparty, "flow": Flow, + "regulatory_receipt": RegulatoryReceipt, "status_transitions": StatusTransitions, } diff --git a/stripe/v2/money_management/_transaction_entry.py b/stripe/v2/money_management/_transaction_entry.py index 8a42ffbf3..b2183dd50 100644 --- a/stripe/v2/money_management/_transaction_entry.py +++ b/stripe/v2/money_management/_transaction_entry.py @@ -63,6 +63,10 @@ class Flow(StripeObject): """ If applicable, the ID of the Dispute that created this Transaction. """ + earned_credit: Optional[str] + """ + If applicable, the ID of the EarnedCredit that created this Transaction. + """ fee_transaction: Optional[str] """ If applicable, the ID of the FeeTransaction that created this Transaction. @@ -172,6 +176,7 @@ class Flow(StripeObject): "currency_conversion", "debit_dispute", "dispute", + "earned_credit", "fee_transaction", "inbound_transfer", "issuing_authorization", @@ -221,6 +226,7 @@ class Flow(StripeObject): "debit_dispute", "dispute", "dispute_reversal", + "earned_credit", "financing_paydown", "financing_paydown_reversal", "inbound_payment", diff --git a/stripe/v2/money_management/_transaction_service.py b/stripe/v2/money_management/_transaction_service.py index 30cf8a7a7..22e2f4449 100644 --- a/stripe/v2/money_management/_transaction_service.py +++ b/stripe/v2/money_management/_transaction_service.py @@ -10,6 +10,9 @@ from stripe.params.v2.money_management._transaction_list_params import ( TransactionListParams, ) + from stripe.params.v2.money_management._transaction_refresh_regulatory_receipt_params import ( + TransactionRefreshRegulatoryReceiptParams, + ) from stripe.params.v2.money_management._transaction_retrieve_params import ( TransactionRetrieveParams, ) @@ -150,3 +153,49 @@ async def update_async( options=options, ), ) + + def refresh_regulatory_receipt( + self, + id: str, + /, + params: Optional["TransactionRefreshRegulatoryReceiptParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Transaction": + """ + Creates a fresh hosted URL for a Transaction's regulatory receipt. + """ + return cast( + "Transaction", + self._request( + "post", + "/v2/money_management/transactions/{id}/refresh_regulatory_receipt".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def refresh_regulatory_receipt_async( + self, + id: str, + /, + params: Optional["TransactionRefreshRegulatoryReceiptParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Transaction": + """ + Creates a fresh hosted URL for a Transaction's regulatory receipt. + """ + return cast( + "Transaction", + await self._request_async( + "post", + "/v2/money_management/transactions/{id}/refresh_regulatory_receipt".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/test_helpers/_financial_address_service.py b/stripe/v2/money_management/test_helpers/_financial_address_service.py index f5dbc9bea..bfe597029 100644 --- a/stripe/v2/money_management/test_helpers/_financial_address_service.py +++ b/stripe/v2/money_management/test_helpers/_financial_address_service.py @@ -7,15 +7,73 @@ if TYPE_CHECKING: from stripe._request_options import RequestOptions + from stripe.params.v2.money_management.test_helpers._financial_address_credit_params import ( + FinancialAddressCreditParams, + ) from stripe.params.v2.money_management.test_helpers._financial_address_debit_params import ( FinancialAddressDebitParams, ) + from stripe.params.v2.money_management.test_helpers._financial_address_generate_microdeposits_params import ( + FinancialAddressGenerateMicrodepositsParams, + ) + from stripe.v2.money_management._financial_address_credit_simulation import ( + FinancialAddressCreditSimulation, + ) from stripe.v2.money_management._financial_address_debit_simulation import ( FinancialAddressDebitSimulation, ) + from stripe.v2.money_management._financial_address_generated_microdeposits import ( + FinancialAddressGeneratedMicrodeposits, + ) class FinancialAddressService(StripeService): + def credit( + self, + id: str, + /, + params: "FinancialAddressCreditParams", + options: Optional["RequestOptions"] = None, + ) -> "FinancialAddressCreditSimulation": + """ + Simulate crediting a FinancialAddress in a Sandbox environment. This can be used to add virtual funds and increase your balance for testing. + """ + return cast( + "FinancialAddressCreditSimulation", + self._request( + "post", + "/v2/money_management/test_helpers/financial_addresses/{id}/credit".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def credit_async( + self, + id: str, + /, + params: "FinancialAddressCreditParams", + options: Optional["RequestOptions"] = None, + ) -> "FinancialAddressCreditSimulation": + """ + Simulate crediting a FinancialAddress in a Sandbox environment. This can be used to add virtual funds and increase your balance for testing. + """ + return cast( + "FinancialAddressCreditSimulation", + await self._request_async( + "post", + "/v2/money_management/test_helpers/financial_addresses/{id}/credit".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + def debit( self, id: str, @@ -61,3 +119,49 @@ async def debit_async( options=options, ), ) + + def generate_microdeposits( + self, + id: str, + /, + params: Optional["FinancialAddressGenerateMicrodepositsParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "FinancialAddressGeneratedMicrodeposits": + """ + Generates microdeposits for a FinancialAddress in a Sandbox environment. + """ + return cast( + "FinancialAddressGeneratedMicrodeposits", + self._request( + "post", + "/v2/money_management/test_helpers/financial_addresses/{id}/generate_microdeposits".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def generate_microdeposits_async( + self, + id: str, + /, + params: Optional["FinancialAddressGenerateMicrodepositsParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "FinancialAddressGeneratedMicrodeposits": + """ + Generates microdeposits for a FinancialAddress in a Sandbox environment. + """ + return cast( + "FinancialAddressGeneratedMicrodeposits", + await self._request_async( + "post", + "/v2/money_management/test_helpers/financial_addresses/{id}/generate_microdeposits".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/payments/_off_session_payment.py b/stripe/v2/payments/_off_session_payment.py index 8745e6e0f..6e953052f 100644 --- a/stripe/v2/payments/_off_session_payment.py +++ b/stripe/v2/payments/_off_session_payment.py @@ -233,10 +233,6 @@ class RetryDetails(StripeObject): """ Indicates the strategy for how you want Stripe to retry the payment. """ - retry_until: Optional[str] - """ - The timestamp when this payment is no longer eligible to be retried. When this timestamp is reached, the payment will be marked as failed. - """ class TransferData(StripeObject): amount: Optional[int] diff --git a/stripe/v2/provisioning/__init__.py b/stripe/v2/provisioning/__init__.py index 8ecc9cc34..9f1fb0ec5 100644 --- a/stripe/v2/provisioning/__init__.py +++ b/stripe/v2/provisioning/__init__.py @@ -45,6 +45,9 @@ ProviderServiceDetail as ProviderServiceDetail, ) from stripe.v2.provisioning._resource import Resource as Resource + from stripe.v2.provisioning._resource_access_configuration import ( + ResourceAccessConfiguration as ResourceAccessConfiguration, + ) from stripe.v2.provisioning._resource_service import ( ResourceService as ResourceService, ) @@ -95,6 +98,10 @@ False, ), "Resource": ("stripe.v2.provisioning._resource", False), + "ResourceAccessConfiguration": ( + "stripe.v2.provisioning._resource_access_configuration", + False, + ), "ResourceService": ("stripe.v2.provisioning._resource_service", False), } if not TYPE_CHECKING: diff --git a/stripe/v2/provisioning/_resource_access_configuration.py b/stripe/v2/provisioning/_resource_access_configuration.py new file mode 100644 index 000000000..278e163b7 --- /dev/null +++ b/stripe/v2/provisioning/_resource_access_configuration.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject, UntypedStripeObject +from typing import ClassVar, Optional +from typing_extensions import Literal + + +class ResourceAccessConfiguration(StripeObject): + """ + The current provider-issued access configuration for a Provisioning Resource. + """ + + OBJECT_NAME: ClassVar[ + Literal["v2.provisioning.resource_access_configuration"] + ] = "v2.provisioning.resource_access_configuration" + configuration: UntypedStripeObject[str] + """ + Provider-defined configuration names mapped to their secret string values. + """ + created: str + """ + Time at which this credential generation became current. + """ + expires_at: Optional[str] + """ + Time at which these credentials cease to be valid, when supplied by the Provider. + """ + livemode: bool + """ + Whether the referenced Resource uses Stripe live-mode objects. + """ + object: Literal["v2.provisioning.resource_access_configuration"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + resource: str + """ + Provisioning Resource to which this access configuration belongs. + """ diff --git a/stripe/v2/provisioning/_resource_service.py b/stripe/v2/provisioning/_resource_service.py index 0c58ce1a5..b1e2e506d 100644 --- a/stripe/v2/provisioning/_resource_service.py +++ b/stripe/v2/provisioning/_resource_service.py @@ -19,6 +19,9 @@ from stripe.params.v2.provisioning._resource_retrieve_params import ( ResourceRetrieveParams, ) + from stripe.params.v2.provisioning._resource_reveal_access_configuration_params import ( + ResourceRevealAccessConfigurationParams, + ) from stripe.params.v2.provisioning._resource_rotate_credentials_params import ( ResourceRotateCredentialsParams, ) @@ -32,6 +35,9 @@ ResourceUpdateParams, ) from stripe.v2.provisioning._resource import Resource + from stripe.v2.provisioning._resource_access_configuration import ( + ResourceAccessConfiguration, + ) class ResourceService(StripeService): @@ -241,6 +247,58 @@ async def remove_async( ), ) + def reveal_access_configuration( + self, + id: str, + /, + params: Optional["ResourceRevealAccessConfigurationParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ResourceAccessConfiguration": + """ + Reveals the current provider-issued access configuration for a completed Resource. + This is a read-only disclosure: it does not create, refresh, mint, or rotate credentials. + Repeated calls are safe and do not require an idempotency key, but can return a newer + configuration after a separate Rotate operation completes. + """ + return cast( + "ResourceAccessConfiguration", + self._request( + "post", + "/v2/provisioning/resources/{id}/reveal_access_configuration".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def reveal_access_configuration_async( + self, + id: str, + /, + params: Optional["ResourceRevealAccessConfigurationParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ResourceAccessConfiguration": + """ + Reveals the current provider-issued access configuration for a completed Resource. + This is a read-only disclosure: it does not create, refresh, mint, or rotate credentials. + Repeated calls are safe and do not require an idempotency key, but can return a newer + configuration after a separate Rotate operation completes. + """ + return cast( + "ResourceAccessConfiguration", + await self._request_async( + "post", + "/v2/provisioning/resources/{id}/reveal_access_configuration".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + def rotate_credentials( self, id: str, diff --git a/stripe/v2/signals/_account_activity_service.py b/stripe/v2/signals/_account_activity_service.py index ee363854f..b8cef0eec 100644 --- a/stripe/v2/signals/_account_activity_service.py +++ b/stripe/v2/signals/_account_activity_service.py @@ -33,7 +33,7 @@ def create( "AccountActivity", self._request( "post", - "/v2/signals/account_activity", + "/v2/signals/account_activities", base_address="api", params=params, options=options, @@ -52,7 +52,7 @@ async def create_async( "AccountActivity", await self._request_async( "post", - "/v2/signals/account_activity", + "/v2/signals/account_activities", base_address="api", params=params, options=options, @@ -73,7 +73,9 @@ def delete( "DeletedObject", self._request( "delete", - "/v2/signals/account_activity/{id}".format(id=sanitize_id(id)), + "/v2/signals/account_activities/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, @@ -94,7 +96,9 @@ async def delete_async( "DeletedObject", await self._request_async( "delete", - "/v2/signals/account_activity/{id}".format(id=sanitize_id(id)), + "/v2/signals/account_activities/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, @@ -115,7 +119,9 @@ def retrieve( "AccountActivity", self._request( "get", - "/v2/signals/account_activity/{id}".format(id=sanitize_id(id)), + "/v2/signals/account_activities/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, @@ -136,7 +142,9 @@ async def retrieve_async( "AccountActivity", await self._request_async( "get", - "/v2/signals/account_activity/{id}".format(id=sanitize_id(id)), + "/v2/signals/account_activities/{id}".format( + id=sanitize_id(id), + ), base_address="api", params=params, options=options, diff --git a/stripe/v2/signals/_account_evaluation_service.py b/stripe/v2/signals/_account_evaluation_service.py index 83ad3a5c8..8aa2ee690 100644 --- a/stripe/v2/signals/_account_evaluation_service.py +++ b/stripe/v2/signals/_account_evaluation_service.py @@ -63,7 +63,7 @@ def retrieve( options: Optional["RequestOptions"] = None, ) -> "AccountEvaluation": """ - Retrieves an AccountEvaluation by its ID. + Retrieves an AccountEvaluation by its ID for up to 90 days after creation. Evaluations more than 90 days old are inaccessible. """ return cast( "AccountEvaluation", @@ -86,7 +86,7 @@ async def retrieve_async( options: Optional["RequestOptions"] = None, ) -> "AccountEvaluation": """ - Retrieves an AccountEvaluation by its ID. + Retrieves an AccountEvaluation by its ID for up to 90 days after creation. Evaluations more than 90 days old are inaccessible. """ return cast( "AccountEvaluation", diff --git a/stripe/v2/signals/_account_signal_service.py b/stripe/v2/signals/_account_signal_service.py index 3a4bc2a8b..1a2b403b0 100644 --- a/stripe/v2/signals/_account_signal_service.py +++ b/stripe/v2/signals/_account_signal_service.py @@ -24,7 +24,7 @@ def list( options: Optional["RequestOptions"] = None, ) -> "ListObject[AccountSignal]": """ - Lists the latest AccountSignals for a given account or customer, filtered by signal type. Note that this endpoint returns only the latest signal for each requested signal type. + Lists AccountSignals for a given account or customer. Signals more than 90 days old are omitted. Returns only the latest AccountSignal for each requested signal type. """ return cast( "ListObject[AccountSignal]", @@ -43,7 +43,7 @@ async def list_async( options: Optional["RequestOptions"] = None, ) -> "ListObject[AccountSignal]": """ - Lists the latest AccountSignals for a given account or customer, filtered by signal type. Note that this endpoint returns only the latest signal for each requested signal type. + Lists AccountSignals for a given account or customer. Signals more than 90 days old are omitted. Returns only the latest AccountSignal for each requested signal type. """ return cast( "ListObject[AccountSignal]", @@ -64,7 +64,7 @@ def retrieve( options: Optional["RequestOptions"] = None, ) -> "AccountSignal": """ - Retrieves an AccountSignal by its ID. + Retrieves an AccountSignal by its ID for up to 90 days after creation. Signals more than 90 days old are inaccessible. """ return cast( "AccountSignal", @@ -85,7 +85,7 @@ async def retrieve_async( options: Optional["RequestOptions"] = None, ) -> "AccountSignal": """ - Retrieves an AccountSignal by its ID. + Retrieves an AccountSignal by its ID for up to 90 days after creation. Signals more than 90 days old are inaccessible. """ return cast( "AccountSignal", diff --git a/stripe/v2/test_helpers/__init__.py b/stripe/v2/test_helpers/__init__.py index 8e375301b..7c3d0ecad 100644 --- a/stripe/v2/test_helpers/__init__.py +++ b/stripe/v2/test_helpers/__init__.py @@ -4,19 +4,12 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: - from stripe.v2.test_helpers._financial_address_service import ( - FinancialAddressService as FinancialAddressService, - ) from stripe.v2.test_helpers._money_management_service import ( MoneyManagementService as MoneyManagementService, ) # name -> (import_target, is_submodule) _import_map = { - "FinancialAddressService": ( - "stripe.v2.test_helpers._financial_address_service", - False, - ), "MoneyManagementService": ( "stripe.v2.test_helpers._money_management_service", False, diff --git a/stripe/v2/test_helpers/_financial_address_service.py b/stripe/v2/test_helpers/_financial_address_service.py deleted file mode 100644 index ef013b005..000000000 --- a/stripe/v2/test_helpers/_financial_address_service.py +++ /dev/null @@ -1,115 +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.test_helpers._financial_address_credit_params import ( - FinancialAddressCreditParams, - ) - from stripe.params.v2.test_helpers._financial_address_generate_microdeposits_params import ( - FinancialAddressGenerateMicrodepositsParams, - ) - from stripe.v2._financial_address_credit_simulation import ( - FinancialAddressCreditSimulation, - ) - from stripe.v2._financial_address_generated_microdeposits import ( - FinancialAddressGeneratedMicrodeposits, - ) - - -class FinancialAddressService(StripeService): - def credit( - self, - id: str, - /, - params: "FinancialAddressCreditParams", - options: Optional["RequestOptions"] = None, - ) -> "FinancialAddressCreditSimulation": - """ - Simulate crediting a FinancialAddress in a Sandbox environment. This can be used to add virtual funds and increase your balance for testing. - """ - return cast( - "FinancialAddressCreditSimulation", - self._request( - "post", - "/v2/test_helpers/financial_addresses/{id}/credit".format( - id=sanitize_id(id), - ), - base_address="api", - params=params, - options=options, - ), - ) - - async def credit_async( - self, - id: str, - /, - params: "FinancialAddressCreditParams", - options: Optional["RequestOptions"] = None, - ) -> "FinancialAddressCreditSimulation": - """ - Simulate crediting a FinancialAddress in a Sandbox environment. This can be used to add virtual funds and increase your balance for testing. - """ - return cast( - "FinancialAddressCreditSimulation", - await self._request_async( - "post", - "/v2/test_helpers/financial_addresses/{id}/credit".format( - id=sanitize_id(id), - ), - base_address="api", - params=params, - options=options, - ), - ) - - def generate_microdeposits( - self, - id: str, - /, - params: Optional["FinancialAddressGenerateMicrodepositsParams"] = None, - options: Optional["RequestOptions"] = None, - ) -> "FinancialAddressGeneratedMicrodeposits": - """ - Generates microdeposits for a FinancialAddress in a Sandbox environment. - """ - return cast( - "FinancialAddressGeneratedMicrodeposits", - self._request( - "post", - "/v2/test_helpers/financial_addresses/{id}/generate_microdeposits".format( - id=sanitize_id(id), - ), - base_address="api", - params=params, - options=options, - ), - ) - - async def generate_microdeposits_async( - self, - id: str, - /, - params: Optional["FinancialAddressGenerateMicrodepositsParams"] = None, - options: Optional["RequestOptions"] = None, - ) -> "FinancialAddressGeneratedMicrodeposits": - """ - Generates microdeposits for a FinancialAddress in a Sandbox environment. - """ - return cast( - "FinancialAddressGeneratedMicrodeposits", - await self._request_async( - "post", - "/v2/test_helpers/financial_addresses/{id}/generate_microdeposits".format( - id=sanitize_id(id), - ), - base_address="api", - params=params, - options=options, - ), - ) diff --git a/tests/api_resources/test_reversal.py b/tests/api_resources/test_transfer_reversal.py similarity index 72% rename from tests/api_resources/test_reversal.py rename to tests/api_resources/test_transfer_reversal.py index 0d96dc187..f4ebf110a 100644 --- a/tests/api_resources/test_reversal.py +++ b/tests/api_resources/test_transfer_reversal.py @@ -6,15 +6,17 @@ TEST_RESOURCE_ID = "trr_123" -class TestReversal(object): +class TestTransferReversal(object): def construct_resource(self): reversal_dict = { "id": TEST_RESOURCE_ID, - "object": "reversal", + "object": "transfer_reversal", "metadata": {}, "transfer": "tr_123", } - return stripe.Reversal.construct_from(reversal_dict, stripe.api_key) + return stripe.TransferReversal.construct_from( + reversal_dict, stripe.api_key + ) def test_has_instance_url(self): resource = self.construct_resource() @@ -25,11 +27,13 @@ def test_has_instance_url(self): def test_is_not_modifiable(self): with pytest.raises(NotImplementedError): - stripe.Reversal.modify(TEST_RESOURCE_ID, metadata={"key": "value"}) + stripe.TransferReversal.modify( + TEST_RESOURCE_ID, metadata={"key": "value"} + ) def test_is_not_retrievable(self): with pytest.raises(NotImplementedError): - stripe.Reversal.retrieve(TEST_RESOURCE_ID) + stripe.TransferReversal.retrieve(TEST_RESOURCE_ID) def test_is_saveable(self, http_client_mock): resource = self.construct_resource() diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 7e81eefed..c60e93dc1 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -12958,7 +12958,7 @@ def test_financial_connections_sessions_post_2_service_non_namespaced( "customer": "cus_xxxxxxxxxxxxx", }, "permissions": ["payment_method", "balances"], - "filters": {"countries": ["US"]}, + "filters": {"country": "US"}, } ) http_client_mock.assert_requested( @@ -12966,7 +12966,7 @@ def test_financial_connections_sessions_post_2_service_non_namespaced( path="/v1/financial_connections/sessions", query_string="", api_base="https://api.stripe.com", - post_data="account_holder[type]=customer&account_holder[customer]=cus_xxxxxxxxxxxxx&permissions[0]=payment_method&permissions[1]=balances&filters[countries][0]=US", + post_data="account_holder[type]=customer&account_holder[customer]=cus_xxxxxxxxxxxxx&permissions[0]=payment_method&permissions[1]=balances&filters[country]=US", ) def test_financial_connections_sessions_post_2( @@ -12978,13 +12978,13 @@ def test_financial_connections_sessions_post_2( "customer": "cus_xxxxxxxxxxxxx", }, permissions=["payment_method", "balances"], - filters={"countries": ["US"]}, + filters={"country": "US"}, ) http_client_mock.assert_requested( "post", path="/v1/financial_connections/sessions", query_string="", - post_data="account_holder[type]=customer&account_holder[customer]=cus_xxxxxxxxxxxxx&permissions[0]=payment_method&permissions[1]=balances&filters[countries][0]=US", + post_data="account_holder[type]=customer&account_holder[customer]=cus_xxxxxxxxxxxxx&permissions[0]=payment_method&permissions[1]=balances&filters[country]=US", ) def test_financial_connections_sessions_post_2_service( @@ -13006,7 +13006,7 @@ def test_financial_connections_sessions_post_2_service( "customer": "cus_xxxxxxxxxxxxx", }, "permissions": ["payment_method", "balances"], - "filters": {"countries": ["US"]}, + "filters": {"country": "US"}, } ) http_client_mock.assert_requested( @@ -13014,7 +13014,7 @@ def test_financial_connections_sessions_post_2_service( path="/v1/financial_connections/sessions", query_string="", api_base="https://api.stripe.com", - post_data="account_holder[type]=customer&account_holder[customer]=cus_xxxxxxxxxxxxx&permissions[0]=payment_method&permissions[1]=balances&filters[countries][0]=US", + post_data="account_holder[type]=customer&account_holder[customer]=cus_xxxxxxxxxxxxx&permissions[0]=payment_method&permissions[1]=balances&filters[country]=US", ) @pytest.mark.anyio @@ -13027,13 +13027,13 @@ async def test_financial_connections_sessions_post_2_async( "customer": "cus_xxxxxxxxxxxxx", }, permissions=["payment_method", "balances"], - filters={"countries": ["US"]}, + filters={"country": "US"}, ) http_client_mock.assert_requested( "post", path="/v1/financial_connections/sessions", query_string="", - post_data="account_holder[type]=customer&account_holder[customer]=cus_xxxxxxxxxxxxx&permissions[0]=payment_method&permissions[1]=balances&filters[countries][0]=US", + post_data="account_holder[type]=customer&account_holder[customer]=cus_xxxxxxxxxxxxx&permissions[0]=payment_method&permissions[1]=balances&filters[country]=US", ) @pytest.mark.anyio @@ -13056,7 +13056,7 @@ async def test_financial_connections_sessions_post_2_service_async( "customer": "cus_xxxxxxxxxxxxx", }, "permissions": ["payment_method", "balances"], - "filters": {"countries": ["US"]}, + "filters": {"country": "US"}, } ) http_client_mock.assert_requested( @@ -13064,7 +13064,7 @@ async def test_financial_connections_sessions_post_2_service_async( path="/v1/financial_connections/sessions", query_string="", api_base="https://api.stripe.com", - post_data="account_holder[type]=customer&account_holder[customer]=cus_xxxxxxxxxxxxx&permissions[0]=payment_method&permissions[1]=balances&filters[countries][0]=US", + post_data="account_holder[type]=customer&account_holder[customer]=cus_xxxxxxxxxxxxx&permissions[0]=payment_method&permissions[1]=balances&filters[country]=US", ) def test_financial_connections_transactions_get_service_non_namespaced( @@ -46404,7 +46404,6 @@ def test_v2_core_account_link_post_service( "fields": "eventually_due", "future_requirements": "include", }, - "configurations": ["developer"], "refresh_url": "refresh_url", "return_url": "return_url", }, @@ -46413,7 +46412,6 @@ def test_v2_core_account_link_post_service( "fields": "eventually_due", "future_requirements": "include", }, - "configurations": ["developer"], "refresh_url": "refresh_url", "return_url": "return_url", }, @@ -46422,7 +46420,6 @@ def test_v2_core_account_link_post_service( "fields": "eventually_due", "future_requirements": "include", }, - "configurations": ["recipient"], "refresh_url": "refresh_url", "return_url": "return_url", }, @@ -46431,7 +46428,6 @@ def test_v2_core_account_link_post_service( "fields": "eventually_due", "future_requirements": "include", }, - "configurations": ["recipient"], "refresh_url": "refresh_url", "return_url": "return_url", }, @@ -46444,7 +46440,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"},"configurations":["developer"],"refresh_url":"refresh_url","return_url":"return_url"},"account_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["developer"],"refresh_url":"refresh_url","return_url":"return_url"},"recipient_onboarding":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["recipient"],"refresh_url":"refresh_url","return_url":"return_url"},"recipient_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["recipient"],"refresh_url":"refresh_url","return_url":"return_url"},"type":"recipient_onboarding"}}', + 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"}}', is_json=True, ) @@ -47522,6 +47518,152 @@ def test_v2_data_analytics_metric_query_post_service( is_json=True, ) + def test_v2_data_query_run_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/data/query_runs", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.data.query_runs.create( + { + "dataset": "analytical", + "format": "csv", + "query": {"sql": "sql"}, + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/data/query_runs", + query_string="", + api_base="https://api.stripe.com", + post_data='{"dataset":"analytical","format":"csv","query":{"sql":"sql"}}', + is_json=True, + ) + + def test_v2_data_query_run_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/data/query_runs/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.data.query_runs.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/data/query_runs/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_data_report_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/data/reports", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.data.reports.list() + http_client_mock.assert_requested( + "get", + path="/v2/data/reports", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_data_report_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/data/reports/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.data.reports.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/data/reports/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_data_report_run_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/data/report_runs", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.data.report_runs.create( + { + "format": "csv", + "parameters": { + "int_key": 123, + "string_key": "value", + "boolean_key": True, + "object_key": { + "object_int_key": 123, + "object_string_key": "value", + "object_boolean_key": True, + }, + "array_key": [1, 2, 3], + }, + "report": {"id": "obj_123", "name": "name"}, + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/data/report_runs", + query_string="", + api_base="https://api.stripe.com", + post_data='{"format":"csv","parameters":{"int_key":123,"string_key":"value","boolean_key":true,"object_key":{"object_int_key":123,"object_string_key":"value","object_boolean_key":true},"array_key":[1,2,3]},"report":{"id":"obj_123","name":"name"}}', + is_json=True, + ) + + def test_v2_data_report_run_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/data/report_runs/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.data.report_runs.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/data/report_runs/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + def test_v2_data_reporting_query_run_post_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -47564,6 +47706,46 @@ def test_v2_data_reporting_query_run_get_service( api_base="https://api.stripe.com", ) + def test_v2_data_schema_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/data/schemas", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.data.schemas.list() + http_client_mock.assert_requested( + "get", + path="/v2/data/schemas", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_data_schema_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/data/schemas/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.data.schemas.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/data/schemas/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + def test_v2_extend_workflow_get_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -48028,6 +48210,46 @@ def test_v2_money_management_debit_dispute_get_2_service( api_base="https://api.stripe.com", ) + def test_v2_money_management_earned_credit_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/earned_credits", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.earned_credits.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/earned_credits", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_earned_credit_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/earned_credits/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.earned_credits.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/earned_credits/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + def test_v2_money_management_financial_account_get_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -49273,8 +49495,61 @@ def test_v2_money_management_recipient_verification_post_2_service( is_json=True, ) + def test_v2_money_management_test_helper_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/test_helpers/earned_credits", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.test_helpers.earned_credits( + { + "amount": {"currency": "USD", "value": 96}, + "financial_account": "financial_account", + "type": "interest", + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/test_helpers/earned_credits", + query_string="", + api_base="https://api.stripe.com", + post_data='{"amount":{"currency":"USD","value":96},"financial_account":"financial_account","type":"interest"}', + is_json=True, + ) + def test_v2_money_management_test_helpers_financial_address_post_service( self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/test_helpers/financial_addresses/id_123/credit", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.test_helpers.financial_addresses.credit( + "id_123", + {"amount": {"currency": "USD", "value": 96}, "network": "swift"}, + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/test_helpers/financial_addresses/id_123/credit", + query_string="", + api_base="https://api.stripe.com", + post_data='{"amount":{"currency":"USD","value":96},"network":"swift"}', + is_json=True, + ) + + def test_v2_money_management_test_helpers_financial_address_post_2_service( + self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", @@ -49298,6 +49573,30 @@ def test_v2_money_management_test_helpers_financial_address_post_service( is_json=True, ) + def test_v2_money_management_test_helpers_financial_address_post_3_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/test_helpers/financial_addresses/id_123/generate_microdeposits", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.test_helpers.financial_addresses.generate_microdeposits( + "id_123" + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/test_helpers/financial_addresses/id_123/generate_microdeposits", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + def test_v2_money_management_transaction_get_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -49360,6 +49659,30 @@ def test_v2_money_management_transaction_post_service( is_json=True, ) + def test_v2_money_management_transaction_post_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/transactions/id_123/refresh_regulatory_receipt", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.transactions.refresh_regulatory_receipt( + "id_123", + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/transactions/id_123/refresh_regulatory_receipt", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + def test_v2_money_management_transaction_entry_get_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -50360,6 +50683,28 @@ def test_v2_provisioning_resource_post_4_service( def test_v2_provisioning_resource_post_5_service( self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/provisioning/resources/id_123/reveal_access_configuration", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.provisioning.resources.reveal_access_configuration("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/provisioning/resources/id_123/reveal_access_configuration", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_provisioning_resource_post_6_service( + self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( "post", @@ -50380,7 +50725,7 @@ def test_v2_provisioning_resource_post_5_service( is_json=True, ) - def test_v2_provisioning_resource_post_6_service( + def test_v2_provisioning_resource_post_7_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( @@ -50417,7 +50762,7 @@ def test_v2_provisioning_resource_post_6_service( is_json=True, ) - def test_v2_provisioning_resource_post_7_service( + def test_v2_provisioning_resource_post_8_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( @@ -50584,17 +50929,17 @@ def test_v2_signals_account_activity_post_service( ) -> None: http_client_mock.stub_request( "post", - "/v2/signals/account_activity", + "/v2/signals/account_activities", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.signals.account_activity.create({"type": "login_attempt"}) + client.v2.signals.account_activities.create({"type": "login_attempt"}) http_client_mock.assert_requested( "post", - path="/v2/signals/account_activity", + path="/v2/signals/account_activities", query_string="", api_base="https://api.stripe.com", post_data='{"type":"login_attempt"}', @@ -50606,17 +50951,17 @@ def test_v2_signals_account_activity_delete_service( ) -> None: http_client_mock.stub_request( "delete", - "/v2/signals/account_activity/id_123", + "/v2/signals/account_activities/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.signals.account_activity.delete("id_123") + client.v2.signals.account_activities.delete("id_123") http_client_mock.assert_requested( "delete", - path="/v2/signals/account_activity/id_123", + path="/v2/signals/account_activities/id_123", query_string="", api_base="https://api.stripe.com", ) @@ -50626,17 +50971,17 @@ def test_v2_signals_account_activity_get_service( ) -> None: http_client_mock.stub_request( "get", - "/v2/signals/account_activity/id_123", + "/v2/signals/account_activities/id_123", ) client = StripeClient( "sk_test_123", http_client=http_client_mock.get_mock_http_client(), ) - client.v2.signals.account_activity.retrieve("id_123") + client.v2.signals.account_activities.retrieve("id_123") http_client_mock.assert_requested( "get", - path="/v2/signals/account_activity/id_123", + path="/v2/signals/account_activities/id_123", query_string="", api_base="https://api.stripe.com", ) @@ -51073,55 +51418,6 @@ def test_v2_tax_operation_post_service( is_json=True, ) - def test_v2_test_helpers_financial_address_post_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "post", - "/v2/test_helpers/financial_addresses/id_123/credit", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.test_helpers.financial_addresses.credit( - "id_123", - {"amount": {"currency": "USD", "value": 96}, "network": "wire"}, - ) - http_client_mock.assert_requested( - "post", - path="/v2/test_helpers/financial_addresses/id_123/credit", - query_string="", - api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"network":"wire"}', - is_json=True, - ) - - def test_v2_test_helpers_financial_address_post_2_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "post", - "/v2/test_helpers/financial_addresses/id_123/generate_microdeposits", - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - client.v2.test_helpers.financial_addresses.generate_microdeposits( - "id_123", - ) - http_client_mock.assert_requested( - "post", - path="/v2/test_helpers/financial_addresses/id_123/generate_microdeposits", - query_string="", - api_base="https://api.stripe.com", - post_data="{}", - is_json=True, - ) - def test_v2_test_helpers_money_management_post_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -51213,8 +51509,8 @@ def test_blocked_by_stripe_error_service( ) -> None: http_client_mock.stub_request( "post", - "/v2/core/vault/network_tokens", - rbody='{"error":{"type":"blocked_by_stripe","code":"blocked_payout_method"}}', + "/v2/core/vault/gb_bank_accounts", + rbody='{"error":{"type":"blocked_by_stripe","code":"blocked_gb_bank_account"}}', rcode=400, ) client = StripeClient( @@ -51223,15 +51519,15 @@ def test_blocked_by_stripe_error_service( ) try: - client.v2.core.vault.network_tokens.create({"type": "card"}) + client.v2.core.vault.gb_bank_accounts.create({"currency": "usd"}) except _error.BlockedByStripeError: pass http_client_mock.assert_requested( "post", - path="/v2/core/vault/network_tokens", + path="/v2/core/vault/gb_bank_accounts", query_string="", api_base="https://api.stripe.com", - post_data='{"type":"card"}', + post_data='{"currency":"usd"}', is_json=True, ) @@ -51267,8 +51563,8 @@ def test_controlled_by_alternate_resource_error_service( ) -> None: http_client_mock.stub_request( "post", - "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", - rbody='{"error":{"type":"controlled_by_alternate_resource","code":"payout_method_cannot_be_archived"}}', + "/v2/core/vault/gb_bank_accounts/id_123/archive", + rbody='{"error":{"type":"controlled_by_alternate_resource","code":"gb_bank_account_cannot_be_archived"}}', rcode=400, ) client = StripeClient( @@ -51277,41 +51573,12 @@ def test_controlled_by_alternate_resource_error_service( ) try: - client.v2.core.vault.us_bank_accounts.confirm_microdeposits( - "id_123" - ) + client.v2.core.vault.gb_bank_accounts.archive("id_123") except _error.ControlledByAlternateResourceError: pass http_client_mock.assert_requested( "post", - path="/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", - query_string="", - api_base="https://api.stripe.com", - post_data="{}", - is_json=True, - ) - - def test_controlled_by_dashboard_error_service( - self, http_client_mock: HTTPClientMock - ) -> None: - http_client_mock.stub_request( - "post", - "/v2/core/vault/us_bank_accounts/id_123/archive", - rbody='{"error":{"type":"controlled_by_dashboard","code":"bank_account_cannot_be_archived"}}', - rcode=400, - ) - client = StripeClient( - "sk_test_123", - http_client=http_client_mock.get_mock_http_client(), - ) - - try: - client.v2.core.vault.us_bank_accounts.archive("id_123") - except _error.ControlledByDashboardError: - pass - http_client_mock.assert_requested( - "post", - path="/v2/core/vault/us_bank_accounts/id_123/archive", + path="/v2/core/vault/gb_bank_accounts/id_123/archive", query_string="", api_base="https://api.stripe.com", post_data="{}", @@ -51536,6 +51803,33 @@ def test_invalid_payout_method_error_service( is_json=True, ) + def test_invalid_vaulted_credential_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/gb_bank_accounts", + rbody='{"error":{"type":"invalid_vaulted_credential","code":"invalid_gb_bank_account"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.core.vault.gb_bank_accounts.create({"currency": "usd"}) + except _error.InvalidVaultedCredentialError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/gb_bank_accounts", + query_string="", + api_base="https://api.stripe.com", + post_data='{"currency":"usd"}', + is_json=True, + ) + def test_merchant_not_gated_error_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -51622,7 +51916,7 @@ def test_quota_exceeded_error_service( ) -> None: http_client_mock.stub_request( "post", - "/v2/core/vault/us_bank_accounts", + "/v2/core/vault/gb_bank_accounts", rbody='{"error":{"type":"quota_exceeded","code":"archived_payout_method_card"}}', rcode=400, ) @@ -51632,20 +51926,15 @@ def test_quota_exceeded_error_service( ) try: - client.v2.core.vault.us_bank_accounts.create( - { - "account_number": "account_number", - "currency": "usd", - } - ) + client.v2.core.vault.gb_bank_accounts.create({"currency": "usd"}) except _error.QuotaExceededError: pass http_client_mock.assert_requested( "post", - path="/v2/core/vault/us_bank_accounts", + path="/v2/core/vault/gb_bank_accounts", query_string="", api_base="https://api.stripe.com", - post_data='{"account_number":"account_number","currency":"usd"}', + post_data='{"currency":"usd"}', is_json=True, ) @@ -51780,3 +52069,90 @@ def test_temporary_session_expired_error_service( post_data='{"events":[{"event_name":"event_name","payload":{"key":"payload"}}]}', is_json=True, ) + + def test_verification_attempt_failed_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + rbody='{"error":{"type":"verification_attempt_failed","code":"us_bank_account_confirm_microdeposits_failure"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.core.vault.us_bank_accounts.confirm_microdeposits( + "id_123" + ) + except _error.VerificationAttemptFailedError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_verification_expired_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + rbody='{"error":{"type":"verification_expired","code":"us_bank_account_microdeposits_timed_out"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.core.vault.us_bank_accounts.confirm_microdeposits( + "id_123" + ) + except _error.VerificationExpiredError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_verification_not_initiated_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + rbody='{"error":{"type":"verification_not_initiated","code":"us_bank_account_microdeposits_not_sent_before_confirming"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.core.vault.us_bank_accounts.confirm_microdeposits( + "id_123" + ) + except _error.VerificationNotInitiatedError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) diff --git a/tests/test_stripe_object.py b/tests/test_stripe_object.py index d73d79869..aecd64938 100644 --- a/tests/test_stripe_object.py +++ b/tests/test_stripe_object.py @@ -126,6 +126,13 @@ def test_access(self): with pytest.raises(ValueError): obj.foo = "" + def test_access_request_field(self): + obj = StripeObject.construct_from( + {"request": {"id": "req_123"}}, "mykey" + ) + + assert obj.request.id == "req_123" + def test_refresh_from(self, mocker): obj = StripeObject.construct_from( {"foo": "bar", "trans": "me"}, "mykey"