diff --git a/.hark/changes/2026-09-30_stripe-openapi_7214afd1.change.md b/.hark/changes/2026-09-30_stripe-openapi_7214afd1.change.md new file mode 100644 index 000000000..b014dff52 --- /dev/null +++ b/.hark/changes/2026-09-30_stripe-openapi_7214afd1.change.md @@ -0,0 +1,159 @@ +--- +title: Update generated code +pr_url: https://github.com/stripe/stripe-python/pull/1899 +semver_level: major +is_stripe_api_change: true +--- + +* Add support for new resources `apps.Install`, `product_catalog.TrialOffer`, `tax.Location`, and `three_d_secure.Authentication` +* Add support for `create`, `list`, `modify`, `retrieve`, and `uninstall` methods on resource `apps.Install` +* Add support for `create`, `list`, `modify`, and `retrieve` methods on resource `product_catalog.TrialOffer` +* Add support for `create`, `list`, and `retrieve` methods on resource `tax.Location` +* Add support for `cancel`, `create`, `list`, `retrieve`, and `submit` methods on resource `three_d_secure.Authentication` +* Add support for `pause` method on resource `Subscription` +* ⚠️ Add support for new values `invalid_address_cmra_address` and `invalid_address_registered_agent_address` on enums `Account.FutureRequirement.Error.code`, `Account.Requirement.Error.code`, `BankAccount.FutureRequirement.Error.code`, `BankAccount.Requirement.Error.code`, `Capability.FutureRequirement.Error.code`, `Capability.Requirement.Error.code`, `Person.FutureRequirement.Error.code`, and `Person.Requirement.Error.code` +* Add support for `performance_location` on `Tax.CalculationLineItem` and `tax.CalculationCreateParamsLineItem` +* Add support for new value `performance` on enums `Tax.Calculation.ShippingCost.TaxBreakdown.sourcing`, `Tax.CalculationLineItem.TaxBreakdown.sourcing`, and `Tax.Transaction.ShippingCost.TaxBreakdown.sourcing` +* Add support for new values `admissions_tax`, `attendance_tax`, `digital_excise_tax`, `entertainment_tax`, `gross_receipts_tax`, `hospitality_tax`, `luxury_tax`, `recycling_fee`, `resort_tax`, `tourism_tax`, and `utility_users_tax` on enums `Tax.Calculation.ShippingCost.TaxBreakdown.TaxRateDetail.tax_type`, `Tax.Calculation.TaxBreakdown.TaxRateDetail.tax_type`, `Tax.CalculationLineItem.TaxBreakdown.TaxRateDetail.tax_type`, and `Tax.Transaction.ShippingCost.TaxBreakdown.TaxRateDetail.tax_type` +* Add support for `destination` on `Reserve.Hold`, `Reserve.Plan`, and `Reserve.Release` +* Add support for `manual_release` on `Reserve.Plan` +* ⚠️ Add support for new value `other` on enum `Reserve.Plan.status` +* ⚠️ Add support for new values `manual_release` and `other` on enum `Reserve.Plan.type` +* ⚠️ Add support for new value `hold_expired` on enum `Reserve.Release.reason` +* ⚠️ Remove support for value `bulk_hold_expiry` from enum `Reserve.Release.reason` +* Add support for `specified_commercial_transactions_act_url` on `Account.BusinessProfile`, `AccountCreateParamsBusinessProfile`, and `AccountModifyParamsBusinessProfile` +* Add support for `blik_recurring_payments` and `sequra_payments` on `Account.Capability`, `AccountCreateParamsCapability`, `AccountModifyParamsCapability`, `V2.Core.Account.Configuration.Merchant.Capability`, `v2.core.AccountCreateParamsConfigurationMerchantCapability`, and `v2.core.AccountModifyParamsConfigurationMerchantCapability` +* Add support for `paypay_payments` on `Account.Capability`, `Account.Setting`, `AccountCreateParamsCapability`, `AccountCreateParamsSetting`, `AccountModifyParamsCapability`, and `AccountModifyParamsSetting` +* Add support for `sepa_debit_payments` on `AccountCreateParamsSetting`, `v2.core.AccountCreateParamsConfigurationMerchant`, and `v2.core.AccountModifyParamsConfigurationMerchant` +* ⚠️ Change type of `AccountRejectParams.reason` from `string` to `enum` +* Add support for new values `issuing_dispute_provisional_credit_reversal` and `issuing_dispute_provisional_credit` on enum `BalanceTransaction.type` +* Add support for `paypay` on `Charge.PaymentMethodDetail`, `ConfirmationToken.PaymentMethodPreview`, `ConfirmationTokenCreateParamsPaymentMethodDatum`, `PaymentAttemptRecord.PaymentMethodDetail`, `PaymentIntent.PaymentMethodOption`, `PaymentIntentConfirmParamsPaymentMethodDatum`, `PaymentIntentConfirmParamsPaymentMethodOption`, `PaymentIntentCreateParamsPaymentMethodDatum`, `PaymentIntentCreateParamsPaymentMethodOption`, `PaymentIntentModifyParamsPaymentMethodDatum`, `PaymentIntentModifyParamsPaymentMethodOption`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationModifyParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethod`, `PaymentRecord.PaymentMethodDetail`, `SetupIntentConfirmParamsPaymentMethodDatum`, `SetupIntentCreateParamsPaymentMethodDatum`, and `SetupIntentModifyParamsPaymentMethodDatum` +* Add support for `sequra` on `Charge.PaymentMethodDetail`, `Checkout.Session.PaymentMethodOption`, `ConfirmationToken.PaymentMethodPreview`, `ConfirmationTokenCreateParamsPaymentMethodDatum`, `PaymentAttemptRecord.PaymentMethodDetail`, `PaymentIntent.PaymentMethodOption`, `PaymentIntentConfirmParamsPaymentMethodDatum`, `PaymentIntentConfirmParamsPaymentMethodOption`, `PaymentIntentCreateParamsPaymentMethodDatum`, `PaymentIntentCreateParamsPaymentMethodOption`, `PaymentIntentModifyParamsPaymentMethodDatum`, `PaymentIntentModifyParamsPaymentMethodOption`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationModifyParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethod`, `PaymentRecord.PaymentMethodDetail`, `SetupIntentConfirmParamsPaymentMethodDatum`, `SetupIntentCreateParamsPaymentMethodDatum`, `SetupIntentModifyParamsPaymentMethodDatum`, and `checkout.SessionCreateParamsPaymentMethodOption` +* Add support for `electronic_commerce_indicator` on `Charge.PaymentMethodDetail.Card` +* ⚠️ Change type of `Charge.PaymentMethodDetail.Card.mandate` from `string` to `expandable($Mandate)` +* Add support for `allowed_payment_method_types` on `Checkout.Session` and `checkout.SessionCreateParams` +* ⚠️ Remove support for `payment_method_types` on `PaymentIntentConfirmParams`, `PaymentIntentCreateParams`, `PaymentIntentModifyParams`, `SetupIntentCreateParams`, `SetupIntentModifyParams`, and `checkout.SessionCreateParams` +* Add support for new values `paypay` and `sequra` on enums `PaymentIntent.excluded_payment_method_types`, `PaymentIntentConfirmParams.excluded_payment_method_types`, `PaymentIntentCreateParams.excluded_payment_method_types`, `PaymentIntentModifyParams.excluded_payment_method_types`, `SetupIntent.excluded_payment_method_types`, `SetupIntentCreateParams.excluded_payment_method_types`, `SetupIntentModifyParams.excluded_payment_method_types`, and `checkout.SessionCreateParams.excluded_payment_method_types` +* Add support for `tax_details` on `InvoiceAddLinesParamsLinePriceDatumProductDatum`, `InvoiceLineItemModifyParamsPriceDatumProductDatum`, `InvoiceUpdateLinesParamsLinePriceDatumProductDatum`, `PaymentLinkCreateParamsLineItemPriceDatumProductDatum`, `PlanCreateParamsProduct`, `PriceCreateParamsProductDatum`, `ProductCreateParams`, `ProductModifyParams`, `Product`, `checkout.SessionCreateParamsLineItemPriceDatumProductDatum`, and `checkout.SessionModifyParamsLineItemPriceDatumProductDatum` +* Add support for `blik` on `Invoice.PaymentSetting.PaymentMethodOption`, `InvoiceCreateParamsPaymentSettingPaymentMethodOption`, `InvoiceModifyParamsPaymentSettingPaymentMethodOption`, `Mandate.PaymentMethodDetail`, `SetupAttempt.PaymentMethodDetail`, `SetupIntent.PaymentMethodOption`, `SetupIntentConfirmParamsPaymentMethodOption`, `SetupIntentCreateParamsPaymentMethodOption`, `SetupIntentModifyParamsPaymentMethodOption`, `Subscription.PaymentSetting.PaymentMethodOption`, `SubscriptionCreateParamsPaymentSettingPaymentMethodOption`, `SubscriptionModifyParamsPaymentSettingPaymentMethodOption`, and `checkout.SessionCreateParamsPaymentMethodOption` +* Change type of `PaymentIntentConfirmParamsPaymentMethodOptionBlik.setup_future_usage`, `PaymentIntentCreateParamsPaymentMethodOptionBlik.setup_future_usage`, `PaymentIntentModifyParamsPaymentMethodOptionBlik.setup_future_usage`, and `checkout.SessionCreateParamsPaymentMethodOptionBancontact.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')` +* ⚠️ Change type of `Checkout.Session.PaymentMethodOption.Bancontact.setup_future_usage` and `PaymentIntent.PaymentMethodOption.Blik.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')` +* Add support for new values `paypay` and `sequra` on enums `ConfirmationTokenCreateParamsPaymentMethodDatum.type`, `PaymentIntentConfirmParamsPaymentMethodDatum.type`, `PaymentIntentCreateParamsPaymentMethodDatum.type`, `PaymentIntentModifyParamsPaymentMethodDatum.type`, `SetupIntentConfirmParamsPaymentMethodDatum.type`, `SetupIntentCreateParamsPaymentMethodDatum.type`, and `SetupIntentModifyParamsPaymentMethodDatum.type` +* Add support for new values `paypay` and `sequra` on enums `ConfirmationToken.PaymentMethodPreview.type` and `PaymentMethod.type` +* Add support for new values `paypay` and `sequra` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type` +* Add support for new values `apps.install.created`, `apps.install.deleted`, and `apps.install.updated` on enum `Event.type` +* Add support for new values `expired` and `pending` on enum `FinancialConnections.Account.AccountNumber.status` +* Add support for `country` on `financial_connections.SessionCreateParamsFilter` +* ⚠️ Remove support for `countries` on `FinancialConnections.Session.Filter` and `financial_connections.SessionCreateParamsFilter` +* Add support for `invoicing_rules` on `InvoiceItemModifyParams` and `InvoiceItem` +* Add support for `company_details` on `Invoice.PaymentSetting.PaymentMethodOption.Billie`, `InvoiceCreateParamsPaymentSettingPaymentMethodOptionBillie`, `InvoiceModifyParamsPaymentSettingPaymentMethodOptionBillie`, `PaymentIntent.PaymentMethodOption.Billie`, `PaymentIntentConfirmParamsPaymentMethodOptionBillie`, `PaymentIntentCreateParamsPaymentMethodOptionBillie`, `PaymentIntentModifyParamsPaymentMethodOptionBillie`, `Subscription.PaymentSetting.PaymentMethodOption.Billie`, `SubscriptionCreateParamsPaymentSettingPaymentMethodOptionBillie`, and `SubscriptionModifyParamsPaymentSettingPaymentMethodOptionBillie` +* Add support for `reference` on `Invoice.PaymentSetting.PaymentMethodOption.Billie`, `InvoiceCreateParamsPaymentSettingPaymentMethodOptionBillie`, `InvoiceModifyParamsPaymentSettingPaymentMethodOptionBillie`, `PaymentIntent.PaymentMethodOption.Billie`, `PaymentIntentConfirmParamsPaymentMethodOptionBillie`, `PaymentIntentCreateParamsPaymentMethodOptionBillie`, and `PaymentIntentModifyParamsPaymentMethodOptionBillie` +* Add support for new value `blik` on enums `Invoice.PaymentSetting.payment_method_types`, `InvoiceCreateParamsPaymentSetting.payment_method_types`, `InvoiceModifyParamsPaymentSetting.payment_method_types`, `Subscription.PaymentSetting.payment_method_types`, `SubscriptionCreateParamsPaymentSetting.payment_method_types`, and `SubscriptionModifyParamsPaymentSetting.payment_method_types` +* Add support for new values `digital_excise_tax` and `utility_users_tax` on enums `InvoiceAddLinesParamsLineTaxAmountTaxRateDatum.tax_type`, `InvoiceLineItemModifyParamsTaxAmountTaxRateDatum.tax_type`, `InvoiceUpdateLinesParamsLineTaxAmountTaxRateDatum.tax_type`, `TaxRate.tax_type`, `TaxRateCreateParams.tax_type`, and `TaxRateModifyParams.tax_type` +* Add support for `pause` on `InvoiceCreatePreviewParamsSubscriptionDetail` +* ⚠️ Change type of `InvoiceCreatePreviewParamsSubscriptionDetail.billing_cycle_anchor` from `enum('now'|'unchanged') | DateTime` to `billing_cycle_anchor_param` +* Add support for `current_trial` on `InvoiceCreatePreviewParamsSubscriptionDetailItem`, `SubscriptionCreateParamsItem`, `SubscriptionItemCreateParams`, `SubscriptionItemModifyParams`, `SubscriptionItem`, and `SubscriptionModifyParamsItem` +* Add support for `status_details` on `Invoice` and `Subscription` +* Add support for `india` on `Mandate.PaymentMethodDetail.Card` +* Add support for `momo` on `PaymentAttemptRecord.PaymentMethodDetail` and `PaymentRecord.PaymentMethodDetail` +* Add support for new values `2.3.0` and `2.3.1` on enums `PaymentAttemptRecord.PaymentMethodDetail.Card.ThreeDSecure.version` and `PaymentRecord.PaymentMethodDetail.Card.ThreeDSecure.version` +* Add support for `link` on `PaymentAttemptRecord.PaymentMethodDetail.Card.Wallet` and `PaymentRecord.PaymentMethodDetail.Card.Wallet` +* Add support for `funding_source_group` on `PaymentAttemptRecord.PaymentMethodDetail.Link` and `PaymentRecord.PaymentMethodDetail.Link` +* Add support for new values `card_present` and `interac_present` on enums `PaymentIntent.allowed_payment_method_types`, `PaymentIntentConfirmParams.allowed_payment_method_types`, `PaymentIntentCreateParams.allowed_payment_method_types`, `PaymentIntentModifyParams.allowed_payment_method_types`, `SetupIntent.allowed_payment_method_types`, `SetupIntentConfirmParams.allowed_payment_method_types`, `SetupIntentCreateParams.allowed_payment_method_types`, and `SetupIntentModifyParams.allowed_payment_method_types` +* Add support for `mandate_options` on `PaymentIntent.PaymentMethodOption.Blik`, `PaymentIntentConfirmParamsPaymentMethodOptionBlik`, `PaymentIntentCreateParamsPaymentMethodOptionBlik`, and `PaymentIntentModifyParamsPaymentMethodOptionBlik` +* Add support for `payment_record` on `PaymentIntent` +* Add support for `expires_at` on `PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode.QrCode` +* Add support for new values `paypay` and `sequra` on enums `PaymentLink.payment_method_types`, `PaymentLinkCreateParams.payment_method_types`, and `PaymentLinkModifyParams.payment_method_types` +* ⚠️ Remove support for `payto` on `PaymentMethodModifyParams` +* Add support for `canceled` on `PaymentRecordReportPaymentAttemptParams` and `PaymentRecordReportPaymentParams` +* Add support for new value `canceled` on enums `PaymentRecordReportPaymentAttemptParams.outcome` and `PaymentRecordReportPaymentParams.outcome` +* Add support for new value `rerouted` on enum `Radar.PaymentEvaluation.Outcome.type` +* Add support for `early_fraud_warning` and `fraudulent_dispute` on `Radar.PaymentEvaluation.Signal` +* ⚠️ Change type of `Radar.PaymentEvaluation.Signal.FraudulentPayment.score` from `number` to `nullable(number)` +* Add support for `pause_schedules` on `SubscriptionScheduleCreateParams`, `SubscriptionScheduleModifyParams`, and `SubscriptionSchedule` +* ⚠️ Change type of `SubscriptionModifyParams.billing_cycle_anchor` and `SubscriptionResumeParams.billing_cycle_anchor` from `enum('now'|'unchanged')` to `billing_cycle_anchor_param` +* Add support for `billing_cycle_anchor` on `Subscription.TrialSetting.EndBehavior`, `SubscriptionCreateParamsTrialSettingEndBehavior`, and `SubscriptionModifyParamsTrialSettingEndBehavior` +* Change `SubscriptionCreateParamsTrialSettingEndBehavior.missing_payment_method` and `SubscriptionModifyParamsTrialSettingEndBehavior.missing_payment_method` to be optional +* Add support for `payment_behavior` on `SubscriptionResumeParams` +* Add support for `cancel_at_period_end` on `Subscription.PendingUpdate` +* ⚠️ Remove support for `igic` on `Tax.Registration.CountryOption.At`, `Tax.Registration.CountryOption.Be`, `Tax.Registration.CountryOption.Bg`, `Tax.Registration.CountryOption.Cy`, `Tax.Registration.CountryOption.Cz`, `Tax.Registration.CountryOption.De`, `Tax.Registration.CountryOption.Dk`, `Tax.Registration.CountryOption.E`, `Tax.Registration.CountryOption.Ee`, `Tax.Registration.CountryOption.Fi`, `Tax.Registration.CountryOption.Fr`, `Tax.Registration.CountryOption.Gr`, `Tax.Registration.CountryOption.Hr`, `Tax.Registration.CountryOption.Hu`, `Tax.Registration.CountryOption.Ie`, `Tax.Registration.CountryOption.It`, `Tax.Registration.CountryOption.Lt`, `Tax.Registration.CountryOption.Lu`, `Tax.Registration.CountryOption.Lv`, `Tax.Registration.CountryOption.Mt`, `Tax.Registration.CountryOption.Nl`, `Tax.Registration.CountryOption.Pl`, `Tax.Registration.CountryOption.Pt`, `Tax.Registration.CountryOption.Ro`, `Tax.Registration.CountryOption.Se`, `Tax.Registration.CountryOption.Si`, `Tax.Registration.CountryOption.Sk`, `tax.RegistrationCreateParamsCountryOptionAt`, `tax.RegistrationCreateParamsCountryOptionBe`, `tax.RegistrationCreateParamsCountryOptionBg`, `tax.RegistrationCreateParamsCountryOptionCy`, `tax.RegistrationCreateParamsCountryOptionCz`, `tax.RegistrationCreateParamsCountryOptionDe`, `tax.RegistrationCreateParamsCountryOptionDk`, `tax.RegistrationCreateParamsCountryOptionE`, `tax.RegistrationCreateParamsCountryOptionEe`, `tax.RegistrationCreateParamsCountryOptionFi`, `tax.RegistrationCreateParamsCountryOptionFr`, `tax.RegistrationCreateParamsCountryOptionGr`, `tax.RegistrationCreateParamsCountryOptionHr`, `tax.RegistrationCreateParamsCountryOptionHu`, `tax.RegistrationCreateParamsCountryOptionIe`, `tax.RegistrationCreateParamsCountryOptionIt`, `tax.RegistrationCreateParamsCountryOptionLt`, `tax.RegistrationCreateParamsCountryOptionLu`, `tax.RegistrationCreateParamsCountryOptionLv`, `tax.RegistrationCreateParamsCountryOptionMt`, `tax.RegistrationCreateParamsCountryOptionNl`, `tax.RegistrationCreateParamsCountryOptionPl`, `tax.RegistrationCreateParamsCountryOptionPt`, `tax.RegistrationCreateParamsCountryOptionRo`, `tax.RegistrationCreateParamsCountryOptionSe`, `tax.RegistrationCreateParamsCountryOptionSi`, and `tax.RegistrationCreateParamsCountryOptionSk` +* Add support for `admissions_tax`, `attendance_tax`, `entertainment_tax`, `gross_receipts_tax`, `hospitality_tax`, `luxury_tax`, `resort_tax`, and `tourism_tax` on `Tax.Registration.CountryOption.Me` and `tax.RegistrationCreateParamsCountryOptionMe` +* Add support for new values `admissions_tax`, `attendance_tax`, `entertainment_tax`, `gross_receipts_tax`, `hospitality_tax`, `luxury_tax`, `resort_tax`, and `tourism_tax` on enums `Tax.Registration.CountryOption.Me.type` and `tax.RegistrationCreateParamsCountryOptionMe.type` +* Add support for `requirements` on `TaxCode` +* Add support for new value `rtp` on enum `Treasury.FinancialAccount.FinancialAddress.supported_networks` +* Add support for new value `rtp` on enum `treasury.ReceivedCreditCreateParams.network` +* Add support for new value `rtp` on enum `Treasury.ReceivedCredit.network` +* Add support for new values `apps.install.created`, `apps.install.deleted`, and `apps.install.updated` on enums `WebhookEndpointCreateParams.enabled_events` and `WebhookEndpointModifyParams.enabled_events` +* Add support for new value `2026-09-30.endive` on enum `WebhookEndpointCreateParams.api_version` +* ⚠️ Remove support for `configurations` on `V2.Core.AccountLink.UseCase.AccountOnboarding`, `V2.Core.AccountLink.UseCase.AccountUpdate`, `v2.core.AccountLinkCreateParamsUseCaseAccountOnboarding`, and `v2.core.AccountLinkCreateParamsUseCaseAccountUpdate` +* ⚠️ Add support for new value `rejected` on enums `V2.Core.Account.Configuration.Customer.Capability.AutomaticIndirectTax.status`, `V2.Core.Account.Configuration.Merchant.Capability.AchDebitPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.AcssDebitPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.AffirmPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.AfterpayClearpayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.AlmaPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.AmazonPayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.AuBecsDebitPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.BacsDebitPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.BancontactPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.BlikPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.BoletoPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.CardPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.CartesBancairesPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.CashappPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.EpsPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.FpxPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.GbBankTransferPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.GrabpayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.IdealPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.JcbPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.JpBankTransferPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.KakaoPayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.KlarnaPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.KonbiniPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.KrCardPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.LinkPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.MobilepayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.MultibancoPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.MxBankTransferPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.NaverPayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.OxxoPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.P24Payment.status`, `V2.Core.Account.Configuration.Merchant.Capability.PayByBankPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.PaycoPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.PaynowPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.PromptpayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.RevolutPayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.SamsungPayPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.SepaBankTransferPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.SepaDebitPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.StripeBalance.Payout.status`, `V2.Core.Account.Configuration.Merchant.Capability.SunbitPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.SwishPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.TwintPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.UsBankTransferPayment.status`, `V2.Core.Account.Configuration.Merchant.Capability.ZipPayment.status`, `V2.Core.Account.Configuration.Recipient.Capability.StripeBalance.Payout.status`, and `V2.Core.Account.Configuration.Recipient.Capability.StripeBalance.StripeTransfer.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.Customer.Capability.AutomaticIndirectTax.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.AchDebitPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.AcssDebitPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.AffirmPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.AfterpayClearpayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.AlmaPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.AmazonPayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.AuBecsDebitPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.BacsDebitPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.BancontactPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.BlikPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.BoletoPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.CardPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.CartesBancairesPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.CashappPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.EpsPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.FpxPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.GbBankTransferPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.GrabpayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.IdealPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.JcbPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.JpBankTransferPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.KakaoPayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.KlarnaPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.KonbiniPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.KrCardPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.LinkPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.MobilepayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.MultibancoPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.MxBankTransferPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.NaverPayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.OxxoPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.P24Payment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.PayByBankPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.PaycoPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.PaynowPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.PromptpayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.RevolutPayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.SamsungPayPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.SepaBankTransferPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.SepaDebitPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.StripeBalance.Payout.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.SunbitPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.SwishPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.TwintPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.UsBankTransferPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Merchant.Capability.ZipPayment.StatusDetail.code`, `V2.Core.Account.Configuration.Recipient.Capability.StripeBalance.Payout.StatusDetail.code`, and `V2.Core.Account.Configuration.Recipient.Capability.StripeBalance.StripeTransfer.StatusDetail.code` +* Add support for `satispay_payments` on `V2.Core.Account.Configuration.Merchant.Capability`, `v2.core.AccountCreateParamsConfigurationMerchantCapability`, and `v2.core.AccountModifyParamsConfigurationMerchantCapability` +* Add support for new values `invalid_address_cmra_address` and `invalid_address_registered_agent_address` on enums `V2.Core.Account.FutureRequirement.Entry.Error.code` and `V2.Core.Account.Requirement.Entry.Error.code` +* Add support for new values `blik_recurring_payments` and `satispay_payments` on enums `V2.Core.Account.FutureRequirement.Entry.Impact.RestrictsCapability.capability` and `V2.Core.Account.Requirement.Entry.Impact.RestrictsCapability.capability` +* Add support for `snapshot_event` on `V2.Core.Event` +* Add support for new values `blik_recurring_payments`, `satispay_payments`, and `sequra_payments` on enum `EventsV2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.updated_capability` +* Add support for snapshot events `apps.install.created`, `apps.install.deleted`, and `apps.install.updated` with resource `apps.Install` +* Add support for event notifications `V1AccountApplicationAuthorizedEvent`, `V1AccountApplicationDeauthorizedEvent`, `V1AccountExternalAccountCreatedEvent`, `V1AccountExternalAccountDeletedEvent`, `V1AccountExternalAccountUpdatedEvent`, `V1BillingPortalSessionCreatedEvent`, and `V1EntitlementsActiveEntitlementSummaryUpdatedEvent` +* Add support for event notification `V1AccountUpdatedEvent` with related object `Account` +* Add support for event notifications `V1ApplicationFeeCreatedEvent` and `V1ApplicationFeeRefundedEvent` with related object `ApplicationFee` +* Add support for event notification `V1ApplicationFeeRefundUpdatedEvent` with related object `ApplicationFeeRefund` +* Add support for event notification `V1BalanceAvailableEvent` with related object `Balance` +* Add support for event notification `V1BalanceSettingsUpdatedEvent` with related object `BalanceSettings` +* Add support for event notification `V1BillingAlertTriggeredEvent` with related object `billing.Alert` +* Add support for event notification `V1BillingCreditBalanceTransactionCreatedEvent` with related object `billing.CreditBalanceTransaction` +* Add support for event notifications `V1BillingCreditGrantCreatedEvent` and `V1BillingCreditGrantUpdatedEvent` with related object `billing.CreditGrant` +* Add support for event notifications `V1BillingMeterCreatedEvent`, `V1BillingMeterDeactivatedEvent`, `V1BillingMeterReactivatedEvent`, and `V1BillingMeterUpdatedEvent` with related object `billing.Meter` +* Add support for event notifications `V1BillingPortalConfigurationCreatedEvent` and `V1BillingPortalConfigurationUpdatedEvent` with related object `billing_portal.Configuration` +* Add support for event notification `V1CapabilityUpdatedEvent` with related object `Capability` +* Add support for event notification `V1CashBalanceFundsAvailableEvent` with related object `CashBalance` +* Add support for event notifications `V1ChargeCapturedEvent`, `V1ChargeExpiredEvent`, `V1ChargeFailedEvent`, `V1ChargePendingEvent`, `V1ChargeRefundedEvent`, `V1ChargeSucceededEvent`, and `V1ChargeUpdatedEvent` with related object `Charge` +* Add support for event notifications `V1ChargeDisputeClosedEvent`, `V1ChargeDisputeCreatedEvent`, `V1ChargeDisputeFundsReinstatedEvent`, `V1ChargeDisputeFundsWithdrawnEvent`, and `V1ChargeDisputeUpdatedEvent` with related object `Dispute` +* Add support for event notifications `V1ChargeRefundUpdatedEvent`, `V1RefundCreatedEvent`, `V1RefundFailedEvent`, and `V1RefundUpdatedEvent` with related object `Refund` +* Add support for event notifications `V1CheckoutSessionAsyncPaymentFailedEvent`, `V1CheckoutSessionAsyncPaymentSucceededEvent`, `V1CheckoutSessionCompletedEvent`, and `V1CheckoutSessionExpiredEvent` with related object `checkout.Session` +* Add support for event notifications `V1ClimateOrderCanceledEvent`, `V1ClimateOrderCreatedEvent`, `V1ClimateOrderDelayedEvent`, `V1ClimateOrderDeliveredEvent`, and `V1ClimateOrderProductSubstitutedEvent` with related object `climate.Order` +* Add support for event notifications `V1ClimateProductCreatedEvent` and `V1ClimateProductPricingUpdatedEvent` with related object `climate.Product` +* Add support for event notifications `V1CouponCreatedEvent`, `V1CouponDeletedEvent`, and `V1CouponUpdatedEvent` with related object `Coupon` +* Add support for event notifications `V1CreditNoteCreatedEvent`, `V1CreditNoteUpdatedEvent`, and `V1CreditNoteVoidedEvent` with related object `CreditNote` +* Add support for event notifications `V1CustomerCreatedEvent`, `V1CustomerDeletedEvent`, and `V1CustomerUpdatedEvent` with related object `Customer` +* Add support for event notifications `V1CustomerDiscountCreatedEvent`, `V1CustomerDiscountDeletedEvent`, and `V1CustomerDiscountUpdatedEvent` with related object `Discount` +* Add support for event notifications `V1CustomerSubscriptionCreatedEvent`, `V1CustomerSubscriptionDeletedEvent`, `V1CustomerSubscriptionPausedEvent`, `V1CustomerSubscriptionPendingUpdateAppliedEvent`, `V1CustomerSubscriptionPendingUpdateExpiredEvent`, `V1CustomerSubscriptionResumedEvent`, `V1CustomerSubscriptionTrialWillEndEvent`, and `V1CustomerSubscriptionUpdatedEvent` with related object `Subscription` +* Add support for event notifications `V1CustomerTaxIdCreatedEvent`, `V1CustomerTaxIdDeletedEvent`, and `V1CustomerTaxIdUpdatedEvent` with related object `TaxId` +* Add support for event notification `V1CustomerCashBalanceTransactionCreatedEvent` with related object `CustomerCashBalanceTransaction` +* Add support for event notification `V1FileCreatedEvent` with related object `File` +* Add support for event notifications `V1FinancialConnectionsAccountAccountNumbersUpdatedEvent`, `V1FinancialConnectionsAccountCreatedEvent`, `V1FinancialConnectionsAccountDeactivatedEvent`, `V1FinancialConnectionsAccountDisconnectedEvent`, `V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent`, `V1FinancialConnectionsAccountReactivatedEvent`, `V1FinancialConnectionsAccountRefreshedBalanceEvent`, `V1FinancialConnectionsAccountRefreshedOwnershipEvent`, `V1FinancialConnectionsAccountRefreshedTransactionsEvent`, `V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent`, `V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent`, and `V1FinancialConnectionsAccountUpcomingDeactivationEvent` with related object `financial_connections.Account` +* Add support for event notifications `V1IdentityVerificationSessionCanceledEvent`, `V1IdentityVerificationSessionCreatedEvent`, `V1IdentityVerificationSessionProcessingEvent`, `V1IdentityVerificationSessionRedactedEvent`, `V1IdentityVerificationSessionRequiresInputEvent`, and `V1IdentityVerificationSessionVerifiedEvent` with related object `identity.VerificationSession` +* Add support for event notifications `V1InvoiceCreatedEvent`, `V1InvoiceDeletedEvent`, `V1InvoiceFinalizationFailedEvent`, `V1InvoiceFinalizedEvent`, `V1InvoiceMarkedUncollectibleEvent`, `V1InvoiceOverdueEvent`, `V1InvoiceOverpaidEvent`, `V1InvoicePaidEvent`, `V1InvoicePaymentActionRequiredEvent`, `V1InvoicePaymentAttemptRequiredEvent`, `V1InvoicePaymentFailedEvent`, `V1InvoicePaymentSucceededEvent`, `V1InvoiceSentEvent`, `V1InvoiceUpcomingEvent`, `V1InvoiceUpdatedEvent`, `V1InvoiceVoidedEvent`, and `V1InvoiceWillBeDueEvent` with related object `Invoice` +* Add support for event notification `V1InvoicePaymentPaidEvent` with related object `InvoicePayment` +* Add support for event notifications `V1InvoiceitemCreatedEvent` and `V1InvoiceitemDeletedEvent` with related object `InvoiceItem` +* Add support for event notifications `V1IssuingAuthorizationCreatedEvent`, `V1IssuingAuthorizationRequestEvent`, and `V1IssuingAuthorizationUpdatedEvent` with related object `issuing.Authorization` +* Add support for event notifications `V1IssuingCardCreatedEvent` and `V1IssuingCardUpdatedEvent` with related object `issuing.Card` +* Add support for event notifications `V1IssuingCardholderCreatedEvent` and `V1IssuingCardholderUpdatedEvent` with related object `issuing.Cardholder` +* Add support for event notifications `V1IssuingDisputeClosedEvent`, `V1IssuingDisputeCreatedEvent`, `V1IssuingDisputeFundsReinstatedEvent`, `V1IssuingDisputeFundsRescindedEvent`, `V1IssuingDisputeSubmittedEvent`, and `V1IssuingDisputeUpdatedEvent` with related object `issuing.Dispute` +* Add support for event notifications `V1IssuingPersonalizationDesignActivatedEvent`, `V1IssuingPersonalizationDesignDeactivatedEvent`, `V1IssuingPersonalizationDesignRejectedEvent`, and `V1IssuingPersonalizationDesignUpdatedEvent` with related object `issuing.PersonalizationDesign` +* Add support for event notifications `V1IssuingTokenCreatedEvent` and `V1IssuingTokenUpdatedEvent` with related object `issuing.Token` +* Add support for event notifications `V1IssuingTransactionCreatedEvent`, `V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent`, and `V1IssuingTransactionUpdatedEvent` with related object `issuing.Transaction` +* Add support for event notification `V1MandateUpdatedEvent` with related object `Mandate` +* Add support for event notifications `V1PaymentIntentAmountCapturableUpdatedEvent`, `V1PaymentIntentCanceledEvent`, `V1PaymentIntentCreatedEvent`, `V1PaymentIntentPartiallyFundedEvent`, `V1PaymentIntentPaymentFailedEvent`, `V1PaymentIntentProcessingEvent`, `V1PaymentIntentRequiresActionEvent`, and `V1PaymentIntentSucceededEvent` with related object `PaymentIntent` +* Add support for event notifications `V1PaymentLinkCreatedEvent` and `V1PaymentLinkUpdatedEvent` with related object `PaymentLink` +* Add support for event notifications `V1PaymentMethodAttachedEvent`, `V1PaymentMethodAutomaticallyUpdatedEvent`, `V1PaymentMethodDetachedEvent`, and `V1PaymentMethodUpdatedEvent` with related object `PaymentMethod` +* Add support for event notifications `V1PayoutCanceledEvent`, `V1PayoutCreatedEvent`, `V1PayoutFailedEvent`, `V1PayoutPaidEvent`, `V1PayoutReconciliationCompletedEvent`, and `V1PayoutUpdatedEvent` with related object `Payout` +* Add support for event notifications `V1PersonCreatedEvent`, `V1PersonDeletedEvent`, and `V1PersonUpdatedEvent` with related object `Person` +* Add support for event notifications `V1PlanCreatedEvent`, `V1PlanDeletedEvent`, and `V1PlanUpdatedEvent` with related object `Plan` +* Add support for event notifications `V1PriceCreatedEvent`, `V1PriceDeletedEvent`, and `V1PriceUpdatedEvent` with related object `Price` +* Add support for event notifications `V1ProductCreatedEvent`, `V1ProductDeletedEvent`, and `V1ProductUpdatedEvent` with related object `Product` +* Add support for event notifications `V1PromotionCodeCreatedEvent` and `V1PromotionCodeUpdatedEvent` with related object `PromotionCode` +* Add support for event notifications `V1QuoteAcceptedEvent`, `V1QuoteCanceledEvent`, `V1QuoteCreatedEvent`, and `V1QuoteFinalizedEvent` with related object `Quote` +* Add support for event notifications `V1RadarEarlyFraudWarningCreatedEvent` and `V1RadarEarlyFraudWarningUpdatedEvent` with related object `radar.EarlyFraudWarning` +* Add support for event notifications `V1ReviewClosedEvent` and `V1ReviewOpenedEvent` with related object `Review` +* Add support for event notifications `V1SetupIntentCanceledEvent`, `V1SetupIntentCreatedEvent`, `V1SetupIntentRequiresActionEvent`, `V1SetupIntentSetupFailedEvent`, and `V1SetupIntentSucceededEvent` with related object `SetupIntent` +* Add support for event notification `V1SigmaScheduledQueryRunCreatedEvent` with related object `sigma.ScheduledQueryRun` +* Add support for event notifications `V1SourceCanceledEvent`, `V1SourceChargeableEvent`, `V1SourceFailedEvent`, and `V1SourceRefundAttributesRequiredEvent` with related object `Source` +* Add support for event notifications `V1SubscriptionScheduleAbortedEvent`, `V1SubscriptionScheduleCanceledEvent`, `V1SubscriptionScheduleCompletedEvent`, `V1SubscriptionScheduleCreatedEvent`, `V1SubscriptionScheduleExpiringEvent`, `V1SubscriptionScheduleReleasedEvent`, and `V1SubscriptionScheduleUpdatedEvent` with related object `SubscriptionSchedule` +* Add support for event notification `V1TaxSettingsUpdatedEvent` with related object `tax.Settings` +* Add support for event notifications `V1TaxRateCreatedEvent` and `V1TaxRateUpdatedEvent` with related object `TaxRate` +* Add support for event notifications `V1TerminalReaderActionFailedEvent`, `V1TerminalReaderActionSucceededEvent`, and `V1TerminalReaderActionUpdatedEvent` with related object `terminal.Reader` +* Add support for event notifications `V1TestHelpersTestClockAdvancingEvent`, `V1TestHelpersTestClockCreatedEvent`, `V1TestHelpersTestClockDeletedEvent`, `V1TestHelpersTestClockInternalFailureEvent`, and `V1TestHelpersTestClockReadyEvent` with related object `test_helpers.TestClock` +* Add support for event notifications `V1TopupCanceledEvent`, `V1TopupCreatedEvent`, `V1TopupFailedEvent`, `V1TopupReversedEvent`, and `V1TopupSucceededEvent` with related object `Topup` +* Add support for event notifications `V1TransferCreatedEvent`, `V1TransferReversedEvent`, and `V1TransferUpdatedEvent` with related object `Transfer` +* Add support for error codes `dispute_evidence_page_limit_exceeded`, `financial_connections_consent_locale_invalid`, `financial_connections_consent_locale_unsupported`, and `payment_evaluation_on_api_version_not_supported` on `Invoice.LastFinalizationError`, `PaymentIntent.LastPaymentError`, `SetupAttempt.SetupError`, `SetupIntent.LastSetupError`, `StripeError`, and `Terminal.Reader.Action.ApiError` diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 308945cbf..316bdd23b 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -baff58c9d515cdd5f5c3231d101989d588788c6f \ No newline at end of file +adad04916772f880317eac10d8c026b401863f1d \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 28d67d2bf..bfaa37da3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2442 \ No newline at end of file +v2526 \ No newline at end of file diff --git a/stripe/__init__.py b/stripe/__init__.py index 3221f5871..d5124858a 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -129,6 +129,7 @@ def set_app_info( identity as identity, issuing as issuing, params as params, + product_catalog as product_catalog, radar as radar, reporting as reporting, reserve as reserve, @@ -136,6 +137,7 @@ def set_app_info( tax as tax, terminal as terminal, test_helpers as test_helpers, + three_d_secure as three_d_secure, treasury as treasury, v2 as v2, ) @@ -421,6 +423,9 @@ def set_app_info( from stripe._price import Price as Price from stripe._price_service import PriceService as PriceService from stripe._product import Product as Product + from stripe._product_catalog_service import ( + ProductCatalogService as ProductCatalogService, + ) from stripe._product_feature import ProductFeature as ProductFeature from stripe._product_feature_service import ( ProductFeatureService as ProductFeatureService, @@ -447,7 +452,6 @@ def set_app_info( from stripe._reserve_transaction import ( ReserveTransaction as ReserveTransaction, ) - from stripe._transfer_reversal import TransferReversal as TransferReversal from stripe._review import Review as Review from stripe._review_service import ReviewService as ReviewService from stripe._search_result_object import ( @@ -523,11 +527,15 @@ def set_app_info( 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, ) @@ -566,6 +574,7 @@ def set_app_info( "identity": ("stripe.identity", True), "issuing": ("stripe.issuing", True), "params": ("stripe.params", True), + "product_catalog": ("stripe.product_catalog", True), "radar": ("stripe.radar", True), "reporting": ("stripe.reporting", True), "reserve": ("stripe.reserve", True), @@ -573,6 +582,7 @@ def set_app_info( "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), @@ -816,6 +826,7 @@ def set_app_info( "Price": ("stripe._price", False), "PriceService": ("stripe._price_service", False), "Product": ("stripe._product", False), + "ProductCatalogService": ("stripe._product_catalog_service", False), "ProductFeature": ("stripe._product_feature", False), "ProductFeatureService": ("stripe._product_feature_service", False), "ProductService": ("stripe._product_service", False), @@ -835,7 +846,6 @@ def set_app_info( "RequestOptions": ("stripe._request_options", False), "RequestorOptions": ("stripe._requestor_options", False), "ReserveTransaction": ("stripe._reserve_transaction", False), - "TransferReversal": ("stripe._transfer_reversal", False), "Review": ("stripe._review", False), "ReviewService": ("stripe._review_service", False), "SearchResultObject": ("stripe._search_result_object", False), @@ -883,11 +893,13 @@ def set_app_info( "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), "TreasuryService": ("stripe._treasury_service", False), diff --git a/stripe/_account.py b/stripe/_account.py index 3fe1d9c17..ac0113ddb 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -189,6 +189,10 @@ class SupportAddress(StripeObject): """ Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. """ + specified_commercial_transactions_act_url: Optional[str] + """ + A link to the business's publicly available terms related to the Specified Commercial Transaction Act. Only used for accounts in Japan. + """ support_address: Optional[SupportAddress] """ A publicly available mailing address for sending support issues to. @@ -294,6 +298,12 @@ class Capabilities(StripeObject): """ The status of the blik payments capability of the account, or whether the account can directly process blik charges. """ + blik_recurring_payments: Optional[ + Union[Literal["active", "inactive", "pending"], str] + ] + """ + The status of the BLIK recurring payments capability of the account, or whether the account can accept recurring and subscription BLIK payments. + """ boleto_payments: Optional[ Union[Literal["active", "inactive", "pending"], str] ] @@ -486,6 +496,12 @@ class Capabilities(StripeObject): """ The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. """ + paypay_payments: Optional[ + Union[Literal["active", "inactive", "pending"], str] + ] + """ + The status of the Paypay capability of the account, or whether the account can directly process Paypay payments. + """ payto_payments: Optional[ Union[Literal["active", "inactive", "pending"], str] ] @@ -540,6 +556,12 @@ class Capabilities(StripeObject): """ The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. """ + sequra_payments: Optional[ + Union[Literal["active", "inactive", "pending"], str] + ] + """ + The status of the SeQura capability of the account, or whether the account can directly process SeQura payments. + """ sofort_payments: Optional[ Union[Literal["active", "inactive", "pending"], str] ] @@ -812,7 +834,7 @@ class Verification(StripeObject): class Document(StripeObject): back: Optional[ExpandableField["File"]] """ - The back of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `additional_verification`. Note that `additional_verification` files are [not downloadable](https://docs.stripe.com/file-upload#uploading-a-file). + The back of a document returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `additional_verification`. Note that `additional_verification` files are [not downloadable](https://docs.stripe.com/file-upload#uploading-a-file). """ details: Optional[str] """ @@ -824,7 +846,7 @@ class Document(StripeObject): """ front: Optional[ExpandableField["File"]] """ - The front of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `additional_verification`. Note that `additional_verification` files are [not downloadable](https://docs.stripe.com/file-upload#uploading-a-file). + The front of a document returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `additional_verification`. Note that `additional_verification` files are [not downloadable](https://docs.stripe.com/file-upload#uploading-a-file). """ document: Document @@ -1030,8 +1052,10 @@ class Error(StripeObject): "external_request", "information_missing", "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", @@ -1211,8 +1235,10 @@ class Error(StripeObject): "external_request", "information_missing", "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", @@ -1538,6 +1564,53 @@ class Schedule(StripeObject): """ _inner_class_types = {"schedule": Schedule} + class PaypayPayments(StripeObject): + class Site(StripeObject): + class Accessible(StripeObject): + pass + + class InDevelopment(StripeObject): + password_provided: Optional[bool] + """ + Field to indicate that the website password has been provided. + """ + username: Optional[str] + """ + The username needed to access your business's website. + """ + + class Restricted(StripeObject): + payment_flow_file: Optional[str] + """ + File explaining the payment flow for your business. + """ + + accessible: Optional[Accessible] + in_development: Optional[InDevelopment] + restricted: Optional[Restricted] + type: Optional[ + Literal["accessible", "in_development", "restricted"] + ] + """ + The status of your business's website. + """ + _inner_class_types = { + "accessible": Accessible, + "in_development": InDevelopment, + "restricted": Restricted, + } + + additional_files: Optional[List[str]] + """ + Additional files that are required to support the onboarding process of your business. + """ + goods_type: Optional[Literal["digital_content", "other"]] + """ + The type of goods your business sells. Use `digital_content` if you sell digital content. Use `other` for all other types of goods or services. + """ + site: Optional[Site] + _inner_class_types = {"site": Site} + class SepaDebitPayments(StripeObject): creditor_id: Optional[str] """ @@ -1570,6 +1643,7 @@ class TosAcceptance(StripeObject): invoices: Optional[Invoices] payments: Payments payouts: Optional[Payouts] + paypay_payments: Optional[PaypayPayments] sepa_debit_payments: Optional[SepaDebitPayments] treasury: Optional[Treasury] _inner_class_types = { @@ -1581,6 +1655,7 @@ class TosAcceptance(StripeObject): "invoices": Invoices, "payments": Payments, "payouts": Payouts, + "paypay_payments": PaypayPayments, "sepa_debit_payments": SepaDebitPayments, "treasury": Treasury, } diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 41b06bcd0..2c5ae1d7c 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -542,7 +542,7 @@ def create( cls, **params: Unpack["AccountSessionCreateParams"] ) -> "AccountSession": """ - Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. + Creates an AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. """ return cast( "AccountSession", @@ -558,7 +558,7 @@ async def create_async( cls, **params: Unpack["AccountSessionCreateParams"] ) -> "AccountSession": """ - Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. + Creates an AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. """ return cast( "AccountSession", diff --git a/stripe/_account_session_service.py b/stripe/_account_session_service.py index c0013cc7f..fca00c23c 100644 --- a/stripe/_account_session_service.py +++ b/stripe/_account_session_service.py @@ -19,7 +19,7 @@ def create( options: Optional["RequestOptions"] = None, ) -> "AccountSession": """ - Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. + Creates an AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. """ return cast( "AccountSession", @@ -38,7 +38,7 @@ async def create_async( options: Optional["RequestOptions"] = None, ) -> "AccountSession": """ - Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. + Creates an AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. """ return cast( "AccountSession", diff --git a/stripe/_api_version.py b/stripe/_api_version.py index 2ceb9ee92..f07003b47 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-08-26.dahlia" - CURRENT_MAJOR = "dahlia" + CURRENT = "2026-09-30.endive" + CURRENT_MAJOR = "endive" 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.py b/stripe/_balance.py index e92b86349..b0d1ef30b 100644 --- a/stripe/_balance.py +++ b/stripe/_balance.py @@ -256,7 +256,7 @@ class SourceTypes(StripeObject): available: List[Available] """ - Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://api.stripe.com#transfers) or [Payouts API](https://api.stripe.com#payouts). You can find the available balance for each currency and payment type in the `source_types` property. + Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://docs.stripe.com/api#transfers) or [Payouts API](https://docs.stripe.com/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. """ connect_reserved: Optional[List[ConnectReserved]] """ diff --git a/stripe/_balance_transaction.py b/stripe/_balance_transaction.py index 22d0ab50d..40be50da9 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._transfer_reversal import TransferReversal 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 @@ -176,6 +176,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", @@ -213,7 +215,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 f4fe4e97b..2d1720741 100644 --- a/stripe/_bank_account.py +++ b/stripe/_bank_account.py @@ -42,8 +42,10 @@ class Error(StripeObject): "external_request", "information_missing", "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", @@ -173,8 +175,10 @@ class Error(StripeObject): "external_request", "information_missing", "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", diff --git a/stripe/_capability.py b/stripe/_capability.py index 4b39787c4..eb6527fc7 100644 --- a/stripe/_capability.py +++ b/stripe/_capability.py @@ -34,8 +34,10 @@ class Error(StripeObject): "external_request", "information_missing", "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", @@ -207,8 +209,10 @@ class Error(StripeObject): "external_request", "information_missing", "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", diff --git a/stripe/_charge.py b/stripe/_charge.py index 094ffe400..9597ea161 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -61,7 +61,7 @@ class Charge( """ The `Charge` object represents a single attempt to move money into your Stripe account. PaymentIntent confirmation is the most common way to create Charges, but [Account Debits](https://docs.stripe.com/connect/account-debits) may also create Charges. - Some legacy payment flows create Charges directly, which is not recommended for new integrations. + The create and capture methods are deprecated and will be deleted soon. If your integration uses either of them, you need to update it to use a different payment flow, such as [the Payment Intents API](https://docs.stripe.com/payments/payment-intents). """ OBJECT_NAME: ClassVar[Literal["charge"]] = "charge" @@ -867,6 +867,10 @@ class ShippingAddress(StripeObject): """ A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) """ + electronic_commerce_indicator: Optional[str] + """ + The Electronic Commerce Indicator (ECI) returned by the card network in the authorization response. Indicates the level of authentication used. Only populated for Visa and Mastercard transactions. This is the network's final ECI and can differ from the request value. An authenticated ECI alone doesn't determine liability shift. + """ exp_month: int """ Two-digit number representing the card's expiration month. @@ -905,7 +909,7 @@ class ShippingAddress(StripeObject): """ The last four digits of the card. """ - mandate: Optional[str] + mandate: Optional[ExpandableField["Mandate"]] """ ID of the mandate used to make this payment or created by it. """ @@ -1873,6 +1877,9 @@ class SellerProtection(StripeObject): """ _inner_class_types = {"seller_protection": SellerProtection} + class Paypay(StripeObject): + pass + class Payto(StripeObject): bsb_number: Optional[str] """ @@ -2019,6 +2026,12 @@ class SepaDebit(StripeObject): Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://docs.stripe.com/api/mandates/retrieve). """ + class Sequra(StripeObject): + transaction_id: Optional[str] + """ + The SeQura transaction ID associated with this payment. + """ + class Sofort(StripeObject): bank_code: Optional[str] """ @@ -2202,6 +2215,7 @@ class Zip(StripeObject): payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] + paypay: Optional[Paypay] payto: Optional[Payto] pix: Optional[Pix] promptpay: Optional[Promptpay] @@ -2211,6 +2225,7 @@ class Zip(StripeObject): scalapay: Optional[Scalapay] sepa_credit_transfer: Optional[SepaCreditTransfer] sepa_debit: Optional[SepaDebit] + sequra: Optional[Sequra] sofort: Optional[Sofort] stripe_account: Optional[StripeAccount] sunbit: Optional[Sunbit] @@ -2270,6 +2285,7 @@ class Zip(StripeObject): "payco": Payco, "paynow": Paynow, "paypal": Paypal, + "paypay": Paypay, "payto": Payto, "pix": Pix, "promptpay": Promptpay, @@ -2279,6 +2295,7 @@ class Zip(StripeObject): "scalapay": Scalapay, "sepa_credit_transfer": SepaCreditTransfer, "sepa_debit": SepaDebit, + "sequra": Sequra, "sofort": Sofort, "stripe_account": StripeAccount, "sunbit": Sunbit, @@ -2556,11 +2573,7 @@ def _cls_capture( cls, charge: str, /, **params: Unpack["ChargeCaptureParams"] ) -> "Charge": """ - Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. - - Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. - - Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture). + 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). """ return cast( "Charge", @@ -2579,33 +2592,21 @@ def capture( charge: str, /, **params: Unpack["ChargeCaptureParams"] ) -> "Charge": """ - Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. - - Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. - - Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture). + 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). """ ... @overload def capture(self, **params: Unpack["ChargeCaptureParams"]) -> "Charge": """ - Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. - - Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. - - Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture). + 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). """ ... @class_method_variant("_cls_capture") def capture(self, **params: Unpack["ChargeCaptureParams"]) -> "Charge": """ - Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. - - Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. - - Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture). + 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). """ return cast( "Charge", @@ -2623,11 +2624,7 @@ async def _cls_capture_async( cls, charge: str, /, **params: Unpack["ChargeCaptureParams"] ) -> "Charge": """ - Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. - - Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. - - Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture). + 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). """ return cast( "Charge", @@ -2646,11 +2643,7 @@ async def capture_async( charge: str, /, **params: Unpack["ChargeCaptureParams"] ) -> "Charge": """ - Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. - - Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. - - Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture). + 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). """ ... @@ -2659,11 +2652,7 @@ async def capture_async( self, **params: Unpack["ChargeCaptureParams"] ) -> "Charge": """ - Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. - - Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. - - Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture). + 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). """ ... @@ -2672,11 +2661,7 @@ async def capture_async( self, **params: Unpack["ChargeCaptureParams"] ) -> "Charge": """ - Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. - - Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. - - Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture). + 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). """ return cast( "Charge", @@ -2692,9 +2677,7 @@ async def capture_async( @classmethod def create(cls, **params: Unpack["ChargeCreateParams"]) -> "Charge": """ - This method is no longer recommended—use the [Payment Intents API](https://docs.stripe.com/docs/api/payment_intents) - to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge - object used to request payment. + 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). """ return cast( "Charge", @@ -2710,9 +2693,7 @@ async def create_async( cls, **params: Unpack["ChargeCreateParams"] ) -> "Charge": """ - This method is no longer recommended—use the [Payment Intents API](https://docs.stripe.com/docs/api/payment_intents) - to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge - object used to request payment. + 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). """ return cast( "Charge", diff --git a/stripe/_charge_service.py b/stripe/_charge_service.py index a0acadb50..46914d056 100644 --- a/stripe/_charge_service.py +++ b/stripe/_charge_service.py @@ -63,9 +63,7 @@ def create( options: Optional["RequestOptions"] = None, ) -> "Charge": """ - This method is no longer recommended—use the [Payment Intents API](https://docs.stripe.com/docs/api/payment_intents) - to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge - object used to request payment. + 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). """ return cast( "Charge", @@ -84,9 +82,7 @@ async def create_async( options: Optional["RequestOptions"] = None, ) -> "Charge": """ - This method is no longer recommended—use the [Payment Intents API](https://docs.stripe.com/docs/api/payment_intents) - to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge - object used to request payment. + 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). """ return cast( "Charge", @@ -235,11 +231,7 @@ def capture( options: Optional["RequestOptions"] = None, ) -> "Charge": """ - Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. - - Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. - - Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture). + 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). """ return cast( "Charge", @@ -262,11 +254,7 @@ async def capture_async( options: Optional["RequestOptions"] = None, ) -> "Charge": """ - Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. - - Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. - - Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture). + 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). """ return cast( "Charge", diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 99c03d248..41616ff39 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -1320,6 +1320,9 @@ class Paypal(StripeObject): PayPal account PayerID. This identifier uniquely identifies the PayPal customer. """ + class Paypay(StripeObject): + pass + class Payto(StripeObject): bsb_number: Optional[str] """ @@ -1392,6 +1395,9 @@ class GeneratedFrom(StripeObject): """ _inner_class_types = {"generated_from": GeneratedFrom} + class Sequra(StripeObject): + pass + class Sofort(StripeObject): country: Optional[str] """ @@ -1570,6 +1576,7 @@ class Zip(StripeObject): payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] + paypay: Optional[Paypay] payto: Optional[Payto] pix: Optional[Pix] promptpay: Optional[Promptpay] @@ -1578,6 +1585,7 @@ class Zip(StripeObject): satispay: Optional[Satispay] scalapay: Optional[Scalapay] sepa_debit: Optional[SepaDebit] + sequra: Optional[Sequra] sofort: Optional[Sofort] sunbit: Optional[Sunbit] swish: Optional[Swish] @@ -1625,6 +1633,7 @@ class Zip(StripeObject): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -1633,6 +1642,7 @@ class Zip(StripeObject): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -1693,6 +1703,7 @@ class Zip(StripeObject): "payco": Payco, "paynow": Paynow, "paypal": Paypal, + "paypay": Paypay, "payto": Payto, "pix": Pix, "promptpay": Promptpay, @@ -1701,6 +1712,7 @@ class Zip(StripeObject): "satispay": Satispay, "scalapay": Scalapay, "sepa_debit": SepaDebit, + "sequra": Sequra, "sofort": Sofort, "sunbit": Sunbit, "swish": Swish, diff --git a/stripe/_coupon.py b/stripe/_coupon.py index 41291065c..df762d319 100644 --- a/stripe/_coupon.py +++ b/stripe/_coupon.py @@ -26,8 +26,8 @@ class Coupon( ): """ A coupon contains information about a percent-off or amount-off discount you - might want to apply to a customer. Coupons may be applied to [subscriptions](https://api.stripe.com#subscriptions), [invoices](https://api.stripe.com#invoices), - [checkout sessions](https://docs.stripe.com/api/checkout/sessions), [quotes](https://api.stripe.com#quotes), and more. Coupons do not work with conventional one-off [charges](https://docs.stripe.com/api/charges/create) or [payment intents](https://docs.stripe.com/api/payment_intents). + might want to apply to a customer. Coupons may be applied to [subscriptions](https://docs.stripe.com/api#subscriptions), [invoices](https://docs.stripe.com/api#invoices), + [checkout sessions](https://docs.stripe.com/api/checkout/sessions), [quotes](https://docs.stripe.com/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://docs.stripe.com/api/charges/create) or [payment intents](https://docs.stripe.com/api/payment_intents). """ OBJECT_NAME: ClassVar[Literal["coupon"]] = "coupon" diff --git a/stripe/_customer.py b/stripe/_customer.py index fcdf05969..d871cb332 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -297,7 +297,7 @@ class Location(StripeObject): address: Optional[Address] """ - The customer's address. + The customer's billing address. """ balance: Optional[int] """ diff --git a/stripe/_discount.py b/stripe/_discount.py index 3f034e979..c8f55f2d5 100644 --- a/stripe/_discount.py +++ b/stripe/_discount.py @@ -13,7 +13,7 @@ class Discount(StripeObject): """ - A discount represents the actual application of a [coupon](https://api.stripe.com#coupons) or [promotion code](https://api.stripe.com#promotion_codes). + A discount represents the actual application of a [coupon](https://docs.stripe.com/api#coupons) or [promotion code](https://docs.stripe.com/api#promotion_codes). It contains information about when the discount began, when it will end, and what it is applied to. Related guide: [Applying discounts to subscriptions](https://docs.stripe.com/billing/subscriptions/discounts) diff --git a/stripe/_error_object.py b/stripe/_error_object.py index 4cc563123..37998e7b3 100644 --- a/stripe/_error_object.py +++ b/stripe/_error_object.py @@ -17,7 +17,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.py b/stripe/_event.py index 66cbdb1d1..9cfbf5e6b 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -38,7 +38,7 @@ class Event(ListableAPIResource["Event"]): class Data(StripeObject): object: UntypedStripeObject[Any] """ - Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://api.stripe.com#invoice_object) as the value of the object key. + Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://docs.stripe.com/api#invoice_object) as the value of the object key. """ previous_attributes: Optional[UntypedStripeObject[Any]] """ @@ -102,6 +102,9 @@ class Request(StripeObject): "application_fee.created", "application_fee.refund.updated", "application_fee.refunded", + "apps.install.created", + "apps.install.deleted", + "apps.install.updated", "balance.available", "balance_settings.updated", "billing.alert.triggered", diff --git a/stripe/_event_notification_handler.py b/stripe/_event_notification_handler.py index d47602588..9988213f8 100644 --- a/stripe/_event_notification_handler.py +++ b/stripe/_event_notification_handler.py @@ -39,12 +39,660 @@ from stripe._stripe_client import StripeClient # event-notification-types: The beginning of the section generated from our OpenAPI spec + from stripe.events._v1_account_application_authorized_event import ( + V1AccountApplicationAuthorizedEventNotification, + ) + from stripe.events._v1_account_application_deauthorized_event import ( + V1AccountApplicationDeauthorizedEventNotification, + ) + from stripe.events._v1_account_external_account_created_event import ( + V1AccountExternalAccountCreatedEventNotification, + ) + from stripe.events._v1_account_external_account_deleted_event import ( + V1AccountExternalAccountDeletedEventNotification, + ) + from stripe.events._v1_account_external_account_updated_event import ( + V1AccountExternalAccountUpdatedEventNotification, + ) + from stripe.events._v1_account_updated_event import ( + V1AccountUpdatedEventNotification, + ) + from stripe.events._v1_application_fee_created_event import ( + V1ApplicationFeeCreatedEventNotification, + ) + from stripe.events._v1_application_fee_refunded_event import ( + V1ApplicationFeeRefundedEventNotification, + ) + from stripe.events._v1_application_fee_refund_updated_event import ( + V1ApplicationFeeRefundUpdatedEventNotification, + ) + from stripe.events._v1_balance_available_event import ( + V1BalanceAvailableEventNotification, + ) + from stripe.events._v1_balance_settings_updated_event import ( + V1BalanceSettingsUpdatedEventNotification, + ) + from stripe.events._v1_billing_alert_triggered_event import ( + V1BillingAlertTriggeredEventNotification, + ) + from stripe.events._v1_billing_credit_balance_transaction_created_event import ( + V1BillingCreditBalanceTransactionCreatedEventNotification, + ) + from stripe.events._v1_billing_credit_grant_created_event import ( + V1BillingCreditGrantCreatedEventNotification, + ) + from stripe.events._v1_billing_credit_grant_updated_event import ( + V1BillingCreditGrantUpdatedEventNotification, + ) + from stripe.events._v1_billing_meter_created_event import ( + V1BillingMeterCreatedEventNotification, + ) + from stripe.events._v1_billing_meter_deactivated_event import ( + V1BillingMeterDeactivatedEventNotification, + ) from stripe.events._v1_billing_meter_error_report_triggered_event import ( V1BillingMeterErrorReportTriggeredEventNotification, ) from stripe.events._v1_billing_meter_no_meter_found_event import ( V1BillingMeterNoMeterFoundEventNotification, ) + from stripe.events._v1_billing_meter_reactivated_event import ( + V1BillingMeterReactivatedEventNotification, + ) + from stripe.events._v1_billing_meter_updated_event import ( + V1BillingMeterUpdatedEventNotification, + ) + from stripe.events._v1_billing_portal_configuration_created_event import ( + V1BillingPortalConfigurationCreatedEventNotification, + ) + from stripe.events._v1_billing_portal_configuration_updated_event import ( + V1BillingPortalConfigurationUpdatedEventNotification, + ) + from stripe.events._v1_billing_portal_session_created_event import ( + V1BillingPortalSessionCreatedEventNotification, + ) + from stripe.events._v1_capability_updated_event import ( + V1CapabilityUpdatedEventNotification, + ) + from stripe.events._v1_cash_balance_funds_available_event import ( + V1CashBalanceFundsAvailableEventNotification, + ) + from stripe.events._v1_charge_captured_event import ( + V1ChargeCapturedEventNotification, + ) + from stripe.events._v1_charge_dispute_closed_event import ( + V1ChargeDisputeClosedEventNotification, + ) + from stripe.events._v1_charge_dispute_created_event import ( + V1ChargeDisputeCreatedEventNotification, + ) + from stripe.events._v1_charge_dispute_funds_reinstated_event import ( + V1ChargeDisputeFundsReinstatedEventNotification, + ) + from stripe.events._v1_charge_dispute_funds_withdrawn_event import ( + V1ChargeDisputeFundsWithdrawnEventNotification, + ) + from stripe.events._v1_charge_dispute_updated_event import ( + V1ChargeDisputeUpdatedEventNotification, + ) + from stripe.events._v1_charge_expired_event import ( + V1ChargeExpiredEventNotification, + ) + from stripe.events._v1_charge_failed_event import ( + V1ChargeFailedEventNotification, + ) + from stripe.events._v1_charge_pending_event import ( + V1ChargePendingEventNotification, + ) + from stripe.events._v1_charge_refunded_event import ( + V1ChargeRefundedEventNotification, + ) + from stripe.events._v1_charge_refund_updated_event import ( + V1ChargeRefundUpdatedEventNotification, + ) + from stripe.events._v1_charge_succeeded_event import ( + V1ChargeSucceededEventNotification, + ) + from stripe.events._v1_charge_updated_event import ( + V1ChargeUpdatedEventNotification, + ) + from stripe.events._v1_checkout_session_async_payment_failed_event import ( + V1CheckoutSessionAsyncPaymentFailedEventNotification, + ) + from stripe.events._v1_checkout_session_async_payment_succeeded_event import ( + V1CheckoutSessionAsyncPaymentSucceededEventNotification, + ) + from stripe.events._v1_checkout_session_completed_event import ( + V1CheckoutSessionCompletedEventNotification, + ) + from stripe.events._v1_checkout_session_expired_event import ( + V1CheckoutSessionExpiredEventNotification, + ) + from stripe.events._v1_climate_order_canceled_event import ( + V1ClimateOrderCanceledEventNotification, + ) + from stripe.events._v1_climate_order_created_event import ( + V1ClimateOrderCreatedEventNotification, + ) + from stripe.events._v1_climate_order_delayed_event import ( + V1ClimateOrderDelayedEventNotification, + ) + from stripe.events._v1_climate_order_delivered_event import ( + V1ClimateOrderDeliveredEventNotification, + ) + from stripe.events._v1_climate_order_product_substituted_event import ( + V1ClimateOrderProductSubstitutedEventNotification, + ) + from stripe.events._v1_climate_product_created_event import ( + V1ClimateProductCreatedEventNotification, + ) + from stripe.events._v1_climate_product_pricing_updated_event import ( + V1ClimateProductPricingUpdatedEventNotification, + ) + from stripe.events._v1_coupon_created_event import ( + V1CouponCreatedEventNotification, + ) + from stripe.events._v1_coupon_deleted_event import ( + V1CouponDeletedEventNotification, + ) + from stripe.events._v1_coupon_updated_event import ( + V1CouponUpdatedEventNotification, + ) + from stripe.events._v1_credit_note_created_event import ( + V1CreditNoteCreatedEventNotification, + ) + from stripe.events._v1_credit_note_updated_event import ( + V1CreditNoteUpdatedEventNotification, + ) + from stripe.events._v1_credit_note_voided_event import ( + V1CreditNoteVoidedEventNotification, + ) + from stripe.events._v1_customer_cash_balance_transaction_created_event import ( + V1CustomerCashBalanceTransactionCreatedEventNotification, + ) + from stripe.events._v1_customer_created_event import ( + V1CustomerCreatedEventNotification, + ) + from stripe.events._v1_customer_deleted_event import ( + V1CustomerDeletedEventNotification, + ) + from stripe.events._v1_customer_discount_created_event import ( + V1CustomerDiscountCreatedEventNotification, + ) + from stripe.events._v1_customer_discount_deleted_event import ( + V1CustomerDiscountDeletedEventNotification, + ) + from stripe.events._v1_customer_discount_updated_event import ( + V1CustomerDiscountUpdatedEventNotification, + ) + from stripe.events._v1_customer_subscription_created_event import ( + V1CustomerSubscriptionCreatedEventNotification, + ) + from stripe.events._v1_customer_subscription_deleted_event import ( + V1CustomerSubscriptionDeletedEventNotification, + ) + from stripe.events._v1_customer_subscription_paused_event import ( + V1CustomerSubscriptionPausedEventNotification, + ) + from stripe.events._v1_customer_subscription_pending_update_applied_event import ( + V1CustomerSubscriptionPendingUpdateAppliedEventNotification, + ) + from stripe.events._v1_customer_subscription_pending_update_expired_event import ( + V1CustomerSubscriptionPendingUpdateExpiredEventNotification, + ) + from stripe.events._v1_customer_subscription_resumed_event import ( + V1CustomerSubscriptionResumedEventNotification, + ) + from stripe.events._v1_customer_subscription_trial_will_end_event import ( + V1CustomerSubscriptionTrialWillEndEventNotification, + ) + from stripe.events._v1_customer_subscription_updated_event import ( + V1CustomerSubscriptionUpdatedEventNotification, + ) + from stripe.events._v1_customer_tax_id_created_event import ( + V1CustomerTaxIdCreatedEventNotification, + ) + from stripe.events._v1_customer_tax_id_deleted_event import ( + V1CustomerTaxIdDeletedEventNotification, + ) + from stripe.events._v1_customer_tax_id_updated_event import ( + V1CustomerTaxIdUpdatedEventNotification, + ) + from stripe.events._v1_customer_updated_event import ( + V1CustomerUpdatedEventNotification, + ) + from stripe.events._v1_entitlements_active_entitlement_summary_updated_event import ( + V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification, + ) + from stripe.events._v1_file_created_event import ( + V1FileCreatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_account_numbers_updated_event import ( + V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_created_event import ( + V1FinancialConnectionsAccountCreatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_deactivated_event import ( + V1FinancialConnectionsAccountDeactivatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_disconnected_event import ( + V1FinancialConnectionsAccountDisconnectedEventNotification, + ) + from stripe.events._v1_financial_connections_account_expected_deactivation_date_updated_event import ( + V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_reactivated_event import ( + V1FinancialConnectionsAccountReactivatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_refreshed_balance_event import ( + V1FinancialConnectionsAccountRefreshedBalanceEventNotification, + ) + from stripe.events._v1_financial_connections_account_refreshed_ownership_event import ( + V1FinancialConnectionsAccountRefreshedOwnershipEventNotification, + ) + from stripe.events._v1_financial_connections_account_refreshed_transactions_event import ( + V1FinancialConnectionsAccountRefreshedTransactionsEventNotification, + ) + from stripe.events._v1_financial_connections_account_supported_payment_method_types_updated_event import ( + V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_upcoming_account_number_expiry_event import ( + V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification, + ) + from stripe.events._v1_financial_connections_account_upcoming_deactivation_event import ( + V1FinancialConnectionsAccountUpcomingDeactivationEventNotification, + ) + from stripe.events._v1_identity_verification_session_canceled_event import ( + V1IdentityVerificationSessionCanceledEventNotification, + ) + from stripe.events._v1_identity_verification_session_created_event import ( + V1IdentityVerificationSessionCreatedEventNotification, + ) + from stripe.events._v1_identity_verification_session_processing_event import ( + V1IdentityVerificationSessionProcessingEventNotification, + ) + from stripe.events._v1_identity_verification_session_redacted_event import ( + V1IdentityVerificationSessionRedactedEventNotification, + ) + from stripe.events._v1_identity_verification_session_requires_input_event import ( + V1IdentityVerificationSessionRequiresInputEventNotification, + ) + from stripe.events._v1_identity_verification_session_verified_event import ( + V1IdentityVerificationSessionVerifiedEventNotification, + ) + from stripe.events._v1_invoice_created_event import ( + V1InvoiceCreatedEventNotification, + ) + from stripe.events._v1_invoice_deleted_event import ( + V1InvoiceDeletedEventNotification, + ) + from stripe.events._v1_invoice_finalization_failed_event import ( + V1InvoiceFinalizationFailedEventNotification, + ) + from stripe.events._v1_invoice_finalized_event import ( + V1InvoiceFinalizedEventNotification, + ) + from stripe.events._v1_invoiceitem_created_event import ( + V1InvoiceitemCreatedEventNotification, + ) + from stripe.events._v1_invoiceitem_deleted_event import ( + V1InvoiceitemDeletedEventNotification, + ) + from stripe.events._v1_invoice_marked_uncollectible_event import ( + V1InvoiceMarkedUncollectibleEventNotification, + ) + from stripe.events._v1_invoice_overdue_event import ( + V1InvoiceOverdueEventNotification, + ) + from stripe.events._v1_invoice_overpaid_event import ( + V1InvoiceOverpaidEventNotification, + ) + from stripe.events._v1_invoice_paid_event import ( + V1InvoicePaidEventNotification, + ) + from stripe.events._v1_invoice_payment_action_required_event import ( + V1InvoicePaymentActionRequiredEventNotification, + ) + from stripe.events._v1_invoice_payment_attempt_required_event import ( + V1InvoicePaymentAttemptRequiredEventNotification, + ) + from stripe.events._v1_invoice_payment_failed_event import ( + V1InvoicePaymentFailedEventNotification, + ) + from stripe.events._v1_invoice_payment_paid_event import ( + V1InvoicePaymentPaidEventNotification, + ) + from stripe.events._v1_invoice_payment_succeeded_event import ( + V1InvoicePaymentSucceededEventNotification, + ) + from stripe.events._v1_invoice_sent_event import ( + V1InvoiceSentEventNotification, + ) + from stripe.events._v1_invoice_upcoming_event import ( + V1InvoiceUpcomingEventNotification, + ) + from stripe.events._v1_invoice_updated_event import ( + V1InvoiceUpdatedEventNotification, + ) + from stripe.events._v1_invoice_voided_event import ( + V1InvoiceVoidedEventNotification, + ) + from stripe.events._v1_invoice_will_be_due_event import ( + V1InvoiceWillBeDueEventNotification, + ) + from stripe.events._v1_issuing_authorization_created_event import ( + V1IssuingAuthorizationCreatedEventNotification, + ) + from stripe.events._v1_issuing_authorization_request_event import ( + V1IssuingAuthorizationRequestEventNotification, + ) + from stripe.events._v1_issuing_authorization_updated_event import ( + V1IssuingAuthorizationUpdatedEventNotification, + ) + from stripe.events._v1_issuing_card_created_event import ( + V1IssuingCardCreatedEventNotification, + ) + from stripe.events._v1_issuing_cardholder_created_event import ( + V1IssuingCardholderCreatedEventNotification, + ) + from stripe.events._v1_issuing_cardholder_updated_event import ( + V1IssuingCardholderUpdatedEventNotification, + ) + from stripe.events._v1_issuing_card_updated_event import ( + V1IssuingCardUpdatedEventNotification, + ) + from stripe.events._v1_issuing_dispute_closed_event import ( + V1IssuingDisputeClosedEventNotification, + ) + from stripe.events._v1_issuing_dispute_created_event import ( + V1IssuingDisputeCreatedEventNotification, + ) + from stripe.events._v1_issuing_dispute_funds_reinstated_event import ( + V1IssuingDisputeFundsReinstatedEventNotification, + ) + from stripe.events._v1_issuing_dispute_funds_rescinded_event import ( + V1IssuingDisputeFundsRescindedEventNotification, + ) + from stripe.events._v1_issuing_dispute_submitted_event import ( + V1IssuingDisputeSubmittedEventNotification, + ) + from stripe.events._v1_issuing_dispute_updated_event import ( + V1IssuingDisputeUpdatedEventNotification, + ) + from stripe.events._v1_issuing_personalization_design_activated_event import ( + V1IssuingPersonalizationDesignActivatedEventNotification, + ) + from stripe.events._v1_issuing_personalization_design_deactivated_event import ( + V1IssuingPersonalizationDesignDeactivatedEventNotification, + ) + from stripe.events._v1_issuing_personalization_design_rejected_event import ( + V1IssuingPersonalizationDesignRejectedEventNotification, + ) + from stripe.events._v1_issuing_personalization_design_updated_event import ( + V1IssuingPersonalizationDesignUpdatedEventNotification, + ) + from stripe.events._v1_issuing_token_created_event import ( + V1IssuingTokenCreatedEventNotification, + ) + from stripe.events._v1_issuing_token_updated_event import ( + V1IssuingTokenUpdatedEventNotification, + ) + from stripe.events._v1_issuing_transaction_created_event import ( + V1IssuingTransactionCreatedEventNotification, + ) + from stripe.events._v1_issuing_transaction_purchase_details_receipt_updated_event import ( + V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification, + ) + from stripe.events._v1_issuing_transaction_updated_event import ( + V1IssuingTransactionUpdatedEventNotification, + ) + from stripe.events._v1_mandate_updated_event import ( + V1MandateUpdatedEventNotification, + ) + from stripe.events._v1_payment_intent_amount_capturable_updated_event import ( + V1PaymentIntentAmountCapturableUpdatedEventNotification, + ) + from stripe.events._v1_payment_intent_canceled_event import ( + V1PaymentIntentCanceledEventNotification, + ) + from stripe.events._v1_payment_intent_created_event import ( + V1PaymentIntentCreatedEventNotification, + ) + from stripe.events._v1_payment_intent_partially_funded_event import ( + V1PaymentIntentPartiallyFundedEventNotification, + ) + from stripe.events._v1_payment_intent_payment_failed_event import ( + V1PaymentIntentPaymentFailedEventNotification, + ) + from stripe.events._v1_payment_intent_processing_event import ( + V1PaymentIntentProcessingEventNotification, + ) + from stripe.events._v1_payment_intent_requires_action_event import ( + V1PaymentIntentRequiresActionEventNotification, + ) + from stripe.events._v1_payment_intent_succeeded_event import ( + V1PaymentIntentSucceededEventNotification, + ) + from stripe.events._v1_payment_link_created_event import ( + V1PaymentLinkCreatedEventNotification, + ) + from stripe.events._v1_payment_link_updated_event import ( + V1PaymentLinkUpdatedEventNotification, + ) + from stripe.events._v1_payment_method_attached_event import ( + V1PaymentMethodAttachedEventNotification, + ) + from stripe.events._v1_payment_method_automatically_updated_event import ( + V1PaymentMethodAutomaticallyUpdatedEventNotification, + ) + from stripe.events._v1_payment_method_detached_event import ( + V1PaymentMethodDetachedEventNotification, + ) + from stripe.events._v1_payment_method_updated_event import ( + V1PaymentMethodUpdatedEventNotification, + ) + from stripe.events._v1_payout_canceled_event import ( + V1PayoutCanceledEventNotification, + ) + from stripe.events._v1_payout_created_event import ( + V1PayoutCreatedEventNotification, + ) + from stripe.events._v1_payout_failed_event import ( + V1PayoutFailedEventNotification, + ) + from stripe.events._v1_payout_paid_event import ( + V1PayoutPaidEventNotification, + ) + from stripe.events._v1_payout_reconciliation_completed_event import ( + V1PayoutReconciliationCompletedEventNotification, + ) + from stripe.events._v1_payout_updated_event import ( + V1PayoutUpdatedEventNotification, + ) + from stripe.events._v1_person_created_event import ( + V1PersonCreatedEventNotification, + ) + from stripe.events._v1_person_deleted_event import ( + V1PersonDeletedEventNotification, + ) + from stripe.events._v1_person_updated_event import ( + V1PersonUpdatedEventNotification, + ) + from stripe.events._v1_plan_created_event import ( + V1PlanCreatedEventNotification, + ) + from stripe.events._v1_plan_deleted_event import ( + V1PlanDeletedEventNotification, + ) + from stripe.events._v1_plan_updated_event import ( + V1PlanUpdatedEventNotification, + ) + from stripe.events._v1_price_created_event import ( + V1PriceCreatedEventNotification, + ) + from stripe.events._v1_price_deleted_event import ( + V1PriceDeletedEventNotification, + ) + from stripe.events._v1_price_updated_event import ( + V1PriceUpdatedEventNotification, + ) + from stripe.events._v1_product_created_event import ( + V1ProductCreatedEventNotification, + ) + from stripe.events._v1_product_deleted_event import ( + V1ProductDeletedEventNotification, + ) + from stripe.events._v1_product_updated_event import ( + V1ProductUpdatedEventNotification, + ) + from stripe.events._v1_promotion_code_created_event import ( + V1PromotionCodeCreatedEventNotification, + ) + from stripe.events._v1_promotion_code_updated_event import ( + V1PromotionCodeUpdatedEventNotification, + ) + from stripe.events._v1_quote_accepted_event import ( + V1QuoteAcceptedEventNotification, + ) + from stripe.events._v1_quote_canceled_event import ( + V1QuoteCanceledEventNotification, + ) + from stripe.events._v1_quote_created_event import ( + V1QuoteCreatedEventNotification, + ) + from stripe.events._v1_quote_finalized_event import ( + V1QuoteFinalizedEventNotification, + ) + from stripe.events._v1_radar_early_fraud_warning_created_event import ( + V1RadarEarlyFraudWarningCreatedEventNotification, + ) + from stripe.events._v1_radar_early_fraud_warning_updated_event import ( + V1RadarEarlyFraudWarningUpdatedEventNotification, + ) + from stripe.events._v1_refund_created_event import ( + V1RefundCreatedEventNotification, + ) + from stripe.events._v1_refund_failed_event import ( + V1RefundFailedEventNotification, + ) + from stripe.events._v1_refund_updated_event import ( + V1RefundUpdatedEventNotification, + ) + from stripe.events._v1_review_closed_event import ( + V1ReviewClosedEventNotification, + ) + from stripe.events._v1_review_opened_event import ( + V1ReviewOpenedEventNotification, + ) + from stripe.events._v1_setup_intent_canceled_event import ( + V1SetupIntentCanceledEventNotification, + ) + from stripe.events._v1_setup_intent_created_event import ( + V1SetupIntentCreatedEventNotification, + ) + from stripe.events._v1_setup_intent_requires_action_event import ( + V1SetupIntentRequiresActionEventNotification, + ) + from stripe.events._v1_setup_intent_setup_failed_event import ( + V1SetupIntentSetupFailedEventNotification, + ) + from stripe.events._v1_setup_intent_succeeded_event import ( + V1SetupIntentSucceededEventNotification, + ) + from stripe.events._v1_sigma_scheduled_query_run_created_event import ( + V1SigmaScheduledQueryRunCreatedEventNotification, + ) + from stripe.events._v1_source_canceled_event import ( + V1SourceCanceledEventNotification, + ) + from stripe.events._v1_source_chargeable_event import ( + V1SourceChargeableEventNotification, + ) + from stripe.events._v1_source_failed_event import ( + V1SourceFailedEventNotification, + ) + from stripe.events._v1_source_refund_attributes_required_event import ( + V1SourceRefundAttributesRequiredEventNotification, + ) + from stripe.events._v1_subscription_schedule_aborted_event import ( + V1SubscriptionScheduleAbortedEventNotification, + ) + from stripe.events._v1_subscription_schedule_canceled_event import ( + V1SubscriptionScheduleCanceledEventNotification, + ) + from stripe.events._v1_subscription_schedule_completed_event import ( + V1SubscriptionScheduleCompletedEventNotification, + ) + from stripe.events._v1_subscription_schedule_created_event import ( + V1SubscriptionScheduleCreatedEventNotification, + ) + from stripe.events._v1_subscription_schedule_expiring_event import ( + V1SubscriptionScheduleExpiringEventNotification, + ) + from stripe.events._v1_subscription_schedule_released_event import ( + V1SubscriptionScheduleReleasedEventNotification, + ) + from stripe.events._v1_subscription_schedule_updated_event import ( + V1SubscriptionScheduleUpdatedEventNotification, + ) + from stripe.events._v1_tax_rate_created_event import ( + V1TaxRateCreatedEventNotification, + ) + from stripe.events._v1_tax_rate_updated_event import ( + V1TaxRateUpdatedEventNotification, + ) + from stripe.events._v1_tax_settings_updated_event import ( + V1TaxSettingsUpdatedEventNotification, + ) + from stripe.events._v1_terminal_reader_action_failed_event import ( + V1TerminalReaderActionFailedEventNotification, + ) + from stripe.events._v1_terminal_reader_action_succeeded_event import ( + V1TerminalReaderActionSucceededEventNotification, + ) + from stripe.events._v1_terminal_reader_action_updated_event import ( + V1TerminalReaderActionUpdatedEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_advancing_event import ( + V1TestHelpersTestClockAdvancingEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_created_event import ( + V1TestHelpersTestClockCreatedEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_deleted_event import ( + V1TestHelpersTestClockDeletedEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_internal_failure_event import ( + V1TestHelpersTestClockInternalFailureEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_ready_event import ( + V1TestHelpersTestClockReadyEventNotification, + ) + from stripe.events._v1_topup_canceled_event import ( + V1TopupCanceledEventNotification, + ) + from stripe.events._v1_topup_created_event import ( + V1TopupCreatedEventNotification, + ) + from stripe.events._v1_topup_failed_event import ( + V1TopupFailedEventNotification, + ) + from stripe.events._v1_topup_reversed_event import ( + V1TopupReversedEventNotification, + ) + from stripe.events._v1_topup_succeeded_event import ( + V1TopupSucceededEventNotification, + ) + from stripe.events._v1_transfer_created_event import ( + V1TransferCreatedEventNotification, + ) + from stripe.events._v1_transfer_reversed_event import ( + V1TransferReversedEventNotification, + ) + from stripe.events._v1_transfer_updated_event import ( + V1TransferUpdatedEventNotification, + ) from stripe.events._v2_commerce_product_catalog_imports_failed_event import ( V2CommerceProductCatalogImportsFailedEventNotification, ) @@ -247,28 +895,2836 @@ def registered_event_types(self) -> List[str]: return sorted(self._registered_handlers.keys()) # event-notification-registration-methods: The beginning of the section generated from our OpenAPI spec - def on_v1_billing_meter_error_report_triggered( + def on_v1_account_application_authorized( self, - func: "Callable[[V1BillingMeterErrorReportTriggeredEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1AccountApplicationAuthorizedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1BillingMeterErrorReportTriggeredEvent` (`v1.billing.meter.error_report_triggered`) event notification. + Registers a callback for the `V1AccountApplicationAuthorizedEvent` (`v1.account.application.authorized`) event notification. """ self._register( - "v1.billing.meter.error_report_triggered", + "v1.account.application.authorized", func, ) return func - def on_v1_billing_meter_no_meter_found( + def on_v1_account_application_deauthorized( self, - func: "Callable[[V1BillingMeterNoMeterFoundEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1AccountApplicationDeauthorizedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1BillingMeterNoMeterFoundEvent` (`v1.billing.meter.no_meter_found`) event notification. + Registers a callback for the `V1AccountApplicationDeauthorizedEvent` (`v1.account.application.deauthorized`) event notification. """ self._register( - "v1.billing.meter.no_meter_found", + "v1.account.application.deauthorized", + func, + ) + return func + + def on_v1_account_external_account_created( + self, + func: "Callable[[V1AccountExternalAccountCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1AccountExternalAccountCreatedEvent` (`v1.account.external_account.created`) event notification. + """ + self._register( + "v1.account.external_account.created", + func, + ) + return func + + def on_v1_account_external_account_deleted( + self, + func: "Callable[[V1AccountExternalAccountDeletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1AccountExternalAccountDeletedEvent` (`v1.account.external_account.deleted`) event notification. + """ + self._register( + "v1.account.external_account.deleted", + func, + ) + return func + + def on_v1_account_external_account_updated( + self, + func: "Callable[[V1AccountExternalAccountUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1AccountExternalAccountUpdatedEvent` (`v1.account.external_account.updated`) event notification. + """ + self._register( + "v1.account.external_account.updated", + func, + ) + return func + + def on_v1_account_updated( + self, + func: "Callable[[V1AccountUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1AccountUpdatedEvent` (`v1.account.updated`) event notification. + """ + self._register( + "v1.account.updated", + func, + ) + return func + + def on_v1_application_fee_created( + self, + func: "Callable[[V1ApplicationFeeCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ApplicationFeeCreatedEvent` (`v1.application_fee.created`) event notification. + """ + self._register( + "v1.application_fee.created", + func, + ) + return func + + def on_v1_application_fee_refunded( + self, + func: "Callable[[V1ApplicationFeeRefundedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ApplicationFeeRefundedEvent` (`v1.application_fee.refunded`) event notification. + """ + self._register( + "v1.application_fee.refunded", + func, + ) + return func + + def on_v1_application_fee_refund_updated( + self, + func: "Callable[[V1ApplicationFeeRefundUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ApplicationFeeRefundUpdatedEvent` (`v1.application_fee.refund.updated`) event notification. + """ + self._register( + "v1.application_fee.refund.updated", + func, + ) + return func + + def on_v1_balance_available( + self, + func: "Callable[[V1BalanceAvailableEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BalanceAvailableEvent` (`v1.balance.available`) event notification. + """ + self._register( + "v1.balance.available", + func, + ) + return func + + def on_v1_balance_settings_updated( + self, + func: "Callable[[V1BalanceSettingsUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BalanceSettingsUpdatedEvent` (`v1.balance_settings.updated`) event notification. + """ + self._register( + "v1.balance_settings.updated", + func, + ) + return func + + def on_v1_billing_alert_triggered( + self, + func: "Callable[[V1BillingAlertTriggeredEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BillingAlertTriggeredEvent` (`v1.billing.alert.triggered`) event notification. + """ + self._register( + "v1.billing.alert.triggered", + func, + ) + return func + + def on_v1_billing_credit_balance_transaction_created( + self, + func: "Callable[[V1BillingCreditBalanceTransactionCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BillingCreditBalanceTransactionCreatedEvent` (`v1.billing.credit_balance_transaction.created`) event notification. + """ + self._register( + "v1.billing.credit_balance_transaction.created", + func, + ) + return func + + def on_v1_billing_credit_grant_created( + self, + func: "Callable[[V1BillingCreditGrantCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BillingCreditGrantCreatedEvent` (`v1.billing.credit_grant.created`) event notification. + """ + self._register( + "v1.billing.credit_grant.created", + func, + ) + return func + + def on_v1_billing_credit_grant_updated( + self, + func: "Callable[[V1BillingCreditGrantUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BillingCreditGrantUpdatedEvent` (`v1.billing.credit_grant.updated`) event notification. + """ + self._register( + "v1.billing.credit_grant.updated", + func, + ) + return func + + def on_v1_billing_meter_created( + self, + func: "Callable[[V1BillingMeterCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BillingMeterCreatedEvent` (`v1.billing.meter.created`) event notification. + """ + self._register( + "v1.billing.meter.created", + func, + ) + return func + + def on_v1_billing_meter_deactivated( + self, + func: "Callable[[V1BillingMeterDeactivatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BillingMeterDeactivatedEvent` (`v1.billing.meter.deactivated`) event notification. + """ + self._register( + "v1.billing.meter.deactivated", + func, + ) + return func + + def on_v1_billing_meter_error_report_triggered( + self, + func: "Callable[[V1BillingMeterErrorReportTriggeredEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BillingMeterErrorReportTriggeredEvent` (`v1.billing.meter.error_report_triggered`) event notification. + """ + self._register( + "v1.billing.meter.error_report_triggered", + func, + ) + return func + + def on_v1_billing_meter_no_meter_found( + self, + func: "Callable[[V1BillingMeterNoMeterFoundEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BillingMeterNoMeterFoundEvent` (`v1.billing.meter.no_meter_found`) event notification. + """ + self._register( + "v1.billing.meter.no_meter_found", + func, + ) + return func + + def on_v1_billing_meter_reactivated( + self, + func: "Callable[[V1BillingMeterReactivatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BillingMeterReactivatedEvent` (`v1.billing.meter.reactivated`) event notification. + """ + self._register( + "v1.billing.meter.reactivated", + func, + ) + return func + + def on_v1_billing_meter_updated( + self, + func: "Callable[[V1BillingMeterUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BillingMeterUpdatedEvent` (`v1.billing.meter.updated`) event notification. + """ + self._register( + "v1.billing.meter.updated", + func, + ) + return func + + def on_v1_billing_portal_configuration_created( + self, + func: "Callable[[V1BillingPortalConfigurationCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BillingPortalConfigurationCreatedEvent` (`v1.billing_portal.configuration.created`) event notification. + """ + self._register( + "v1.billing_portal.configuration.created", + func, + ) + return func + + def on_v1_billing_portal_configuration_updated( + self, + func: "Callable[[V1BillingPortalConfigurationUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BillingPortalConfigurationUpdatedEvent` (`v1.billing_portal.configuration.updated`) event notification. + """ + self._register( + "v1.billing_portal.configuration.updated", + func, + ) + return func + + def on_v1_billing_portal_session_created( + self, + func: "Callable[[V1BillingPortalSessionCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1BillingPortalSessionCreatedEvent` (`v1.billing_portal.session.created`) event notification. + """ + self._register( + "v1.billing_portal.session.created", + func, + ) + return func + + def on_v1_capability_updated( + self, + func: "Callable[[V1CapabilityUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CapabilityUpdatedEvent` (`v1.capability.updated`) event notification. + """ + self._register( + "v1.capability.updated", + func, + ) + return func + + def on_v1_cash_balance_funds_available( + self, + func: "Callable[[V1CashBalanceFundsAvailableEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CashBalanceFundsAvailableEvent` (`v1.cash_balance.funds_available`) event notification. + """ + self._register( + "v1.cash_balance.funds_available", + func, + ) + return func + + def on_v1_charge_captured( + self, + func: "Callable[[V1ChargeCapturedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ChargeCapturedEvent` (`v1.charge.captured`) event notification. + """ + self._register( + "v1.charge.captured", + func, + ) + return func + + def on_v1_charge_dispute_closed( + self, + func: "Callable[[V1ChargeDisputeClosedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ChargeDisputeClosedEvent` (`v1.charge.dispute.closed`) event notification. + """ + self._register( + "v1.charge.dispute.closed", + func, + ) + return func + + def on_v1_charge_dispute_created( + self, + func: "Callable[[V1ChargeDisputeCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ChargeDisputeCreatedEvent` (`v1.charge.dispute.created`) event notification. + """ + self._register( + "v1.charge.dispute.created", + func, + ) + return func + + def on_v1_charge_dispute_funds_reinstated( + self, + func: "Callable[[V1ChargeDisputeFundsReinstatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ChargeDisputeFundsReinstatedEvent` (`v1.charge.dispute.funds_reinstated`) event notification. + """ + self._register( + "v1.charge.dispute.funds_reinstated", + func, + ) + return func + + def on_v1_charge_dispute_funds_withdrawn( + self, + func: "Callable[[V1ChargeDisputeFundsWithdrawnEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ChargeDisputeFundsWithdrawnEvent` (`v1.charge.dispute.funds_withdrawn`) event notification. + """ + self._register( + "v1.charge.dispute.funds_withdrawn", + func, + ) + return func + + def on_v1_charge_dispute_updated( + self, + func: "Callable[[V1ChargeDisputeUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ChargeDisputeUpdatedEvent` (`v1.charge.dispute.updated`) event notification. + """ + self._register( + "v1.charge.dispute.updated", + func, + ) + return func + + def on_v1_charge_expired( + self, + func: "Callable[[V1ChargeExpiredEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ChargeExpiredEvent` (`v1.charge.expired`) event notification. + """ + self._register( + "v1.charge.expired", + func, + ) + return func + + def on_v1_charge_failed( + self, + func: "Callable[[V1ChargeFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ChargeFailedEvent` (`v1.charge.failed`) event notification. + """ + self._register( + "v1.charge.failed", + func, + ) + return func + + def on_v1_charge_pending( + self, + func: "Callable[[V1ChargePendingEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ChargePendingEvent` (`v1.charge.pending`) event notification. + """ + self._register( + "v1.charge.pending", + func, + ) + return func + + def on_v1_charge_refunded( + self, + func: "Callable[[V1ChargeRefundedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ChargeRefundedEvent` (`v1.charge.refunded`) event notification. + """ + self._register( + "v1.charge.refunded", + func, + ) + return func + + def on_v1_charge_refund_updated( + self, + func: "Callable[[V1ChargeRefundUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ChargeRefundUpdatedEvent` (`v1.charge.refund.updated`) event notification. + """ + self._register( + "v1.charge.refund.updated", + func, + ) + return func + + def on_v1_charge_succeeded( + self, + func: "Callable[[V1ChargeSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ChargeSucceededEvent` (`v1.charge.succeeded`) event notification. + """ + self._register( + "v1.charge.succeeded", + func, + ) + return func + + def on_v1_charge_updated( + self, + func: "Callable[[V1ChargeUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ChargeUpdatedEvent` (`v1.charge.updated`) event notification. + """ + self._register( + "v1.charge.updated", + func, + ) + return func + + def on_v1_checkout_session_async_payment_failed( + self, + func: "Callable[[V1CheckoutSessionAsyncPaymentFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CheckoutSessionAsyncPaymentFailedEvent` (`v1.checkout.session.async_payment_failed`) event notification. + """ + self._register( + "v1.checkout.session.async_payment_failed", + func, + ) + return func + + def on_v1_checkout_session_async_payment_succeeded( + self, + func: "Callable[[V1CheckoutSessionAsyncPaymentSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CheckoutSessionAsyncPaymentSucceededEvent` (`v1.checkout.session.async_payment_succeeded`) event notification. + """ + self._register( + "v1.checkout.session.async_payment_succeeded", + func, + ) + return func + + def on_v1_checkout_session_completed( + self, + func: "Callable[[V1CheckoutSessionCompletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CheckoutSessionCompletedEvent` (`v1.checkout.session.completed`) event notification. + """ + self._register( + "v1.checkout.session.completed", + func, + ) + return func + + def on_v1_checkout_session_expired( + self, + func: "Callable[[V1CheckoutSessionExpiredEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CheckoutSessionExpiredEvent` (`v1.checkout.session.expired`) event notification. + """ + self._register( + "v1.checkout.session.expired", + func, + ) + return func + + def on_v1_climate_order_canceled( + self, + func: "Callable[[V1ClimateOrderCanceledEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ClimateOrderCanceledEvent` (`v1.climate.order.canceled`) event notification. + """ + self._register( + "v1.climate.order.canceled", + func, + ) + return func + + def on_v1_climate_order_created( + self, + func: "Callable[[V1ClimateOrderCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ClimateOrderCreatedEvent` (`v1.climate.order.created`) event notification. + """ + self._register( + "v1.climate.order.created", + func, + ) + return func + + def on_v1_climate_order_delayed( + self, + func: "Callable[[V1ClimateOrderDelayedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ClimateOrderDelayedEvent` (`v1.climate.order.delayed`) event notification. + """ + self._register( + "v1.climate.order.delayed", + func, + ) + return func + + def on_v1_climate_order_delivered( + self, + func: "Callable[[V1ClimateOrderDeliveredEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ClimateOrderDeliveredEvent` (`v1.climate.order.delivered`) event notification. + """ + self._register( + "v1.climate.order.delivered", + func, + ) + return func + + def on_v1_climate_order_product_substituted( + self, + func: "Callable[[V1ClimateOrderProductSubstitutedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ClimateOrderProductSubstitutedEvent` (`v1.climate.order.product_substituted`) event notification. + """ + self._register( + "v1.climate.order.product_substituted", + func, + ) + return func + + def on_v1_climate_product_created( + self, + func: "Callable[[V1ClimateProductCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ClimateProductCreatedEvent` (`v1.climate.product.created`) event notification. + """ + self._register( + "v1.climate.product.created", + func, + ) + return func + + def on_v1_climate_product_pricing_updated( + self, + func: "Callable[[V1ClimateProductPricingUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ClimateProductPricingUpdatedEvent` (`v1.climate.product.pricing_updated`) event notification. + """ + self._register( + "v1.climate.product.pricing_updated", + func, + ) + return func + + def on_v1_coupon_created( + self, + func: "Callable[[V1CouponCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CouponCreatedEvent` (`v1.coupon.created`) event notification. + """ + self._register( + "v1.coupon.created", + func, + ) + return func + + def on_v1_coupon_deleted( + self, + func: "Callable[[V1CouponDeletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CouponDeletedEvent` (`v1.coupon.deleted`) event notification. + """ + self._register( + "v1.coupon.deleted", + func, + ) + return func + + def on_v1_coupon_updated( + self, + func: "Callable[[V1CouponUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CouponUpdatedEvent` (`v1.coupon.updated`) event notification. + """ + self._register( + "v1.coupon.updated", + func, + ) + return func + + def on_v1_credit_note_created( + self, + func: "Callable[[V1CreditNoteCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CreditNoteCreatedEvent` (`v1.credit_note.created`) event notification. + """ + self._register( + "v1.credit_note.created", + func, + ) + return func + + def on_v1_credit_note_updated( + self, + func: "Callable[[V1CreditNoteUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CreditNoteUpdatedEvent` (`v1.credit_note.updated`) event notification. + """ + self._register( + "v1.credit_note.updated", + func, + ) + return func + + def on_v1_credit_note_voided( + self, + func: "Callable[[V1CreditNoteVoidedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CreditNoteVoidedEvent` (`v1.credit_note.voided`) event notification. + """ + self._register( + "v1.credit_note.voided", + func, + ) + return func + + def on_v1_customer_cash_balance_transaction_created( + self, + func: "Callable[[V1CustomerCashBalanceTransactionCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerCashBalanceTransactionCreatedEvent` (`v1.customer_cash_balance_transaction.created`) event notification. + """ + self._register( + "v1.customer_cash_balance_transaction.created", + func, + ) + return func + + def on_v1_customer_created( + self, + func: "Callable[[V1CustomerCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerCreatedEvent` (`v1.customer.created`) event notification. + """ + self._register( + "v1.customer.created", + func, + ) + return func + + def on_v1_customer_deleted( + self, + func: "Callable[[V1CustomerDeletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerDeletedEvent` (`v1.customer.deleted`) event notification. + """ + self._register( + "v1.customer.deleted", + func, + ) + return func + + def on_v1_customer_discount_created( + self, + func: "Callable[[V1CustomerDiscountCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerDiscountCreatedEvent` (`v1.customer.discount.created`) event notification. + """ + self._register( + "v1.customer.discount.created", + func, + ) + return func + + def on_v1_customer_discount_deleted( + self, + func: "Callable[[V1CustomerDiscountDeletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerDiscountDeletedEvent` (`v1.customer.discount.deleted`) event notification. + """ + self._register( + "v1.customer.discount.deleted", + func, + ) + return func + + def on_v1_customer_discount_updated( + self, + func: "Callable[[V1CustomerDiscountUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerDiscountUpdatedEvent` (`v1.customer.discount.updated`) event notification. + """ + self._register( + "v1.customer.discount.updated", + func, + ) + return func + + def on_v1_customer_subscription_created( + self, + func: "Callable[[V1CustomerSubscriptionCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionCreatedEvent` (`v1.customer.subscription.created`) event notification. + """ + self._register( + "v1.customer.subscription.created", + func, + ) + return func + + def on_v1_customer_subscription_deleted( + self, + func: "Callable[[V1CustomerSubscriptionDeletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionDeletedEvent` (`v1.customer.subscription.deleted`) event notification. + """ + self._register( + "v1.customer.subscription.deleted", + func, + ) + return func + + def on_v1_customer_subscription_paused( + self, + func: "Callable[[V1CustomerSubscriptionPausedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionPausedEvent` (`v1.customer.subscription.paused`) event notification. + """ + self._register( + "v1.customer.subscription.paused", + func, + ) + return func + + def on_v1_customer_subscription_pending_update_applied( + self, + func: "Callable[[V1CustomerSubscriptionPendingUpdateAppliedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionPendingUpdateAppliedEvent` (`v1.customer.subscription.pending_update_applied`) event notification. + """ + self._register( + "v1.customer.subscription.pending_update_applied", + func, + ) + return func + + def on_v1_customer_subscription_pending_update_expired( + self, + func: "Callable[[V1CustomerSubscriptionPendingUpdateExpiredEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionPendingUpdateExpiredEvent` (`v1.customer.subscription.pending_update_expired`) event notification. + """ + self._register( + "v1.customer.subscription.pending_update_expired", + func, + ) + return func + + def on_v1_customer_subscription_resumed( + self, + func: "Callable[[V1CustomerSubscriptionResumedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionResumedEvent` (`v1.customer.subscription.resumed`) event notification. + """ + self._register( + "v1.customer.subscription.resumed", + func, + ) + return func + + def on_v1_customer_subscription_trial_will_end( + self, + func: "Callable[[V1CustomerSubscriptionTrialWillEndEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionTrialWillEndEvent` (`v1.customer.subscription.trial_will_end`) event notification. + """ + self._register( + "v1.customer.subscription.trial_will_end", + func, + ) + return func + + def on_v1_customer_subscription_updated( + self, + func: "Callable[[V1CustomerSubscriptionUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionUpdatedEvent` (`v1.customer.subscription.updated`) event notification. + """ + self._register( + "v1.customer.subscription.updated", + func, + ) + return func + + def on_v1_customer_tax_id_created( + self, + func: "Callable[[V1CustomerTaxIdCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerTaxIdCreatedEvent` (`v1.customer.tax_id.created`) event notification. + """ + self._register( + "v1.customer.tax_id.created", + func, + ) + return func + + def on_v1_customer_tax_id_deleted( + self, + func: "Callable[[V1CustomerTaxIdDeletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerTaxIdDeletedEvent` (`v1.customer.tax_id.deleted`) event notification. + """ + self._register( + "v1.customer.tax_id.deleted", + func, + ) + return func + + def on_v1_customer_tax_id_updated( + self, + func: "Callable[[V1CustomerTaxIdUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerTaxIdUpdatedEvent` (`v1.customer.tax_id.updated`) event notification. + """ + self._register( + "v1.customer.tax_id.updated", + func, + ) + return func + + def on_v1_customer_updated( + self, + func: "Callable[[V1CustomerUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerUpdatedEvent` (`v1.customer.updated`) event notification. + """ + self._register( + "v1.customer.updated", + func, + ) + return func + + def on_v1_entitlements_active_entitlement_summary_updated( + self, + func: "Callable[[V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1EntitlementsActiveEntitlementSummaryUpdatedEvent` (`v1.entitlements.active_entitlement_summary.updated`) event notification. + """ + self._register( + "v1.entitlements.active_entitlement_summary.updated", + func, + ) + return func + + def on_v1_file_created( + self, + func: "Callable[[V1FileCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FileCreatedEvent` (`v1.file.created`) event notification. + """ + self._register( + "v1.file.created", + func, + ) + return func + + def on_v1_financial_connections_account_account_numbers_updated( + self, + func: "Callable[[V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountAccountNumbersUpdatedEvent` (`v1.financial_connections.account.account_numbers_updated`) event notification. + """ + self._register( + "v1.financial_connections.account.account_numbers_updated", + func, + ) + return func + + def on_v1_financial_connections_account_created( + self, + func: "Callable[[V1FinancialConnectionsAccountCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountCreatedEvent` (`v1.financial_connections.account.created`) event notification. + """ + self._register( + "v1.financial_connections.account.created", + func, + ) + return func + + def on_v1_financial_connections_account_deactivated( + self, + func: "Callable[[V1FinancialConnectionsAccountDeactivatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountDeactivatedEvent` (`v1.financial_connections.account.deactivated`) event notification. + """ + self._register( + "v1.financial_connections.account.deactivated", + func, + ) + return func + + def on_v1_financial_connections_account_disconnected( + self, + func: "Callable[[V1FinancialConnectionsAccountDisconnectedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountDisconnectedEvent` (`v1.financial_connections.account.disconnected`) event notification. + """ + self._register( + "v1.financial_connections.account.disconnected", + func, + ) + return func + + def on_v1_financial_connections_account_expected_deactivation_date_updated( + self, + func: "Callable[[V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent` (`v1.financial_connections.account.expected_deactivation_date_updated`) event notification. + """ + self._register( + "v1.financial_connections.account.expected_deactivation_date_updated", + func, + ) + return func + + def on_v1_financial_connections_account_reactivated( + self, + func: "Callable[[V1FinancialConnectionsAccountReactivatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountReactivatedEvent` (`v1.financial_connections.account.reactivated`) event notification. + """ + self._register( + "v1.financial_connections.account.reactivated", + func, + ) + return func + + def on_v1_financial_connections_account_refreshed_balance( + self, + func: "Callable[[V1FinancialConnectionsAccountRefreshedBalanceEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountRefreshedBalanceEvent` (`v1.financial_connections.account.refreshed_balance`) event notification. + """ + self._register( + "v1.financial_connections.account.refreshed_balance", + func, + ) + return func + + def on_v1_financial_connections_account_refreshed_ownership( + self, + func: "Callable[[V1FinancialConnectionsAccountRefreshedOwnershipEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountRefreshedOwnershipEvent` (`v1.financial_connections.account.refreshed_ownership`) event notification. + """ + self._register( + "v1.financial_connections.account.refreshed_ownership", + func, + ) + return func + + def on_v1_financial_connections_account_refreshed_transactions( + self, + func: "Callable[[V1FinancialConnectionsAccountRefreshedTransactionsEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountRefreshedTransactionsEvent` (`v1.financial_connections.account.refreshed_transactions`) event notification. + """ + self._register( + "v1.financial_connections.account.refreshed_transactions", + func, + ) + return func + + def on_v1_financial_connections_account_supported_payment_method_types_updated( + self, + func: "Callable[[V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent` (`v1.financial_connections.account.supported_payment_method_types_updated`) event notification. + """ + self._register( + "v1.financial_connections.account.supported_payment_method_types_updated", + func, + ) + return func + + def on_v1_financial_connections_account_upcoming_account_number_expiry( + self, + func: "Callable[[V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent` (`v1.financial_connections.account.upcoming_account_number_expiry`) event notification. + """ + self._register( + "v1.financial_connections.account.upcoming_account_number_expiry", + func, + ) + return func + + def on_v1_financial_connections_account_upcoming_deactivation( + self, + func: "Callable[[V1FinancialConnectionsAccountUpcomingDeactivationEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountUpcomingDeactivationEvent` (`v1.financial_connections.account.upcoming_deactivation`) event notification. + """ + self._register( + "v1.financial_connections.account.upcoming_deactivation", + func, + ) + return func + + def on_v1_identity_verification_session_canceled( + self, + func: "Callable[[V1IdentityVerificationSessionCanceledEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IdentityVerificationSessionCanceledEvent` (`v1.identity.verification_session.canceled`) event notification. + """ + self._register( + "v1.identity.verification_session.canceled", + func, + ) + return func + + def on_v1_identity_verification_session_created( + self, + func: "Callable[[V1IdentityVerificationSessionCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IdentityVerificationSessionCreatedEvent` (`v1.identity.verification_session.created`) event notification. + """ + self._register( + "v1.identity.verification_session.created", + func, + ) + return func + + def on_v1_identity_verification_session_processing( + self, + func: "Callable[[V1IdentityVerificationSessionProcessingEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IdentityVerificationSessionProcessingEvent` (`v1.identity.verification_session.processing`) event notification. + """ + self._register( + "v1.identity.verification_session.processing", + func, + ) + return func + + def on_v1_identity_verification_session_redacted( + self, + func: "Callable[[V1IdentityVerificationSessionRedactedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IdentityVerificationSessionRedactedEvent` (`v1.identity.verification_session.redacted`) event notification. + """ + self._register( + "v1.identity.verification_session.redacted", + func, + ) + return func + + def on_v1_identity_verification_session_requires_input( + self, + func: "Callable[[V1IdentityVerificationSessionRequiresInputEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IdentityVerificationSessionRequiresInputEvent` (`v1.identity.verification_session.requires_input`) event notification. + """ + self._register( + "v1.identity.verification_session.requires_input", + func, + ) + return func + + def on_v1_identity_verification_session_verified( + self, + func: "Callable[[V1IdentityVerificationSessionVerifiedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IdentityVerificationSessionVerifiedEvent` (`v1.identity.verification_session.verified`) event notification. + """ + self._register( + "v1.identity.verification_session.verified", + func, + ) + return func + + def on_v1_invoice_created( + self, + func: "Callable[[V1InvoiceCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceCreatedEvent` (`v1.invoice.created`) event notification. + """ + self._register( + "v1.invoice.created", + func, + ) + return func + + def on_v1_invoice_deleted( + self, + func: "Callable[[V1InvoiceDeletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceDeletedEvent` (`v1.invoice.deleted`) event notification. + """ + self._register( + "v1.invoice.deleted", + func, + ) + return func + + def on_v1_invoice_finalization_failed( + self, + func: "Callable[[V1InvoiceFinalizationFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceFinalizationFailedEvent` (`v1.invoice.finalization_failed`) event notification. + """ + self._register( + "v1.invoice.finalization_failed", + func, + ) + return func + + def on_v1_invoice_finalized( + self, + func: "Callable[[V1InvoiceFinalizedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceFinalizedEvent` (`v1.invoice.finalized`) event notification. + """ + self._register( + "v1.invoice.finalized", + func, + ) + return func + + def on_v1_invoiceitem_created( + self, + func: "Callable[[V1InvoiceitemCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceitemCreatedEvent` (`v1.invoiceitem.created`) event notification. + """ + self._register( + "v1.invoiceitem.created", + func, + ) + return func + + def on_v1_invoiceitem_deleted( + self, + func: "Callable[[V1InvoiceitemDeletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceitemDeletedEvent` (`v1.invoiceitem.deleted`) event notification. + """ + self._register( + "v1.invoiceitem.deleted", + func, + ) + return func + + def on_v1_invoice_marked_uncollectible( + self, + func: "Callable[[V1InvoiceMarkedUncollectibleEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceMarkedUncollectibleEvent` (`v1.invoice.marked_uncollectible`) event notification. + """ + self._register( + "v1.invoice.marked_uncollectible", + func, + ) + return func + + def on_v1_invoice_overdue( + self, + func: "Callable[[V1InvoiceOverdueEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceOverdueEvent` (`v1.invoice.overdue`) event notification. + """ + self._register( + "v1.invoice.overdue", + func, + ) + return func + + def on_v1_invoice_overpaid( + self, + func: "Callable[[V1InvoiceOverpaidEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceOverpaidEvent` (`v1.invoice.overpaid`) event notification. + """ + self._register( + "v1.invoice.overpaid", + func, + ) + return func + + def on_v1_invoice_paid( + self, + func: "Callable[[V1InvoicePaidEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoicePaidEvent` (`v1.invoice.paid`) event notification. + """ + self._register( + "v1.invoice.paid", + func, + ) + return func + + def on_v1_invoice_payment_action_required( + self, + func: "Callable[[V1InvoicePaymentActionRequiredEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoicePaymentActionRequiredEvent` (`v1.invoice.payment_action_required`) event notification. + """ + self._register( + "v1.invoice.payment_action_required", + func, + ) + return func + + def on_v1_invoice_payment_attempt_required( + self, + func: "Callable[[V1InvoicePaymentAttemptRequiredEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoicePaymentAttemptRequiredEvent` (`v1.invoice.payment_attempt_required`) event notification. + """ + self._register( + "v1.invoice.payment_attempt_required", + func, + ) + return func + + def on_v1_invoice_payment_failed( + self, + func: "Callable[[V1InvoicePaymentFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoicePaymentFailedEvent` (`v1.invoice.payment_failed`) event notification. + """ + self._register( + "v1.invoice.payment_failed", + func, + ) + return func + + def on_v1_invoice_payment_paid( + self, + func: "Callable[[V1InvoicePaymentPaidEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoicePaymentPaidEvent` (`v1.invoice_payment.paid`) event notification. + """ + self._register( + "v1.invoice_payment.paid", + func, + ) + return func + + def on_v1_invoice_payment_succeeded( + self, + func: "Callable[[V1InvoicePaymentSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoicePaymentSucceededEvent` (`v1.invoice.payment_succeeded`) event notification. + """ + self._register( + "v1.invoice.payment_succeeded", + func, + ) + return func + + def on_v1_invoice_sent( + self, + func: "Callable[[V1InvoiceSentEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceSentEvent` (`v1.invoice.sent`) event notification. + """ + self._register( + "v1.invoice.sent", + func, + ) + return func + + def on_v1_invoice_upcoming( + self, + func: "Callable[[V1InvoiceUpcomingEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceUpcomingEvent` (`v1.invoice.upcoming`) event notification. + """ + self._register( + "v1.invoice.upcoming", + func, + ) + return func + + def on_v1_invoice_updated( + self, + func: "Callable[[V1InvoiceUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceUpdatedEvent` (`v1.invoice.updated`) event notification. + """ + self._register( + "v1.invoice.updated", + func, + ) + return func + + def on_v1_invoice_voided( + self, + func: "Callable[[V1InvoiceVoidedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceVoidedEvent` (`v1.invoice.voided`) event notification. + """ + self._register( + "v1.invoice.voided", + func, + ) + return func + + def on_v1_invoice_will_be_due( + self, + func: "Callable[[V1InvoiceWillBeDueEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceWillBeDueEvent` (`v1.invoice.will_be_due`) event notification. + """ + self._register( + "v1.invoice.will_be_due", + func, + ) + return func + + def on_v1_issuing_authorization_created( + self, + func: "Callable[[V1IssuingAuthorizationCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingAuthorizationCreatedEvent` (`v1.issuing_authorization.created`) event notification. + """ + self._register( + "v1.issuing_authorization.created", + func, + ) + return func + + def on_v1_issuing_authorization_request( + self, + func: "Callable[[V1IssuingAuthorizationRequestEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingAuthorizationRequestEvent` (`v1.issuing_authorization.request`) event notification. + """ + self._register( + "v1.issuing_authorization.request", + func, + ) + return func + + def on_v1_issuing_authorization_updated( + self, + func: "Callable[[V1IssuingAuthorizationUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingAuthorizationUpdatedEvent` (`v1.issuing_authorization.updated`) event notification. + """ + self._register( + "v1.issuing_authorization.updated", + func, + ) + return func + + def on_v1_issuing_card_created( + self, + func: "Callable[[V1IssuingCardCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingCardCreatedEvent` (`v1.issuing_card.created`) event notification. + """ + self._register( + "v1.issuing_card.created", + func, + ) + return func + + def on_v1_issuing_cardholder_created( + self, + func: "Callable[[V1IssuingCardholderCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingCardholderCreatedEvent` (`v1.issuing_cardholder.created`) event notification. + """ + self._register( + "v1.issuing_cardholder.created", + func, + ) + return func + + def on_v1_issuing_cardholder_updated( + self, + func: "Callable[[V1IssuingCardholderUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingCardholderUpdatedEvent` (`v1.issuing_cardholder.updated`) event notification. + """ + self._register( + "v1.issuing_cardholder.updated", + func, + ) + return func + + def on_v1_issuing_card_updated( + self, + func: "Callable[[V1IssuingCardUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingCardUpdatedEvent` (`v1.issuing_card.updated`) event notification. + """ + self._register( + "v1.issuing_card.updated", + func, + ) + return func + + def on_v1_issuing_dispute_closed( + self, + func: "Callable[[V1IssuingDisputeClosedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingDisputeClosedEvent` (`v1.issuing_dispute.closed`) event notification. + """ + self._register( + "v1.issuing_dispute.closed", + func, + ) + return func + + def on_v1_issuing_dispute_created( + self, + func: "Callable[[V1IssuingDisputeCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingDisputeCreatedEvent` (`v1.issuing_dispute.created`) event notification. + """ + self._register( + "v1.issuing_dispute.created", + func, + ) + return func + + def on_v1_issuing_dispute_funds_reinstated( + self, + func: "Callable[[V1IssuingDisputeFundsReinstatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingDisputeFundsReinstatedEvent` (`v1.issuing_dispute.funds_reinstated`) event notification. + """ + self._register( + "v1.issuing_dispute.funds_reinstated", + func, + ) + return func + + def on_v1_issuing_dispute_funds_rescinded( + self, + func: "Callable[[V1IssuingDisputeFundsRescindedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingDisputeFundsRescindedEvent` (`v1.issuing_dispute.funds_rescinded`) event notification. + """ + self._register( + "v1.issuing_dispute.funds_rescinded", + func, + ) + return func + + def on_v1_issuing_dispute_submitted( + self, + func: "Callable[[V1IssuingDisputeSubmittedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingDisputeSubmittedEvent` (`v1.issuing_dispute.submitted`) event notification. + """ + self._register( + "v1.issuing_dispute.submitted", + func, + ) + return func + + def on_v1_issuing_dispute_updated( + self, + func: "Callable[[V1IssuingDisputeUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingDisputeUpdatedEvent` (`v1.issuing_dispute.updated`) event notification. + """ + self._register( + "v1.issuing_dispute.updated", + func, + ) + return func + + def on_v1_issuing_personalization_design_activated( + self, + func: "Callable[[V1IssuingPersonalizationDesignActivatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingPersonalizationDesignActivatedEvent` (`v1.issuing_personalization_design.activated`) event notification. + """ + self._register( + "v1.issuing_personalization_design.activated", + func, + ) + return func + + def on_v1_issuing_personalization_design_deactivated( + self, + func: "Callable[[V1IssuingPersonalizationDesignDeactivatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingPersonalizationDesignDeactivatedEvent` (`v1.issuing_personalization_design.deactivated`) event notification. + """ + self._register( + "v1.issuing_personalization_design.deactivated", + func, + ) + return func + + def on_v1_issuing_personalization_design_rejected( + self, + func: "Callable[[V1IssuingPersonalizationDesignRejectedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingPersonalizationDesignRejectedEvent` (`v1.issuing_personalization_design.rejected`) event notification. + """ + self._register( + "v1.issuing_personalization_design.rejected", + func, + ) + return func + + def on_v1_issuing_personalization_design_updated( + self, + func: "Callable[[V1IssuingPersonalizationDesignUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingPersonalizationDesignUpdatedEvent` (`v1.issuing_personalization_design.updated`) event notification. + """ + self._register( + "v1.issuing_personalization_design.updated", + func, + ) + return func + + def on_v1_issuing_token_created( + self, + func: "Callable[[V1IssuingTokenCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingTokenCreatedEvent` (`v1.issuing_token.created`) event notification. + """ + self._register( + "v1.issuing_token.created", + func, + ) + return func + + def on_v1_issuing_token_updated( + self, + func: "Callable[[V1IssuingTokenUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingTokenUpdatedEvent` (`v1.issuing_token.updated`) event notification. + """ + self._register( + "v1.issuing_token.updated", + func, + ) + return func + + def on_v1_issuing_transaction_created( + self, + func: "Callable[[V1IssuingTransactionCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingTransactionCreatedEvent` (`v1.issuing_transaction.created`) event notification. + """ + self._register( + "v1.issuing_transaction.created", + func, + ) + return func + + def on_v1_issuing_transaction_purchase_details_receipt_updated( + self, + func: "Callable[[V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent` (`v1.issuing_transaction.purchase_details_receipt_updated`) event notification. + """ + self._register( + "v1.issuing_transaction.purchase_details_receipt_updated", + func, + ) + return func + + def on_v1_issuing_transaction_updated( + self, + func: "Callable[[V1IssuingTransactionUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1IssuingTransactionUpdatedEvent` (`v1.issuing_transaction.updated`) event notification. + """ + self._register( + "v1.issuing_transaction.updated", + func, + ) + return func + + def on_v1_mandate_updated( + self, + func: "Callable[[V1MandateUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1MandateUpdatedEvent` (`v1.mandate.updated`) event notification. + """ + self._register( + "v1.mandate.updated", + func, + ) + return func + + def on_v1_payment_intent_amount_capturable_updated( + self, + func: "Callable[[V1PaymentIntentAmountCapturableUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PaymentIntentAmountCapturableUpdatedEvent` (`v1.payment_intent.amount_capturable_updated`) event notification. + """ + self._register( + "v1.payment_intent.amount_capturable_updated", + func, + ) + return func + + def on_v1_payment_intent_canceled( + self, + func: "Callable[[V1PaymentIntentCanceledEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PaymentIntentCanceledEvent` (`v1.payment_intent.canceled`) event notification. + """ + self._register( + "v1.payment_intent.canceled", + func, + ) + return func + + def on_v1_payment_intent_created( + self, + func: "Callable[[V1PaymentIntentCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PaymentIntentCreatedEvent` (`v1.payment_intent.created`) event notification. + """ + self._register( + "v1.payment_intent.created", + func, + ) + return func + + def on_v1_payment_intent_partially_funded( + self, + func: "Callable[[V1PaymentIntentPartiallyFundedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PaymentIntentPartiallyFundedEvent` (`v1.payment_intent.partially_funded`) event notification. + """ + self._register( + "v1.payment_intent.partially_funded", + func, + ) + return func + + def on_v1_payment_intent_payment_failed( + self, + func: "Callable[[V1PaymentIntentPaymentFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PaymentIntentPaymentFailedEvent` (`v1.payment_intent.payment_failed`) event notification. + """ + self._register( + "v1.payment_intent.payment_failed", + func, + ) + return func + + def on_v1_payment_intent_processing( + self, + func: "Callable[[V1PaymentIntentProcessingEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PaymentIntentProcessingEvent` (`v1.payment_intent.processing`) event notification. + """ + self._register( + "v1.payment_intent.processing", + func, + ) + return func + + def on_v1_payment_intent_requires_action( + self, + func: "Callable[[V1PaymentIntentRequiresActionEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PaymentIntentRequiresActionEvent` (`v1.payment_intent.requires_action`) event notification. + """ + self._register( + "v1.payment_intent.requires_action", + func, + ) + return func + + def on_v1_payment_intent_succeeded( + self, + func: "Callable[[V1PaymentIntentSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PaymentIntentSucceededEvent` (`v1.payment_intent.succeeded`) event notification. + """ + self._register( + "v1.payment_intent.succeeded", + func, + ) + return func + + def on_v1_payment_link_created( + self, + func: "Callable[[V1PaymentLinkCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PaymentLinkCreatedEvent` (`v1.payment_link.created`) event notification. + """ + self._register( + "v1.payment_link.created", + func, + ) + return func + + def on_v1_payment_link_updated( + self, + func: "Callable[[V1PaymentLinkUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PaymentLinkUpdatedEvent` (`v1.payment_link.updated`) event notification. + """ + self._register( + "v1.payment_link.updated", + func, + ) + return func + + def on_v1_payment_method_attached( + self, + func: "Callable[[V1PaymentMethodAttachedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PaymentMethodAttachedEvent` (`v1.payment_method.attached`) event notification. + """ + self._register( + "v1.payment_method.attached", + func, + ) + return func + + def on_v1_payment_method_automatically_updated( + self, + func: "Callable[[V1PaymentMethodAutomaticallyUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PaymentMethodAutomaticallyUpdatedEvent` (`v1.payment_method.automatically_updated`) event notification. + """ + self._register( + "v1.payment_method.automatically_updated", + func, + ) + return func + + def on_v1_payment_method_detached( + self, + func: "Callable[[V1PaymentMethodDetachedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PaymentMethodDetachedEvent` (`v1.payment_method.detached`) event notification. + """ + self._register( + "v1.payment_method.detached", + func, + ) + return func + + def on_v1_payment_method_updated( + self, + func: "Callable[[V1PaymentMethodUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PaymentMethodUpdatedEvent` (`v1.payment_method.updated`) event notification. + """ + self._register( + "v1.payment_method.updated", + func, + ) + return func + + def on_v1_payout_canceled( + self, + func: "Callable[[V1PayoutCanceledEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PayoutCanceledEvent` (`v1.payout.canceled`) event notification. + """ + self._register( + "v1.payout.canceled", + func, + ) + return func + + def on_v1_payout_created( + self, + func: "Callable[[V1PayoutCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PayoutCreatedEvent` (`v1.payout.created`) event notification. + """ + self._register( + "v1.payout.created", + func, + ) + return func + + def on_v1_payout_failed( + self, + func: "Callable[[V1PayoutFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PayoutFailedEvent` (`v1.payout.failed`) event notification. + """ + self._register( + "v1.payout.failed", + func, + ) + return func + + def on_v1_payout_paid( + self, + func: "Callable[[V1PayoutPaidEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PayoutPaidEvent` (`v1.payout.paid`) event notification. + """ + self._register( + "v1.payout.paid", + func, + ) + return func + + def on_v1_payout_reconciliation_completed( + self, + func: "Callable[[V1PayoutReconciliationCompletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PayoutReconciliationCompletedEvent` (`v1.payout.reconciliation_completed`) event notification. + """ + self._register( + "v1.payout.reconciliation_completed", + func, + ) + return func + + def on_v1_payout_updated( + self, + func: "Callable[[V1PayoutUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PayoutUpdatedEvent` (`v1.payout.updated`) event notification. + """ + self._register( + "v1.payout.updated", + func, + ) + return func + + def on_v1_person_created( + self, + func: "Callable[[V1PersonCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PersonCreatedEvent` (`v1.person.created`) event notification. + """ + self._register( + "v1.person.created", + func, + ) + return func + + def on_v1_person_deleted( + self, + func: "Callable[[V1PersonDeletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PersonDeletedEvent` (`v1.person.deleted`) event notification. + """ + self._register( + "v1.person.deleted", + func, + ) + return func + + def on_v1_person_updated( + self, + func: "Callable[[V1PersonUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PersonUpdatedEvent` (`v1.person.updated`) event notification. + """ + self._register( + "v1.person.updated", + func, + ) + return func + + def on_v1_plan_created( + self, + func: "Callable[[V1PlanCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PlanCreatedEvent` (`v1.plan.created`) event notification. + """ + self._register( + "v1.plan.created", + func, + ) + return func + + def on_v1_plan_deleted( + self, + func: "Callable[[V1PlanDeletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PlanDeletedEvent` (`v1.plan.deleted`) event notification. + """ + self._register( + "v1.plan.deleted", + func, + ) + return func + + def on_v1_plan_updated( + self, + func: "Callable[[V1PlanUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PlanUpdatedEvent` (`v1.plan.updated`) event notification. + """ + self._register( + "v1.plan.updated", + func, + ) + return func + + def on_v1_price_created( + self, + func: "Callable[[V1PriceCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PriceCreatedEvent` (`v1.price.created`) event notification. + """ + self._register( + "v1.price.created", + func, + ) + return func + + def on_v1_price_deleted( + self, + func: "Callable[[V1PriceDeletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PriceDeletedEvent` (`v1.price.deleted`) event notification. + """ + self._register( + "v1.price.deleted", + func, + ) + return func + + def on_v1_price_updated( + self, + func: "Callable[[V1PriceUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PriceUpdatedEvent` (`v1.price.updated`) event notification. + """ + self._register( + "v1.price.updated", + func, + ) + return func + + def on_v1_product_created( + self, + func: "Callable[[V1ProductCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ProductCreatedEvent` (`v1.product.created`) event notification. + """ + self._register( + "v1.product.created", + func, + ) + return func + + def on_v1_product_deleted( + self, + func: "Callable[[V1ProductDeletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ProductDeletedEvent` (`v1.product.deleted`) event notification. + """ + self._register( + "v1.product.deleted", + func, + ) + return func + + def on_v1_product_updated( + self, + func: "Callable[[V1ProductUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ProductUpdatedEvent` (`v1.product.updated`) event notification. + """ + self._register( + "v1.product.updated", + func, + ) + return func + + def on_v1_promotion_code_created( + self, + func: "Callable[[V1PromotionCodeCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PromotionCodeCreatedEvent` (`v1.promotion_code.created`) event notification. + """ + self._register( + "v1.promotion_code.created", + func, + ) + return func + + def on_v1_promotion_code_updated( + self, + func: "Callable[[V1PromotionCodeUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PromotionCodeUpdatedEvent` (`v1.promotion_code.updated`) event notification. + """ + self._register( + "v1.promotion_code.updated", + func, + ) + return func + + def on_v1_quote_accepted( + self, + func: "Callable[[V1QuoteAcceptedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1QuoteAcceptedEvent` (`v1.quote.accepted`) event notification. + """ + self._register( + "v1.quote.accepted", + func, + ) + return func + + def on_v1_quote_canceled( + self, + func: "Callable[[V1QuoteCanceledEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1QuoteCanceledEvent` (`v1.quote.canceled`) event notification. + """ + self._register( + "v1.quote.canceled", + func, + ) + return func + + def on_v1_quote_created( + self, + func: "Callable[[V1QuoteCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1QuoteCreatedEvent` (`v1.quote.created`) event notification. + """ + self._register( + "v1.quote.created", + func, + ) + return func + + def on_v1_quote_finalized( + self, + func: "Callable[[V1QuoteFinalizedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1QuoteFinalizedEvent` (`v1.quote.finalized`) event notification. + """ + self._register( + "v1.quote.finalized", + func, + ) + return func + + def on_v1_radar_early_fraud_warning_created( + self, + func: "Callable[[V1RadarEarlyFraudWarningCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1RadarEarlyFraudWarningCreatedEvent` (`v1.radar.early_fraud_warning.created`) event notification. + """ + self._register( + "v1.radar.early_fraud_warning.created", + func, + ) + return func + + def on_v1_radar_early_fraud_warning_updated( + self, + func: "Callable[[V1RadarEarlyFraudWarningUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1RadarEarlyFraudWarningUpdatedEvent` (`v1.radar.early_fraud_warning.updated`) event notification. + """ + self._register( + "v1.radar.early_fraud_warning.updated", + func, + ) + return func + + def on_v1_refund_created( + self, + func: "Callable[[V1RefundCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1RefundCreatedEvent` (`v1.refund.created`) event notification. + """ + self._register( + "v1.refund.created", + func, + ) + return func + + def on_v1_refund_failed( + self, + func: "Callable[[V1RefundFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1RefundFailedEvent` (`v1.refund.failed`) event notification. + """ + self._register( + "v1.refund.failed", + func, + ) + return func + + def on_v1_refund_updated( + self, + func: "Callable[[V1RefundUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1RefundUpdatedEvent` (`v1.refund.updated`) event notification. + """ + self._register( + "v1.refund.updated", + func, + ) + return func + + def on_v1_review_closed( + self, + func: "Callable[[V1ReviewClosedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ReviewClosedEvent` (`v1.review.closed`) event notification. + """ + self._register( + "v1.review.closed", + func, + ) + return func + + def on_v1_review_opened( + self, + func: "Callable[[V1ReviewOpenedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1ReviewOpenedEvent` (`v1.review.opened`) event notification. + """ + self._register( + "v1.review.opened", + func, + ) + return func + + def on_v1_setup_intent_canceled( + self, + func: "Callable[[V1SetupIntentCanceledEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SetupIntentCanceledEvent` (`v1.setup_intent.canceled`) event notification. + """ + self._register( + "v1.setup_intent.canceled", + func, + ) + return func + + def on_v1_setup_intent_created( + self, + func: "Callable[[V1SetupIntentCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SetupIntentCreatedEvent` (`v1.setup_intent.created`) event notification. + """ + self._register( + "v1.setup_intent.created", + func, + ) + return func + + def on_v1_setup_intent_requires_action( + self, + func: "Callable[[V1SetupIntentRequiresActionEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SetupIntentRequiresActionEvent` (`v1.setup_intent.requires_action`) event notification. + """ + self._register( + "v1.setup_intent.requires_action", + func, + ) + return func + + def on_v1_setup_intent_setup_failed( + self, + func: "Callable[[V1SetupIntentSetupFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SetupIntentSetupFailedEvent` (`v1.setup_intent.setup_failed`) event notification. + """ + self._register( + "v1.setup_intent.setup_failed", + func, + ) + return func + + def on_v1_setup_intent_succeeded( + self, + func: "Callable[[V1SetupIntentSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SetupIntentSucceededEvent` (`v1.setup_intent.succeeded`) event notification. + """ + self._register( + "v1.setup_intent.succeeded", + func, + ) + return func + + def on_v1_sigma_scheduled_query_run_created( + self, + func: "Callable[[V1SigmaScheduledQueryRunCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SigmaScheduledQueryRunCreatedEvent` (`v1.sigma.scheduled_query_run.created`) event notification. + """ + self._register( + "v1.sigma.scheduled_query_run.created", + func, + ) + return func + + def on_v1_source_canceled( + self, + func: "Callable[[V1SourceCanceledEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SourceCanceledEvent` (`v1.source.canceled`) event notification. + """ + self._register( + "v1.source.canceled", + func, + ) + return func + + def on_v1_source_chargeable( + self, + func: "Callable[[V1SourceChargeableEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SourceChargeableEvent` (`v1.source.chargeable`) event notification. + """ + self._register( + "v1.source.chargeable", + func, + ) + return func + + def on_v1_source_failed( + self, + func: "Callable[[V1SourceFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SourceFailedEvent` (`v1.source.failed`) event notification. + """ + self._register( + "v1.source.failed", + func, + ) + return func + + def on_v1_source_refund_attributes_required( + self, + func: "Callable[[V1SourceRefundAttributesRequiredEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SourceRefundAttributesRequiredEvent` (`v1.source.refund_attributes_required`) event notification. + """ + self._register( + "v1.source.refund_attributes_required", + func, + ) + return func + + def on_v1_subscription_schedule_aborted( + self, + func: "Callable[[V1SubscriptionScheduleAbortedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SubscriptionScheduleAbortedEvent` (`v1.subscription_schedule.aborted`) event notification. + """ + self._register( + "v1.subscription_schedule.aborted", + func, + ) + return func + + def on_v1_subscription_schedule_canceled( + self, + func: "Callable[[V1SubscriptionScheduleCanceledEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SubscriptionScheduleCanceledEvent` (`v1.subscription_schedule.canceled`) event notification. + """ + self._register( + "v1.subscription_schedule.canceled", + func, + ) + return func + + def on_v1_subscription_schedule_completed( + self, + func: "Callable[[V1SubscriptionScheduleCompletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SubscriptionScheduleCompletedEvent` (`v1.subscription_schedule.completed`) event notification. + """ + self._register( + "v1.subscription_schedule.completed", + func, + ) + return func + + def on_v1_subscription_schedule_created( + self, + func: "Callable[[V1SubscriptionScheduleCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SubscriptionScheduleCreatedEvent` (`v1.subscription_schedule.created`) event notification. + """ + self._register( + "v1.subscription_schedule.created", + func, + ) + return func + + def on_v1_subscription_schedule_expiring( + self, + func: "Callable[[V1SubscriptionScheduleExpiringEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SubscriptionScheduleExpiringEvent` (`v1.subscription_schedule.expiring`) event notification. + """ + self._register( + "v1.subscription_schedule.expiring", + func, + ) + return func + + def on_v1_subscription_schedule_released( + self, + func: "Callable[[V1SubscriptionScheduleReleasedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SubscriptionScheduleReleasedEvent` (`v1.subscription_schedule.released`) event notification. + """ + self._register( + "v1.subscription_schedule.released", + func, + ) + return func + + def on_v1_subscription_schedule_updated( + self, + func: "Callable[[V1SubscriptionScheduleUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SubscriptionScheduleUpdatedEvent` (`v1.subscription_schedule.updated`) event notification. + """ + self._register( + "v1.subscription_schedule.updated", + func, + ) + return func + + def on_v1_tax_rate_created( + self, + func: "Callable[[V1TaxRateCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TaxRateCreatedEvent` (`v1.tax_rate.created`) event notification. + """ + self._register( + "v1.tax_rate.created", + func, + ) + return func + + def on_v1_tax_rate_updated( + self, + func: "Callable[[V1TaxRateUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TaxRateUpdatedEvent` (`v1.tax_rate.updated`) event notification. + """ + self._register( + "v1.tax_rate.updated", + func, + ) + return func + + def on_v1_tax_settings_updated( + self, + func: "Callable[[V1TaxSettingsUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TaxSettingsUpdatedEvent` (`v1.tax.settings.updated`) event notification. + """ + self._register( + "v1.tax.settings.updated", + func, + ) + return func + + def on_v1_terminal_reader_action_failed( + self, + func: "Callable[[V1TerminalReaderActionFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TerminalReaderActionFailedEvent` (`v1.terminal.reader.action_failed`) event notification. + """ + self._register( + "v1.terminal.reader.action_failed", + func, + ) + return func + + def on_v1_terminal_reader_action_succeeded( + self, + func: "Callable[[V1TerminalReaderActionSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TerminalReaderActionSucceededEvent` (`v1.terminal.reader.action_succeeded`) event notification. + """ + self._register( + "v1.terminal.reader.action_succeeded", + func, + ) + return func + + def on_v1_terminal_reader_action_updated( + self, + func: "Callable[[V1TerminalReaderActionUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TerminalReaderActionUpdatedEvent` (`v1.terminal.reader.action_updated`) event notification. + """ + self._register( + "v1.terminal.reader.action_updated", + func, + ) + return func + + def on_v1_test_helpers_test_clock_advancing( + self, + func: "Callable[[V1TestHelpersTestClockAdvancingEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TestHelpersTestClockAdvancingEvent` (`v1.test_helpers.test_clock.advancing`) event notification. + """ + self._register( + "v1.test_helpers.test_clock.advancing", + func, + ) + return func + + def on_v1_test_helpers_test_clock_created( + self, + func: "Callable[[V1TestHelpersTestClockCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TestHelpersTestClockCreatedEvent` (`v1.test_helpers.test_clock.created`) event notification. + """ + self._register( + "v1.test_helpers.test_clock.created", + func, + ) + return func + + def on_v1_test_helpers_test_clock_deleted( + self, + func: "Callable[[V1TestHelpersTestClockDeletedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TestHelpersTestClockDeletedEvent` (`v1.test_helpers.test_clock.deleted`) event notification. + """ + self._register( + "v1.test_helpers.test_clock.deleted", + func, + ) + return func + + def on_v1_test_helpers_test_clock_internal_failure( + self, + func: "Callable[[V1TestHelpersTestClockInternalFailureEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TestHelpersTestClockInternalFailureEvent` (`v1.test_helpers.test_clock.internal_failure`) event notification. + """ + self._register( + "v1.test_helpers.test_clock.internal_failure", + func, + ) + return func + + def on_v1_test_helpers_test_clock_ready( + self, + func: "Callable[[V1TestHelpersTestClockReadyEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TestHelpersTestClockReadyEvent` (`v1.test_helpers.test_clock.ready`) event notification. + """ + self._register( + "v1.test_helpers.test_clock.ready", + func, + ) + return func + + def on_v1_topup_canceled( + self, + func: "Callable[[V1TopupCanceledEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TopupCanceledEvent` (`v1.topup.canceled`) event notification. + """ + self._register( + "v1.topup.canceled", + func, + ) + return func + + def on_v1_topup_created( + self, + func: "Callable[[V1TopupCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TopupCreatedEvent` (`v1.topup.created`) event notification. + """ + self._register( + "v1.topup.created", + func, + ) + return func + + def on_v1_topup_failed( + self, + func: "Callable[[V1TopupFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TopupFailedEvent` (`v1.topup.failed`) event notification. + """ + self._register( + "v1.topup.failed", + func, + ) + return func + + def on_v1_topup_reversed( + self, + func: "Callable[[V1TopupReversedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TopupReversedEvent` (`v1.topup.reversed`) event notification. + """ + self._register( + "v1.topup.reversed", + func, + ) + return func + + def on_v1_topup_succeeded( + self, + func: "Callable[[V1TopupSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TopupSucceededEvent` (`v1.topup.succeeded`) event notification. + """ + self._register( + "v1.topup.succeeded", + func, + ) + return func + + def on_v1_transfer_created( + self, + func: "Callable[[V1TransferCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TransferCreatedEvent` (`v1.transfer.created`) event notification. + """ + self._register( + "v1.transfer.created", + func, + ) + return func + + def on_v1_transfer_reversed( + self, + func: "Callable[[V1TransferReversedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TransferReversedEvent` (`v1.transfer.reversed`) event notification. + """ + self._register( + "v1.transfer.reversed", + func, + ) + return func + + def on_v1_transfer_updated( + self, + func: "Callable[[V1TransferUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1TransferUpdatedEvent` (`v1.transfer.updated`) event notification. + """ + self._register( + "v1.transfer.updated", func, ) return func diff --git a/stripe/_file.py b/stripe/_file.py index 55dc1d07d..8bf982e72 100644 --- a/stripe/_file.py +++ b/stripe/_file.py @@ -16,7 +16,7 @@ class File(CreateableAPIResource["File"], ListableAPIResource["File"]): """ This object represents files hosted on Stripe's servers. You can upload - files with the [create file](https://api.stripe.com#create_file) request + files with the [create file](https://docs.stripe.com/api#create_file) request (for example, when uploading dispute evidence). Stripe also creates files independently (for example, the results of a [Sigma scheduled query](https://docs.stripe.com/api#scheduled_queries)). @@ -43,7 +43,7 @@ class File(CreateableAPIResource["File"], ListableAPIResource["File"]): """ links: Optional[ListObject["FileLink"]] """ - A list of [file links](https://api.stripe.com#file_links) that point at this file. + A list of [file links](https://docs.stripe.com/api#file_links) that point at this file. """ object: Literal["file"] """ diff --git a/stripe/_invoice.py b/stripe/_invoice.py index d5339451c..0bbe63d17 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -91,7 +91,7 @@ class Invoice( Invoices are statements of amounts owed by a customer, and are either generated one-off, or generated periodically from a subscription. - They contain [invoice items](https://api.stripe.com#invoiceitems), and proration adjustments + They contain [invoice items](https://docs.stripe.com/api#invoiceitems), and proration adjustments that may be caused by subscription upgrades/downgrades (if necessary). If your invoice is configured to be billed through automatic charges, @@ -416,7 +416,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] """ @@ -477,6 +477,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", @@ -487,6 +488,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_no_successful_transaction_refresh", "forwarding_api_inactive", "forwarding_api_invalid_parameter", @@ -540,6 +543,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", @@ -691,7 +695,7 @@ class LastFinalizationError(StripeObject): """ A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - Later, you can use [PaymentIntents](https://api.stripe.com#payment_intents) to drive the payment flow. + Later, you can use [PaymentIntents](https://docs.stripe.com/api#payment_intents) to drive the payment flow. Create a SetupIntent when you're ready to collect your customer's payment credentials. Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. @@ -702,9 +706,9 @@ class LastFinalizationError(StripeObject): For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - If you use the SetupIntent with a [Customer](https://api.stripe.com#setup_intent_object-customer), + If you use the SetupIntent with a [Customer](https://docs.stripe.com/api#setup_intent_object-customer), it automatically attaches the resulting payment method to that Customer after successful setup. - We recommend using SetupIntents or [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) on + We recommend using SetupIntents or [setup_future_usage](https://docs.stripe.com/api#payment_intent_object-setup_future_usage) on PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. @@ -795,6 +799,79 @@ class Bancontact(StripeObject): """ class Billie(StripeObject): + class CompanyDetails(StripeObject): + class RegisteredAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code. + """ + line1: Optional[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + registered_address: Optional[RegisteredAddress] + registered_name: Optional[str] + """ + Company or entity name. + """ + registration_number: Optional[str] + """ + The official registration number for the given registration type. + """ + registration_type: Optional[ + Literal[ + "ch_ein", + "de_hrb", + "dk_cvr", + "es_cif", + "fi_tunnus", + "fr_siren", + "fr_siret", + "it_rea", + "nl_kvk", + "no_org_number", + "no_pno", + "se_org_number", + "se_pno", + "uk_crn", + ] + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: Optional[str] + """ + VAT ID number. + """ + _inner_class_types = { + "registered_address": RegisteredAddress, + } + + company_details: Optional[CompanyDetails] + reference: Optional[str] + """ + An identifier or reference that this payment corresponds to. + """ + _inner_class_types = {"company_details": CompanyDetails} + + class Blik(StripeObject): pass class Card(StripeObject): @@ -983,6 +1060,10 @@ class Filters(StripeObject): """ If paying by `billie`, this sub-hash contains details about the Billie payment method options to pass to the invoice's PaymentIntent. """ + blik: Optional[Blik] + """ + If paying by `blik`, this sub-hash contains details about the Blik payment method options to pass to the invoice's PaymentIntent. + """ card: Optional[Card] """ If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. @@ -1019,6 +1100,7 @@ class Filters(StripeObject): "acss_debit": AcssDebit, "bancontact": Bancontact, "billie": Billie, + "blik": Blik, "card": Card, "customer_balance": CustomerBalance, "konbini": Konbini, @@ -1051,6 +1133,7 @@ class Filters(StripeObject): "bacs_debit", "bancontact", "billie", + "blik", "boleto", "card", "cashapp", @@ -1235,6 +1318,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] """ @@ -1629,7 +1733,7 @@ class TaxRateDetails(StripeObject): """ rendering: Optional[Rendering] """ - The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + The rendering-related settings that control how invoices render in customer-facing interfaces such as the PDF or hosted invoice page. """ shipping_cost: Optional[ShippingCost] """ @@ -1653,6 +1757,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 """ @@ -2428,7 +2533,8 @@ def modify( ) -> "Invoice": """ Draft invoices are fully editable. Once an invoice is [finalized](https://docs.stripe.com/docs/billing/invoices/workflow#finalized), - monetary values, as well as collection_method, become uneditable. + you can no longer change most of its details, including monetary values and collection_method. For most invoices, + this also includes description. If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or [automatically reconciling](https://docs.stripe.com/docs/billing/invoices/reconciliation) invoices, pass @@ -2450,7 +2556,8 @@ async def modify_async( ) -> "Invoice": """ Draft invoices are fully editable. Once an invoice is [finalized](https://docs.stripe.com/docs/billing/invoices/workflow#finalized), - monetary values, as well as collection_method, become uneditable. + you can no longer change most of its details, including monetary values and collection_method. For most invoices, + this also includes description. If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or [automatically reconciling](https://docs.stripe.com/docs/billing/invoices/reconciliation) invoices, pass @@ -3155,6 +3262,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 e7c57ae33..433971ae4 100644 --- a/stripe/_invoice_item.py +++ b/stripe/_invoice_item.py @@ -53,6 +53,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 Parent(StripeObject): class SubscriptionDetails(StripeObject): subscription: str @@ -148,7 +154,7 @@ class DiscountAmount(StripeObject): """ discount_amounts: List[DiscountAmount] """ - Discount amounts applied when the proration was created. + Discount amounts applied when the proration was created. This field is only populated for prorations created from subscriptions with `billing_mode=flexible`. """ _inner_class_types = { "credited_items": CreditedItems, @@ -205,6 +211,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`. @@ -479,6 +489,7 @@ async def retrieve_async( return instance _inner_class_types = { + "invoicing_rules": InvoicingRule, "parent": Parent, "period": Period, "pricing": Pricing, diff --git a/stripe/_invoice_payment.py b/stripe/_invoice_payment.py index 41d54abed..27bd7b680 100644 --- a/stripe/_invoice_payment.py +++ b/stripe/_invoice_payment.py @@ -24,7 +24,7 @@ class InvoicePayment(ListableAPIResource["InvoicePayment"]): """ Invoice Payments represent payments made against invoices. Invoice Payments can be accessed in two ways: - 1. By expanding the `payments` field on the [Invoice](https://api.stripe.com#invoice) resource. + 1. By expanding the `payments` field on the [Invoice](https://docs.stripe.com/api#invoice) resource. 2. By using the Invoice Payment retrieve and list endpoints. Invoice Payments include the mapping between payment objects, such as Payment Intent, and Invoices. @@ -37,7 +37,7 @@ class InvoicePayment(ListableAPIResource["InvoicePayment"]): class Payment(StripeObject): charge: Optional[ExpandableField["Charge"]] """ - ID of the successful charge for this payment when `type` is `charge`.Note: charge is only surfaced if the charge object is not associated with a payment intent. If the charge object does have a payment intent, the Invoice Payment surfaces the payment intent instead. + ID of the successful charge for this payment when `type` is `charge`. Note: charge is only surfaced if the charge object is not associated with a payment intent. If the charge object does have a payment intent, the Invoice Payment surfaces the payment intent instead. """ payment_intent: Optional[ExpandableField["PaymentIntent"]] """ diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 1e05f1e5b..44dfb5626 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -168,7 +168,8 @@ def update( ) -> "Invoice": """ Draft invoices are fully editable. Once an invoice is [finalized](https://docs.stripe.com/docs/billing/invoices/workflow#finalized), - monetary values, as well as collection_method, become uneditable. + you can no longer change most of its details, including monetary values and collection_method. For most invoices, + this also includes description. If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or [automatically reconciling](https://docs.stripe.com/docs/billing/invoices/reconciliation) invoices, pass @@ -194,7 +195,8 @@ async def update_async( ) -> "Invoice": """ Draft invoices are fully editable. Once an invoice is [finalized](https://docs.stripe.com/docs/billing/invoices/workflow#finalized), - monetary values, as well as collection_method, become uneditable. + you can no longer change most of its details, including monetary values and collection_method. For most invoices, + this also includes description. If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or [automatically reconciling](https://docs.stripe.com/docs/billing/invoices/reconciliation) invoices, pass diff --git a/stripe/_line_item.py b/stripe/_line_item.py index 8bf726e48..1788e4fb9 100644 --- a/stripe/_line_item.py +++ b/stripe/_line_item.py @@ -29,7 +29,7 @@ class Discount(StripeObject): """ discount: "DiscountResource" """ - A discount represents the actual application of a [coupon](https://api.stripe.com#coupons) or [promotion code](https://api.stripe.com#promotion_codes). + A discount represents the actual application of a [coupon](https://docs.stripe.com/api#coupons) or [promotion code](https://docs.stripe.com/api#promotion_codes). It contains information about when the discount began, when it will end, and what it is applied to. Related guide: [Applying discounts to subscriptions](https://docs.stripe.com/billing/subscriptions/discounts) diff --git a/stripe/_mandate.py b/stripe/_mandate.py index 4dda0d909..f31e6d649 100644 --- a/stripe/_mandate.py +++ b/stripe/_mandate.py @@ -125,8 +125,38 @@ class BacsDebit(StripeObject): The URL that will contain the mandate that the customer has signed. """ + class Blik(StripeObject): + expires_at: Optional[int] + """ + Date at which the mandate expires. + """ + type: Literal["off_session"] + """ + Type of the mandate. + """ + 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 @@ -301,6 +331,7 @@ class UsBankAccount(StripeObject): amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] + blik: Optional[Blik] card: Optional[Card] cashapp: Optional[Cashapp] kakao_pay: Optional[KakaoPay] @@ -326,6 +357,7 @@ class UsBankAccount(StripeObject): "amazon_pay": AmazonPay, "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, + "blik": Blik, "card": Card, "cashapp": Cashapp, "kakao_pay": KakaoPay, diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index 3b7720ff8..377c69906 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -23,6 +23,7 @@ "application": ("stripe._application", "Application"), "application_fee": ("stripe._application_fee", "ApplicationFee"), "fee_refund": ("stripe._application_fee_refund", "ApplicationFeeRefund"), + "apps.install": ("stripe.apps._install", "Install"), "apps.secret": ("stripe.apps._secret", "Secret"), "balance": ("stripe._balance", "Balance"), "balance_settings": ("stripe._balance_settings", "BalanceSettings"), @@ -200,6 +201,10 @@ "plan": ("stripe._plan", "Plan"), "price": ("stripe._price", "Price"), "product": ("stripe._product", "Product"), + "product_catalog.trial_offer": ( + "stripe.product_catalog._trial_offer", + "TrialOffer", + ), "product_feature": ("stripe._product_feature", "ProductFeature"), "promotion_code": ("stripe._promotion_code", "PromotionCode"), "quote": ("stripe._quote", "Quote"), @@ -226,7 +231,6 @@ "stripe._reserve_transaction", "ReserveTransaction", ), - "transfer_reversal": ("stripe._transfer_reversal", "TransferReversal"), "review": ("stripe._review", "Review"), "setup_attempt": ("stripe._setup_attempt", "SetupAttempt"), "setup_intent": ("stripe._setup_intent", "SetupIntent"), @@ -253,6 +257,7 @@ "stripe.tax._calculation_line_item", "CalculationLineItem", ), + "tax.location": ("stripe.tax._location", "Location"), "tax.registration": ("stripe.tax._registration", "Registration"), "tax.settings": ("stripe.tax._settings", "Settings"), "tax.transaction": ("stripe.tax._transaction", "Transaction"), @@ -285,9 +290,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"), "treasury.credit_reversal": ( "stripe.treasury._credit_reversal", "CreditReversal", diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 1df8dcc20..67bebe320 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -561,7 +561,10 @@ class ThreeDSecure(StripeObject): Additional information about why 3D Secure succeeded or failed, based on the `result`. """ version: Optional[ - Union[Literal["1.0.2", "2.1.0", "2.2.0"], str] + Union[ + Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"], + str, + ] ] """ The version of 3D Secure that was used. @@ -577,19 +580,24 @@ class ApplePay(StripeObject): class GooglePay(StripeObject): pass + class Link(StripeObject): + pass + apple_pay: Optional[ApplePay] dynamic_last4: Optional[str] """ (For tokenized numbers only.) The last four digits of the device account number. """ google_pay: Optional[GooglePay] + link: Optional[Link] type: str """ - The type of the card wallet, one of `apple_pay` or `google_pay`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. """ _inner_class_types = { "apple_pay": ApplePay, "google_pay": GooglePay, + "link": Link, } authorization_code: Optional[str] @@ -1430,6 +1438,10 @@ class Link(StripeObject): """ Two-letter ISO code representing the funding source country beneath the Link payment. You could use this attribute to get a sense of international fees. """ + funding_source_group: Optional[str] + """ + The [funding source group code](https://docs.stripe.com/payments/link/link-payment-methods) applied to this Link payment at confirmation time. + """ class MbWay(StripeObject): pass @@ -1463,6 +1475,16 @@ class Card(StripeObject): """ _inner_class_types = {"card": Card} + class Momo(StripeObject): + fingerprint: Optional[str] + """ + Uniquely identifies this particular MoMo account. You can use this attribute to check whether two MoMo accounts are the same. + """ + mandate: Optional[str] + """ + ID of the multi-use Mandate created by, or used to make, this MoMo payment. + """ + class Multibanco(StripeObject): entity: Optional[str] """ @@ -1640,6 +1662,9 @@ class SellerProtection(StripeObject): """ _inner_class_types = {"seller_protection": SellerProtection} + class Paypay(StripeObject): + pass + class Payto(StripeObject): bsb_number: Optional[str] """ @@ -1782,6 +1807,12 @@ class SepaDebit(StripeObject): Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://docs.stripe.com/api/mandates/retrieve). """ + class Sequra(StripeObject): + transaction_id: Optional[str] + """ + The SeQura transaction ID associated with this payment. + """ + class Sofort(StripeObject): bank_code: Optional[str] """ @@ -1967,6 +1998,7 @@ class Zip(StripeObject): link: Optional[Link] mb_way: Optional[MbWay] mobilepay: Optional[Mobilepay] + momo: Optional[Momo] multibanco: Optional[Multibanco] naver_pay: Optional[NaverPay] nz_bank_account: Optional[NzBankAccount] @@ -1980,6 +2012,7 @@ class Zip(StripeObject): """ paynow: Optional[Paynow] paypal: Optional[Paypal] + paypay: Optional[Paypay] payto: Optional[Payto] pix: Optional[Pix] promptpay: Optional[Promptpay] @@ -1989,6 +2022,7 @@ class Zip(StripeObject): scalapay: Optional[Scalapay] sepa_credit_transfer: Optional[SepaCreditTransfer] sepa_debit: Optional[SepaDebit] + sequra: Optional[Sequra] sofort: Optional[Sofort] stripe_account: Optional[StripeAccount] sunbit: Optional[Sunbit] @@ -2041,6 +2075,7 @@ class Zip(StripeObject): "link": Link, "mb_way": MbWay, "mobilepay": Mobilepay, + "momo": Momo, "multibanco": Multibanco, "naver_pay": NaverPay, "nz_bank_account": NzBankAccount, @@ -2050,6 +2085,7 @@ class Zip(StripeObject): "payco": Payco, "paynow": Paynow, "paypal": Paypal, + "paypay": Paypay, "payto": Payto, "pix": Pix, "promptpay": Promptpay, @@ -2059,6 +2095,7 @@ class Zip(StripeObject): "scalapay": Scalapay, "sepa_credit_transfer": SepaCreditTransfer, "sepa_debit": SepaDebit, + "sequra": Sequra, "sofort": Sofort, "stripe_account": StripeAccount, "sunbit": Sunbit, diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 71dd275b6..2c824858e 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -34,6 +34,7 @@ PaymentIntentAmountDetailsLineItem, ) from stripe._payment_method import PaymentMethod + from stripe._payment_record import PaymentRecord from stripe._review import Review from stripe._setup_intent import SetupIntent from stripe._source import Source @@ -195,7 +196,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] """ @@ -256,6 +257,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", @@ -266,6 +268,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_no_successful_transaction_refresh", "forwarding_api_inactive", "forwarding_api_invalid_parameter", @@ -319,6 +323,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", @@ -470,7 +475,7 @@ class LastPaymentError(StripeObject): """ A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - Later, you can use [PaymentIntents](https://api.stripe.com#payment_intents) to drive the payment flow. + Later, you can use [PaymentIntents](https://docs.stripe.com/api#payment_intents) to drive the payment flow. Create a SetupIntent when you're ready to collect your customer's payment credentials. Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. @@ -481,9 +486,9 @@ class LastPaymentError(StripeObject): For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - If you use the SetupIntent with a [Customer](https://api.stripe.com#setup_intent_object-customer), + If you use the SetupIntent with a [Customer](https://docs.stripe.com/api#setup_intent_object-customer), it automatically attaches the resulting payment method to that Customer after successful setup. - We recommend using SetupIntents or [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) on + We recommend using SetupIntents or [setup_future_usage](https://docs.stripe.com/api#payment_intent_object-setup_future_usage) on PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. @@ -1360,6 +1365,10 @@ class QrCode(StripeObject): """ The raw data string used to generate QR code, it should be used together with QR code library. """ + expires_at: int + """ + The timestamp at which the QR code expires. + """ image_url_png: str """ The image_url_png string used to render QR code @@ -1752,16 +1761,101 @@ class Bancontact(StripeObject): """ class Billie(StripeObject): + class CompanyDetails(StripeObject): + class RegisteredAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code. + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + registered_address: Optional[RegisteredAddress] + registered_name: Optional[str] + """ + Company or entity name. + """ + registration_number: Optional[str] + """ + The official registration number for the given registration type. + """ + registration_type: Optional[ + Union[ + Literal[ + "ch_ein", + "de_hrb", + "dk_cvr", + "es_cif", + "fi_tunnus", + "fr_siren", + "fr_siret", + "it_rea", + "nl_kvk", + "no_org_number", + "no_pno", + "se_org_number", + "se_pno", + "uk_crn", + ], + str, + ] + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: Optional[str] + """ + VAT id number + """ + _inner_class_types = {"registered_address": RegisteredAddress} + capture_method: Optional[Literal["manual"]] """ Controls when the funds will be captured from the customer's account. """ + company_details: Optional[CompanyDetails] + reference: Optional[str] + """ + An identifier or reference that this payment corresponds to. + """ + _inner_class_types = {"company_details": CompanyDetails} class Bizum(StripeObject): pass class Blik(StripeObject): - setup_future_usage: Optional[Literal["none"]] + class MandateOptions(StripeObject): + expires_at: Optional[int] + """ + Date at which the mandate expires. + """ + type: Optional[Literal["off_session"]] + """ + Type of the mandate. + """ + + mandate_options: Optional[MandateOptions] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1771,6 +1865,7 @@ class Blik(StripeObject): 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). """ + _inner_class_types = {"mandate_options": MandateOptions} class Boleto(StripeObject): expires_after_days: int @@ -2433,6 +2528,9 @@ class Paypal(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + class Paypay(StripeObject): + pass + class Payto(StripeObject): class MandateOptions(StripeObject): amount: Optional[int] @@ -2677,6 +2775,22 @@ class MandateOptions(StripeObject): """ _inner_class_types = {"mandate_options": MandateOptions} + class Sequra(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + class Sofort(StripeObject): preferred_language: Optional[ Union[Literal["de", "en", "es", "fr", "it", "nl", "pl"], str] @@ -2916,6 +3030,7 @@ class Zip(StripeObject): payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] + paypay: Optional[Paypay] payto: Optional[Payto] pix: Optional[Pix] promptpay: Optional[Promptpay] @@ -2924,6 +3039,7 @@ class Zip(StripeObject): satispay: Optional[Satispay] scalapay: Optional[Scalapay] sepa_debit: Optional[SepaDebit] + sequra: Optional[Sequra] sofort: Optional[Sofort] sunbit: Optional[Sunbit] swish: Optional[Swish] @@ -2973,6 +3089,7 @@ class Zip(StripeObject): "payco": Payco, "paynow": Paynow, "paypal": Paypal, + "paypay": Paypay, "payto": Payto, "pix": Pix, "promptpay": Promptpay, @@ -2981,6 +3098,7 @@ class Zip(StripeObject): "satispay": Satispay, "scalapay": Scalapay, "sepa_debit": SepaDebit, + "sequra": Sequra, "sofort": Sofort, "sunbit": Sunbit, "swish": Swish, @@ -3123,6 +3241,7 @@ class PaymentData(StripeObject): "boleto", "capchase_pay", "card", + "card_present", "cashapp", "check_scan", "click_to_pay", @@ -3143,6 +3262,7 @@ class PaymentData(StripeObject): "grabpay", "id_bank_transfer", "ideal", + "interac_present", "kakao_pay", "klarna", "knet", @@ -3291,7 +3411,7 @@ class PaymentData(StripeObject): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If [setup_future_usage](https://docs.stripe.com/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ customer_account: Optional[str] """ @@ -3299,7 +3419,7 @@ class PaymentData(StripeObject): Payment methods attached to other Accounts cannot be used with this PaymentIntent. - If [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. + If [setup_future_usage](https://docs.stripe.com/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. """ description: Optional[str] """ @@ -3346,6 +3466,7 @@ class PaymentData(StripeObject): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -3354,6 +3475,7 @@ class PaymentData(StripeObject): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -3427,6 +3549,10 @@ class PaymentData(StripeObject): """ The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. A comprehensive list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ + payment_record: Optional[ExpandableField["PaymentRecord"]] + """ + ID of the [Payment Record object](https://docs.stripe.com/api/payment-record) created by this PaymentIntent. + """ presentment_details: Optional[PresentmentDetails] processing: Optional[Processing] """ @@ -4709,7 +4835,7 @@ def retrieve( You can retrieve a PaymentIntent client-side using a publishable key when the client_secret is in the query string. - If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](https://docs.stripe.com/api#payment_intent_object) object reference for more details. + If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](https://docs.stripe.com/api/payment_intents/object) object reference for more details. """ instance = cls(id, **params) instance.refresh() @@ -4724,7 +4850,7 @@ async def retrieve_async( You can retrieve a PaymentIntent client-side using a publishable key when the client_secret is in the query string. - If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](https://docs.stripe.com/api#payment_intent_object) object reference for more details. + If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](https://docs.stripe.com/api/payment_intents/object) object reference for more details. """ instance = cls(id, **params) await instance.refresh_async() diff --git a/stripe/_payment_intent_amount_details_line_item.py b/stripe/_payment_intent_amount_details_line_item.py index c0837ed2d..dec5e47d8 100644 --- a/stripe/_payment_intent_amount_details_line_item.py +++ b/stripe/_payment_intent_amount_details_line_item.py @@ -55,9 +55,9 @@ class Paypal(StripeObject): class Tax(StripeObject): total_tax_amount: int """ - The total amount of tax on the transaction represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L2 rates. An integer greater than or equal to 0. + The total amount of tax on a single line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0. - This field is mutually exclusive with the `amount_details[line_items][#][tax][total_tax_amount]` field. + This field is mutually exclusive with the `amount_details[tax][total_tax_amount]` field. """ discount_amount: Optional[int] diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 2d17ac05b..19e843205 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -184,7 +184,7 @@ def retrieve( You can retrieve a PaymentIntent client-side using a publishable key when the client_secret is in the query string. - If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](https://docs.stripe.com/api#payment_intent_object) object reference for more details. + If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](https://docs.stripe.com/api/payment_intents/object) object reference for more details. """ return cast( "PaymentIntent", @@ -211,7 +211,7 @@ async def retrieve_async( You can retrieve a PaymentIntent client-side using a publishable key when the client_secret is in the query string. - If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](https://docs.stripe.com/api#payment_intent_object) object reference for more details. + If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](https://docs.stripe.com/api/payment_intents/object) object reference for more details. """ return cast( "PaymentIntent", diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index b9da8c717..9aece350e 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -141,7 +141,7 @@ class Option(StripeObject): class Label(StripeObject): custom: Optional[str] """ - Custom text for the label, displayed to the customer. Up to 50 characters. + Custom text for the label, displayed to the customer. Up to 100 characters. """ type: Literal["custom"] """ @@ -823,7 +823,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] @@ -916,11 +916,13 @@ class TransferData(StripeObject): "pay_by_bank", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", "satispay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 291179af0..a1e34b91b 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -1289,6 +1289,9 @@ class Paypal(StripeObject): PayPal account PayerID. This identifier uniquely identifies the PayPal customer. """ + class Paypay(StripeObject): + pass + class Payto(StripeObject): bsb_number: Optional[str] """ @@ -1367,6 +1370,9 @@ class GeneratedFrom(StripeObject): """ _inner_class_types = {"generated_from": GeneratedFrom} + class Sequra(StripeObject): + pass + class Sofort(StripeObject): country: Optional[str] """ @@ -1566,6 +1572,7 @@ class Zip(StripeObject): payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] + paypay: Optional[Paypay] payto: Optional[Payto] pix: Optional[Pix] promptpay: Optional[Promptpay] @@ -1578,6 +1585,7 @@ class Zip(StripeObject): satispay: Optional[Satispay] scalapay: Optional[Scalapay] sepa_debit: Optional[SepaDebit] + sequra: Optional[Sequra] sofort: Optional[Sofort] sunbit: Optional[Sunbit] swish: Optional[Swish] @@ -1625,6 +1633,7 @@ class Zip(StripeObject): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -1633,6 +1642,7 @@ class Zip(StripeObject): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -2155,6 +2165,7 @@ async def retrieve_async( "payco": Payco, "paynow": Paynow, "paypal": Paypal, + "paypay": Paypay, "payto": Payto, "pix": Pix, "promptpay": Promptpay, @@ -2164,6 +2175,7 @@ async def retrieve_async( "satispay": Satispay, "scalapay": Scalapay, "sepa_debit": SepaDebit, + "sequra": Sequra, "sofort": Sofort, "sunbit": Sunbit, "swish": Swish, diff --git a/stripe/_payment_method_configuration.py b/stripe/_payment_method_configuration.py index 97966c0a9..5f939b3ae 100644 --- a/stripe/_payment_method_configuration.py +++ b/stripe/_payment_method_configuration.py @@ -974,6 +974,28 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} + class Paypay(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 Payto(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -1150,6 +1172,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 Sofort(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -1400,6 +1444,7 @@ class DisplayPreference(StripeObject): payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] + paypay: Optional[Paypay] payto: Optional[Payto] pix: Optional[Pix] promptpay: Optional[Promptpay] @@ -1408,6 +1453,7 @@ class DisplayPreference(StripeObject): satispay: Optional[Satispay] scalapay: Optional[Scalapay] sepa_debit: Optional[SepaDebit] + sequra: Optional[Sequra] sofort: Optional[Sofort] sunbit: Optional[Sunbit] swish: Optional[Swish] @@ -1598,6 +1644,7 @@ async def retrieve_async( "payco": Payco, "paynow": Paynow, "paypal": Paypal, + "paypay": Paypay, "payto": Payto, "pix": Pix, "promptpay": Promptpay, @@ -1606,6 +1653,7 @@ async def retrieve_async( "satispay": Satispay, "scalapay": Scalapay, "sepa_debit": SepaDebit, + "sequra": Sequra, "sofort": Sofort, "sunbit": Sunbit, "swish": Swish, diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 00060359e..9206ce896 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -581,7 +581,10 @@ class ThreeDSecure(StripeObject): Additional information about why 3D Secure succeeded or failed, based on the `result`. """ version: Optional[ - Union[Literal["1.0.2", "2.1.0", "2.2.0"], str] + Union[ + Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"], + str, + ] ] """ The version of 3D Secure that was used. @@ -597,19 +600,24 @@ class ApplePay(StripeObject): class GooglePay(StripeObject): pass + class Link(StripeObject): + pass + apple_pay: Optional[ApplePay] dynamic_last4: Optional[str] """ (For tokenized numbers only.) The last four digits of the device account number. """ google_pay: Optional[GooglePay] + link: Optional[Link] type: str """ - The type of the card wallet, one of `apple_pay` or `google_pay`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. """ _inner_class_types = { "apple_pay": ApplePay, "google_pay": GooglePay, + "link": Link, } authorization_code: Optional[str] @@ -1450,6 +1458,10 @@ class Link(StripeObject): """ Two-letter ISO code representing the funding source country beneath the Link payment. You could use this attribute to get a sense of international fees. """ + funding_source_group: Optional[str] + """ + The [funding source group code](https://docs.stripe.com/payments/link/link-payment-methods) applied to this Link payment at confirmation time. + """ class MbWay(StripeObject): pass @@ -1483,6 +1495,16 @@ class Card(StripeObject): """ _inner_class_types = {"card": Card} + class Momo(StripeObject): + fingerprint: Optional[str] + """ + Uniquely identifies this particular MoMo account. You can use this attribute to check whether two MoMo accounts are the same. + """ + mandate: Optional[str] + """ + ID of the multi-use Mandate created by, or used to make, this MoMo payment. + """ + class Multibanco(StripeObject): entity: Optional[str] """ @@ -1660,6 +1682,9 @@ class SellerProtection(StripeObject): """ _inner_class_types = {"seller_protection": SellerProtection} + class Paypay(StripeObject): + pass + class Payto(StripeObject): bsb_number: Optional[str] """ @@ -1802,6 +1827,12 @@ class SepaDebit(StripeObject): Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://docs.stripe.com/api/mandates/retrieve). """ + class Sequra(StripeObject): + transaction_id: Optional[str] + """ + The SeQura transaction ID associated with this payment. + """ + class Sofort(StripeObject): bank_code: Optional[str] """ @@ -1987,6 +2018,7 @@ class Zip(StripeObject): link: Optional[Link] mb_way: Optional[MbWay] mobilepay: Optional[Mobilepay] + momo: Optional[Momo] multibanco: Optional[Multibanco] naver_pay: Optional[NaverPay] nz_bank_account: Optional[NzBankAccount] @@ -2000,6 +2032,7 @@ class Zip(StripeObject): """ paynow: Optional[Paynow] paypal: Optional[Paypal] + paypay: Optional[Paypay] payto: Optional[Payto] pix: Optional[Pix] promptpay: Optional[Promptpay] @@ -2009,6 +2042,7 @@ class Zip(StripeObject): scalapay: Optional[Scalapay] sepa_credit_transfer: Optional[SepaCreditTransfer] sepa_debit: Optional[SepaDebit] + sequra: Optional[Sequra] sofort: Optional[Sofort] stripe_account: Optional[StripeAccount] sunbit: Optional[Sunbit] @@ -2061,6 +2095,7 @@ class Zip(StripeObject): "link": Link, "mb_way": MbWay, "mobilepay": Mobilepay, + "momo": Momo, "multibanco": Multibanco, "naver_pay": NaverPay, "nz_bank_account": NzBankAccount, @@ -2070,6 +2105,7 @@ class Zip(StripeObject): "payco": Payco, "paynow": Paynow, "paypal": Paypal, + "paypay": Paypay, "payto": Payto, "pix": Pix, "promptpay": Promptpay, @@ -2079,6 +2115,7 @@ class Zip(StripeObject): "scalapay": Scalapay, "sepa_credit_transfer": SepaCreditTransfer, "sepa_debit": SepaDebit, + "sequra": Sequra, "sofort": Sofort, "stripe_account": StripeAccount, "sunbit": Sunbit, diff --git a/stripe/_person.py b/stripe/_person.py index 8f90a7163..3cba73387 100644 --- a/stripe/_person.py +++ b/stripe/_person.py @@ -160,8 +160,10 @@ class Error(StripeObject): "external_request", "information_missing", "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", @@ -369,8 +371,10 @@ class Error(StripeObject): "external_request", "information_missing", "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", @@ -591,7 +595,7 @@ class Verification(StripeObject): class AdditionalDocument(StripeObject): back: Optional[ExpandableField["File"]] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. """ details: Optional[str] """ @@ -603,13 +607,13 @@ class AdditionalDocument(StripeObject): """ front: Optional[ExpandableField["File"]] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. """ class Document(StripeObject): back: Optional[ExpandableField["File"]] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. """ details: Optional[str] """ @@ -621,7 +625,7 @@ class Document(StripeObject): """ front: Optional[ExpandableField["File"]] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. """ additional_document: Optional[AdditionalDocument] diff --git a/stripe/_plan.py b/stripe/_plan.py index 8c91bdce2..1c1161d85 100644 --- a/stripe/_plan.py +++ b/stripe/_plan.py @@ -28,10 +28,10 @@ class Plan( UpdateableAPIResource["Plan"], ): """ - You can now model subscriptions more flexibly using the [Prices API](https://api.stripe.com#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + You can now model subscriptions more flexibly using the [Prices API](https://docs.stripe.com/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. Plans define the base price, currency, and billing cycle for recurring purchases of products. - [Products](https://api.stripe.com#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + [Products](https://docs.stripe.com/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. diff --git a/stripe/_price.py b/stripe/_price.py index fd3104cda..d0bebde89 100644 --- a/stripe/_price.py +++ b/stripe/_price.py @@ -38,7 +38,7 @@ class Price( ): """ Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. - [Products](https://api.stripe.com#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + [Products](https://docs.stripe.com/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. diff --git a/stripe/_product.py b/stripe/_product.py index 5394c3682..a0c923b6e 100644 --- a/stripe/_product.py +++ b/stripe/_product.py @@ -58,7 +58,7 @@ class Product( """ Products describe the specific goods or services you offer to your customers. For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. - They can be used in conjunction with [Prices](https://api.stripe.com#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. + They can be used in conjunction with [Prices](https://docs.stripe.com/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. Related guides: [Set up a subscription](https://docs.stripe.com/billing/subscriptions/set-up-subscription), [share a Payment Link](https://docs.stripe.com/payment-links), @@ -92,6 +92,16 @@ class PackageDimensions(StripeObject): Width, in inches. """ + class TaxDetails(StripeObject): + performance_location: Optional[str] + """ + The ID of a tax location with type `performance`, representing where the performance takes place. + """ + tax_code: Optional[str] + """ + A [tax code](https://docs.stripe.com/tax/tax-categories) ID. + """ + active: bool """ Whether the product is currently available for purchase. @@ -156,6 +166,10 @@ class PackageDimensions(StripeObject): """ A [tax code](https://docs.stripe.com/tax/tax-categories) ID. """ + tax_details: Optional[TaxDetails] + """ + Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location. + """ type: Union[Literal["good", "service"], str] """ The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. @@ -594,4 +608,5 @@ async def create_feature_async( _inner_class_types = { "marketing_features": MarketingFeature, "package_dimensions": PackageDimensions, + "tax_details": TaxDetails, } diff --git a/stripe/_product_catalog_service.py b/stripe/_product_catalog_service.py new file mode 100644 index 000000000..dd7561b5d --- /dev/null +++ b/stripe/_product_catalog_service.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.product_catalog._trial_offer_service import TrialOfferService + +_subservices = { + "trial_offers": [ + "stripe.product_catalog._trial_offer_service", + "TrialOfferService", + ], +} + + +class ProductCatalogService(StripeService): + trial_offers: "TrialOfferService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/_quote.py b/stripe/_quote.py index c6749b3aa..80aa95e5a 100644 --- a/stripe/_quote.py +++ b/stripe/_quote.py @@ -95,7 +95,7 @@ class Discount(StripeObject): """ discount: "DiscountResource" """ - A discount represents the actual application of a [coupon](https://api.stripe.com#coupons) or [promotion code](https://api.stripe.com#promotion_codes). + A discount represents the actual application of a [coupon](https://docs.stripe.com/api#coupons) or [promotion code](https://docs.stripe.com/api#promotion_codes). It contains information about when the discount began, when it will end, and what it is applied to. Related guide: [Applying discounts to subscriptions](https://docs.stripe.com/billing/subscriptions/discounts) @@ -196,7 +196,7 @@ class Discount(StripeObject): """ discount: "DiscountResource" """ - A discount represents the actual application of a [coupon](https://api.stripe.com#coupons) or [promotion code](https://api.stripe.com#promotion_codes). + A discount represents the actual application of a [coupon](https://docs.stripe.com/api#coupons) or [promotion code](https://docs.stripe.com/api#promotion_codes). It contains information about when the discount began, when it will end, and what it is applied to. Related guide: [Applying discounts to subscriptions](https://docs.stripe.com/billing/subscriptions/discounts) @@ -402,7 +402,7 @@ class Discount(StripeObject): """ discount: "DiscountResource" """ - A discount represents the actual application of a [coupon](https://api.stripe.com#coupons) or [promotion code](https://api.stripe.com#promotion_codes). + A discount represents the actual application of a [coupon](https://docs.stripe.com/api#coupons) or [promotion code](https://docs.stripe.com/api#promotion_codes). It contains information about when the discount began, when it will end, and what it is applied to. Related guide: [Applying discounts to subscriptions](https://docs.stripe.com/billing/subscriptions/discounts) diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index c33417ba2..c98d7f282 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -82,6 +82,12 @@ class Bancontact(StripeObject): (if supported) at the time of authorization or settlement. They cannot be set or mutated. """ + class Blik(StripeObject): + buyer_id: Optional[str] + """ + A unique and immutable identifier assigned by BLIK to every buyer. + """ + class Boleto(StripeObject): pass @@ -449,6 +455,7 @@ class UsBankAccount(StripeObject): au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] bancontact: Optional[Bancontact] + blik: Optional[Blik] boleto: Optional[Boleto] card: Optional[Card] card_present: Optional[CardPresent] @@ -480,6 +487,7 @@ class UsBankAccount(StripeObject): "au_becs_debit": AuBecsDebit, "bacs_debit": BacsDebit, "bancontact": Bancontact, + "blik": Blik, "boleto": Boleto, "card": Card, "card_present": CardPresent, @@ -506,7 +514,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] """ @@ -567,6 +575,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", @@ -577,6 +586,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_no_successful_transaction_refresh", "forwarding_api_inactive", "forwarding_api_invalid_parameter", @@ -630,6 +641,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", @@ -781,7 +793,7 @@ class SetupError(StripeObject): """ A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - Later, you can use [PaymentIntents](https://api.stripe.com#payment_intents) to drive the payment flow. + Later, you can use [PaymentIntents](https://docs.stripe.com/api#payment_intents) to drive the payment flow. Create a SetupIntent when you're ready to collect your customer's payment credentials. Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. @@ -792,9 +804,9 @@ class SetupError(StripeObject): For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - If you use the SetupIntent with a [Customer](https://api.stripe.com#setup_intent_object-customer), + If you use the SetupIntent with a [Customer](https://docs.stripe.com/api#setup_intent_object-customer), it automatically attaches the resulting payment method to that Customer after successful setup. - We recommend using SetupIntents or [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) on + We recommend using SetupIntents or [setup_future_usage](https://docs.stripe.com/api#payment_intent_object-setup_future_usage) on PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index e1bb10fe3..5b5497441 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -50,7 +50,7 @@ class SetupIntent( """ A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - Later, you can use [PaymentIntents](https://api.stripe.com#payment_intents) to drive the payment flow. + Later, you can use [PaymentIntents](https://docs.stripe.com/api#payment_intents) to drive the payment flow. Create a SetupIntent when you're ready to collect your customer's payment credentials. Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. @@ -61,9 +61,9 @@ class SetupIntent( For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - If you use the SetupIntent with a [Customer](https://api.stripe.com#setup_intent_object-customer), + If you use the SetupIntent with a [Customer](https://docs.stripe.com/api#setup_intent_object-customer), it automatically attaches the resulting payment method to that Customer after successful setup. - We recommend using SetupIntents or [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) on + We recommend using SetupIntents or [setup_future_usage](https://docs.stripe.com/api#payment_intent_object-setup_future_usage) on PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. @@ -88,7 +88,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] """ @@ -149,6 +149,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", @@ -159,6 +160,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_no_successful_transaction_refresh", "forwarding_api_inactive", "forwarding_api_invalid_parameter", @@ -212,6 +215,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", @@ -363,7 +367,7 @@ class LastSetupError(StripeObject): """ A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - Later, you can use [PaymentIntents](https://api.stripe.com#payment_intents) to drive the payment flow. + Later, you can use [PaymentIntents](https://docs.stripe.com/api#payment_intents) to drive the payment flow. Create a SetupIntent when you're ready to collect your customer's payment credentials. Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. @@ -374,9 +378,9 @@ class LastSetupError(StripeObject): For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - If you use the SetupIntent with a [Customer](https://api.stripe.com#setup_intent_object-customer), + If you use the SetupIntent with a [Customer](https://docs.stripe.com/api#setup_intent_object-customer), it automatically attaches the resulting payment method to that Customer after successful setup. - We recommend using SetupIntents or [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) on + We recommend using SetupIntents or [setup_future_usage](https://docs.stripe.com/api#payment_intent_object-setup_future_usage) on PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. @@ -601,6 +605,20 @@ class MandateOptions(StripeObject): class Bizum(StripeObject): pass + class Blik(StripeObject): + class MandateOptions(StripeObject): + expires_at: Optional[int] + """ + Date at which the mandate expires. + """ + type: Optional[Literal["off_session"]] + """ + Type of the mandate. + """ + + mandate_options: Optional[MandateOptions] + _inner_class_types = {"mandate_options": MandateOptions} + class Card(StripeObject): class MandateOptions(StripeObject): amount: int @@ -921,6 +939,7 @@ class MandateOptions(StripeObject): amazon_pay: Optional[AmazonPay] bacs_debit: Optional[BacsDebit] bizum: Optional[Bizum] + blik: Optional[Blik] card: Optional[Card] card_present: Optional[CardPresent] klarna: Optional[Klarna] @@ -936,6 +955,7 @@ class MandateOptions(StripeObject): "amazon_pay": AmazonPay, "bacs_debit": BacsDebit, "bizum": Bizum, + "blik": Blik, "card": Card, "card_present": CardPresent, "klarna": Klarna, @@ -968,6 +988,7 @@ class MandateOptions(StripeObject): "boleto", "capchase_pay", "card", + "card_present", "cashapp", "check_scan", "click_to_pay", @@ -988,6 +1009,7 @@ class MandateOptions(StripeObject): "grabpay", "id_bank_transfer", "ideal", + "interac_present", "kakao_pay", "klarna", "knet", @@ -1144,6 +1166,7 @@ class MandateOptions(StripeObject): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -1152,6 +1175,7 @@ class MandateOptions(StripeObject): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", diff --git a/stripe/_stripe_client.py b/stripe/_stripe_client.py index 1db63f0c1..d6c669358 100644 --- a/stripe/_stripe_client.py +++ b/stripe/_stripe_client.py @@ -109,6 +109,7 @@ from stripe._plan_service import PlanService from stripe._price_service import PriceService from stripe._product_service import ProductService + from stripe._product_catalog_service import ProductCatalogService from stripe._promotion_code_service import PromotionCodeService from stripe._quote_service import QuoteService from stripe._radar_service import RadarService @@ -131,6 +132,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 @@ -936,6 +938,17 @@ def prices(self) -> "PriceService": def products(self) -> "ProductService": return self.v1.products + @property + @deprecated( + """ + StripeClient.product_catalog is deprecated, use StripeClient.v1.product_catalog instead. + All functionality under it has been copied over to StripeClient.v1.product_catalog. + 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 product_catalog(self) -> "ProductCatalogService": + return self.v1.product_catalog + @property @deprecated( """ @@ -1156,6 +1169,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/_subscription.py b/stripe/_subscription.py index 4e1b1ffd4..05a29bcdc 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -55,6 +55,9 @@ from stripe.params._subscription_modify_params import ( SubscriptionModifyParams, ) + from stripe.params._subscription_pause_params import ( + SubscriptionPauseParams, + ) from stripe.params._subscription_resume_params import ( SubscriptionResumeParams, ) @@ -345,7 +348,83 @@ class Bancontact(StripeObject): """ class Billie(StripeObject): - pass + class CompanyDetails(StripeObject): + class RegisteredAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code. + """ + line1: Optional[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + registered_address: Optional[RegisteredAddress] + registered_name: Optional[str] + """ + Company or entity name. + """ + registration_number: Optional[str] + """ + The official registration number for the given registration type. + """ + registration_type: Optional[ + Literal[ + "ch_ein", + "de_hrb", + "dk_cvr", + "es_cif", + "fi_tunnus", + "fr_siren", + "fr_siret", + "it_rea", + "nl_kvk", + "no_org_number", + "no_pno", + "se_org_number", + "se_pno", + "uk_crn", + ] + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: Optional[str] + """ + VAT ID number. + """ + _inner_class_types = { + "registered_address": RegisteredAddress, + } + + company_details: Optional[CompanyDetails] + _inner_class_types = {"company_details": CompanyDetails} + + class Blik(StripeObject): + class MandateOptions(StripeObject): + expires_at: Optional[int] + """ + Date when the mandate expires and no further payments will be charged. If not provided, the mandate will be set to be indefinite. + """ + + mandate_options: Optional[MandateOptions] + _inner_class_types = {"mandate_options": MandateOptions} class Card(StripeObject): class MandateOptions(StripeObject): @@ -593,6 +672,10 @@ class Filters(StripeObject): """ This sub-hash contains details about the Billie payment method options to pass to invoices created by the subscription. """ + blik: Optional[Blik] + """ + This sub-hash contains details about the Blik payment method options to pass to invoices created by the subscription. + """ card: Optional[Card] """ This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. @@ -629,6 +712,7 @@ class Filters(StripeObject): "acss_debit": AcssDebit, "bancontact": Bancontact, "billie": Billie, + "blik": Blik, "card": Card, "customer_balance": CustomerBalance, "konbini": Konbini, @@ -657,6 +741,7 @@ class Filters(StripeObject): "bacs_debit", "bancontact", "billie", + "blik", "boleto", "card", "cashapp", @@ -727,6 +812,10 @@ class PendingUpdate(StripeObject): """ If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. """ + cancel_at_period_end: Optional[bool] + """ + Indicates whether this subscription should cancel at the end of the current period if the update is applied. + """ discount: Optional["Discount"] """ The pending subscription-level discount that will be applied when the pending update is applied. @@ -753,7 +842,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 PresentmentDetails(StripeObject): @@ -762,6 +851,43 @@ class PresentmentDetails(StripeObject): Currency used for customer payments. """ + class StatusDetails(StripeObject): + class Paused(StripeObject): + class Subscription(StripeObject): + type: Union[ + Literal[ + "final_payment_failure", + "first_payment_failure", + "pause_requested", + "system", + "trial_end_without_payment_method", + ], + str, + ] + """ + The reason that the subscription was paused. + """ + + subscription: Subscription + """ + Information on the `type=subscription` pause. + """ + transitioned_at: int + """ + Unix timestamp in seconds of when the subscription status transitioned to `paused`. + """ + type: Union[Literal["subscription"], str] + """ + The type of pause. + """ + _inner_class_types = {"subscription": Subscription} + + paused: Paused + """ + Indicates when and why the subscription transitioned to the paused status. + """ + _inner_class_types = {"paused": Paused} + class TransferData(StripeObject): amount_percent: Optional[float] """ @@ -774,6 +900,12 @@ class TransferData(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 ] @@ -972,12 +1104,16 @@ 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). If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. """ + status_details: Optional[StatusDetails] + """ + Describes changes to the subscription's status. + """ test_clock: Optional[ExpandableField["TestClock"]] """ ID of the test clock this subscription belongs to. @@ -1553,6 +1689,116 @@ async def modify_async( ), ) + @classmethod + def _cls_pause( + cls, subscription: str, /, **params: Unpack["SubscriptionPauseParams"] + ) -> "Subscription": + """ + Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. + """ + return cast( + "Subscription", + cls._static_request( + "post", + "/v1/subscriptions/{subscription}/pause".format( + subscription=sanitize_id(subscription) + ), + params=params, + ), + ) + + @overload + @staticmethod + def pause( + subscription: str, /, **params: Unpack["SubscriptionPauseParams"] + ) -> "Subscription": + """ + Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. + """ + ... + + @overload + def pause( + self, **params: Unpack["SubscriptionPauseParams"] + ) -> "Subscription": + """ + Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. + """ + ... + + @class_method_variant("_cls_pause") + def pause( + self, **params: Unpack["SubscriptionPauseParams"] + ) -> "Subscription": + """ + Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. + """ + return cast( + "Subscription", + self._request( + "post", + "/v1/subscriptions/{subscription}/pause".format( + subscription=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_pause_async( + cls, subscription: str, /, **params: Unpack["SubscriptionPauseParams"] + ) -> "Subscription": + """ + Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. + """ + return cast( + "Subscription", + await cls._static_request_async( + "post", + "/v1/subscriptions/{subscription}/pause".format( + subscription=sanitize_id(subscription) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def pause_async( + subscription: str, /, **params: Unpack["SubscriptionPauseParams"] + ) -> "Subscription": + """ + Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. + """ + ... + + @overload + async def pause_async( + self, **params: Unpack["SubscriptionPauseParams"] + ) -> "Subscription": + """ + Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. + """ + ... + + @class_method_variant("_cls_pause_async") + async def pause_async( + self, **params: Unpack["SubscriptionPauseParams"] + ) -> "Subscription": + """ + Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. + """ + return cast( + "Subscription", + await self._request_async( + "post", + "/v1/subscriptions/{subscription}/pause".format( + subscription=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + @classmethod def _cls_resume( cls, subscription: str, /, **params: Unpack["SubscriptionResumeParams"] @@ -1739,6 +1985,7 @@ async def search_auto_paging_iter_async( "pending_invoice_item_interval": PendingInvoiceItemInterval, "pending_update": PendingUpdate, "presentment_details": PresentmentDetails, + "status_details": StatusDetails, "transfer_data": TransferData, "trial_settings": TrialSettings, } diff --git a/stripe/_subscription_item.py b/stripe/_subscription_item.py index 3ef64ffdc..046ac6f17 100644 --- a/stripe/_subscription_item.py +++ b/stripe/_subscription_item.py @@ -52,6 +52,11 @@ class BillingThresholds(StripeObject): Usage threshold that triggers the subscription to create an invoice """ + class CurrentTrial(StripeObject): + end_date: int + start_date: int + trial_offer: str + billed_until: Optional[int] """ The time period the subscription item has been billed for. @@ -72,6 +77,10 @@ class BillingThresholds(StripeObject): """ The start time of this subscription item's current billing period. """ + current_trial: Optional[CurrentTrial] + """ + The current trial that is applied to this subscription item. + """ deleted: Optional[Literal[True]] """ Always true for a deleted object @@ -94,10 +103,10 @@ class BillingThresholds(StripeObject): """ plan: "Plan" """ - You can now model subscriptions more flexibly using the [Prices API](https://api.stripe.com#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + You can now model subscriptions more flexibly using the [Prices API](https://docs.stripe.com/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. Plans define the base price, currency, and billing cycle for recurring purchases of products. - [Products](https://api.stripe.com#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. + [Products](https://docs.stripe.com/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. @@ -106,7 +115,7 @@ class BillingThresholds(StripeObject): price: "Price" """ Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. - [Products](https://api.stripe.com#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + [Products](https://docs.stripe.com/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. @@ -351,4 +360,7 @@ async def retrieve_async( await instance.refresh_async() return instance - _inner_class_types = {"billing_thresholds": BillingThresholds} + _inner_class_types = { + "billing_thresholds": BillingThresholds, + "current_trial": CurrentTrial, + } diff --git a/stripe/_subscription_schedule.py b/stripe/_subscription_schedule.py index fe198a0f5..afa211479 100644 --- a/stripe/_subscription_schedule.py +++ b/stripe/_subscription_schedule.py @@ -228,6 +228,147 @@ class TransferData(StripeObject): "transfer_data": TransferData, } + class PauseSchedule(StripeObject): + class Pause(StripeObject): + class Settings(StripeObject): + class BillFor(StripeObject): + class OutstandingUsageThrough(StripeObject): + type: Union[Literal["none", "pause_at"], str] + """ + The type of outstanding usage billing behavior. + """ + + class UnusedTimeFrom(StripeObject): + type: Union[ + Literal[ + "item_current_period_start", "none", "pause_at" + ], + str, + ] + """ + The type of unused time credit behavior. + """ + + outstanding_usage_through: OutstandingUsageThrough + unused_time_from: UnusedTimeFrom + _inner_class_types = { + "outstanding_usage_through": OutstandingUsageThrough, + "unused_time_from": UnusedTimeFrom, + } + + bill_for: BillFor + invoicing_behavior: Union[ + Literal["invoice", "pending_invoice_item"], str + ] + """ + Determines how to handle debits and credits when pausing. + """ + type: Union[Literal["subscription"], str] + """ + The type of pause settings. + """ + _inner_class_types = {"bill_for": BillFor} + + class Status(StripeObject): + class Error(StripeObject): + code: Optional[str] + """ + A machine-readable error code. + """ + message: str + """ + A description of the error. + """ + + error: Optional[Error] + type: Union[Literal["error", "scheduled", "succeeded"], str] + """ + The lifecycle state of the pause operation. + """ + _inner_class_types = {"error": Error} + + pause_at: int + """ + Time at which the subscription pauses. + """ + settings: Optional[Settings] + """ + Settings controlling billing behavior during the pause. + """ + status: Status + _inner_class_types = {"settings": Settings, "status": Status} + + class Resume(StripeObject): + class Settings(StripeObject): + billing_cycle_anchor: Union[ + Literal["resume_at", "unchanged"], str + ] + """ + The billing cycle anchor that applies when the subscription is resumed. + """ + payment_behavior: Union[ + Literal[ + "resume_on_payment_attempt", + "resume_on_payment_success", + ], + str, + ] + """ + Controls whether Stripe attempts payment on the resumption invoice and how that affects the subscription's status. + """ + proration_behavior: Union[ + Literal["always_invoice", "create_prorations", "none"], str + ] + """ + Determines how to handle prorations resulting from the billing_cycle_anchor change on resume. + """ + + class Status(StripeObject): + class Error(StripeObject): + code: Optional[str] + """ + A machine-readable error code. + """ + message: str + """ + A description of the error. + """ + + error: Optional[Error] + type: Union[ + Literal[ + "error", + "pending", + "requires_action", + "scheduled", + "succeeded", + ], + str, + ] + """ + The lifecycle state of the resume operation. + """ + _inner_class_types = {"error": Error} + + resume_at: int + """ + Time at which the subscription resumes. + """ + settings: Settings + status: Status + _inner_class_types = {"settings": Settings, "status": Status} + + key: str + """ + A unique identifier for this pause schedule. + """ + pause: Pause + resume: Optional[Resume] + """ + Details about when and how the subscription resumes. + """ + _inner_class_types = {"pause": Pause, "resume": Resume} + class Phase(StripeObject): class AddInvoiceItem(StripeObject): class Discount(StripeObject): @@ -619,6 +760,10 @@ class TransferData(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ + pause_schedules: Optional[List[PauseSchedule]] + """ + The pause schedules for this subscription schedule. + """ phases: List[Phase] """ Configuration for the subscription schedule's phases. @@ -1011,5 +1156,6 @@ async def retrieve_async( "billing_mode": BillingMode, "current_phase": CurrentPhase, "default_settings": DefaultSettings, + "pause_schedules": PauseSchedule, "phases": Phase, } diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index b47634e93..011da0884 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -24,6 +24,9 @@ from stripe.params._subscription_migrate_params import ( SubscriptionMigrateParams, ) + from stripe.params._subscription_pause_params import ( + SubscriptionPauseParams, + ) from stripe.params._subscription_resume_params import ( SubscriptionResumeParams, ) @@ -465,6 +468,52 @@ async def migrate_async( ), ) + def pause( + self, + subscription: str, + /, + params: Optional["SubscriptionPauseParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Subscription": + """ + Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. + """ + return cast( + "Subscription", + self._request( + "post", + "/v1/subscriptions/{subscription}/pause".format( + subscription=sanitize_id(subscription), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def pause_async( + self, + subscription: str, + /, + params: Optional["SubscriptionPauseParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Subscription": + """ + Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. + """ + return cast( + "Subscription", + await self._request_async( + "post", + "/v1/subscriptions/{subscription}/pause".format( + subscription=sanitize_id(subscription), + ), + base_address="api", + params=params, + options=options, + ), + ) + def resume( self, subscription: str, diff --git a/stripe/_tax_code.py b/stripe/_tax_code.py index 281a4985a..f87a222db 100644 --- a/stripe/_tax_code.py +++ b/stripe/_tax_code.py @@ -2,7 +2,8 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from typing import ClassVar +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -16,6 +17,13 @@ class TaxCode(ListableAPIResource["TaxCode"]): """ OBJECT_NAME: ClassVar[Literal["tax_code"]] = "tax_code" + + class Requirements(StripeObject): + performance_location: Union[Literal["optional", "required"], str] + """ + Describes whether a performance location is required for a successful tax calculation with a tax code. + """ + description: str """ A detailed description of which types of products the tax code represents. @@ -32,6 +40,10 @@ class TaxCode(ListableAPIResource["TaxCode"]): """ String representing the object's type. Objects of the same type share the same value. """ + requirements: Optional[Requirements] + """ + An object that describes more information about the tax location required for this tax code. Some tax codes require a [performance location](https://docs.stripe.com/tax/location-sales#required-versus-optional-performance-locations) to calculate tax correctly. + """ @classmethod def list( @@ -94,3 +106,5 @@ async def retrieve_async( instance = cls(id, **params) await instance.refresh_async() return instance + + _inner_class_types = {"requirements": Requirements} diff --git a/stripe/_tax_rate.py b/stripe/_tax_rate.py index dc06d2c76..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, diff --git a/stripe/_tax_service.py b/stripe/_tax_service.py index 1bd53e474..dbbab3a92 100644 --- a/stripe/_tax_service.py +++ b/stripe/_tax_service.py @@ -7,6 +7,7 @@ if TYPE_CHECKING: from stripe.tax._association_service import AssociationService from stripe.tax._calculation_service import CalculationService + from stripe.tax._location_service import LocationService from stripe.tax._registration_service import RegistrationService from stripe.tax._settings_service import SettingsService from stripe.tax._transaction_service import TransactionService @@ -14,6 +15,7 @@ _subservices = { "associations": ["stripe.tax._association_service", "AssociationService"], "calculations": ["stripe.tax._calculation_service", "CalculationService"], + "locations": ["stripe.tax._location_service", "LocationService"], "registrations": [ "stripe.tax._registration_service", "RegistrationService", @@ -26,6 +28,7 @@ class TaxService(StripeService): associations: "AssociationService" calculations: "CalculationService" + locations: "LocationService" registrations: "RegistrationService" settings: "SettingsService" transactions: "TransactionService" diff --git a/stripe/_three_d_secure_service.py b/stripe/_three_d_secure_service.py new file mode 100644 index 000000000..06b321711 --- /dev/null +++ b/stripe/_three_d_secure_service.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.three_d_secure._authentication_service import ( + AuthenticationService, + ) + +_subservices = { + "authentications": [ + "stripe.three_d_secure._authentication_service", + "AuthenticationService", + ], +} + + +class ThreeDSecureService(StripeService): + authentications: "AuthenticationService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/_transfer.py b/stripe/_transfer.py index 8c4007b65..199895811 100644 --- a/stripe/_transfer.py +++ b/stripe/_transfer.py @@ -46,7 +46,7 @@ class Transfer( Before April 6, 2017, transfers also represented movement of funds from a Stripe account to a card or bank account. This behavior has since been split - out into a [Payout](https://api.stripe.com#payout_object) object, with corresponding payout endpoints. For more + out into a [Payout](https://docs.stripe.com/api#payout_object) object, with corresponding payout endpoints. For more information, read about the [transfer/payout split](https://docs.stripe.com/transfer-payout-split). diff --git a/stripe/_v1_services.py b/stripe/_v1_services.py index ca9cc05b8..1a71694d2 100644 --- a/stripe/_v1_services.py +++ b/stripe/_v1_services.py @@ -61,6 +61,7 @@ from stripe._payout_service import PayoutService from stripe._plan_service import PlanService from stripe._price_service import PriceService + from stripe._product_catalog_service import ProductCatalogService from stripe._product_service import ProductService from stripe._promotion_code_service import PromotionCodeService from stripe._quote_service import QuoteService @@ -84,6 +85,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 @@ -189,6 +191,10 @@ "plans": ["stripe._plan_service", "PlanService"], "prices": ["stripe._price_service", "PriceService"], "products": ["stripe._product_service", "ProductService"], + "product_catalog": [ + "stripe._product_catalog_service", + "ProductCatalogService", + ], "promotion_codes": [ "stripe._promotion_code_service", "PromotionCodeService", @@ -218,6 +224,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"], @@ -277,6 +287,7 @@ class V1Services(StripeService): plans: "PlanService" prices: "PriceService" products: "ProductService" + product_catalog: "ProductCatalogService" promotion_codes: "PromotionCodeService" quotes: "QuoteService" radar: "RadarService" @@ -297,6 +308,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 d155eaf6e..f5886872f 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -47,7 +47,7 @@ class WebhookEndpoint( OBJECT_NAME: ClassVar[Literal["webhook_endpoint"]] = "webhook_endpoint" api_version: Optional[str] """ - The API version events are rendered as for this webhook endpoint. + The API version that events are rendered as for this webhook endpoint. You can't change this value after you create the endpoint. """ application: Optional[str] """ diff --git a/stripe/apps/__init__.py b/stripe/apps/__init__.py index f4e11b24d..1d8f2463c 100644 --- a/stripe/apps/__init__.py +++ b/stripe/apps/__init__.py @@ -4,11 +4,15 @@ from typing_extensions import TYPE_CHECKING 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 new file mode 100644 index 000000000..41d2fc2cf --- /dev/null +++ b/stripe/apps/_install.py @@ -0,0 +1,368 @@ +# -*- 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 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( + 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 + that the app's latest version requests but the account has not authorized yet. Use the Install API to + install, reauthorize, and uninstall apps, and to check the state of existing installs. + """ + + OBJECT_NAME: ClassVar[Literal["apps.install"]] = "apps.install" + + class ContentSecurityPolicyGranted(StripeObject): + connect_src: List[str] + """ + The URLs that the app can make network requests to. + """ + image_src: List[str] + """ + The URLs that the app can load images from. + """ + + class ContentSecurityPolicyPending(StripeObject): + connect_src: List[str] + """ + The URLs that the app can make network requests to. + """ + image_src: List[str] + """ + The URLs that the app can load images from. + """ + + account: str + """ + The ID of the account that the app install belongs to. + """ + app: str + """ + The ID of the app installed. + """ + approval_required: bool + """ + 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. + """ + channel: Union[ + Literal["private_live", "private_test", "public", "review", "testing"], + str, + ] + """ + The distribution channel associated with the app install. + """ + content_security_policy_granted: ContentSecurityPolicyGranted + content_security_policy_pending: ContentSecurityPolicyPending + created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ + created_by: Optional[str] + """ + The ID of the embedding platform that created the install, if applicable. + """ + endpoints_granted: List[str] + """ + The endpoint URLs authorized by the installer. + """ + endpoints_pending: List[str] + """ + The endpoint URLs requested by the latest app version that the installer has not authorized. + """ + 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`. + """ + object: Literal["apps.install"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + permissions_granted: List[str] + """ + The permissions authorized by the installer. + """ + permissions_pending: List[str] + """ + The permissions requested by the latest app version that the installer has not authorized. + """ + 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 or embedding platform acting on a connected account through Stripe-Account installs or reinstalls its app there. 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 or embedding platform acting on a connected account through Stripe-Account installs or reinstalls its app there. 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 or embedding platform filtering by its own app sees the installs across the accounts that installed it; other callers see the installs on their own account. The key selects the environment: a live key lists live installs, a sandbox API key lists the installs on that sandbox, and the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. For existing accounts that still use legacy test mode, a test mode key lists legacy test mode installs. + """ + 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 or embedding platform filtering by its own app sees the installs across the accounts that installed it; other callers see the installs on their own account. The key selects the environment: a live key lists live installs, a sandbox API key lists the installs on that sandbox, and the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. For existing accounts that still use legacy test mode, a test mode key lists legacy test mode installs. + """ + 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; app developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. 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; app developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. 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 = { + "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..bd6740126 --- /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 or embedding platform filtering by its own app sees the installs across the accounts that installed it; other callers see the installs on their own account. The key selects the environment: a live key lists live installs, a sandbox API key lists the installs on that sandbox, and the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. For existing accounts that still use legacy test mode, a test mode key lists legacy test mode installs. + """ + 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 or embedding platform filtering by its own app sees the installs across the accounts that installed it; other callers see the installs on their own account. The key selects the environment: a live key lists live installs, a sandbox API key lists the installs on that sandbox, and the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. For existing accounts that still use legacy test mode, a test mode key lists legacy test mode installs. + """ + 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 or embedding platform acting on a connected account through Stripe-Account installs or reinstalls its app there. 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 or embedding platform acting on a connected account through Stripe-Account installs or reinstalls its app there. 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; app developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. 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; app developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. 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/_feedback_option.py b/stripe/billing/_feedback_option.py index 5556167aa..bea3b6b8d 100644 --- a/stripe/billing/_feedback_option.py +++ b/stripe/billing/_feedback_option.py @@ -33,7 +33,11 @@ class FeedbackOption( UpdateableAPIResource["FeedbackOption"], ): """ - A resource for the feedback options model (for custom cancellation reasons) + A feedback option is a reason you can present to customers when they cancel a + subscription through the customer portal. Configure the set of options a customer + can choose from on a [portal configuration](https://docs.stripe.com/api/customer_portal/configuration). + + Related guide: [Customer management](https://docs.stripe.com/customer-management) """ OBJECT_NAME: ClassVar[Literal["billing.feedback_option"]] = ( @@ -215,7 +219,7 @@ def list( cls, **params: Unpack["FeedbackOptionListParams"] ) -> ListObject["FeedbackOption"]: """ - An API method for listing the feedback options model + Returns a list of your feedback options. """ result = cls._static_request( "get", @@ -235,7 +239,7 @@ async def list_async( cls, **params: Unpack["FeedbackOptionListParams"] ) -> ListObject["FeedbackOption"]: """ - An API method for listing the feedback options model + Returns a list of your feedback options. """ result = await cls._static_request_async( "get", @@ -289,7 +293,7 @@ def retrieve( cls, id: str, **params: Unpack["FeedbackOptionRetrieveParams"] ) -> "FeedbackOption": """ - Retrieves a feedback options object given an ID. + Retrieves a feedback option object given an ID. """ instance = cls(id, **params) instance.refresh() @@ -300,7 +304,7 @@ async def retrieve_async( cls, id: str, **params: Unpack["FeedbackOptionRetrieveParams"] ) -> "FeedbackOption": """ - Retrieves a feedback options object given an ID. + Retrieves a feedback option object given an ID. """ instance = cls(id, **params) await instance.refresh_async() diff --git a/stripe/billing/_feedback_option_service.py b/stripe/billing/_feedback_option_service.py index 6280e97b3..ca375169d 100644 --- a/stripe/billing/_feedback_option_service.py +++ b/stripe/billing/_feedback_option_service.py @@ -33,7 +33,7 @@ def list( options: Optional["RequestOptions"] = None, ) -> "ListObject[FeedbackOption]": """ - An API method for listing the feedback options model + Returns a list of your feedback options. """ return cast( "ListObject[FeedbackOption]", @@ -52,7 +52,7 @@ async def list_async( options: Optional["RequestOptions"] = None, ) -> "ListObject[FeedbackOption]": """ - An API method for listing the feedback options model + Returns a list of your feedback options. """ return cast( "ListObject[FeedbackOption]", @@ -111,7 +111,7 @@ def retrieve( options: Optional["RequestOptions"] = None, ) -> "FeedbackOption": """ - Retrieves a feedback options object given an ID. + Retrieves a feedback option object given an ID. """ return cast( "FeedbackOption", @@ -132,7 +132,7 @@ async def retrieve_async( options: Optional["RequestOptions"] = None, ) -> "FeedbackOption": """ - Retrieves a feedback options object given an ID. + Retrieves a feedback option object given an ID. """ return cast( "FeedbackOption", diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 07c9366e6..54eb0e8bb 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -328,7 +328,7 @@ class Option(StripeObject): class Label(StripeObject): custom: Optional[str] """ - Custom text for the label, displayed to the customer. Up to 50 characters. + Custom text for the label, displayed to the customer. Up to 100 characters. """ type: Literal["custom"] """ @@ -950,7 +950,9 @@ class MandateOptions(StripeObject): _inner_class_types = {"mandate_options": MandateOptions} class Bancontact(StripeObject): - setup_future_usage: Optional[Literal["none"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1655,6 +1657,12 @@ class MandateOptions(StripeObject): """ _inner_class_types = {"mandate_options": MandateOptions} + class Sequra(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + class Sofort(StripeObject): setup_future_usage: Optional[Literal["none"]] """ @@ -1867,6 +1875,7 @@ class WechatPay(StripeObject): satispay: Optional[Satispay] scalapay: Optional[Scalapay] sepa_debit: Optional[SepaDebit] + sequra: Optional[Sequra] sofort: Optional[Sofort] sunbit: Optional[Sunbit] swish: Optional[Swish] @@ -1914,6 +1923,7 @@ class WechatPay(StripeObject): "satispay": Satispay, "scalapay": Scalapay, "sepa_debit": SepaDebit, + "sequra": Sequra, "sofort": Sofort, "sunbit": Sunbit, "swish": Swish, @@ -2315,7 +2325,7 @@ class Discount(StripeObject): """ discount: "DiscountResource" """ - A discount represents the actual application of a [coupon](https://api.stripe.com#coupons) or [promotion code](https://api.stripe.com#promotion_codes). + A discount represents the actual application of a [coupon](https://docs.stripe.com/api#coupons) or [promotion code](https://docs.stripe.com/api#promotion_codes). It contains information about when the discount began, when it will end, and what it is applied to. Related guide: [Applying discounts to subscriptions](https://docs.stripe.com/billing/subscriptions/discounts) @@ -2409,6 +2419,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. @@ -2466,7 +2480,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_text: CustomText customer: Optional[ExpandableField["Customer"]] diff --git a/stripe/events/__init__.py b/stripe/events/__init__.py index 18de34fa3..ebca31636 100644 --- a/stripe/events/__init__.py +++ b/stripe/events/__init__.py @@ -13,6 +13,74 @@ from stripe.events._event_classes import ( ALL_EVENT_NOTIFICATIONS as ALL_EVENT_NOTIFICATIONS, ) + from stripe.events._v1_account_application_authorized_event import ( + V1AccountApplicationAuthorizedEvent as V1AccountApplicationAuthorizedEvent, + V1AccountApplicationAuthorizedEventNotification as V1AccountApplicationAuthorizedEventNotification, + ) + from stripe.events._v1_account_application_deauthorized_event import ( + V1AccountApplicationDeauthorizedEvent as V1AccountApplicationDeauthorizedEvent, + V1AccountApplicationDeauthorizedEventNotification as V1AccountApplicationDeauthorizedEventNotification, + ) + from stripe.events._v1_account_external_account_created_event import ( + V1AccountExternalAccountCreatedEvent as V1AccountExternalAccountCreatedEvent, + V1AccountExternalAccountCreatedEventNotification as V1AccountExternalAccountCreatedEventNotification, + ) + from stripe.events._v1_account_external_account_deleted_event import ( + V1AccountExternalAccountDeletedEvent as V1AccountExternalAccountDeletedEvent, + V1AccountExternalAccountDeletedEventNotification as V1AccountExternalAccountDeletedEventNotification, + ) + from stripe.events._v1_account_external_account_updated_event import ( + V1AccountExternalAccountUpdatedEvent as V1AccountExternalAccountUpdatedEvent, + V1AccountExternalAccountUpdatedEventNotification as V1AccountExternalAccountUpdatedEventNotification, + ) + from stripe.events._v1_account_updated_event import ( + V1AccountUpdatedEvent as V1AccountUpdatedEvent, + V1AccountUpdatedEventNotification as V1AccountUpdatedEventNotification, + ) + from stripe.events._v1_application_fee_created_event import ( + V1ApplicationFeeCreatedEvent as V1ApplicationFeeCreatedEvent, + V1ApplicationFeeCreatedEventNotification as V1ApplicationFeeCreatedEventNotification, + ) + from stripe.events._v1_application_fee_refund_updated_event import ( + V1ApplicationFeeRefundUpdatedEvent as V1ApplicationFeeRefundUpdatedEvent, + V1ApplicationFeeRefundUpdatedEventNotification as V1ApplicationFeeRefundUpdatedEventNotification, + ) + from stripe.events._v1_application_fee_refunded_event import ( + V1ApplicationFeeRefundedEvent as V1ApplicationFeeRefundedEvent, + V1ApplicationFeeRefundedEventNotification as V1ApplicationFeeRefundedEventNotification, + ) + from stripe.events._v1_balance_available_event import ( + V1BalanceAvailableEvent as V1BalanceAvailableEvent, + V1BalanceAvailableEventNotification as V1BalanceAvailableEventNotification, + ) + from stripe.events._v1_balance_settings_updated_event import ( + V1BalanceSettingsUpdatedEvent as V1BalanceSettingsUpdatedEvent, + V1BalanceSettingsUpdatedEventNotification as V1BalanceSettingsUpdatedEventNotification, + ) + from stripe.events._v1_billing_alert_triggered_event import ( + V1BillingAlertTriggeredEvent as V1BillingAlertTriggeredEvent, + V1BillingAlertTriggeredEventNotification as V1BillingAlertTriggeredEventNotification, + ) + from stripe.events._v1_billing_credit_balance_transaction_created_event import ( + V1BillingCreditBalanceTransactionCreatedEvent as V1BillingCreditBalanceTransactionCreatedEvent, + V1BillingCreditBalanceTransactionCreatedEventNotification as V1BillingCreditBalanceTransactionCreatedEventNotification, + ) + from stripe.events._v1_billing_credit_grant_created_event import ( + V1BillingCreditGrantCreatedEvent as V1BillingCreditGrantCreatedEvent, + V1BillingCreditGrantCreatedEventNotification as V1BillingCreditGrantCreatedEventNotification, + ) + from stripe.events._v1_billing_credit_grant_updated_event import ( + V1BillingCreditGrantUpdatedEvent as V1BillingCreditGrantUpdatedEvent, + V1BillingCreditGrantUpdatedEventNotification as V1BillingCreditGrantUpdatedEventNotification, + ) + from stripe.events._v1_billing_meter_created_event import ( + V1BillingMeterCreatedEvent as V1BillingMeterCreatedEvent, + V1BillingMeterCreatedEventNotification as V1BillingMeterCreatedEventNotification, + ) + from stripe.events._v1_billing_meter_deactivated_event import ( + V1BillingMeterDeactivatedEvent as V1BillingMeterDeactivatedEvent, + V1BillingMeterDeactivatedEventNotification as V1BillingMeterDeactivatedEventNotification, + ) from stripe.events._v1_billing_meter_error_report_triggered_event import ( V1BillingMeterErrorReportTriggeredEvent as V1BillingMeterErrorReportTriggeredEvent, V1BillingMeterErrorReportTriggeredEventNotification as V1BillingMeterErrorReportTriggeredEventNotification, @@ -21,6 +89,802 @@ V1BillingMeterNoMeterFoundEvent as V1BillingMeterNoMeterFoundEvent, V1BillingMeterNoMeterFoundEventNotification as V1BillingMeterNoMeterFoundEventNotification, ) + from stripe.events._v1_billing_meter_reactivated_event import ( + V1BillingMeterReactivatedEvent as V1BillingMeterReactivatedEvent, + V1BillingMeterReactivatedEventNotification as V1BillingMeterReactivatedEventNotification, + ) + from stripe.events._v1_billing_meter_updated_event import ( + V1BillingMeterUpdatedEvent as V1BillingMeterUpdatedEvent, + V1BillingMeterUpdatedEventNotification as V1BillingMeterUpdatedEventNotification, + ) + from stripe.events._v1_billing_portal_configuration_created_event import ( + V1BillingPortalConfigurationCreatedEvent as V1BillingPortalConfigurationCreatedEvent, + V1BillingPortalConfigurationCreatedEventNotification as V1BillingPortalConfigurationCreatedEventNotification, + ) + from stripe.events._v1_billing_portal_configuration_updated_event import ( + V1BillingPortalConfigurationUpdatedEvent as V1BillingPortalConfigurationUpdatedEvent, + V1BillingPortalConfigurationUpdatedEventNotification as V1BillingPortalConfigurationUpdatedEventNotification, + ) + from stripe.events._v1_billing_portal_session_created_event import ( + V1BillingPortalSessionCreatedEvent as V1BillingPortalSessionCreatedEvent, + V1BillingPortalSessionCreatedEventNotification as V1BillingPortalSessionCreatedEventNotification, + ) + from stripe.events._v1_capability_updated_event import ( + V1CapabilityUpdatedEvent as V1CapabilityUpdatedEvent, + V1CapabilityUpdatedEventNotification as V1CapabilityUpdatedEventNotification, + ) + from stripe.events._v1_cash_balance_funds_available_event import ( + V1CashBalanceFundsAvailableEvent as V1CashBalanceFundsAvailableEvent, + V1CashBalanceFundsAvailableEventNotification as V1CashBalanceFundsAvailableEventNotification, + ) + from stripe.events._v1_charge_captured_event import ( + V1ChargeCapturedEvent as V1ChargeCapturedEvent, + V1ChargeCapturedEventNotification as V1ChargeCapturedEventNotification, + ) + from stripe.events._v1_charge_dispute_closed_event import ( + V1ChargeDisputeClosedEvent as V1ChargeDisputeClosedEvent, + V1ChargeDisputeClosedEventNotification as V1ChargeDisputeClosedEventNotification, + ) + from stripe.events._v1_charge_dispute_created_event import ( + V1ChargeDisputeCreatedEvent as V1ChargeDisputeCreatedEvent, + V1ChargeDisputeCreatedEventNotification as V1ChargeDisputeCreatedEventNotification, + ) + from stripe.events._v1_charge_dispute_funds_reinstated_event import ( + V1ChargeDisputeFundsReinstatedEvent as V1ChargeDisputeFundsReinstatedEvent, + V1ChargeDisputeFundsReinstatedEventNotification as V1ChargeDisputeFundsReinstatedEventNotification, + ) + from stripe.events._v1_charge_dispute_funds_withdrawn_event import ( + V1ChargeDisputeFundsWithdrawnEvent as V1ChargeDisputeFundsWithdrawnEvent, + V1ChargeDisputeFundsWithdrawnEventNotification as V1ChargeDisputeFundsWithdrawnEventNotification, + ) + from stripe.events._v1_charge_dispute_updated_event import ( + V1ChargeDisputeUpdatedEvent as V1ChargeDisputeUpdatedEvent, + V1ChargeDisputeUpdatedEventNotification as V1ChargeDisputeUpdatedEventNotification, + ) + from stripe.events._v1_charge_expired_event import ( + V1ChargeExpiredEvent as V1ChargeExpiredEvent, + V1ChargeExpiredEventNotification as V1ChargeExpiredEventNotification, + ) + from stripe.events._v1_charge_failed_event import ( + V1ChargeFailedEvent as V1ChargeFailedEvent, + V1ChargeFailedEventNotification as V1ChargeFailedEventNotification, + ) + from stripe.events._v1_charge_pending_event import ( + V1ChargePendingEvent as V1ChargePendingEvent, + V1ChargePendingEventNotification as V1ChargePendingEventNotification, + ) + from stripe.events._v1_charge_refund_updated_event import ( + V1ChargeRefundUpdatedEvent as V1ChargeRefundUpdatedEvent, + V1ChargeRefundUpdatedEventNotification as V1ChargeRefundUpdatedEventNotification, + ) + from stripe.events._v1_charge_refunded_event import ( + V1ChargeRefundedEvent as V1ChargeRefundedEvent, + V1ChargeRefundedEventNotification as V1ChargeRefundedEventNotification, + ) + from stripe.events._v1_charge_succeeded_event import ( + V1ChargeSucceededEvent as V1ChargeSucceededEvent, + V1ChargeSucceededEventNotification as V1ChargeSucceededEventNotification, + ) + from stripe.events._v1_charge_updated_event import ( + V1ChargeUpdatedEvent as V1ChargeUpdatedEvent, + V1ChargeUpdatedEventNotification as V1ChargeUpdatedEventNotification, + ) + from stripe.events._v1_checkout_session_async_payment_failed_event import ( + V1CheckoutSessionAsyncPaymentFailedEvent as V1CheckoutSessionAsyncPaymentFailedEvent, + V1CheckoutSessionAsyncPaymentFailedEventNotification as V1CheckoutSessionAsyncPaymentFailedEventNotification, + ) + from stripe.events._v1_checkout_session_async_payment_succeeded_event import ( + V1CheckoutSessionAsyncPaymentSucceededEvent as V1CheckoutSessionAsyncPaymentSucceededEvent, + V1CheckoutSessionAsyncPaymentSucceededEventNotification as V1CheckoutSessionAsyncPaymentSucceededEventNotification, + ) + from stripe.events._v1_checkout_session_completed_event import ( + V1CheckoutSessionCompletedEvent as V1CheckoutSessionCompletedEvent, + V1CheckoutSessionCompletedEventNotification as V1CheckoutSessionCompletedEventNotification, + ) + from stripe.events._v1_checkout_session_expired_event import ( + V1CheckoutSessionExpiredEvent as V1CheckoutSessionExpiredEvent, + V1CheckoutSessionExpiredEventNotification as V1CheckoutSessionExpiredEventNotification, + ) + from stripe.events._v1_climate_order_canceled_event import ( + V1ClimateOrderCanceledEvent as V1ClimateOrderCanceledEvent, + V1ClimateOrderCanceledEventNotification as V1ClimateOrderCanceledEventNotification, + ) + from stripe.events._v1_climate_order_created_event import ( + V1ClimateOrderCreatedEvent as V1ClimateOrderCreatedEvent, + V1ClimateOrderCreatedEventNotification as V1ClimateOrderCreatedEventNotification, + ) + from stripe.events._v1_climate_order_delayed_event import ( + V1ClimateOrderDelayedEvent as V1ClimateOrderDelayedEvent, + V1ClimateOrderDelayedEventNotification as V1ClimateOrderDelayedEventNotification, + ) + from stripe.events._v1_climate_order_delivered_event import ( + V1ClimateOrderDeliveredEvent as V1ClimateOrderDeliveredEvent, + V1ClimateOrderDeliveredEventNotification as V1ClimateOrderDeliveredEventNotification, + ) + from stripe.events._v1_climate_order_product_substituted_event import ( + V1ClimateOrderProductSubstitutedEvent as V1ClimateOrderProductSubstitutedEvent, + V1ClimateOrderProductSubstitutedEventNotification as V1ClimateOrderProductSubstitutedEventNotification, + ) + from stripe.events._v1_climate_product_created_event import ( + V1ClimateProductCreatedEvent as V1ClimateProductCreatedEvent, + V1ClimateProductCreatedEventNotification as V1ClimateProductCreatedEventNotification, + ) + from stripe.events._v1_climate_product_pricing_updated_event import ( + V1ClimateProductPricingUpdatedEvent as V1ClimateProductPricingUpdatedEvent, + V1ClimateProductPricingUpdatedEventNotification as V1ClimateProductPricingUpdatedEventNotification, + ) + from stripe.events._v1_coupon_created_event import ( + V1CouponCreatedEvent as V1CouponCreatedEvent, + V1CouponCreatedEventNotification as V1CouponCreatedEventNotification, + ) + from stripe.events._v1_coupon_deleted_event import ( + V1CouponDeletedEvent as V1CouponDeletedEvent, + V1CouponDeletedEventNotification as V1CouponDeletedEventNotification, + ) + from stripe.events._v1_coupon_updated_event import ( + V1CouponUpdatedEvent as V1CouponUpdatedEvent, + V1CouponUpdatedEventNotification as V1CouponUpdatedEventNotification, + ) + from stripe.events._v1_credit_note_created_event import ( + V1CreditNoteCreatedEvent as V1CreditNoteCreatedEvent, + V1CreditNoteCreatedEventNotification as V1CreditNoteCreatedEventNotification, + ) + from stripe.events._v1_credit_note_updated_event import ( + V1CreditNoteUpdatedEvent as V1CreditNoteUpdatedEvent, + V1CreditNoteUpdatedEventNotification as V1CreditNoteUpdatedEventNotification, + ) + from stripe.events._v1_credit_note_voided_event import ( + V1CreditNoteVoidedEvent as V1CreditNoteVoidedEvent, + V1CreditNoteVoidedEventNotification as V1CreditNoteVoidedEventNotification, + ) + from stripe.events._v1_customer_cash_balance_transaction_created_event import ( + V1CustomerCashBalanceTransactionCreatedEvent as V1CustomerCashBalanceTransactionCreatedEvent, + V1CustomerCashBalanceTransactionCreatedEventNotification as V1CustomerCashBalanceTransactionCreatedEventNotification, + ) + from stripe.events._v1_customer_created_event import ( + V1CustomerCreatedEvent as V1CustomerCreatedEvent, + V1CustomerCreatedEventNotification as V1CustomerCreatedEventNotification, + ) + from stripe.events._v1_customer_deleted_event import ( + V1CustomerDeletedEvent as V1CustomerDeletedEvent, + V1CustomerDeletedEventNotification as V1CustomerDeletedEventNotification, + ) + from stripe.events._v1_customer_discount_created_event import ( + V1CustomerDiscountCreatedEvent as V1CustomerDiscountCreatedEvent, + V1CustomerDiscountCreatedEventNotification as V1CustomerDiscountCreatedEventNotification, + ) + from stripe.events._v1_customer_discount_deleted_event import ( + V1CustomerDiscountDeletedEvent as V1CustomerDiscountDeletedEvent, + V1CustomerDiscountDeletedEventNotification as V1CustomerDiscountDeletedEventNotification, + ) + from stripe.events._v1_customer_discount_updated_event import ( + V1CustomerDiscountUpdatedEvent as V1CustomerDiscountUpdatedEvent, + V1CustomerDiscountUpdatedEventNotification as V1CustomerDiscountUpdatedEventNotification, + ) + from stripe.events._v1_customer_subscription_created_event import ( + V1CustomerSubscriptionCreatedEvent as V1CustomerSubscriptionCreatedEvent, + V1CustomerSubscriptionCreatedEventNotification as V1CustomerSubscriptionCreatedEventNotification, + ) + from stripe.events._v1_customer_subscription_deleted_event import ( + V1CustomerSubscriptionDeletedEvent as V1CustomerSubscriptionDeletedEvent, + V1CustomerSubscriptionDeletedEventNotification as V1CustomerSubscriptionDeletedEventNotification, + ) + from stripe.events._v1_customer_subscription_paused_event import ( + V1CustomerSubscriptionPausedEvent as V1CustomerSubscriptionPausedEvent, + V1CustomerSubscriptionPausedEventNotification as V1CustomerSubscriptionPausedEventNotification, + ) + from stripe.events._v1_customer_subscription_pending_update_applied_event import ( + V1CustomerSubscriptionPendingUpdateAppliedEvent as V1CustomerSubscriptionPendingUpdateAppliedEvent, + V1CustomerSubscriptionPendingUpdateAppliedEventNotification as V1CustomerSubscriptionPendingUpdateAppliedEventNotification, + ) + from stripe.events._v1_customer_subscription_pending_update_expired_event import ( + V1CustomerSubscriptionPendingUpdateExpiredEvent as V1CustomerSubscriptionPendingUpdateExpiredEvent, + V1CustomerSubscriptionPendingUpdateExpiredEventNotification as V1CustomerSubscriptionPendingUpdateExpiredEventNotification, + ) + from stripe.events._v1_customer_subscription_resumed_event import ( + V1CustomerSubscriptionResumedEvent as V1CustomerSubscriptionResumedEvent, + V1CustomerSubscriptionResumedEventNotification as V1CustomerSubscriptionResumedEventNotification, + ) + from stripe.events._v1_customer_subscription_trial_will_end_event import ( + V1CustomerSubscriptionTrialWillEndEvent as V1CustomerSubscriptionTrialWillEndEvent, + V1CustomerSubscriptionTrialWillEndEventNotification as V1CustomerSubscriptionTrialWillEndEventNotification, + ) + from stripe.events._v1_customer_subscription_updated_event import ( + V1CustomerSubscriptionUpdatedEvent as V1CustomerSubscriptionUpdatedEvent, + V1CustomerSubscriptionUpdatedEventNotification as V1CustomerSubscriptionUpdatedEventNotification, + ) + from stripe.events._v1_customer_tax_id_created_event import ( + V1CustomerTaxIdCreatedEvent as V1CustomerTaxIdCreatedEvent, + V1CustomerTaxIdCreatedEventNotification as V1CustomerTaxIdCreatedEventNotification, + ) + from stripe.events._v1_customer_tax_id_deleted_event import ( + V1CustomerTaxIdDeletedEvent as V1CustomerTaxIdDeletedEvent, + V1CustomerTaxIdDeletedEventNotification as V1CustomerTaxIdDeletedEventNotification, + ) + from stripe.events._v1_customer_tax_id_updated_event import ( + V1CustomerTaxIdUpdatedEvent as V1CustomerTaxIdUpdatedEvent, + V1CustomerTaxIdUpdatedEventNotification as V1CustomerTaxIdUpdatedEventNotification, + ) + from stripe.events._v1_customer_updated_event import ( + V1CustomerUpdatedEvent as V1CustomerUpdatedEvent, + V1CustomerUpdatedEventNotification as V1CustomerUpdatedEventNotification, + ) + from stripe.events._v1_entitlements_active_entitlement_summary_updated_event import ( + V1EntitlementsActiveEntitlementSummaryUpdatedEvent as V1EntitlementsActiveEntitlementSummaryUpdatedEvent, + V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification as V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification, + ) + from stripe.events._v1_file_created_event import ( + V1FileCreatedEvent as V1FileCreatedEvent, + V1FileCreatedEventNotification as V1FileCreatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_account_numbers_updated_event import ( + V1FinancialConnectionsAccountAccountNumbersUpdatedEvent as V1FinancialConnectionsAccountAccountNumbersUpdatedEvent, + V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification as V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_created_event import ( + V1FinancialConnectionsAccountCreatedEvent as V1FinancialConnectionsAccountCreatedEvent, + V1FinancialConnectionsAccountCreatedEventNotification as V1FinancialConnectionsAccountCreatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_deactivated_event import ( + V1FinancialConnectionsAccountDeactivatedEvent as V1FinancialConnectionsAccountDeactivatedEvent, + V1FinancialConnectionsAccountDeactivatedEventNotification as V1FinancialConnectionsAccountDeactivatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_disconnected_event import ( + V1FinancialConnectionsAccountDisconnectedEvent as V1FinancialConnectionsAccountDisconnectedEvent, + V1FinancialConnectionsAccountDisconnectedEventNotification as V1FinancialConnectionsAccountDisconnectedEventNotification, + ) + from stripe.events._v1_financial_connections_account_expected_deactivation_date_updated_event import ( + V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent as V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent, + V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification as V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_reactivated_event import ( + V1FinancialConnectionsAccountReactivatedEvent as V1FinancialConnectionsAccountReactivatedEvent, + V1FinancialConnectionsAccountReactivatedEventNotification as V1FinancialConnectionsAccountReactivatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_refreshed_balance_event import ( + V1FinancialConnectionsAccountRefreshedBalanceEvent as V1FinancialConnectionsAccountRefreshedBalanceEvent, + V1FinancialConnectionsAccountRefreshedBalanceEventNotification as V1FinancialConnectionsAccountRefreshedBalanceEventNotification, + ) + from stripe.events._v1_financial_connections_account_refreshed_ownership_event import ( + V1FinancialConnectionsAccountRefreshedOwnershipEvent as V1FinancialConnectionsAccountRefreshedOwnershipEvent, + V1FinancialConnectionsAccountRefreshedOwnershipEventNotification as V1FinancialConnectionsAccountRefreshedOwnershipEventNotification, + ) + from stripe.events._v1_financial_connections_account_refreshed_transactions_event import ( + V1FinancialConnectionsAccountRefreshedTransactionsEvent as V1FinancialConnectionsAccountRefreshedTransactionsEvent, + V1FinancialConnectionsAccountRefreshedTransactionsEventNotification as V1FinancialConnectionsAccountRefreshedTransactionsEventNotification, + ) + from stripe.events._v1_financial_connections_account_supported_payment_method_types_updated_event import ( + V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent as V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent, + V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification as V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_upcoming_account_number_expiry_event import ( + V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent as V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent, + V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification as V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification, + ) + from stripe.events._v1_financial_connections_account_upcoming_deactivation_event import ( + V1FinancialConnectionsAccountUpcomingDeactivationEvent as V1FinancialConnectionsAccountUpcomingDeactivationEvent, + V1FinancialConnectionsAccountUpcomingDeactivationEventNotification as V1FinancialConnectionsAccountUpcomingDeactivationEventNotification, + ) + from stripe.events._v1_identity_verification_session_canceled_event import ( + V1IdentityVerificationSessionCanceledEvent as V1IdentityVerificationSessionCanceledEvent, + V1IdentityVerificationSessionCanceledEventNotification as V1IdentityVerificationSessionCanceledEventNotification, + ) + from stripe.events._v1_identity_verification_session_created_event import ( + V1IdentityVerificationSessionCreatedEvent as V1IdentityVerificationSessionCreatedEvent, + V1IdentityVerificationSessionCreatedEventNotification as V1IdentityVerificationSessionCreatedEventNotification, + ) + from stripe.events._v1_identity_verification_session_processing_event import ( + V1IdentityVerificationSessionProcessingEvent as V1IdentityVerificationSessionProcessingEvent, + V1IdentityVerificationSessionProcessingEventNotification as V1IdentityVerificationSessionProcessingEventNotification, + ) + from stripe.events._v1_identity_verification_session_redacted_event import ( + V1IdentityVerificationSessionRedactedEvent as V1IdentityVerificationSessionRedactedEvent, + V1IdentityVerificationSessionRedactedEventNotification as V1IdentityVerificationSessionRedactedEventNotification, + ) + from stripe.events._v1_identity_verification_session_requires_input_event import ( + V1IdentityVerificationSessionRequiresInputEvent as V1IdentityVerificationSessionRequiresInputEvent, + V1IdentityVerificationSessionRequiresInputEventNotification as V1IdentityVerificationSessionRequiresInputEventNotification, + ) + from stripe.events._v1_identity_verification_session_verified_event import ( + V1IdentityVerificationSessionVerifiedEvent as V1IdentityVerificationSessionVerifiedEvent, + V1IdentityVerificationSessionVerifiedEventNotification as V1IdentityVerificationSessionVerifiedEventNotification, + ) + from stripe.events._v1_invoice_created_event import ( + V1InvoiceCreatedEvent as V1InvoiceCreatedEvent, + V1InvoiceCreatedEventNotification as V1InvoiceCreatedEventNotification, + ) + from stripe.events._v1_invoice_deleted_event import ( + V1InvoiceDeletedEvent as V1InvoiceDeletedEvent, + V1InvoiceDeletedEventNotification as V1InvoiceDeletedEventNotification, + ) + from stripe.events._v1_invoice_finalization_failed_event import ( + V1InvoiceFinalizationFailedEvent as V1InvoiceFinalizationFailedEvent, + V1InvoiceFinalizationFailedEventNotification as V1InvoiceFinalizationFailedEventNotification, + ) + from stripe.events._v1_invoice_finalized_event import ( + V1InvoiceFinalizedEvent as V1InvoiceFinalizedEvent, + V1InvoiceFinalizedEventNotification as V1InvoiceFinalizedEventNotification, + ) + from stripe.events._v1_invoice_marked_uncollectible_event import ( + V1InvoiceMarkedUncollectibleEvent as V1InvoiceMarkedUncollectibleEvent, + V1InvoiceMarkedUncollectibleEventNotification as V1InvoiceMarkedUncollectibleEventNotification, + ) + from stripe.events._v1_invoice_overdue_event import ( + V1InvoiceOverdueEvent as V1InvoiceOverdueEvent, + V1InvoiceOverdueEventNotification as V1InvoiceOverdueEventNotification, + ) + from stripe.events._v1_invoice_overpaid_event import ( + V1InvoiceOverpaidEvent as V1InvoiceOverpaidEvent, + V1InvoiceOverpaidEventNotification as V1InvoiceOverpaidEventNotification, + ) + from stripe.events._v1_invoice_paid_event import ( + V1InvoicePaidEvent as V1InvoicePaidEvent, + V1InvoicePaidEventNotification as V1InvoicePaidEventNotification, + ) + from stripe.events._v1_invoice_payment_action_required_event import ( + V1InvoicePaymentActionRequiredEvent as V1InvoicePaymentActionRequiredEvent, + V1InvoicePaymentActionRequiredEventNotification as V1InvoicePaymentActionRequiredEventNotification, + ) + from stripe.events._v1_invoice_payment_attempt_required_event import ( + V1InvoicePaymentAttemptRequiredEvent as V1InvoicePaymentAttemptRequiredEvent, + V1InvoicePaymentAttemptRequiredEventNotification as V1InvoicePaymentAttemptRequiredEventNotification, + ) + from stripe.events._v1_invoice_payment_failed_event import ( + V1InvoicePaymentFailedEvent as V1InvoicePaymentFailedEvent, + V1InvoicePaymentFailedEventNotification as V1InvoicePaymentFailedEventNotification, + ) + from stripe.events._v1_invoice_payment_paid_event import ( + V1InvoicePaymentPaidEvent as V1InvoicePaymentPaidEvent, + V1InvoicePaymentPaidEventNotification as V1InvoicePaymentPaidEventNotification, + ) + from stripe.events._v1_invoice_payment_succeeded_event import ( + V1InvoicePaymentSucceededEvent as V1InvoicePaymentSucceededEvent, + V1InvoicePaymentSucceededEventNotification as V1InvoicePaymentSucceededEventNotification, + ) + from stripe.events._v1_invoice_sent_event import ( + V1InvoiceSentEvent as V1InvoiceSentEvent, + V1InvoiceSentEventNotification as V1InvoiceSentEventNotification, + ) + from stripe.events._v1_invoice_upcoming_event import ( + V1InvoiceUpcomingEvent as V1InvoiceUpcomingEvent, + V1InvoiceUpcomingEventNotification as V1InvoiceUpcomingEventNotification, + ) + from stripe.events._v1_invoice_updated_event import ( + V1InvoiceUpdatedEvent as V1InvoiceUpdatedEvent, + V1InvoiceUpdatedEventNotification as V1InvoiceUpdatedEventNotification, + ) + from stripe.events._v1_invoice_voided_event import ( + V1InvoiceVoidedEvent as V1InvoiceVoidedEvent, + V1InvoiceVoidedEventNotification as V1InvoiceVoidedEventNotification, + ) + from stripe.events._v1_invoice_will_be_due_event import ( + V1InvoiceWillBeDueEvent as V1InvoiceWillBeDueEvent, + V1InvoiceWillBeDueEventNotification as V1InvoiceWillBeDueEventNotification, + ) + from stripe.events._v1_invoiceitem_created_event import ( + V1InvoiceitemCreatedEvent as V1InvoiceitemCreatedEvent, + V1InvoiceitemCreatedEventNotification as V1InvoiceitemCreatedEventNotification, + ) + from stripe.events._v1_invoiceitem_deleted_event import ( + V1InvoiceitemDeletedEvent as V1InvoiceitemDeletedEvent, + V1InvoiceitemDeletedEventNotification as V1InvoiceitemDeletedEventNotification, + ) + from stripe.events._v1_issuing_authorization_created_event import ( + V1IssuingAuthorizationCreatedEvent as V1IssuingAuthorizationCreatedEvent, + V1IssuingAuthorizationCreatedEventNotification as V1IssuingAuthorizationCreatedEventNotification, + ) + from stripe.events._v1_issuing_authorization_request_event import ( + V1IssuingAuthorizationRequestEvent as V1IssuingAuthorizationRequestEvent, + V1IssuingAuthorizationRequestEventNotification as V1IssuingAuthorizationRequestEventNotification, + ) + from stripe.events._v1_issuing_authorization_updated_event import ( + V1IssuingAuthorizationUpdatedEvent as V1IssuingAuthorizationUpdatedEvent, + V1IssuingAuthorizationUpdatedEventNotification as V1IssuingAuthorizationUpdatedEventNotification, + ) + from stripe.events._v1_issuing_card_created_event import ( + V1IssuingCardCreatedEvent as V1IssuingCardCreatedEvent, + V1IssuingCardCreatedEventNotification as V1IssuingCardCreatedEventNotification, + ) + from stripe.events._v1_issuing_card_updated_event import ( + V1IssuingCardUpdatedEvent as V1IssuingCardUpdatedEvent, + V1IssuingCardUpdatedEventNotification as V1IssuingCardUpdatedEventNotification, + ) + from stripe.events._v1_issuing_cardholder_created_event import ( + V1IssuingCardholderCreatedEvent as V1IssuingCardholderCreatedEvent, + V1IssuingCardholderCreatedEventNotification as V1IssuingCardholderCreatedEventNotification, + ) + from stripe.events._v1_issuing_cardholder_updated_event import ( + V1IssuingCardholderUpdatedEvent as V1IssuingCardholderUpdatedEvent, + V1IssuingCardholderUpdatedEventNotification as V1IssuingCardholderUpdatedEventNotification, + ) + from stripe.events._v1_issuing_dispute_closed_event import ( + V1IssuingDisputeClosedEvent as V1IssuingDisputeClosedEvent, + V1IssuingDisputeClosedEventNotification as V1IssuingDisputeClosedEventNotification, + ) + from stripe.events._v1_issuing_dispute_created_event import ( + V1IssuingDisputeCreatedEvent as V1IssuingDisputeCreatedEvent, + V1IssuingDisputeCreatedEventNotification as V1IssuingDisputeCreatedEventNotification, + ) + from stripe.events._v1_issuing_dispute_funds_reinstated_event import ( + V1IssuingDisputeFundsReinstatedEvent as V1IssuingDisputeFundsReinstatedEvent, + V1IssuingDisputeFundsReinstatedEventNotification as V1IssuingDisputeFundsReinstatedEventNotification, + ) + from stripe.events._v1_issuing_dispute_funds_rescinded_event import ( + V1IssuingDisputeFundsRescindedEvent as V1IssuingDisputeFundsRescindedEvent, + V1IssuingDisputeFundsRescindedEventNotification as V1IssuingDisputeFundsRescindedEventNotification, + ) + from stripe.events._v1_issuing_dispute_submitted_event import ( + V1IssuingDisputeSubmittedEvent as V1IssuingDisputeSubmittedEvent, + V1IssuingDisputeSubmittedEventNotification as V1IssuingDisputeSubmittedEventNotification, + ) + from stripe.events._v1_issuing_dispute_updated_event import ( + V1IssuingDisputeUpdatedEvent as V1IssuingDisputeUpdatedEvent, + V1IssuingDisputeUpdatedEventNotification as V1IssuingDisputeUpdatedEventNotification, + ) + from stripe.events._v1_issuing_personalization_design_activated_event import ( + V1IssuingPersonalizationDesignActivatedEvent as V1IssuingPersonalizationDesignActivatedEvent, + V1IssuingPersonalizationDesignActivatedEventNotification as V1IssuingPersonalizationDesignActivatedEventNotification, + ) + from stripe.events._v1_issuing_personalization_design_deactivated_event import ( + V1IssuingPersonalizationDesignDeactivatedEvent as V1IssuingPersonalizationDesignDeactivatedEvent, + V1IssuingPersonalizationDesignDeactivatedEventNotification as V1IssuingPersonalizationDesignDeactivatedEventNotification, + ) + from stripe.events._v1_issuing_personalization_design_rejected_event import ( + V1IssuingPersonalizationDesignRejectedEvent as V1IssuingPersonalizationDesignRejectedEvent, + V1IssuingPersonalizationDesignRejectedEventNotification as V1IssuingPersonalizationDesignRejectedEventNotification, + ) + from stripe.events._v1_issuing_personalization_design_updated_event import ( + V1IssuingPersonalizationDesignUpdatedEvent as V1IssuingPersonalizationDesignUpdatedEvent, + V1IssuingPersonalizationDesignUpdatedEventNotification as V1IssuingPersonalizationDesignUpdatedEventNotification, + ) + from stripe.events._v1_issuing_token_created_event import ( + V1IssuingTokenCreatedEvent as V1IssuingTokenCreatedEvent, + V1IssuingTokenCreatedEventNotification as V1IssuingTokenCreatedEventNotification, + ) + from stripe.events._v1_issuing_token_updated_event import ( + V1IssuingTokenUpdatedEvent as V1IssuingTokenUpdatedEvent, + V1IssuingTokenUpdatedEventNotification as V1IssuingTokenUpdatedEventNotification, + ) + from stripe.events._v1_issuing_transaction_created_event import ( + V1IssuingTransactionCreatedEvent as V1IssuingTransactionCreatedEvent, + V1IssuingTransactionCreatedEventNotification as V1IssuingTransactionCreatedEventNotification, + ) + from stripe.events._v1_issuing_transaction_purchase_details_receipt_updated_event import ( + V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent as V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent, + V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification as V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification, + ) + from stripe.events._v1_issuing_transaction_updated_event import ( + V1IssuingTransactionUpdatedEvent as V1IssuingTransactionUpdatedEvent, + V1IssuingTransactionUpdatedEventNotification as V1IssuingTransactionUpdatedEventNotification, + ) + from stripe.events._v1_mandate_updated_event import ( + V1MandateUpdatedEvent as V1MandateUpdatedEvent, + V1MandateUpdatedEventNotification as V1MandateUpdatedEventNotification, + ) + from stripe.events._v1_payment_intent_amount_capturable_updated_event import ( + V1PaymentIntentAmountCapturableUpdatedEvent as V1PaymentIntentAmountCapturableUpdatedEvent, + V1PaymentIntentAmountCapturableUpdatedEventNotification as V1PaymentIntentAmountCapturableUpdatedEventNotification, + ) + from stripe.events._v1_payment_intent_canceled_event import ( + V1PaymentIntentCanceledEvent as V1PaymentIntentCanceledEvent, + V1PaymentIntentCanceledEventNotification as V1PaymentIntentCanceledEventNotification, + ) + from stripe.events._v1_payment_intent_created_event import ( + V1PaymentIntentCreatedEvent as V1PaymentIntentCreatedEvent, + V1PaymentIntentCreatedEventNotification as V1PaymentIntentCreatedEventNotification, + ) + from stripe.events._v1_payment_intent_partially_funded_event import ( + V1PaymentIntentPartiallyFundedEvent as V1PaymentIntentPartiallyFundedEvent, + V1PaymentIntentPartiallyFundedEventNotification as V1PaymentIntentPartiallyFundedEventNotification, + ) + from stripe.events._v1_payment_intent_payment_failed_event import ( + V1PaymentIntentPaymentFailedEvent as V1PaymentIntentPaymentFailedEvent, + V1PaymentIntentPaymentFailedEventNotification as V1PaymentIntentPaymentFailedEventNotification, + ) + from stripe.events._v1_payment_intent_processing_event import ( + V1PaymentIntentProcessingEvent as V1PaymentIntentProcessingEvent, + V1PaymentIntentProcessingEventNotification as V1PaymentIntentProcessingEventNotification, + ) + from stripe.events._v1_payment_intent_requires_action_event import ( + V1PaymentIntentRequiresActionEvent as V1PaymentIntentRequiresActionEvent, + V1PaymentIntentRequiresActionEventNotification as V1PaymentIntentRequiresActionEventNotification, + ) + from stripe.events._v1_payment_intent_succeeded_event import ( + V1PaymentIntentSucceededEvent as V1PaymentIntentSucceededEvent, + V1PaymentIntentSucceededEventNotification as V1PaymentIntentSucceededEventNotification, + ) + from stripe.events._v1_payment_link_created_event import ( + V1PaymentLinkCreatedEvent as V1PaymentLinkCreatedEvent, + V1PaymentLinkCreatedEventNotification as V1PaymentLinkCreatedEventNotification, + ) + from stripe.events._v1_payment_link_updated_event import ( + V1PaymentLinkUpdatedEvent as V1PaymentLinkUpdatedEvent, + V1PaymentLinkUpdatedEventNotification as V1PaymentLinkUpdatedEventNotification, + ) + from stripe.events._v1_payment_method_attached_event import ( + V1PaymentMethodAttachedEvent as V1PaymentMethodAttachedEvent, + V1PaymentMethodAttachedEventNotification as V1PaymentMethodAttachedEventNotification, + ) + from stripe.events._v1_payment_method_automatically_updated_event import ( + V1PaymentMethodAutomaticallyUpdatedEvent as V1PaymentMethodAutomaticallyUpdatedEvent, + V1PaymentMethodAutomaticallyUpdatedEventNotification as V1PaymentMethodAutomaticallyUpdatedEventNotification, + ) + from stripe.events._v1_payment_method_detached_event import ( + V1PaymentMethodDetachedEvent as V1PaymentMethodDetachedEvent, + V1PaymentMethodDetachedEventNotification as V1PaymentMethodDetachedEventNotification, + ) + from stripe.events._v1_payment_method_updated_event import ( + V1PaymentMethodUpdatedEvent as V1PaymentMethodUpdatedEvent, + V1PaymentMethodUpdatedEventNotification as V1PaymentMethodUpdatedEventNotification, + ) + from stripe.events._v1_payout_canceled_event import ( + V1PayoutCanceledEvent as V1PayoutCanceledEvent, + V1PayoutCanceledEventNotification as V1PayoutCanceledEventNotification, + ) + from stripe.events._v1_payout_created_event import ( + V1PayoutCreatedEvent as V1PayoutCreatedEvent, + V1PayoutCreatedEventNotification as V1PayoutCreatedEventNotification, + ) + from stripe.events._v1_payout_failed_event import ( + V1PayoutFailedEvent as V1PayoutFailedEvent, + V1PayoutFailedEventNotification as V1PayoutFailedEventNotification, + ) + from stripe.events._v1_payout_paid_event import ( + V1PayoutPaidEvent as V1PayoutPaidEvent, + V1PayoutPaidEventNotification as V1PayoutPaidEventNotification, + ) + from stripe.events._v1_payout_reconciliation_completed_event import ( + V1PayoutReconciliationCompletedEvent as V1PayoutReconciliationCompletedEvent, + V1PayoutReconciliationCompletedEventNotification as V1PayoutReconciliationCompletedEventNotification, + ) + from stripe.events._v1_payout_updated_event import ( + V1PayoutUpdatedEvent as V1PayoutUpdatedEvent, + V1PayoutUpdatedEventNotification as V1PayoutUpdatedEventNotification, + ) + from stripe.events._v1_person_created_event import ( + V1PersonCreatedEvent as V1PersonCreatedEvent, + V1PersonCreatedEventNotification as V1PersonCreatedEventNotification, + ) + from stripe.events._v1_person_deleted_event import ( + V1PersonDeletedEvent as V1PersonDeletedEvent, + V1PersonDeletedEventNotification as V1PersonDeletedEventNotification, + ) + from stripe.events._v1_person_updated_event import ( + V1PersonUpdatedEvent as V1PersonUpdatedEvent, + V1PersonUpdatedEventNotification as V1PersonUpdatedEventNotification, + ) + from stripe.events._v1_plan_created_event import ( + V1PlanCreatedEvent as V1PlanCreatedEvent, + V1PlanCreatedEventNotification as V1PlanCreatedEventNotification, + ) + from stripe.events._v1_plan_deleted_event import ( + V1PlanDeletedEvent as V1PlanDeletedEvent, + V1PlanDeletedEventNotification as V1PlanDeletedEventNotification, + ) + from stripe.events._v1_plan_updated_event import ( + V1PlanUpdatedEvent as V1PlanUpdatedEvent, + V1PlanUpdatedEventNotification as V1PlanUpdatedEventNotification, + ) + from stripe.events._v1_price_created_event import ( + V1PriceCreatedEvent as V1PriceCreatedEvent, + V1PriceCreatedEventNotification as V1PriceCreatedEventNotification, + ) + from stripe.events._v1_price_deleted_event import ( + V1PriceDeletedEvent as V1PriceDeletedEvent, + V1PriceDeletedEventNotification as V1PriceDeletedEventNotification, + ) + from stripe.events._v1_price_updated_event import ( + V1PriceUpdatedEvent as V1PriceUpdatedEvent, + V1PriceUpdatedEventNotification as V1PriceUpdatedEventNotification, + ) + from stripe.events._v1_product_created_event import ( + V1ProductCreatedEvent as V1ProductCreatedEvent, + V1ProductCreatedEventNotification as V1ProductCreatedEventNotification, + ) + from stripe.events._v1_product_deleted_event import ( + V1ProductDeletedEvent as V1ProductDeletedEvent, + V1ProductDeletedEventNotification as V1ProductDeletedEventNotification, + ) + from stripe.events._v1_product_updated_event import ( + V1ProductUpdatedEvent as V1ProductUpdatedEvent, + V1ProductUpdatedEventNotification as V1ProductUpdatedEventNotification, + ) + from stripe.events._v1_promotion_code_created_event import ( + V1PromotionCodeCreatedEvent as V1PromotionCodeCreatedEvent, + V1PromotionCodeCreatedEventNotification as V1PromotionCodeCreatedEventNotification, + ) + from stripe.events._v1_promotion_code_updated_event import ( + V1PromotionCodeUpdatedEvent as V1PromotionCodeUpdatedEvent, + V1PromotionCodeUpdatedEventNotification as V1PromotionCodeUpdatedEventNotification, + ) + from stripe.events._v1_quote_accepted_event import ( + V1QuoteAcceptedEvent as V1QuoteAcceptedEvent, + V1QuoteAcceptedEventNotification as V1QuoteAcceptedEventNotification, + ) + from stripe.events._v1_quote_canceled_event import ( + V1QuoteCanceledEvent as V1QuoteCanceledEvent, + V1QuoteCanceledEventNotification as V1QuoteCanceledEventNotification, + ) + from stripe.events._v1_quote_created_event import ( + V1QuoteCreatedEvent as V1QuoteCreatedEvent, + V1QuoteCreatedEventNotification as V1QuoteCreatedEventNotification, + ) + from stripe.events._v1_quote_finalized_event import ( + V1QuoteFinalizedEvent as V1QuoteFinalizedEvent, + V1QuoteFinalizedEventNotification as V1QuoteFinalizedEventNotification, + ) + from stripe.events._v1_radar_early_fraud_warning_created_event import ( + V1RadarEarlyFraudWarningCreatedEvent as V1RadarEarlyFraudWarningCreatedEvent, + V1RadarEarlyFraudWarningCreatedEventNotification as V1RadarEarlyFraudWarningCreatedEventNotification, + ) + from stripe.events._v1_radar_early_fraud_warning_updated_event import ( + V1RadarEarlyFraudWarningUpdatedEvent as V1RadarEarlyFraudWarningUpdatedEvent, + V1RadarEarlyFraudWarningUpdatedEventNotification as V1RadarEarlyFraudWarningUpdatedEventNotification, + ) + from stripe.events._v1_refund_created_event import ( + V1RefundCreatedEvent as V1RefundCreatedEvent, + V1RefundCreatedEventNotification as V1RefundCreatedEventNotification, + ) + from stripe.events._v1_refund_failed_event import ( + V1RefundFailedEvent as V1RefundFailedEvent, + V1RefundFailedEventNotification as V1RefundFailedEventNotification, + ) + from stripe.events._v1_refund_updated_event import ( + V1RefundUpdatedEvent as V1RefundUpdatedEvent, + V1RefundUpdatedEventNotification as V1RefundUpdatedEventNotification, + ) + from stripe.events._v1_review_closed_event import ( + V1ReviewClosedEvent as V1ReviewClosedEvent, + V1ReviewClosedEventNotification as V1ReviewClosedEventNotification, + ) + from stripe.events._v1_review_opened_event import ( + V1ReviewOpenedEvent as V1ReviewOpenedEvent, + V1ReviewOpenedEventNotification as V1ReviewOpenedEventNotification, + ) + from stripe.events._v1_setup_intent_canceled_event import ( + V1SetupIntentCanceledEvent as V1SetupIntentCanceledEvent, + V1SetupIntentCanceledEventNotification as V1SetupIntentCanceledEventNotification, + ) + from stripe.events._v1_setup_intent_created_event import ( + V1SetupIntentCreatedEvent as V1SetupIntentCreatedEvent, + V1SetupIntentCreatedEventNotification as V1SetupIntentCreatedEventNotification, + ) + from stripe.events._v1_setup_intent_requires_action_event import ( + V1SetupIntentRequiresActionEvent as V1SetupIntentRequiresActionEvent, + V1SetupIntentRequiresActionEventNotification as V1SetupIntentRequiresActionEventNotification, + ) + from stripe.events._v1_setup_intent_setup_failed_event import ( + V1SetupIntentSetupFailedEvent as V1SetupIntentSetupFailedEvent, + V1SetupIntentSetupFailedEventNotification as V1SetupIntentSetupFailedEventNotification, + ) + from stripe.events._v1_setup_intent_succeeded_event import ( + V1SetupIntentSucceededEvent as V1SetupIntentSucceededEvent, + V1SetupIntentSucceededEventNotification as V1SetupIntentSucceededEventNotification, + ) + from stripe.events._v1_sigma_scheduled_query_run_created_event import ( + V1SigmaScheduledQueryRunCreatedEvent as V1SigmaScheduledQueryRunCreatedEvent, + V1SigmaScheduledQueryRunCreatedEventNotification as V1SigmaScheduledQueryRunCreatedEventNotification, + ) + from stripe.events._v1_source_canceled_event import ( + V1SourceCanceledEvent as V1SourceCanceledEvent, + V1SourceCanceledEventNotification as V1SourceCanceledEventNotification, + ) + from stripe.events._v1_source_chargeable_event import ( + V1SourceChargeableEvent as V1SourceChargeableEvent, + V1SourceChargeableEventNotification as V1SourceChargeableEventNotification, + ) + from stripe.events._v1_source_failed_event import ( + V1SourceFailedEvent as V1SourceFailedEvent, + V1SourceFailedEventNotification as V1SourceFailedEventNotification, + ) + from stripe.events._v1_source_refund_attributes_required_event import ( + V1SourceRefundAttributesRequiredEvent as V1SourceRefundAttributesRequiredEvent, + V1SourceRefundAttributesRequiredEventNotification as V1SourceRefundAttributesRequiredEventNotification, + ) + from stripe.events._v1_subscription_schedule_aborted_event import ( + V1SubscriptionScheduleAbortedEvent as V1SubscriptionScheduleAbortedEvent, + V1SubscriptionScheduleAbortedEventNotification as V1SubscriptionScheduleAbortedEventNotification, + ) + from stripe.events._v1_subscription_schedule_canceled_event import ( + V1SubscriptionScheduleCanceledEvent as V1SubscriptionScheduleCanceledEvent, + V1SubscriptionScheduleCanceledEventNotification as V1SubscriptionScheduleCanceledEventNotification, + ) + from stripe.events._v1_subscription_schedule_completed_event import ( + V1SubscriptionScheduleCompletedEvent as V1SubscriptionScheduleCompletedEvent, + V1SubscriptionScheduleCompletedEventNotification as V1SubscriptionScheduleCompletedEventNotification, + ) + from stripe.events._v1_subscription_schedule_created_event import ( + V1SubscriptionScheduleCreatedEvent as V1SubscriptionScheduleCreatedEvent, + V1SubscriptionScheduleCreatedEventNotification as V1SubscriptionScheduleCreatedEventNotification, + ) + from stripe.events._v1_subscription_schedule_expiring_event import ( + V1SubscriptionScheduleExpiringEvent as V1SubscriptionScheduleExpiringEvent, + V1SubscriptionScheduleExpiringEventNotification as V1SubscriptionScheduleExpiringEventNotification, + ) + from stripe.events._v1_subscription_schedule_released_event import ( + V1SubscriptionScheduleReleasedEvent as V1SubscriptionScheduleReleasedEvent, + V1SubscriptionScheduleReleasedEventNotification as V1SubscriptionScheduleReleasedEventNotification, + ) + from stripe.events._v1_subscription_schedule_updated_event import ( + V1SubscriptionScheduleUpdatedEvent as V1SubscriptionScheduleUpdatedEvent, + V1SubscriptionScheduleUpdatedEventNotification as V1SubscriptionScheduleUpdatedEventNotification, + ) + from stripe.events._v1_tax_rate_created_event import ( + V1TaxRateCreatedEvent as V1TaxRateCreatedEvent, + V1TaxRateCreatedEventNotification as V1TaxRateCreatedEventNotification, + ) + from stripe.events._v1_tax_rate_updated_event import ( + V1TaxRateUpdatedEvent as V1TaxRateUpdatedEvent, + V1TaxRateUpdatedEventNotification as V1TaxRateUpdatedEventNotification, + ) + from stripe.events._v1_tax_settings_updated_event import ( + V1TaxSettingsUpdatedEvent as V1TaxSettingsUpdatedEvent, + V1TaxSettingsUpdatedEventNotification as V1TaxSettingsUpdatedEventNotification, + ) + from stripe.events._v1_terminal_reader_action_failed_event import ( + V1TerminalReaderActionFailedEvent as V1TerminalReaderActionFailedEvent, + V1TerminalReaderActionFailedEventNotification as V1TerminalReaderActionFailedEventNotification, + ) + from stripe.events._v1_terminal_reader_action_succeeded_event import ( + V1TerminalReaderActionSucceededEvent as V1TerminalReaderActionSucceededEvent, + V1TerminalReaderActionSucceededEventNotification as V1TerminalReaderActionSucceededEventNotification, + ) + from stripe.events._v1_terminal_reader_action_updated_event import ( + V1TerminalReaderActionUpdatedEvent as V1TerminalReaderActionUpdatedEvent, + V1TerminalReaderActionUpdatedEventNotification as V1TerminalReaderActionUpdatedEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_advancing_event import ( + V1TestHelpersTestClockAdvancingEvent as V1TestHelpersTestClockAdvancingEvent, + V1TestHelpersTestClockAdvancingEventNotification as V1TestHelpersTestClockAdvancingEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_created_event import ( + V1TestHelpersTestClockCreatedEvent as V1TestHelpersTestClockCreatedEvent, + V1TestHelpersTestClockCreatedEventNotification as V1TestHelpersTestClockCreatedEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_deleted_event import ( + V1TestHelpersTestClockDeletedEvent as V1TestHelpersTestClockDeletedEvent, + V1TestHelpersTestClockDeletedEventNotification as V1TestHelpersTestClockDeletedEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_internal_failure_event import ( + V1TestHelpersTestClockInternalFailureEvent as V1TestHelpersTestClockInternalFailureEvent, + V1TestHelpersTestClockInternalFailureEventNotification as V1TestHelpersTestClockInternalFailureEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_ready_event import ( + V1TestHelpersTestClockReadyEvent as V1TestHelpersTestClockReadyEvent, + V1TestHelpersTestClockReadyEventNotification as V1TestHelpersTestClockReadyEventNotification, + ) + from stripe.events._v1_topup_canceled_event import ( + V1TopupCanceledEvent as V1TopupCanceledEvent, + V1TopupCanceledEventNotification as V1TopupCanceledEventNotification, + ) + from stripe.events._v1_topup_created_event import ( + V1TopupCreatedEvent as V1TopupCreatedEvent, + V1TopupCreatedEventNotification as V1TopupCreatedEventNotification, + ) + from stripe.events._v1_topup_failed_event import ( + V1TopupFailedEvent as V1TopupFailedEvent, + V1TopupFailedEventNotification as V1TopupFailedEventNotification, + ) + from stripe.events._v1_topup_reversed_event import ( + V1TopupReversedEvent as V1TopupReversedEvent, + V1TopupReversedEventNotification as V1TopupReversedEventNotification, + ) + from stripe.events._v1_topup_succeeded_event import ( + V1TopupSucceededEvent as V1TopupSucceededEvent, + V1TopupSucceededEventNotification as V1TopupSucceededEventNotification, + ) + from stripe.events._v1_transfer_created_event import ( + V1TransferCreatedEvent as V1TransferCreatedEvent, + V1TransferCreatedEventNotification as V1TransferCreatedEventNotification, + ) + from stripe.events._v1_transfer_reversed_event import ( + V1TransferReversedEvent as V1TransferReversedEvent, + V1TransferReversedEventNotification as V1TransferReversedEventNotification, + ) + from stripe.events._v1_transfer_updated_event import ( + V1TransferUpdatedEvent as V1TransferUpdatedEvent, + V1TransferUpdatedEventNotification as V1TransferUpdatedEventNotification, + ) from stripe.events._v2_commerce_product_catalog_imports_failed_event import ( V2CommerceProductCatalogImportsFailedEvent as V2CommerceProductCatalogImportsFailedEvent, V2CommerceProductCatalogImportsFailedEventNotification as V2CommerceProductCatalogImportsFailedEventNotification, @@ -113,20 +977,1637 @@ # name -> (import_target, is_submodule) _import_map = { "ALL_EVENT_NOTIFICATIONS": ("stripe.events._event_classes", False), - "V1BillingMeterErrorReportTriggeredEvent": ( - "stripe.events._v1_billing_meter_error_report_triggered_event", + "V1AccountApplicationAuthorizedEvent": ( + "stripe.events._v1_account_application_authorized_event", False, ), - "V1BillingMeterErrorReportTriggeredEventNotification": ( - "stripe.events._v1_billing_meter_error_report_triggered_event", + "V1AccountApplicationAuthorizedEventNotification": ( + "stripe.events._v1_account_application_authorized_event", False, ), - "V1BillingMeterNoMeterFoundEvent": ( - "stripe.events._v1_billing_meter_no_meter_found_event", + "V1AccountApplicationDeauthorizedEvent": ( + "stripe.events._v1_account_application_deauthorized_event", False, ), - "V1BillingMeterNoMeterFoundEventNotification": ( - "stripe.events._v1_billing_meter_no_meter_found_event", + "V1AccountApplicationDeauthorizedEventNotification": ( + "stripe.events._v1_account_application_deauthorized_event", + False, + ), + "V1AccountExternalAccountCreatedEvent": ( + "stripe.events._v1_account_external_account_created_event", + False, + ), + "V1AccountExternalAccountCreatedEventNotification": ( + "stripe.events._v1_account_external_account_created_event", + False, + ), + "V1AccountExternalAccountDeletedEvent": ( + "stripe.events._v1_account_external_account_deleted_event", + False, + ), + "V1AccountExternalAccountDeletedEventNotification": ( + "stripe.events._v1_account_external_account_deleted_event", + False, + ), + "V1AccountExternalAccountUpdatedEvent": ( + "stripe.events._v1_account_external_account_updated_event", + False, + ), + "V1AccountExternalAccountUpdatedEventNotification": ( + "stripe.events._v1_account_external_account_updated_event", + False, + ), + "V1AccountUpdatedEvent": ( + "stripe.events._v1_account_updated_event", + False, + ), + "V1AccountUpdatedEventNotification": ( + "stripe.events._v1_account_updated_event", + False, + ), + "V1ApplicationFeeCreatedEvent": ( + "stripe.events._v1_application_fee_created_event", + False, + ), + "V1ApplicationFeeCreatedEventNotification": ( + "stripe.events._v1_application_fee_created_event", + False, + ), + "V1ApplicationFeeRefundUpdatedEvent": ( + "stripe.events._v1_application_fee_refund_updated_event", + False, + ), + "V1ApplicationFeeRefundUpdatedEventNotification": ( + "stripe.events._v1_application_fee_refund_updated_event", + False, + ), + "V1ApplicationFeeRefundedEvent": ( + "stripe.events._v1_application_fee_refunded_event", + False, + ), + "V1ApplicationFeeRefundedEventNotification": ( + "stripe.events._v1_application_fee_refunded_event", + False, + ), + "V1BalanceAvailableEvent": ( + "stripe.events._v1_balance_available_event", + False, + ), + "V1BalanceAvailableEventNotification": ( + "stripe.events._v1_balance_available_event", + False, + ), + "V1BalanceSettingsUpdatedEvent": ( + "stripe.events._v1_balance_settings_updated_event", + False, + ), + "V1BalanceSettingsUpdatedEventNotification": ( + "stripe.events._v1_balance_settings_updated_event", + False, + ), + "V1BillingAlertTriggeredEvent": ( + "stripe.events._v1_billing_alert_triggered_event", + False, + ), + "V1BillingAlertTriggeredEventNotification": ( + "stripe.events._v1_billing_alert_triggered_event", + False, + ), + "V1BillingCreditBalanceTransactionCreatedEvent": ( + "stripe.events._v1_billing_credit_balance_transaction_created_event", + False, + ), + "V1BillingCreditBalanceTransactionCreatedEventNotification": ( + "stripe.events._v1_billing_credit_balance_transaction_created_event", + False, + ), + "V1BillingCreditGrantCreatedEvent": ( + "stripe.events._v1_billing_credit_grant_created_event", + False, + ), + "V1BillingCreditGrantCreatedEventNotification": ( + "stripe.events._v1_billing_credit_grant_created_event", + False, + ), + "V1BillingCreditGrantUpdatedEvent": ( + "stripe.events._v1_billing_credit_grant_updated_event", + False, + ), + "V1BillingCreditGrantUpdatedEventNotification": ( + "stripe.events._v1_billing_credit_grant_updated_event", + False, + ), + "V1BillingMeterCreatedEvent": ( + "stripe.events._v1_billing_meter_created_event", + False, + ), + "V1BillingMeterCreatedEventNotification": ( + "stripe.events._v1_billing_meter_created_event", + False, + ), + "V1BillingMeterDeactivatedEvent": ( + "stripe.events._v1_billing_meter_deactivated_event", + False, + ), + "V1BillingMeterDeactivatedEventNotification": ( + "stripe.events._v1_billing_meter_deactivated_event", + False, + ), + "V1BillingMeterErrorReportTriggeredEvent": ( + "stripe.events._v1_billing_meter_error_report_triggered_event", + False, + ), + "V1BillingMeterErrorReportTriggeredEventNotification": ( + "stripe.events._v1_billing_meter_error_report_triggered_event", + False, + ), + "V1BillingMeterNoMeterFoundEvent": ( + "stripe.events._v1_billing_meter_no_meter_found_event", + False, + ), + "V1BillingMeterNoMeterFoundEventNotification": ( + "stripe.events._v1_billing_meter_no_meter_found_event", + False, + ), + "V1BillingMeterReactivatedEvent": ( + "stripe.events._v1_billing_meter_reactivated_event", + False, + ), + "V1BillingMeterReactivatedEventNotification": ( + "stripe.events._v1_billing_meter_reactivated_event", + False, + ), + "V1BillingMeterUpdatedEvent": ( + "stripe.events._v1_billing_meter_updated_event", + False, + ), + "V1BillingMeterUpdatedEventNotification": ( + "stripe.events._v1_billing_meter_updated_event", + False, + ), + "V1BillingPortalConfigurationCreatedEvent": ( + "stripe.events._v1_billing_portal_configuration_created_event", + False, + ), + "V1BillingPortalConfigurationCreatedEventNotification": ( + "stripe.events._v1_billing_portal_configuration_created_event", + False, + ), + "V1BillingPortalConfigurationUpdatedEvent": ( + "stripe.events._v1_billing_portal_configuration_updated_event", + False, + ), + "V1BillingPortalConfigurationUpdatedEventNotification": ( + "stripe.events._v1_billing_portal_configuration_updated_event", + False, + ), + "V1BillingPortalSessionCreatedEvent": ( + "stripe.events._v1_billing_portal_session_created_event", + False, + ), + "V1BillingPortalSessionCreatedEventNotification": ( + "stripe.events._v1_billing_portal_session_created_event", + False, + ), + "V1CapabilityUpdatedEvent": ( + "stripe.events._v1_capability_updated_event", + False, + ), + "V1CapabilityUpdatedEventNotification": ( + "stripe.events._v1_capability_updated_event", + False, + ), + "V1CashBalanceFundsAvailableEvent": ( + "stripe.events._v1_cash_balance_funds_available_event", + False, + ), + "V1CashBalanceFundsAvailableEventNotification": ( + "stripe.events._v1_cash_balance_funds_available_event", + False, + ), + "V1ChargeCapturedEvent": ( + "stripe.events._v1_charge_captured_event", + False, + ), + "V1ChargeCapturedEventNotification": ( + "stripe.events._v1_charge_captured_event", + False, + ), + "V1ChargeDisputeClosedEvent": ( + "stripe.events._v1_charge_dispute_closed_event", + False, + ), + "V1ChargeDisputeClosedEventNotification": ( + "stripe.events._v1_charge_dispute_closed_event", + False, + ), + "V1ChargeDisputeCreatedEvent": ( + "stripe.events._v1_charge_dispute_created_event", + False, + ), + "V1ChargeDisputeCreatedEventNotification": ( + "stripe.events._v1_charge_dispute_created_event", + False, + ), + "V1ChargeDisputeFundsReinstatedEvent": ( + "stripe.events._v1_charge_dispute_funds_reinstated_event", + False, + ), + "V1ChargeDisputeFundsReinstatedEventNotification": ( + "stripe.events._v1_charge_dispute_funds_reinstated_event", + False, + ), + "V1ChargeDisputeFundsWithdrawnEvent": ( + "stripe.events._v1_charge_dispute_funds_withdrawn_event", + False, + ), + "V1ChargeDisputeFundsWithdrawnEventNotification": ( + "stripe.events._v1_charge_dispute_funds_withdrawn_event", + False, + ), + "V1ChargeDisputeUpdatedEvent": ( + "stripe.events._v1_charge_dispute_updated_event", + False, + ), + "V1ChargeDisputeUpdatedEventNotification": ( + "stripe.events._v1_charge_dispute_updated_event", + False, + ), + "V1ChargeExpiredEvent": ("stripe.events._v1_charge_expired_event", False), + "V1ChargeExpiredEventNotification": ( + "stripe.events._v1_charge_expired_event", + False, + ), + "V1ChargeFailedEvent": ("stripe.events._v1_charge_failed_event", False), + "V1ChargeFailedEventNotification": ( + "stripe.events._v1_charge_failed_event", + False, + ), + "V1ChargePendingEvent": ("stripe.events._v1_charge_pending_event", False), + "V1ChargePendingEventNotification": ( + "stripe.events._v1_charge_pending_event", + False, + ), + "V1ChargeRefundUpdatedEvent": ( + "stripe.events._v1_charge_refund_updated_event", + False, + ), + "V1ChargeRefundUpdatedEventNotification": ( + "stripe.events._v1_charge_refund_updated_event", + False, + ), + "V1ChargeRefundedEvent": ( + "stripe.events._v1_charge_refunded_event", + False, + ), + "V1ChargeRefundedEventNotification": ( + "stripe.events._v1_charge_refunded_event", + False, + ), + "V1ChargeSucceededEvent": ( + "stripe.events._v1_charge_succeeded_event", + False, + ), + "V1ChargeSucceededEventNotification": ( + "stripe.events._v1_charge_succeeded_event", + False, + ), + "V1ChargeUpdatedEvent": ("stripe.events._v1_charge_updated_event", False), + "V1ChargeUpdatedEventNotification": ( + "stripe.events._v1_charge_updated_event", + False, + ), + "V1CheckoutSessionAsyncPaymentFailedEvent": ( + "stripe.events._v1_checkout_session_async_payment_failed_event", + False, + ), + "V1CheckoutSessionAsyncPaymentFailedEventNotification": ( + "stripe.events._v1_checkout_session_async_payment_failed_event", + False, + ), + "V1CheckoutSessionAsyncPaymentSucceededEvent": ( + "stripe.events._v1_checkout_session_async_payment_succeeded_event", + False, + ), + "V1CheckoutSessionAsyncPaymentSucceededEventNotification": ( + "stripe.events._v1_checkout_session_async_payment_succeeded_event", + False, + ), + "V1CheckoutSessionCompletedEvent": ( + "stripe.events._v1_checkout_session_completed_event", + False, + ), + "V1CheckoutSessionCompletedEventNotification": ( + "stripe.events._v1_checkout_session_completed_event", + False, + ), + "V1CheckoutSessionExpiredEvent": ( + "stripe.events._v1_checkout_session_expired_event", + False, + ), + "V1CheckoutSessionExpiredEventNotification": ( + "stripe.events._v1_checkout_session_expired_event", + False, + ), + "V1ClimateOrderCanceledEvent": ( + "stripe.events._v1_climate_order_canceled_event", + False, + ), + "V1ClimateOrderCanceledEventNotification": ( + "stripe.events._v1_climate_order_canceled_event", + False, + ), + "V1ClimateOrderCreatedEvent": ( + "stripe.events._v1_climate_order_created_event", + False, + ), + "V1ClimateOrderCreatedEventNotification": ( + "stripe.events._v1_climate_order_created_event", + False, + ), + "V1ClimateOrderDelayedEvent": ( + "stripe.events._v1_climate_order_delayed_event", + False, + ), + "V1ClimateOrderDelayedEventNotification": ( + "stripe.events._v1_climate_order_delayed_event", + False, + ), + "V1ClimateOrderDeliveredEvent": ( + "stripe.events._v1_climate_order_delivered_event", + False, + ), + "V1ClimateOrderDeliveredEventNotification": ( + "stripe.events._v1_climate_order_delivered_event", + False, + ), + "V1ClimateOrderProductSubstitutedEvent": ( + "stripe.events._v1_climate_order_product_substituted_event", + False, + ), + "V1ClimateOrderProductSubstitutedEventNotification": ( + "stripe.events._v1_climate_order_product_substituted_event", + False, + ), + "V1ClimateProductCreatedEvent": ( + "stripe.events._v1_climate_product_created_event", + False, + ), + "V1ClimateProductCreatedEventNotification": ( + "stripe.events._v1_climate_product_created_event", + False, + ), + "V1ClimateProductPricingUpdatedEvent": ( + "stripe.events._v1_climate_product_pricing_updated_event", + False, + ), + "V1ClimateProductPricingUpdatedEventNotification": ( + "stripe.events._v1_climate_product_pricing_updated_event", + False, + ), + "V1CouponCreatedEvent": ("stripe.events._v1_coupon_created_event", False), + "V1CouponCreatedEventNotification": ( + "stripe.events._v1_coupon_created_event", + False, + ), + "V1CouponDeletedEvent": ("stripe.events._v1_coupon_deleted_event", False), + "V1CouponDeletedEventNotification": ( + "stripe.events._v1_coupon_deleted_event", + False, + ), + "V1CouponUpdatedEvent": ("stripe.events._v1_coupon_updated_event", False), + "V1CouponUpdatedEventNotification": ( + "stripe.events._v1_coupon_updated_event", + False, + ), + "V1CreditNoteCreatedEvent": ( + "stripe.events._v1_credit_note_created_event", + False, + ), + "V1CreditNoteCreatedEventNotification": ( + "stripe.events._v1_credit_note_created_event", + False, + ), + "V1CreditNoteUpdatedEvent": ( + "stripe.events._v1_credit_note_updated_event", + False, + ), + "V1CreditNoteUpdatedEventNotification": ( + "stripe.events._v1_credit_note_updated_event", + False, + ), + "V1CreditNoteVoidedEvent": ( + "stripe.events._v1_credit_note_voided_event", + False, + ), + "V1CreditNoteVoidedEventNotification": ( + "stripe.events._v1_credit_note_voided_event", + False, + ), + "V1CustomerCashBalanceTransactionCreatedEvent": ( + "stripe.events._v1_customer_cash_balance_transaction_created_event", + False, + ), + "V1CustomerCashBalanceTransactionCreatedEventNotification": ( + "stripe.events._v1_customer_cash_balance_transaction_created_event", + False, + ), + "V1CustomerCreatedEvent": ( + "stripe.events._v1_customer_created_event", + False, + ), + "V1CustomerCreatedEventNotification": ( + "stripe.events._v1_customer_created_event", + False, + ), + "V1CustomerDeletedEvent": ( + "stripe.events._v1_customer_deleted_event", + False, + ), + "V1CustomerDeletedEventNotification": ( + "stripe.events._v1_customer_deleted_event", + False, + ), + "V1CustomerDiscountCreatedEvent": ( + "stripe.events._v1_customer_discount_created_event", + False, + ), + "V1CustomerDiscountCreatedEventNotification": ( + "stripe.events._v1_customer_discount_created_event", + False, + ), + "V1CustomerDiscountDeletedEvent": ( + "stripe.events._v1_customer_discount_deleted_event", + False, + ), + "V1CustomerDiscountDeletedEventNotification": ( + "stripe.events._v1_customer_discount_deleted_event", + False, + ), + "V1CustomerDiscountUpdatedEvent": ( + "stripe.events._v1_customer_discount_updated_event", + False, + ), + "V1CustomerDiscountUpdatedEventNotification": ( + "stripe.events._v1_customer_discount_updated_event", + False, + ), + "V1CustomerSubscriptionCreatedEvent": ( + "stripe.events._v1_customer_subscription_created_event", + False, + ), + "V1CustomerSubscriptionCreatedEventNotification": ( + "stripe.events._v1_customer_subscription_created_event", + False, + ), + "V1CustomerSubscriptionDeletedEvent": ( + "stripe.events._v1_customer_subscription_deleted_event", + False, + ), + "V1CustomerSubscriptionDeletedEventNotification": ( + "stripe.events._v1_customer_subscription_deleted_event", + False, + ), + "V1CustomerSubscriptionPausedEvent": ( + "stripe.events._v1_customer_subscription_paused_event", + False, + ), + "V1CustomerSubscriptionPausedEventNotification": ( + "stripe.events._v1_customer_subscription_paused_event", + False, + ), + "V1CustomerSubscriptionPendingUpdateAppliedEvent": ( + "stripe.events._v1_customer_subscription_pending_update_applied_event", + False, + ), + "V1CustomerSubscriptionPendingUpdateAppliedEventNotification": ( + "stripe.events._v1_customer_subscription_pending_update_applied_event", + False, + ), + "V1CustomerSubscriptionPendingUpdateExpiredEvent": ( + "stripe.events._v1_customer_subscription_pending_update_expired_event", + False, + ), + "V1CustomerSubscriptionPendingUpdateExpiredEventNotification": ( + "stripe.events._v1_customer_subscription_pending_update_expired_event", + False, + ), + "V1CustomerSubscriptionResumedEvent": ( + "stripe.events._v1_customer_subscription_resumed_event", + False, + ), + "V1CustomerSubscriptionResumedEventNotification": ( + "stripe.events._v1_customer_subscription_resumed_event", + False, + ), + "V1CustomerSubscriptionTrialWillEndEvent": ( + "stripe.events._v1_customer_subscription_trial_will_end_event", + False, + ), + "V1CustomerSubscriptionTrialWillEndEventNotification": ( + "stripe.events._v1_customer_subscription_trial_will_end_event", + False, + ), + "V1CustomerSubscriptionUpdatedEvent": ( + "stripe.events._v1_customer_subscription_updated_event", + False, + ), + "V1CustomerSubscriptionUpdatedEventNotification": ( + "stripe.events._v1_customer_subscription_updated_event", + False, + ), + "V1CustomerTaxIdCreatedEvent": ( + "stripe.events._v1_customer_tax_id_created_event", + False, + ), + "V1CustomerTaxIdCreatedEventNotification": ( + "stripe.events._v1_customer_tax_id_created_event", + False, + ), + "V1CustomerTaxIdDeletedEvent": ( + "stripe.events._v1_customer_tax_id_deleted_event", + False, + ), + "V1CustomerTaxIdDeletedEventNotification": ( + "stripe.events._v1_customer_tax_id_deleted_event", + False, + ), + "V1CustomerTaxIdUpdatedEvent": ( + "stripe.events._v1_customer_tax_id_updated_event", + False, + ), + "V1CustomerTaxIdUpdatedEventNotification": ( + "stripe.events._v1_customer_tax_id_updated_event", + False, + ), + "V1CustomerUpdatedEvent": ( + "stripe.events._v1_customer_updated_event", + False, + ), + "V1CustomerUpdatedEventNotification": ( + "stripe.events._v1_customer_updated_event", + False, + ), + "V1EntitlementsActiveEntitlementSummaryUpdatedEvent": ( + "stripe.events._v1_entitlements_active_entitlement_summary_updated_event", + False, + ), + "V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification": ( + "stripe.events._v1_entitlements_active_entitlement_summary_updated_event", + False, + ), + "V1FileCreatedEvent": ("stripe.events._v1_file_created_event", False), + "V1FileCreatedEventNotification": ( + "stripe.events._v1_file_created_event", + False, + ), + "V1FinancialConnectionsAccountAccountNumbersUpdatedEvent": ( + "stripe.events._v1_financial_connections_account_account_numbers_updated_event", + False, + ), + "V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification": ( + "stripe.events._v1_financial_connections_account_account_numbers_updated_event", + False, + ), + "V1FinancialConnectionsAccountCreatedEvent": ( + "stripe.events._v1_financial_connections_account_created_event", + False, + ), + "V1FinancialConnectionsAccountCreatedEventNotification": ( + "stripe.events._v1_financial_connections_account_created_event", + False, + ), + "V1FinancialConnectionsAccountDeactivatedEvent": ( + "stripe.events._v1_financial_connections_account_deactivated_event", + False, + ), + "V1FinancialConnectionsAccountDeactivatedEventNotification": ( + "stripe.events._v1_financial_connections_account_deactivated_event", + False, + ), + "V1FinancialConnectionsAccountDisconnectedEvent": ( + "stripe.events._v1_financial_connections_account_disconnected_event", + False, + ), + "V1FinancialConnectionsAccountDisconnectedEventNotification": ( + "stripe.events._v1_financial_connections_account_disconnected_event", + False, + ), + "V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent": ( + "stripe.events._v1_financial_connections_account_expected_deactivation_date_updated_event", + False, + ), + "V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification": ( + "stripe.events._v1_financial_connections_account_expected_deactivation_date_updated_event", + False, + ), + "V1FinancialConnectionsAccountReactivatedEvent": ( + "stripe.events._v1_financial_connections_account_reactivated_event", + False, + ), + "V1FinancialConnectionsAccountReactivatedEventNotification": ( + "stripe.events._v1_financial_connections_account_reactivated_event", + False, + ), + "V1FinancialConnectionsAccountRefreshedBalanceEvent": ( + "stripe.events._v1_financial_connections_account_refreshed_balance_event", + False, + ), + "V1FinancialConnectionsAccountRefreshedBalanceEventNotification": ( + "stripe.events._v1_financial_connections_account_refreshed_balance_event", + False, + ), + "V1FinancialConnectionsAccountRefreshedOwnershipEvent": ( + "stripe.events._v1_financial_connections_account_refreshed_ownership_event", + False, + ), + "V1FinancialConnectionsAccountRefreshedOwnershipEventNotification": ( + "stripe.events._v1_financial_connections_account_refreshed_ownership_event", + False, + ), + "V1FinancialConnectionsAccountRefreshedTransactionsEvent": ( + "stripe.events._v1_financial_connections_account_refreshed_transactions_event", + False, + ), + "V1FinancialConnectionsAccountRefreshedTransactionsEventNotification": ( + "stripe.events._v1_financial_connections_account_refreshed_transactions_event", + False, + ), + "V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent": ( + "stripe.events._v1_financial_connections_account_supported_payment_method_types_updated_event", + False, + ), + "V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification": ( + "stripe.events._v1_financial_connections_account_supported_payment_method_types_updated_event", + False, + ), + "V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent": ( + "stripe.events._v1_financial_connections_account_upcoming_account_number_expiry_event", + False, + ), + "V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification": ( + "stripe.events._v1_financial_connections_account_upcoming_account_number_expiry_event", + False, + ), + "V1FinancialConnectionsAccountUpcomingDeactivationEvent": ( + "stripe.events._v1_financial_connections_account_upcoming_deactivation_event", + False, + ), + "V1FinancialConnectionsAccountUpcomingDeactivationEventNotification": ( + "stripe.events._v1_financial_connections_account_upcoming_deactivation_event", + False, + ), + "V1IdentityVerificationSessionCanceledEvent": ( + "stripe.events._v1_identity_verification_session_canceled_event", + False, + ), + "V1IdentityVerificationSessionCanceledEventNotification": ( + "stripe.events._v1_identity_verification_session_canceled_event", + False, + ), + "V1IdentityVerificationSessionCreatedEvent": ( + "stripe.events._v1_identity_verification_session_created_event", + False, + ), + "V1IdentityVerificationSessionCreatedEventNotification": ( + "stripe.events._v1_identity_verification_session_created_event", + False, + ), + "V1IdentityVerificationSessionProcessingEvent": ( + "stripe.events._v1_identity_verification_session_processing_event", + False, + ), + "V1IdentityVerificationSessionProcessingEventNotification": ( + "stripe.events._v1_identity_verification_session_processing_event", + False, + ), + "V1IdentityVerificationSessionRedactedEvent": ( + "stripe.events._v1_identity_verification_session_redacted_event", + False, + ), + "V1IdentityVerificationSessionRedactedEventNotification": ( + "stripe.events._v1_identity_verification_session_redacted_event", + False, + ), + "V1IdentityVerificationSessionRequiresInputEvent": ( + "stripe.events._v1_identity_verification_session_requires_input_event", + False, + ), + "V1IdentityVerificationSessionRequiresInputEventNotification": ( + "stripe.events._v1_identity_verification_session_requires_input_event", + False, + ), + "V1IdentityVerificationSessionVerifiedEvent": ( + "stripe.events._v1_identity_verification_session_verified_event", + False, + ), + "V1IdentityVerificationSessionVerifiedEventNotification": ( + "stripe.events._v1_identity_verification_session_verified_event", + False, + ), + "V1InvoiceCreatedEvent": ( + "stripe.events._v1_invoice_created_event", + False, + ), + "V1InvoiceCreatedEventNotification": ( + "stripe.events._v1_invoice_created_event", + False, + ), + "V1InvoiceDeletedEvent": ( + "stripe.events._v1_invoice_deleted_event", + False, + ), + "V1InvoiceDeletedEventNotification": ( + "stripe.events._v1_invoice_deleted_event", + False, + ), + "V1InvoiceFinalizationFailedEvent": ( + "stripe.events._v1_invoice_finalization_failed_event", + False, + ), + "V1InvoiceFinalizationFailedEventNotification": ( + "stripe.events._v1_invoice_finalization_failed_event", + False, + ), + "V1InvoiceFinalizedEvent": ( + "stripe.events._v1_invoice_finalized_event", + False, + ), + "V1InvoiceFinalizedEventNotification": ( + "stripe.events._v1_invoice_finalized_event", + False, + ), + "V1InvoiceMarkedUncollectibleEvent": ( + "stripe.events._v1_invoice_marked_uncollectible_event", + False, + ), + "V1InvoiceMarkedUncollectibleEventNotification": ( + "stripe.events._v1_invoice_marked_uncollectible_event", + False, + ), + "V1InvoiceOverdueEvent": ( + "stripe.events._v1_invoice_overdue_event", + False, + ), + "V1InvoiceOverdueEventNotification": ( + "stripe.events._v1_invoice_overdue_event", + False, + ), + "V1InvoiceOverpaidEvent": ( + "stripe.events._v1_invoice_overpaid_event", + False, + ), + "V1InvoiceOverpaidEventNotification": ( + "stripe.events._v1_invoice_overpaid_event", + False, + ), + "V1InvoicePaidEvent": ("stripe.events._v1_invoice_paid_event", False), + "V1InvoicePaidEventNotification": ( + "stripe.events._v1_invoice_paid_event", + False, + ), + "V1InvoicePaymentActionRequiredEvent": ( + "stripe.events._v1_invoice_payment_action_required_event", + False, + ), + "V1InvoicePaymentActionRequiredEventNotification": ( + "stripe.events._v1_invoice_payment_action_required_event", + False, + ), + "V1InvoicePaymentAttemptRequiredEvent": ( + "stripe.events._v1_invoice_payment_attempt_required_event", + False, + ), + "V1InvoicePaymentAttemptRequiredEventNotification": ( + "stripe.events._v1_invoice_payment_attempt_required_event", + False, + ), + "V1InvoicePaymentFailedEvent": ( + "stripe.events._v1_invoice_payment_failed_event", + False, + ), + "V1InvoicePaymentFailedEventNotification": ( + "stripe.events._v1_invoice_payment_failed_event", + False, + ), + "V1InvoicePaymentPaidEvent": ( + "stripe.events._v1_invoice_payment_paid_event", + False, + ), + "V1InvoicePaymentPaidEventNotification": ( + "stripe.events._v1_invoice_payment_paid_event", + False, + ), + "V1InvoicePaymentSucceededEvent": ( + "stripe.events._v1_invoice_payment_succeeded_event", + False, + ), + "V1InvoicePaymentSucceededEventNotification": ( + "stripe.events._v1_invoice_payment_succeeded_event", + False, + ), + "V1InvoiceSentEvent": ("stripe.events._v1_invoice_sent_event", False), + "V1InvoiceSentEventNotification": ( + "stripe.events._v1_invoice_sent_event", + False, + ), + "V1InvoiceUpcomingEvent": ( + "stripe.events._v1_invoice_upcoming_event", + False, + ), + "V1InvoiceUpcomingEventNotification": ( + "stripe.events._v1_invoice_upcoming_event", + False, + ), + "V1InvoiceUpdatedEvent": ( + "stripe.events._v1_invoice_updated_event", + False, + ), + "V1InvoiceUpdatedEventNotification": ( + "stripe.events._v1_invoice_updated_event", + False, + ), + "V1InvoiceVoidedEvent": ("stripe.events._v1_invoice_voided_event", False), + "V1InvoiceVoidedEventNotification": ( + "stripe.events._v1_invoice_voided_event", + False, + ), + "V1InvoiceWillBeDueEvent": ( + "stripe.events._v1_invoice_will_be_due_event", + False, + ), + "V1InvoiceWillBeDueEventNotification": ( + "stripe.events._v1_invoice_will_be_due_event", + False, + ), + "V1InvoiceitemCreatedEvent": ( + "stripe.events._v1_invoiceitem_created_event", + False, + ), + "V1InvoiceitemCreatedEventNotification": ( + "stripe.events._v1_invoiceitem_created_event", + False, + ), + "V1InvoiceitemDeletedEvent": ( + "stripe.events._v1_invoiceitem_deleted_event", + False, + ), + "V1InvoiceitemDeletedEventNotification": ( + "stripe.events._v1_invoiceitem_deleted_event", + False, + ), + "V1IssuingAuthorizationCreatedEvent": ( + "stripe.events._v1_issuing_authorization_created_event", + False, + ), + "V1IssuingAuthorizationCreatedEventNotification": ( + "stripe.events._v1_issuing_authorization_created_event", + False, + ), + "V1IssuingAuthorizationRequestEvent": ( + "stripe.events._v1_issuing_authorization_request_event", + False, + ), + "V1IssuingAuthorizationRequestEventNotification": ( + "stripe.events._v1_issuing_authorization_request_event", + False, + ), + "V1IssuingAuthorizationUpdatedEvent": ( + "stripe.events._v1_issuing_authorization_updated_event", + False, + ), + "V1IssuingAuthorizationUpdatedEventNotification": ( + "stripe.events._v1_issuing_authorization_updated_event", + False, + ), + "V1IssuingCardCreatedEvent": ( + "stripe.events._v1_issuing_card_created_event", + False, + ), + "V1IssuingCardCreatedEventNotification": ( + "stripe.events._v1_issuing_card_created_event", + False, + ), + "V1IssuingCardUpdatedEvent": ( + "stripe.events._v1_issuing_card_updated_event", + False, + ), + "V1IssuingCardUpdatedEventNotification": ( + "stripe.events._v1_issuing_card_updated_event", + False, + ), + "V1IssuingCardholderCreatedEvent": ( + "stripe.events._v1_issuing_cardholder_created_event", + False, + ), + "V1IssuingCardholderCreatedEventNotification": ( + "stripe.events._v1_issuing_cardholder_created_event", + False, + ), + "V1IssuingCardholderUpdatedEvent": ( + "stripe.events._v1_issuing_cardholder_updated_event", + False, + ), + "V1IssuingCardholderUpdatedEventNotification": ( + "stripe.events._v1_issuing_cardholder_updated_event", + False, + ), + "V1IssuingDisputeClosedEvent": ( + "stripe.events._v1_issuing_dispute_closed_event", + False, + ), + "V1IssuingDisputeClosedEventNotification": ( + "stripe.events._v1_issuing_dispute_closed_event", + False, + ), + "V1IssuingDisputeCreatedEvent": ( + "stripe.events._v1_issuing_dispute_created_event", + False, + ), + "V1IssuingDisputeCreatedEventNotification": ( + "stripe.events._v1_issuing_dispute_created_event", + False, + ), + "V1IssuingDisputeFundsReinstatedEvent": ( + "stripe.events._v1_issuing_dispute_funds_reinstated_event", + False, + ), + "V1IssuingDisputeFundsReinstatedEventNotification": ( + "stripe.events._v1_issuing_dispute_funds_reinstated_event", + False, + ), + "V1IssuingDisputeFundsRescindedEvent": ( + "stripe.events._v1_issuing_dispute_funds_rescinded_event", + False, + ), + "V1IssuingDisputeFundsRescindedEventNotification": ( + "stripe.events._v1_issuing_dispute_funds_rescinded_event", + False, + ), + "V1IssuingDisputeSubmittedEvent": ( + "stripe.events._v1_issuing_dispute_submitted_event", + False, + ), + "V1IssuingDisputeSubmittedEventNotification": ( + "stripe.events._v1_issuing_dispute_submitted_event", + False, + ), + "V1IssuingDisputeUpdatedEvent": ( + "stripe.events._v1_issuing_dispute_updated_event", + False, + ), + "V1IssuingDisputeUpdatedEventNotification": ( + "stripe.events._v1_issuing_dispute_updated_event", + False, + ), + "V1IssuingPersonalizationDesignActivatedEvent": ( + "stripe.events._v1_issuing_personalization_design_activated_event", + False, + ), + "V1IssuingPersonalizationDesignActivatedEventNotification": ( + "stripe.events._v1_issuing_personalization_design_activated_event", + False, + ), + "V1IssuingPersonalizationDesignDeactivatedEvent": ( + "stripe.events._v1_issuing_personalization_design_deactivated_event", + False, + ), + "V1IssuingPersonalizationDesignDeactivatedEventNotification": ( + "stripe.events._v1_issuing_personalization_design_deactivated_event", + False, + ), + "V1IssuingPersonalizationDesignRejectedEvent": ( + "stripe.events._v1_issuing_personalization_design_rejected_event", + False, + ), + "V1IssuingPersonalizationDesignRejectedEventNotification": ( + "stripe.events._v1_issuing_personalization_design_rejected_event", + False, + ), + "V1IssuingPersonalizationDesignUpdatedEvent": ( + "stripe.events._v1_issuing_personalization_design_updated_event", + False, + ), + "V1IssuingPersonalizationDesignUpdatedEventNotification": ( + "stripe.events._v1_issuing_personalization_design_updated_event", + False, + ), + "V1IssuingTokenCreatedEvent": ( + "stripe.events._v1_issuing_token_created_event", + False, + ), + "V1IssuingTokenCreatedEventNotification": ( + "stripe.events._v1_issuing_token_created_event", + False, + ), + "V1IssuingTokenUpdatedEvent": ( + "stripe.events._v1_issuing_token_updated_event", + False, + ), + "V1IssuingTokenUpdatedEventNotification": ( + "stripe.events._v1_issuing_token_updated_event", + False, + ), + "V1IssuingTransactionCreatedEvent": ( + "stripe.events._v1_issuing_transaction_created_event", + False, + ), + "V1IssuingTransactionCreatedEventNotification": ( + "stripe.events._v1_issuing_transaction_created_event", + False, + ), + "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent": ( + "stripe.events._v1_issuing_transaction_purchase_details_receipt_updated_event", + False, + ), + "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification": ( + "stripe.events._v1_issuing_transaction_purchase_details_receipt_updated_event", + False, + ), + "V1IssuingTransactionUpdatedEvent": ( + "stripe.events._v1_issuing_transaction_updated_event", + False, + ), + "V1IssuingTransactionUpdatedEventNotification": ( + "stripe.events._v1_issuing_transaction_updated_event", + False, + ), + "V1MandateUpdatedEvent": ( + "stripe.events._v1_mandate_updated_event", + False, + ), + "V1MandateUpdatedEventNotification": ( + "stripe.events._v1_mandate_updated_event", + False, + ), + "V1PaymentIntentAmountCapturableUpdatedEvent": ( + "stripe.events._v1_payment_intent_amount_capturable_updated_event", + False, + ), + "V1PaymentIntentAmountCapturableUpdatedEventNotification": ( + "stripe.events._v1_payment_intent_amount_capturable_updated_event", + False, + ), + "V1PaymentIntentCanceledEvent": ( + "stripe.events._v1_payment_intent_canceled_event", + False, + ), + "V1PaymentIntentCanceledEventNotification": ( + "stripe.events._v1_payment_intent_canceled_event", + False, + ), + "V1PaymentIntentCreatedEvent": ( + "stripe.events._v1_payment_intent_created_event", + False, + ), + "V1PaymentIntentCreatedEventNotification": ( + "stripe.events._v1_payment_intent_created_event", + False, + ), + "V1PaymentIntentPartiallyFundedEvent": ( + "stripe.events._v1_payment_intent_partially_funded_event", + False, + ), + "V1PaymentIntentPartiallyFundedEventNotification": ( + "stripe.events._v1_payment_intent_partially_funded_event", + False, + ), + "V1PaymentIntentPaymentFailedEvent": ( + "stripe.events._v1_payment_intent_payment_failed_event", + False, + ), + "V1PaymentIntentPaymentFailedEventNotification": ( + "stripe.events._v1_payment_intent_payment_failed_event", + False, + ), + "V1PaymentIntentProcessingEvent": ( + "stripe.events._v1_payment_intent_processing_event", + False, + ), + "V1PaymentIntentProcessingEventNotification": ( + "stripe.events._v1_payment_intent_processing_event", + False, + ), + "V1PaymentIntentRequiresActionEvent": ( + "stripe.events._v1_payment_intent_requires_action_event", + False, + ), + "V1PaymentIntentRequiresActionEventNotification": ( + "stripe.events._v1_payment_intent_requires_action_event", + False, + ), + "V1PaymentIntentSucceededEvent": ( + "stripe.events._v1_payment_intent_succeeded_event", + False, + ), + "V1PaymentIntentSucceededEventNotification": ( + "stripe.events._v1_payment_intent_succeeded_event", + False, + ), + "V1PaymentLinkCreatedEvent": ( + "stripe.events._v1_payment_link_created_event", + False, + ), + "V1PaymentLinkCreatedEventNotification": ( + "stripe.events._v1_payment_link_created_event", + False, + ), + "V1PaymentLinkUpdatedEvent": ( + "stripe.events._v1_payment_link_updated_event", + False, + ), + "V1PaymentLinkUpdatedEventNotification": ( + "stripe.events._v1_payment_link_updated_event", + False, + ), + "V1PaymentMethodAttachedEvent": ( + "stripe.events._v1_payment_method_attached_event", + False, + ), + "V1PaymentMethodAttachedEventNotification": ( + "stripe.events._v1_payment_method_attached_event", + False, + ), + "V1PaymentMethodAutomaticallyUpdatedEvent": ( + "stripe.events._v1_payment_method_automatically_updated_event", + False, + ), + "V1PaymentMethodAutomaticallyUpdatedEventNotification": ( + "stripe.events._v1_payment_method_automatically_updated_event", + False, + ), + "V1PaymentMethodDetachedEvent": ( + "stripe.events._v1_payment_method_detached_event", + False, + ), + "V1PaymentMethodDetachedEventNotification": ( + "stripe.events._v1_payment_method_detached_event", + False, + ), + "V1PaymentMethodUpdatedEvent": ( + "stripe.events._v1_payment_method_updated_event", + False, + ), + "V1PaymentMethodUpdatedEventNotification": ( + "stripe.events._v1_payment_method_updated_event", + False, + ), + "V1PayoutCanceledEvent": ( + "stripe.events._v1_payout_canceled_event", + False, + ), + "V1PayoutCanceledEventNotification": ( + "stripe.events._v1_payout_canceled_event", + False, + ), + "V1PayoutCreatedEvent": ("stripe.events._v1_payout_created_event", False), + "V1PayoutCreatedEventNotification": ( + "stripe.events._v1_payout_created_event", + False, + ), + "V1PayoutFailedEvent": ("stripe.events._v1_payout_failed_event", False), + "V1PayoutFailedEventNotification": ( + "stripe.events._v1_payout_failed_event", + False, + ), + "V1PayoutPaidEvent": ("stripe.events._v1_payout_paid_event", False), + "V1PayoutPaidEventNotification": ( + "stripe.events._v1_payout_paid_event", + False, + ), + "V1PayoutReconciliationCompletedEvent": ( + "stripe.events._v1_payout_reconciliation_completed_event", + False, + ), + "V1PayoutReconciliationCompletedEventNotification": ( + "stripe.events._v1_payout_reconciliation_completed_event", + False, + ), + "V1PayoutUpdatedEvent": ("stripe.events._v1_payout_updated_event", False), + "V1PayoutUpdatedEventNotification": ( + "stripe.events._v1_payout_updated_event", + False, + ), + "V1PersonCreatedEvent": ("stripe.events._v1_person_created_event", False), + "V1PersonCreatedEventNotification": ( + "stripe.events._v1_person_created_event", + False, + ), + "V1PersonDeletedEvent": ("stripe.events._v1_person_deleted_event", False), + "V1PersonDeletedEventNotification": ( + "stripe.events._v1_person_deleted_event", + False, + ), + "V1PersonUpdatedEvent": ("stripe.events._v1_person_updated_event", False), + "V1PersonUpdatedEventNotification": ( + "stripe.events._v1_person_updated_event", + False, + ), + "V1PlanCreatedEvent": ("stripe.events._v1_plan_created_event", False), + "V1PlanCreatedEventNotification": ( + "stripe.events._v1_plan_created_event", + False, + ), + "V1PlanDeletedEvent": ("stripe.events._v1_plan_deleted_event", False), + "V1PlanDeletedEventNotification": ( + "stripe.events._v1_plan_deleted_event", + False, + ), + "V1PlanUpdatedEvent": ("stripe.events._v1_plan_updated_event", False), + "V1PlanUpdatedEventNotification": ( + "stripe.events._v1_plan_updated_event", + False, + ), + "V1PriceCreatedEvent": ("stripe.events._v1_price_created_event", False), + "V1PriceCreatedEventNotification": ( + "stripe.events._v1_price_created_event", + False, + ), + "V1PriceDeletedEvent": ("stripe.events._v1_price_deleted_event", False), + "V1PriceDeletedEventNotification": ( + "stripe.events._v1_price_deleted_event", + False, + ), + "V1PriceUpdatedEvent": ("stripe.events._v1_price_updated_event", False), + "V1PriceUpdatedEventNotification": ( + "stripe.events._v1_price_updated_event", + False, + ), + "V1ProductCreatedEvent": ( + "stripe.events._v1_product_created_event", + False, + ), + "V1ProductCreatedEventNotification": ( + "stripe.events._v1_product_created_event", + False, + ), + "V1ProductDeletedEvent": ( + "stripe.events._v1_product_deleted_event", + False, + ), + "V1ProductDeletedEventNotification": ( + "stripe.events._v1_product_deleted_event", + False, + ), + "V1ProductUpdatedEvent": ( + "stripe.events._v1_product_updated_event", + False, + ), + "V1ProductUpdatedEventNotification": ( + "stripe.events._v1_product_updated_event", + False, + ), + "V1PromotionCodeCreatedEvent": ( + "stripe.events._v1_promotion_code_created_event", + False, + ), + "V1PromotionCodeCreatedEventNotification": ( + "stripe.events._v1_promotion_code_created_event", + False, + ), + "V1PromotionCodeUpdatedEvent": ( + "stripe.events._v1_promotion_code_updated_event", + False, + ), + "V1PromotionCodeUpdatedEventNotification": ( + "stripe.events._v1_promotion_code_updated_event", + False, + ), + "V1QuoteAcceptedEvent": ("stripe.events._v1_quote_accepted_event", False), + "V1QuoteAcceptedEventNotification": ( + "stripe.events._v1_quote_accepted_event", + False, + ), + "V1QuoteCanceledEvent": ("stripe.events._v1_quote_canceled_event", False), + "V1QuoteCanceledEventNotification": ( + "stripe.events._v1_quote_canceled_event", + False, + ), + "V1QuoteCreatedEvent": ("stripe.events._v1_quote_created_event", False), + "V1QuoteCreatedEventNotification": ( + "stripe.events._v1_quote_created_event", + False, + ), + "V1QuoteFinalizedEvent": ( + "stripe.events._v1_quote_finalized_event", + False, + ), + "V1QuoteFinalizedEventNotification": ( + "stripe.events._v1_quote_finalized_event", + False, + ), + "V1RadarEarlyFraudWarningCreatedEvent": ( + "stripe.events._v1_radar_early_fraud_warning_created_event", + False, + ), + "V1RadarEarlyFraudWarningCreatedEventNotification": ( + "stripe.events._v1_radar_early_fraud_warning_created_event", + False, + ), + "V1RadarEarlyFraudWarningUpdatedEvent": ( + "stripe.events._v1_radar_early_fraud_warning_updated_event", + False, + ), + "V1RadarEarlyFraudWarningUpdatedEventNotification": ( + "stripe.events._v1_radar_early_fraud_warning_updated_event", + False, + ), + "V1RefundCreatedEvent": ("stripe.events._v1_refund_created_event", False), + "V1RefundCreatedEventNotification": ( + "stripe.events._v1_refund_created_event", + False, + ), + "V1RefundFailedEvent": ("stripe.events._v1_refund_failed_event", False), + "V1RefundFailedEventNotification": ( + "stripe.events._v1_refund_failed_event", + False, + ), + "V1RefundUpdatedEvent": ("stripe.events._v1_refund_updated_event", False), + "V1RefundUpdatedEventNotification": ( + "stripe.events._v1_refund_updated_event", + False, + ), + "V1ReviewClosedEvent": ("stripe.events._v1_review_closed_event", False), + "V1ReviewClosedEventNotification": ( + "stripe.events._v1_review_closed_event", + False, + ), + "V1ReviewOpenedEvent": ("stripe.events._v1_review_opened_event", False), + "V1ReviewOpenedEventNotification": ( + "stripe.events._v1_review_opened_event", + False, + ), + "V1SetupIntentCanceledEvent": ( + "stripe.events._v1_setup_intent_canceled_event", + False, + ), + "V1SetupIntentCanceledEventNotification": ( + "stripe.events._v1_setup_intent_canceled_event", + False, + ), + "V1SetupIntentCreatedEvent": ( + "stripe.events._v1_setup_intent_created_event", + False, + ), + "V1SetupIntentCreatedEventNotification": ( + "stripe.events._v1_setup_intent_created_event", + False, + ), + "V1SetupIntentRequiresActionEvent": ( + "stripe.events._v1_setup_intent_requires_action_event", + False, + ), + "V1SetupIntentRequiresActionEventNotification": ( + "stripe.events._v1_setup_intent_requires_action_event", + False, + ), + "V1SetupIntentSetupFailedEvent": ( + "stripe.events._v1_setup_intent_setup_failed_event", + False, + ), + "V1SetupIntentSetupFailedEventNotification": ( + "stripe.events._v1_setup_intent_setup_failed_event", + False, + ), + "V1SetupIntentSucceededEvent": ( + "stripe.events._v1_setup_intent_succeeded_event", + False, + ), + "V1SetupIntentSucceededEventNotification": ( + "stripe.events._v1_setup_intent_succeeded_event", + False, + ), + "V1SigmaScheduledQueryRunCreatedEvent": ( + "stripe.events._v1_sigma_scheduled_query_run_created_event", + False, + ), + "V1SigmaScheduledQueryRunCreatedEventNotification": ( + "stripe.events._v1_sigma_scheduled_query_run_created_event", + False, + ), + "V1SourceCanceledEvent": ( + "stripe.events._v1_source_canceled_event", + False, + ), + "V1SourceCanceledEventNotification": ( + "stripe.events._v1_source_canceled_event", + False, + ), + "V1SourceChargeableEvent": ( + "stripe.events._v1_source_chargeable_event", + False, + ), + "V1SourceChargeableEventNotification": ( + "stripe.events._v1_source_chargeable_event", + False, + ), + "V1SourceFailedEvent": ("stripe.events._v1_source_failed_event", False), + "V1SourceFailedEventNotification": ( + "stripe.events._v1_source_failed_event", + False, + ), + "V1SourceRefundAttributesRequiredEvent": ( + "stripe.events._v1_source_refund_attributes_required_event", + False, + ), + "V1SourceRefundAttributesRequiredEventNotification": ( + "stripe.events._v1_source_refund_attributes_required_event", + False, + ), + "V1SubscriptionScheduleAbortedEvent": ( + "stripe.events._v1_subscription_schedule_aborted_event", + False, + ), + "V1SubscriptionScheduleAbortedEventNotification": ( + "stripe.events._v1_subscription_schedule_aborted_event", + False, + ), + "V1SubscriptionScheduleCanceledEvent": ( + "stripe.events._v1_subscription_schedule_canceled_event", + False, + ), + "V1SubscriptionScheduleCanceledEventNotification": ( + "stripe.events._v1_subscription_schedule_canceled_event", + False, + ), + "V1SubscriptionScheduleCompletedEvent": ( + "stripe.events._v1_subscription_schedule_completed_event", + False, + ), + "V1SubscriptionScheduleCompletedEventNotification": ( + "stripe.events._v1_subscription_schedule_completed_event", + False, + ), + "V1SubscriptionScheduleCreatedEvent": ( + "stripe.events._v1_subscription_schedule_created_event", + False, + ), + "V1SubscriptionScheduleCreatedEventNotification": ( + "stripe.events._v1_subscription_schedule_created_event", + False, + ), + "V1SubscriptionScheduleExpiringEvent": ( + "stripe.events._v1_subscription_schedule_expiring_event", + False, + ), + "V1SubscriptionScheduleExpiringEventNotification": ( + "stripe.events._v1_subscription_schedule_expiring_event", + False, + ), + "V1SubscriptionScheduleReleasedEvent": ( + "stripe.events._v1_subscription_schedule_released_event", + False, + ), + "V1SubscriptionScheduleReleasedEventNotification": ( + "stripe.events._v1_subscription_schedule_released_event", + False, + ), + "V1SubscriptionScheduleUpdatedEvent": ( + "stripe.events._v1_subscription_schedule_updated_event", + False, + ), + "V1SubscriptionScheduleUpdatedEventNotification": ( + "stripe.events._v1_subscription_schedule_updated_event", + False, + ), + "V1TaxRateCreatedEvent": ( + "stripe.events._v1_tax_rate_created_event", + False, + ), + "V1TaxRateCreatedEventNotification": ( + "stripe.events._v1_tax_rate_created_event", + False, + ), + "V1TaxRateUpdatedEvent": ( + "stripe.events._v1_tax_rate_updated_event", + False, + ), + "V1TaxRateUpdatedEventNotification": ( + "stripe.events._v1_tax_rate_updated_event", + False, + ), + "V1TaxSettingsUpdatedEvent": ( + "stripe.events._v1_tax_settings_updated_event", + False, + ), + "V1TaxSettingsUpdatedEventNotification": ( + "stripe.events._v1_tax_settings_updated_event", + False, + ), + "V1TerminalReaderActionFailedEvent": ( + "stripe.events._v1_terminal_reader_action_failed_event", + False, + ), + "V1TerminalReaderActionFailedEventNotification": ( + "stripe.events._v1_terminal_reader_action_failed_event", + False, + ), + "V1TerminalReaderActionSucceededEvent": ( + "stripe.events._v1_terminal_reader_action_succeeded_event", + False, + ), + "V1TerminalReaderActionSucceededEventNotification": ( + "stripe.events._v1_terminal_reader_action_succeeded_event", + False, + ), + "V1TerminalReaderActionUpdatedEvent": ( + "stripe.events._v1_terminal_reader_action_updated_event", + False, + ), + "V1TerminalReaderActionUpdatedEventNotification": ( + "stripe.events._v1_terminal_reader_action_updated_event", + False, + ), + "V1TestHelpersTestClockAdvancingEvent": ( + "stripe.events._v1_test_helpers_test_clock_advancing_event", + False, + ), + "V1TestHelpersTestClockAdvancingEventNotification": ( + "stripe.events._v1_test_helpers_test_clock_advancing_event", + False, + ), + "V1TestHelpersTestClockCreatedEvent": ( + "stripe.events._v1_test_helpers_test_clock_created_event", + False, + ), + "V1TestHelpersTestClockCreatedEventNotification": ( + "stripe.events._v1_test_helpers_test_clock_created_event", + False, + ), + "V1TestHelpersTestClockDeletedEvent": ( + "stripe.events._v1_test_helpers_test_clock_deleted_event", + False, + ), + "V1TestHelpersTestClockDeletedEventNotification": ( + "stripe.events._v1_test_helpers_test_clock_deleted_event", + False, + ), + "V1TestHelpersTestClockInternalFailureEvent": ( + "stripe.events._v1_test_helpers_test_clock_internal_failure_event", + False, + ), + "V1TestHelpersTestClockInternalFailureEventNotification": ( + "stripe.events._v1_test_helpers_test_clock_internal_failure_event", + False, + ), + "V1TestHelpersTestClockReadyEvent": ( + "stripe.events._v1_test_helpers_test_clock_ready_event", + False, + ), + "V1TestHelpersTestClockReadyEventNotification": ( + "stripe.events._v1_test_helpers_test_clock_ready_event", + False, + ), + "V1TopupCanceledEvent": ("stripe.events._v1_topup_canceled_event", False), + "V1TopupCanceledEventNotification": ( + "stripe.events._v1_topup_canceled_event", + False, + ), + "V1TopupCreatedEvent": ("stripe.events._v1_topup_created_event", False), + "V1TopupCreatedEventNotification": ( + "stripe.events._v1_topup_created_event", + False, + ), + "V1TopupFailedEvent": ("stripe.events._v1_topup_failed_event", False), + "V1TopupFailedEventNotification": ( + "stripe.events._v1_topup_failed_event", + False, + ), + "V1TopupReversedEvent": ("stripe.events._v1_topup_reversed_event", False), + "V1TopupReversedEventNotification": ( + "stripe.events._v1_topup_reversed_event", + False, + ), + "V1TopupSucceededEvent": ( + "stripe.events._v1_topup_succeeded_event", + False, + ), + "V1TopupSucceededEventNotification": ( + "stripe.events._v1_topup_succeeded_event", + False, + ), + "V1TransferCreatedEvent": ( + "stripe.events._v1_transfer_created_event", + False, + ), + "V1TransferCreatedEventNotification": ( + "stripe.events._v1_transfer_created_event", + False, + ), + "V1TransferReversedEvent": ( + "stripe.events._v1_transfer_reversed_event", + False, + ), + "V1TransferReversedEventNotification": ( + "stripe.events._v1_transfer_reversed_event", + False, + ), + "V1TransferUpdatedEvent": ( + "stripe.events._v1_transfer_updated_event", + False, + ), + "V1TransferUpdatedEventNotification": ( + "stripe.events._v1_transfer_updated_event", False, ), "V2CommerceProductCatalogImportsFailedEvent": ( diff --git a/stripe/events/_event_classes.py b/stripe/events/_event_classes.py index 50ffa7ed6..ab1a8bbe7 100644 --- a/stripe/events/_event_classes.py +++ b/stripe/events/_event_classes.py @@ -7,12 +7,660 @@ from stripe._stripe_object import StripeObject if TYPE_CHECKING: + from stripe.events._v1_account_application_authorized_event import ( + V1AccountApplicationAuthorizedEventNotification, + ) + from stripe.events._v1_account_application_deauthorized_event import ( + V1AccountApplicationDeauthorizedEventNotification, + ) + from stripe.events._v1_account_external_account_created_event import ( + V1AccountExternalAccountCreatedEventNotification, + ) + from stripe.events._v1_account_external_account_deleted_event import ( + V1AccountExternalAccountDeletedEventNotification, + ) + from stripe.events._v1_account_external_account_updated_event import ( + V1AccountExternalAccountUpdatedEventNotification, + ) + from stripe.events._v1_account_updated_event import ( + V1AccountUpdatedEventNotification, + ) + from stripe.events._v1_application_fee_created_event import ( + V1ApplicationFeeCreatedEventNotification, + ) + from stripe.events._v1_application_fee_refunded_event import ( + V1ApplicationFeeRefundedEventNotification, + ) + from stripe.events._v1_application_fee_refund_updated_event import ( + V1ApplicationFeeRefundUpdatedEventNotification, + ) + from stripe.events._v1_balance_available_event import ( + V1BalanceAvailableEventNotification, + ) + from stripe.events._v1_balance_settings_updated_event import ( + V1BalanceSettingsUpdatedEventNotification, + ) + from stripe.events._v1_billing_alert_triggered_event import ( + V1BillingAlertTriggeredEventNotification, + ) + from stripe.events._v1_billing_credit_balance_transaction_created_event import ( + V1BillingCreditBalanceTransactionCreatedEventNotification, + ) + from stripe.events._v1_billing_credit_grant_created_event import ( + V1BillingCreditGrantCreatedEventNotification, + ) + from stripe.events._v1_billing_credit_grant_updated_event import ( + V1BillingCreditGrantUpdatedEventNotification, + ) + from stripe.events._v1_billing_meter_created_event import ( + V1BillingMeterCreatedEventNotification, + ) + from stripe.events._v1_billing_meter_deactivated_event import ( + V1BillingMeterDeactivatedEventNotification, + ) from stripe.events._v1_billing_meter_error_report_triggered_event import ( V1BillingMeterErrorReportTriggeredEventNotification, ) from stripe.events._v1_billing_meter_no_meter_found_event import ( V1BillingMeterNoMeterFoundEventNotification, ) + from stripe.events._v1_billing_meter_reactivated_event import ( + V1BillingMeterReactivatedEventNotification, + ) + from stripe.events._v1_billing_meter_updated_event import ( + V1BillingMeterUpdatedEventNotification, + ) + from stripe.events._v1_billing_portal_configuration_created_event import ( + V1BillingPortalConfigurationCreatedEventNotification, + ) + from stripe.events._v1_billing_portal_configuration_updated_event import ( + V1BillingPortalConfigurationUpdatedEventNotification, + ) + from stripe.events._v1_billing_portal_session_created_event import ( + V1BillingPortalSessionCreatedEventNotification, + ) + from stripe.events._v1_capability_updated_event import ( + V1CapabilityUpdatedEventNotification, + ) + from stripe.events._v1_cash_balance_funds_available_event import ( + V1CashBalanceFundsAvailableEventNotification, + ) + from stripe.events._v1_charge_captured_event import ( + V1ChargeCapturedEventNotification, + ) + from stripe.events._v1_charge_dispute_closed_event import ( + V1ChargeDisputeClosedEventNotification, + ) + from stripe.events._v1_charge_dispute_created_event import ( + V1ChargeDisputeCreatedEventNotification, + ) + from stripe.events._v1_charge_dispute_funds_reinstated_event import ( + V1ChargeDisputeFundsReinstatedEventNotification, + ) + from stripe.events._v1_charge_dispute_funds_withdrawn_event import ( + V1ChargeDisputeFundsWithdrawnEventNotification, + ) + from stripe.events._v1_charge_dispute_updated_event import ( + V1ChargeDisputeUpdatedEventNotification, + ) + from stripe.events._v1_charge_expired_event import ( + V1ChargeExpiredEventNotification, + ) + from stripe.events._v1_charge_failed_event import ( + V1ChargeFailedEventNotification, + ) + from stripe.events._v1_charge_pending_event import ( + V1ChargePendingEventNotification, + ) + from stripe.events._v1_charge_refunded_event import ( + V1ChargeRefundedEventNotification, + ) + from stripe.events._v1_charge_refund_updated_event import ( + V1ChargeRefundUpdatedEventNotification, + ) + from stripe.events._v1_charge_succeeded_event import ( + V1ChargeSucceededEventNotification, + ) + from stripe.events._v1_charge_updated_event import ( + V1ChargeUpdatedEventNotification, + ) + from stripe.events._v1_checkout_session_async_payment_failed_event import ( + V1CheckoutSessionAsyncPaymentFailedEventNotification, + ) + from stripe.events._v1_checkout_session_async_payment_succeeded_event import ( + V1CheckoutSessionAsyncPaymentSucceededEventNotification, + ) + from stripe.events._v1_checkout_session_completed_event import ( + V1CheckoutSessionCompletedEventNotification, + ) + from stripe.events._v1_checkout_session_expired_event import ( + V1CheckoutSessionExpiredEventNotification, + ) + from stripe.events._v1_climate_order_canceled_event import ( + V1ClimateOrderCanceledEventNotification, + ) + from stripe.events._v1_climate_order_created_event import ( + V1ClimateOrderCreatedEventNotification, + ) + from stripe.events._v1_climate_order_delayed_event import ( + V1ClimateOrderDelayedEventNotification, + ) + from stripe.events._v1_climate_order_delivered_event import ( + V1ClimateOrderDeliveredEventNotification, + ) + from stripe.events._v1_climate_order_product_substituted_event import ( + V1ClimateOrderProductSubstitutedEventNotification, + ) + from stripe.events._v1_climate_product_created_event import ( + V1ClimateProductCreatedEventNotification, + ) + from stripe.events._v1_climate_product_pricing_updated_event import ( + V1ClimateProductPricingUpdatedEventNotification, + ) + from stripe.events._v1_coupon_created_event import ( + V1CouponCreatedEventNotification, + ) + from stripe.events._v1_coupon_deleted_event import ( + V1CouponDeletedEventNotification, + ) + from stripe.events._v1_coupon_updated_event import ( + V1CouponUpdatedEventNotification, + ) + from stripe.events._v1_credit_note_created_event import ( + V1CreditNoteCreatedEventNotification, + ) + from stripe.events._v1_credit_note_updated_event import ( + V1CreditNoteUpdatedEventNotification, + ) + from stripe.events._v1_credit_note_voided_event import ( + V1CreditNoteVoidedEventNotification, + ) + from stripe.events._v1_customer_cash_balance_transaction_created_event import ( + V1CustomerCashBalanceTransactionCreatedEventNotification, + ) + from stripe.events._v1_customer_created_event import ( + V1CustomerCreatedEventNotification, + ) + from stripe.events._v1_customer_deleted_event import ( + V1CustomerDeletedEventNotification, + ) + from stripe.events._v1_customer_discount_created_event import ( + V1CustomerDiscountCreatedEventNotification, + ) + from stripe.events._v1_customer_discount_deleted_event import ( + V1CustomerDiscountDeletedEventNotification, + ) + from stripe.events._v1_customer_discount_updated_event import ( + V1CustomerDiscountUpdatedEventNotification, + ) + from stripe.events._v1_customer_subscription_created_event import ( + V1CustomerSubscriptionCreatedEventNotification, + ) + from stripe.events._v1_customer_subscription_deleted_event import ( + V1CustomerSubscriptionDeletedEventNotification, + ) + from stripe.events._v1_customer_subscription_paused_event import ( + V1CustomerSubscriptionPausedEventNotification, + ) + from stripe.events._v1_customer_subscription_pending_update_applied_event import ( + V1CustomerSubscriptionPendingUpdateAppliedEventNotification, + ) + from stripe.events._v1_customer_subscription_pending_update_expired_event import ( + V1CustomerSubscriptionPendingUpdateExpiredEventNotification, + ) + from stripe.events._v1_customer_subscription_resumed_event import ( + V1CustomerSubscriptionResumedEventNotification, + ) + from stripe.events._v1_customer_subscription_trial_will_end_event import ( + V1CustomerSubscriptionTrialWillEndEventNotification, + ) + from stripe.events._v1_customer_subscription_updated_event import ( + V1CustomerSubscriptionUpdatedEventNotification, + ) + from stripe.events._v1_customer_tax_id_created_event import ( + V1CustomerTaxIdCreatedEventNotification, + ) + from stripe.events._v1_customer_tax_id_deleted_event import ( + V1CustomerTaxIdDeletedEventNotification, + ) + from stripe.events._v1_customer_tax_id_updated_event import ( + V1CustomerTaxIdUpdatedEventNotification, + ) + from stripe.events._v1_customer_updated_event import ( + V1CustomerUpdatedEventNotification, + ) + from stripe.events._v1_entitlements_active_entitlement_summary_updated_event import ( + V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification, + ) + from stripe.events._v1_file_created_event import ( + V1FileCreatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_account_numbers_updated_event import ( + V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_created_event import ( + V1FinancialConnectionsAccountCreatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_deactivated_event import ( + V1FinancialConnectionsAccountDeactivatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_disconnected_event import ( + V1FinancialConnectionsAccountDisconnectedEventNotification, + ) + from stripe.events._v1_financial_connections_account_expected_deactivation_date_updated_event import ( + V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_reactivated_event import ( + V1FinancialConnectionsAccountReactivatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_refreshed_balance_event import ( + V1FinancialConnectionsAccountRefreshedBalanceEventNotification, + ) + from stripe.events._v1_financial_connections_account_refreshed_ownership_event import ( + V1FinancialConnectionsAccountRefreshedOwnershipEventNotification, + ) + from stripe.events._v1_financial_connections_account_refreshed_transactions_event import ( + V1FinancialConnectionsAccountRefreshedTransactionsEventNotification, + ) + from stripe.events._v1_financial_connections_account_supported_payment_method_types_updated_event import ( + V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification, + ) + from stripe.events._v1_financial_connections_account_upcoming_account_number_expiry_event import ( + V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification, + ) + from stripe.events._v1_financial_connections_account_upcoming_deactivation_event import ( + V1FinancialConnectionsAccountUpcomingDeactivationEventNotification, + ) + from stripe.events._v1_identity_verification_session_canceled_event import ( + V1IdentityVerificationSessionCanceledEventNotification, + ) + from stripe.events._v1_identity_verification_session_created_event import ( + V1IdentityVerificationSessionCreatedEventNotification, + ) + from stripe.events._v1_identity_verification_session_processing_event import ( + V1IdentityVerificationSessionProcessingEventNotification, + ) + from stripe.events._v1_identity_verification_session_redacted_event import ( + V1IdentityVerificationSessionRedactedEventNotification, + ) + from stripe.events._v1_identity_verification_session_requires_input_event import ( + V1IdentityVerificationSessionRequiresInputEventNotification, + ) + from stripe.events._v1_identity_verification_session_verified_event import ( + V1IdentityVerificationSessionVerifiedEventNotification, + ) + from stripe.events._v1_invoice_created_event import ( + V1InvoiceCreatedEventNotification, + ) + from stripe.events._v1_invoice_deleted_event import ( + V1InvoiceDeletedEventNotification, + ) + from stripe.events._v1_invoice_finalization_failed_event import ( + V1InvoiceFinalizationFailedEventNotification, + ) + from stripe.events._v1_invoice_finalized_event import ( + V1InvoiceFinalizedEventNotification, + ) + from stripe.events._v1_invoiceitem_created_event import ( + V1InvoiceitemCreatedEventNotification, + ) + from stripe.events._v1_invoiceitem_deleted_event import ( + V1InvoiceitemDeletedEventNotification, + ) + from stripe.events._v1_invoice_marked_uncollectible_event import ( + V1InvoiceMarkedUncollectibleEventNotification, + ) + from stripe.events._v1_invoice_overdue_event import ( + V1InvoiceOverdueEventNotification, + ) + from stripe.events._v1_invoice_overpaid_event import ( + V1InvoiceOverpaidEventNotification, + ) + from stripe.events._v1_invoice_paid_event import ( + V1InvoicePaidEventNotification, + ) + from stripe.events._v1_invoice_payment_action_required_event import ( + V1InvoicePaymentActionRequiredEventNotification, + ) + from stripe.events._v1_invoice_payment_attempt_required_event import ( + V1InvoicePaymentAttemptRequiredEventNotification, + ) + from stripe.events._v1_invoice_payment_failed_event import ( + V1InvoicePaymentFailedEventNotification, + ) + from stripe.events._v1_invoice_payment_paid_event import ( + V1InvoicePaymentPaidEventNotification, + ) + from stripe.events._v1_invoice_payment_succeeded_event import ( + V1InvoicePaymentSucceededEventNotification, + ) + from stripe.events._v1_invoice_sent_event import ( + V1InvoiceSentEventNotification, + ) + from stripe.events._v1_invoice_upcoming_event import ( + V1InvoiceUpcomingEventNotification, + ) + from stripe.events._v1_invoice_updated_event import ( + V1InvoiceUpdatedEventNotification, + ) + from stripe.events._v1_invoice_voided_event import ( + V1InvoiceVoidedEventNotification, + ) + from stripe.events._v1_invoice_will_be_due_event import ( + V1InvoiceWillBeDueEventNotification, + ) + from stripe.events._v1_issuing_authorization_created_event import ( + V1IssuingAuthorizationCreatedEventNotification, + ) + from stripe.events._v1_issuing_authorization_request_event import ( + V1IssuingAuthorizationRequestEventNotification, + ) + from stripe.events._v1_issuing_authorization_updated_event import ( + V1IssuingAuthorizationUpdatedEventNotification, + ) + from stripe.events._v1_issuing_card_created_event import ( + V1IssuingCardCreatedEventNotification, + ) + from stripe.events._v1_issuing_cardholder_created_event import ( + V1IssuingCardholderCreatedEventNotification, + ) + from stripe.events._v1_issuing_cardholder_updated_event import ( + V1IssuingCardholderUpdatedEventNotification, + ) + from stripe.events._v1_issuing_card_updated_event import ( + V1IssuingCardUpdatedEventNotification, + ) + from stripe.events._v1_issuing_dispute_closed_event import ( + V1IssuingDisputeClosedEventNotification, + ) + from stripe.events._v1_issuing_dispute_created_event import ( + V1IssuingDisputeCreatedEventNotification, + ) + from stripe.events._v1_issuing_dispute_funds_reinstated_event import ( + V1IssuingDisputeFundsReinstatedEventNotification, + ) + from stripe.events._v1_issuing_dispute_funds_rescinded_event import ( + V1IssuingDisputeFundsRescindedEventNotification, + ) + from stripe.events._v1_issuing_dispute_submitted_event import ( + V1IssuingDisputeSubmittedEventNotification, + ) + from stripe.events._v1_issuing_dispute_updated_event import ( + V1IssuingDisputeUpdatedEventNotification, + ) + from stripe.events._v1_issuing_personalization_design_activated_event import ( + V1IssuingPersonalizationDesignActivatedEventNotification, + ) + from stripe.events._v1_issuing_personalization_design_deactivated_event import ( + V1IssuingPersonalizationDesignDeactivatedEventNotification, + ) + from stripe.events._v1_issuing_personalization_design_rejected_event import ( + V1IssuingPersonalizationDesignRejectedEventNotification, + ) + from stripe.events._v1_issuing_personalization_design_updated_event import ( + V1IssuingPersonalizationDesignUpdatedEventNotification, + ) + from stripe.events._v1_issuing_token_created_event import ( + V1IssuingTokenCreatedEventNotification, + ) + from stripe.events._v1_issuing_token_updated_event import ( + V1IssuingTokenUpdatedEventNotification, + ) + from stripe.events._v1_issuing_transaction_created_event import ( + V1IssuingTransactionCreatedEventNotification, + ) + from stripe.events._v1_issuing_transaction_purchase_details_receipt_updated_event import ( + V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification, + ) + from stripe.events._v1_issuing_transaction_updated_event import ( + V1IssuingTransactionUpdatedEventNotification, + ) + from stripe.events._v1_mandate_updated_event import ( + V1MandateUpdatedEventNotification, + ) + from stripe.events._v1_payment_intent_amount_capturable_updated_event import ( + V1PaymentIntentAmountCapturableUpdatedEventNotification, + ) + from stripe.events._v1_payment_intent_canceled_event import ( + V1PaymentIntentCanceledEventNotification, + ) + from stripe.events._v1_payment_intent_created_event import ( + V1PaymentIntentCreatedEventNotification, + ) + from stripe.events._v1_payment_intent_partially_funded_event import ( + V1PaymentIntentPartiallyFundedEventNotification, + ) + from stripe.events._v1_payment_intent_payment_failed_event import ( + V1PaymentIntentPaymentFailedEventNotification, + ) + from stripe.events._v1_payment_intent_processing_event import ( + V1PaymentIntentProcessingEventNotification, + ) + from stripe.events._v1_payment_intent_requires_action_event import ( + V1PaymentIntentRequiresActionEventNotification, + ) + from stripe.events._v1_payment_intent_succeeded_event import ( + V1PaymentIntentSucceededEventNotification, + ) + from stripe.events._v1_payment_link_created_event import ( + V1PaymentLinkCreatedEventNotification, + ) + from stripe.events._v1_payment_link_updated_event import ( + V1PaymentLinkUpdatedEventNotification, + ) + from stripe.events._v1_payment_method_attached_event import ( + V1PaymentMethodAttachedEventNotification, + ) + from stripe.events._v1_payment_method_automatically_updated_event import ( + V1PaymentMethodAutomaticallyUpdatedEventNotification, + ) + from stripe.events._v1_payment_method_detached_event import ( + V1PaymentMethodDetachedEventNotification, + ) + from stripe.events._v1_payment_method_updated_event import ( + V1PaymentMethodUpdatedEventNotification, + ) + from stripe.events._v1_payout_canceled_event import ( + V1PayoutCanceledEventNotification, + ) + from stripe.events._v1_payout_created_event import ( + V1PayoutCreatedEventNotification, + ) + from stripe.events._v1_payout_failed_event import ( + V1PayoutFailedEventNotification, + ) + from stripe.events._v1_payout_paid_event import ( + V1PayoutPaidEventNotification, + ) + from stripe.events._v1_payout_reconciliation_completed_event import ( + V1PayoutReconciliationCompletedEventNotification, + ) + from stripe.events._v1_payout_updated_event import ( + V1PayoutUpdatedEventNotification, + ) + from stripe.events._v1_person_created_event import ( + V1PersonCreatedEventNotification, + ) + from stripe.events._v1_person_deleted_event import ( + V1PersonDeletedEventNotification, + ) + from stripe.events._v1_person_updated_event import ( + V1PersonUpdatedEventNotification, + ) + from stripe.events._v1_plan_created_event import ( + V1PlanCreatedEventNotification, + ) + from stripe.events._v1_plan_deleted_event import ( + V1PlanDeletedEventNotification, + ) + from stripe.events._v1_plan_updated_event import ( + V1PlanUpdatedEventNotification, + ) + from stripe.events._v1_price_created_event import ( + V1PriceCreatedEventNotification, + ) + from stripe.events._v1_price_deleted_event import ( + V1PriceDeletedEventNotification, + ) + from stripe.events._v1_price_updated_event import ( + V1PriceUpdatedEventNotification, + ) + from stripe.events._v1_product_created_event import ( + V1ProductCreatedEventNotification, + ) + from stripe.events._v1_product_deleted_event import ( + V1ProductDeletedEventNotification, + ) + from stripe.events._v1_product_updated_event import ( + V1ProductUpdatedEventNotification, + ) + from stripe.events._v1_promotion_code_created_event import ( + V1PromotionCodeCreatedEventNotification, + ) + from stripe.events._v1_promotion_code_updated_event import ( + V1PromotionCodeUpdatedEventNotification, + ) + from stripe.events._v1_quote_accepted_event import ( + V1QuoteAcceptedEventNotification, + ) + from stripe.events._v1_quote_canceled_event import ( + V1QuoteCanceledEventNotification, + ) + from stripe.events._v1_quote_created_event import ( + V1QuoteCreatedEventNotification, + ) + from stripe.events._v1_quote_finalized_event import ( + V1QuoteFinalizedEventNotification, + ) + from stripe.events._v1_radar_early_fraud_warning_created_event import ( + V1RadarEarlyFraudWarningCreatedEventNotification, + ) + from stripe.events._v1_radar_early_fraud_warning_updated_event import ( + V1RadarEarlyFraudWarningUpdatedEventNotification, + ) + from stripe.events._v1_refund_created_event import ( + V1RefundCreatedEventNotification, + ) + from stripe.events._v1_refund_failed_event import ( + V1RefundFailedEventNotification, + ) + from stripe.events._v1_refund_updated_event import ( + V1RefundUpdatedEventNotification, + ) + from stripe.events._v1_review_closed_event import ( + V1ReviewClosedEventNotification, + ) + from stripe.events._v1_review_opened_event import ( + V1ReviewOpenedEventNotification, + ) + from stripe.events._v1_setup_intent_canceled_event import ( + V1SetupIntentCanceledEventNotification, + ) + from stripe.events._v1_setup_intent_created_event import ( + V1SetupIntentCreatedEventNotification, + ) + from stripe.events._v1_setup_intent_requires_action_event import ( + V1SetupIntentRequiresActionEventNotification, + ) + from stripe.events._v1_setup_intent_setup_failed_event import ( + V1SetupIntentSetupFailedEventNotification, + ) + from stripe.events._v1_setup_intent_succeeded_event import ( + V1SetupIntentSucceededEventNotification, + ) + from stripe.events._v1_sigma_scheduled_query_run_created_event import ( + V1SigmaScheduledQueryRunCreatedEventNotification, + ) + from stripe.events._v1_source_canceled_event import ( + V1SourceCanceledEventNotification, + ) + from stripe.events._v1_source_chargeable_event import ( + V1SourceChargeableEventNotification, + ) + from stripe.events._v1_source_failed_event import ( + V1SourceFailedEventNotification, + ) + from stripe.events._v1_source_refund_attributes_required_event import ( + V1SourceRefundAttributesRequiredEventNotification, + ) + from stripe.events._v1_subscription_schedule_aborted_event import ( + V1SubscriptionScheduleAbortedEventNotification, + ) + from stripe.events._v1_subscription_schedule_canceled_event import ( + V1SubscriptionScheduleCanceledEventNotification, + ) + from stripe.events._v1_subscription_schedule_completed_event import ( + V1SubscriptionScheduleCompletedEventNotification, + ) + from stripe.events._v1_subscription_schedule_created_event import ( + V1SubscriptionScheduleCreatedEventNotification, + ) + from stripe.events._v1_subscription_schedule_expiring_event import ( + V1SubscriptionScheduleExpiringEventNotification, + ) + from stripe.events._v1_subscription_schedule_released_event import ( + V1SubscriptionScheduleReleasedEventNotification, + ) + from stripe.events._v1_subscription_schedule_updated_event import ( + V1SubscriptionScheduleUpdatedEventNotification, + ) + from stripe.events._v1_tax_rate_created_event import ( + V1TaxRateCreatedEventNotification, + ) + from stripe.events._v1_tax_rate_updated_event import ( + V1TaxRateUpdatedEventNotification, + ) + from stripe.events._v1_tax_settings_updated_event import ( + V1TaxSettingsUpdatedEventNotification, + ) + from stripe.events._v1_terminal_reader_action_failed_event import ( + V1TerminalReaderActionFailedEventNotification, + ) + from stripe.events._v1_terminal_reader_action_succeeded_event import ( + V1TerminalReaderActionSucceededEventNotification, + ) + from stripe.events._v1_terminal_reader_action_updated_event import ( + V1TerminalReaderActionUpdatedEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_advancing_event import ( + V1TestHelpersTestClockAdvancingEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_created_event import ( + V1TestHelpersTestClockCreatedEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_deleted_event import ( + V1TestHelpersTestClockDeletedEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_internal_failure_event import ( + V1TestHelpersTestClockInternalFailureEventNotification, + ) + from stripe.events._v1_test_helpers_test_clock_ready_event import ( + V1TestHelpersTestClockReadyEventNotification, + ) + from stripe.events._v1_topup_canceled_event import ( + V1TopupCanceledEventNotification, + ) + from stripe.events._v1_topup_created_event import ( + V1TopupCreatedEventNotification, + ) + from stripe.events._v1_topup_failed_event import ( + V1TopupFailedEventNotification, + ) + from stripe.events._v1_topup_reversed_event import ( + V1TopupReversedEventNotification, + ) + from stripe.events._v1_topup_succeeded_event import ( + V1TopupSucceededEventNotification, + ) + from stripe.events._v1_transfer_created_event import ( + V1TransferCreatedEventNotification, + ) + from stripe.events._v1_transfer_reversed_event import ( + V1TransferReversedEventNotification, + ) + from stripe.events._v1_transfer_updated_event import ( + V1TransferUpdatedEventNotification, + ) from stripe.events._v2_commerce_product_catalog_imports_failed_event import ( V2CommerceProductCatalogImportsFailedEventNotification, ) @@ -82,13 +730,877 @@ _V2_EVENT_CLASS_LOOKUP = { + "v1.account.application.authorized": ( + "stripe.events._v1_account_application_authorized_event", + "V1AccountApplicationAuthorizedEvent", + ), + "v1.account.application.deauthorized": ( + "stripe.events._v1_account_application_deauthorized_event", + "V1AccountApplicationDeauthorizedEvent", + ), + "v1.account.external_account.created": ( + "stripe.events._v1_account_external_account_created_event", + "V1AccountExternalAccountCreatedEvent", + ), + "v1.account.external_account.deleted": ( + "stripe.events._v1_account_external_account_deleted_event", + "V1AccountExternalAccountDeletedEvent", + ), + "v1.account.external_account.updated": ( + "stripe.events._v1_account_external_account_updated_event", + "V1AccountExternalAccountUpdatedEvent", + ), + "v1.account.updated": ( + "stripe.events._v1_account_updated_event", + "V1AccountUpdatedEvent", + ), + "v1.application_fee.created": ( + "stripe.events._v1_application_fee_created_event", + "V1ApplicationFeeCreatedEvent", + ), + "v1.application_fee.refunded": ( + "stripe.events._v1_application_fee_refunded_event", + "V1ApplicationFeeRefundedEvent", + ), + "v1.application_fee.refund.updated": ( + "stripe.events._v1_application_fee_refund_updated_event", + "V1ApplicationFeeRefundUpdatedEvent", + ), + "v1.balance.available": ( + "stripe.events._v1_balance_available_event", + "V1BalanceAvailableEvent", + ), + "v1.balance_settings.updated": ( + "stripe.events._v1_balance_settings_updated_event", + "V1BalanceSettingsUpdatedEvent", + ), + "v1.billing.alert.triggered": ( + "stripe.events._v1_billing_alert_triggered_event", + "V1BillingAlertTriggeredEvent", + ), + "v1.billing.credit_balance_transaction.created": ( + "stripe.events._v1_billing_credit_balance_transaction_created_event", + "V1BillingCreditBalanceTransactionCreatedEvent", + ), + "v1.billing.credit_grant.created": ( + "stripe.events._v1_billing_credit_grant_created_event", + "V1BillingCreditGrantCreatedEvent", + ), + "v1.billing.credit_grant.updated": ( + "stripe.events._v1_billing_credit_grant_updated_event", + "V1BillingCreditGrantUpdatedEvent", + ), + "v1.billing.meter.created": ( + "stripe.events._v1_billing_meter_created_event", + "V1BillingMeterCreatedEvent", + ), + "v1.billing.meter.deactivated": ( + "stripe.events._v1_billing_meter_deactivated_event", + "V1BillingMeterDeactivatedEvent", + ), "v1.billing.meter.error_report_triggered": ( "stripe.events._v1_billing_meter_error_report_triggered_event", "V1BillingMeterErrorReportTriggeredEvent", ), - "v1.billing.meter.no_meter_found": ( - "stripe.events._v1_billing_meter_no_meter_found_event", - "V1BillingMeterNoMeterFoundEvent", + "v1.billing.meter.no_meter_found": ( + "stripe.events._v1_billing_meter_no_meter_found_event", + "V1BillingMeterNoMeterFoundEvent", + ), + "v1.billing.meter.reactivated": ( + "stripe.events._v1_billing_meter_reactivated_event", + "V1BillingMeterReactivatedEvent", + ), + "v1.billing.meter.updated": ( + "stripe.events._v1_billing_meter_updated_event", + "V1BillingMeterUpdatedEvent", + ), + "v1.billing_portal.configuration.created": ( + "stripe.events._v1_billing_portal_configuration_created_event", + "V1BillingPortalConfigurationCreatedEvent", + ), + "v1.billing_portal.configuration.updated": ( + "stripe.events._v1_billing_portal_configuration_updated_event", + "V1BillingPortalConfigurationUpdatedEvent", + ), + "v1.billing_portal.session.created": ( + "stripe.events._v1_billing_portal_session_created_event", + "V1BillingPortalSessionCreatedEvent", + ), + "v1.capability.updated": ( + "stripe.events._v1_capability_updated_event", + "V1CapabilityUpdatedEvent", + ), + "v1.cash_balance.funds_available": ( + "stripe.events._v1_cash_balance_funds_available_event", + "V1CashBalanceFundsAvailableEvent", + ), + "v1.charge.captured": ( + "stripe.events._v1_charge_captured_event", + "V1ChargeCapturedEvent", + ), + "v1.charge.dispute.closed": ( + "stripe.events._v1_charge_dispute_closed_event", + "V1ChargeDisputeClosedEvent", + ), + "v1.charge.dispute.created": ( + "stripe.events._v1_charge_dispute_created_event", + "V1ChargeDisputeCreatedEvent", + ), + "v1.charge.dispute.funds_reinstated": ( + "stripe.events._v1_charge_dispute_funds_reinstated_event", + "V1ChargeDisputeFundsReinstatedEvent", + ), + "v1.charge.dispute.funds_withdrawn": ( + "stripe.events._v1_charge_dispute_funds_withdrawn_event", + "V1ChargeDisputeFundsWithdrawnEvent", + ), + "v1.charge.dispute.updated": ( + "stripe.events._v1_charge_dispute_updated_event", + "V1ChargeDisputeUpdatedEvent", + ), + "v1.charge.expired": ( + "stripe.events._v1_charge_expired_event", + "V1ChargeExpiredEvent", + ), + "v1.charge.failed": ( + "stripe.events._v1_charge_failed_event", + "V1ChargeFailedEvent", + ), + "v1.charge.pending": ( + "stripe.events._v1_charge_pending_event", + "V1ChargePendingEvent", + ), + "v1.charge.refunded": ( + "stripe.events._v1_charge_refunded_event", + "V1ChargeRefundedEvent", + ), + "v1.charge.refund.updated": ( + "stripe.events._v1_charge_refund_updated_event", + "V1ChargeRefundUpdatedEvent", + ), + "v1.charge.succeeded": ( + "stripe.events._v1_charge_succeeded_event", + "V1ChargeSucceededEvent", + ), + "v1.charge.updated": ( + "stripe.events._v1_charge_updated_event", + "V1ChargeUpdatedEvent", + ), + "v1.checkout.session.async_payment_failed": ( + "stripe.events._v1_checkout_session_async_payment_failed_event", + "V1CheckoutSessionAsyncPaymentFailedEvent", + ), + "v1.checkout.session.async_payment_succeeded": ( + "stripe.events._v1_checkout_session_async_payment_succeeded_event", + "V1CheckoutSessionAsyncPaymentSucceededEvent", + ), + "v1.checkout.session.completed": ( + "stripe.events._v1_checkout_session_completed_event", + "V1CheckoutSessionCompletedEvent", + ), + "v1.checkout.session.expired": ( + "stripe.events._v1_checkout_session_expired_event", + "V1CheckoutSessionExpiredEvent", + ), + "v1.climate.order.canceled": ( + "stripe.events._v1_climate_order_canceled_event", + "V1ClimateOrderCanceledEvent", + ), + "v1.climate.order.created": ( + "stripe.events._v1_climate_order_created_event", + "V1ClimateOrderCreatedEvent", + ), + "v1.climate.order.delayed": ( + "stripe.events._v1_climate_order_delayed_event", + "V1ClimateOrderDelayedEvent", + ), + "v1.climate.order.delivered": ( + "stripe.events._v1_climate_order_delivered_event", + "V1ClimateOrderDeliveredEvent", + ), + "v1.climate.order.product_substituted": ( + "stripe.events._v1_climate_order_product_substituted_event", + "V1ClimateOrderProductSubstitutedEvent", + ), + "v1.climate.product.created": ( + "stripe.events._v1_climate_product_created_event", + "V1ClimateProductCreatedEvent", + ), + "v1.climate.product.pricing_updated": ( + "stripe.events._v1_climate_product_pricing_updated_event", + "V1ClimateProductPricingUpdatedEvent", + ), + "v1.coupon.created": ( + "stripe.events._v1_coupon_created_event", + "V1CouponCreatedEvent", + ), + "v1.coupon.deleted": ( + "stripe.events._v1_coupon_deleted_event", + "V1CouponDeletedEvent", + ), + "v1.coupon.updated": ( + "stripe.events._v1_coupon_updated_event", + "V1CouponUpdatedEvent", + ), + "v1.credit_note.created": ( + "stripe.events._v1_credit_note_created_event", + "V1CreditNoteCreatedEvent", + ), + "v1.credit_note.updated": ( + "stripe.events._v1_credit_note_updated_event", + "V1CreditNoteUpdatedEvent", + ), + "v1.credit_note.voided": ( + "stripe.events._v1_credit_note_voided_event", + "V1CreditNoteVoidedEvent", + ), + "v1.customer_cash_balance_transaction.created": ( + "stripe.events._v1_customer_cash_balance_transaction_created_event", + "V1CustomerCashBalanceTransactionCreatedEvent", + ), + "v1.customer.created": ( + "stripe.events._v1_customer_created_event", + "V1CustomerCreatedEvent", + ), + "v1.customer.deleted": ( + "stripe.events._v1_customer_deleted_event", + "V1CustomerDeletedEvent", + ), + "v1.customer.discount.created": ( + "stripe.events._v1_customer_discount_created_event", + "V1CustomerDiscountCreatedEvent", + ), + "v1.customer.discount.deleted": ( + "stripe.events._v1_customer_discount_deleted_event", + "V1CustomerDiscountDeletedEvent", + ), + "v1.customer.discount.updated": ( + "stripe.events._v1_customer_discount_updated_event", + "V1CustomerDiscountUpdatedEvent", + ), + "v1.customer.subscription.created": ( + "stripe.events._v1_customer_subscription_created_event", + "V1CustomerSubscriptionCreatedEvent", + ), + "v1.customer.subscription.deleted": ( + "stripe.events._v1_customer_subscription_deleted_event", + "V1CustomerSubscriptionDeletedEvent", + ), + "v1.customer.subscription.paused": ( + "stripe.events._v1_customer_subscription_paused_event", + "V1CustomerSubscriptionPausedEvent", + ), + "v1.customer.subscription.pending_update_applied": ( + "stripe.events._v1_customer_subscription_pending_update_applied_event", + "V1CustomerSubscriptionPendingUpdateAppliedEvent", + ), + "v1.customer.subscription.pending_update_expired": ( + "stripe.events._v1_customer_subscription_pending_update_expired_event", + "V1CustomerSubscriptionPendingUpdateExpiredEvent", + ), + "v1.customer.subscription.resumed": ( + "stripe.events._v1_customer_subscription_resumed_event", + "V1CustomerSubscriptionResumedEvent", + ), + "v1.customer.subscription.trial_will_end": ( + "stripe.events._v1_customer_subscription_trial_will_end_event", + "V1CustomerSubscriptionTrialWillEndEvent", + ), + "v1.customer.subscription.updated": ( + "stripe.events._v1_customer_subscription_updated_event", + "V1CustomerSubscriptionUpdatedEvent", + ), + "v1.customer.tax_id.created": ( + "stripe.events._v1_customer_tax_id_created_event", + "V1CustomerTaxIdCreatedEvent", + ), + "v1.customer.tax_id.deleted": ( + "stripe.events._v1_customer_tax_id_deleted_event", + "V1CustomerTaxIdDeletedEvent", + ), + "v1.customer.tax_id.updated": ( + "stripe.events._v1_customer_tax_id_updated_event", + "V1CustomerTaxIdUpdatedEvent", + ), + "v1.customer.updated": ( + "stripe.events._v1_customer_updated_event", + "V1CustomerUpdatedEvent", + ), + "v1.entitlements.active_entitlement_summary.updated": ( + "stripe.events._v1_entitlements_active_entitlement_summary_updated_event", + "V1EntitlementsActiveEntitlementSummaryUpdatedEvent", + ), + "v1.file.created": ( + "stripe.events._v1_file_created_event", + "V1FileCreatedEvent", + ), + "v1.financial_connections.account.account_numbers_updated": ( + "stripe.events._v1_financial_connections_account_account_numbers_updated_event", + "V1FinancialConnectionsAccountAccountNumbersUpdatedEvent", + ), + "v1.financial_connections.account.created": ( + "stripe.events._v1_financial_connections_account_created_event", + "V1FinancialConnectionsAccountCreatedEvent", + ), + "v1.financial_connections.account.deactivated": ( + "stripe.events._v1_financial_connections_account_deactivated_event", + "V1FinancialConnectionsAccountDeactivatedEvent", + ), + "v1.financial_connections.account.disconnected": ( + "stripe.events._v1_financial_connections_account_disconnected_event", + "V1FinancialConnectionsAccountDisconnectedEvent", + ), + "v1.financial_connections.account.expected_deactivation_date_updated": ( + "stripe.events._v1_financial_connections_account_expected_deactivation_date_updated_event", + "V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent", + ), + "v1.financial_connections.account.reactivated": ( + "stripe.events._v1_financial_connections_account_reactivated_event", + "V1FinancialConnectionsAccountReactivatedEvent", + ), + "v1.financial_connections.account.refreshed_balance": ( + "stripe.events._v1_financial_connections_account_refreshed_balance_event", + "V1FinancialConnectionsAccountRefreshedBalanceEvent", + ), + "v1.financial_connections.account.refreshed_ownership": ( + "stripe.events._v1_financial_connections_account_refreshed_ownership_event", + "V1FinancialConnectionsAccountRefreshedOwnershipEvent", + ), + "v1.financial_connections.account.refreshed_transactions": ( + "stripe.events._v1_financial_connections_account_refreshed_transactions_event", + "V1FinancialConnectionsAccountRefreshedTransactionsEvent", + ), + "v1.financial_connections.account.supported_payment_method_types_updated": ( + "stripe.events._v1_financial_connections_account_supported_payment_method_types_updated_event", + "V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent", + ), + "v1.financial_connections.account.upcoming_account_number_expiry": ( + "stripe.events._v1_financial_connections_account_upcoming_account_number_expiry_event", + "V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent", + ), + "v1.financial_connections.account.upcoming_deactivation": ( + "stripe.events._v1_financial_connections_account_upcoming_deactivation_event", + "V1FinancialConnectionsAccountUpcomingDeactivationEvent", + ), + "v1.identity.verification_session.canceled": ( + "stripe.events._v1_identity_verification_session_canceled_event", + "V1IdentityVerificationSessionCanceledEvent", + ), + "v1.identity.verification_session.created": ( + "stripe.events._v1_identity_verification_session_created_event", + "V1IdentityVerificationSessionCreatedEvent", + ), + "v1.identity.verification_session.processing": ( + "stripe.events._v1_identity_verification_session_processing_event", + "V1IdentityVerificationSessionProcessingEvent", + ), + "v1.identity.verification_session.redacted": ( + "stripe.events._v1_identity_verification_session_redacted_event", + "V1IdentityVerificationSessionRedactedEvent", + ), + "v1.identity.verification_session.requires_input": ( + "stripe.events._v1_identity_verification_session_requires_input_event", + "V1IdentityVerificationSessionRequiresInputEvent", + ), + "v1.identity.verification_session.verified": ( + "stripe.events._v1_identity_verification_session_verified_event", + "V1IdentityVerificationSessionVerifiedEvent", + ), + "v1.invoice.created": ( + "stripe.events._v1_invoice_created_event", + "V1InvoiceCreatedEvent", + ), + "v1.invoice.deleted": ( + "stripe.events._v1_invoice_deleted_event", + "V1InvoiceDeletedEvent", + ), + "v1.invoice.finalization_failed": ( + "stripe.events._v1_invoice_finalization_failed_event", + "V1InvoiceFinalizationFailedEvent", + ), + "v1.invoice.finalized": ( + "stripe.events._v1_invoice_finalized_event", + "V1InvoiceFinalizedEvent", + ), + "v1.invoiceitem.created": ( + "stripe.events._v1_invoiceitem_created_event", + "V1InvoiceitemCreatedEvent", + ), + "v1.invoiceitem.deleted": ( + "stripe.events._v1_invoiceitem_deleted_event", + "V1InvoiceitemDeletedEvent", + ), + "v1.invoice.marked_uncollectible": ( + "stripe.events._v1_invoice_marked_uncollectible_event", + "V1InvoiceMarkedUncollectibleEvent", + ), + "v1.invoice.overdue": ( + "stripe.events._v1_invoice_overdue_event", + "V1InvoiceOverdueEvent", + ), + "v1.invoice.overpaid": ( + "stripe.events._v1_invoice_overpaid_event", + "V1InvoiceOverpaidEvent", + ), + "v1.invoice.paid": ( + "stripe.events._v1_invoice_paid_event", + "V1InvoicePaidEvent", + ), + "v1.invoice.payment_action_required": ( + "stripe.events._v1_invoice_payment_action_required_event", + "V1InvoicePaymentActionRequiredEvent", + ), + "v1.invoice.payment_attempt_required": ( + "stripe.events._v1_invoice_payment_attempt_required_event", + "V1InvoicePaymentAttemptRequiredEvent", + ), + "v1.invoice.payment_failed": ( + "stripe.events._v1_invoice_payment_failed_event", + "V1InvoicePaymentFailedEvent", + ), + "v1.invoice_payment.paid": ( + "stripe.events._v1_invoice_payment_paid_event", + "V1InvoicePaymentPaidEvent", + ), + "v1.invoice.payment_succeeded": ( + "stripe.events._v1_invoice_payment_succeeded_event", + "V1InvoicePaymentSucceededEvent", + ), + "v1.invoice.sent": ( + "stripe.events._v1_invoice_sent_event", + "V1InvoiceSentEvent", + ), + "v1.invoice.upcoming": ( + "stripe.events._v1_invoice_upcoming_event", + "V1InvoiceUpcomingEvent", + ), + "v1.invoice.updated": ( + "stripe.events._v1_invoice_updated_event", + "V1InvoiceUpdatedEvent", + ), + "v1.invoice.voided": ( + "stripe.events._v1_invoice_voided_event", + "V1InvoiceVoidedEvent", + ), + "v1.invoice.will_be_due": ( + "stripe.events._v1_invoice_will_be_due_event", + "V1InvoiceWillBeDueEvent", + ), + "v1.issuing_authorization.created": ( + "stripe.events._v1_issuing_authorization_created_event", + "V1IssuingAuthorizationCreatedEvent", + ), + "v1.issuing_authorization.request": ( + "stripe.events._v1_issuing_authorization_request_event", + "V1IssuingAuthorizationRequestEvent", + ), + "v1.issuing_authorization.updated": ( + "stripe.events._v1_issuing_authorization_updated_event", + "V1IssuingAuthorizationUpdatedEvent", + ), + "v1.issuing_card.created": ( + "stripe.events._v1_issuing_card_created_event", + "V1IssuingCardCreatedEvent", + ), + "v1.issuing_cardholder.created": ( + "stripe.events._v1_issuing_cardholder_created_event", + "V1IssuingCardholderCreatedEvent", + ), + "v1.issuing_cardholder.updated": ( + "stripe.events._v1_issuing_cardholder_updated_event", + "V1IssuingCardholderUpdatedEvent", + ), + "v1.issuing_card.updated": ( + "stripe.events._v1_issuing_card_updated_event", + "V1IssuingCardUpdatedEvent", + ), + "v1.issuing_dispute.closed": ( + "stripe.events._v1_issuing_dispute_closed_event", + "V1IssuingDisputeClosedEvent", + ), + "v1.issuing_dispute.created": ( + "stripe.events._v1_issuing_dispute_created_event", + "V1IssuingDisputeCreatedEvent", + ), + "v1.issuing_dispute.funds_reinstated": ( + "stripe.events._v1_issuing_dispute_funds_reinstated_event", + "V1IssuingDisputeFundsReinstatedEvent", + ), + "v1.issuing_dispute.funds_rescinded": ( + "stripe.events._v1_issuing_dispute_funds_rescinded_event", + "V1IssuingDisputeFundsRescindedEvent", + ), + "v1.issuing_dispute.submitted": ( + "stripe.events._v1_issuing_dispute_submitted_event", + "V1IssuingDisputeSubmittedEvent", + ), + "v1.issuing_dispute.updated": ( + "stripe.events._v1_issuing_dispute_updated_event", + "V1IssuingDisputeUpdatedEvent", + ), + "v1.issuing_personalization_design.activated": ( + "stripe.events._v1_issuing_personalization_design_activated_event", + "V1IssuingPersonalizationDesignActivatedEvent", + ), + "v1.issuing_personalization_design.deactivated": ( + "stripe.events._v1_issuing_personalization_design_deactivated_event", + "V1IssuingPersonalizationDesignDeactivatedEvent", + ), + "v1.issuing_personalization_design.rejected": ( + "stripe.events._v1_issuing_personalization_design_rejected_event", + "V1IssuingPersonalizationDesignRejectedEvent", + ), + "v1.issuing_personalization_design.updated": ( + "stripe.events._v1_issuing_personalization_design_updated_event", + "V1IssuingPersonalizationDesignUpdatedEvent", + ), + "v1.issuing_token.created": ( + "stripe.events._v1_issuing_token_created_event", + "V1IssuingTokenCreatedEvent", + ), + "v1.issuing_token.updated": ( + "stripe.events._v1_issuing_token_updated_event", + "V1IssuingTokenUpdatedEvent", + ), + "v1.issuing_transaction.created": ( + "stripe.events._v1_issuing_transaction_created_event", + "V1IssuingTransactionCreatedEvent", + ), + "v1.issuing_transaction.purchase_details_receipt_updated": ( + "stripe.events._v1_issuing_transaction_purchase_details_receipt_updated_event", + "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent", + ), + "v1.issuing_transaction.updated": ( + "stripe.events._v1_issuing_transaction_updated_event", + "V1IssuingTransactionUpdatedEvent", + ), + "v1.mandate.updated": ( + "stripe.events._v1_mandate_updated_event", + "V1MandateUpdatedEvent", + ), + "v1.payment_intent.amount_capturable_updated": ( + "stripe.events._v1_payment_intent_amount_capturable_updated_event", + "V1PaymentIntentAmountCapturableUpdatedEvent", + ), + "v1.payment_intent.canceled": ( + "stripe.events._v1_payment_intent_canceled_event", + "V1PaymentIntentCanceledEvent", + ), + "v1.payment_intent.created": ( + "stripe.events._v1_payment_intent_created_event", + "V1PaymentIntentCreatedEvent", + ), + "v1.payment_intent.partially_funded": ( + "stripe.events._v1_payment_intent_partially_funded_event", + "V1PaymentIntentPartiallyFundedEvent", + ), + "v1.payment_intent.payment_failed": ( + "stripe.events._v1_payment_intent_payment_failed_event", + "V1PaymentIntentPaymentFailedEvent", + ), + "v1.payment_intent.processing": ( + "stripe.events._v1_payment_intent_processing_event", + "V1PaymentIntentProcessingEvent", + ), + "v1.payment_intent.requires_action": ( + "stripe.events._v1_payment_intent_requires_action_event", + "V1PaymentIntentRequiresActionEvent", + ), + "v1.payment_intent.succeeded": ( + "stripe.events._v1_payment_intent_succeeded_event", + "V1PaymentIntentSucceededEvent", + ), + "v1.payment_link.created": ( + "stripe.events._v1_payment_link_created_event", + "V1PaymentLinkCreatedEvent", + ), + "v1.payment_link.updated": ( + "stripe.events._v1_payment_link_updated_event", + "V1PaymentLinkUpdatedEvent", + ), + "v1.payment_method.attached": ( + "stripe.events._v1_payment_method_attached_event", + "V1PaymentMethodAttachedEvent", + ), + "v1.payment_method.automatically_updated": ( + "stripe.events._v1_payment_method_automatically_updated_event", + "V1PaymentMethodAutomaticallyUpdatedEvent", + ), + "v1.payment_method.detached": ( + "stripe.events._v1_payment_method_detached_event", + "V1PaymentMethodDetachedEvent", + ), + "v1.payment_method.updated": ( + "stripe.events._v1_payment_method_updated_event", + "V1PaymentMethodUpdatedEvent", + ), + "v1.payout.canceled": ( + "stripe.events._v1_payout_canceled_event", + "V1PayoutCanceledEvent", + ), + "v1.payout.created": ( + "stripe.events._v1_payout_created_event", + "V1PayoutCreatedEvent", + ), + "v1.payout.failed": ( + "stripe.events._v1_payout_failed_event", + "V1PayoutFailedEvent", + ), + "v1.payout.paid": ( + "stripe.events._v1_payout_paid_event", + "V1PayoutPaidEvent", + ), + "v1.payout.reconciliation_completed": ( + "stripe.events._v1_payout_reconciliation_completed_event", + "V1PayoutReconciliationCompletedEvent", + ), + "v1.payout.updated": ( + "stripe.events._v1_payout_updated_event", + "V1PayoutUpdatedEvent", + ), + "v1.person.created": ( + "stripe.events._v1_person_created_event", + "V1PersonCreatedEvent", + ), + "v1.person.deleted": ( + "stripe.events._v1_person_deleted_event", + "V1PersonDeletedEvent", + ), + "v1.person.updated": ( + "stripe.events._v1_person_updated_event", + "V1PersonUpdatedEvent", + ), + "v1.plan.created": ( + "stripe.events._v1_plan_created_event", + "V1PlanCreatedEvent", + ), + "v1.plan.deleted": ( + "stripe.events._v1_plan_deleted_event", + "V1PlanDeletedEvent", + ), + "v1.plan.updated": ( + "stripe.events._v1_plan_updated_event", + "V1PlanUpdatedEvent", + ), + "v1.price.created": ( + "stripe.events._v1_price_created_event", + "V1PriceCreatedEvent", + ), + "v1.price.deleted": ( + "stripe.events._v1_price_deleted_event", + "V1PriceDeletedEvent", + ), + "v1.price.updated": ( + "stripe.events._v1_price_updated_event", + "V1PriceUpdatedEvent", + ), + "v1.product.created": ( + "stripe.events._v1_product_created_event", + "V1ProductCreatedEvent", + ), + "v1.product.deleted": ( + "stripe.events._v1_product_deleted_event", + "V1ProductDeletedEvent", + ), + "v1.product.updated": ( + "stripe.events._v1_product_updated_event", + "V1ProductUpdatedEvent", + ), + "v1.promotion_code.created": ( + "stripe.events._v1_promotion_code_created_event", + "V1PromotionCodeCreatedEvent", + ), + "v1.promotion_code.updated": ( + "stripe.events._v1_promotion_code_updated_event", + "V1PromotionCodeUpdatedEvent", + ), + "v1.quote.accepted": ( + "stripe.events._v1_quote_accepted_event", + "V1QuoteAcceptedEvent", + ), + "v1.quote.canceled": ( + "stripe.events._v1_quote_canceled_event", + "V1QuoteCanceledEvent", + ), + "v1.quote.created": ( + "stripe.events._v1_quote_created_event", + "V1QuoteCreatedEvent", + ), + "v1.quote.finalized": ( + "stripe.events._v1_quote_finalized_event", + "V1QuoteFinalizedEvent", + ), + "v1.radar.early_fraud_warning.created": ( + "stripe.events._v1_radar_early_fraud_warning_created_event", + "V1RadarEarlyFraudWarningCreatedEvent", + ), + "v1.radar.early_fraud_warning.updated": ( + "stripe.events._v1_radar_early_fraud_warning_updated_event", + "V1RadarEarlyFraudWarningUpdatedEvent", + ), + "v1.refund.created": ( + "stripe.events._v1_refund_created_event", + "V1RefundCreatedEvent", + ), + "v1.refund.failed": ( + "stripe.events._v1_refund_failed_event", + "V1RefundFailedEvent", + ), + "v1.refund.updated": ( + "stripe.events._v1_refund_updated_event", + "V1RefundUpdatedEvent", + ), + "v1.review.closed": ( + "stripe.events._v1_review_closed_event", + "V1ReviewClosedEvent", + ), + "v1.review.opened": ( + "stripe.events._v1_review_opened_event", + "V1ReviewOpenedEvent", + ), + "v1.setup_intent.canceled": ( + "stripe.events._v1_setup_intent_canceled_event", + "V1SetupIntentCanceledEvent", + ), + "v1.setup_intent.created": ( + "stripe.events._v1_setup_intent_created_event", + "V1SetupIntentCreatedEvent", + ), + "v1.setup_intent.requires_action": ( + "stripe.events._v1_setup_intent_requires_action_event", + "V1SetupIntentRequiresActionEvent", + ), + "v1.setup_intent.setup_failed": ( + "stripe.events._v1_setup_intent_setup_failed_event", + "V1SetupIntentSetupFailedEvent", + ), + "v1.setup_intent.succeeded": ( + "stripe.events._v1_setup_intent_succeeded_event", + "V1SetupIntentSucceededEvent", + ), + "v1.sigma.scheduled_query_run.created": ( + "stripe.events._v1_sigma_scheduled_query_run_created_event", + "V1SigmaScheduledQueryRunCreatedEvent", + ), + "v1.source.canceled": ( + "stripe.events._v1_source_canceled_event", + "V1SourceCanceledEvent", + ), + "v1.source.chargeable": ( + "stripe.events._v1_source_chargeable_event", + "V1SourceChargeableEvent", + ), + "v1.source.failed": ( + "stripe.events._v1_source_failed_event", + "V1SourceFailedEvent", + ), + "v1.source.refund_attributes_required": ( + "stripe.events._v1_source_refund_attributes_required_event", + "V1SourceRefundAttributesRequiredEvent", + ), + "v1.subscription_schedule.aborted": ( + "stripe.events._v1_subscription_schedule_aborted_event", + "V1SubscriptionScheduleAbortedEvent", + ), + "v1.subscription_schedule.canceled": ( + "stripe.events._v1_subscription_schedule_canceled_event", + "V1SubscriptionScheduleCanceledEvent", + ), + "v1.subscription_schedule.completed": ( + "stripe.events._v1_subscription_schedule_completed_event", + "V1SubscriptionScheduleCompletedEvent", + ), + "v1.subscription_schedule.created": ( + "stripe.events._v1_subscription_schedule_created_event", + "V1SubscriptionScheduleCreatedEvent", + ), + "v1.subscription_schedule.expiring": ( + "stripe.events._v1_subscription_schedule_expiring_event", + "V1SubscriptionScheduleExpiringEvent", + ), + "v1.subscription_schedule.released": ( + "stripe.events._v1_subscription_schedule_released_event", + "V1SubscriptionScheduleReleasedEvent", + ), + "v1.subscription_schedule.updated": ( + "stripe.events._v1_subscription_schedule_updated_event", + "V1SubscriptionScheduleUpdatedEvent", + ), + "v1.tax_rate.created": ( + "stripe.events._v1_tax_rate_created_event", + "V1TaxRateCreatedEvent", + ), + "v1.tax_rate.updated": ( + "stripe.events._v1_tax_rate_updated_event", + "V1TaxRateUpdatedEvent", + ), + "v1.tax.settings.updated": ( + "stripe.events._v1_tax_settings_updated_event", + "V1TaxSettingsUpdatedEvent", + ), + "v1.terminal.reader.action_failed": ( + "stripe.events._v1_terminal_reader_action_failed_event", + "V1TerminalReaderActionFailedEvent", + ), + "v1.terminal.reader.action_succeeded": ( + "stripe.events._v1_terminal_reader_action_succeeded_event", + "V1TerminalReaderActionSucceededEvent", + ), + "v1.terminal.reader.action_updated": ( + "stripe.events._v1_terminal_reader_action_updated_event", + "V1TerminalReaderActionUpdatedEvent", + ), + "v1.test_helpers.test_clock.advancing": ( + "stripe.events._v1_test_helpers_test_clock_advancing_event", + "V1TestHelpersTestClockAdvancingEvent", + ), + "v1.test_helpers.test_clock.created": ( + "stripe.events._v1_test_helpers_test_clock_created_event", + "V1TestHelpersTestClockCreatedEvent", + ), + "v1.test_helpers.test_clock.deleted": ( + "stripe.events._v1_test_helpers_test_clock_deleted_event", + "V1TestHelpersTestClockDeletedEvent", + ), + "v1.test_helpers.test_clock.internal_failure": ( + "stripe.events._v1_test_helpers_test_clock_internal_failure_event", + "V1TestHelpersTestClockInternalFailureEvent", + ), + "v1.test_helpers.test_clock.ready": ( + "stripe.events._v1_test_helpers_test_clock_ready_event", + "V1TestHelpersTestClockReadyEvent", + ), + "v1.topup.canceled": ( + "stripe.events._v1_topup_canceled_event", + "V1TopupCanceledEvent", + ), + "v1.topup.created": ( + "stripe.events._v1_topup_created_event", + "V1TopupCreatedEvent", + ), + "v1.topup.failed": ( + "stripe.events._v1_topup_failed_event", + "V1TopupFailedEvent", + ), + "v1.topup.reversed": ( + "stripe.events._v1_topup_reversed_event", + "V1TopupReversedEvent", + ), + "v1.topup.succeeded": ( + "stripe.events._v1_topup_succeeded_event", + "V1TopupSucceededEvent", + ), + "v1.transfer.created": ( + "stripe.events._v1_transfer_created_event", + "V1TransferCreatedEvent", + ), + "v1.transfer.reversed": ( + "stripe.events._v1_transfer_reversed_event", + "V1TransferReversedEvent", + ), + "v1.transfer.updated": ( + "stripe.events._v1_transfer_updated_event", + "V1TransferUpdatedEvent", ), "v2.commerce.product_catalog.imports.failed": ( "stripe.events._v2_commerce_product_catalog_imports_failed_event", @@ -193,6 +1705,74 @@ def get_v2_event_class(type_: str): _V2_EVENT_NOTIFICATION_CLASS_LOOKUP = { + "v1.account.application.authorized": ( + "stripe.events._v1_account_application_authorized_event", + "V1AccountApplicationAuthorizedEventNotification", + ), + "v1.account.application.deauthorized": ( + "stripe.events._v1_account_application_deauthorized_event", + "V1AccountApplicationDeauthorizedEventNotification", + ), + "v1.account.external_account.created": ( + "stripe.events._v1_account_external_account_created_event", + "V1AccountExternalAccountCreatedEventNotification", + ), + "v1.account.external_account.deleted": ( + "stripe.events._v1_account_external_account_deleted_event", + "V1AccountExternalAccountDeletedEventNotification", + ), + "v1.account.external_account.updated": ( + "stripe.events._v1_account_external_account_updated_event", + "V1AccountExternalAccountUpdatedEventNotification", + ), + "v1.account.updated": ( + "stripe.events._v1_account_updated_event", + "V1AccountUpdatedEventNotification", + ), + "v1.application_fee.created": ( + "stripe.events._v1_application_fee_created_event", + "V1ApplicationFeeCreatedEventNotification", + ), + "v1.application_fee.refunded": ( + "stripe.events._v1_application_fee_refunded_event", + "V1ApplicationFeeRefundedEventNotification", + ), + "v1.application_fee.refund.updated": ( + "stripe.events._v1_application_fee_refund_updated_event", + "V1ApplicationFeeRefundUpdatedEventNotification", + ), + "v1.balance.available": ( + "stripe.events._v1_balance_available_event", + "V1BalanceAvailableEventNotification", + ), + "v1.balance_settings.updated": ( + "stripe.events._v1_balance_settings_updated_event", + "V1BalanceSettingsUpdatedEventNotification", + ), + "v1.billing.alert.triggered": ( + "stripe.events._v1_billing_alert_triggered_event", + "V1BillingAlertTriggeredEventNotification", + ), + "v1.billing.credit_balance_transaction.created": ( + "stripe.events._v1_billing_credit_balance_transaction_created_event", + "V1BillingCreditBalanceTransactionCreatedEventNotification", + ), + "v1.billing.credit_grant.created": ( + "stripe.events._v1_billing_credit_grant_created_event", + "V1BillingCreditGrantCreatedEventNotification", + ), + "v1.billing.credit_grant.updated": ( + "stripe.events._v1_billing_credit_grant_updated_event", + "V1BillingCreditGrantUpdatedEventNotification", + ), + "v1.billing.meter.created": ( + "stripe.events._v1_billing_meter_created_event", + "V1BillingMeterCreatedEventNotification", + ), + "v1.billing.meter.deactivated": ( + "stripe.events._v1_billing_meter_deactivated_event", + "V1BillingMeterDeactivatedEventNotification", + ), "v1.billing.meter.error_report_triggered": ( "stripe.events._v1_billing_meter_error_report_triggered_event", "V1BillingMeterErrorReportTriggeredEventNotification", @@ -201,6 +1781,802 @@ def get_v2_event_class(type_: str): "stripe.events._v1_billing_meter_no_meter_found_event", "V1BillingMeterNoMeterFoundEventNotification", ), + "v1.billing.meter.reactivated": ( + "stripe.events._v1_billing_meter_reactivated_event", + "V1BillingMeterReactivatedEventNotification", + ), + "v1.billing.meter.updated": ( + "stripe.events._v1_billing_meter_updated_event", + "V1BillingMeterUpdatedEventNotification", + ), + "v1.billing_portal.configuration.created": ( + "stripe.events._v1_billing_portal_configuration_created_event", + "V1BillingPortalConfigurationCreatedEventNotification", + ), + "v1.billing_portal.configuration.updated": ( + "stripe.events._v1_billing_portal_configuration_updated_event", + "V1BillingPortalConfigurationUpdatedEventNotification", + ), + "v1.billing_portal.session.created": ( + "stripe.events._v1_billing_portal_session_created_event", + "V1BillingPortalSessionCreatedEventNotification", + ), + "v1.capability.updated": ( + "stripe.events._v1_capability_updated_event", + "V1CapabilityUpdatedEventNotification", + ), + "v1.cash_balance.funds_available": ( + "stripe.events._v1_cash_balance_funds_available_event", + "V1CashBalanceFundsAvailableEventNotification", + ), + "v1.charge.captured": ( + "stripe.events._v1_charge_captured_event", + "V1ChargeCapturedEventNotification", + ), + "v1.charge.dispute.closed": ( + "stripe.events._v1_charge_dispute_closed_event", + "V1ChargeDisputeClosedEventNotification", + ), + "v1.charge.dispute.created": ( + "stripe.events._v1_charge_dispute_created_event", + "V1ChargeDisputeCreatedEventNotification", + ), + "v1.charge.dispute.funds_reinstated": ( + "stripe.events._v1_charge_dispute_funds_reinstated_event", + "V1ChargeDisputeFundsReinstatedEventNotification", + ), + "v1.charge.dispute.funds_withdrawn": ( + "stripe.events._v1_charge_dispute_funds_withdrawn_event", + "V1ChargeDisputeFundsWithdrawnEventNotification", + ), + "v1.charge.dispute.updated": ( + "stripe.events._v1_charge_dispute_updated_event", + "V1ChargeDisputeUpdatedEventNotification", + ), + "v1.charge.expired": ( + "stripe.events._v1_charge_expired_event", + "V1ChargeExpiredEventNotification", + ), + "v1.charge.failed": ( + "stripe.events._v1_charge_failed_event", + "V1ChargeFailedEventNotification", + ), + "v1.charge.pending": ( + "stripe.events._v1_charge_pending_event", + "V1ChargePendingEventNotification", + ), + "v1.charge.refunded": ( + "stripe.events._v1_charge_refunded_event", + "V1ChargeRefundedEventNotification", + ), + "v1.charge.refund.updated": ( + "stripe.events._v1_charge_refund_updated_event", + "V1ChargeRefundUpdatedEventNotification", + ), + "v1.charge.succeeded": ( + "stripe.events._v1_charge_succeeded_event", + "V1ChargeSucceededEventNotification", + ), + "v1.charge.updated": ( + "stripe.events._v1_charge_updated_event", + "V1ChargeUpdatedEventNotification", + ), + "v1.checkout.session.async_payment_failed": ( + "stripe.events._v1_checkout_session_async_payment_failed_event", + "V1CheckoutSessionAsyncPaymentFailedEventNotification", + ), + "v1.checkout.session.async_payment_succeeded": ( + "stripe.events._v1_checkout_session_async_payment_succeeded_event", + "V1CheckoutSessionAsyncPaymentSucceededEventNotification", + ), + "v1.checkout.session.completed": ( + "stripe.events._v1_checkout_session_completed_event", + "V1CheckoutSessionCompletedEventNotification", + ), + "v1.checkout.session.expired": ( + "stripe.events._v1_checkout_session_expired_event", + "V1CheckoutSessionExpiredEventNotification", + ), + "v1.climate.order.canceled": ( + "stripe.events._v1_climate_order_canceled_event", + "V1ClimateOrderCanceledEventNotification", + ), + "v1.climate.order.created": ( + "stripe.events._v1_climate_order_created_event", + "V1ClimateOrderCreatedEventNotification", + ), + "v1.climate.order.delayed": ( + "stripe.events._v1_climate_order_delayed_event", + "V1ClimateOrderDelayedEventNotification", + ), + "v1.climate.order.delivered": ( + "stripe.events._v1_climate_order_delivered_event", + "V1ClimateOrderDeliveredEventNotification", + ), + "v1.climate.order.product_substituted": ( + "stripe.events._v1_climate_order_product_substituted_event", + "V1ClimateOrderProductSubstitutedEventNotification", + ), + "v1.climate.product.created": ( + "stripe.events._v1_climate_product_created_event", + "V1ClimateProductCreatedEventNotification", + ), + "v1.climate.product.pricing_updated": ( + "stripe.events._v1_climate_product_pricing_updated_event", + "V1ClimateProductPricingUpdatedEventNotification", + ), + "v1.coupon.created": ( + "stripe.events._v1_coupon_created_event", + "V1CouponCreatedEventNotification", + ), + "v1.coupon.deleted": ( + "stripe.events._v1_coupon_deleted_event", + "V1CouponDeletedEventNotification", + ), + "v1.coupon.updated": ( + "stripe.events._v1_coupon_updated_event", + "V1CouponUpdatedEventNotification", + ), + "v1.credit_note.created": ( + "stripe.events._v1_credit_note_created_event", + "V1CreditNoteCreatedEventNotification", + ), + "v1.credit_note.updated": ( + "stripe.events._v1_credit_note_updated_event", + "V1CreditNoteUpdatedEventNotification", + ), + "v1.credit_note.voided": ( + "stripe.events._v1_credit_note_voided_event", + "V1CreditNoteVoidedEventNotification", + ), + "v1.customer_cash_balance_transaction.created": ( + "stripe.events._v1_customer_cash_balance_transaction_created_event", + "V1CustomerCashBalanceTransactionCreatedEventNotification", + ), + "v1.customer.created": ( + "stripe.events._v1_customer_created_event", + "V1CustomerCreatedEventNotification", + ), + "v1.customer.deleted": ( + "stripe.events._v1_customer_deleted_event", + "V1CustomerDeletedEventNotification", + ), + "v1.customer.discount.created": ( + "stripe.events._v1_customer_discount_created_event", + "V1CustomerDiscountCreatedEventNotification", + ), + "v1.customer.discount.deleted": ( + "stripe.events._v1_customer_discount_deleted_event", + "V1CustomerDiscountDeletedEventNotification", + ), + "v1.customer.discount.updated": ( + "stripe.events._v1_customer_discount_updated_event", + "V1CustomerDiscountUpdatedEventNotification", + ), + "v1.customer.subscription.created": ( + "stripe.events._v1_customer_subscription_created_event", + "V1CustomerSubscriptionCreatedEventNotification", + ), + "v1.customer.subscription.deleted": ( + "stripe.events._v1_customer_subscription_deleted_event", + "V1CustomerSubscriptionDeletedEventNotification", + ), + "v1.customer.subscription.paused": ( + "stripe.events._v1_customer_subscription_paused_event", + "V1CustomerSubscriptionPausedEventNotification", + ), + "v1.customer.subscription.pending_update_applied": ( + "stripe.events._v1_customer_subscription_pending_update_applied_event", + "V1CustomerSubscriptionPendingUpdateAppliedEventNotification", + ), + "v1.customer.subscription.pending_update_expired": ( + "stripe.events._v1_customer_subscription_pending_update_expired_event", + "V1CustomerSubscriptionPendingUpdateExpiredEventNotification", + ), + "v1.customer.subscription.resumed": ( + "stripe.events._v1_customer_subscription_resumed_event", + "V1CustomerSubscriptionResumedEventNotification", + ), + "v1.customer.subscription.trial_will_end": ( + "stripe.events._v1_customer_subscription_trial_will_end_event", + "V1CustomerSubscriptionTrialWillEndEventNotification", + ), + "v1.customer.subscription.updated": ( + "stripe.events._v1_customer_subscription_updated_event", + "V1CustomerSubscriptionUpdatedEventNotification", + ), + "v1.customer.tax_id.created": ( + "stripe.events._v1_customer_tax_id_created_event", + "V1CustomerTaxIdCreatedEventNotification", + ), + "v1.customer.tax_id.deleted": ( + "stripe.events._v1_customer_tax_id_deleted_event", + "V1CustomerTaxIdDeletedEventNotification", + ), + "v1.customer.tax_id.updated": ( + "stripe.events._v1_customer_tax_id_updated_event", + "V1CustomerTaxIdUpdatedEventNotification", + ), + "v1.customer.updated": ( + "stripe.events._v1_customer_updated_event", + "V1CustomerUpdatedEventNotification", + ), + "v1.entitlements.active_entitlement_summary.updated": ( + "stripe.events._v1_entitlements_active_entitlement_summary_updated_event", + "V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification", + ), + "v1.file.created": ( + "stripe.events._v1_file_created_event", + "V1FileCreatedEventNotification", + ), + "v1.financial_connections.account.account_numbers_updated": ( + "stripe.events._v1_financial_connections_account_account_numbers_updated_event", + "V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification", + ), + "v1.financial_connections.account.created": ( + "stripe.events._v1_financial_connections_account_created_event", + "V1FinancialConnectionsAccountCreatedEventNotification", + ), + "v1.financial_connections.account.deactivated": ( + "stripe.events._v1_financial_connections_account_deactivated_event", + "V1FinancialConnectionsAccountDeactivatedEventNotification", + ), + "v1.financial_connections.account.disconnected": ( + "stripe.events._v1_financial_connections_account_disconnected_event", + "V1FinancialConnectionsAccountDisconnectedEventNotification", + ), + "v1.financial_connections.account.expected_deactivation_date_updated": ( + "stripe.events._v1_financial_connections_account_expected_deactivation_date_updated_event", + "V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification", + ), + "v1.financial_connections.account.reactivated": ( + "stripe.events._v1_financial_connections_account_reactivated_event", + "V1FinancialConnectionsAccountReactivatedEventNotification", + ), + "v1.financial_connections.account.refreshed_balance": ( + "stripe.events._v1_financial_connections_account_refreshed_balance_event", + "V1FinancialConnectionsAccountRefreshedBalanceEventNotification", + ), + "v1.financial_connections.account.refreshed_ownership": ( + "stripe.events._v1_financial_connections_account_refreshed_ownership_event", + "V1FinancialConnectionsAccountRefreshedOwnershipEventNotification", + ), + "v1.financial_connections.account.refreshed_transactions": ( + "stripe.events._v1_financial_connections_account_refreshed_transactions_event", + "V1FinancialConnectionsAccountRefreshedTransactionsEventNotification", + ), + "v1.financial_connections.account.supported_payment_method_types_updated": ( + "stripe.events._v1_financial_connections_account_supported_payment_method_types_updated_event", + "V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification", + ), + "v1.financial_connections.account.upcoming_account_number_expiry": ( + "stripe.events._v1_financial_connections_account_upcoming_account_number_expiry_event", + "V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification", + ), + "v1.financial_connections.account.upcoming_deactivation": ( + "stripe.events._v1_financial_connections_account_upcoming_deactivation_event", + "V1FinancialConnectionsAccountUpcomingDeactivationEventNotification", + ), + "v1.identity.verification_session.canceled": ( + "stripe.events._v1_identity_verification_session_canceled_event", + "V1IdentityVerificationSessionCanceledEventNotification", + ), + "v1.identity.verification_session.created": ( + "stripe.events._v1_identity_verification_session_created_event", + "V1IdentityVerificationSessionCreatedEventNotification", + ), + "v1.identity.verification_session.processing": ( + "stripe.events._v1_identity_verification_session_processing_event", + "V1IdentityVerificationSessionProcessingEventNotification", + ), + "v1.identity.verification_session.redacted": ( + "stripe.events._v1_identity_verification_session_redacted_event", + "V1IdentityVerificationSessionRedactedEventNotification", + ), + "v1.identity.verification_session.requires_input": ( + "stripe.events._v1_identity_verification_session_requires_input_event", + "V1IdentityVerificationSessionRequiresInputEventNotification", + ), + "v1.identity.verification_session.verified": ( + "stripe.events._v1_identity_verification_session_verified_event", + "V1IdentityVerificationSessionVerifiedEventNotification", + ), + "v1.invoice.created": ( + "stripe.events._v1_invoice_created_event", + "V1InvoiceCreatedEventNotification", + ), + "v1.invoice.deleted": ( + "stripe.events._v1_invoice_deleted_event", + "V1InvoiceDeletedEventNotification", + ), + "v1.invoice.finalization_failed": ( + "stripe.events._v1_invoice_finalization_failed_event", + "V1InvoiceFinalizationFailedEventNotification", + ), + "v1.invoice.finalized": ( + "stripe.events._v1_invoice_finalized_event", + "V1InvoiceFinalizedEventNotification", + ), + "v1.invoiceitem.created": ( + "stripe.events._v1_invoiceitem_created_event", + "V1InvoiceitemCreatedEventNotification", + ), + "v1.invoiceitem.deleted": ( + "stripe.events._v1_invoiceitem_deleted_event", + "V1InvoiceitemDeletedEventNotification", + ), + "v1.invoice.marked_uncollectible": ( + "stripe.events._v1_invoice_marked_uncollectible_event", + "V1InvoiceMarkedUncollectibleEventNotification", + ), + "v1.invoice.overdue": ( + "stripe.events._v1_invoice_overdue_event", + "V1InvoiceOverdueEventNotification", + ), + "v1.invoice.overpaid": ( + "stripe.events._v1_invoice_overpaid_event", + "V1InvoiceOverpaidEventNotification", + ), + "v1.invoice.paid": ( + "stripe.events._v1_invoice_paid_event", + "V1InvoicePaidEventNotification", + ), + "v1.invoice.payment_action_required": ( + "stripe.events._v1_invoice_payment_action_required_event", + "V1InvoicePaymentActionRequiredEventNotification", + ), + "v1.invoice.payment_attempt_required": ( + "stripe.events._v1_invoice_payment_attempt_required_event", + "V1InvoicePaymentAttemptRequiredEventNotification", + ), + "v1.invoice.payment_failed": ( + "stripe.events._v1_invoice_payment_failed_event", + "V1InvoicePaymentFailedEventNotification", + ), + "v1.invoice_payment.paid": ( + "stripe.events._v1_invoice_payment_paid_event", + "V1InvoicePaymentPaidEventNotification", + ), + "v1.invoice.payment_succeeded": ( + "stripe.events._v1_invoice_payment_succeeded_event", + "V1InvoicePaymentSucceededEventNotification", + ), + "v1.invoice.sent": ( + "stripe.events._v1_invoice_sent_event", + "V1InvoiceSentEventNotification", + ), + "v1.invoice.upcoming": ( + "stripe.events._v1_invoice_upcoming_event", + "V1InvoiceUpcomingEventNotification", + ), + "v1.invoice.updated": ( + "stripe.events._v1_invoice_updated_event", + "V1InvoiceUpdatedEventNotification", + ), + "v1.invoice.voided": ( + "stripe.events._v1_invoice_voided_event", + "V1InvoiceVoidedEventNotification", + ), + "v1.invoice.will_be_due": ( + "stripe.events._v1_invoice_will_be_due_event", + "V1InvoiceWillBeDueEventNotification", + ), + "v1.issuing_authorization.created": ( + "stripe.events._v1_issuing_authorization_created_event", + "V1IssuingAuthorizationCreatedEventNotification", + ), + "v1.issuing_authorization.request": ( + "stripe.events._v1_issuing_authorization_request_event", + "V1IssuingAuthorizationRequestEventNotification", + ), + "v1.issuing_authorization.updated": ( + "stripe.events._v1_issuing_authorization_updated_event", + "V1IssuingAuthorizationUpdatedEventNotification", + ), + "v1.issuing_card.created": ( + "stripe.events._v1_issuing_card_created_event", + "V1IssuingCardCreatedEventNotification", + ), + "v1.issuing_cardholder.created": ( + "stripe.events._v1_issuing_cardholder_created_event", + "V1IssuingCardholderCreatedEventNotification", + ), + "v1.issuing_cardholder.updated": ( + "stripe.events._v1_issuing_cardholder_updated_event", + "V1IssuingCardholderUpdatedEventNotification", + ), + "v1.issuing_card.updated": ( + "stripe.events._v1_issuing_card_updated_event", + "V1IssuingCardUpdatedEventNotification", + ), + "v1.issuing_dispute.closed": ( + "stripe.events._v1_issuing_dispute_closed_event", + "V1IssuingDisputeClosedEventNotification", + ), + "v1.issuing_dispute.created": ( + "stripe.events._v1_issuing_dispute_created_event", + "V1IssuingDisputeCreatedEventNotification", + ), + "v1.issuing_dispute.funds_reinstated": ( + "stripe.events._v1_issuing_dispute_funds_reinstated_event", + "V1IssuingDisputeFundsReinstatedEventNotification", + ), + "v1.issuing_dispute.funds_rescinded": ( + "stripe.events._v1_issuing_dispute_funds_rescinded_event", + "V1IssuingDisputeFundsRescindedEventNotification", + ), + "v1.issuing_dispute.submitted": ( + "stripe.events._v1_issuing_dispute_submitted_event", + "V1IssuingDisputeSubmittedEventNotification", + ), + "v1.issuing_dispute.updated": ( + "stripe.events._v1_issuing_dispute_updated_event", + "V1IssuingDisputeUpdatedEventNotification", + ), + "v1.issuing_personalization_design.activated": ( + "stripe.events._v1_issuing_personalization_design_activated_event", + "V1IssuingPersonalizationDesignActivatedEventNotification", + ), + "v1.issuing_personalization_design.deactivated": ( + "stripe.events._v1_issuing_personalization_design_deactivated_event", + "V1IssuingPersonalizationDesignDeactivatedEventNotification", + ), + "v1.issuing_personalization_design.rejected": ( + "stripe.events._v1_issuing_personalization_design_rejected_event", + "V1IssuingPersonalizationDesignRejectedEventNotification", + ), + "v1.issuing_personalization_design.updated": ( + "stripe.events._v1_issuing_personalization_design_updated_event", + "V1IssuingPersonalizationDesignUpdatedEventNotification", + ), + "v1.issuing_token.created": ( + "stripe.events._v1_issuing_token_created_event", + "V1IssuingTokenCreatedEventNotification", + ), + "v1.issuing_token.updated": ( + "stripe.events._v1_issuing_token_updated_event", + "V1IssuingTokenUpdatedEventNotification", + ), + "v1.issuing_transaction.created": ( + "stripe.events._v1_issuing_transaction_created_event", + "V1IssuingTransactionCreatedEventNotification", + ), + "v1.issuing_transaction.purchase_details_receipt_updated": ( + "stripe.events._v1_issuing_transaction_purchase_details_receipt_updated_event", + "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification", + ), + "v1.issuing_transaction.updated": ( + "stripe.events._v1_issuing_transaction_updated_event", + "V1IssuingTransactionUpdatedEventNotification", + ), + "v1.mandate.updated": ( + "stripe.events._v1_mandate_updated_event", + "V1MandateUpdatedEventNotification", + ), + "v1.payment_intent.amount_capturable_updated": ( + "stripe.events._v1_payment_intent_amount_capturable_updated_event", + "V1PaymentIntentAmountCapturableUpdatedEventNotification", + ), + "v1.payment_intent.canceled": ( + "stripe.events._v1_payment_intent_canceled_event", + "V1PaymentIntentCanceledEventNotification", + ), + "v1.payment_intent.created": ( + "stripe.events._v1_payment_intent_created_event", + "V1PaymentIntentCreatedEventNotification", + ), + "v1.payment_intent.partially_funded": ( + "stripe.events._v1_payment_intent_partially_funded_event", + "V1PaymentIntentPartiallyFundedEventNotification", + ), + "v1.payment_intent.payment_failed": ( + "stripe.events._v1_payment_intent_payment_failed_event", + "V1PaymentIntentPaymentFailedEventNotification", + ), + "v1.payment_intent.processing": ( + "stripe.events._v1_payment_intent_processing_event", + "V1PaymentIntentProcessingEventNotification", + ), + "v1.payment_intent.requires_action": ( + "stripe.events._v1_payment_intent_requires_action_event", + "V1PaymentIntentRequiresActionEventNotification", + ), + "v1.payment_intent.succeeded": ( + "stripe.events._v1_payment_intent_succeeded_event", + "V1PaymentIntentSucceededEventNotification", + ), + "v1.payment_link.created": ( + "stripe.events._v1_payment_link_created_event", + "V1PaymentLinkCreatedEventNotification", + ), + "v1.payment_link.updated": ( + "stripe.events._v1_payment_link_updated_event", + "V1PaymentLinkUpdatedEventNotification", + ), + "v1.payment_method.attached": ( + "stripe.events._v1_payment_method_attached_event", + "V1PaymentMethodAttachedEventNotification", + ), + "v1.payment_method.automatically_updated": ( + "stripe.events._v1_payment_method_automatically_updated_event", + "V1PaymentMethodAutomaticallyUpdatedEventNotification", + ), + "v1.payment_method.detached": ( + "stripe.events._v1_payment_method_detached_event", + "V1PaymentMethodDetachedEventNotification", + ), + "v1.payment_method.updated": ( + "stripe.events._v1_payment_method_updated_event", + "V1PaymentMethodUpdatedEventNotification", + ), + "v1.payout.canceled": ( + "stripe.events._v1_payout_canceled_event", + "V1PayoutCanceledEventNotification", + ), + "v1.payout.created": ( + "stripe.events._v1_payout_created_event", + "V1PayoutCreatedEventNotification", + ), + "v1.payout.failed": ( + "stripe.events._v1_payout_failed_event", + "V1PayoutFailedEventNotification", + ), + "v1.payout.paid": ( + "stripe.events._v1_payout_paid_event", + "V1PayoutPaidEventNotification", + ), + "v1.payout.reconciliation_completed": ( + "stripe.events._v1_payout_reconciliation_completed_event", + "V1PayoutReconciliationCompletedEventNotification", + ), + "v1.payout.updated": ( + "stripe.events._v1_payout_updated_event", + "V1PayoutUpdatedEventNotification", + ), + "v1.person.created": ( + "stripe.events._v1_person_created_event", + "V1PersonCreatedEventNotification", + ), + "v1.person.deleted": ( + "stripe.events._v1_person_deleted_event", + "V1PersonDeletedEventNotification", + ), + "v1.person.updated": ( + "stripe.events._v1_person_updated_event", + "V1PersonUpdatedEventNotification", + ), + "v1.plan.created": ( + "stripe.events._v1_plan_created_event", + "V1PlanCreatedEventNotification", + ), + "v1.plan.deleted": ( + "stripe.events._v1_plan_deleted_event", + "V1PlanDeletedEventNotification", + ), + "v1.plan.updated": ( + "stripe.events._v1_plan_updated_event", + "V1PlanUpdatedEventNotification", + ), + "v1.price.created": ( + "stripe.events._v1_price_created_event", + "V1PriceCreatedEventNotification", + ), + "v1.price.deleted": ( + "stripe.events._v1_price_deleted_event", + "V1PriceDeletedEventNotification", + ), + "v1.price.updated": ( + "stripe.events._v1_price_updated_event", + "V1PriceUpdatedEventNotification", + ), + "v1.product.created": ( + "stripe.events._v1_product_created_event", + "V1ProductCreatedEventNotification", + ), + "v1.product.deleted": ( + "stripe.events._v1_product_deleted_event", + "V1ProductDeletedEventNotification", + ), + "v1.product.updated": ( + "stripe.events._v1_product_updated_event", + "V1ProductUpdatedEventNotification", + ), + "v1.promotion_code.created": ( + "stripe.events._v1_promotion_code_created_event", + "V1PromotionCodeCreatedEventNotification", + ), + "v1.promotion_code.updated": ( + "stripe.events._v1_promotion_code_updated_event", + "V1PromotionCodeUpdatedEventNotification", + ), + "v1.quote.accepted": ( + "stripe.events._v1_quote_accepted_event", + "V1QuoteAcceptedEventNotification", + ), + "v1.quote.canceled": ( + "stripe.events._v1_quote_canceled_event", + "V1QuoteCanceledEventNotification", + ), + "v1.quote.created": ( + "stripe.events._v1_quote_created_event", + "V1QuoteCreatedEventNotification", + ), + "v1.quote.finalized": ( + "stripe.events._v1_quote_finalized_event", + "V1QuoteFinalizedEventNotification", + ), + "v1.radar.early_fraud_warning.created": ( + "stripe.events._v1_radar_early_fraud_warning_created_event", + "V1RadarEarlyFraudWarningCreatedEventNotification", + ), + "v1.radar.early_fraud_warning.updated": ( + "stripe.events._v1_radar_early_fraud_warning_updated_event", + "V1RadarEarlyFraudWarningUpdatedEventNotification", + ), + "v1.refund.created": ( + "stripe.events._v1_refund_created_event", + "V1RefundCreatedEventNotification", + ), + "v1.refund.failed": ( + "stripe.events._v1_refund_failed_event", + "V1RefundFailedEventNotification", + ), + "v1.refund.updated": ( + "stripe.events._v1_refund_updated_event", + "V1RefundUpdatedEventNotification", + ), + "v1.review.closed": ( + "stripe.events._v1_review_closed_event", + "V1ReviewClosedEventNotification", + ), + "v1.review.opened": ( + "stripe.events._v1_review_opened_event", + "V1ReviewOpenedEventNotification", + ), + "v1.setup_intent.canceled": ( + "stripe.events._v1_setup_intent_canceled_event", + "V1SetupIntentCanceledEventNotification", + ), + "v1.setup_intent.created": ( + "stripe.events._v1_setup_intent_created_event", + "V1SetupIntentCreatedEventNotification", + ), + "v1.setup_intent.requires_action": ( + "stripe.events._v1_setup_intent_requires_action_event", + "V1SetupIntentRequiresActionEventNotification", + ), + "v1.setup_intent.setup_failed": ( + "stripe.events._v1_setup_intent_setup_failed_event", + "V1SetupIntentSetupFailedEventNotification", + ), + "v1.setup_intent.succeeded": ( + "stripe.events._v1_setup_intent_succeeded_event", + "V1SetupIntentSucceededEventNotification", + ), + "v1.sigma.scheduled_query_run.created": ( + "stripe.events._v1_sigma_scheduled_query_run_created_event", + "V1SigmaScheduledQueryRunCreatedEventNotification", + ), + "v1.source.canceled": ( + "stripe.events._v1_source_canceled_event", + "V1SourceCanceledEventNotification", + ), + "v1.source.chargeable": ( + "stripe.events._v1_source_chargeable_event", + "V1SourceChargeableEventNotification", + ), + "v1.source.failed": ( + "stripe.events._v1_source_failed_event", + "V1SourceFailedEventNotification", + ), + "v1.source.refund_attributes_required": ( + "stripe.events._v1_source_refund_attributes_required_event", + "V1SourceRefundAttributesRequiredEventNotification", + ), + "v1.subscription_schedule.aborted": ( + "stripe.events._v1_subscription_schedule_aborted_event", + "V1SubscriptionScheduleAbortedEventNotification", + ), + "v1.subscription_schedule.canceled": ( + "stripe.events._v1_subscription_schedule_canceled_event", + "V1SubscriptionScheduleCanceledEventNotification", + ), + "v1.subscription_schedule.completed": ( + "stripe.events._v1_subscription_schedule_completed_event", + "V1SubscriptionScheduleCompletedEventNotification", + ), + "v1.subscription_schedule.created": ( + "stripe.events._v1_subscription_schedule_created_event", + "V1SubscriptionScheduleCreatedEventNotification", + ), + "v1.subscription_schedule.expiring": ( + "stripe.events._v1_subscription_schedule_expiring_event", + "V1SubscriptionScheduleExpiringEventNotification", + ), + "v1.subscription_schedule.released": ( + "stripe.events._v1_subscription_schedule_released_event", + "V1SubscriptionScheduleReleasedEventNotification", + ), + "v1.subscription_schedule.updated": ( + "stripe.events._v1_subscription_schedule_updated_event", + "V1SubscriptionScheduleUpdatedEventNotification", + ), + "v1.tax_rate.created": ( + "stripe.events._v1_tax_rate_created_event", + "V1TaxRateCreatedEventNotification", + ), + "v1.tax_rate.updated": ( + "stripe.events._v1_tax_rate_updated_event", + "V1TaxRateUpdatedEventNotification", + ), + "v1.tax.settings.updated": ( + "stripe.events._v1_tax_settings_updated_event", + "V1TaxSettingsUpdatedEventNotification", + ), + "v1.terminal.reader.action_failed": ( + "stripe.events._v1_terminal_reader_action_failed_event", + "V1TerminalReaderActionFailedEventNotification", + ), + "v1.terminal.reader.action_succeeded": ( + "stripe.events._v1_terminal_reader_action_succeeded_event", + "V1TerminalReaderActionSucceededEventNotification", + ), + "v1.terminal.reader.action_updated": ( + "stripe.events._v1_terminal_reader_action_updated_event", + "V1TerminalReaderActionUpdatedEventNotification", + ), + "v1.test_helpers.test_clock.advancing": ( + "stripe.events._v1_test_helpers_test_clock_advancing_event", + "V1TestHelpersTestClockAdvancingEventNotification", + ), + "v1.test_helpers.test_clock.created": ( + "stripe.events._v1_test_helpers_test_clock_created_event", + "V1TestHelpersTestClockCreatedEventNotification", + ), + "v1.test_helpers.test_clock.deleted": ( + "stripe.events._v1_test_helpers_test_clock_deleted_event", + "V1TestHelpersTestClockDeletedEventNotification", + ), + "v1.test_helpers.test_clock.internal_failure": ( + "stripe.events._v1_test_helpers_test_clock_internal_failure_event", + "V1TestHelpersTestClockInternalFailureEventNotification", + ), + "v1.test_helpers.test_clock.ready": ( + "stripe.events._v1_test_helpers_test_clock_ready_event", + "V1TestHelpersTestClockReadyEventNotification", + ), + "v1.topup.canceled": ( + "stripe.events._v1_topup_canceled_event", + "V1TopupCanceledEventNotification", + ), + "v1.topup.created": ( + "stripe.events._v1_topup_created_event", + "V1TopupCreatedEventNotification", + ), + "v1.topup.failed": ( + "stripe.events._v1_topup_failed_event", + "V1TopupFailedEventNotification", + ), + "v1.topup.reversed": ( + "stripe.events._v1_topup_reversed_event", + "V1TopupReversedEventNotification", + ), + "v1.topup.succeeded": ( + "stripe.events._v1_topup_succeeded_event", + "V1TopupSucceededEventNotification", + ), + "v1.transfer.created": ( + "stripe.events._v1_transfer_created_event", + "V1TransferCreatedEventNotification", + ), + "v1.transfer.reversed": ( + "stripe.events._v1_transfer_reversed_event", + "V1TransferReversedEventNotification", + ), + "v1.transfer.updated": ( + "stripe.events._v1_transfer_updated_event", + "V1TransferUpdatedEventNotification", + ), "v2.commerce.product_catalog.imports.failed": ( "stripe.events._v2_commerce_product_catalog_imports_failed_event", "V2CommerceProductCatalogImportsFailedEventNotification", @@ -304,8 +2680,224 @@ def get_v2_event_notification_class(type_: str): ALL_EVENT_NOTIFICATIONS = Union[ + "V1AccountApplicationAuthorizedEventNotification", + "V1AccountApplicationDeauthorizedEventNotification", + "V1AccountExternalAccountCreatedEventNotification", + "V1AccountExternalAccountDeletedEventNotification", + "V1AccountExternalAccountUpdatedEventNotification", + "V1AccountUpdatedEventNotification", + "V1ApplicationFeeCreatedEventNotification", + "V1ApplicationFeeRefundedEventNotification", + "V1ApplicationFeeRefundUpdatedEventNotification", + "V1BalanceAvailableEventNotification", + "V1BalanceSettingsUpdatedEventNotification", + "V1BillingAlertTriggeredEventNotification", + "V1BillingCreditBalanceTransactionCreatedEventNotification", + "V1BillingCreditGrantCreatedEventNotification", + "V1BillingCreditGrantUpdatedEventNotification", + "V1BillingMeterCreatedEventNotification", + "V1BillingMeterDeactivatedEventNotification", "V1BillingMeterErrorReportTriggeredEventNotification", "V1BillingMeterNoMeterFoundEventNotification", + "V1BillingMeterReactivatedEventNotification", + "V1BillingMeterUpdatedEventNotification", + "V1BillingPortalConfigurationCreatedEventNotification", + "V1BillingPortalConfigurationUpdatedEventNotification", + "V1BillingPortalSessionCreatedEventNotification", + "V1CapabilityUpdatedEventNotification", + "V1CashBalanceFundsAvailableEventNotification", + "V1ChargeCapturedEventNotification", + "V1ChargeDisputeClosedEventNotification", + "V1ChargeDisputeCreatedEventNotification", + "V1ChargeDisputeFundsReinstatedEventNotification", + "V1ChargeDisputeFundsWithdrawnEventNotification", + "V1ChargeDisputeUpdatedEventNotification", + "V1ChargeExpiredEventNotification", + "V1ChargeFailedEventNotification", + "V1ChargePendingEventNotification", + "V1ChargeRefundedEventNotification", + "V1ChargeRefundUpdatedEventNotification", + "V1ChargeSucceededEventNotification", + "V1ChargeUpdatedEventNotification", + "V1CheckoutSessionAsyncPaymentFailedEventNotification", + "V1CheckoutSessionAsyncPaymentSucceededEventNotification", + "V1CheckoutSessionCompletedEventNotification", + "V1CheckoutSessionExpiredEventNotification", + "V1ClimateOrderCanceledEventNotification", + "V1ClimateOrderCreatedEventNotification", + "V1ClimateOrderDelayedEventNotification", + "V1ClimateOrderDeliveredEventNotification", + "V1ClimateOrderProductSubstitutedEventNotification", + "V1ClimateProductCreatedEventNotification", + "V1ClimateProductPricingUpdatedEventNotification", + "V1CouponCreatedEventNotification", + "V1CouponDeletedEventNotification", + "V1CouponUpdatedEventNotification", + "V1CreditNoteCreatedEventNotification", + "V1CreditNoteUpdatedEventNotification", + "V1CreditNoteVoidedEventNotification", + "V1CustomerCashBalanceTransactionCreatedEventNotification", + "V1CustomerCreatedEventNotification", + "V1CustomerDeletedEventNotification", + "V1CustomerDiscountCreatedEventNotification", + "V1CustomerDiscountDeletedEventNotification", + "V1CustomerDiscountUpdatedEventNotification", + "V1CustomerSubscriptionCreatedEventNotification", + "V1CustomerSubscriptionDeletedEventNotification", + "V1CustomerSubscriptionPausedEventNotification", + "V1CustomerSubscriptionPendingUpdateAppliedEventNotification", + "V1CustomerSubscriptionPendingUpdateExpiredEventNotification", + "V1CustomerSubscriptionResumedEventNotification", + "V1CustomerSubscriptionTrialWillEndEventNotification", + "V1CustomerSubscriptionUpdatedEventNotification", + "V1CustomerTaxIdCreatedEventNotification", + "V1CustomerTaxIdDeletedEventNotification", + "V1CustomerTaxIdUpdatedEventNotification", + "V1CustomerUpdatedEventNotification", + "V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification", + "V1FileCreatedEventNotification", + "V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification", + "V1FinancialConnectionsAccountCreatedEventNotification", + "V1FinancialConnectionsAccountDeactivatedEventNotification", + "V1FinancialConnectionsAccountDisconnectedEventNotification", + "V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification", + "V1FinancialConnectionsAccountReactivatedEventNotification", + "V1FinancialConnectionsAccountRefreshedBalanceEventNotification", + "V1FinancialConnectionsAccountRefreshedOwnershipEventNotification", + "V1FinancialConnectionsAccountRefreshedTransactionsEventNotification", + "V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification", + "V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification", + "V1FinancialConnectionsAccountUpcomingDeactivationEventNotification", + "V1IdentityVerificationSessionCanceledEventNotification", + "V1IdentityVerificationSessionCreatedEventNotification", + "V1IdentityVerificationSessionProcessingEventNotification", + "V1IdentityVerificationSessionRedactedEventNotification", + "V1IdentityVerificationSessionRequiresInputEventNotification", + "V1IdentityVerificationSessionVerifiedEventNotification", + "V1InvoiceCreatedEventNotification", + "V1InvoiceDeletedEventNotification", + "V1InvoiceFinalizationFailedEventNotification", + "V1InvoiceFinalizedEventNotification", + "V1InvoiceitemCreatedEventNotification", + "V1InvoiceitemDeletedEventNotification", + "V1InvoiceMarkedUncollectibleEventNotification", + "V1InvoiceOverdueEventNotification", + "V1InvoiceOverpaidEventNotification", + "V1InvoicePaidEventNotification", + "V1InvoicePaymentActionRequiredEventNotification", + "V1InvoicePaymentAttemptRequiredEventNotification", + "V1InvoicePaymentFailedEventNotification", + "V1InvoicePaymentPaidEventNotification", + "V1InvoicePaymentSucceededEventNotification", + "V1InvoiceSentEventNotification", + "V1InvoiceUpcomingEventNotification", + "V1InvoiceUpdatedEventNotification", + "V1InvoiceVoidedEventNotification", + "V1InvoiceWillBeDueEventNotification", + "V1IssuingAuthorizationCreatedEventNotification", + "V1IssuingAuthorizationRequestEventNotification", + "V1IssuingAuthorizationUpdatedEventNotification", + "V1IssuingCardCreatedEventNotification", + "V1IssuingCardholderCreatedEventNotification", + "V1IssuingCardholderUpdatedEventNotification", + "V1IssuingCardUpdatedEventNotification", + "V1IssuingDisputeClosedEventNotification", + "V1IssuingDisputeCreatedEventNotification", + "V1IssuingDisputeFundsReinstatedEventNotification", + "V1IssuingDisputeFundsRescindedEventNotification", + "V1IssuingDisputeSubmittedEventNotification", + "V1IssuingDisputeUpdatedEventNotification", + "V1IssuingPersonalizationDesignActivatedEventNotification", + "V1IssuingPersonalizationDesignDeactivatedEventNotification", + "V1IssuingPersonalizationDesignRejectedEventNotification", + "V1IssuingPersonalizationDesignUpdatedEventNotification", + "V1IssuingTokenCreatedEventNotification", + "V1IssuingTokenUpdatedEventNotification", + "V1IssuingTransactionCreatedEventNotification", + "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification", + "V1IssuingTransactionUpdatedEventNotification", + "V1MandateUpdatedEventNotification", + "V1PaymentIntentAmountCapturableUpdatedEventNotification", + "V1PaymentIntentCanceledEventNotification", + "V1PaymentIntentCreatedEventNotification", + "V1PaymentIntentPartiallyFundedEventNotification", + "V1PaymentIntentPaymentFailedEventNotification", + "V1PaymentIntentProcessingEventNotification", + "V1PaymentIntentRequiresActionEventNotification", + "V1PaymentIntentSucceededEventNotification", + "V1PaymentLinkCreatedEventNotification", + "V1PaymentLinkUpdatedEventNotification", + "V1PaymentMethodAttachedEventNotification", + "V1PaymentMethodAutomaticallyUpdatedEventNotification", + "V1PaymentMethodDetachedEventNotification", + "V1PaymentMethodUpdatedEventNotification", + "V1PayoutCanceledEventNotification", + "V1PayoutCreatedEventNotification", + "V1PayoutFailedEventNotification", + "V1PayoutPaidEventNotification", + "V1PayoutReconciliationCompletedEventNotification", + "V1PayoutUpdatedEventNotification", + "V1PersonCreatedEventNotification", + "V1PersonDeletedEventNotification", + "V1PersonUpdatedEventNotification", + "V1PlanCreatedEventNotification", + "V1PlanDeletedEventNotification", + "V1PlanUpdatedEventNotification", + "V1PriceCreatedEventNotification", + "V1PriceDeletedEventNotification", + "V1PriceUpdatedEventNotification", + "V1ProductCreatedEventNotification", + "V1ProductDeletedEventNotification", + "V1ProductUpdatedEventNotification", + "V1PromotionCodeCreatedEventNotification", + "V1PromotionCodeUpdatedEventNotification", + "V1QuoteAcceptedEventNotification", + "V1QuoteCanceledEventNotification", + "V1QuoteCreatedEventNotification", + "V1QuoteFinalizedEventNotification", + "V1RadarEarlyFraudWarningCreatedEventNotification", + "V1RadarEarlyFraudWarningUpdatedEventNotification", + "V1RefundCreatedEventNotification", + "V1RefundFailedEventNotification", + "V1RefundUpdatedEventNotification", + "V1ReviewClosedEventNotification", + "V1ReviewOpenedEventNotification", + "V1SetupIntentCanceledEventNotification", + "V1SetupIntentCreatedEventNotification", + "V1SetupIntentRequiresActionEventNotification", + "V1SetupIntentSetupFailedEventNotification", + "V1SetupIntentSucceededEventNotification", + "V1SigmaScheduledQueryRunCreatedEventNotification", + "V1SourceCanceledEventNotification", + "V1SourceChargeableEventNotification", + "V1SourceFailedEventNotification", + "V1SourceRefundAttributesRequiredEventNotification", + "V1SubscriptionScheduleAbortedEventNotification", + "V1SubscriptionScheduleCanceledEventNotification", + "V1SubscriptionScheduleCompletedEventNotification", + "V1SubscriptionScheduleCreatedEventNotification", + "V1SubscriptionScheduleExpiringEventNotification", + "V1SubscriptionScheduleReleasedEventNotification", + "V1SubscriptionScheduleUpdatedEventNotification", + "V1TaxRateCreatedEventNotification", + "V1TaxRateUpdatedEventNotification", + "V1TaxSettingsUpdatedEventNotification", + "V1TerminalReaderActionFailedEventNotification", + "V1TerminalReaderActionSucceededEventNotification", + "V1TerminalReaderActionUpdatedEventNotification", + "V1TestHelpersTestClockAdvancingEventNotification", + "V1TestHelpersTestClockCreatedEventNotification", + "V1TestHelpersTestClockDeletedEventNotification", + "V1TestHelpersTestClockInternalFailureEventNotification", + "V1TestHelpersTestClockReadyEventNotification", + "V1TopupCanceledEventNotification", + "V1TopupCreatedEventNotification", + "V1TopupFailedEventNotification", + "V1TopupReversedEventNotification", + "V1TopupSucceededEventNotification", + "V1TransferCreatedEventNotification", + "V1TransferReversedEventNotification", + "V1TransferUpdatedEventNotification", "V2CommerceProductCatalogImportsFailedEventNotification", "V2CommerceProductCatalogImportsProcessingEventNotification", "V2CommerceProductCatalogImportsSucceededEventNotification", diff --git a/stripe/events/_v1_account_application_authorized_event.py b/stripe/events/_v1_account_application_authorized_event.py new file mode 100644 index 000000000..c261c229b --- /dev/null +++ b/stripe/events/_v1_account_application_authorized_event.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2.core._event import Event, EventNotification +from typing import cast +from typing_extensions import Literal, override + + +class V1AccountApplicationAuthorizedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.account.application.authorized" + type: Literal["v1.account.application.authorized"] + + @override + def fetch_event(self) -> "V1AccountApplicationAuthorizedEvent": + return cast( + "V1AccountApplicationAuthorizedEvent", + super().fetch_event(), + ) + + @override + async def fetch_event_async(self) -> "V1AccountApplicationAuthorizedEvent": + return cast( + "V1AccountApplicationAuthorizedEvent", + await super().fetch_event_async(), + ) + + +class V1AccountApplicationAuthorizedEvent(Event): + LOOKUP_TYPE = "v1.account.application.authorized" + type: Literal["v1.account.application.authorized"] diff --git a/stripe/events/_v1_account_application_deauthorized_event.py b/stripe/events/_v1_account_application_deauthorized_event.py new file mode 100644 index 000000000..1f9400eb5 --- /dev/null +++ b/stripe/events/_v1_account_application_deauthorized_event.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2.core._event import Event, EventNotification +from typing import cast +from typing_extensions import Literal, override + + +class V1AccountApplicationDeauthorizedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.account.application.deauthorized" + type: Literal["v1.account.application.deauthorized"] + + @override + def fetch_event(self) -> "V1AccountApplicationDeauthorizedEvent": + return cast( + "V1AccountApplicationDeauthorizedEvent", + super().fetch_event(), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1AccountApplicationDeauthorizedEvent": + return cast( + "V1AccountApplicationDeauthorizedEvent", + await super().fetch_event_async(), + ) + + +class V1AccountApplicationDeauthorizedEvent(Event): + LOOKUP_TYPE = "v1.account.application.deauthorized" + type: Literal["v1.account.application.deauthorized"] diff --git a/stripe/events/_v1_account_external_account_created_event.py b/stripe/events/_v1_account_external_account_created_event.py new file mode 100644 index 000000000..ccfe8fcef --- /dev/null +++ b/stripe/events/_v1_account_external_account_created_event.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2.core._event import Event, EventNotification +from typing import cast +from typing_extensions import Literal, override + + +class V1AccountExternalAccountCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.account.external_account.created" + type: Literal["v1.account.external_account.created"] + + @override + def fetch_event(self) -> "V1AccountExternalAccountCreatedEvent": + return cast( + "V1AccountExternalAccountCreatedEvent", + super().fetch_event(), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1AccountExternalAccountCreatedEvent": + return cast( + "V1AccountExternalAccountCreatedEvent", + await super().fetch_event_async(), + ) + + +class V1AccountExternalAccountCreatedEvent(Event): + LOOKUP_TYPE = "v1.account.external_account.created" + type: Literal["v1.account.external_account.created"] diff --git a/stripe/events/_v1_account_external_account_deleted_event.py b/stripe/events/_v1_account_external_account_deleted_event.py new file mode 100644 index 000000000..c91f46bbf --- /dev/null +++ b/stripe/events/_v1_account_external_account_deleted_event.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2.core._event import Event, EventNotification +from typing import cast +from typing_extensions import Literal, override + + +class V1AccountExternalAccountDeletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.account.external_account.deleted" + type: Literal["v1.account.external_account.deleted"] + + @override + def fetch_event(self) -> "V1AccountExternalAccountDeletedEvent": + return cast( + "V1AccountExternalAccountDeletedEvent", + super().fetch_event(), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1AccountExternalAccountDeletedEvent": + return cast( + "V1AccountExternalAccountDeletedEvent", + await super().fetch_event_async(), + ) + + +class V1AccountExternalAccountDeletedEvent(Event): + LOOKUP_TYPE = "v1.account.external_account.deleted" + type: Literal["v1.account.external_account.deleted"] diff --git a/stripe/events/_v1_account_external_account_updated_event.py b/stripe/events/_v1_account_external_account_updated_event.py new file mode 100644 index 000000000..d8e2b85e6 --- /dev/null +++ b/stripe/events/_v1_account_external_account_updated_event.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2.core._event import Event, EventNotification +from typing import cast +from typing_extensions import Literal, override + + +class V1AccountExternalAccountUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.account.external_account.updated" + type: Literal["v1.account.external_account.updated"] + + @override + def fetch_event(self) -> "V1AccountExternalAccountUpdatedEvent": + return cast( + "V1AccountExternalAccountUpdatedEvent", + super().fetch_event(), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1AccountExternalAccountUpdatedEvent": + return cast( + "V1AccountExternalAccountUpdatedEvent", + await super().fetch_event_async(), + ) + + +class V1AccountExternalAccountUpdatedEvent(Event): + LOOKUP_TYPE = "v1.account.external_account.updated" + type: Literal["v1.account.external_account.updated"] diff --git a/stripe/events/_v1_account_updated_event.py b/stripe/events/_v1_account_updated_event.py new file mode 100644 index 000000000..e9b758deb --- /dev/null +++ b/stripe/events/_v1_account_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._account import Account + from stripe._stripe_client import StripeClient + + +class V1AccountUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.account.updated" + type: Literal["v1.account.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) -> "V1AccountUpdatedEvent": + return cast( + "V1AccountUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1AccountUpdatedEvent": + return cast( + "V1AccountUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1AccountUpdatedEvent(Event): + LOOKUP_TYPE = "v1.account.updated" + type: Literal["v1.account.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) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + 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/_v1_application_fee_created_event.py b/stripe/events/_v1_application_fee_created_event.py new file mode 100644 index 000000000..59f308009 --- /dev/null +++ b/stripe/events/_v1_application_fee_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._application_fee import ApplicationFee + from stripe._stripe_client import StripeClient + + +class V1ApplicationFeeCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.application_fee.created" + type: Literal["v1.application_fee.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) -> "V1ApplicationFeeCreatedEvent": + return cast( + "V1ApplicationFeeCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ApplicationFee": + 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( + "ApplicationFee", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ApplicationFeeCreatedEvent": + return cast( + "V1ApplicationFeeCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ApplicationFee": + 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( + "ApplicationFee", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ApplicationFeeCreatedEvent(Event): + LOOKUP_TYPE = "v1.application_fee.created" + type: Literal["v1.application_fee.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) -> "ApplicationFee": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ApplicationFee", + 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/_v1_application_fee_refund_updated_event.py b/stripe/events/_v1_application_fee_refund_updated_event.py new file mode 100644 index 000000000..36386edf1 --- /dev/null +++ b/stripe/events/_v1_application_fee_refund_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._application_fee_refund import ApplicationFeeRefund + from stripe._stripe_client import StripeClient + + +class V1ApplicationFeeRefundUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.application_fee.refund.updated" + type: Literal["v1.application_fee.refund.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) -> "V1ApplicationFeeRefundUpdatedEvent": + return cast( + "V1ApplicationFeeRefundUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ApplicationFeeRefund": + 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( + "ApplicationFeeRefund", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ApplicationFeeRefundUpdatedEvent": + return cast( + "V1ApplicationFeeRefundUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ApplicationFeeRefund": + 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( + "ApplicationFeeRefund", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ApplicationFeeRefundUpdatedEvent(Event): + LOOKUP_TYPE = "v1.application_fee.refund.updated" + type: Literal["v1.application_fee.refund.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) -> "ApplicationFeeRefund": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ApplicationFeeRefund", + 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/_v1_application_fee_refunded_event.py b/stripe/events/_v1_application_fee_refunded_event.py new file mode 100644 index 000000000..21a06e71c --- /dev/null +++ b/stripe/events/_v1_application_fee_refunded_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._application_fee import ApplicationFee + from stripe._stripe_client import StripeClient + + +class V1ApplicationFeeRefundedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.application_fee.refunded" + type: Literal["v1.application_fee.refunded"] + 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) -> "V1ApplicationFeeRefundedEvent": + return cast( + "V1ApplicationFeeRefundedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ApplicationFee": + 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( + "ApplicationFee", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ApplicationFeeRefundedEvent": + return cast( + "V1ApplicationFeeRefundedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ApplicationFee": + 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( + "ApplicationFee", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ApplicationFeeRefundedEvent(Event): + LOOKUP_TYPE = "v1.application_fee.refunded" + type: Literal["v1.application_fee.refunded"] + + 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) -> "ApplicationFee": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ApplicationFee", + 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/_v1_balance_available_event.py b/stripe/events/_v1_balance_available_event.py new file mode 100644 index 000000000..25a02c409 --- /dev/null +++ b/stripe/events/_v1_balance_available_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import ( + Event, + EventNotification, + RelatedSingletonObject, +) +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._balance import Balance + from stripe._stripe_client import StripeClient + + +class V1BalanceAvailableEventNotification(EventNotification): + LOOKUP_TYPE = "v1.balance.available" + type: Literal["v1.balance.available"] + related_object: RelatedSingletonObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedSingletonObject( + parsed_body["related_object"], + ) + + @override + def fetch_event(self) -> "V1BalanceAvailableEvent": + return cast( + "V1BalanceAvailableEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Balance": + 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( + "Balance", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1BalanceAvailableEvent": + return cast( + "V1BalanceAvailableEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Balance": + 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( + "Balance", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1BalanceAvailableEvent(Event): + LOOKUP_TYPE = "v1.balance.available" + type: Literal["v1.balance.available"] + + class RelatedSingletonObject(StripeObject): + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedSingletonObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Balance": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Balance", + 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/_v1_balance_settings_updated_event.py b/stripe/events/_v1_balance_settings_updated_event.py new file mode 100644 index 000000000..6fedefec6 --- /dev/null +++ b/stripe/events/_v1_balance_settings_updated_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import ( + Event, + EventNotification, + RelatedSingletonObject, +) +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._balance_settings import BalanceSettings + from stripe._stripe_client import StripeClient + + +class V1BalanceSettingsUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.balance_settings.updated" + type: Literal["v1.balance_settings.updated"] + related_object: RelatedSingletonObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedSingletonObject( + parsed_body["related_object"], + ) + + @override + def fetch_event(self) -> "V1BalanceSettingsUpdatedEvent": + return cast( + "V1BalanceSettingsUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "BalanceSettings": + 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( + "BalanceSettings", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1BalanceSettingsUpdatedEvent": + return cast( + "V1BalanceSettingsUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "BalanceSettings": + 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( + "BalanceSettings", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1BalanceSettingsUpdatedEvent(Event): + LOOKUP_TYPE = "v1.balance_settings.updated" + type: Literal["v1.balance_settings.updated"] + + class RelatedSingletonObject(StripeObject): + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedSingletonObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "BalanceSettings": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "BalanceSettings", + 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/_v1_billing_alert_triggered_event.py b/stripe/events/_v1_billing_alert_triggered_event.py new file mode 100644 index 000000000..4630da4b6 --- /dev/null +++ b/stripe/events/_v1_billing_alert_triggered_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.billing._alert import Alert + + +class V1BillingAlertTriggeredEventNotification(EventNotification): + LOOKUP_TYPE = "v1.billing.alert.triggered" + type: Literal["v1.billing.alert.triggered"] + 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) -> "V1BillingAlertTriggeredEvent": + return cast( + "V1BillingAlertTriggeredEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Alert": + 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( + "Alert", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1BillingAlertTriggeredEvent": + return cast( + "V1BillingAlertTriggeredEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Alert": + 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( + "Alert", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1BillingAlertTriggeredEvent(Event): + LOOKUP_TYPE = "v1.billing.alert.triggered" + type: Literal["v1.billing.alert.triggered"] + + 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) -> "Alert": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Alert", + 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/_v1_billing_credit_balance_transaction_created_event.py b/stripe/events/_v1_billing_credit_balance_transaction_created_event.py new file mode 100644 index 000000000..7ad8227e4 --- /dev/null +++ b/stripe/events/_v1_billing_credit_balance_transaction_created_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.billing._credit_balance_transaction import ( + CreditBalanceTransaction, + ) + + +class V1BillingCreditBalanceTransactionCreatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.billing.credit_balance_transaction.created" + type: Literal["v1.billing.credit_balance_transaction.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) -> "V1BillingCreditBalanceTransactionCreatedEvent": + return cast( + "V1BillingCreditBalanceTransactionCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "CreditBalanceTransaction": + 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( + "CreditBalanceTransaction", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1BillingCreditBalanceTransactionCreatedEvent": + return cast( + "V1BillingCreditBalanceTransactionCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "CreditBalanceTransaction": + 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( + "CreditBalanceTransaction", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1BillingCreditBalanceTransactionCreatedEvent(Event): + LOOKUP_TYPE = "v1.billing.credit_balance_transaction.created" + type: Literal["v1.billing.credit_balance_transaction.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) -> "CreditBalanceTransaction": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "CreditBalanceTransaction", + 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/_v1_billing_credit_grant_created_event.py b/stripe/events/_v1_billing_credit_grant_created_event.py new file mode 100644 index 000000000..26c0a675a --- /dev/null +++ b/stripe/events/_v1_billing_credit_grant_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.billing._credit_grant import CreditGrant + + +class V1BillingCreditGrantCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.billing.credit_grant.created" + type: Literal["v1.billing.credit_grant.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) -> "V1BillingCreditGrantCreatedEvent": + return cast( + "V1BillingCreditGrantCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "CreditGrant": + 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( + "CreditGrant", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1BillingCreditGrantCreatedEvent": + return cast( + "V1BillingCreditGrantCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "CreditGrant": + 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( + "CreditGrant", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1BillingCreditGrantCreatedEvent(Event): + LOOKUP_TYPE = "v1.billing.credit_grant.created" + type: Literal["v1.billing.credit_grant.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) -> "CreditGrant": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "CreditGrant", + 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/_v1_billing_credit_grant_updated_event.py b/stripe/events/_v1_billing_credit_grant_updated_event.py new file mode 100644 index 000000000..c90e4a904 --- /dev/null +++ b/stripe/events/_v1_billing_credit_grant_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.billing._credit_grant import CreditGrant + + +class V1BillingCreditGrantUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.billing.credit_grant.updated" + type: Literal["v1.billing.credit_grant.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) -> "V1BillingCreditGrantUpdatedEvent": + return cast( + "V1BillingCreditGrantUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "CreditGrant": + 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( + "CreditGrant", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1BillingCreditGrantUpdatedEvent": + return cast( + "V1BillingCreditGrantUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "CreditGrant": + 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( + "CreditGrant", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1BillingCreditGrantUpdatedEvent(Event): + LOOKUP_TYPE = "v1.billing.credit_grant.updated" + type: Literal["v1.billing.credit_grant.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) -> "CreditGrant": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "CreditGrant", + 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/_v1_billing_meter_created_event.py b/stripe/events/_v1_billing_meter_created_event.py new file mode 100644 index 000000000..0dd217593 --- /dev/null +++ b/stripe/events/_v1_billing_meter_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.billing._meter import Meter + + +class V1BillingMeterCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.billing.meter.created" + type: Literal["v1.billing.meter.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) -> "V1BillingMeterCreatedEvent": + return cast( + "V1BillingMeterCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Meter": + 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( + "Meter", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1BillingMeterCreatedEvent": + return cast( + "V1BillingMeterCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Meter": + 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( + "Meter", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1BillingMeterCreatedEvent(Event): + LOOKUP_TYPE = "v1.billing.meter.created" + type: Literal["v1.billing.meter.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) -> "Meter": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Meter", + 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/_v1_billing_meter_deactivated_event.py b/stripe/events/_v1_billing_meter_deactivated_event.py new file mode 100644 index 000000000..0f0a6e590 --- /dev/null +++ b/stripe/events/_v1_billing_meter_deactivated_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.billing._meter import Meter + + +class V1BillingMeterDeactivatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.billing.meter.deactivated" + type: Literal["v1.billing.meter.deactivated"] + 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) -> "V1BillingMeterDeactivatedEvent": + return cast( + "V1BillingMeterDeactivatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Meter": + 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( + "Meter", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1BillingMeterDeactivatedEvent": + return cast( + "V1BillingMeterDeactivatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Meter": + 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( + "Meter", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1BillingMeterDeactivatedEvent(Event): + LOOKUP_TYPE = "v1.billing.meter.deactivated" + type: Literal["v1.billing.meter.deactivated"] + + 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) -> "Meter": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Meter", + 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/_v1_billing_meter_reactivated_event.py b/stripe/events/_v1_billing_meter_reactivated_event.py new file mode 100644 index 000000000..918ea484b --- /dev/null +++ b/stripe/events/_v1_billing_meter_reactivated_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.billing._meter import Meter + + +class V1BillingMeterReactivatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.billing.meter.reactivated" + type: Literal["v1.billing.meter.reactivated"] + 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) -> "V1BillingMeterReactivatedEvent": + return cast( + "V1BillingMeterReactivatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Meter": + 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( + "Meter", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1BillingMeterReactivatedEvent": + return cast( + "V1BillingMeterReactivatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Meter": + 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( + "Meter", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1BillingMeterReactivatedEvent(Event): + LOOKUP_TYPE = "v1.billing.meter.reactivated" + type: Literal["v1.billing.meter.reactivated"] + + 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) -> "Meter": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Meter", + 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/_v1_billing_meter_updated_event.py b/stripe/events/_v1_billing_meter_updated_event.py new file mode 100644 index 000000000..f37b84db0 --- /dev/null +++ b/stripe/events/_v1_billing_meter_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.billing._meter import Meter + + +class V1BillingMeterUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.billing.meter.updated" + type: Literal["v1.billing.meter.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) -> "V1BillingMeterUpdatedEvent": + return cast( + "V1BillingMeterUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Meter": + 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( + "Meter", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1BillingMeterUpdatedEvent": + return cast( + "V1BillingMeterUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Meter": + 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( + "Meter", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1BillingMeterUpdatedEvent(Event): + LOOKUP_TYPE = "v1.billing.meter.updated" + type: Literal["v1.billing.meter.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) -> "Meter": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Meter", + 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/_v1_billing_portal_configuration_created_event.py b/stripe/events/_v1_billing_portal_configuration_created_event.py new file mode 100644 index 000000000..5683269b9 --- /dev/null +++ b/stripe/events/_v1_billing_portal_configuration_created_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.billing_portal._configuration import Configuration + + +class V1BillingPortalConfigurationCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.billing_portal.configuration.created" + type: Literal["v1.billing_portal.configuration.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) -> "V1BillingPortalConfigurationCreatedEvent": + return cast( + "V1BillingPortalConfigurationCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Configuration": + 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( + "Configuration", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1BillingPortalConfigurationCreatedEvent": + return cast( + "V1BillingPortalConfigurationCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Configuration": + 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( + "Configuration", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1BillingPortalConfigurationCreatedEvent(Event): + LOOKUP_TYPE = "v1.billing_portal.configuration.created" + type: Literal["v1.billing_portal.configuration.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) -> "Configuration": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Configuration", + 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/_v1_billing_portal_configuration_updated_event.py b/stripe/events/_v1_billing_portal_configuration_updated_event.py new file mode 100644 index 000000000..2fb47f4b2 --- /dev/null +++ b/stripe/events/_v1_billing_portal_configuration_updated_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.billing_portal._configuration import Configuration + + +class V1BillingPortalConfigurationUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.billing_portal.configuration.updated" + type: Literal["v1.billing_portal.configuration.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) -> "V1BillingPortalConfigurationUpdatedEvent": + return cast( + "V1BillingPortalConfigurationUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Configuration": + 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( + "Configuration", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1BillingPortalConfigurationUpdatedEvent": + return cast( + "V1BillingPortalConfigurationUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Configuration": + 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( + "Configuration", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1BillingPortalConfigurationUpdatedEvent(Event): + LOOKUP_TYPE = "v1.billing_portal.configuration.updated" + type: Literal["v1.billing_portal.configuration.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) -> "Configuration": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Configuration", + 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/_v1_billing_portal_session_created_event.py b/stripe/events/_v1_billing_portal_session_created_event.py new file mode 100644 index 000000000..d03a79c70 --- /dev/null +++ b/stripe/events/_v1_billing_portal_session_created_event.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2.core._event import Event, EventNotification +from typing import cast +from typing_extensions import Literal, override + + +class V1BillingPortalSessionCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.billing_portal.session.created" + type: Literal["v1.billing_portal.session.created"] + + @override + def fetch_event(self) -> "V1BillingPortalSessionCreatedEvent": + return cast( + "V1BillingPortalSessionCreatedEvent", + super().fetch_event(), + ) + + @override + async def fetch_event_async(self) -> "V1BillingPortalSessionCreatedEvent": + return cast( + "V1BillingPortalSessionCreatedEvent", + await super().fetch_event_async(), + ) + + +class V1BillingPortalSessionCreatedEvent(Event): + LOOKUP_TYPE = "v1.billing_portal.session.created" + type: Literal["v1.billing_portal.session.created"] diff --git a/stripe/events/_v1_capability_updated_event.py b/stripe/events/_v1_capability_updated_event.py new file mode 100644 index 000000000..c11d10421 --- /dev/null +++ b/stripe/events/_v1_capability_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._capability import Capability + from stripe._stripe_client import StripeClient + + +class V1CapabilityUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.capability.updated" + type: Literal["v1.capability.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) -> "V1CapabilityUpdatedEvent": + return cast( + "V1CapabilityUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Capability": + 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( + "Capability", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CapabilityUpdatedEvent": + return cast( + "V1CapabilityUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Capability": + 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( + "Capability", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CapabilityUpdatedEvent(Event): + LOOKUP_TYPE = "v1.capability.updated" + type: Literal["v1.capability.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) -> "Capability": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Capability", + 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/_v1_cash_balance_funds_available_event.py b/stripe/events/_v1_cash_balance_funds_available_event.py new file mode 100644 index 000000000..3b44243db --- /dev/null +++ b/stripe/events/_v1_cash_balance_funds_available_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import ( + Event, + EventNotification, + RelatedSingletonObject, +) +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._cash_balance import CashBalance + from stripe._stripe_client import StripeClient + + +class V1CashBalanceFundsAvailableEventNotification(EventNotification): + LOOKUP_TYPE = "v1.cash_balance.funds_available" + type: Literal["v1.cash_balance.funds_available"] + related_object: RelatedSingletonObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedSingletonObject( + parsed_body["related_object"], + ) + + @override + def fetch_event(self) -> "V1CashBalanceFundsAvailableEvent": + return cast( + "V1CashBalanceFundsAvailableEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "CashBalance": + 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( + "CashBalance", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CashBalanceFundsAvailableEvent": + return cast( + "V1CashBalanceFundsAvailableEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "CashBalance": + 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( + "CashBalance", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CashBalanceFundsAvailableEvent(Event): + LOOKUP_TYPE = "v1.cash_balance.funds_available" + type: Literal["v1.cash_balance.funds_available"] + + class RelatedSingletonObject(StripeObject): + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedSingletonObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "CashBalance": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "CashBalance", + 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/_v1_charge_captured_event.py b/stripe/events/_v1_charge_captured_event.py new file mode 100644 index 000000000..3f40d04b6 --- /dev/null +++ b/stripe/events/_v1_charge_captured_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._charge import Charge + from stripe._stripe_client import StripeClient + + +class V1ChargeCapturedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.charge.captured" + type: Literal["v1.charge.captured"] + 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) -> "V1ChargeCapturedEvent": + return cast( + "V1ChargeCapturedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Charge": + 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( + "Charge", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ChargeCapturedEvent": + return cast( + "V1ChargeCapturedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Charge": + 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( + "Charge", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ChargeCapturedEvent(Event): + LOOKUP_TYPE = "v1.charge.captured" + type: Literal["v1.charge.captured"] + + 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) -> "Charge": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Charge", + 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/_v1_charge_dispute_closed_event.py b/stripe/events/_v1_charge_dispute_closed_event.py new file mode 100644 index 000000000..3d0da2bcd --- /dev/null +++ b/stripe/events/_v1_charge_dispute_closed_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._dispute import Dispute + from stripe._stripe_client import StripeClient + + +class V1ChargeDisputeClosedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.charge.dispute.closed" + type: Literal["v1.charge.dispute.closed"] + 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) -> "V1ChargeDisputeClosedEvent": + return cast( + "V1ChargeDisputeClosedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ChargeDisputeClosedEvent": + return cast( + "V1ChargeDisputeClosedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ChargeDisputeClosedEvent(Event): + LOOKUP_TYPE = "v1.charge.dispute.closed" + type: Literal["v1.charge.dispute.closed"] + + 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) -> "Dispute": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Dispute", + 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/_v1_charge_dispute_created_event.py b/stripe/events/_v1_charge_dispute_created_event.py new file mode 100644 index 000000000..e7b109c95 --- /dev/null +++ b/stripe/events/_v1_charge_dispute_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._dispute import Dispute + from stripe._stripe_client import StripeClient + + +class V1ChargeDisputeCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.charge.dispute.created" + type: Literal["v1.charge.dispute.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) -> "V1ChargeDisputeCreatedEvent": + return cast( + "V1ChargeDisputeCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ChargeDisputeCreatedEvent": + return cast( + "V1ChargeDisputeCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ChargeDisputeCreatedEvent(Event): + LOOKUP_TYPE = "v1.charge.dispute.created" + type: Literal["v1.charge.dispute.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) -> "Dispute": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Dispute", + 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/_v1_charge_dispute_funds_reinstated_event.py b/stripe/events/_v1_charge_dispute_funds_reinstated_event.py new file mode 100644 index 000000000..31f9efb48 --- /dev/null +++ b/stripe/events/_v1_charge_dispute_funds_reinstated_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._dispute import Dispute + from stripe._stripe_client import StripeClient + + +class V1ChargeDisputeFundsReinstatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.charge.dispute.funds_reinstated" + type: Literal["v1.charge.dispute.funds_reinstated"] + 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) -> "V1ChargeDisputeFundsReinstatedEvent": + return cast( + "V1ChargeDisputeFundsReinstatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ChargeDisputeFundsReinstatedEvent": + return cast( + "V1ChargeDisputeFundsReinstatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ChargeDisputeFundsReinstatedEvent(Event): + LOOKUP_TYPE = "v1.charge.dispute.funds_reinstated" + type: Literal["v1.charge.dispute.funds_reinstated"] + + 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) -> "Dispute": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Dispute", + 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/_v1_charge_dispute_funds_withdrawn_event.py b/stripe/events/_v1_charge_dispute_funds_withdrawn_event.py new file mode 100644 index 000000000..ec6168ac3 --- /dev/null +++ b/stripe/events/_v1_charge_dispute_funds_withdrawn_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._dispute import Dispute + from stripe._stripe_client import StripeClient + + +class V1ChargeDisputeFundsWithdrawnEventNotification(EventNotification): + LOOKUP_TYPE = "v1.charge.dispute.funds_withdrawn" + type: Literal["v1.charge.dispute.funds_withdrawn"] + 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) -> "V1ChargeDisputeFundsWithdrawnEvent": + return cast( + "V1ChargeDisputeFundsWithdrawnEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ChargeDisputeFundsWithdrawnEvent": + return cast( + "V1ChargeDisputeFundsWithdrawnEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ChargeDisputeFundsWithdrawnEvent(Event): + LOOKUP_TYPE = "v1.charge.dispute.funds_withdrawn" + type: Literal["v1.charge.dispute.funds_withdrawn"] + + 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) -> "Dispute": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Dispute", + 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/_v1_charge_dispute_updated_event.py b/stripe/events/_v1_charge_dispute_updated_event.py new file mode 100644 index 000000000..95e09a433 --- /dev/null +++ b/stripe/events/_v1_charge_dispute_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._dispute import Dispute + from stripe._stripe_client import StripeClient + + +class V1ChargeDisputeUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.charge.dispute.updated" + type: Literal["v1.charge.dispute.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) -> "V1ChargeDisputeUpdatedEvent": + return cast( + "V1ChargeDisputeUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ChargeDisputeUpdatedEvent": + return cast( + "V1ChargeDisputeUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ChargeDisputeUpdatedEvent(Event): + LOOKUP_TYPE = "v1.charge.dispute.updated" + type: Literal["v1.charge.dispute.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) -> "Dispute": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Dispute", + 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/_v1_charge_expired_event.py b/stripe/events/_v1_charge_expired_event.py new file mode 100644 index 000000000..0e9b08a90 --- /dev/null +++ b/stripe/events/_v1_charge_expired_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._charge import Charge + from stripe._stripe_client import StripeClient + + +class V1ChargeExpiredEventNotification(EventNotification): + LOOKUP_TYPE = "v1.charge.expired" + type: Literal["v1.charge.expired"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1ChargeExpiredEvent": + return cast( + "V1ChargeExpiredEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Charge": + 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( + "Charge", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ChargeExpiredEvent": + return cast( + "V1ChargeExpiredEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Charge": + 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( + "Charge", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ChargeExpiredEvent(Event): + LOOKUP_TYPE = "v1.charge.expired" + type: Literal["v1.charge.expired"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Charge": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Charge", + 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/_v1_charge_failed_event.py b/stripe/events/_v1_charge_failed_event.py new file mode 100644 index 000000000..0aa91ea19 --- /dev/null +++ b/stripe/events/_v1_charge_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._charge import Charge + from stripe._stripe_client import StripeClient + + +class V1ChargeFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.charge.failed" + type: Literal["v1.charge.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) -> "V1ChargeFailedEvent": + return cast( + "V1ChargeFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Charge": + 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( + "Charge", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ChargeFailedEvent": + return cast( + "V1ChargeFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Charge": + 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( + "Charge", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ChargeFailedEvent(Event): + LOOKUP_TYPE = "v1.charge.failed" + type: Literal["v1.charge.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) -> "Charge": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Charge", + 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/_v1_charge_pending_event.py b/stripe/events/_v1_charge_pending_event.py new file mode 100644 index 000000000..03382cecb --- /dev/null +++ b/stripe/events/_v1_charge_pending_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._charge import Charge + from stripe._stripe_client import StripeClient + + +class V1ChargePendingEventNotification(EventNotification): + LOOKUP_TYPE = "v1.charge.pending" + type: Literal["v1.charge.pending"] + 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) -> "V1ChargePendingEvent": + return cast( + "V1ChargePendingEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Charge": + 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( + "Charge", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ChargePendingEvent": + return cast( + "V1ChargePendingEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Charge": + 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( + "Charge", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ChargePendingEvent(Event): + LOOKUP_TYPE = "v1.charge.pending" + type: Literal["v1.charge.pending"] + + 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) -> "Charge": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Charge", + 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/_v1_charge_refund_updated_event.py b/stripe/events/_v1_charge_refund_updated_event.py new file mode 100644 index 000000000..692732e39 --- /dev/null +++ b/stripe/events/_v1_charge_refund_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._refund import Refund + from stripe._stripe_client import StripeClient + + +class V1ChargeRefundUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.charge.refund.updated" + type: Literal["v1.charge.refund.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) -> "V1ChargeRefundUpdatedEvent": + return cast( + "V1ChargeRefundUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Refund": + 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( + "Refund", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ChargeRefundUpdatedEvent": + return cast( + "V1ChargeRefundUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Refund": + 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( + "Refund", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ChargeRefundUpdatedEvent(Event): + LOOKUP_TYPE = "v1.charge.refund.updated" + type: Literal["v1.charge.refund.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) -> "Refund": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Refund", + 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/_v1_charge_refunded_event.py b/stripe/events/_v1_charge_refunded_event.py new file mode 100644 index 000000000..2ca556ec8 --- /dev/null +++ b/stripe/events/_v1_charge_refunded_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._charge import Charge + from stripe._stripe_client import StripeClient + + +class V1ChargeRefundedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.charge.refunded" + type: Literal["v1.charge.refunded"] + 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) -> "V1ChargeRefundedEvent": + return cast( + "V1ChargeRefundedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Charge": + 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( + "Charge", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ChargeRefundedEvent": + return cast( + "V1ChargeRefundedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Charge": + 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( + "Charge", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ChargeRefundedEvent(Event): + LOOKUP_TYPE = "v1.charge.refunded" + type: Literal["v1.charge.refunded"] + + 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) -> "Charge": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Charge", + 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/_v1_charge_succeeded_event.py b/stripe/events/_v1_charge_succeeded_event.py new file mode 100644 index 000000000..c032560ba --- /dev/null +++ b/stripe/events/_v1_charge_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._charge import Charge + from stripe._stripe_client import StripeClient + + +class V1ChargeSucceededEventNotification(EventNotification): + LOOKUP_TYPE = "v1.charge.succeeded" + type: Literal["v1.charge.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) -> "V1ChargeSucceededEvent": + return cast( + "V1ChargeSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Charge": + 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( + "Charge", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ChargeSucceededEvent": + return cast( + "V1ChargeSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Charge": + 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( + "Charge", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ChargeSucceededEvent(Event): + LOOKUP_TYPE = "v1.charge.succeeded" + type: Literal["v1.charge.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) -> "Charge": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Charge", + 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/_v1_charge_updated_event.py b/stripe/events/_v1_charge_updated_event.py new file mode 100644 index 000000000..76b06b8c1 --- /dev/null +++ b/stripe/events/_v1_charge_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._charge import Charge + from stripe._stripe_client import StripeClient + + +class V1ChargeUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.charge.updated" + type: Literal["v1.charge.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) -> "V1ChargeUpdatedEvent": + return cast( + "V1ChargeUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Charge": + 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( + "Charge", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ChargeUpdatedEvent": + return cast( + "V1ChargeUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Charge": + 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( + "Charge", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ChargeUpdatedEvent(Event): + LOOKUP_TYPE = "v1.charge.updated" + type: Literal["v1.charge.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) -> "Charge": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Charge", + 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/_v1_checkout_session_async_payment_failed_event.py b/stripe/events/_v1_checkout_session_async_payment_failed_event.py new file mode 100644 index 000000000..db0337676 --- /dev/null +++ b/stripe/events/_v1_checkout_session_async_payment_failed_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.checkout._session import Session + + +class V1CheckoutSessionAsyncPaymentFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.checkout.session.async_payment_failed" + type: Literal["v1.checkout.session.async_payment_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) -> "V1CheckoutSessionAsyncPaymentFailedEvent": + return cast( + "V1CheckoutSessionAsyncPaymentFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Session": + 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( + "Session", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CheckoutSessionAsyncPaymentFailedEvent": + return cast( + "V1CheckoutSessionAsyncPaymentFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Session": + 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( + "Session", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CheckoutSessionAsyncPaymentFailedEvent(Event): + LOOKUP_TYPE = "v1.checkout.session.async_payment_failed" + type: Literal["v1.checkout.session.async_payment_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) -> "Session": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Session", + 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/_v1_checkout_session_async_payment_succeeded_event.py b/stripe/events/_v1_checkout_session_async_payment_succeeded_event.py new file mode 100644 index 000000000..dc7a3c993 --- /dev/null +++ b/stripe/events/_v1_checkout_session_async_payment_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.checkout._session import Session + + +class V1CheckoutSessionAsyncPaymentSucceededEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.checkout.session.async_payment_succeeded" + type: Literal["v1.checkout.session.async_payment_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) -> "V1CheckoutSessionAsyncPaymentSucceededEvent": + return cast( + "V1CheckoutSessionAsyncPaymentSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Session": + 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( + "Session", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CheckoutSessionAsyncPaymentSucceededEvent": + return cast( + "V1CheckoutSessionAsyncPaymentSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Session": + 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( + "Session", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CheckoutSessionAsyncPaymentSucceededEvent(Event): + LOOKUP_TYPE = "v1.checkout.session.async_payment_succeeded" + type: Literal["v1.checkout.session.async_payment_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) -> "Session": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Session", + 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/_v1_checkout_session_completed_event.py b/stripe/events/_v1_checkout_session_completed_event.py new file mode 100644 index 000000000..7e330bafc --- /dev/null +++ b/stripe/events/_v1_checkout_session_completed_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.checkout._session import Session + + +class V1CheckoutSessionCompletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.checkout.session.completed" + type: Literal["v1.checkout.session.completed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CheckoutSessionCompletedEvent": + return cast( + "V1CheckoutSessionCompletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Session": + 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( + "Session", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CheckoutSessionCompletedEvent": + return cast( + "V1CheckoutSessionCompletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Session": + 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( + "Session", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CheckoutSessionCompletedEvent(Event): + LOOKUP_TYPE = "v1.checkout.session.completed" + type: Literal["v1.checkout.session.completed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Session": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Session", + 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/_v1_checkout_session_expired_event.py b/stripe/events/_v1_checkout_session_expired_event.py new file mode 100644 index 000000000..015c3972f --- /dev/null +++ b/stripe/events/_v1_checkout_session_expired_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.checkout._session import Session + + +class V1CheckoutSessionExpiredEventNotification(EventNotification): + LOOKUP_TYPE = "v1.checkout.session.expired" + type: Literal["v1.checkout.session.expired"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CheckoutSessionExpiredEvent": + return cast( + "V1CheckoutSessionExpiredEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Session": + 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( + "Session", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CheckoutSessionExpiredEvent": + return cast( + "V1CheckoutSessionExpiredEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Session": + 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( + "Session", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CheckoutSessionExpiredEvent(Event): + LOOKUP_TYPE = "v1.checkout.session.expired" + type: Literal["v1.checkout.session.expired"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Session": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Session", + 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/_v1_climate_order_canceled_event.py b/stripe/events/_v1_climate_order_canceled_event.py new file mode 100644 index 000000000..782db56cc --- /dev/null +++ b/stripe/events/_v1_climate_order_canceled_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.climate._order import Order + + +class V1ClimateOrderCanceledEventNotification(EventNotification): + LOOKUP_TYPE = "v1.climate.order.canceled" + type: Literal["v1.climate.order.canceled"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1ClimateOrderCanceledEvent": + return cast( + "V1ClimateOrderCanceledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Order": + 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( + "Order", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ClimateOrderCanceledEvent": + return cast( + "V1ClimateOrderCanceledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Order": + 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( + "Order", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ClimateOrderCanceledEvent(Event): + LOOKUP_TYPE = "v1.climate.order.canceled" + type: Literal["v1.climate.order.canceled"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Order": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Order", + 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/_v1_climate_order_created_event.py b/stripe/events/_v1_climate_order_created_event.py new file mode 100644 index 000000000..0c3cbc2c6 --- /dev/null +++ b/stripe/events/_v1_climate_order_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.climate._order import Order + + +class V1ClimateOrderCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.climate.order.created" + type: Literal["v1.climate.order.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) -> "V1ClimateOrderCreatedEvent": + return cast( + "V1ClimateOrderCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Order": + 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( + "Order", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ClimateOrderCreatedEvent": + return cast( + "V1ClimateOrderCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Order": + 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( + "Order", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ClimateOrderCreatedEvent(Event): + LOOKUP_TYPE = "v1.climate.order.created" + type: Literal["v1.climate.order.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) -> "Order": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Order", + 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/_v1_climate_order_delayed_event.py b/stripe/events/_v1_climate_order_delayed_event.py new file mode 100644 index 000000000..668ce6f19 --- /dev/null +++ b/stripe/events/_v1_climate_order_delayed_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.climate._order import Order + + +class V1ClimateOrderDelayedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.climate.order.delayed" + type: Literal["v1.climate.order.delayed"] + 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) -> "V1ClimateOrderDelayedEvent": + return cast( + "V1ClimateOrderDelayedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Order": + 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( + "Order", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ClimateOrderDelayedEvent": + return cast( + "V1ClimateOrderDelayedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Order": + 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( + "Order", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ClimateOrderDelayedEvent(Event): + LOOKUP_TYPE = "v1.climate.order.delayed" + type: Literal["v1.climate.order.delayed"] + + 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) -> "Order": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Order", + 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/_v1_climate_order_delivered_event.py b/stripe/events/_v1_climate_order_delivered_event.py new file mode 100644 index 000000000..66ca81873 --- /dev/null +++ b/stripe/events/_v1_climate_order_delivered_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.climate._order import Order + + +class V1ClimateOrderDeliveredEventNotification(EventNotification): + LOOKUP_TYPE = "v1.climate.order.delivered" + type: Literal["v1.climate.order.delivered"] + 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) -> "V1ClimateOrderDeliveredEvent": + return cast( + "V1ClimateOrderDeliveredEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Order": + 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( + "Order", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ClimateOrderDeliveredEvent": + return cast( + "V1ClimateOrderDeliveredEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Order": + 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( + "Order", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ClimateOrderDeliveredEvent(Event): + LOOKUP_TYPE = "v1.climate.order.delivered" + type: Literal["v1.climate.order.delivered"] + + 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) -> "Order": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Order", + 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/_v1_climate_order_product_substituted_event.py b/stripe/events/_v1_climate_order_product_substituted_event.py new file mode 100644 index 000000000..a4f25069c --- /dev/null +++ b/stripe/events/_v1_climate_order_product_substituted_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.climate._order import Order + + +class V1ClimateOrderProductSubstitutedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.climate.order.product_substituted" + type: Literal["v1.climate.order.product_substituted"] + 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) -> "V1ClimateOrderProductSubstitutedEvent": + return cast( + "V1ClimateOrderProductSubstitutedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Order": + 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( + "Order", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1ClimateOrderProductSubstitutedEvent": + return cast( + "V1ClimateOrderProductSubstitutedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Order": + 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( + "Order", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ClimateOrderProductSubstitutedEvent(Event): + LOOKUP_TYPE = "v1.climate.order.product_substituted" + type: Literal["v1.climate.order.product_substituted"] + + 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) -> "Order": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Order", + 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/_v1_climate_product_created_event.py b/stripe/events/_v1_climate_product_created_event.py new file mode 100644 index 000000000..8e8cf317d --- /dev/null +++ b/stripe/events/_v1_climate_product_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.climate._product import Product + + +class V1ClimateProductCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.climate.product.created" + type: Literal["v1.climate.product.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) -> "V1ClimateProductCreatedEvent": + return cast( + "V1ClimateProductCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Product": + 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( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ClimateProductCreatedEvent": + return cast( + "V1ClimateProductCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Product": + 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( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ClimateProductCreatedEvent(Event): + LOOKUP_TYPE = "v1.climate.product.created" + type: Literal["v1.climate.product.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) -> "Product": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Product", + 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/_v1_climate_product_pricing_updated_event.py b/stripe/events/_v1_climate_product_pricing_updated_event.py new file mode 100644 index 000000000..86db78362 --- /dev/null +++ b/stripe/events/_v1_climate_product_pricing_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.climate._product import Product + + +class V1ClimateProductPricingUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.climate.product.pricing_updated" + type: Literal["v1.climate.product.pricing_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) -> "V1ClimateProductPricingUpdatedEvent": + return cast( + "V1ClimateProductPricingUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Product": + 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( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ClimateProductPricingUpdatedEvent": + return cast( + "V1ClimateProductPricingUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Product": + 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( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ClimateProductPricingUpdatedEvent(Event): + LOOKUP_TYPE = "v1.climate.product.pricing_updated" + type: Literal["v1.climate.product.pricing_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) -> "Product": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Product", + 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/_v1_coupon_created_event.py b/stripe/events/_v1_coupon_created_event.py new file mode 100644 index 000000000..ca7b0261d --- /dev/null +++ b/stripe/events/_v1_coupon_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._coupon import Coupon + from stripe._stripe_client import StripeClient + + +class V1CouponCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.coupon.created" + type: Literal["v1.coupon.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) -> "V1CouponCreatedEvent": + return cast( + "V1CouponCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Coupon": + 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( + "Coupon", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CouponCreatedEvent": + return cast( + "V1CouponCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Coupon": + 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( + "Coupon", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CouponCreatedEvent(Event): + LOOKUP_TYPE = "v1.coupon.created" + type: Literal["v1.coupon.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) -> "Coupon": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Coupon", + 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/_v1_coupon_deleted_event.py b/stripe/events/_v1_coupon_deleted_event.py new file mode 100644 index 000000000..c7c399af2 --- /dev/null +++ b/stripe/events/_v1_coupon_deleted_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._coupon import Coupon + from stripe._stripe_client import StripeClient + + +class V1CouponDeletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.coupon.deleted" + type: Literal["v1.coupon.deleted"] + 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) -> "V1CouponDeletedEvent": + return cast( + "V1CouponDeletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Coupon": + 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( + "Coupon", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CouponDeletedEvent": + return cast( + "V1CouponDeletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Coupon": + 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( + "Coupon", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CouponDeletedEvent(Event): + LOOKUP_TYPE = "v1.coupon.deleted" + type: Literal["v1.coupon.deleted"] + + 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) -> "Coupon": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Coupon", + 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/_v1_coupon_updated_event.py b/stripe/events/_v1_coupon_updated_event.py new file mode 100644 index 000000000..4ab1fa5eb --- /dev/null +++ b/stripe/events/_v1_coupon_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._coupon import Coupon + from stripe._stripe_client import StripeClient + + +class V1CouponUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.coupon.updated" + type: Literal["v1.coupon.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) -> "V1CouponUpdatedEvent": + return cast( + "V1CouponUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Coupon": + 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( + "Coupon", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CouponUpdatedEvent": + return cast( + "V1CouponUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Coupon": + 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( + "Coupon", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CouponUpdatedEvent(Event): + LOOKUP_TYPE = "v1.coupon.updated" + type: Literal["v1.coupon.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) -> "Coupon": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Coupon", + 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/_v1_credit_note_created_event.py b/stripe/events/_v1_credit_note_created_event.py new file mode 100644 index 000000000..d4b55ede3 --- /dev/null +++ b/stripe/events/_v1_credit_note_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._credit_note import CreditNote + from stripe._stripe_client import StripeClient + + +class V1CreditNoteCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.credit_note.created" + type: Literal["v1.credit_note.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) -> "V1CreditNoteCreatedEvent": + return cast( + "V1CreditNoteCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "CreditNote": + 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( + "CreditNote", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CreditNoteCreatedEvent": + return cast( + "V1CreditNoteCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "CreditNote": + 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( + "CreditNote", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CreditNoteCreatedEvent(Event): + LOOKUP_TYPE = "v1.credit_note.created" + type: Literal["v1.credit_note.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) -> "CreditNote": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "CreditNote", + 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/_v1_credit_note_updated_event.py b/stripe/events/_v1_credit_note_updated_event.py new file mode 100644 index 000000000..85f2abf70 --- /dev/null +++ b/stripe/events/_v1_credit_note_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._credit_note import CreditNote + from stripe._stripe_client import StripeClient + + +class V1CreditNoteUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.credit_note.updated" + type: Literal["v1.credit_note.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) -> "V1CreditNoteUpdatedEvent": + return cast( + "V1CreditNoteUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "CreditNote": + 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( + "CreditNote", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CreditNoteUpdatedEvent": + return cast( + "V1CreditNoteUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "CreditNote": + 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( + "CreditNote", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CreditNoteUpdatedEvent(Event): + LOOKUP_TYPE = "v1.credit_note.updated" + type: Literal["v1.credit_note.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) -> "CreditNote": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "CreditNote", + 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/_v1_credit_note_voided_event.py b/stripe/events/_v1_credit_note_voided_event.py new file mode 100644 index 000000000..8e71ba8a4 --- /dev/null +++ b/stripe/events/_v1_credit_note_voided_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._credit_note import CreditNote + from stripe._stripe_client import StripeClient + + +class V1CreditNoteVoidedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.credit_note.voided" + type: Literal["v1.credit_note.voided"] + 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) -> "V1CreditNoteVoidedEvent": + return cast( + "V1CreditNoteVoidedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "CreditNote": + 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( + "CreditNote", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CreditNoteVoidedEvent": + return cast( + "V1CreditNoteVoidedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "CreditNote": + 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( + "CreditNote", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CreditNoteVoidedEvent(Event): + LOOKUP_TYPE = "v1.credit_note.voided" + type: Literal["v1.credit_note.voided"] + + 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) -> "CreditNote": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "CreditNote", + 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/_v1_customer_cash_balance_transaction_created_event.py b/stripe/events/_v1_customer_cash_balance_transaction_created_event.py new file mode 100644 index 000000000..c963c1ac6 --- /dev/null +++ b/stripe/events/_v1_customer_cash_balance_transaction_created_event.py @@ -0,0 +1,121 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._customer_cash_balance_transaction import ( + CustomerCashBalanceTransaction, + ) + from stripe._stripe_client import StripeClient + + +class V1CustomerCashBalanceTransactionCreatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.customer_cash_balance_transaction.created" + type: Literal["v1.customer_cash_balance_transaction.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) -> "V1CustomerCashBalanceTransactionCreatedEvent": + return cast( + "V1CustomerCashBalanceTransactionCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "CustomerCashBalanceTransaction": + 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( + "CustomerCashBalanceTransaction", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CustomerCashBalanceTransactionCreatedEvent": + return cast( + "V1CustomerCashBalanceTransactionCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async( + self, + ) -> "CustomerCashBalanceTransaction": + 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( + "CustomerCashBalanceTransaction", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerCashBalanceTransactionCreatedEvent(Event): + LOOKUP_TYPE = "v1.customer_cash_balance_transaction.created" + type: Literal["v1.customer_cash_balance_transaction.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) -> "CustomerCashBalanceTransaction": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "CustomerCashBalanceTransaction", + 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/_v1_customer_created_event.py b/stripe/events/_v1_customer_created_event.py new file mode 100644 index 000000000..b70fa598d --- /dev/null +++ b/stripe/events/_v1_customer_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._customer import Customer + from stripe._stripe_client import StripeClient + + +class V1CustomerCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.created" + type: Literal["v1.customer.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) -> "V1CustomerCreatedEvent": + return cast( + "V1CustomerCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Customer": + 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( + "Customer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerCreatedEvent": + return cast( + "V1CustomerCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Customer": + 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( + "Customer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerCreatedEvent(Event): + LOOKUP_TYPE = "v1.customer.created" + type: Literal["v1.customer.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) -> "Customer": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Customer", + 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/_v1_customer_deleted_event.py b/stripe/events/_v1_customer_deleted_event.py new file mode 100644 index 000000000..72e0fd98a --- /dev/null +++ b/stripe/events/_v1_customer_deleted_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._customer import Customer + from stripe._stripe_client import StripeClient + + +class V1CustomerDeletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.deleted" + type: Literal["v1.customer.deleted"] + 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) -> "V1CustomerDeletedEvent": + return cast( + "V1CustomerDeletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Customer": + 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( + "Customer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerDeletedEvent": + return cast( + "V1CustomerDeletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Customer": + 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( + "Customer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerDeletedEvent(Event): + LOOKUP_TYPE = "v1.customer.deleted" + type: Literal["v1.customer.deleted"] + + 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) -> "Customer": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Customer", + 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/_v1_customer_discount_created_event.py b/stripe/events/_v1_customer_discount_created_event.py new file mode 100644 index 000000000..55871c1f5 --- /dev/null +++ b/stripe/events/_v1_customer_discount_created_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import ( + Event, + EventNotification, + RelatedSingletonObject, +) +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._discount import Discount + from stripe._stripe_client import StripeClient + + +class V1CustomerDiscountCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.discount.created" + type: Literal["v1.customer.discount.created"] + related_object: RelatedSingletonObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedSingletonObject( + parsed_body["related_object"], + ) + + @override + def fetch_event(self) -> "V1CustomerDiscountCreatedEvent": + return cast( + "V1CustomerDiscountCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Discount": + 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( + "Discount", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerDiscountCreatedEvent": + return cast( + "V1CustomerDiscountCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Discount": + 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( + "Discount", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerDiscountCreatedEvent(Event): + LOOKUP_TYPE = "v1.customer.discount.created" + type: Literal["v1.customer.discount.created"] + + class RelatedSingletonObject(StripeObject): + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedSingletonObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Discount": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Discount", + 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/_v1_customer_discount_deleted_event.py b/stripe/events/_v1_customer_discount_deleted_event.py new file mode 100644 index 000000000..11861ab46 --- /dev/null +++ b/stripe/events/_v1_customer_discount_deleted_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import ( + Event, + EventNotification, + RelatedSingletonObject, +) +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._discount import Discount + from stripe._stripe_client import StripeClient + + +class V1CustomerDiscountDeletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.discount.deleted" + type: Literal["v1.customer.discount.deleted"] + related_object: RelatedSingletonObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedSingletonObject( + parsed_body["related_object"], + ) + + @override + def fetch_event(self) -> "V1CustomerDiscountDeletedEvent": + return cast( + "V1CustomerDiscountDeletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Discount": + 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( + "Discount", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerDiscountDeletedEvent": + return cast( + "V1CustomerDiscountDeletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Discount": + 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( + "Discount", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerDiscountDeletedEvent(Event): + LOOKUP_TYPE = "v1.customer.discount.deleted" + type: Literal["v1.customer.discount.deleted"] + + class RelatedSingletonObject(StripeObject): + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedSingletonObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Discount": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Discount", + 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/_v1_customer_discount_updated_event.py b/stripe/events/_v1_customer_discount_updated_event.py new file mode 100644 index 000000000..f1f9a7182 --- /dev/null +++ b/stripe/events/_v1_customer_discount_updated_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import ( + Event, + EventNotification, + RelatedSingletonObject, +) +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._discount import Discount + from stripe._stripe_client import StripeClient + + +class V1CustomerDiscountUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.discount.updated" + type: Literal["v1.customer.discount.updated"] + related_object: RelatedSingletonObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedSingletonObject( + parsed_body["related_object"], + ) + + @override + def fetch_event(self) -> "V1CustomerDiscountUpdatedEvent": + return cast( + "V1CustomerDiscountUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Discount": + 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( + "Discount", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerDiscountUpdatedEvent": + return cast( + "V1CustomerDiscountUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Discount": + 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( + "Discount", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerDiscountUpdatedEvent(Event): + LOOKUP_TYPE = "v1.customer.discount.updated" + type: Literal["v1.customer.discount.updated"] + + class RelatedSingletonObject(StripeObject): + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedSingletonObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Discount": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Discount", + 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/_v1_customer_subscription_created_event.py b/stripe/events/_v1_customer_subscription_created_event.py new file mode 100644 index 000000000..ef5e771b2 --- /dev/null +++ b/stripe/events/_v1_customer_subscription_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._subscription import Subscription + + +class V1CustomerSubscriptionCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.subscription.created" + type: Literal["v1.customer.subscription.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) -> "V1CustomerSubscriptionCreatedEvent": + return cast( + "V1CustomerSubscriptionCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerSubscriptionCreatedEvent": + return cast( + "V1CustomerSubscriptionCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionCreatedEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.created" + type: Literal["v1.customer.subscription.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) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + 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/_v1_customer_subscription_deleted_event.py b/stripe/events/_v1_customer_subscription_deleted_event.py new file mode 100644 index 000000000..2110b01d9 --- /dev/null +++ b/stripe/events/_v1_customer_subscription_deleted_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._subscription import Subscription + + +class V1CustomerSubscriptionDeletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.subscription.deleted" + type: Literal["v1.customer.subscription.deleted"] + 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) -> "V1CustomerSubscriptionDeletedEvent": + return cast( + "V1CustomerSubscriptionDeletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerSubscriptionDeletedEvent": + return cast( + "V1CustomerSubscriptionDeletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionDeletedEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.deleted" + type: Literal["v1.customer.subscription.deleted"] + + 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) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + 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/_v1_customer_subscription_paused_event.py b/stripe/events/_v1_customer_subscription_paused_event.py new file mode 100644 index 000000000..719c35a6b --- /dev/null +++ b/stripe/events/_v1_customer_subscription_paused_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._subscription import Subscription + + +class V1CustomerSubscriptionPausedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.subscription.paused" + type: Literal["v1.customer.subscription.paused"] + 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) -> "V1CustomerSubscriptionPausedEvent": + return cast( + "V1CustomerSubscriptionPausedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerSubscriptionPausedEvent": + return cast( + "V1CustomerSubscriptionPausedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionPausedEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.paused" + type: Literal["v1.customer.subscription.paused"] + + 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) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + 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/_v1_customer_subscription_pending_update_applied_event.py b/stripe/events/_v1_customer_subscription_pending_update_applied_event.py new file mode 100644 index 000000000..02ee45977 --- /dev/null +++ b/stripe/events/_v1_customer_subscription_pending_update_applied_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._subscription import Subscription + + +class V1CustomerSubscriptionPendingUpdateAppliedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.customer.subscription.pending_update_applied" + type: Literal["v1.customer.subscription.pending_update_applied"] + 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) -> "V1CustomerSubscriptionPendingUpdateAppliedEvent": + return cast( + "V1CustomerSubscriptionPendingUpdateAppliedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CustomerSubscriptionPendingUpdateAppliedEvent": + return cast( + "V1CustomerSubscriptionPendingUpdateAppliedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionPendingUpdateAppliedEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.pending_update_applied" + type: Literal["v1.customer.subscription.pending_update_applied"] + + 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) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + 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/_v1_customer_subscription_pending_update_expired_event.py b/stripe/events/_v1_customer_subscription_pending_update_expired_event.py new file mode 100644 index 000000000..a39ae79bc --- /dev/null +++ b/stripe/events/_v1_customer_subscription_pending_update_expired_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._subscription import Subscription + + +class V1CustomerSubscriptionPendingUpdateExpiredEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.customer.subscription.pending_update_expired" + type: Literal["v1.customer.subscription.pending_update_expired"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CustomerSubscriptionPendingUpdateExpiredEvent": + return cast( + "V1CustomerSubscriptionPendingUpdateExpiredEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CustomerSubscriptionPendingUpdateExpiredEvent": + return cast( + "V1CustomerSubscriptionPendingUpdateExpiredEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionPendingUpdateExpiredEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.pending_update_expired" + type: Literal["v1.customer.subscription.pending_update_expired"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + 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/_v1_customer_subscription_resumed_event.py b/stripe/events/_v1_customer_subscription_resumed_event.py new file mode 100644 index 000000000..29bbb6b45 --- /dev/null +++ b/stripe/events/_v1_customer_subscription_resumed_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._subscription import Subscription + + +class V1CustomerSubscriptionResumedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.subscription.resumed" + type: Literal["v1.customer.subscription.resumed"] + 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) -> "V1CustomerSubscriptionResumedEvent": + return cast( + "V1CustomerSubscriptionResumedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerSubscriptionResumedEvent": + return cast( + "V1CustomerSubscriptionResumedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionResumedEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.resumed" + type: Literal["v1.customer.subscription.resumed"] + + 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) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + 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/_v1_customer_subscription_trial_will_end_event.py b/stripe/events/_v1_customer_subscription_trial_will_end_event.py new file mode 100644 index 000000000..a29475e1a --- /dev/null +++ b/stripe/events/_v1_customer_subscription_trial_will_end_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription import Subscription + + +class V1CustomerSubscriptionTrialWillEndEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.subscription.trial_will_end" + type: Literal["v1.customer.subscription.trial_will_end"] + 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) -> "V1CustomerSubscriptionTrialWillEndEvent": + return cast( + "V1CustomerSubscriptionTrialWillEndEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CustomerSubscriptionTrialWillEndEvent": + return cast( + "V1CustomerSubscriptionTrialWillEndEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionTrialWillEndEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.trial_will_end" + type: Literal["v1.customer.subscription.trial_will_end"] + + 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) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + 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/_v1_customer_subscription_updated_event.py b/stripe/events/_v1_customer_subscription_updated_event.py new file mode 100644 index 000000000..361800ab2 --- /dev/null +++ b/stripe/events/_v1_customer_subscription_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._subscription import Subscription + + +class V1CustomerSubscriptionUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.subscription.updated" + type: Literal["v1.customer.subscription.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) -> "V1CustomerSubscriptionUpdatedEvent": + return cast( + "V1CustomerSubscriptionUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerSubscriptionUpdatedEvent": + return cast( + "V1CustomerSubscriptionUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + 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( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionUpdatedEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.updated" + type: Literal["v1.customer.subscription.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) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + 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/_v1_customer_tax_id_created_event.py b/stripe/events/_v1_customer_tax_id_created_event.py new file mode 100644 index 000000000..a88eff7ab --- /dev/null +++ b/stripe/events/_v1_customer_tax_id_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._tax_id import TaxId + + +class V1CustomerTaxIdCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.tax_id.created" + type: Literal["v1.customer.tax_id.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) -> "V1CustomerTaxIdCreatedEvent": + return cast( + "V1CustomerTaxIdCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "TaxId": + 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( + "TaxId", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerTaxIdCreatedEvent": + return cast( + "V1CustomerTaxIdCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "TaxId": + 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( + "TaxId", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerTaxIdCreatedEvent(Event): + LOOKUP_TYPE = "v1.customer.tax_id.created" + type: Literal["v1.customer.tax_id.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) -> "TaxId": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "TaxId", + 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/_v1_customer_tax_id_deleted_event.py b/stripe/events/_v1_customer_tax_id_deleted_event.py new file mode 100644 index 000000000..7b995969a --- /dev/null +++ b/stripe/events/_v1_customer_tax_id_deleted_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._tax_id import TaxId + + +class V1CustomerTaxIdDeletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.tax_id.deleted" + type: Literal["v1.customer.tax_id.deleted"] + 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) -> "V1CustomerTaxIdDeletedEvent": + return cast( + "V1CustomerTaxIdDeletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "TaxId": + 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( + "TaxId", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerTaxIdDeletedEvent": + return cast( + "V1CustomerTaxIdDeletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "TaxId": + 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( + "TaxId", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerTaxIdDeletedEvent(Event): + LOOKUP_TYPE = "v1.customer.tax_id.deleted" + type: Literal["v1.customer.tax_id.deleted"] + + 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) -> "TaxId": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "TaxId", + 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/_v1_customer_tax_id_updated_event.py b/stripe/events/_v1_customer_tax_id_updated_event.py new file mode 100644 index 000000000..47732a697 --- /dev/null +++ b/stripe/events/_v1_customer_tax_id_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._tax_id import TaxId + + +class V1CustomerTaxIdUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.tax_id.updated" + type: Literal["v1.customer.tax_id.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) -> "V1CustomerTaxIdUpdatedEvent": + return cast( + "V1CustomerTaxIdUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "TaxId": + 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( + "TaxId", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerTaxIdUpdatedEvent": + return cast( + "V1CustomerTaxIdUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "TaxId": + 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( + "TaxId", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerTaxIdUpdatedEvent(Event): + LOOKUP_TYPE = "v1.customer.tax_id.updated" + type: Literal["v1.customer.tax_id.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) -> "TaxId": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "TaxId", + 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/_v1_customer_updated_event.py b/stripe/events/_v1_customer_updated_event.py new file mode 100644 index 000000000..c4b6ee427 --- /dev/null +++ b/stripe/events/_v1_customer_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._customer import Customer + from stripe._stripe_client import StripeClient + + +class V1CustomerUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.updated" + type: Literal["v1.customer.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) -> "V1CustomerUpdatedEvent": + return cast( + "V1CustomerUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Customer": + 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( + "Customer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerUpdatedEvent": + return cast( + "V1CustomerUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Customer": + 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( + "Customer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerUpdatedEvent(Event): + LOOKUP_TYPE = "v1.customer.updated" + type: Literal["v1.customer.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) -> "Customer": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Customer", + 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/_v1_entitlements_active_entitlement_summary_updated_event.py b/stripe/events/_v1_entitlements_active_entitlement_summary_updated_event.py new file mode 100644 index 000000000..6dda11274 --- /dev/null +++ b/stripe/events/_v1_entitlements_active_entitlement_summary_updated_event.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2.core._event import Event, EventNotification +from typing import cast +from typing_extensions import Literal, override + + +class V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.entitlements.active_entitlement_summary.updated" + type: Literal["v1.entitlements.active_entitlement_summary.updated"] + + @override + def fetch_event( + self, + ) -> "V1EntitlementsActiveEntitlementSummaryUpdatedEvent": + return cast( + "V1EntitlementsActiveEntitlementSummaryUpdatedEvent", + super().fetch_event(), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1EntitlementsActiveEntitlementSummaryUpdatedEvent": + return cast( + "V1EntitlementsActiveEntitlementSummaryUpdatedEvent", + await super().fetch_event_async(), + ) + + +class V1EntitlementsActiveEntitlementSummaryUpdatedEvent(Event): + LOOKUP_TYPE = "v1.entitlements.active_entitlement_summary.updated" + type: Literal["v1.entitlements.active_entitlement_summary.updated"] diff --git a/stripe/events/_v1_file_created_event.py b/stripe/events/_v1_file_created_event.py new file mode 100644 index 000000000..5b142e69d --- /dev/null +++ b/stripe/events/_v1_file_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._file import File + from stripe._stripe_client import StripeClient + + +class V1FileCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.file.created" + type: Literal["v1.file.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) -> "V1FileCreatedEvent": + return cast( + "V1FileCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "File": + 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( + "File", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1FileCreatedEvent": + return cast( + "V1FileCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "File": + 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( + "File", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FileCreatedEvent(Event): + LOOKUP_TYPE = "v1.file.created" + type: Literal["v1.file.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) -> "File": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "File", + 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/_v1_financial_connections_account_account_numbers_updated_event.py b/stripe/events/_v1_financial_connections_account_account_numbers_updated_event.py new file mode 100644 index 000000000..2765518bc --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_account_numbers_updated_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.financial_connections.account.account_numbers_updated" + type: Literal["v1.financial_connections.account.account_numbers_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, + ) -> "V1FinancialConnectionsAccountAccountNumbersUpdatedEvent": + return cast( + "V1FinancialConnectionsAccountAccountNumbersUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountAccountNumbersUpdatedEvent": + return cast( + "V1FinancialConnectionsAccountAccountNumbersUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountAccountNumbersUpdatedEvent(Event): + LOOKUP_TYPE = "v1.financial_connections.account.account_numbers_updated" + type: Literal["v1.financial_connections.account.account_numbers_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) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + 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/_v1_financial_connections_account_created_event.py b/stripe/events/_v1_financial_connections_account_created_event.py new file mode 100644 index 000000000..40ed6f922 --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_created_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.financial_connections.account.created" + type: Literal["v1.financial_connections.account.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) -> "V1FinancialConnectionsAccountCreatedEvent": + return cast( + "V1FinancialConnectionsAccountCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountCreatedEvent": + return cast( + "V1FinancialConnectionsAccountCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountCreatedEvent(Event): + LOOKUP_TYPE = "v1.financial_connections.account.created" + type: Literal["v1.financial_connections.account.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) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + 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/_v1_financial_connections_account_deactivated_event.py b/stripe/events/_v1_financial_connections_account_deactivated_event.py new file mode 100644 index 000000000..0feee1f81 --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_deactivated_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.financial_connections._account import Account + + +class V1FinancialConnectionsAccountDeactivatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.financial_connections.account.deactivated" + type: Literal["v1.financial_connections.account.deactivated"] + 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) -> "V1FinancialConnectionsAccountDeactivatedEvent": + return cast( + "V1FinancialConnectionsAccountDeactivatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountDeactivatedEvent": + return cast( + "V1FinancialConnectionsAccountDeactivatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountDeactivatedEvent(Event): + LOOKUP_TYPE = "v1.financial_connections.account.deactivated" + type: Literal["v1.financial_connections.account.deactivated"] + + 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) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + 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/_v1_financial_connections_account_disconnected_event.py b/stripe/events/_v1_financial_connections_account_disconnected_event.py new file mode 100644 index 000000000..6a62f193c --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_disconnected_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.financial_connections._account import Account + + +class V1FinancialConnectionsAccountDisconnectedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.financial_connections.account.disconnected" + type: Literal["v1.financial_connections.account.disconnected"] + 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) -> "V1FinancialConnectionsAccountDisconnectedEvent": + return cast( + "V1FinancialConnectionsAccountDisconnectedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountDisconnectedEvent": + return cast( + "V1FinancialConnectionsAccountDisconnectedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountDisconnectedEvent(Event): + LOOKUP_TYPE = "v1.financial_connections.account.disconnected" + type: Literal["v1.financial_connections.account.disconnected"] + + 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) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + 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/_v1_financial_connections_account_expected_deactivation_date_updated_event.py b/stripe/events/_v1_financial_connections_account_expected_deactivation_date_updated_event.py new file mode 100644 index 000000000..fc69cd5fe --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_expected_deactivation_date_updated_event.py @@ -0,0 +1,127 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v1.financial_connections.account.expected_deactivation_date_updated" + ) + type: Literal[ + "v1.financial_connections.account.expected_deactivation_date_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, + ) -> "V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent": + return cast( + "V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent": + return cast( + "V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent(Event): + LOOKUP_TYPE = ( + "v1.financial_connections.account.expected_deactivation_date_updated" + ) + type: Literal[ + "v1.financial_connections.account.expected_deactivation_date_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) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + 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/_v1_financial_connections_account_reactivated_event.py b/stripe/events/_v1_financial_connections_account_reactivated_event.py new file mode 100644 index 000000000..0afa58b7f --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_reactivated_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.financial_connections._account import Account + + +class V1FinancialConnectionsAccountReactivatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.financial_connections.account.reactivated" + type: Literal["v1.financial_connections.account.reactivated"] + 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) -> "V1FinancialConnectionsAccountReactivatedEvent": + return cast( + "V1FinancialConnectionsAccountReactivatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountReactivatedEvent": + return cast( + "V1FinancialConnectionsAccountReactivatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountReactivatedEvent(Event): + LOOKUP_TYPE = "v1.financial_connections.account.reactivated" + type: Literal["v1.financial_connections.account.reactivated"] + + 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) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + 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/_v1_financial_connections_account_refreshed_balance_event.py b/stripe/events/_v1_financial_connections_account_refreshed_balance_event.py new file mode 100644 index 000000000..73d6cb096 --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_refreshed_balance_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountRefreshedBalanceEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.financial_connections.account.refreshed_balance" + type: Literal["v1.financial_connections.account.refreshed_balance"] + 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, + ) -> "V1FinancialConnectionsAccountRefreshedBalanceEvent": + return cast( + "V1FinancialConnectionsAccountRefreshedBalanceEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountRefreshedBalanceEvent": + return cast( + "V1FinancialConnectionsAccountRefreshedBalanceEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountRefreshedBalanceEvent(Event): + LOOKUP_TYPE = "v1.financial_connections.account.refreshed_balance" + type: Literal["v1.financial_connections.account.refreshed_balance"] + + 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) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + 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/_v1_financial_connections_account_refreshed_ownership_event.py b/stripe/events/_v1_financial_connections_account_refreshed_ownership_event.py new file mode 100644 index 000000000..07a3e276c --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_refreshed_ownership_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountRefreshedOwnershipEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.financial_connections.account.refreshed_ownership" + type: Literal["v1.financial_connections.account.refreshed_ownership"] + 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, + ) -> "V1FinancialConnectionsAccountRefreshedOwnershipEvent": + return cast( + "V1FinancialConnectionsAccountRefreshedOwnershipEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountRefreshedOwnershipEvent": + return cast( + "V1FinancialConnectionsAccountRefreshedOwnershipEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountRefreshedOwnershipEvent(Event): + LOOKUP_TYPE = "v1.financial_connections.account.refreshed_ownership" + type: Literal["v1.financial_connections.account.refreshed_ownership"] + + 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) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + 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/_v1_financial_connections_account_refreshed_transactions_event.py b/stripe/events/_v1_financial_connections_account_refreshed_transactions_event.py new file mode 100644 index 000000000..b31f0ee3f --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_refreshed_transactions_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountRefreshedTransactionsEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.financial_connections.account.refreshed_transactions" + type: Literal["v1.financial_connections.account.refreshed_transactions"] + 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, + ) -> "V1FinancialConnectionsAccountRefreshedTransactionsEvent": + return cast( + "V1FinancialConnectionsAccountRefreshedTransactionsEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountRefreshedTransactionsEvent": + return cast( + "V1FinancialConnectionsAccountRefreshedTransactionsEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountRefreshedTransactionsEvent(Event): + LOOKUP_TYPE = "v1.financial_connections.account.refreshed_transactions" + type: Literal["v1.financial_connections.account.refreshed_transactions"] + + 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) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + 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/_v1_financial_connections_account_supported_payment_method_types_updated_event.py b/stripe/events/_v1_financial_connections_account_supported_payment_method_types_updated_event.py new file mode 100644 index 000000000..295af4d97 --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_supported_payment_method_types_updated_event.py @@ -0,0 +1,129 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.financial_connections.account.supported_payment_method_types_updated" + type: Literal[ + "v1.financial_connections.account.supported_payment_method_types_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, + ) -> ( + "V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent" + ): + return cast( + "V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> ( + "V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent" + ): + return cast( + "V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent( + Event, +): + LOOKUP_TYPE = "v1.financial_connections.account.supported_payment_method_types_updated" + type: Literal[ + "v1.financial_connections.account.supported_payment_method_types_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) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + 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/_v1_financial_connections_account_upcoming_account_number_expiry_event.py b/stripe/events/_v1_financial_connections_account_upcoming_account_number_expiry_event.py new file mode 100644 index 000000000..da2aa15c8 --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_upcoming_account_number_expiry_event.py @@ -0,0 +1,127 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v1.financial_connections.account.upcoming_account_number_expiry" + ) + type: Literal[ + "v1.financial_connections.account.upcoming_account_number_expiry" + ] + 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, + ) -> "V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent": + return cast( + "V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent": + return cast( + "V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent(Event): + LOOKUP_TYPE = ( + "v1.financial_connections.account.upcoming_account_number_expiry" + ) + type: Literal[ + "v1.financial_connections.account.upcoming_account_number_expiry" + ] + + 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) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + 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/_v1_financial_connections_account_upcoming_deactivation_event.py b/stripe/events/_v1_financial_connections_account_upcoming_deactivation_event.py new file mode 100644 index 000000000..3d7b4daa0 --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_upcoming_deactivation_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountUpcomingDeactivationEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.financial_connections.account.upcoming_deactivation" + type: Literal["v1.financial_connections.account.upcoming_deactivation"] + 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, + ) -> "V1FinancialConnectionsAccountUpcomingDeactivationEvent": + return cast( + "V1FinancialConnectionsAccountUpcomingDeactivationEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountUpcomingDeactivationEvent": + return cast( + "V1FinancialConnectionsAccountUpcomingDeactivationEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + 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( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountUpcomingDeactivationEvent(Event): + LOOKUP_TYPE = "v1.financial_connections.account.upcoming_deactivation" + type: Literal["v1.financial_connections.account.upcoming_deactivation"] + + 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) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + 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/_v1_identity_verification_session_canceled_event.py b/stripe/events/_v1_identity_verification_session_canceled_event.py new file mode 100644 index 000000000..eb4c9ed8b --- /dev/null +++ b/stripe/events/_v1_identity_verification_session_canceled_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.identity._verification_session import VerificationSession + + +class V1IdentityVerificationSessionCanceledEventNotification( + EventNotification +): + LOOKUP_TYPE = "v1.identity.verification_session.canceled" + type: Literal["v1.identity.verification_session.canceled"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1IdentityVerificationSessionCanceledEvent": + return cast( + "V1IdentityVerificationSessionCanceledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "VerificationSession": + 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( + "VerificationSession", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1IdentityVerificationSessionCanceledEvent": + return cast( + "V1IdentityVerificationSessionCanceledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "VerificationSession": + 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( + "VerificationSession", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IdentityVerificationSessionCanceledEvent(Event): + LOOKUP_TYPE = "v1.identity.verification_session.canceled" + type: Literal["v1.identity.verification_session.canceled"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "VerificationSession": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "VerificationSession", + 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/_v1_identity_verification_session_created_event.py b/stripe/events/_v1_identity_verification_session_created_event.py new file mode 100644 index 000000000..c29967533 --- /dev/null +++ b/stripe/events/_v1_identity_verification_session_created_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.identity._verification_session import VerificationSession + + +class V1IdentityVerificationSessionCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.identity.verification_session.created" + type: Literal["v1.identity.verification_session.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) -> "V1IdentityVerificationSessionCreatedEvent": + return cast( + "V1IdentityVerificationSessionCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "VerificationSession": + 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( + "VerificationSession", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1IdentityVerificationSessionCreatedEvent": + return cast( + "V1IdentityVerificationSessionCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "VerificationSession": + 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( + "VerificationSession", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IdentityVerificationSessionCreatedEvent(Event): + LOOKUP_TYPE = "v1.identity.verification_session.created" + type: Literal["v1.identity.verification_session.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) -> "VerificationSession": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "VerificationSession", + 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/_v1_identity_verification_session_processing_event.py b/stripe/events/_v1_identity_verification_session_processing_event.py new file mode 100644 index 000000000..0a92a7039 --- /dev/null +++ b/stripe/events/_v1_identity_verification_session_processing_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.identity._verification_session import VerificationSession + + +class V1IdentityVerificationSessionProcessingEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.identity.verification_session.processing" + type: Literal["v1.identity.verification_session.processing"] + 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) -> "V1IdentityVerificationSessionProcessingEvent": + return cast( + "V1IdentityVerificationSessionProcessingEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "VerificationSession": + 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( + "VerificationSession", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1IdentityVerificationSessionProcessingEvent": + return cast( + "V1IdentityVerificationSessionProcessingEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "VerificationSession": + 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( + "VerificationSession", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IdentityVerificationSessionProcessingEvent(Event): + LOOKUP_TYPE = "v1.identity.verification_session.processing" + type: Literal["v1.identity.verification_session.processing"] + + 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) -> "VerificationSession": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "VerificationSession", + 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/_v1_identity_verification_session_redacted_event.py b/stripe/events/_v1_identity_verification_session_redacted_event.py new file mode 100644 index 000000000..7e6976c7a --- /dev/null +++ b/stripe/events/_v1_identity_verification_session_redacted_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.identity._verification_session import VerificationSession + + +class V1IdentityVerificationSessionRedactedEventNotification( + EventNotification +): + LOOKUP_TYPE = "v1.identity.verification_session.redacted" + type: Literal["v1.identity.verification_session.redacted"] + 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) -> "V1IdentityVerificationSessionRedactedEvent": + return cast( + "V1IdentityVerificationSessionRedactedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "VerificationSession": + 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( + "VerificationSession", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1IdentityVerificationSessionRedactedEvent": + return cast( + "V1IdentityVerificationSessionRedactedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "VerificationSession": + 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( + "VerificationSession", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IdentityVerificationSessionRedactedEvent(Event): + LOOKUP_TYPE = "v1.identity.verification_session.redacted" + type: Literal["v1.identity.verification_session.redacted"] + + 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) -> "VerificationSession": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "VerificationSession", + 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/_v1_identity_verification_session_requires_input_event.py b/stripe/events/_v1_identity_verification_session_requires_input_event.py new file mode 100644 index 000000000..a717a3df0 --- /dev/null +++ b/stripe/events/_v1_identity_verification_session_requires_input_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.identity._verification_session import VerificationSession + + +class V1IdentityVerificationSessionRequiresInputEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.identity.verification_session.requires_input" + type: Literal["v1.identity.verification_session.requires_input"] + 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) -> "V1IdentityVerificationSessionRequiresInputEvent": + return cast( + "V1IdentityVerificationSessionRequiresInputEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "VerificationSession": + 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( + "VerificationSession", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1IdentityVerificationSessionRequiresInputEvent": + return cast( + "V1IdentityVerificationSessionRequiresInputEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "VerificationSession": + 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( + "VerificationSession", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IdentityVerificationSessionRequiresInputEvent(Event): + LOOKUP_TYPE = "v1.identity.verification_session.requires_input" + type: Literal["v1.identity.verification_session.requires_input"] + + 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) -> "VerificationSession": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "VerificationSession", + 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/_v1_identity_verification_session_verified_event.py b/stripe/events/_v1_identity_verification_session_verified_event.py new file mode 100644 index 000000000..1e188f418 --- /dev/null +++ b/stripe/events/_v1_identity_verification_session_verified_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.identity._verification_session import VerificationSession + + +class V1IdentityVerificationSessionVerifiedEventNotification( + EventNotification +): + LOOKUP_TYPE = "v1.identity.verification_session.verified" + type: Literal["v1.identity.verification_session.verified"] + 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) -> "V1IdentityVerificationSessionVerifiedEvent": + return cast( + "V1IdentityVerificationSessionVerifiedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "VerificationSession": + 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( + "VerificationSession", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1IdentityVerificationSessionVerifiedEvent": + return cast( + "V1IdentityVerificationSessionVerifiedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "VerificationSession": + 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( + "VerificationSession", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IdentityVerificationSessionVerifiedEvent(Event): + LOOKUP_TYPE = "v1.identity.verification_session.verified" + type: Literal["v1.identity.verification_session.verified"] + + 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) -> "VerificationSession": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "VerificationSession", + 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/_v1_invoice_created_event.py b/stripe/events/_v1_invoice_created_event.py new file mode 100644 index 000000000..a6dc341dd --- /dev/null +++ b/stripe/events/_v1_invoice_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.created" + type: Literal["v1.invoice.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) -> "V1InvoiceCreatedEvent": + return cast( + "V1InvoiceCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceCreatedEvent": + return cast( + "V1InvoiceCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceCreatedEvent(Event): + LOOKUP_TYPE = "v1.invoice.created" + type: Literal["v1.invoice.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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_deleted_event.py b/stripe/events/_v1_invoice_deleted_event.py new file mode 100644 index 000000000..a1ef7aa0b --- /dev/null +++ b/stripe/events/_v1_invoice_deleted_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceDeletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.deleted" + type: Literal["v1.invoice.deleted"] + 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) -> "V1InvoiceDeletedEvent": + return cast( + "V1InvoiceDeletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceDeletedEvent": + return cast( + "V1InvoiceDeletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceDeletedEvent(Event): + LOOKUP_TYPE = "v1.invoice.deleted" + type: Literal["v1.invoice.deleted"] + + 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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_finalization_failed_event.py b/stripe/events/_v1_invoice_finalization_failed_event.py new file mode 100644 index 000000000..49b3a1ec7 --- /dev/null +++ b/stripe/events/_v1_invoice_finalization_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceFinalizationFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.finalization_failed" + type: Literal["v1.invoice.finalization_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) -> "V1InvoiceFinalizationFailedEvent": + return cast( + "V1InvoiceFinalizationFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceFinalizationFailedEvent": + return cast( + "V1InvoiceFinalizationFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceFinalizationFailedEvent(Event): + LOOKUP_TYPE = "v1.invoice.finalization_failed" + type: Literal["v1.invoice.finalization_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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_finalized_event.py b/stripe/events/_v1_invoice_finalized_event.py new file mode 100644 index 000000000..12a336959 --- /dev/null +++ b/stripe/events/_v1_invoice_finalized_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceFinalizedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.finalized" + type: Literal["v1.invoice.finalized"] + 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) -> "V1InvoiceFinalizedEvent": + return cast( + "V1InvoiceFinalizedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceFinalizedEvent": + return cast( + "V1InvoiceFinalizedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceFinalizedEvent(Event): + LOOKUP_TYPE = "v1.invoice.finalized" + type: Literal["v1.invoice.finalized"] + + 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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_marked_uncollectible_event.py b/stripe/events/_v1_invoice_marked_uncollectible_event.py new file mode 100644 index 000000000..a968d8c43 --- /dev/null +++ b/stripe/events/_v1_invoice_marked_uncollectible_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceMarkedUncollectibleEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.marked_uncollectible" + type: Literal["v1.invoice.marked_uncollectible"] + 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) -> "V1InvoiceMarkedUncollectibleEvent": + return cast( + "V1InvoiceMarkedUncollectibleEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceMarkedUncollectibleEvent": + return cast( + "V1InvoiceMarkedUncollectibleEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceMarkedUncollectibleEvent(Event): + LOOKUP_TYPE = "v1.invoice.marked_uncollectible" + type: Literal["v1.invoice.marked_uncollectible"] + + 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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_overdue_event.py b/stripe/events/_v1_invoice_overdue_event.py new file mode 100644 index 000000000..e6860ec88 --- /dev/null +++ b/stripe/events/_v1_invoice_overdue_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceOverdueEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.overdue" + type: Literal["v1.invoice.overdue"] + 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) -> "V1InvoiceOverdueEvent": + return cast( + "V1InvoiceOverdueEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceOverdueEvent": + return cast( + "V1InvoiceOverdueEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceOverdueEvent(Event): + LOOKUP_TYPE = "v1.invoice.overdue" + type: Literal["v1.invoice.overdue"] + + 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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_overpaid_event.py b/stripe/events/_v1_invoice_overpaid_event.py new file mode 100644 index 000000000..fa486381f --- /dev/null +++ b/stripe/events/_v1_invoice_overpaid_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceOverpaidEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.overpaid" + type: Literal["v1.invoice.overpaid"] + 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) -> "V1InvoiceOverpaidEvent": + return cast( + "V1InvoiceOverpaidEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceOverpaidEvent": + return cast( + "V1InvoiceOverpaidEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceOverpaidEvent(Event): + LOOKUP_TYPE = "v1.invoice.overpaid" + type: Literal["v1.invoice.overpaid"] + + 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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_paid_event.py b/stripe/events/_v1_invoice_paid_event.py new file mode 100644 index 000000000..0f3161ee7 --- /dev/null +++ b/stripe/events/_v1_invoice_paid_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoicePaidEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.paid" + type: Literal["v1.invoice.paid"] + 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) -> "V1InvoicePaidEvent": + return cast( + "V1InvoicePaidEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoicePaidEvent": + return cast( + "V1InvoicePaidEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoicePaidEvent(Event): + LOOKUP_TYPE = "v1.invoice.paid" + type: Literal["v1.invoice.paid"] + + 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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_payment_action_required_event.py b/stripe/events/_v1_invoice_payment_action_required_event.py new file mode 100644 index 000000000..d673153e5 --- /dev/null +++ b/stripe/events/_v1_invoice_payment_action_required_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoicePaymentActionRequiredEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.payment_action_required" + type: Literal["v1.invoice.payment_action_required"] + 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) -> "V1InvoicePaymentActionRequiredEvent": + return cast( + "V1InvoicePaymentActionRequiredEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoicePaymentActionRequiredEvent": + return cast( + "V1InvoicePaymentActionRequiredEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoicePaymentActionRequiredEvent(Event): + LOOKUP_TYPE = "v1.invoice.payment_action_required" + type: Literal["v1.invoice.payment_action_required"] + + 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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_payment_attempt_required_event.py b/stripe/events/_v1_invoice_payment_attempt_required_event.py new file mode 100644 index 000000000..239b2bad6 --- /dev/null +++ b/stripe/events/_v1_invoice_payment_attempt_required_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoicePaymentAttemptRequiredEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.payment_attempt_required" + type: Literal["v1.invoice.payment_attempt_required"] + 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) -> "V1InvoicePaymentAttemptRequiredEvent": + return cast( + "V1InvoicePaymentAttemptRequiredEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1InvoicePaymentAttemptRequiredEvent": + return cast( + "V1InvoicePaymentAttemptRequiredEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoicePaymentAttemptRequiredEvent(Event): + LOOKUP_TYPE = "v1.invoice.payment_attempt_required" + type: Literal["v1.invoice.payment_attempt_required"] + + 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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_payment_failed_event.py b/stripe/events/_v1_invoice_payment_failed_event.py new file mode 100644 index 000000000..dde134fa7 --- /dev/null +++ b/stripe/events/_v1_invoice_payment_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoicePaymentFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.payment_failed" + type: Literal["v1.invoice.payment_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) -> "V1InvoicePaymentFailedEvent": + return cast( + "V1InvoicePaymentFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoicePaymentFailedEvent": + return cast( + "V1InvoicePaymentFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoicePaymentFailedEvent(Event): + LOOKUP_TYPE = "v1.invoice.payment_failed" + type: Literal["v1.invoice.payment_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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_payment_paid_event.py b/stripe/events/_v1_invoice_payment_paid_event.py new file mode 100644 index 000000000..ae02db4dc --- /dev/null +++ b/stripe/events/_v1_invoice_payment_paid_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._invoice_payment import InvoicePayment + from stripe._stripe_client import StripeClient + + +class V1InvoicePaymentPaidEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice_payment.paid" + type: Literal["v1.invoice_payment.paid"] + 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) -> "V1InvoicePaymentPaidEvent": + return cast( + "V1InvoicePaymentPaidEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "InvoicePayment": + 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( + "InvoicePayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoicePaymentPaidEvent": + return cast( + "V1InvoicePaymentPaidEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "InvoicePayment": + 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( + "InvoicePayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoicePaymentPaidEvent(Event): + LOOKUP_TYPE = "v1.invoice_payment.paid" + type: Literal["v1.invoice_payment.paid"] + + 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) -> "InvoicePayment": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "InvoicePayment", + 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/_v1_invoice_payment_succeeded_event.py b/stripe/events/_v1_invoice_payment_succeeded_event.py new file mode 100644 index 000000000..28f951813 --- /dev/null +++ b/stripe/events/_v1_invoice_payment_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoicePaymentSucceededEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.payment_succeeded" + type: Literal["v1.invoice.payment_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) -> "V1InvoicePaymentSucceededEvent": + return cast( + "V1InvoicePaymentSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoicePaymentSucceededEvent": + return cast( + "V1InvoicePaymentSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoicePaymentSucceededEvent(Event): + LOOKUP_TYPE = "v1.invoice.payment_succeeded" + type: Literal["v1.invoice.payment_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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_sent_event.py b/stripe/events/_v1_invoice_sent_event.py new file mode 100644 index 000000000..2e7f00fe3 --- /dev/null +++ b/stripe/events/_v1_invoice_sent_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceSentEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.sent" + type: Literal["v1.invoice.sent"] + 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) -> "V1InvoiceSentEvent": + return cast( + "V1InvoiceSentEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceSentEvent": + return cast( + "V1InvoiceSentEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceSentEvent(Event): + LOOKUP_TYPE = "v1.invoice.sent" + type: Literal["v1.invoice.sent"] + + 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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_upcoming_event.py b/stripe/events/_v1_invoice_upcoming_event.py new file mode 100644 index 000000000..58f2fde2c --- /dev/null +++ b/stripe/events/_v1_invoice_upcoming_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceUpcomingEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.upcoming" + type: Literal["v1.invoice.upcoming"] + 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) -> "V1InvoiceUpcomingEvent": + return cast( + "V1InvoiceUpcomingEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceUpcomingEvent": + return cast( + "V1InvoiceUpcomingEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceUpcomingEvent(Event): + LOOKUP_TYPE = "v1.invoice.upcoming" + type: Literal["v1.invoice.upcoming"] + + 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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_updated_event.py b/stripe/events/_v1_invoice_updated_event.py new file mode 100644 index 000000000..86ae8254f --- /dev/null +++ b/stripe/events/_v1_invoice_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.updated" + type: Literal["v1.invoice.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) -> "V1InvoiceUpdatedEvent": + return cast( + "V1InvoiceUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceUpdatedEvent": + return cast( + "V1InvoiceUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceUpdatedEvent(Event): + LOOKUP_TYPE = "v1.invoice.updated" + type: Literal["v1.invoice.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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_voided_event.py b/stripe/events/_v1_invoice_voided_event.py new file mode 100644 index 000000000..80cc493ef --- /dev/null +++ b/stripe/events/_v1_invoice_voided_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceVoidedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.voided" + type: Literal["v1.invoice.voided"] + 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) -> "V1InvoiceVoidedEvent": + return cast( + "V1InvoiceVoidedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceVoidedEvent": + return cast( + "V1InvoiceVoidedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceVoidedEvent(Event): + LOOKUP_TYPE = "v1.invoice.voided" + type: Literal["v1.invoice.voided"] + + 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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoice_will_be_due_event.py b/stripe/events/_v1_invoice_will_be_due_event.py new file mode 100644 index 000000000..c38de509d --- /dev/null +++ b/stripe/events/_v1_invoice_will_be_due_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._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceWillBeDueEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.will_be_due" + type: Literal["v1.invoice.will_be_due"] + 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) -> "V1InvoiceWillBeDueEvent": + return cast( + "V1InvoiceWillBeDueEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceWillBeDueEvent": + return cast( + "V1InvoiceWillBeDueEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + 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( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceWillBeDueEvent(Event): + LOOKUP_TYPE = "v1.invoice.will_be_due" + type: Literal["v1.invoice.will_be_due"] + + 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) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + 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/_v1_invoiceitem_created_event.py b/stripe/events/_v1_invoiceitem_created_event.py new file mode 100644 index 000000000..e22e24cc5 --- /dev/null +++ b/stripe/events/_v1_invoiceitem_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._invoice_item import InvoiceItem + from stripe._stripe_client import StripeClient + + +class V1InvoiceitemCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoiceitem.created" + type: Literal["v1.invoiceitem.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) -> "V1InvoiceitemCreatedEvent": + return cast( + "V1InvoiceitemCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "InvoiceItem": + 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( + "InvoiceItem", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceitemCreatedEvent": + return cast( + "V1InvoiceitemCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "InvoiceItem": + 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( + "InvoiceItem", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceitemCreatedEvent(Event): + LOOKUP_TYPE = "v1.invoiceitem.created" + type: Literal["v1.invoiceitem.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) -> "InvoiceItem": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "InvoiceItem", + 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/_v1_invoiceitem_deleted_event.py b/stripe/events/_v1_invoiceitem_deleted_event.py new file mode 100644 index 000000000..0c7737464 --- /dev/null +++ b/stripe/events/_v1_invoiceitem_deleted_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._invoice_item import InvoiceItem + from stripe._stripe_client import StripeClient + + +class V1InvoiceitemDeletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoiceitem.deleted" + type: Literal["v1.invoiceitem.deleted"] + 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) -> "V1InvoiceitemDeletedEvent": + return cast( + "V1InvoiceitemDeletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "InvoiceItem": + 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( + "InvoiceItem", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceitemDeletedEvent": + return cast( + "V1InvoiceitemDeletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "InvoiceItem": + 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( + "InvoiceItem", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceitemDeletedEvent(Event): + LOOKUP_TYPE = "v1.invoiceitem.deleted" + type: Literal["v1.invoiceitem.deleted"] + + 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) -> "InvoiceItem": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "InvoiceItem", + 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/_v1_issuing_authorization_created_event.py b/stripe/events/_v1_issuing_authorization_created_event.py new file mode 100644 index 000000000..54fc6c999 --- /dev/null +++ b/stripe/events/_v1_issuing_authorization_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.issuing._authorization import Authorization + + +class V1IssuingAuthorizationCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_authorization.created" + type: Literal["v1.issuing_authorization.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) -> "V1IssuingAuthorizationCreatedEvent": + return cast( + "V1IssuingAuthorizationCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Authorization": + 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( + "Authorization", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingAuthorizationCreatedEvent": + return cast( + "V1IssuingAuthorizationCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Authorization": + 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( + "Authorization", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingAuthorizationCreatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_authorization.created" + type: Literal["v1.issuing_authorization.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) -> "Authorization": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Authorization", + 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/_v1_issuing_authorization_request_event.py b/stripe/events/_v1_issuing_authorization_request_event.py new file mode 100644 index 000000000..cf3584114 --- /dev/null +++ b/stripe/events/_v1_issuing_authorization_request_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.issuing._authorization import Authorization + + +class V1IssuingAuthorizationRequestEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_authorization.request" + type: Literal["v1.issuing_authorization.request"] + 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) -> "V1IssuingAuthorizationRequestEvent": + return cast( + "V1IssuingAuthorizationRequestEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Authorization": + 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( + "Authorization", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingAuthorizationRequestEvent": + return cast( + "V1IssuingAuthorizationRequestEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Authorization": + 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( + "Authorization", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingAuthorizationRequestEvent(Event): + LOOKUP_TYPE = "v1.issuing_authorization.request" + type: Literal["v1.issuing_authorization.request"] + + 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) -> "Authorization": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Authorization", + 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/_v1_issuing_authorization_updated_event.py b/stripe/events/_v1_issuing_authorization_updated_event.py new file mode 100644 index 000000000..b6ff24ec4 --- /dev/null +++ b/stripe/events/_v1_issuing_authorization_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.issuing._authorization import Authorization + + +class V1IssuingAuthorizationUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_authorization.updated" + type: Literal["v1.issuing_authorization.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) -> "V1IssuingAuthorizationUpdatedEvent": + return cast( + "V1IssuingAuthorizationUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Authorization": + 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( + "Authorization", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingAuthorizationUpdatedEvent": + return cast( + "V1IssuingAuthorizationUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Authorization": + 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( + "Authorization", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingAuthorizationUpdatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_authorization.updated" + type: Literal["v1.issuing_authorization.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) -> "Authorization": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Authorization", + 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/_v1_issuing_card_created_event.py b/stripe/events/_v1_issuing_card_created_event.py new file mode 100644 index 000000000..891fd71b2 --- /dev/null +++ b/stripe/events/_v1_issuing_card_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.issuing._card import Card + + +class V1IssuingCardCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_card.created" + type: Literal["v1.issuing_card.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) -> "V1IssuingCardCreatedEvent": + return cast( + "V1IssuingCardCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Card": + 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( + "Card", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingCardCreatedEvent": + return cast( + "V1IssuingCardCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Card": + 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( + "Card", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingCardCreatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_card.created" + type: Literal["v1.issuing_card.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) -> "Card": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Card", + 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/_v1_issuing_card_updated_event.py b/stripe/events/_v1_issuing_card_updated_event.py new file mode 100644 index 000000000..0023dd295 --- /dev/null +++ b/stripe/events/_v1_issuing_card_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.issuing._card import Card + + +class V1IssuingCardUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_card.updated" + type: Literal["v1.issuing_card.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) -> "V1IssuingCardUpdatedEvent": + return cast( + "V1IssuingCardUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Card": + 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( + "Card", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingCardUpdatedEvent": + return cast( + "V1IssuingCardUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Card": + 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( + "Card", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingCardUpdatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_card.updated" + type: Literal["v1.issuing_card.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) -> "Card": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Card", + 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/_v1_issuing_cardholder_created_event.py b/stripe/events/_v1_issuing_cardholder_created_event.py new file mode 100644 index 000000000..39b963eeb --- /dev/null +++ b/stripe/events/_v1_issuing_cardholder_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.issuing._cardholder import Cardholder + + +class V1IssuingCardholderCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_cardholder.created" + type: Literal["v1.issuing_cardholder.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) -> "V1IssuingCardholderCreatedEvent": + return cast( + "V1IssuingCardholderCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Cardholder": + 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( + "Cardholder", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingCardholderCreatedEvent": + return cast( + "V1IssuingCardholderCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Cardholder": + 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( + "Cardholder", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingCardholderCreatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_cardholder.created" + type: Literal["v1.issuing_cardholder.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) -> "Cardholder": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Cardholder", + 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/_v1_issuing_cardholder_updated_event.py b/stripe/events/_v1_issuing_cardholder_updated_event.py new file mode 100644 index 000000000..fa219da33 --- /dev/null +++ b/stripe/events/_v1_issuing_cardholder_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.issuing._cardholder import Cardholder + + +class V1IssuingCardholderUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_cardholder.updated" + type: Literal["v1.issuing_cardholder.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) -> "V1IssuingCardholderUpdatedEvent": + return cast( + "V1IssuingCardholderUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Cardholder": + 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( + "Cardholder", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingCardholderUpdatedEvent": + return cast( + "V1IssuingCardholderUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Cardholder": + 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( + "Cardholder", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingCardholderUpdatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_cardholder.updated" + type: Literal["v1.issuing_cardholder.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) -> "Cardholder": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Cardholder", + 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/_v1_issuing_dispute_closed_event.py b/stripe/events/_v1_issuing_dispute_closed_event.py new file mode 100644 index 000000000..f0d6ece40 --- /dev/null +++ b/stripe/events/_v1_issuing_dispute_closed_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.issuing._dispute import Dispute + + +class V1IssuingDisputeClosedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_dispute.closed" + type: Literal["v1.issuing_dispute.closed"] + 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) -> "V1IssuingDisputeClosedEvent": + return cast( + "V1IssuingDisputeClosedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingDisputeClosedEvent": + return cast( + "V1IssuingDisputeClosedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingDisputeClosedEvent(Event): + LOOKUP_TYPE = "v1.issuing_dispute.closed" + type: Literal["v1.issuing_dispute.closed"] + + 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) -> "Dispute": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Dispute", + 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/_v1_issuing_dispute_created_event.py b/stripe/events/_v1_issuing_dispute_created_event.py new file mode 100644 index 000000000..f1db95f6f --- /dev/null +++ b/stripe/events/_v1_issuing_dispute_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.issuing._dispute import Dispute + + +class V1IssuingDisputeCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_dispute.created" + type: Literal["v1.issuing_dispute.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) -> "V1IssuingDisputeCreatedEvent": + return cast( + "V1IssuingDisputeCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingDisputeCreatedEvent": + return cast( + "V1IssuingDisputeCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingDisputeCreatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_dispute.created" + type: Literal["v1.issuing_dispute.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) -> "Dispute": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Dispute", + 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/_v1_issuing_dispute_funds_reinstated_event.py b/stripe/events/_v1_issuing_dispute_funds_reinstated_event.py new file mode 100644 index 000000000..d56592925 --- /dev/null +++ b/stripe/events/_v1_issuing_dispute_funds_reinstated_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.issuing._dispute import Dispute + + +class V1IssuingDisputeFundsReinstatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_dispute.funds_reinstated" + type: Literal["v1.issuing_dispute.funds_reinstated"] + 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) -> "V1IssuingDisputeFundsReinstatedEvent": + return cast( + "V1IssuingDisputeFundsReinstatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1IssuingDisputeFundsReinstatedEvent": + return cast( + "V1IssuingDisputeFundsReinstatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingDisputeFundsReinstatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_dispute.funds_reinstated" + type: Literal["v1.issuing_dispute.funds_reinstated"] + + 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) -> "Dispute": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Dispute", + 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/_v1_issuing_dispute_funds_rescinded_event.py b/stripe/events/_v1_issuing_dispute_funds_rescinded_event.py new file mode 100644 index 000000000..ab3b97d92 --- /dev/null +++ b/stripe/events/_v1_issuing_dispute_funds_rescinded_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.issuing._dispute import Dispute + + +class V1IssuingDisputeFundsRescindedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_dispute.funds_rescinded" + type: Literal["v1.issuing_dispute.funds_rescinded"] + 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) -> "V1IssuingDisputeFundsRescindedEvent": + return cast( + "V1IssuingDisputeFundsRescindedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingDisputeFundsRescindedEvent": + return cast( + "V1IssuingDisputeFundsRescindedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingDisputeFundsRescindedEvent(Event): + LOOKUP_TYPE = "v1.issuing_dispute.funds_rescinded" + type: Literal["v1.issuing_dispute.funds_rescinded"] + + 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) -> "Dispute": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Dispute", + 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/_v1_issuing_dispute_submitted_event.py b/stripe/events/_v1_issuing_dispute_submitted_event.py new file mode 100644 index 000000000..b3ab651d6 --- /dev/null +++ b/stripe/events/_v1_issuing_dispute_submitted_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.issuing._dispute import Dispute + + +class V1IssuingDisputeSubmittedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_dispute.submitted" + type: Literal["v1.issuing_dispute.submitted"] + 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) -> "V1IssuingDisputeSubmittedEvent": + return cast( + "V1IssuingDisputeSubmittedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingDisputeSubmittedEvent": + return cast( + "V1IssuingDisputeSubmittedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingDisputeSubmittedEvent(Event): + LOOKUP_TYPE = "v1.issuing_dispute.submitted" + type: Literal["v1.issuing_dispute.submitted"] + + 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) -> "Dispute": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Dispute", + 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/_v1_issuing_dispute_updated_event.py b/stripe/events/_v1_issuing_dispute_updated_event.py new file mode 100644 index 000000000..b1064288f --- /dev/null +++ b/stripe/events/_v1_issuing_dispute_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.issuing._dispute import Dispute + + +class V1IssuingDisputeUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_dispute.updated" + type: Literal["v1.issuing_dispute.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) -> "V1IssuingDisputeUpdatedEvent": + return cast( + "V1IssuingDisputeUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingDisputeUpdatedEvent": + return cast( + "V1IssuingDisputeUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Dispute": + 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( + "Dispute", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingDisputeUpdatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_dispute.updated" + type: Literal["v1.issuing_dispute.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) -> "Dispute": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Dispute", + 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/_v1_issuing_personalization_design_activated_event.py b/stripe/events/_v1_issuing_personalization_design_activated_event.py new file mode 100644 index 000000000..f8d6c3c5a --- /dev/null +++ b/stripe/events/_v1_issuing_personalization_design_activated_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.issuing._personalization_design import PersonalizationDesign + + +class V1IssuingPersonalizationDesignActivatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.issuing_personalization_design.activated" + type: Literal["v1.issuing_personalization_design.activated"] + 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) -> "V1IssuingPersonalizationDesignActivatedEvent": + return cast( + "V1IssuingPersonalizationDesignActivatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PersonalizationDesign": + 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( + "PersonalizationDesign", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1IssuingPersonalizationDesignActivatedEvent": + return cast( + "V1IssuingPersonalizationDesignActivatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PersonalizationDesign": + 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( + "PersonalizationDesign", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingPersonalizationDesignActivatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_personalization_design.activated" + type: Literal["v1.issuing_personalization_design.activated"] + + 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) -> "PersonalizationDesign": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PersonalizationDesign", + 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/_v1_issuing_personalization_design_deactivated_event.py b/stripe/events/_v1_issuing_personalization_design_deactivated_event.py new file mode 100644 index 000000000..ff266eda5 --- /dev/null +++ b/stripe/events/_v1_issuing_personalization_design_deactivated_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.issuing._personalization_design import PersonalizationDesign + + +class V1IssuingPersonalizationDesignDeactivatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.issuing_personalization_design.deactivated" + type: Literal["v1.issuing_personalization_design.deactivated"] + 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) -> "V1IssuingPersonalizationDesignDeactivatedEvent": + return cast( + "V1IssuingPersonalizationDesignDeactivatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PersonalizationDesign": + 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( + "PersonalizationDesign", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1IssuingPersonalizationDesignDeactivatedEvent": + return cast( + "V1IssuingPersonalizationDesignDeactivatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PersonalizationDesign": + 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( + "PersonalizationDesign", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingPersonalizationDesignDeactivatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_personalization_design.deactivated" + type: Literal["v1.issuing_personalization_design.deactivated"] + + 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) -> "PersonalizationDesign": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PersonalizationDesign", + 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/_v1_issuing_personalization_design_rejected_event.py b/stripe/events/_v1_issuing_personalization_design_rejected_event.py new file mode 100644 index 000000000..e603cc701 --- /dev/null +++ b/stripe/events/_v1_issuing_personalization_design_rejected_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.issuing._personalization_design import PersonalizationDesign + + +class V1IssuingPersonalizationDesignRejectedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.issuing_personalization_design.rejected" + type: Literal["v1.issuing_personalization_design.rejected"] + 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) -> "V1IssuingPersonalizationDesignRejectedEvent": + return cast( + "V1IssuingPersonalizationDesignRejectedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PersonalizationDesign": + 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( + "PersonalizationDesign", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1IssuingPersonalizationDesignRejectedEvent": + return cast( + "V1IssuingPersonalizationDesignRejectedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PersonalizationDesign": + 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( + "PersonalizationDesign", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingPersonalizationDesignRejectedEvent(Event): + LOOKUP_TYPE = "v1.issuing_personalization_design.rejected" + type: Literal["v1.issuing_personalization_design.rejected"] + + 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) -> "PersonalizationDesign": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PersonalizationDesign", + 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/_v1_issuing_personalization_design_updated_event.py b/stripe/events/_v1_issuing_personalization_design_updated_event.py new file mode 100644 index 000000000..d108f6c18 --- /dev/null +++ b/stripe/events/_v1_issuing_personalization_design_updated_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.issuing._personalization_design import PersonalizationDesign + + +class V1IssuingPersonalizationDesignUpdatedEventNotification( + EventNotification +): + LOOKUP_TYPE = "v1.issuing_personalization_design.updated" + type: Literal["v1.issuing_personalization_design.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) -> "V1IssuingPersonalizationDesignUpdatedEvent": + return cast( + "V1IssuingPersonalizationDesignUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PersonalizationDesign": + 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( + "PersonalizationDesign", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1IssuingPersonalizationDesignUpdatedEvent": + return cast( + "V1IssuingPersonalizationDesignUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PersonalizationDesign": + 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( + "PersonalizationDesign", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingPersonalizationDesignUpdatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_personalization_design.updated" + type: Literal["v1.issuing_personalization_design.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) -> "PersonalizationDesign": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PersonalizationDesign", + 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/_v1_issuing_token_created_event.py b/stripe/events/_v1_issuing_token_created_event.py new file mode 100644 index 000000000..c4f1da883 --- /dev/null +++ b/stripe/events/_v1_issuing_token_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.issuing._token import Token + + +class V1IssuingTokenCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_token.created" + type: Literal["v1.issuing_token.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) -> "V1IssuingTokenCreatedEvent": + return cast( + "V1IssuingTokenCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Token": + 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( + "Token", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingTokenCreatedEvent": + return cast( + "V1IssuingTokenCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Token": + 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( + "Token", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingTokenCreatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_token.created" + type: Literal["v1.issuing_token.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) -> "Token": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Token", + 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/_v1_issuing_token_updated_event.py b/stripe/events/_v1_issuing_token_updated_event.py new file mode 100644 index 000000000..e62f845ae --- /dev/null +++ b/stripe/events/_v1_issuing_token_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.issuing._token import Token + + +class V1IssuingTokenUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_token.updated" + type: Literal["v1.issuing_token.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) -> "V1IssuingTokenUpdatedEvent": + return cast( + "V1IssuingTokenUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Token": + 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( + "Token", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingTokenUpdatedEvent": + return cast( + "V1IssuingTokenUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Token": + 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( + "Token", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingTokenUpdatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_token.updated" + type: Literal["v1.issuing_token.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) -> "Token": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Token", + 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/_v1_issuing_transaction_created_event.py b/stripe/events/_v1_issuing_transaction_created_event.py new file mode 100644 index 000000000..5cddfd2a6 --- /dev/null +++ b/stripe/events/_v1_issuing_transaction_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.issuing._transaction import Transaction + + +class V1IssuingTransactionCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_transaction.created" + type: Literal["v1.issuing_transaction.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) -> "V1IssuingTransactionCreatedEvent": + return cast( + "V1IssuingTransactionCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Transaction": + 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( + "Transaction", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingTransactionCreatedEvent": + return cast( + "V1IssuingTransactionCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Transaction": + 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( + "Transaction", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingTransactionCreatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_transaction.created" + type: Literal["v1.issuing_transaction.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) -> "Transaction": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Transaction", + 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/_v1_issuing_transaction_purchase_details_receipt_updated_event.py b/stripe/events/_v1_issuing_transaction_purchase_details_receipt_updated_event.py new file mode 100644 index 000000000..6987b30be --- /dev/null +++ b/stripe/events/_v1_issuing_transaction_purchase_details_receipt_updated_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.issuing._transaction import Transaction + + +class V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.issuing_transaction.purchase_details_receipt_updated" + type: Literal["v1.issuing_transaction.purchase_details_receipt_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, + ) -> "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent": + return cast( + "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Transaction": + 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( + "Transaction", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent": + return cast( + "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Transaction": + 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( + "Transaction", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_transaction.purchase_details_receipt_updated" + type: Literal["v1.issuing_transaction.purchase_details_receipt_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) -> "Transaction": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Transaction", + 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/_v1_issuing_transaction_updated_event.py b/stripe/events/_v1_issuing_transaction_updated_event.py new file mode 100644 index 000000000..2b1ac1cd7 --- /dev/null +++ b/stripe/events/_v1_issuing_transaction_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.issuing._transaction import Transaction + + +class V1IssuingTransactionUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.issuing_transaction.updated" + type: Literal["v1.issuing_transaction.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) -> "V1IssuingTransactionUpdatedEvent": + return cast( + "V1IssuingTransactionUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Transaction": + 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( + "Transaction", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1IssuingTransactionUpdatedEvent": + return cast( + "V1IssuingTransactionUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Transaction": + 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( + "Transaction", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1IssuingTransactionUpdatedEvent(Event): + LOOKUP_TYPE = "v1.issuing_transaction.updated" + type: Literal["v1.issuing_transaction.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) -> "Transaction": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Transaction", + 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/_v1_mandate_updated_event.py b/stripe/events/_v1_mandate_updated_event.py new file mode 100644 index 000000000..0fc7e7a83 --- /dev/null +++ b/stripe/events/_v1_mandate_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._mandate import Mandate + from stripe._stripe_client import StripeClient + + +class V1MandateUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.mandate.updated" + type: Literal["v1.mandate.updated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1MandateUpdatedEvent": + return cast( + "V1MandateUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Mandate": + 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( + "Mandate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1MandateUpdatedEvent": + return cast( + "V1MandateUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Mandate": + 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( + "Mandate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1MandateUpdatedEvent(Event): + LOOKUP_TYPE = "v1.mandate.updated" + type: Literal["v1.mandate.updated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Mandate": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Mandate", + 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/_v1_payment_intent_amount_capturable_updated_event.py b/stripe/events/_v1_payment_intent_amount_capturable_updated_event.py new file mode 100644 index 000000000..d79e238c7 --- /dev/null +++ b/stripe/events/_v1_payment_intent_amount_capturable_updated_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._payment_intent import PaymentIntent + from stripe._stripe_client import StripeClient + + +class V1PaymentIntentAmountCapturableUpdatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.payment_intent.amount_capturable_updated" + type: Literal["v1.payment_intent.amount_capturable_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) -> "V1PaymentIntentAmountCapturableUpdatedEvent": + return cast( + "V1PaymentIntentAmountCapturableUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1PaymentIntentAmountCapturableUpdatedEvent": + return cast( + "V1PaymentIntentAmountCapturableUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PaymentIntentAmountCapturableUpdatedEvent(Event): + LOOKUP_TYPE = "v1.payment_intent.amount_capturable_updated" + type: Literal["v1.payment_intent.amount_capturable_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) -> "PaymentIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentIntent", + 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/_v1_payment_intent_canceled_event.py b/stripe/events/_v1_payment_intent_canceled_event.py new file mode 100644 index 000000000..28f03d692 --- /dev/null +++ b/stripe/events/_v1_payment_intent_canceled_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._payment_intent import PaymentIntent + from stripe._stripe_client import StripeClient + + +class V1PaymentIntentCanceledEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payment_intent.canceled" + type: Literal["v1.payment_intent.canceled"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1PaymentIntentCanceledEvent": + return cast( + "V1PaymentIntentCanceledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PaymentIntentCanceledEvent": + return cast( + "V1PaymentIntentCanceledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PaymentIntentCanceledEvent(Event): + LOOKUP_TYPE = "v1.payment_intent.canceled" + type: Literal["v1.payment_intent.canceled"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "PaymentIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentIntent", + 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/_v1_payment_intent_created_event.py b/stripe/events/_v1_payment_intent_created_event.py new file mode 100644 index 000000000..7bf143cc6 --- /dev/null +++ b/stripe/events/_v1_payment_intent_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._payment_intent import PaymentIntent + from stripe._stripe_client import StripeClient + + +class V1PaymentIntentCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payment_intent.created" + type: Literal["v1.payment_intent.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) -> "V1PaymentIntentCreatedEvent": + return cast( + "V1PaymentIntentCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PaymentIntentCreatedEvent": + return cast( + "V1PaymentIntentCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PaymentIntentCreatedEvent(Event): + LOOKUP_TYPE = "v1.payment_intent.created" + type: Literal["v1.payment_intent.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) -> "PaymentIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentIntent", + 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/_v1_payment_intent_partially_funded_event.py b/stripe/events/_v1_payment_intent_partially_funded_event.py new file mode 100644 index 000000000..8751dc183 --- /dev/null +++ b/stripe/events/_v1_payment_intent_partially_funded_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._payment_intent import PaymentIntent + from stripe._stripe_client import StripeClient + + +class V1PaymentIntentPartiallyFundedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payment_intent.partially_funded" + type: Literal["v1.payment_intent.partially_funded"] + 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) -> "V1PaymentIntentPartiallyFundedEvent": + return cast( + "V1PaymentIntentPartiallyFundedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PaymentIntentPartiallyFundedEvent": + return cast( + "V1PaymentIntentPartiallyFundedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PaymentIntentPartiallyFundedEvent(Event): + LOOKUP_TYPE = "v1.payment_intent.partially_funded" + type: Literal["v1.payment_intent.partially_funded"] + + 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) -> "PaymentIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentIntent", + 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/_v1_payment_intent_payment_failed_event.py b/stripe/events/_v1_payment_intent_payment_failed_event.py new file mode 100644 index 000000000..d31474cf9 --- /dev/null +++ b/stripe/events/_v1_payment_intent_payment_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._payment_intent import PaymentIntent + from stripe._stripe_client import StripeClient + + +class V1PaymentIntentPaymentFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payment_intent.payment_failed" + type: Literal["v1.payment_intent.payment_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) -> "V1PaymentIntentPaymentFailedEvent": + return cast( + "V1PaymentIntentPaymentFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PaymentIntentPaymentFailedEvent": + return cast( + "V1PaymentIntentPaymentFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PaymentIntentPaymentFailedEvent(Event): + LOOKUP_TYPE = "v1.payment_intent.payment_failed" + type: Literal["v1.payment_intent.payment_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) -> "PaymentIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentIntent", + 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/_v1_payment_intent_processing_event.py b/stripe/events/_v1_payment_intent_processing_event.py new file mode 100644 index 000000000..512bfb516 --- /dev/null +++ b/stripe/events/_v1_payment_intent_processing_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._payment_intent import PaymentIntent + from stripe._stripe_client import StripeClient + + +class V1PaymentIntentProcessingEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payment_intent.processing" + type: Literal["v1.payment_intent.processing"] + 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) -> "V1PaymentIntentProcessingEvent": + return cast( + "V1PaymentIntentProcessingEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PaymentIntentProcessingEvent": + return cast( + "V1PaymentIntentProcessingEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PaymentIntentProcessingEvent(Event): + LOOKUP_TYPE = "v1.payment_intent.processing" + type: Literal["v1.payment_intent.processing"] + + 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) -> "PaymentIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentIntent", + 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/_v1_payment_intent_requires_action_event.py b/stripe/events/_v1_payment_intent_requires_action_event.py new file mode 100644 index 000000000..1539b0076 --- /dev/null +++ b/stripe/events/_v1_payment_intent_requires_action_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._payment_intent import PaymentIntent + from stripe._stripe_client import StripeClient + + +class V1PaymentIntentRequiresActionEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payment_intent.requires_action" + type: Literal["v1.payment_intent.requires_action"] + 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) -> "V1PaymentIntentRequiresActionEvent": + return cast( + "V1PaymentIntentRequiresActionEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PaymentIntentRequiresActionEvent": + return cast( + "V1PaymentIntentRequiresActionEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PaymentIntentRequiresActionEvent(Event): + LOOKUP_TYPE = "v1.payment_intent.requires_action" + type: Literal["v1.payment_intent.requires_action"] + + 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) -> "PaymentIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentIntent", + 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/_v1_payment_intent_succeeded_event.py b/stripe/events/_v1_payment_intent_succeeded_event.py new file mode 100644 index 000000000..ba09757bc --- /dev/null +++ b/stripe/events/_v1_payment_intent_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._payment_intent import PaymentIntent + from stripe._stripe_client import StripeClient + + +class V1PaymentIntentSucceededEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payment_intent.succeeded" + type: Literal["v1.payment_intent.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) -> "V1PaymentIntentSucceededEvent": + return cast( + "V1PaymentIntentSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PaymentIntentSucceededEvent": + return cast( + "V1PaymentIntentSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentIntent": + 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( + "PaymentIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PaymentIntentSucceededEvent(Event): + LOOKUP_TYPE = "v1.payment_intent.succeeded" + type: Literal["v1.payment_intent.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) -> "PaymentIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentIntent", + 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/_v1_payment_link_created_event.py b/stripe/events/_v1_payment_link_created_event.py new file mode 100644 index 000000000..866bb6a36 --- /dev/null +++ b/stripe/events/_v1_payment_link_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._payment_link import PaymentLink + from stripe._stripe_client import StripeClient + + +class V1PaymentLinkCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payment_link.created" + type: Literal["v1.payment_link.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) -> "V1PaymentLinkCreatedEvent": + return cast( + "V1PaymentLinkCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentLink": + 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( + "PaymentLink", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PaymentLinkCreatedEvent": + return cast( + "V1PaymentLinkCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentLink": + 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( + "PaymentLink", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PaymentLinkCreatedEvent(Event): + LOOKUP_TYPE = "v1.payment_link.created" + type: Literal["v1.payment_link.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) -> "PaymentLink": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentLink", + 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/_v1_payment_link_updated_event.py b/stripe/events/_v1_payment_link_updated_event.py new file mode 100644 index 000000000..58c595ebe --- /dev/null +++ b/stripe/events/_v1_payment_link_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._payment_link import PaymentLink + from stripe._stripe_client import StripeClient + + +class V1PaymentLinkUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payment_link.updated" + type: Literal["v1.payment_link.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) -> "V1PaymentLinkUpdatedEvent": + return cast( + "V1PaymentLinkUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentLink": + 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( + "PaymentLink", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PaymentLinkUpdatedEvent": + return cast( + "V1PaymentLinkUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentLink": + 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( + "PaymentLink", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PaymentLinkUpdatedEvent(Event): + LOOKUP_TYPE = "v1.payment_link.updated" + type: Literal["v1.payment_link.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) -> "PaymentLink": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentLink", + 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/_v1_payment_method_attached_event.py b/stripe/events/_v1_payment_method_attached_event.py new file mode 100644 index 000000000..e035af46e --- /dev/null +++ b/stripe/events/_v1_payment_method_attached_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._payment_method import PaymentMethod + from stripe._stripe_client import StripeClient + + +class V1PaymentMethodAttachedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payment_method.attached" + type: Literal["v1.payment_method.attached"] + 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) -> "V1PaymentMethodAttachedEvent": + return cast( + "V1PaymentMethodAttachedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentMethod": + 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( + "PaymentMethod", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PaymentMethodAttachedEvent": + return cast( + "V1PaymentMethodAttachedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentMethod": + 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( + "PaymentMethod", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PaymentMethodAttachedEvent(Event): + LOOKUP_TYPE = "v1.payment_method.attached" + type: Literal["v1.payment_method.attached"] + + 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) -> "PaymentMethod": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentMethod", + 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/_v1_payment_method_automatically_updated_event.py b/stripe/events/_v1_payment_method_automatically_updated_event.py new file mode 100644 index 000000000..e9f282e55 --- /dev/null +++ b/stripe/events/_v1_payment_method_automatically_updated_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._payment_method import PaymentMethod + from stripe._stripe_client import StripeClient + + +class V1PaymentMethodAutomaticallyUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payment_method.automatically_updated" + type: Literal["v1.payment_method.automatically_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) -> "V1PaymentMethodAutomaticallyUpdatedEvent": + return cast( + "V1PaymentMethodAutomaticallyUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentMethod": + 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( + "PaymentMethod", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1PaymentMethodAutomaticallyUpdatedEvent": + return cast( + "V1PaymentMethodAutomaticallyUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentMethod": + 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( + "PaymentMethod", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PaymentMethodAutomaticallyUpdatedEvent(Event): + LOOKUP_TYPE = "v1.payment_method.automatically_updated" + type: Literal["v1.payment_method.automatically_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) -> "PaymentMethod": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentMethod", + 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/_v1_payment_method_detached_event.py b/stripe/events/_v1_payment_method_detached_event.py new file mode 100644 index 000000000..529a5d93b --- /dev/null +++ b/stripe/events/_v1_payment_method_detached_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._payment_method import PaymentMethod + from stripe._stripe_client import StripeClient + + +class V1PaymentMethodDetachedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payment_method.detached" + type: Literal["v1.payment_method.detached"] + 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) -> "V1PaymentMethodDetachedEvent": + return cast( + "V1PaymentMethodDetachedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentMethod": + 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( + "PaymentMethod", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PaymentMethodDetachedEvent": + return cast( + "V1PaymentMethodDetachedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentMethod": + 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( + "PaymentMethod", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PaymentMethodDetachedEvent(Event): + LOOKUP_TYPE = "v1.payment_method.detached" + type: Literal["v1.payment_method.detached"] + + 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) -> "PaymentMethod": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentMethod", + 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/_v1_payment_method_updated_event.py b/stripe/events/_v1_payment_method_updated_event.py new file mode 100644 index 000000000..79dccc516 --- /dev/null +++ b/stripe/events/_v1_payment_method_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._payment_method import PaymentMethod + from stripe._stripe_client import StripeClient + + +class V1PaymentMethodUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payment_method.updated" + type: Literal["v1.payment_method.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) -> "V1PaymentMethodUpdatedEvent": + return cast( + "V1PaymentMethodUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PaymentMethod": + 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( + "PaymentMethod", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PaymentMethodUpdatedEvent": + return cast( + "V1PaymentMethodUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PaymentMethod": + 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( + "PaymentMethod", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PaymentMethodUpdatedEvent(Event): + LOOKUP_TYPE = "v1.payment_method.updated" + type: Literal["v1.payment_method.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) -> "PaymentMethod": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PaymentMethod", + 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/_v1_payout_canceled_event.py b/stripe/events/_v1_payout_canceled_event.py new file mode 100644 index 000000000..cb8eba5ac --- /dev/null +++ b/stripe/events/_v1_payout_canceled_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._payout import Payout + from stripe._stripe_client import StripeClient + + +class V1PayoutCanceledEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payout.canceled" + type: Literal["v1.payout.canceled"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1PayoutCanceledEvent": + return cast( + "V1PayoutCanceledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Payout": + 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( + "Payout", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PayoutCanceledEvent": + return cast( + "V1PayoutCanceledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Payout": + 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( + "Payout", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PayoutCanceledEvent(Event): + LOOKUP_TYPE = "v1.payout.canceled" + type: Literal["v1.payout.canceled"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Payout": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Payout", + 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/_v1_payout_created_event.py b/stripe/events/_v1_payout_created_event.py new file mode 100644 index 000000000..89908d300 --- /dev/null +++ b/stripe/events/_v1_payout_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._payout import Payout + from stripe._stripe_client import StripeClient + + +class V1PayoutCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payout.created" + type: Literal["v1.payout.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) -> "V1PayoutCreatedEvent": + return cast( + "V1PayoutCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Payout": + 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( + "Payout", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PayoutCreatedEvent": + return cast( + "V1PayoutCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Payout": + 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( + "Payout", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PayoutCreatedEvent(Event): + LOOKUP_TYPE = "v1.payout.created" + type: Literal["v1.payout.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) -> "Payout": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Payout", + 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/_v1_payout_failed_event.py b/stripe/events/_v1_payout_failed_event.py new file mode 100644 index 000000000..f17aff68e --- /dev/null +++ b/stripe/events/_v1_payout_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._payout import Payout + from stripe._stripe_client import StripeClient + + +class V1PayoutFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payout.failed" + type: Literal["v1.payout.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) -> "V1PayoutFailedEvent": + return cast( + "V1PayoutFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Payout": + 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( + "Payout", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PayoutFailedEvent": + return cast( + "V1PayoutFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Payout": + 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( + "Payout", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PayoutFailedEvent(Event): + LOOKUP_TYPE = "v1.payout.failed" + type: Literal["v1.payout.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) -> "Payout": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Payout", + 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/_v1_payout_paid_event.py b/stripe/events/_v1_payout_paid_event.py new file mode 100644 index 000000000..742eea11e --- /dev/null +++ b/stripe/events/_v1_payout_paid_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._payout import Payout + from stripe._stripe_client import StripeClient + + +class V1PayoutPaidEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payout.paid" + type: Literal["v1.payout.paid"] + 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) -> "V1PayoutPaidEvent": + return cast( + "V1PayoutPaidEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Payout": + 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( + "Payout", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PayoutPaidEvent": + return cast( + "V1PayoutPaidEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Payout": + 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( + "Payout", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PayoutPaidEvent(Event): + LOOKUP_TYPE = "v1.payout.paid" + type: Literal["v1.payout.paid"] + + 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) -> "Payout": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Payout", + 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/_v1_payout_reconciliation_completed_event.py b/stripe/events/_v1_payout_reconciliation_completed_event.py new file mode 100644 index 000000000..76fe7bc76 --- /dev/null +++ b/stripe/events/_v1_payout_reconciliation_completed_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._payout import Payout + from stripe._stripe_client import StripeClient + + +class V1PayoutReconciliationCompletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payout.reconciliation_completed" + type: Literal["v1.payout.reconciliation_completed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1PayoutReconciliationCompletedEvent": + return cast( + "V1PayoutReconciliationCompletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Payout": + 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( + "Payout", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1PayoutReconciliationCompletedEvent": + return cast( + "V1PayoutReconciliationCompletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Payout": + 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( + "Payout", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PayoutReconciliationCompletedEvent(Event): + LOOKUP_TYPE = "v1.payout.reconciliation_completed" + type: Literal["v1.payout.reconciliation_completed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Payout": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Payout", + 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/_v1_payout_updated_event.py b/stripe/events/_v1_payout_updated_event.py new file mode 100644 index 000000000..fd8749f44 --- /dev/null +++ b/stripe/events/_v1_payout_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._payout import Payout + from stripe._stripe_client import StripeClient + + +class V1PayoutUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.payout.updated" + type: Literal["v1.payout.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) -> "V1PayoutUpdatedEvent": + return cast( + "V1PayoutUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Payout": + 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( + "Payout", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PayoutUpdatedEvent": + return cast( + "V1PayoutUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Payout": + 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( + "Payout", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PayoutUpdatedEvent(Event): + LOOKUP_TYPE = "v1.payout.updated" + type: Literal["v1.payout.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) -> "Payout": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Payout", + 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/_v1_person_created_event.py b/stripe/events/_v1_person_created_event.py new file mode 100644 index 000000000..6c14aab3e --- /dev/null +++ b/stripe/events/_v1_person_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._person import Person + from stripe._stripe_client import StripeClient + + +class V1PersonCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.person.created" + type: Literal["v1.person.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) -> "V1PersonCreatedEvent": + return cast( + "V1PersonCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Person": + 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( + "Person", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PersonCreatedEvent": + return cast( + "V1PersonCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Person": + 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( + "Person", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PersonCreatedEvent(Event): + LOOKUP_TYPE = "v1.person.created" + type: Literal["v1.person.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) -> "Person": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Person", + 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/_v1_person_deleted_event.py b/stripe/events/_v1_person_deleted_event.py new file mode 100644 index 000000000..72c42a9e3 --- /dev/null +++ b/stripe/events/_v1_person_deleted_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._person import Person + from stripe._stripe_client import StripeClient + + +class V1PersonDeletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.person.deleted" + type: Literal["v1.person.deleted"] + 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) -> "V1PersonDeletedEvent": + return cast( + "V1PersonDeletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Person": + 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( + "Person", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PersonDeletedEvent": + return cast( + "V1PersonDeletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Person": + 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( + "Person", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PersonDeletedEvent(Event): + LOOKUP_TYPE = "v1.person.deleted" + type: Literal["v1.person.deleted"] + + 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) -> "Person": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Person", + 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/_v1_person_updated_event.py b/stripe/events/_v1_person_updated_event.py new file mode 100644 index 000000000..8cd8a5ed5 --- /dev/null +++ b/stripe/events/_v1_person_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._person import Person + from stripe._stripe_client import StripeClient + + +class V1PersonUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.person.updated" + type: Literal["v1.person.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) -> "V1PersonUpdatedEvent": + return cast( + "V1PersonUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Person": + 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( + "Person", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PersonUpdatedEvent": + return cast( + "V1PersonUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Person": + 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( + "Person", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PersonUpdatedEvent(Event): + LOOKUP_TYPE = "v1.person.updated" + type: Literal["v1.person.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) -> "Person": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Person", + 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/_v1_plan_created_event.py b/stripe/events/_v1_plan_created_event.py new file mode 100644 index 000000000..32c5d6256 --- /dev/null +++ b/stripe/events/_v1_plan_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._plan import Plan + from stripe._stripe_client import StripeClient + + +class V1PlanCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.plan.created" + type: Literal["v1.plan.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) -> "V1PlanCreatedEvent": + return cast( + "V1PlanCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Plan": + 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( + "Plan", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PlanCreatedEvent": + return cast( + "V1PlanCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Plan": + 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( + "Plan", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PlanCreatedEvent(Event): + LOOKUP_TYPE = "v1.plan.created" + type: Literal["v1.plan.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) -> "Plan": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Plan", + 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/_v1_plan_deleted_event.py b/stripe/events/_v1_plan_deleted_event.py new file mode 100644 index 000000000..13c336b7b --- /dev/null +++ b/stripe/events/_v1_plan_deleted_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._plan import Plan + from stripe._stripe_client import StripeClient + + +class V1PlanDeletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.plan.deleted" + type: Literal["v1.plan.deleted"] + 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) -> "V1PlanDeletedEvent": + return cast( + "V1PlanDeletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Plan": + 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( + "Plan", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PlanDeletedEvent": + return cast( + "V1PlanDeletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Plan": + 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( + "Plan", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PlanDeletedEvent(Event): + LOOKUP_TYPE = "v1.plan.deleted" + type: Literal["v1.plan.deleted"] + + 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) -> "Plan": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Plan", + 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/_v1_plan_updated_event.py b/stripe/events/_v1_plan_updated_event.py new file mode 100644 index 000000000..3509d9623 --- /dev/null +++ b/stripe/events/_v1_plan_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._plan import Plan + from stripe._stripe_client import StripeClient + + +class V1PlanUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.plan.updated" + type: Literal["v1.plan.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) -> "V1PlanUpdatedEvent": + return cast( + "V1PlanUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Plan": + 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( + "Plan", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PlanUpdatedEvent": + return cast( + "V1PlanUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Plan": + 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( + "Plan", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PlanUpdatedEvent(Event): + LOOKUP_TYPE = "v1.plan.updated" + type: Literal["v1.plan.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) -> "Plan": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Plan", + 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/_v1_price_created_event.py b/stripe/events/_v1_price_created_event.py new file mode 100644 index 000000000..120114bfa --- /dev/null +++ b/stripe/events/_v1_price_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._price import Price + from stripe._stripe_client import StripeClient + + +class V1PriceCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.price.created" + type: Literal["v1.price.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) -> "V1PriceCreatedEvent": + return cast( + "V1PriceCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Price": + 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( + "Price", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PriceCreatedEvent": + return cast( + "V1PriceCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Price": + 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( + "Price", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PriceCreatedEvent(Event): + LOOKUP_TYPE = "v1.price.created" + type: Literal["v1.price.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) -> "Price": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Price", + 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/_v1_price_deleted_event.py b/stripe/events/_v1_price_deleted_event.py new file mode 100644 index 000000000..d463b3162 --- /dev/null +++ b/stripe/events/_v1_price_deleted_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._price import Price + from stripe._stripe_client import StripeClient + + +class V1PriceDeletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.price.deleted" + type: Literal["v1.price.deleted"] + 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) -> "V1PriceDeletedEvent": + return cast( + "V1PriceDeletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Price": + 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( + "Price", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PriceDeletedEvent": + return cast( + "V1PriceDeletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Price": + 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( + "Price", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PriceDeletedEvent(Event): + LOOKUP_TYPE = "v1.price.deleted" + type: Literal["v1.price.deleted"] + + 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) -> "Price": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Price", + 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/_v1_price_updated_event.py b/stripe/events/_v1_price_updated_event.py new file mode 100644 index 000000000..6fa3cfe5f --- /dev/null +++ b/stripe/events/_v1_price_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._price import Price + from stripe._stripe_client import StripeClient + + +class V1PriceUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.price.updated" + type: Literal["v1.price.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) -> "V1PriceUpdatedEvent": + return cast( + "V1PriceUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Price": + 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( + "Price", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PriceUpdatedEvent": + return cast( + "V1PriceUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Price": + 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( + "Price", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PriceUpdatedEvent(Event): + LOOKUP_TYPE = "v1.price.updated" + type: Literal["v1.price.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) -> "Price": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Price", + 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/_v1_product_created_event.py b/stripe/events/_v1_product_created_event.py new file mode 100644 index 000000000..c2affb9a6 --- /dev/null +++ b/stripe/events/_v1_product_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._product import Product + from stripe._stripe_client import StripeClient + + +class V1ProductCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.product.created" + type: Literal["v1.product.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) -> "V1ProductCreatedEvent": + return cast( + "V1ProductCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Product": + 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( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ProductCreatedEvent": + return cast( + "V1ProductCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Product": + 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( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ProductCreatedEvent(Event): + LOOKUP_TYPE = "v1.product.created" + type: Literal["v1.product.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) -> "Product": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Product", + 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/_v1_product_deleted_event.py b/stripe/events/_v1_product_deleted_event.py new file mode 100644 index 000000000..45a757c2b --- /dev/null +++ b/stripe/events/_v1_product_deleted_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._product import Product + from stripe._stripe_client import StripeClient + + +class V1ProductDeletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.product.deleted" + type: Literal["v1.product.deleted"] + 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) -> "V1ProductDeletedEvent": + return cast( + "V1ProductDeletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Product": + 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( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ProductDeletedEvent": + return cast( + "V1ProductDeletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Product": + 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( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ProductDeletedEvent(Event): + LOOKUP_TYPE = "v1.product.deleted" + type: Literal["v1.product.deleted"] + + 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) -> "Product": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Product", + 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/_v1_product_updated_event.py b/stripe/events/_v1_product_updated_event.py new file mode 100644 index 000000000..4246f9299 --- /dev/null +++ b/stripe/events/_v1_product_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._product import Product + from stripe._stripe_client import StripeClient + + +class V1ProductUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.product.updated" + type: Literal["v1.product.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) -> "V1ProductUpdatedEvent": + return cast( + "V1ProductUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Product": + 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( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ProductUpdatedEvent": + return cast( + "V1ProductUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Product": + 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( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ProductUpdatedEvent(Event): + LOOKUP_TYPE = "v1.product.updated" + type: Literal["v1.product.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) -> "Product": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Product", + 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/_v1_promotion_code_created_event.py b/stripe/events/_v1_promotion_code_created_event.py new file mode 100644 index 000000000..f37423719 --- /dev/null +++ b/stripe/events/_v1_promotion_code_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._promotion_code import PromotionCode + from stripe._stripe_client import StripeClient + + +class V1PromotionCodeCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.promotion_code.created" + type: Literal["v1.promotion_code.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) -> "V1PromotionCodeCreatedEvent": + return cast( + "V1PromotionCodeCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PromotionCode": + 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( + "PromotionCode", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PromotionCodeCreatedEvent": + return cast( + "V1PromotionCodeCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PromotionCode": + 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( + "PromotionCode", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PromotionCodeCreatedEvent(Event): + LOOKUP_TYPE = "v1.promotion_code.created" + type: Literal["v1.promotion_code.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) -> "PromotionCode": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PromotionCode", + 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/_v1_promotion_code_updated_event.py b/stripe/events/_v1_promotion_code_updated_event.py new file mode 100644 index 000000000..de4bcf498 --- /dev/null +++ b/stripe/events/_v1_promotion_code_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._promotion_code import PromotionCode + from stripe._stripe_client import StripeClient + + +class V1PromotionCodeUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.promotion_code.updated" + type: Literal["v1.promotion_code.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) -> "V1PromotionCodeUpdatedEvent": + return cast( + "V1PromotionCodeUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PromotionCode": + 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( + "PromotionCode", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PromotionCodeUpdatedEvent": + return cast( + "V1PromotionCodeUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PromotionCode": + 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( + "PromotionCode", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PromotionCodeUpdatedEvent(Event): + LOOKUP_TYPE = "v1.promotion_code.updated" + type: Literal["v1.promotion_code.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) -> "PromotionCode": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PromotionCode", + 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/_v1_quote_accepted_event.py b/stripe/events/_v1_quote_accepted_event.py new file mode 100644 index 000000000..acaea2d58 --- /dev/null +++ b/stripe/events/_v1_quote_accepted_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._quote import Quote + from stripe._stripe_client import StripeClient + + +class V1QuoteAcceptedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.quote.accepted" + type: Literal["v1.quote.accepted"] + 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) -> "V1QuoteAcceptedEvent": + return cast( + "V1QuoteAcceptedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Quote": + 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( + "Quote", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1QuoteAcceptedEvent": + return cast( + "V1QuoteAcceptedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Quote": + 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( + "Quote", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1QuoteAcceptedEvent(Event): + LOOKUP_TYPE = "v1.quote.accepted" + type: Literal["v1.quote.accepted"] + + 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) -> "Quote": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Quote", + 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/_v1_quote_canceled_event.py b/stripe/events/_v1_quote_canceled_event.py new file mode 100644 index 000000000..08a44703a --- /dev/null +++ b/stripe/events/_v1_quote_canceled_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._quote import Quote + from stripe._stripe_client import StripeClient + + +class V1QuoteCanceledEventNotification(EventNotification): + LOOKUP_TYPE = "v1.quote.canceled" + type: Literal["v1.quote.canceled"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1QuoteCanceledEvent": + return cast( + "V1QuoteCanceledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Quote": + 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( + "Quote", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1QuoteCanceledEvent": + return cast( + "V1QuoteCanceledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Quote": + 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( + "Quote", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1QuoteCanceledEvent(Event): + LOOKUP_TYPE = "v1.quote.canceled" + type: Literal["v1.quote.canceled"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Quote": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Quote", + 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/_v1_quote_created_event.py b/stripe/events/_v1_quote_created_event.py new file mode 100644 index 000000000..2f591797f --- /dev/null +++ b/stripe/events/_v1_quote_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._quote import Quote + from stripe._stripe_client import StripeClient + + +class V1QuoteCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.quote.created" + type: Literal["v1.quote.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) -> "V1QuoteCreatedEvent": + return cast( + "V1QuoteCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Quote": + 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( + "Quote", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1QuoteCreatedEvent": + return cast( + "V1QuoteCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Quote": + 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( + "Quote", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1QuoteCreatedEvent(Event): + LOOKUP_TYPE = "v1.quote.created" + type: Literal["v1.quote.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) -> "Quote": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Quote", + 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/_v1_quote_finalized_event.py b/stripe/events/_v1_quote_finalized_event.py new file mode 100644 index 000000000..af7266ade --- /dev/null +++ b/stripe/events/_v1_quote_finalized_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._quote import Quote + from stripe._stripe_client import StripeClient + + +class V1QuoteFinalizedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.quote.finalized" + type: Literal["v1.quote.finalized"] + 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) -> "V1QuoteFinalizedEvent": + return cast( + "V1QuoteFinalizedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Quote": + 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( + "Quote", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1QuoteFinalizedEvent": + return cast( + "V1QuoteFinalizedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Quote": + 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( + "Quote", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1QuoteFinalizedEvent(Event): + LOOKUP_TYPE = "v1.quote.finalized" + type: Literal["v1.quote.finalized"] + + 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) -> "Quote": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Quote", + 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/_v1_radar_early_fraud_warning_created_event.py b/stripe/events/_v1_radar_early_fraud_warning_created_event.py new file mode 100644 index 000000000..ff8dc0036 --- /dev/null +++ b/stripe/events/_v1_radar_early_fraud_warning_created_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.radar._early_fraud_warning import EarlyFraudWarning + + +class V1RadarEarlyFraudWarningCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.radar.early_fraud_warning.created" + type: Literal["v1.radar.early_fraud_warning.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) -> "V1RadarEarlyFraudWarningCreatedEvent": + return cast( + "V1RadarEarlyFraudWarningCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "EarlyFraudWarning": + 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( + "EarlyFraudWarning", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1RadarEarlyFraudWarningCreatedEvent": + return cast( + "V1RadarEarlyFraudWarningCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "EarlyFraudWarning": + 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( + "EarlyFraudWarning", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1RadarEarlyFraudWarningCreatedEvent(Event): + LOOKUP_TYPE = "v1.radar.early_fraud_warning.created" + type: Literal["v1.radar.early_fraud_warning.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) -> "EarlyFraudWarning": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "EarlyFraudWarning", + 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/_v1_radar_early_fraud_warning_updated_event.py b/stripe/events/_v1_radar_early_fraud_warning_updated_event.py new file mode 100644 index 000000000..3479a9984 --- /dev/null +++ b/stripe/events/_v1_radar_early_fraud_warning_updated_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.radar._early_fraud_warning import EarlyFraudWarning + + +class V1RadarEarlyFraudWarningUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.radar.early_fraud_warning.updated" + type: Literal["v1.radar.early_fraud_warning.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) -> "V1RadarEarlyFraudWarningUpdatedEvent": + return cast( + "V1RadarEarlyFraudWarningUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "EarlyFraudWarning": + 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( + "EarlyFraudWarning", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1RadarEarlyFraudWarningUpdatedEvent": + return cast( + "V1RadarEarlyFraudWarningUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "EarlyFraudWarning": + 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( + "EarlyFraudWarning", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1RadarEarlyFraudWarningUpdatedEvent(Event): + LOOKUP_TYPE = "v1.radar.early_fraud_warning.updated" + type: Literal["v1.radar.early_fraud_warning.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) -> "EarlyFraudWarning": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "EarlyFraudWarning", + 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/_v1_refund_created_event.py b/stripe/events/_v1_refund_created_event.py new file mode 100644 index 000000000..dc9d7bac3 --- /dev/null +++ b/stripe/events/_v1_refund_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._refund import Refund + from stripe._stripe_client import StripeClient + + +class V1RefundCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.refund.created" + type: Literal["v1.refund.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) -> "V1RefundCreatedEvent": + return cast( + "V1RefundCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Refund": + 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( + "Refund", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1RefundCreatedEvent": + return cast( + "V1RefundCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Refund": + 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( + "Refund", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1RefundCreatedEvent(Event): + LOOKUP_TYPE = "v1.refund.created" + type: Literal["v1.refund.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) -> "Refund": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Refund", + 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/_v1_refund_failed_event.py b/stripe/events/_v1_refund_failed_event.py new file mode 100644 index 000000000..e945785ee --- /dev/null +++ b/stripe/events/_v1_refund_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._refund import Refund + from stripe._stripe_client import StripeClient + + +class V1RefundFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.refund.failed" + type: Literal["v1.refund.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) -> "V1RefundFailedEvent": + return cast( + "V1RefundFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Refund": + 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( + "Refund", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1RefundFailedEvent": + return cast( + "V1RefundFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Refund": + 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( + "Refund", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1RefundFailedEvent(Event): + LOOKUP_TYPE = "v1.refund.failed" + type: Literal["v1.refund.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) -> "Refund": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Refund", + 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/_v1_refund_updated_event.py b/stripe/events/_v1_refund_updated_event.py new file mode 100644 index 000000000..8bf948e72 --- /dev/null +++ b/stripe/events/_v1_refund_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._refund import Refund + from stripe._stripe_client import StripeClient + + +class V1RefundUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.refund.updated" + type: Literal["v1.refund.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) -> "V1RefundUpdatedEvent": + return cast( + "V1RefundUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Refund": + 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( + "Refund", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1RefundUpdatedEvent": + return cast( + "V1RefundUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Refund": + 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( + "Refund", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1RefundUpdatedEvent(Event): + LOOKUP_TYPE = "v1.refund.updated" + type: Literal["v1.refund.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) -> "Refund": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Refund", + 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/_v1_review_closed_event.py b/stripe/events/_v1_review_closed_event.py new file mode 100644 index 000000000..e385827cd --- /dev/null +++ b/stripe/events/_v1_review_closed_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._review import Review + from stripe._stripe_client import StripeClient + + +class V1ReviewClosedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.review.closed" + type: Literal["v1.review.closed"] + 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) -> "V1ReviewClosedEvent": + return cast( + "V1ReviewClosedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Review": + 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( + "Review", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ReviewClosedEvent": + return cast( + "V1ReviewClosedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Review": + 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( + "Review", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ReviewClosedEvent(Event): + LOOKUP_TYPE = "v1.review.closed" + type: Literal["v1.review.closed"] + + 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) -> "Review": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Review", + 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/_v1_review_opened_event.py b/stripe/events/_v1_review_opened_event.py new file mode 100644 index 000000000..8fd8d0157 --- /dev/null +++ b/stripe/events/_v1_review_opened_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._review import Review + from stripe._stripe_client import StripeClient + + +class V1ReviewOpenedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.review.opened" + type: Literal["v1.review.opened"] + 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) -> "V1ReviewOpenedEvent": + return cast( + "V1ReviewOpenedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Review": + 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( + "Review", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ReviewOpenedEvent": + return cast( + "V1ReviewOpenedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Review": + 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( + "Review", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ReviewOpenedEvent(Event): + LOOKUP_TYPE = "v1.review.opened" + type: Literal["v1.review.opened"] + + 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) -> "Review": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Review", + 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/_v1_setup_intent_canceled_event.py b/stripe/events/_v1_setup_intent_canceled_event.py new file mode 100644 index 000000000..81ae4f0f0 --- /dev/null +++ b/stripe/events/_v1_setup_intent_canceled_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._setup_intent import SetupIntent + from stripe._stripe_client import StripeClient + + +class V1SetupIntentCanceledEventNotification(EventNotification): + LOOKUP_TYPE = "v1.setup_intent.canceled" + type: Literal["v1.setup_intent.canceled"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1SetupIntentCanceledEvent": + return cast( + "V1SetupIntentCanceledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SetupIntent": + 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( + "SetupIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1SetupIntentCanceledEvent": + return cast( + "V1SetupIntentCanceledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SetupIntent": + 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( + "SetupIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SetupIntentCanceledEvent(Event): + LOOKUP_TYPE = "v1.setup_intent.canceled" + type: Literal["v1.setup_intent.canceled"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "SetupIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SetupIntent", + 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/_v1_setup_intent_created_event.py b/stripe/events/_v1_setup_intent_created_event.py new file mode 100644 index 000000000..4f8ec3a83 --- /dev/null +++ b/stripe/events/_v1_setup_intent_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._setup_intent import SetupIntent + from stripe._stripe_client import StripeClient + + +class V1SetupIntentCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.setup_intent.created" + type: Literal["v1.setup_intent.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) -> "V1SetupIntentCreatedEvent": + return cast( + "V1SetupIntentCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SetupIntent": + 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( + "SetupIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1SetupIntentCreatedEvent": + return cast( + "V1SetupIntentCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SetupIntent": + 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( + "SetupIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SetupIntentCreatedEvent(Event): + LOOKUP_TYPE = "v1.setup_intent.created" + type: Literal["v1.setup_intent.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) -> "SetupIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SetupIntent", + 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/_v1_setup_intent_requires_action_event.py b/stripe/events/_v1_setup_intent_requires_action_event.py new file mode 100644 index 000000000..57884233a --- /dev/null +++ b/stripe/events/_v1_setup_intent_requires_action_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._setup_intent import SetupIntent + from stripe._stripe_client import StripeClient + + +class V1SetupIntentRequiresActionEventNotification(EventNotification): + LOOKUP_TYPE = "v1.setup_intent.requires_action" + type: Literal["v1.setup_intent.requires_action"] + 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) -> "V1SetupIntentRequiresActionEvent": + return cast( + "V1SetupIntentRequiresActionEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SetupIntent": + 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( + "SetupIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1SetupIntentRequiresActionEvent": + return cast( + "V1SetupIntentRequiresActionEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SetupIntent": + 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( + "SetupIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SetupIntentRequiresActionEvent(Event): + LOOKUP_TYPE = "v1.setup_intent.requires_action" + type: Literal["v1.setup_intent.requires_action"] + + 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) -> "SetupIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SetupIntent", + 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/_v1_setup_intent_setup_failed_event.py b/stripe/events/_v1_setup_intent_setup_failed_event.py new file mode 100644 index 000000000..1938ce963 --- /dev/null +++ b/stripe/events/_v1_setup_intent_setup_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._setup_intent import SetupIntent + from stripe._stripe_client import StripeClient + + +class V1SetupIntentSetupFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.setup_intent.setup_failed" + type: Literal["v1.setup_intent.setup_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) -> "V1SetupIntentSetupFailedEvent": + return cast( + "V1SetupIntentSetupFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SetupIntent": + 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( + "SetupIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1SetupIntentSetupFailedEvent": + return cast( + "V1SetupIntentSetupFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SetupIntent": + 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( + "SetupIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SetupIntentSetupFailedEvent(Event): + LOOKUP_TYPE = "v1.setup_intent.setup_failed" + type: Literal["v1.setup_intent.setup_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) -> "SetupIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SetupIntent", + 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/_v1_setup_intent_succeeded_event.py b/stripe/events/_v1_setup_intent_succeeded_event.py new file mode 100644 index 000000000..04038cd16 --- /dev/null +++ b/stripe/events/_v1_setup_intent_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._setup_intent import SetupIntent + from stripe._stripe_client import StripeClient + + +class V1SetupIntentSucceededEventNotification(EventNotification): + LOOKUP_TYPE = "v1.setup_intent.succeeded" + type: Literal["v1.setup_intent.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) -> "V1SetupIntentSucceededEvent": + return cast( + "V1SetupIntentSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SetupIntent": + 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( + "SetupIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1SetupIntentSucceededEvent": + return cast( + "V1SetupIntentSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SetupIntent": + 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( + "SetupIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SetupIntentSucceededEvent(Event): + LOOKUP_TYPE = "v1.setup_intent.succeeded" + type: Literal["v1.setup_intent.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) -> "SetupIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SetupIntent", + 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/_v1_sigma_scheduled_query_run_created_event.py b/stripe/events/_v1_sigma_scheduled_query_run_created_event.py new file mode 100644 index 000000000..675d45315 --- /dev/null +++ b/stripe/events/_v1_sigma_scheduled_query_run_created_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.sigma._scheduled_query_run import ScheduledQueryRun + + +class V1SigmaScheduledQueryRunCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.sigma.scheduled_query_run.created" + type: Literal["v1.sigma.scheduled_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) -> "V1SigmaScheduledQueryRunCreatedEvent": + return cast( + "V1SigmaScheduledQueryRunCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ScheduledQueryRun": + 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( + "ScheduledQueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1SigmaScheduledQueryRunCreatedEvent": + return cast( + "V1SigmaScheduledQueryRunCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ScheduledQueryRun": + 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( + "ScheduledQueryRun", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SigmaScheduledQueryRunCreatedEvent(Event): + LOOKUP_TYPE = "v1.sigma.scheduled_query_run.created" + type: Literal["v1.sigma.scheduled_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) -> "ScheduledQueryRun": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ScheduledQueryRun", + 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/_v1_source_canceled_event.py b/stripe/events/_v1_source_canceled_event.py new file mode 100644 index 000000000..b2965147a --- /dev/null +++ b/stripe/events/_v1_source_canceled_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._source import Source + from stripe._stripe_client import StripeClient + + +class V1SourceCanceledEventNotification(EventNotification): + LOOKUP_TYPE = "v1.source.canceled" + type: Literal["v1.source.canceled"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1SourceCanceledEvent": + return cast( + "V1SourceCanceledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Source": + 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( + "Source", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1SourceCanceledEvent": + return cast( + "V1SourceCanceledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Source": + 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( + "Source", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SourceCanceledEvent(Event): + LOOKUP_TYPE = "v1.source.canceled" + type: Literal["v1.source.canceled"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Source": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Source", + 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/_v1_source_chargeable_event.py b/stripe/events/_v1_source_chargeable_event.py new file mode 100644 index 000000000..39961ba9b --- /dev/null +++ b/stripe/events/_v1_source_chargeable_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._source import Source + from stripe._stripe_client import StripeClient + + +class V1SourceChargeableEventNotification(EventNotification): + LOOKUP_TYPE = "v1.source.chargeable" + type: Literal["v1.source.chargeable"] + 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) -> "V1SourceChargeableEvent": + return cast( + "V1SourceChargeableEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Source": + 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( + "Source", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1SourceChargeableEvent": + return cast( + "V1SourceChargeableEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Source": + 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( + "Source", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SourceChargeableEvent(Event): + LOOKUP_TYPE = "v1.source.chargeable" + type: Literal["v1.source.chargeable"] + + 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) -> "Source": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Source", + 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/_v1_source_failed_event.py b/stripe/events/_v1_source_failed_event.py new file mode 100644 index 000000000..8f5d9a562 --- /dev/null +++ b/stripe/events/_v1_source_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._source import Source + from stripe._stripe_client import StripeClient + + +class V1SourceFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.source.failed" + type: Literal["v1.source.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) -> "V1SourceFailedEvent": + return cast( + "V1SourceFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Source": + 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( + "Source", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1SourceFailedEvent": + return cast( + "V1SourceFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Source": + 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( + "Source", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SourceFailedEvent(Event): + LOOKUP_TYPE = "v1.source.failed" + type: Literal["v1.source.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) -> "Source": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Source", + 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/_v1_source_refund_attributes_required_event.py b/stripe/events/_v1_source_refund_attributes_required_event.py new file mode 100644 index 000000000..3bb5e4845 --- /dev/null +++ b/stripe/events/_v1_source_refund_attributes_required_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._source import Source + from stripe._stripe_client import StripeClient + + +class V1SourceRefundAttributesRequiredEventNotification(EventNotification): + LOOKUP_TYPE = "v1.source.refund_attributes_required" + type: Literal["v1.source.refund_attributes_required"] + 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) -> "V1SourceRefundAttributesRequiredEvent": + return cast( + "V1SourceRefundAttributesRequiredEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Source": + 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( + "Source", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1SourceRefundAttributesRequiredEvent": + return cast( + "V1SourceRefundAttributesRequiredEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Source": + 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( + "Source", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SourceRefundAttributesRequiredEvent(Event): + LOOKUP_TYPE = "v1.source.refund_attributes_required" + type: Literal["v1.source.refund_attributes_required"] + + 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) -> "Source": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Source", + 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/_v1_subscription_schedule_aborted_event.py b/stripe/events/_v1_subscription_schedule_aborted_event.py new file mode 100644 index 000000000..badd88115 --- /dev/null +++ b/stripe/events/_v1_subscription_schedule_aborted_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._subscription_schedule import SubscriptionSchedule + + +class V1SubscriptionScheduleAbortedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.subscription_schedule.aborted" + type: Literal["v1.subscription_schedule.aborted"] + 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) -> "V1SubscriptionScheduleAbortedEvent": + return cast( + "V1SubscriptionScheduleAbortedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SubscriptionSchedule": + 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( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1SubscriptionScheduleAbortedEvent": + return cast( + "V1SubscriptionScheduleAbortedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SubscriptionSchedule": + 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( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SubscriptionScheduleAbortedEvent(Event): + LOOKUP_TYPE = "v1.subscription_schedule.aborted" + type: Literal["v1.subscription_schedule.aborted"] + + 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) -> "SubscriptionSchedule": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SubscriptionSchedule", + 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/_v1_subscription_schedule_canceled_event.py b/stripe/events/_v1_subscription_schedule_canceled_event.py new file mode 100644 index 000000000..6d75217cd --- /dev/null +++ b/stripe/events/_v1_subscription_schedule_canceled_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._subscription_schedule import SubscriptionSchedule + + +class V1SubscriptionScheduleCanceledEventNotification(EventNotification): + LOOKUP_TYPE = "v1.subscription_schedule.canceled" + type: Literal["v1.subscription_schedule.canceled"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1SubscriptionScheduleCanceledEvent": + return cast( + "V1SubscriptionScheduleCanceledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SubscriptionSchedule": + 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( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1SubscriptionScheduleCanceledEvent": + return cast( + "V1SubscriptionScheduleCanceledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SubscriptionSchedule": + 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( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SubscriptionScheduleCanceledEvent(Event): + LOOKUP_TYPE = "v1.subscription_schedule.canceled" + type: Literal["v1.subscription_schedule.canceled"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "SubscriptionSchedule": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SubscriptionSchedule", + 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/_v1_subscription_schedule_completed_event.py b/stripe/events/_v1_subscription_schedule_completed_event.py new file mode 100644 index 000000000..cb35ff071 --- /dev/null +++ b/stripe/events/_v1_subscription_schedule_completed_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription_schedule import SubscriptionSchedule + + +class V1SubscriptionScheduleCompletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.subscription_schedule.completed" + type: Literal["v1.subscription_schedule.completed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1SubscriptionScheduleCompletedEvent": + return cast( + "V1SubscriptionScheduleCompletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SubscriptionSchedule": + 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( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1SubscriptionScheduleCompletedEvent": + return cast( + "V1SubscriptionScheduleCompletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SubscriptionSchedule": + 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( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SubscriptionScheduleCompletedEvent(Event): + LOOKUP_TYPE = "v1.subscription_schedule.completed" + type: Literal["v1.subscription_schedule.completed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "SubscriptionSchedule": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SubscriptionSchedule", + 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/_v1_subscription_schedule_created_event.py b/stripe/events/_v1_subscription_schedule_created_event.py new file mode 100644 index 000000000..cf48ce47d --- /dev/null +++ b/stripe/events/_v1_subscription_schedule_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._subscription_schedule import SubscriptionSchedule + + +class V1SubscriptionScheduleCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.subscription_schedule.created" + type: Literal["v1.subscription_schedule.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) -> "V1SubscriptionScheduleCreatedEvent": + return cast( + "V1SubscriptionScheduleCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SubscriptionSchedule": + 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( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1SubscriptionScheduleCreatedEvent": + return cast( + "V1SubscriptionScheduleCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SubscriptionSchedule": + 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( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SubscriptionScheduleCreatedEvent(Event): + LOOKUP_TYPE = "v1.subscription_schedule.created" + type: Literal["v1.subscription_schedule.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) -> "SubscriptionSchedule": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SubscriptionSchedule", + 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/_v1_subscription_schedule_expiring_event.py b/stripe/events/_v1_subscription_schedule_expiring_event.py new file mode 100644 index 000000000..61349469f --- /dev/null +++ b/stripe/events/_v1_subscription_schedule_expiring_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._subscription_schedule import SubscriptionSchedule + + +class V1SubscriptionScheduleExpiringEventNotification(EventNotification): + LOOKUP_TYPE = "v1.subscription_schedule.expiring" + type: Literal["v1.subscription_schedule.expiring"] + 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) -> "V1SubscriptionScheduleExpiringEvent": + return cast( + "V1SubscriptionScheduleExpiringEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SubscriptionSchedule": + 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( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1SubscriptionScheduleExpiringEvent": + return cast( + "V1SubscriptionScheduleExpiringEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SubscriptionSchedule": + 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( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SubscriptionScheduleExpiringEvent(Event): + LOOKUP_TYPE = "v1.subscription_schedule.expiring" + type: Literal["v1.subscription_schedule.expiring"] + + 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) -> "SubscriptionSchedule": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SubscriptionSchedule", + 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/_v1_subscription_schedule_released_event.py b/stripe/events/_v1_subscription_schedule_released_event.py new file mode 100644 index 000000000..2cd2a41fb --- /dev/null +++ b/stripe/events/_v1_subscription_schedule_released_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._subscription_schedule import SubscriptionSchedule + + +class V1SubscriptionScheduleReleasedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.subscription_schedule.released" + type: Literal["v1.subscription_schedule.released"] + 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) -> "V1SubscriptionScheduleReleasedEvent": + return cast( + "V1SubscriptionScheduleReleasedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SubscriptionSchedule": + 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( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1SubscriptionScheduleReleasedEvent": + return cast( + "V1SubscriptionScheduleReleasedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SubscriptionSchedule": + 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( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SubscriptionScheduleReleasedEvent(Event): + LOOKUP_TYPE = "v1.subscription_schedule.released" + type: Literal["v1.subscription_schedule.released"] + + 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) -> "SubscriptionSchedule": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SubscriptionSchedule", + 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/_v1_subscription_schedule_updated_event.py b/stripe/events/_v1_subscription_schedule_updated_event.py new file mode 100644 index 000000000..989208079 --- /dev/null +++ b/stripe/events/_v1_subscription_schedule_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._subscription_schedule import SubscriptionSchedule + + +class V1SubscriptionScheduleUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.subscription_schedule.updated" + type: Literal["v1.subscription_schedule.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) -> "V1SubscriptionScheduleUpdatedEvent": + return cast( + "V1SubscriptionScheduleUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SubscriptionSchedule": + 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( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1SubscriptionScheduleUpdatedEvent": + return cast( + "V1SubscriptionScheduleUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SubscriptionSchedule": + 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( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SubscriptionScheduleUpdatedEvent(Event): + LOOKUP_TYPE = "v1.subscription_schedule.updated" + type: Literal["v1.subscription_schedule.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) -> "SubscriptionSchedule": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SubscriptionSchedule", + 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/_v1_tax_rate_created_event.py b/stripe/events/_v1_tax_rate_created_event.py new file mode 100644 index 000000000..8486ec42e --- /dev/null +++ b/stripe/events/_v1_tax_rate_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._tax_rate import TaxRate + + +class V1TaxRateCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.tax_rate.created" + type: Literal["v1.tax_rate.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) -> "V1TaxRateCreatedEvent": + return cast( + "V1TaxRateCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "TaxRate": + 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( + "TaxRate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TaxRateCreatedEvent": + return cast( + "V1TaxRateCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "TaxRate": + 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( + "TaxRate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TaxRateCreatedEvent(Event): + LOOKUP_TYPE = "v1.tax_rate.created" + type: Literal["v1.tax_rate.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) -> "TaxRate": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "TaxRate", + 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/_v1_tax_rate_updated_event.py b/stripe/events/_v1_tax_rate_updated_event.py new file mode 100644 index 000000000..4fa987f3d --- /dev/null +++ b/stripe/events/_v1_tax_rate_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._tax_rate import TaxRate + + +class V1TaxRateUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.tax_rate.updated" + type: Literal["v1.tax_rate.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) -> "V1TaxRateUpdatedEvent": + return cast( + "V1TaxRateUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "TaxRate": + 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( + "TaxRate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TaxRateUpdatedEvent": + return cast( + "V1TaxRateUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "TaxRate": + 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( + "TaxRate", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TaxRateUpdatedEvent(Event): + LOOKUP_TYPE = "v1.tax_rate.updated" + type: Literal["v1.tax_rate.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) -> "TaxRate": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "TaxRate", + 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/_v1_tax_settings_updated_event.py b/stripe/events/_v1_tax_settings_updated_event.py new file mode 100644 index 000000000..8196c2d5b --- /dev/null +++ b/stripe/events/_v1_tax_settings_updated_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import ( + Event, + EventNotification, + RelatedSingletonObject, +) +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.tax._settings import Settings + + +class V1TaxSettingsUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.tax.settings.updated" + type: Literal["v1.tax.settings.updated"] + related_object: RelatedSingletonObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedSingletonObject( + parsed_body["related_object"], + ) + + @override + def fetch_event(self) -> "V1TaxSettingsUpdatedEvent": + return cast( + "V1TaxSettingsUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Settings": + 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( + "Settings", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TaxSettingsUpdatedEvent": + return cast( + "V1TaxSettingsUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Settings": + 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( + "Settings", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TaxSettingsUpdatedEvent(Event): + LOOKUP_TYPE = "v1.tax.settings.updated" + type: Literal["v1.tax.settings.updated"] + + class RelatedSingletonObject(StripeObject): + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedSingletonObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Settings": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Settings", + 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/_v1_terminal_reader_action_failed_event.py b/stripe/events/_v1_terminal_reader_action_failed_event.py new file mode 100644 index 000000000..89687bbc1 --- /dev/null +++ b/stripe/events/_v1_terminal_reader_action_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.terminal._reader import Reader + + +class V1TerminalReaderActionFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.terminal.reader.action_failed" + type: Literal["v1.terminal.reader.action_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) -> "V1TerminalReaderActionFailedEvent": + return cast( + "V1TerminalReaderActionFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Reader": + 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( + "Reader", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TerminalReaderActionFailedEvent": + return cast( + "V1TerminalReaderActionFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Reader": + 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( + "Reader", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TerminalReaderActionFailedEvent(Event): + LOOKUP_TYPE = "v1.terminal.reader.action_failed" + type: Literal["v1.terminal.reader.action_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) -> "Reader": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Reader", + 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/_v1_terminal_reader_action_succeeded_event.py b/stripe/events/_v1_terminal_reader_action_succeeded_event.py new file mode 100644 index 000000000..255fc251c --- /dev/null +++ b/stripe/events/_v1_terminal_reader_action_succeeded_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.terminal._reader import Reader + + +class V1TerminalReaderActionSucceededEventNotification(EventNotification): + LOOKUP_TYPE = "v1.terminal.reader.action_succeeded" + type: Literal["v1.terminal.reader.action_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) -> "V1TerminalReaderActionSucceededEvent": + return cast( + "V1TerminalReaderActionSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Reader": + 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( + "Reader", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1TerminalReaderActionSucceededEvent": + return cast( + "V1TerminalReaderActionSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Reader": + 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( + "Reader", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TerminalReaderActionSucceededEvent(Event): + LOOKUP_TYPE = "v1.terminal.reader.action_succeeded" + type: Literal["v1.terminal.reader.action_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) -> "Reader": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Reader", + 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/_v1_terminal_reader_action_updated_event.py b/stripe/events/_v1_terminal_reader_action_updated_event.py new file mode 100644 index 000000000..710d47e5d --- /dev/null +++ b/stripe/events/_v1_terminal_reader_action_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.terminal._reader import Reader + + +class V1TerminalReaderActionUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.terminal.reader.action_updated" + type: Literal["v1.terminal.reader.action_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) -> "V1TerminalReaderActionUpdatedEvent": + return cast( + "V1TerminalReaderActionUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Reader": + 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( + "Reader", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TerminalReaderActionUpdatedEvent": + return cast( + "V1TerminalReaderActionUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Reader": + 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( + "Reader", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TerminalReaderActionUpdatedEvent(Event): + LOOKUP_TYPE = "v1.terminal.reader.action_updated" + type: Literal["v1.terminal.reader.action_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) -> "Reader": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Reader", + 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/_v1_test_helpers_test_clock_advancing_event.py b/stripe/events/_v1_test_helpers_test_clock_advancing_event.py new file mode 100644 index 000000000..e6cdaf6e8 --- /dev/null +++ b/stripe/events/_v1_test_helpers_test_clock_advancing_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.test_helpers._test_clock import TestClock + + +class V1TestHelpersTestClockAdvancingEventNotification(EventNotification): + LOOKUP_TYPE = "v1.test_helpers.test_clock.advancing" + type: Literal["v1.test_helpers.test_clock.advancing"] + 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) -> "V1TestHelpersTestClockAdvancingEvent": + return cast( + "V1TestHelpersTestClockAdvancingEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "TestClock": + 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( + "TestClock", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1TestHelpersTestClockAdvancingEvent": + return cast( + "V1TestHelpersTestClockAdvancingEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "TestClock": + 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( + "TestClock", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TestHelpersTestClockAdvancingEvent(Event): + LOOKUP_TYPE = "v1.test_helpers.test_clock.advancing" + type: Literal["v1.test_helpers.test_clock.advancing"] + + 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) -> "TestClock": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "TestClock", + 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/_v1_test_helpers_test_clock_created_event.py b/stripe/events/_v1_test_helpers_test_clock_created_event.py new file mode 100644 index 000000000..31e69c15d --- /dev/null +++ b/stripe/events/_v1_test_helpers_test_clock_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.test_helpers._test_clock import TestClock + + +class V1TestHelpersTestClockCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.test_helpers.test_clock.created" + type: Literal["v1.test_helpers.test_clock.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) -> "V1TestHelpersTestClockCreatedEvent": + return cast( + "V1TestHelpersTestClockCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "TestClock": + 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( + "TestClock", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TestHelpersTestClockCreatedEvent": + return cast( + "V1TestHelpersTestClockCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "TestClock": + 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( + "TestClock", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TestHelpersTestClockCreatedEvent(Event): + LOOKUP_TYPE = "v1.test_helpers.test_clock.created" + type: Literal["v1.test_helpers.test_clock.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) -> "TestClock": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "TestClock", + 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/_v1_test_helpers_test_clock_deleted_event.py b/stripe/events/_v1_test_helpers_test_clock_deleted_event.py new file mode 100644 index 000000000..584bf6d8f --- /dev/null +++ b/stripe/events/_v1_test_helpers_test_clock_deleted_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.test_helpers._test_clock import TestClock + + +class V1TestHelpersTestClockDeletedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.test_helpers.test_clock.deleted" + type: Literal["v1.test_helpers.test_clock.deleted"] + 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) -> "V1TestHelpersTestClockDeletedEvent": + return cast( + "V1TestHelpersTestClockDeletedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "TestClock": + 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( + "TestClock", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TestHelpersTestClockDeletedEvent": + return cast( + "V1TestHelpersTestClockDeletedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "TestClock": + 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( + "TestClock", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TestHelpersTestClockDeletedEvent(Event): + LOOKUP_TYPE = "v1.test_helpers.test_clock.deleted" + type: Literal["v1.test_helpers.test_clock.deleted"] + + 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) -> "TestClock": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "TestClock", + 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/_v1_test_helpers_test_clock_internal_failure_event.py b/stripe/events/_v1_test_helpers_test_clock_internal_failure_event.py new file mode 100644 index 000000000..ee266caf3 --- /dev/null +++ b/stripe/events/_v1_test_helpers_test_clock_internal_failure_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.test_helpers._test_clock import TestClock + + +class V1TestHelpersTestClockInternalFailureEventNotification( + EventNotification +): + LOOKUP_TYPE = "v1.test_helpers.test_clock.internal_failure" + type: Literal["v1.test_helpers.test_clock.internal_failure"] + 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) -> "V1TestHelpersTestClockInternalFailureEvent": + return cast( + "V1TestHelpersTestClockInternalFailureEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "TestClock": + 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( + "TestClock", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1TestHelpersTestClockInternalFailureEvent": + return cast( + "V1TestHelpersTestClockInternalFailureEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "TestClock": + 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( + "TestClock", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TestHelpersTestClockInternalFailureEvent(Event): + LOOKUP_TYPE = "v1.test_helpers.test_clock.internal_failure" + type: Literal["v1.test_helpers.test_clock.internal_failure"] + + 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) -> "TestClock": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "TestClock", + 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/_v1_test_helpers_test_clock_ready_event.py b/stripe/events/_v1_test_helpers_test_clock_ready_event.py new file mode 100644 index 000000000..24cac07a0 --- /dev/null +++ b/stripe/events/_v1_test_helpers_test_clock_ready_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.test_helpers._test_clock import TestClock + + +class V1TestHelpersTestClockReadyEventNotification(EventNotification): + LOOKUP_TYPE = "v1.test_helpers.test_clock.ready" + type: Literal["v1.test_helpers.test_clock.ready"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1TestHelpersTestClockReadyEvent": + return cast( + "V1TestHelpersTestClockReadyEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "TestClock": + 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( + "TestClock", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TestHelpersTestClockReadyEvent": + return cast( + "V1TestHelpersTestClockReadyEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "TestClock": + 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( + "TestClock", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TestHelpersTestClockReadyEvent(Event): + LOOKUP_TYPE = "v1.test_helpers.test_clock.ready" + type: Literal["v1.test_helpers.test_clock.ready"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "TestClock": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "TestClock", + 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/_v1_topup_canceled_event.py b/stripe/events/_v1_topup_canceled_event.py new file mode 100644 index 000000000..2c3d5de6a --- /dev/null +++ b/stripe/events/_v1_topup_canceled_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._topup import Topup + + +class V1TopupCanceledEventNotification(EventNotification): + LOOKUP_TYPE = "v1.topup.canceled" + type: Literal["v1.topup.canceled"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1TopupCanceledEvent": + return cast( + "V1TopupCanceledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Topup": + 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( + "Topup", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TopupCanceledEvent": + return cast( + "V1TopupCanceledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Topup": + 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( + "Topup", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TopupCanceledEvent(Event): + LOOKUP_TYPE = "v1.topup.canceled" + type: Literal["v1.topup.canceled"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Topup": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Topup", + 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/_v1_topup_created_event.py b/stripe/events/_v1_topup_created_event.py new file mode 100644 index 000000000..be9a31839 --- /dev/null +++ b/stripe/events/_v1_topup_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._topup import Topup + + +class V1TopupCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.topup.created" + type: Literal["v1.topup.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) -> "V1TopupCreatedEvent": + return cast( + "V1TopupCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Topup": + 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( + "Topup", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TopupCreatedEvent": + return cast( + "V1TopupCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Topup": + 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( + "Topup", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TopupCreatedEvent(Event): + LOOKUP_TYPE = "v1.topup.created" + type: Literal["v1.topup.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) -> "Topup": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Topup", + 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/_v1_topup_failed_event.py b/stripe/events/_v1_topup_failed_event.py new file mode 100644 index 000000000..c32834584 --- /dev/null +++ b/stripe/events/_v1_topup_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._topup import Topup + + +class V1TopupFailedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.topup.failed" + type: Literal["v1.topup.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) -> "V1TopupFailedEvent": + return cast( + "V1TopupFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Topup": + 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( + "Topup", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TopupFailedEvent": + return cast( + "V1TopupFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Topup": + 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( + "Topup", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TopupFailedEvent(Event): + LOOKUP_TYPE = "v1.topup.failed" + type: Literal["v1.topup.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) -> "Topup": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Topup", + 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/_v1_topup_reversed_event.py b/stripe/events/_v1_topup_reversed_event.py new file mode 100644 index 000000000..5207ca1c2 --- /dev/null +++ b/stripe/events/_v1_topup_reversed_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._topup import Topup + + +class V1TopupReversedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.topup.reversed" + type: Literal["v1.topup.reversed"] + 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) -> "V1TopupReversedEvent": + return cast( + "V1TopupReversedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Topup": + 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( + "Topup", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TopupReversedEvent": + return cast( + "V1TopupReversedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Topup": + 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( + "Topup", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TopupReversedEvent(Event): + LOOKUP_TYPE = "v1.topup.reversed" + type: Literal["v1.topup.reversed"] + + 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) -> "Topup": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Topup", + 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/_v1_topup_succeeded_event.py b/stripe/events/_v1_topup_succeeded_event.py new file mode 100644 index 000000000..d3b6cfbfe --- /dev/null +++ b/stripe/events/_v1_topup_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._topup import Topup + + +class V1TopupSucceededEventNotification(EventNotification): + LOOKUP_TYPE = "v1.topup.succeeded" + type: Literal["v1.topup.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) -> "V1TopupSucceededEvent": + return cast( + "V1TopupSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Topup": + 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( + "Topup", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TopupSucceededEvent": + return cast( + "V1TopupSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Topup": + 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( + "Topup", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TopupSucceededEvent(Event): + LOOKUP_TYPE = "v1.topup.succeeded" + type: Literal["v1.topup.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) -> "Topup": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Topup", + 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/_v1_transfer_created_event.py b/stripe/events/_v1_transfer_created_event.py new file mode 100644 index 000000000..54192ddcb --- /dev/null +++ b/stripe/events/_v1_transfer_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._transfer import Transfer + + +class V1TransferCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.transfer.created" + type: Literal["v1.transfer.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) -> "V1TransferCreatedEvent": + return cast( + "V1TransferCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Transfer": + 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( + "Transfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TransferCreatedEvent": + return cast( + "V1TransferCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Transfer": + 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( + "Transfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TransferCreatedEvent(Event): + LOOKUP_TYPE = "v1.transfer.created" + type: Literal["v1.transfer.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) -> "Transfer": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Transfer", + 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/_v1_transfer_reversed_event.py b/stripe/events/_v1_transfer_reversed_event.py new file mode 100644 index 000000000..d44a49b93 --- /dev/null +++ b/stripe/events/_v1_transfer_reversed_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._transfer import Transfer + + +class V1TransferReversedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.transfer.reversed" + type: Literal["v1.transfer.reversed"] + 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) -> "V1TransferReversedEvent": + return cast( + "V1TransferReversedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Transfer": + 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( + "Transfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TransferReversedEvent": + return cast( + "V1TransferReversedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Transfer": + 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( + "Transfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TransferReversedEvent(Event): + LOOKUP_TYPE = "v1.transfer.reversed" + type: Literal["v1.transfer.reversed"] + + 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) -> "Transfer": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Transfer", + 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/_v1_transfer_updated_event.py b/stripe/events/_v1_transfer_updated_event.py new file mode 100644 index 000000000..f4d6385c7 --- /dev/null +++ b/stripe/events/_v1_transfer_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._transfer import Transfer + + +class V1TransferUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.transfer.updated" + type: Literal["v1.transfer.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) -> "V1TransferUpdatedEvent": + return cast( + "V1TransferUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Transfer": + 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( + "Transfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1TransferUpdatedEvent": + return cast( + "V1TransferUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Transfer": + 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( + "Transfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1TransferUpdatedEvent(Event): + LOOKUP_TYPE = "v1.transfer.updated" + type: Literal["v1.transfer.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) -> "Transfer": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Transfer", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py index fd81f96a2..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 @@ -110,6 +110,7 @@ class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventDat "bacs_debit_payments", "bancontact_payments", "blik_payments", + "blik_recurring_payments", "boleto_payments", "card_payments", "cartes_bancaires_payments", @@ -139,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/financial_connections/_account.py b/stripe/financial_connections/_account.py index 8273b4b1c..923af6635 100644 --- a/stripe/financial_connections/_account.py +++ b/stripe/financial_connections/_account.py @@ -73,7 +73,9 @@ class AccountNumber(StripeObject): """ The type of account number associated with the account. """ - status: Union[Literal["deactivated", "transactable"], str] + status: Union[ + Literal["deactivated", "expired", "pending", "transactable"], str + ] """ Whether the account number is currently active and usable for transactions. """ @@ -683,7 +685,7 @@ def retrieve( cls, id: str, **params: Unpack["AccountRetrieveParams"] ) -> "Account": """ - Retrieves the details of an Financial Connections Account. + Retrieves the details of a Financial Connections Account. """ instance = cls(id, **params) instance.refresh() @@ -694,7 +696,7 @@ async def retrieve_async( cls, id: str, **params: Unpack["AccountRetrieveParams"] ) -> "Account": """ - Retrieves the details of an Financial Connections Account. + Retrieves the details of a Financial Connections Account. """ instance = cls(id, **params) await instance.refresh_async() diff --git a/stripe/financial_connections/_account_service.py b/stripe/financial_connections/_account_service.py index 9cbef84eb..32ad828c4 100644 --- a/stripe/financial_connections/_account_service.py +++ b/stripe/financial_connections/_account_service.py @@ -108,7 +108,7 @@ def retrieve( options: Optional["RequestOptions"] = None, ) -> "Account": """ - Retrieves the details of an Financial Connections Account. + Retrieves the details of a Financial Connections Account. """ return cast( "Account", @@ -131,7 +131,7 @@ async def retrieve_async( options: Optional["RequestOptions"] = None, ) -> "Account": """ - Retrieves the details of an Financial Connections Account. + Retrieves the details of a Financial Connections Account. """ return cast( "Account", diff --git a/stripe/financial_connections/_session.py b/stripe/financial_connections/_session.py index a6598840a..6efdeddc5 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/issuing/_cardholder.py b/stripe/issuing/_cardholder.py index db9aef6ab..d8bcc0617 100644 --- a/stripe/issuing/_cardholder.py +++ b/stripe/issuing/_cardholder.py @@ -115,11 +115,11 @@ class Verification(StripeObject): class Document(StripeObject): back: Optional[ExpandableField["File"]] """ - The back of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. + The back of a document returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. """ front: Optional[ExpandableField["File"]] """ - The front of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. + The front of a document returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. """ document: Optional[Document] diff --git a/stripe/issuing/_token.py b/stripe/issuing/_token.py index 6b83eafae..fd26903e2 100644 --- a/stripe/issuing/_token.py +++ b/stripe/issuing/_token.py @@ -55,7 +55,7 @@ class Device(StripeObject): class Mastercard(StripeObject): card_reference_id: Optional[str] """ - A unique reference ID from MasterCard to represent the card account number. + A unique reference ID from Mastercard to represent the card account number. """ token_reference_id: str """ @@ -63,11 +63,11 @@ class Mastercard(StripeObject): """ token_requestor_id: str """ - The ID of the entity requesting tokenization, specific to MasterCard. + The ID of the entity requesting tokenization, specific to Mastercard. """ token_requestor_name: Optional[str] """ - The name of the entity requesting tokenization, if known. This is directly provided from MasterCard. + The name of the entity requesting tokenization, if known. This is directly provided from Mastercard. """ class Visa(StripeObject): diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index 853863f5d..73608233b 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -15,12 +15,14 @@ forwarding as forwarding, identity as identity, issuing as issuing, + product_catalog as product_catalog, radar as radar, reporting as reporting, sigma as sigma, 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 ( @@ -62,6 +64,7 @@ AccountCreateParamsCapabilitiesBilliePayments as AccountCreateParamsCapabilitiesBilliePayments, AccountCreateParamsCapabilitiesBizumPayments as AccountCreateParamsCapabilitiesBizumPayments, AccountCreateParamsCapabilitiesBlikPayments as AccountCreateParamsCapabilitiesBlikPayments, + AccountCreateParamsCapabilitiesBlikRecurringPayments as AccountCreateParamsCapabilitiesBlikRecurringPayments, AccountCreateParamsCapabilitiesBoletoPayments as AccountCreateParamsCapabilitiesBoletoPayments, AccountCreateParamsCapabilitiesCardIssuing as AccountCreateParamsCapabilitiesCardIssuing, AccountCreateParamsCapabilitiesCardPayments as AccountCreateParamsCapabilitiesCardPayments, @@ -94,6 +97,7 @@ AccountCreateParamsCapabilitiesPayByBankPayments as AccountCreateParamsCapabilitiesPayByBankPayments, AccountCreateParamsCapabilitiesPaycoPayments as AccountCreateParamsCapabilitiesPaycoPayments, AccountCreateParamsCapabilitiesPaynowPayments as AccountCreateParamsCapabilitiesPaynowPayments, + AccountCreateParamsCapabilitiesPaypayPayments as AccountCreateParamsCapabilitiesPaypayPayments, AccountCreateParamsCapabilitiesPaytoPayments as AccountCreateParamsCapabilitiesPaytoPayments, AccountCreateParamsCapabilitiesPixPayments as AccountCreateParamsCapabilitiesPixPayments, AccountCreateParamsCapabilitiesPromptpayPayments as AccountCreateParamsCapabilitiesPromptpayPayments, @@ -103,6 +107,7 @@ AccountCreateParamsCapabilitiesScalapayPayments as AccountCreateParamsCapabilitiesScalapayPayments, AccountCreateParamsCapabilitiesSepaBankTransferPayments as AccountCreateParamsCapabilitiesSepaBankTransferPayments, AccountCreateParamsCapabilitiesSepaDebitPayments as AccountCreateParamsCapabilitiesSepaDebitPayments, + AccountCreateParamsCapabilitiesSequraPayments as AccountCreateParamsCapabilitiesSequraPayments, AccountCreateParamsCapabilitiesSofortPayments as AccountCreateParamsCapabilitiesSofortPayments, AccountCreateParamsCapabilitiesSunbitPayments as AccountCreateParamsCapabilitiesSunbitPayments, AccountCreateParamsCapabilitiesSwishPayments as AccountCreateParamsCapabilitiesSwishPayments, @@ -165,6 +170,12 @@ AccountCreateParamsSettingsPayments as AccountCreateParamsSettingsPayments, AccountCreateParamsSettingsPayouts as AccountCreateParamsSettingsPayouts, AccountCreateParamsSettingsPayoutsSchedule as AccountCreateParamsSettingsPayoutsSchedule, + AccountCreateParamsSettingsPaypayPayments as AccountCreateParamsSettingsPaypayPayments, + AccountCreateParamsSettingsPaypayPaymentsSite as AccountCreateParamsSettingsPaypayPaymentsSite, + AccountCreateParamsSettingsPaypayPaymentsSiteAccessible as AccountCreateParamsSettingsPaypayPaymentsSiteAccessible, + AccountCreateParamsSettingsPaypayPaymentsSiteInDevelopment as AccountCreateParamsSettingsPaypayPaymentsSiteInDevelopment, + AccountCreateParamsSettingsPaypayPaymentsSiteRestricted as AccountCreateParamsSettingsPaypayPaymentsSiteRestricted, + AccountCreateParamsSettingsSepaDebitPayments as AccountCreateParamsSettingsSepaDebitPayments, AccountCreateParamsSettingsTreasury as AccountCreateParamsSettingsTreasury, AccountCreateParamsSettingsTreasuryTosAcceptance as AccountCreateParamsSettingsTreasuryTosAcceptance, AccountCreateParamsTosAcceptance as AccountCreateParamsTosAcceptance, @@ -415,6 +426,7 @@ AccountUpdateParamsCapabilitiesBilliePayments as AccountUpdateParamsCapabilitiesBilliePayments, AccountUpdateParamsCapabilitiesBizumPayments as AccountUpdateParamsCapabilitiesBizumPayments, AccountUpdateParamsCapabilitiesBlikPayments as AccountUpdateParamsCapabilitiesBlikPayments, + AccountUpdateParamsCapabilitiesBlikRecurringPayments as AccountUpdateParamsCapabilitiesBlikRecurringPayments, AccountUpdateParamsCapabilitiesBoletoPayments as AccountUpdateParamsCapabilitiesBoletoPayments, AccountUpdateParamsCapabilitiesCardIssuing as AccountUpdateParamsCapabilitiesCardIssuing, AccountUpdateParamsCapabilitiesCardPayments as AccountUpdateParamsCapabilitiesCardPayments, @@ -447,6 +459,7 @@ AccountUpdateParamsCapabilitiesPayByBankPayments as AccountUpdateParamsCapabilitiesPayByBankPayments, AccountUpdateParamsCapabilitiesPaycoPayments as AccountUpdateParamsCapabilitiesPaycoPayments, AccountUpdateParamsCapabilitiesPaynowPayments as AccountUpdateParamsCapabilitiesPaynowPayments, + AccountUpdateParamsCapabilitiesPaypayPayments as AccountUpdateParamsCapabilitiesPaypayPayments, AccountUpdateParamsCapabilitiesPaytoPayments as AccountUpdateParamsCapabilitiesPaytoPayments, AccountUpdateParamsCapabilitiesPixPayments as AccountUpdateParamsCapabilitiesPixPayments, AccountUpdateParamsCapabilitiesPromptpayPayments as AccountUpdateParamsCapabilitiesPromptpayPayments, @@ -456,6 +469,7 @@ AccountUpdateParamsCapabilitiesScalapayPayments as AccountUpdateParamsCapabilitiesScalapayPayments, AccountUpdateParamsCapabilitiesSepaBankTransferPayments as AccountUpdateParamsCapabilitiesSepaBankTransferPayments, AccountUpdateParamsCapabilitiesSepaDebitPayments as AccountUpdateParamsCapabilitiesSepaDebitPayments, + AccountUpdateParamsCapabilitiesSequraPayments as AccountUpdateParamsCapabilitiesSequraPayments, AccountUpdateParamsCapabilitiesSofortPayments as AccountUpdateParamsCapabilitiesSofortPayments, AccountUpdateParamsCapabilitiesSunbitPayments as AccountUpdateParamsCapabilitiesSunbitPayments, AccountUpdateParamsCapabilitiesSwishPayments as AccountUpdateParamsCapabilitiesSwishPayments, @@ -516,6 +530,11 @@ AccountUpdateParamsSettingsPayments as AccountUpdateParamsSettingsPayments, AccountUpdateParamsSettingsPayouts as AccountUpdateParamsSettingsPayouts, AccountUpdateParamsSettingsPayoutsSchedule as AccountUpdateParamsSettingsPayoutsSchedule, + AccountUpdateParamsSettingsPaypayPayments as AccountUpdateParamsSettingsPaypayPayments, + AccountUpdateParamsSettingsPaypayPaymentsSite as AccountUpdateParamsSettingsPaypayPaymentsSite, + AccountUpdateParamsSettingsPaypayPaymentsSiteAccessible as AccountUpdateParamsSettingsPaypayPaymentsSiteAccessible, + AccountUpdateParamsSettingsPaypayPaymentsSiteInDevelopment as AccountUpdateParamsSettingsPaypayPaymentsSiteInDevelopment, + AccountUpdateParamsSettingsPaypayPaymentsSiteRestricted as AccountUpdateParamsSettingsPaypayPaymentsSiteRestricted, AccountUpdateParamsSettingsSepaDebitPayments as AccountUpdateParamsSettingsSepaDebitPayments, AccountUpdateParamsSettingsTreasury as AccountUpdateParamsSettingsTreasury, AccountUpdateParamsSettingsTreasuryTosAcceptance as AccountUpdateParamsSettingsTreasuryTosAcceptance, @@ -688,6 +707,7 @@ ConfirmationTokenCreateParamsPaymentMethodDataPayco as ConfirmationTokenCreateParamsPaymentMethodDataPayco, ConfirmationTokenCreateParamsPaymentMethodDataPaynow as ConfirmationTokenCreateParamsPaymentMethodDataPaynow, ConfirmationTokenCreateParamsPaymentMethodDataPaypal as ConfirmationTokenCreateParamsPaymentMethodDataPaypal, + ConfirmationTokenCreateParamsPaymentMethodDataPaypay as ConfirmationTokenCreateParamsPaymentMethodDataPaypay, ConfirmationTokenCreateParamsPaymentMethodDataPayto as ConfirmationTokenCreateParamsPaymentMethodDataPayto, ConfirmationTokenCreateParamsPaymentMethodDataPix as ConfirmationTokenCreateParamsPaymentMethodDataPix, ConfirmationTokenCreateParamsPaymentMethodDataPromptpay as ConfirmationTokenCreateParamsPaymentMethodDataPromptpay, @@ -697,6 +717,7 @@ ConfirmationTokenCreateParamsPaymentMethodDataSatispay as ConfirmationTokenCreateParamsPaymentMethodDataSatispay, ConfirmationTokenCreateParamsPaymentMethodDataScalapay as ConfirmationTokenCreateParamsPaymentMethodDataScalapay, ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit as ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit, + ConfirmationTokenCreateParamsPaymentMethodDataSequra as ConfirmationTokenCreateParamsPaymentMethodDataSequra, ConfirmationTokenCreateParamsPaymentMethodDataSofort as ConfirmationTokenCreateParamsPaymentMethodDataSofort, ConfirmationTokenCreateParamsPaymentMethodDataSunbit as ConfirmationTokenCreateParamsPaymentMethodDataSunbit, ConfirmationTokenCreateParamsPaymentMethodDataSwish as ConfirmationTokenCreateParamsPaymentMethodDataSwish, @@ -1091,6 +1112,7 @@ InvoiceAddLinesParamsLinePeriod as InvoiceAddLinesParamsLinePeriod, InvoiceAddLinesParamsLinePriceData as InvoiceAddLinesParamsLinePriceData, InvoiceAddLinesParamsLinePriceDataProductData as InvoiceAddLinesParamsLinePriceDataProductData, + InvoiceAddLinesParamsLinePriceDataProductDataTaxDetails as InvoiceAddLinesParamsLinePriceDataProductDataTaxDetails, InvoiceAddLinesParamsLinePricing as InvoiceAddLinesParamsLinePricing, InvoiceAddLinesParamsLineTaxAmount as InvoiceAddLinesParamsLineTaxAmount, InvoiceAddLinesParamsLineTaxAmountTaxRateData as InvoiceAddLinesParamsLineTaxAmountTaxRateData, @@ -1112,6 +1134,9 @@ InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBancontact as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBancontact, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillie as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillie, + InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, + InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, + InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBlik as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBlik, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCard as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCard, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan, @@ -1181,6 +1206,7 @@ InvoiceCreatePreviewParamsScheduleDetailsPhaseItemPriceDataRecurring as InvoiceCreatePreviewParamsScheduleDetailsPhaseItemPriceDataRecurring, InvoiceCreatePreviewParamsScheduleDetailsPhaseTransferData as InvoiceCreatePreviewParamsScheduleDetailsPhaseTransferData, InvoiceCreatePreviewParamsSubscriptionDetails as InvoiceCreatePreviewParamsSubscriptionDetails, + InvoiceCreatePreviewParamsSubscriptionDetailsBillingCycleAnchor as InvoiceCreatePreviewParamsSubscriptionDetailsBillingCycleAnchor, InvoiceCreatePreviewParamsSubscriptionDetailsBillingMode as InvoiceCreatePreviewParamsSubscriptionDetailsBillingMode, InvoiceCreatePreviewParamsSubscriptionDetailsBillingModeFlexible as InvoiceCreatePreviewParamsSubscriptionDetailsBillingModeFlexible, InvoiceCreatePreviewParamsSubscriptionDetailsBillingSchedule as InvoiceCreatePreviewParamsSubscriptionDetailsBillingSchedule, @@ -1189,9 +1215,14 @@ InvoiceCreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntilDuration as InvoiceCreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntilDuration, InvoiceCreatePreviewParamsSubscriptionDetailsItem as InvoiceCreatePreviewParamsSubscriptionDetailsItem, InvoiceCreatePreviewParamsSubscriptionDetailsItemBillingThresholds as InvoiceCreatePreviewParamsSubscriptionDetailsItemBillingThresholds, + InvoiceCreatePreviewParamsSubscriptionDetailsItemCurrentTrial as InvoiceCreatePreviewParamsSubscriptionDetailsItemCurrentTrial, InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscount as InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscount, InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceData as InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceData, InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring as InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring, + InvoiceCreatePreviewParamsSubscriptionDetailsPause as InvoiceCreatePreviewParamsSubscriptionDetailsPause, + InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor as InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor, + InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough as InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough, + InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom as InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom, ) from stripe.params._invoice_delete_params import ( InvoiceDeleteParams as InvoiceDeleteParams, @@ -1239,6 +1270,7 @@ InvoiceLineItemUpdateParamsPeriod as InvoiceLineItemUpdateParamsPeriod, InvoiceLineItemUpdateParamsPriceData as InvoiceLineItemUpdateParamsPriceData, InvoiceLineItemUpdateParamsPriceDataProductData as InvoiceLineItemUpdateParamsPriceDataProductData, + InvoiceLineItemUpdateParamsPriceDataProductDataTaxDetails as InvoiceLineItemUpdateParamsPriceDataProductDataTaxDetails, InvoiceLineItemUpdateParamsPricing as InvoiceLineItemUpdateParamsPricing, InvoiceLineItemUpdateParamsTaxAmount as InvoiceLineItemUpdateParamsTaxAmount, InvoiceLineItemUpdateParamsTaxAmountTaxRateData as InvoiceLineItemUpdateParamsTaxAmountTaxRateData, @@ -1267,6 +1299,9 @@ InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBancontact as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBancontact, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillie as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillie, + InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, + InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, + InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBlik as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBlik, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCard as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCard, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallments as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallments, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan, @@ -1339,6 +1374,7 @@ InvoiceUpdateLinesParamsLinePeriod as InvoiceUpdateLinesParamsLinePeriod, InvoiceUpdateLinesParamsLinePriceData as InvoiceUpdateLinesParamsLinePriceData, InvoiceUpdateLinesParamsLinePriceDataProductData as InvoiceUpdateLinesParamsLinePriceDataProductData, + InvoiceUpdateLinesParamsLinePriceDataProductDataTaxDetails as InvoiceUpdateLinesParamsLinePriceDataProductDataTaxDetails, InvoiceUpdateLinesParamsLinePricing as InvoiceUpdateLinesParamsLinePricing, InvoiceUpdateLinesParamsLineTaxAmount as InvoiceUpdateLinesParamsLineTaxAmount, InvoiceUpdateLinesParamsLineTaxAmountTaxRateData as InvoiceUpdateLinesParamsLineTaxAmountTaxRateData, @@ -1356,6 +1392,9 @@ InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillie as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillie, + InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, + InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, + InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBlik as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBlik, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCard as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCard, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallments as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallments, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan, @@ -1486,6 +1525,7 @@ PaymentIntentConfirmParamsPaymentMethodDataPayco as PaymentIntentConfirmParamsPaymentMethodDataPayco, PaymentIntentConfirmParamsPaymentMethodDataPaynow as PaymentIntentConfirmParamsPaymentMethodDataPaynow, PaymentIntentConfirmParamsPaymentMethodDataPaypal as PaymentIntentConfirmParamsPaymentMethodDataPaypal, + PaymentIntentConfirmParamsPaymentMethodDataPaypay as PaymentIntentConfirmParamsPaymentMethodDataPaypay, PaymentIntentConfirmParamsPaymentMethodDataPayto as PaymentIntentConfirmParamsPaymentMethodDataPayto, PaymentIntentConfirmParamsPaymentMethodDataPix as PaymentIntentConfirmParamsPaymentMethodDataPix, PaymentIntentConfirmParamsPaymentMethodDataPromptpay as PaymentIntentConfirmParamsPaymentMethodDataPromptpay, @@ -1495,6 +1535,7 @@ PaymentIntentConfirmParamsPaymentMethodDataSatispay as PaymentIntentConfirmParamsPaymentMethodDataSatispay, PaymentIntentConfirmParamsPaymentMethodDataScalapay as PaymentIntentConfirmParamsPaymentMethodDataScalapay, PaymentIntentConfirmParamsPaymentMethodDataSepaDebit as PaymentIntentConfirmParamsPaymentMethodDataSepaDebit, + PaymentIntentConfirmParamsPaymentMethodDataSequra as PaymentIntentConfirmParamsPaymentMethodDataSequra, PaymentIntentConfirmParamsPaymentMethodDataSofort as PaymentIntentConfirmParamsPaymentMethodDataSofort, PaymentIntentConfirmParamsPaymentMethodDataSunbit as PaymentIntentConfirmParamsPaymentMethodDataSunbit, PaymentIntentConfirmParamsPaymentMethodDataSwish as PaymentIntentConfirmParamsPaymentMethodDataSwish, @@ -1517,8 +1558,11 @@ PaymentIntentConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions as PaymentIntentConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions, PaymentIntentConfirmParamsPaymentMethodOptionsBancontact as PaymentIntentConfirmParamsPaymentMethodOptionsBancontact, PaymentIntentConfirmParamsPaymentMethodOptionsBillie as PaymentIntentConfirmParamsPaymentMethodOptionsBillie, + PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetails as PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetails, + PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, PaymentIntentConfirmParamsPaymentMethodOptionsBizum as PaymentIntentConfirmParamsPaymentMethodOptionsBizum, PaymentIntentConfirmParamsPaymentMethodOptionsBlik as PaymentIntentConfirmParamsPaymentMethodOptionsBlik, + PaymentIntentConfirmParamsPaymentMethodOptionsBlikMandateOptions as PaymentIntentConfirmParamsPaymentMethodOptionsBlikMandateOptions, PaymentIntentConfirmParamsPaymentMethodOptionsBoleto as PaymentIntentConfirmParamsPaymentMethodOptionsBoleto, PaymentIntentConfirmParamsPaymentMethodOptionsCard as PaymentIntentConfirmParamsPaymentMethodOptionsCard, PaymentIntentConfirmParamsPaymentMethodOptionsCardInstallments as PaymentIntentConfirmParamsPaymentMethodOptionsCardInstallments, @@ -1559,6 +1603,7 @@ PaymentIntentConfirmParamsPaymentMethodOptionsPayco as PaymentIntentConfirmParamsPaymentMethodOptionsPayco, PaymentIntentConfirmParamsPaymentMethodOptionsPaynow as PaymentIntentConfirmParamsPaymentMethodOptionsPaynow, PaymentIntentConfirmParamsPaymentMethodOptionsPaypal as PaymentIntentConfirmParamsPaymentMethodOptionsPaypal, + PaymentIntentConfirmParamsPaymentMethodOptionsPaypay as PaymentIntentConfirmParamsPaymentMethodOptionsPaypay, PaymentIntentConfirmParamsPaymentMethodOptionsPayto as PaymentIntentConfirmParamsPaymentMethodOptionsPayto, PaymentIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions as PaymentIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions, PaymentIntentConfirmParamsPaymentMethodOptionsPix as PaymentIntentConfirmParamsPaymentMethodOptionsPix, @@ -1570,6 +1615,7 @@ PaymentIntentConfirmParamsPaymentMethodOptionsScalapay as PaymentIntentConfirmParamsPaymentMethodOptionsScalapay, PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebit as PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebit, PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions as PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions, + PaymentIntentConfirmParamsPaymentMethodOptionsSequra as PaymentIntentConfirmParamsPaymentMethodOptionsSequra, PaymentIntentConfirmParamsPaymentMethodOptionsSofort as PaymentIntentConfirmParamsPaymentMethodOptionsSofort, PaymentIntentConfirmParamsPaymentMethodOptionsSunbit as PaymentIntentConfirmParamsPaymentMethodOptionsSunbit, PaymentIntentConfirmParamsPaymentMethodOptionsSwish as PaymentIntentConfirmParamsPaymentMethodOptionsSwish, @@ -1650,6 +1696,7 @@ PaymentIntentCreateParamsPaymentMethodDataPayco as PaymentIntentCreateParamsPaymentMethodDataPayco, PaymentIntentCreateParamsPaymentMethodDataPaynow as PaymentIntentCreateParamsPaymentMethodDataPaynow, PaymentIntentCreateParamsPaymentMethodDataPaypal as PaymentIntentCreateParamsPaymentMethodDataPaypal, + PaymentIntentCreateParamsPaymentMethodDataPaypay as PaymentIntentCreateParamsPaymentMethodDataPaypay, PaymentIntentCreateParamsPaymentMethodDataPayto as PaymentIntentCreateParamsPaymentMethodDataPayto, PaymentIntentCreateParamsPaymentMethodDataPix as PaymentIntentCreateParamsPaymentMethodDataPix, PaymentIntentCreateParamsPaymentMethodDataPromptpay as PaymentIntentCreateParamsPaymentMethodDataPromptpay, @@ -1659,6 +1706,7 @@ PaymentIntentCreateParamsPaymentMethodDataSatispay as PaymentIntentCreateParamsPaymentMethodDataSatispay, PaymentIntentCreateParamsPaymentMethodDataScalapay as PaymentIntentCreateParamsPaymentMethodDataScalapay, PaymentIntentCreateParamsPaymentMethodDataSepaDebit as PaymentIntentCreateParamsPaymentMethodDataSepaDebit, + PaymentIntentCreateParamsPaymentMethodDataSequra as PaymentIntentCreateParamsPaymentMethodDataSequra, PaymentIntentCreateParamsPaymentMethodDataSofort as PaymentIntentCreateParamsPaymentMethodDataSofort, PaymentIntentCreateParamsPaymentMethodDataSunbit as PaymentIntentCreateParamsPaymentMethodDataSunbit, PaymentIntentCreateParamsPaymentMethodDataSwish as PaymentIntentCreateParamsPaymentMethodDataSwish, @@ -1681,8 +1729,11 @@ PaymentIntentCreateParamsPaymentMethodOptionsBacsDebitMandateOptions as PaymentIntentCreateParamsPaymentMethodOptionsBacsDebitMandateOptions, PaymentIntentCreateParamsPaymentMethodOptionsBancontact as PaymentIntentCreateParamsPaymentMethodOptionsBancontact, PaymentIntentCreateParamsPaymentMethodOptionsBillie as PaymentIntentCreateParamsPaymentMethodOptionsBillie, + PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetails as PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetails, + PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, PaymentIntentCreateParamsPaymentMethodOptionsBizum as PaymentIntentCreateParamsPaymentMethodOptionsBizum, PaymentIntentCreateParamsPaymentMethodOptionsBlik as PaymentIntentCreateParamsPaymentMethodOptionsBlik, + PaymentIntentCreateParamsPaymentMethodOptionsBlikMandateOptions as PaymentIntentCreateParamsPaymentMethodOptionsBlikMandateOptions, PaymentIntentCreateParamsPaymentMethodOptionsBoleto as PaymentIntentCreateParamsPaymentMethodOptionsBoleto, PaymentIntentCreateParamsPaymentMethodOptionsCard as PaymentIntentCreateParamsPaymentMethodOptionsCard, PaymentIntentCreateParamsPaymentMethodOptionsCardInstallments as PaymentIntentCreateParamsPaymentMethodOptionsCardInstallments, @@ -1723,6 +1774,7 @@ PaymentIntentCreateParamsPaymentMethodOptionsPayco as PaymentIntentCreateParamsPaymentMethodOptionsPayco, PaymentIntentCreateParamsPaymentMethodOptionsPaynow as PaymentIntentCreateParamsPaymentMethodOptionsPaynow, PaymentIntentCreateParamsPaymentMethodOptionsPaypal as PaymentIntentCreateParamsPaymentMethodOptionsPaypal, + PaymentIntentCreateParamsPaymentMethodOptionsPaypay as PaymentIntentCreateParamsPaymentMethodOptionsPaypay, PaymentIntentCreateParamsPaymentMethodOptionsPayto as PaymentIntentCreateParamsPaymentMethodOptionsPayto, PaymentIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions as PaymentIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions, PaymentIntentCreateParamsPaymentMethodOptionsPix as PaymentIntentCreateParamsPaymentMethodOptionsPix, @@ -1734,6 +1786,7 @@ PaymentIntentCreateParamsPaymentMethodOptionsScalapay as PaymentIntentCreateParamsPaymentMethodOptionsScalapay, PaymentIntentCreateParamsPaymentMethodOptionsSepaDebit as PaymentIntentCreateParamsPaymentMethodOptionsSepaDebit, PaymentIntentCreateParamsPaymentMethodOptionsSepaDebitMandateOptions as PaymentIntentCreateParamsPaymentMethodOptionsSepaDebitMandateOptions, + PaymentIntentCreateParamsPaymentMethodOptionsSequra as PaymentIntentCreateParamsPaymentMethodOptionsSequra, PaymentIntentCreateParamsPaymentMethodOptionsSofort as PaymentIntentCreateParamsPaymentMethodOptionsSofort, PaymentIntentCreateParamsPaymentMethodOptionsSunbit as PaymentIntentCreateParamsPaymentMethodOptionsSunbit, PaymentIntentCreateParamsPaymentMethodOptionsSwish as PaymentIntentCreateParamsPaymentMethodOptionsSwish, @@ -1836,6 +1889,7 @@ PaymentIntentModifyParamsPaymentMethodDataPayco as PaymentIntentModifyParamsPaymentMethodDataPayco, PaymentIntentModifyParamsPaymentMethodDataPaynow as PaymentIntentModifyParamsPaymentMethodDataPaynow, PaymentIntentModifyParamsPaymentMethodDataPaypal as PaymentIntentModifyParamsPaymentMethodDataPaypal, + PaymentIntentModifyParamsPaymentMethodDataPaypay as PaymentIntentModifyParamsPaymentMethodDataPaypay, PaymentIntentModifyParamsPaymentMethodDataPayto as PaymentIntentModifyParamsPaymentMethodDataPayto, PaymentIntentModifyParamsPaymentMethodDataPix as PaymentIntentModifyParamsPaymentMethodDataPix, PaymentIntentModifyParamsPaymentMethodDataPromptpay as PaymentIntentModifyParamsPaymentMethodDataPromptpay, @@ -1845,6 +1899,7 @@ PaymentIntentModifyParamsPaymentMethodDataSatispay as PaymentIntentModifyParamsPaymentMethodDataSatispay, PaymentIntentModifyParamsPaymentMethodDataScalapay as PaymentIntentModifyParamsPaymentMethodDataScalapay, PaymentIntentModifyParamsPaymentMethodDataSepaDebit as PaymentIntentModifyParamsPaymentMethodDataSepaDebit, + PaymentIntentModifyParamsPaymentMethodDataSequra as PaymentIntentModifyParamsPaymentMethodDataSequra, PaymentIntentModifyParamsPaymentMethodDataSofort as PaymentIntentModifyParamsPaymentMethodDataSofort, PaymentIntentModifyParamsPaymentMethodDataSunbit as PaymentIntentModifyParamsPaymentMethodDataSunbit, PaymentIntentModifyParamsPaymentMethodDataSwish as PaymentIntentModifyParamsPaymentMethodDataSwish, @@ -1867,8 +1922,11 @@ PaymentIntentModifyParamsPaymentMethodOptionsBacsDebitMandateOptions as PaymentIntentModifyParamsPaymentMethodOptionsBacsDebitMandateOptions, PaymentIntentModifyParamsPaymentMethodOptionsBancontact as PaymentIntentModifyParamsPaymentMethodOptionsBancontact, PaymentIntentModifyParamsPaymentMethodOptionsBillie as PaymentIntentModifyParamsPaymentMethodOptionsBillie, + PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetails as PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetails, + PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, PaymentIntentModifyParamsPaymentMethodOptionsBizum as PaymentIntentModifyParamsPaymentMethodOptionsBizum, PaymentIntentModifyParamsPaymentMethodOptionsBlik as PaymentIntentModifyParamsPaymentMethodOptionsBlik, + PaymentIntentModifyParamsPaymentMethodOptionsBlikMandateOptions as PaymentIntentModifyParamsPaymentMethodOptionsBlikMandateOptions, PaymentIntentModifyParamsPaymentMethodOptionsBoleto as PaymentIntentModifyParamsPaymentMethodOptionsBoleto, PaymentIntentModifyParamsPaymentMethodOptionsCard as PaymentIntentModifyParamsPaymentMethodOptionsCard, PaymentIntentModifyParamsPaymentMethodOptionsCardInstallments as PaymentIntentModifyParamsPaymentMethodOptionsCardInstallments, @@ -1909,6 +1967,7 @@ PaymentIntentModifyParamsPaymentMethodOptionsPayco as PaymentIntentModifyParamsPaymentMethodOptionsPayco, PaymentIntentModifyParamsPaymentMethodOptionsPaynow as PaymentIntentModifyParamsPaymentMethodOptionsPaynow, PaymentIntentModifyParamsPaymentMethodOptionsPaypal as PaymentIntentModifyParamsPaymentMethodOptionsPaypal, + PaymentIntentModifyParamsPaymentMethodOptionsPaypay as PaymentIntentModifyParamsPaymentMethodOptionsPaypay, PaymentIntentModifyParamsPaymentMethodOptionsPayto as PaymentIntentModifyParamsPaymentMethodOptionsPayto, PaymentIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions as PaymentIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions, PaymentIntentModifyParamsPaymentMethodOptionsPix as PaymentIntentModifyParamsPaymentMethodOptionsPix, @@ -1920,6 +1979,7 @@ PaymentIntentModifyParamsPaymentMethodOptionsScalapay as PaymentIntentModifyParamsPaymentMethodOptionsScalapay, PaymentIntentModifyParamsPaymentMethodOptionsSepaDebit as PaymentIntentModifyParamsPaymentMethodOptionsSepaDebit, PaymentIntentModifyParamsPaymentMethodOptionsSepaDebitMandateOptions as PaymentIntentModifyParamsPaymentMethodOptionsSepaDebitMandateOptions, + PaymentIntentModifyParamsPaymentMethodOptionsSequra as PaymentIntentModifyParamsPaymentMethodOptionsSequra, PaymentIntentModifyParamsPaymentMethodOptionsSofort as PaymentIntentModifyParamsPaymentMethodOptionsSofort, PaymentIntentModifyParamsPaymentMethodOptionsSunbit as PaymentIntentModifyParamsPaymentMethodOptionsSunbit, PaymentIntentModifyParamsPaymentMethodOptionsSwish as PaymentIntentModifyParamsPaymentMethodOptionsSwish, @@ -2002,6 +2062,7 @@ PaymentIntentUpdateParamsPaymentMethodDataPayco as PaymentIntentUpdateParamsPaymentMethodDataPayco, PaymentIntentUpdateParamsPaymentMethodDataPaynow as PaymentIntentUpdateParamsPaymentMethodDataPaynow, PaymentIntentUpdateParamsPaymentMethodDataPaypal as PaymentIntentUpdateParamsPaymentMethodDataPaypal, + PaymentIntentUpdateParamsPaymentMethodDataPaypay as PaymentIntentUpdateParamsPaymentMethodDataPaypay, PaymentIntentUpdateParamsPaymentMethodDataPayto as PaymentIntentUpdateParamsPaymentMethodDataPayto, PaymentIntentUpdateParamsPaymentMethodDataPix as PaymentIntentUpdateParamsPaymentMethodDataPix, PaymentIntentUpdateParamsPaymentMethodDataPromptpay as PaymentIntentUpdateParamsPaymentMethodDataPromptpay, @@ -2011,6 +2072,7 @@ PaymentIntentUpdateParamsPaymentMethodDataSatispay as PaymentIntentUpdateParamsPaymentMethodDataSatispay, PaymentIntentUpdateParamsPaymentMethodDataScalapay as PaymentIntentUpdateParamsPaymentMethodDataScalapay, PaymentIntentUpdateParamsPaymentMethodDataSepaDebit as PaymentIntentUpdateParamsPaymentMethodDataSepaDebit, + PaymentIntentUpdateParamsPaymentMethodDataSequra as PaymentIntentUpdateParamsPaymentMethodDataSequra, PaymentIntentUpdateParamsPaymentMethodDataSofort as PaymentIntentUpdateParamsPaymentMethodDataSofort, PaymentIntentUpdateParamsPaymentMethodDataSunbit as PaymentIntentUpdateParamsPaymentMethodDataSunbit, PaymentIntentUpdateParamsPaymentMethodDataSwish as PaymentIntentUpdateParamsPaymentMethodDataSwish, @@ -2033,8 +2095,11 @@ PaymentIntentUpdateParamsPaymentMethodOptionsBacsDebitMandateOptions as PaymentIntentUpdateParamsPaymentMethodOptionsBacsDebitMandateOptions, PaymentIntentUpdateParamsPaymentMethodOptionsBancontact as PaymentIntentUpdateParamsPaymentMethodOptionsBancontact, PaymentIntentUpdateParamsPaymentMethodOptionsBillie as PaymentIntentUpdateParamsPaymentMethodOptionsBillie, + PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetails as PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetails, + PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, PaymentIntentUpdateParamsPaymentMethodOptionsBizum as PaymentIntentUpdateParamsPaymentMethodOptionsBizum, PaymentIntentUpdateParamsPaymentMethodOptionsBlik as PaymentIntentUpdateParamsPaymentMethodOptionsBlik, + PaymentIntentUpdateParamsPaymentMethodOptionsBlikMandateOptions as PaymentIntentUpdateParamsPaymentMethodOptionsBlikMandateOptions, PaymentIntentUpdateParamsPaymentMethodOptionsBoleto as PaymentIntentUpdateParamsPaymentMethodOptionsBoleto, PaymentIntentUpdateParamsPaymentMethodOptionsCard as PaymentIntentUpdateParamsPaymentMethodOptionsCard, PaymentIntentUpdateParamsPaymentMethodOptionsCardInstallments as PaymentIntentUpdateParamsPaymentMethodOptionsCardInstallments, @@ -2075,6 +2140,7 @@ PaymentIntentUpdateParamsPaymentMethodOptionsPayco as PaymentIntentUpdateParamsPaymentMethodOptionsPayco, PaymentIntentUpdateParamsPaymentMethodOptionsPaynow as PaymentIntentUpdateParamsPaymentMethodOptionsPaynow, PaymentIntentUpdateParamsPaymentMethodOptionsPaypal as PaymentIntentUpdateParamsPaymentMethodOptionsPaypal, + PaymentIntentUpdateParamsPaymentMethodOptionsPaypay as PaymentIntentUpdateParamsPaymentMethodOptionsPaypay, PaymentIntentUpdateParamsPaymentMethodOptionsPayto as PaymentIntentUpdateParamsPaymentMethodOptionsPayto, PaymentIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions as PaymentIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions, PaymentIntentUpdateParamsPaymentMethodOptionsPix as PaymentIntentUpdateParamsPaymentMethodOptionsPix, @@ -2086,6 +2152,7 @@ PaymentIntentUpdateParamsPaymentMethodOptionsScalapay as PaymentIntentUpdateParamsPaymentMethodOptionsScalapay, PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebit as PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebit, PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebitMandateOptions as PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebitMandateOptions, + PaymentIntentUpdateParamsPaymentMethodOptionsSequra as PaymentIntentUpdateParamsPaymentMethodOptionsSequra, PaymentIntentUpdateParamsPaymentMethodOptionsSofort as PaymentIntentUpdateParamsPaymentMethodOptionsSofort, PaymentIntentUpdateParamsPaymentMethodOptionsSunbit as PaymentIntentUpdateParamsPaymentMethodOptionsSunbit, PaymentIntentUpdateParamsPaymentMethodOptionsSwish as PaymentIntentUpdateParamsPaymentMethodOptionsSwish, @@ -2136,6 +2203,7 @@ PaymentLinkCreateParamsLineItemAdjustableQuantity as PaymentLinkCreateParamsLineItemAdjustableQuantity, PaymentLinkCreateParamsLineItemPriceData as PaymentLinkCreateParamsLineItemPriceData, PaymentLinkCreateParamsLineItemPriceDataProductData as PaymentLinkCreateParamsLineItemPriceDataProductData, + PaymentLinkCreateParamsLineItemPriceDataProductDataTaxDetails as PaymentLinkCreateParamsLineItemPriceDataProductDataTaxDetails, PaymentLinkCreateParamsLineItemPriceDataRecurring as PaymentLinkCreateParamsLineItemPriceDataRecurring, PaymentLinkCreateParamsManagedPayments as PaymentLinkCreateParamsManagedPayments, PaymentLinkCreateParamsNameCollection as PaymentLinkCreateParamsNameCollection, @@ -2363,6 +2431,8 @@ PaymentMethodConfigurationCreateParamsPaynowDisplayPreference as PaymentMethodConfigurationCreateParamsPaynowDisplayPreference, PaymentMethodConfigurationCreateParamsPaypal as PaymentMethodConfigurationCreateParamsPaypal, PaymentMethodConfigurationCreateParamsPaypalDisplayPreference as PaymentMethodConfigurationCreateParamsPaypalDisplayPreference, + PaymentMethodConfigurationCreateParamsPaypay as PaymentMethodConfigurationCreateParamsPaypay, + PaymentMethodConfigurationCreateParamsPaypayDisplayPreference as PaymentMethodConfigurationCreateParamsPaypayDisplayPreference, PaymentMethodConfigurationCreateParamsPayto as PaymentMethodConfigurationCreateParamsPayto, PaymentMethodConfigurationCreateParamsPaytoDisplayPreference as PaymentMethodConfigurationCreateParamsPaytoDisplayPreference, PaymentMethodConfigurationCreateParamsPix as PaymentMethodConfigurationCreateParamsPix, @@ -2379,6 +2449,8 @@ PaymentMethodConfigurationCreateParamsScalapayDisplayPreference as PaymentMethodConfigurationCreateParamsScalapayDisplayPreference, PaymentMethodConfigurationCreateParamsSepaDebit as PaymentMethodConfigurationCreateParamsSepaDebit, PaymentMethodConfigurationCreateParamsSepaDebitDisplayPreference as PaymentMethodConfigurationCreateParamsSepaDebitDisplayPreference, + PaymentMethodConfigurationCreateParamsSequra as PaymentMethodConfigurationCreateParamsSequra, + PaymentMethodConfigurationCreateParamsSequraDisplayPreference as PaymentMethodConfigurationCreateParamsSequraDisplayPreference, PaymentMethodConfigurationCreateParamsSofort as PaymentMethodConfigurationCreateParamsSofort, PaymentMethodConfigurationCreateParamsSofortDisplayPreference as PaymentMethodConfigurationCreateParamsSofortDisplayPreference, PaymentMethodConfigurationCreateParamsSunbit as PaymentMethodConfigurationCreateParamsSunbit, @@ -2489,6 +2561,8 @@ PaymentMethodConfigurationModifyParamsPaynowDisplayPreference as PaymentMethodConfigurationModifyParamsPaynowDisplayPreference, PaymentMethodConfigurationModifyParamsPaypal as PaymentMethodConfigurationModifyParamsPaypal, PaymentMethodConfigurationModifyParamsPaypalDisplayPreference as PaymentMethodConfigurationModifyParamsPaypalDisplayPreference, + PaymentMethodConfigurationModifyParamsPaypay as PaymentMethodConfigurationModifyParamsPaypay, + PaymentMethodConfigurationModifyParamsPaypayDisplayPreference as PaymentMethodConfigurationModifyParamsPaypayDisplayPreference, PaymentMethodConfigurationModifyParamsPayto as PaymentMethodConfigurationModifyParamsPayto, PaymentMethodConfigurationModifyParamsPaytoDisplayPreference as PaymentMethodConfigurationModifyParamsPaytoDisplayPreference, PaymentMethodConfigurationModifyParamsPix as PaymentMethodConfigurationModifyParamsPix, @@ -2505,6 +2579,8 @@ PaymentMethodConfigurationModifyParamsScalapayDisplayPreference as PaymentMethodConfigurationModifyParamsScalapayDisplayPreference, PaymentMethodConfigurationModifyParamsSepaDebit as PaymentMethodConfigurationModifyParamsSepaDebit, PaymentMethodConfigurationModifyParamsSepaDebitDisplayPreference as PaymentMethodConfigurationModifyParamsSepaDebitDisplayPreference, + PaymentMethodConfigurationModifyParamsSequra as PaymentMethodConfigurationModifyParamsSequra, + PaymentMethodConfigurationModifyParamsSequraDisplayPreference as PaymentMethodConfigurationModifyParamsSequraDisplayPreference, PaymentMethodConfigurationModifyParamsSofort as PaymentMethodConfigurationModifyParamsSofort, PaymentMethodConfigurationModifyParamsSofortDisplayPreference as PaymentMethodConfigurationModifyParamsSofortDisplayPreference, PaymentMethodConfigurationModifyParamsSunbit as PaymentMethodConfigurationModifyParamsSunbit, @@ -2615,6 +2691,8 @@ PaymentMethodConfigurationUpdateParamsPaynowDisplayPreference as PaymentMethodConfigurationUpdateParamsPaynowDisplayPreference, PaymentMethodConfigurationUpdateParamsPaypal as PaymentMethodConfigurationUpdateParamsPaypal, PaymentMethodConfigurationUpdateParamsPaypalDisplayPreference as PaymentMethodConfigurationUpdateParamsPaypalDisplayPreference, + PaymentMethodConfigurationUpdateParamsPaypay as PaymentMethodConfigurationUpdateParamsPaypay, + PaymentMethodConfigurationUpdateParamsPaypayDisplayPreference as PaymentMethodConfigurationUpdateParamsPaypayDisplayPreference, PaymentMethodConfigurationUpdateParamsPayto as PaymentMethodConfigurationUpdateParamsPayto, PaymentMethodConfigurationUpdateParamsPaytoDisplayPreference as PaymentMethodConfigurationUpdateParamsPaytoDisplayPreference, PaymentMethodConfigurationUpdateParamsPix as PaymentMethodConfigurationUpdateParamsPix, @@ -2631,6 +2709,8 @@ PaymentMethodConfigurationUpdateParamsScalapayDisplayPreference as PaymentMethodConfigurationUpdateParamsScalapayDisplayPreference, PaymentMethodConfigurationUpdateParamsSepaDebit as PaymentMethodConfigurationUpdateParamsSepaDebit, PaymentMethodConfigurationUpdateParamsSepaDebitDisplayPreference as PaymentMethodConfigurationUpdateParamsSepaDebitDisplayPreference, + PaymentMethodConfigurationUpdateParamsSequra as PaymentMethodConfigurationUpdateParamsSequra, + PaymentMethodConfigurationUpdateParamsSequraDisplayPreference as PaymentMethodConfigurationUpdateParamsSequraDisplayPreference, PaymentMethodConfigurationUpdateParamsSofort as PaymentMethodConfigurationUpdateParamsSofort, PaymentMethodConfigurationUpdateParamsSofortDisplayPreference as PaymentMethodConfigurationUpdateParamsSofortDisplayPreference, PaymentMethodConfigurationUpdateParamsSunbit as PaymentMethodConfigurationUpdateParamsSunbit, @@ -2694,6 +2774,7 @@ PaymentMethodCreateParamsPayco as PaymentMethodCreateParamsPayco, PaymentMethodCreateParamsPaynow as PaymentMethodCreateParamsPaynow, PaymentMethodCreateParamsPaypal as PaymentMethodCreateParamsPaypal, + PaymentMethodCreateParamsPaypay as PaymentMethodCreateParamsPaypay, PaymentMethodCreateParamsPayto as PaymentMethodCreateParamsPayto, PaymentMethodCreateParamsPix as PaymentMethodCreateParamsPix, PaymentMethodCreateParamsPromptpay as PaymentMethodCreateParamsPromptpay, @@ -2703,6 +2784,7 @@ PaymentMethodCreateParamsSatispay as PaymentMethodCreateParamsSatispay, PaymentMethodCreateParamsScalapay as PaymentMethodCreateParamsScalapay, PaymentMethodCreateParamsSepaDebit as PaymentMethodCreateParamsSepaDebit, + PaymentMethodCreateParamsSequra as PaymentMethodCreateParamsSequra, PaymentMethodCreateParamsSofort as PaymentMethodCreateParamsSofort, PaymentMethodCreateParamsSunbit as PaymentMethodCreateParamsSunbit, PaymentMethodCreateParamsSwish as PaymentMethodCreateParamsSwish, @@ -2743,7 +2825,6 @@ PaymentMethodModifyParamsBillingDetailsAddress as PaymentMethodModifyParamsBillingDetailsAddress, PaymentMethodModifyParamsCard as PaymentMethodModifyParamsCard, PaymentMethodModifyParamsCardNetworks as PaymentMethodModifyParamsCardNetworks, - PaymentMethodModifyParamsPayto as PaymentMethodModifyParamsPayto, PaymentMethodModifyParamsUsBankAccount as PaymentMethodModifyParamsUsBankAccount, ) from stripe.params._payment_method_retrieve_params import ( @@ -2755,7 +2836,6 @@ PaymentMethodUpdateParamsBillingDetailsAddress as PaymentMethodUpdateParamsBillingDetailsAddress, PaymentMethodUpdateParamsCard as PaymentMethodUpdateParamsCard, PaymentMethodUpdateParamsCardNetworks as PaymentMethodUpdateParamsCardNetworks, - PaymentMethodUpdateParamsPayto as PaymentMethodUpdateParamsPayto, PaymentMethodUpdateParamsUsBankAccount as PaymentMethodUpdateParamsUsBankAccount, ) from stripe.params._payment_record_list_params import ( @@ -2778,6 +2858,7 @@ ) from stripe.params._payment_record_report_payment_attempt_params import ( PaymentRecordReportPaymentAttemptParams as PaymentRecordReportPaymentAttemptParams, + PaymentRecordReportPaymentAttemptParamsCanceled as PaymentRecordReportPaymentAttemptParamsCanceled, PaymentRecordReportPaymentAttemptParamsFailed as PaymentRecordReportPaymentAttemptParamsFailed, PaymentRecordReportPaymentAttemptParamsGuaranteed as PaymentRecordReportPaymentAttemptParamsGuaranteed, PaymentRecordReportPaymentAttemptParamsPaymentMethodDetails as PaymentRecordReportPaymentAttemptParamsPaymentMethodDetails, @@ -2790,6 +2871,7 @@ from stripe.params._payment_record_report_payment_params import ( PaymentRecordReportPaymentParams as PaymentRecordReportPaymentParams, PaymentRecordReportPaymentParamsAmountRequested as PaymentRecordReportPaymentParamsAmountRequested, + PaymentRecordReportPaymentParamsCanceled as PaymentRecordReportPaymentParamsCanceled, PaymentRecordReportPaymentParamsCustomerDetails as PaymentRecordReportPaymentParamsCustomerDetails, PaymentRecordReportPaymentParamsFailed as PaymentRecordReportPaymentParamsFailed, PaymentRecordReportPaymentParamsGuaranteed as PaymentRecordReportPaymentParamsGuaranteed, @@ -2838,6 +2920,7 @@ from stripe.params._plan_create_params import ( PlanCreateParams as PlanCreateParams, PlanCreateParamsProduct as PlanCreateParamsProduct, + PlanCreateParamsProductTaxDetails as PlanCreateParamsProductTaxDetails, PlanCreateParamsTier as PlanCreateParamsTier, PlanCreateParamsTransformUsage as PlanCreateParamsTransformUsage, ) @@ -2864,6 +2947,7 @@ PriceCreateParamsCurrencyOptionsTier as PriceCreateParamsCurrencyOptionsTier, PriceCreateParamsCustomUnitAmount as PriceCreateParamsCustomUnitAmount, PriceCreateParamsProductData as PriceCreateParamsProductData, + PriceCreateParamsProductDataTaxDetails as PriceCreateParamsProductDataTaxDetails, PriceCreateParamsRecurring as PriceCreateParamsRecurring, PriceCreateParamsTier as PriceCreateParamsTier, PriceCreateParamsTransformQuantity as PriceCreateParamsTransformQuantity, @@ -2904,6 +2988,7 @@ ProductCreateParamsDefaultPriceDataRecurring as ProductCreateParamsDefaultPriceDataRecurring, ProductCreateParamsMarketingFeature as ProductCreateParamsMarketingFeature, ProductCreateParamsPackageDimensions as ProductCreateParamsPackageDimensions, + ProductCreateParamsTaxDetails as ProductCreateParamsTaxDetails, ) from stripe.params._product_delete_feature_params import ( ProductDeleteFeatureParams as ProductDeleteFeatureParams, @@ -2934,6 +3019,7 @@ ProductModifyParams as ProductModifyParams, ProductModifyParamsMarketingFeature as ProductModifyParamsMarketingFeature, ProductModifyParamsPackageDimensions as ProductModifyParamsPackageDimensions, + ProductModifyParamsTaxDetails as ProductModifyParamsTaxDetails, ) from stripe.params._product_retrieve_feature_params import ( ProductRetrieveFeatureParams as ProductRetrieveFeatureParams, @@ -2948,6 +3034,7 @@ ProductUpdateParams as ProductUpdateParams, ProductUpdateParamsMarketingFeature as ProductUpdateParamsMarketingFeature, ProductUpdateParamsPackageDimensions as ProductUpdateParamsPackageDimensions, + ProductUpdateParamsTaxDetails as ProductUpdateParamsTaxDetails, ) from stripe.params._promotion_code_create_params import ( PromotionCodeCreateParams as PromotionCodeCreateParams, @@ -3137,6 +3224,7 @@ SetupIntentConfirmParamsPaymentMethodDataPayco as SetupIntentConfirmParamsPaymentMethodDataPayco, SetupIntentConfirmParamsPaymentMethodDataPaynow as SetupIntentConfirmParamsPaymentMethodDataPaynow, SetupIntentConfirmParamsPaymentMethodDataPaypal as SetupIntentConfirmParamsPaymentMethodDataPaypal, + SetupIntentConfirmParamsPaymentMethodDataPaypay as SetupIntentConfirmParamsPaymentMethodDataPaypay, SetupIntentConfirmParamsPaymentMethodDataPayto as SetupIntentConfirmParamsPaymentMethodDataPayto, SetupIntentConfirmParamsPaymentMethodDataPix as SetupIntentConfirmParamsPaymentMethodDataPix, SetupIntentConfirmParamsPaymentMethodDataPromptpay as SetupIntentConfirmParamsPaymentMethodDataPromptpay, @@ -3146,6 +3234,7 @@ SetupIntentConfirmParamsPaymentMethodDataSatispay as SetupIntentConfirmParamsPaymentMethodDataSatispay, SetupIntentConfirmParamsPaymentMethodDataScalapay as SetupIntentConfirmParamsPaymentMethodDataScalapay, SetupIntentConfirmParamsPaymentMethodDataSepaDebit as SetupIntentConfirmParamsPaymentMethodDataSepaDebit, + SetupIntentConfirmParamsPaymentMethodDataSequra as SetupIntentConfirmParamsPaymentMethodDataSequra, SetupIntentConfirmParamsPaymentMethodDataSofort as SetupIntentConfirmParamsPaymentMethodDataSofort, SetupIntentConfirmParamsPaymentMethodDataSunbit as SetupIntentConfirmParamsPaymentMethodDataSunbit, SetupIntentConfirmParamsPaymentMethodDataSwish as SetupIntentConfirmParamsPaymentMethodDataSwish, @@ -3162,6 +3251,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, @@ -3237,6 +3328,7 @@ SetupIntentCreateParamsPaymentMethodDataPayco as SetupIntentCreateParamsPaymentMethodDataPayco, SetupIntentCreateParamsPaymentMethodDataPaynow as SetupIntentCreateParamsPaymentMethodDataPaynow, SetupIntentCreateParamsPaymentMethodDataPaypal as SetupIntentCreateParamsPaymentMethodDataPaypal, + SetupIntentCreateParamsPaymentMethodDataPaypay as SetupIntentCreateParamsPaymentMethodDataPaypay, SetupIntentCreateParamsPaymentMethodDataPayto as SetupIntentCreateParamsPaymentMethodDataPayto, SetupIntentCreateParamsPaymentMethodDataPix as SetupIntentCreateParamsPaymentMethodDataPix, SetupIntentCreateParamsPaymentMethodDataPromptpay as SetupIntentCreateParamsPaymentMethodDataPromptpay, @@ -3246,6 +3338,7 @@ SetupIntentCreateParamsPaymentMethodDataSatispay as SetupIntentCreateParamsPaymentMethodDataSatispay, SetupIntentCreateParamsPaymentMethodDataScalapay as SetupIntentCreateParamsPaymentMethodDataScalapay, SetupIntentCreateParamsPaymentMethodDataSepaDebit as SetupIntentCreateParamsPaymentMethodDataSepaDebit, + SetupIntentCreateParamsPaymentMethodDataSequra as SetupIntentCreateParamsPaymentMethodDataSequra, SetupIntentCreateParamsPaymentMethodDataSofort as SetupIntentCreateParamsPaymentMethodDataSofort, SetupIntentCreateParamsPaymentMethodDataSunbit as SetupIntentCreateParamsPaymentMethodDataSunbit, SetupIntentCreateParamsPaymentMethodDataSwish as SetupIntentCreateParamsPaymentMethodDataSwish, @@ -3262,6 +3355,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, @@ -3337,6 +3432,7 @@ SetupIntentModifyParamsPaymentMethodDataPayco as SetupIntentModifyParamsPaymentMethodDataPayco, SetupIntentModifyParamsPaymentMethodDataPaynow as SetupIntentModifyParamsPaymentMethodDataPaynow, SetupIntentModifyParamsPaymentMethodDataPaypal as SetupIntentModifyParamsPaymentMethodDataPaypal, + SetupIntentModifyParamsPaymentMethodDataPaypay as SetupIntentModifyParamsPaymentMethodDataPaypay, SetupIntentModifyParamsPaymentMethodDataPayto as SetupIntentModifyParamsPaymentMethodDataPayto, SetupIntentModifyParamsPaymentMethodDataPix as SetupIntentModifyParamsPaymentMethodDataPix, SetupIntentModifyParamsPaymentMethodDataPromptpay as SetupIntentModifyParamsPaymentMethodDataPromptpay, @@ -3346,6 +3442,7 @@ SetupIntentModifyParamsPaymentMethodDataSatispay as SetupIntentModifyParamsPaymentMethodDataSatispay, SetupIntentModifyParamsPaymentMethodDataScalapay as SetupIntentModifyParamsPaymentMethodDataScalapay, SetupIntentModifyParamsPaymentMethodDataSepaDebit as SetupIntentModifyParamsPaymentMethodDataSepaDebit, + SetupIntentModifyParamsPaymentMethodDataSequra as SetupIntentModifyParamsPaymentMethodDataSequra, SetupIntentModifyParamsPaymentMethodDataSofort as SetupIntentModifyParamsPaymentMethodDataSofort, SetupIntentModifyParamsPaymentMethodDataSunbit as SetupIntentModifyParamsPaymentMethodDataSunbit, SetupIntentModifyParamsPaymentMethodDataSwish as SetupIntentModifyParamsPaymentMethodDataSwish, @@ -3362,6 +3459,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, @@ -3435,6 +3534,7 @@ SetupIntentUpdateParamsPaymentMethodDataPayco as SetupIntentUpdateParamsPaymentMethodDataPayco, SetupIntentUpdateParamsPaymentMethodDataPaynow as SetupIntentUpdateParamsPaymentMethodDataPaynow, SetupIntentUpdateParamsPaymentMethodDataPaypal as SetupIntentUpdateParamsPaymentMethodDataPaypal, + SetupIntentUpdateParamsPaymentMethodDataPaypay as SetupIntentUpdateParamsPaymentMethodDataPaypay, SetupIntentUpdateParamsPaymentMethodDataPayto as SetupIntentUpdateParamsPaymentMethodDataPayto, SetupIntentUpdateParamsPaymentMethodDataPix as SetupIntentUpdateParamsPaymentMethodDataPix, SetupIntentUpdateParamsPaymentMethodDataPromptpay as SetupIntentUpdateParamsPaymentMethodDataPromptpay, @@ -3444,6 +3544,7 @@ SetupIntentUpdateParamsPaymentMethodDataSatispay as SetupIntentUpdateParamsPaymentMethodDataSatispay, SetupIntentUpdateParamsPaymentMethodDataScalapay as SetupIntentUpdateParamsPaymentMethodDataScalapay, SetupIntentUpdateParamsPaymentMethodDataSepaDebit as SetupIntentUpdateParamsPaymentMethodDataSepaDebit, + SetupIntentUpdateParamsPaymentMethodDataSequra as SetupIntentUpdateParamsPaymentMethodDataSequra, SetupIntentUpdateParamsPaymentMethodDataSofort as SetupIntentUpdateParamsPaymentMethodDataSofort, SetupIntentUpdateParamsPaymentMethodDataSunbit as SetupIntentUpdateParamsPaymentMethodDataSunbit, SetupIntentUpdateParamsPaymentMethodDataSwish as SetupIntentUpdateParamsPaymentMethodDataSwish, @@ -3460,6 +3561,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, @@ -3598,6 +3701,7 @@ SubscriptionCreateParamsInvoiceSettingsIssuer as SubscriptionCreateParamsInvoiceSettingsIssuer, SubscriptionCreateParamsItem as SubscriptionCreateParamsItem, SubscriptionCreateParamsItemBillingThresholds as SubscriptionCreateParamsItemBillingThresholds, + SubscriptionCreateParamsItemCurrentTrial as SubscriptionCreateParamsItemCurrentTrial, SubscriptionCreateParamsItemDiscount as SubscriptionCreateParamsItemDiscount, SubscriptionCreateParamsItemPriceData as SubscriptionCreateParamsItemPriceData, SubscriptionCreateParamsItemPriceDataRecurring as SubscriptionCreateParamsItemPriceDataRecurring, @@ -3607,6 +3711,10 @@ SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBancontact as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBancontact, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillie as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillie, + SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, + SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, + SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlik as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlik, + SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCard as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCard, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance, @@ -3634,6 +3742,7 @@ from stripe.params._subscription_item_create_params import ( SubscriptionItemCreateParams as SubscriptionItemCreateParams, SubscriptionItemCreateParamsBillingThresholds as SubscriptionItemCreateParamsBillingThresholds, + SubscriptionItemCreateParamsCurrentTrial as SubscriptionItemCreateParamsCurrentTrial, SubscriptionItemCreateParamsDiscount as SubscriptionItemCreateParamsDiscount, SubscriptionItemCreateParamsPriceData as SubscriptionItemCreateParamsPriceData, SubscriptionItemCreateParamsPriceDataRecurring as SubscriptionItemCreateParamsPriceDataRecurring, @@ -3647,6 +3756,7 @@ from stripe.params._subscription_item_modify_params import ( SubscriptionItemModifyParams as SubscriptionItemModifyParams, SubscriptionItemModifyParamsBillingThresholds as SubscriptionItemModifyParamsBillingThresholds, + SubscriptionItemModifyParamsCurrentTrial as SubscriptionItemModifyParamsCurrentTrial, SubscriptionItemModifyParamsDiscount as SubscriptionItemModifyParamsDiscount, SubscriptionItemModifyParamsPriceData as SubscriptionItemModifyParamsPriceData, SubscriptionItemModifyParamsPriceDataRecurring as SubscriptionItemModifyParamsPriceDataRecurring, @@ -3657,6 +3767,7 @@ from stripe.params._subscription_item_update_params import ( SubscriptionItemUpdateParams as SubscriptionItemUpdateParams, SubscriptionItemUpdateParamsBillingThresholds as SubscriptionItemUpdateParamsBillingThresholds, + SubscriptionItemUpdateParamsCurrentTrial as SubscriptionItemUpdateParamsCurrentTrial, SubscriptionItemUpdateParamsDiscount as SubscriptionItemUpdateParamsDiscount, SubscriptionItemUpdateParamsPriceData as SubscriptionItemUpdateParamsPriceData, SubscriptionItemUpdateParamsPriceDataRecurring as SubscriptionItemUpdateParamsPriceDataRecurring, @@ -3683,6 +3794,7 @@ SubscriptionModifyParamsAddInvoiceItemPriceData as SubscriptionModifyParamsAddInvoiceItemPriceData, SubscriptionModifyParamsAutomaticTax as SubscriptionModifyParamsAutomaticTax, SubscriptionModifyParamsAutomaticTaxLiability as SubscriptionModifyParamsAutomaticTaxLiability, + SubscriptionModifyParamsBillingCycleAnchor as SubscriptionModifyParamsBillingCycleAnchor, SubscriptionModifyParamsBillingSchedule as SubscriptionModifyParamsBillingSchedule, SubscriptionModifyParamsBillingScheduleAppliesTo as SubscriptionModifyParamsBillingScheduleAppliesTo, SubscriptionModifyParamsBillingScheduleBillUntil as SubscriptionModifyParamsBillingScheduleBillUntil, @@ -3695,6 +3807,7 @@ SubscriptionModifyParamsInvoiceSettingsIssuer as SubscriptionModifyParamsInvoiceSettingsIssuer, SubscriptionModifyParamsItem as SubscriptionModifyParamsItem, SubscriptionModifyParamsItemBillingThresholds as SubscriptionModifyParamsItemBillingThresholds, + SubscriptionModifyParamsItemCurrentTrial as SubscriptionModifyParamsItemCurrentTrial, SubscriptionModifyParamsItemDiscount as SubscriptionModifyParamsItemDiscount, SubscriptionModifyParamsItemPriceData as SubscriptionModifyParamsItemPriceData, SubscriptionModifyParamsItemPriceDataRecurring as SubscriptionModifyParamsItemPriceDataRecurring, @@ -3705,6 +3818,10 @@ SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillie as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillie, + SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, + SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, + SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlik as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlik, + SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCard as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCard, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance, @@ -3726,8 +3843,15 @@ SubscriptionModifyParamsTrialSettings as SubscriptionModifyParamsTrialSettings, SubscriptionModifyParamsTrialSettingsEndBehavior as SubscriptionModifyParamsTrialSettingsEndBehavior, ) + from stripe.params._subscription_pause_params import ( + SubscriptionPauseParams as SubscriptionPauseParams, + SubscriptionPauseParamsBillFor as SubscriptionPauseParamsBillFor, + SubscriptionPauseParamsBillForOutstandingUsageThrough as SubscriptionPauseParamsBillForOutstandingUsageThrough, + SubscriptionPauseParamsBillForUnusedTimeFrom as SubscriptionPauseParamsBillForUnusedTimeFrom, + ) from stripe.params._subscription_resume_params import ( SubscriptionResumeParams as SubscriptionResumeParams, + SubscriptionResumeParamsBillingCycleAnchor as SubscriptionResumeParamsBillingCycleAnchor, ) from stripe.params._subscription_retrieve_params import ( SubscriptionRetrieveParams as SubscriptionRetrieveParams, @@ -3747,6 +3871,17 @@ SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsCustomField as SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsCustomField, SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer as SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer, SubscriptionScheduleCreateParamsDefaultSettingsTransferData as SubscriptionScheduleCreateParamsDefaultSettingsTransferData, + SubscriptionScheduleCreateParamsPauseSchedule as SubscriptionScheduleCreateParamsPauseSchedule, + SubscriptionScheduleCreateParamsPauseSchedulePause as SubscriptionScheduleCreateParamsPauseSchedulePause, + SubscriptionScheduleCreateParamsPauseSchedulePausePauseAt as SubscriptionScheduleCreateParamsPauseSchedulePausePauseAt, + SubscriptionScheduleCreateParamsPauseSchedulePauseSettings as SubscriptionScheduleCreateParamsPauseSchedulePauseSettings, + SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillFor as SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillFor, + SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough as SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough, + SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom as SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom, + SubscriptionScheduleCreateParamsPauseScheduleResume as SubscriptionScheduleCreateParamsPauseScheduleResume, + SubscriptionScheduleCreateParamsPauseScheduleResumeResumeAt as SubscriptionScheduleCreateParamsPauseScheduleResumeResumeAt, + SubscriptionScheduleCreateParamsPauseScheduleResumeResumeAtDuration as SubscriptionScheduleCreateParamsPauseScheduleResumeResumeAtDuration, + SubscriptionScheduleCreateParamsPauseScheduleResumeSettings as SubscriptionScheduleCreateParamsPauseScheduleResumeSettings, SubscriptionScheduleCreateParamsPhase as SubscriptionScheduleCreateParamsPhase, SubscriptionScheduleCreateParamsPhaseAddInvoiceItem as SubscriptionScheduleCreateParamsPhaseAddInvoiceItem, SubscriptionScheduleCreateParamsPhaseAddInvoiceItemDiscount as SubscriptionScheduleCreateParamsPhaseAddInvoiceItemDiscount, @@ -3786,6 +3921,17 @@ SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsCustomField as SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsCustomField, SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsIssuer as SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsIssuer, SubscriptionScheduleModifyParamsDefaultSettingsTransferData as SubscriptionScheduleModifyParamsDefaultSettingsTransferData, + SubscriptionScheduleModifyParamsPauseSchedule as SubscriptionScheduleModifyParamsPauseSchedule, + SubscriptionScheduleModifyParamsPauseSchedulePause as SubscriptionScheduleModifyParamsPauseSchedulePause, + SubscriptionScheduleModifyParamsPauseSchedulePausePauseAt as SubscriptionScheduleModifyParamsPauseSchedulePausePauseAt, + SubscriptionScheduleModifyParamsPauseSchedulePauseSettings as SubscriptionScheduleModifyParamsPauseSchedulePauseSettings, + SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillFor as SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillFor, + SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough as SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough, + SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom as SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom, + SubscriptionScheduleModifyParamsPauseScheduleResume as SubscriptionScheduleModifyParamsPauseScheduleResume, + SubscriptionScheduleModifyParamsPauseScheduleResumeResumeAt as SubscriptionScheduleModifyParamsPauseScheduleResumeResumeAt, + SubscriptionScheduleModifyParamsPauseScheduleResumeResumeAtDuration as SubscriptionScheduleModifyParamsPauseScheduleResumeResumeAtDuration, + SubscriptionScheduleModifyParamsPauseScheduleResumeSettings as SubscriptionScheduleModifyParamsPauseScheduleResumeSettings, SubscriptionScheduleModifyParamsPhase as SubscriptionScheduleModifyParamsPhase, SubscriptionScheduleModifyParamsPhaseAddInvoiceItem as SubscriptionScheduleModifyParamsPhaseAddInvoiceItem, SubscriptionScheduleModifyParamsPhaseAddInvoiceItemDiscount as SubscriptionScheduleModifyParamsPhaseAddInvoiceItemDiscount, @@ -3824,6 +3970,17 @@ SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsCustomField as SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsCustomField, SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsIssuer as SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsIssuer, SubscriptionScheduleUpdateParamsDefaultSettingsTransferData as SubscriptionScheduleUpdateParamsDefaultSettingsTransferData, + SubscriptionScheduleUpdateParamsPauseSchedule as SubscriptionScheduleUpdateParamsPauseSchedule, + SubscriptionScheduleUpdateParamsPauseSchedulePause as SubscriptionScheduleUpdateParamsPauseSchedulePause, + SubscriptionScheduleUpdateParamsPauseSchedulePausePauseAt as SubscriptionScheduleUpdateParamsPauseSchedulePausePauseAt, + SubscriptionScheduleUpdateParamsPauseSchedulePauseSettings as SubscriptionScheduleUpdateParamsPauseSchedulePauseSettings, + SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillFor as SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillFor, + SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough as SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough, + SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom as SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom, + SubscriptionScheduleUpdateParamsPauseScheduleResume as SubscriptionScheduleUpdateParamsPauseScheduleResume, + SubscriptionScheduleUpdateParamsPauseScheduleResumeResumeAt as SubscriptionScheduleUpdateParamsPauseScheduleResumeResumeAt, + SubscriptionScheduleUpdateParamsPauseScheduleResumeResumeAtDuration as SubscriptionScheduleUpdateParamsPauseScheduleResumeResumeAtDuration, + SubscriptionScheduleUpdateParamsPauseScheduleResumeSettings as SubscriptionScheduleUpdateParamsPauseScheduleResumeSettings, SubscriptionScheduleUpdateParamsPhase as SubscriptionScheduleUpdateParamsPhase, SubscriptionScheduleUpdateParamsPhaseAddInvoiceItem as SubscriptionScheduleUpdateParamsPhaseAddInvoiceItem, SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemDiscount as SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemDiscount, @@ -3859,6 +4016,7 @@ SubscriptionUpdateParamsAddInvoiceItemPriceData as SubscriptionUpdateParamsAddInvoiceItemPriceData, SubscriptionUpdateParamsAutomaticTax as SubscriptionUpdateParamsAutomaticTax, SubscriptionUpdateParamsAutomaticTaxLiability as SubscriptionUpdateParamsAutomaticTaxLiability, + SubscriptionUpdateParamsBillingCycleAnchor as SubscriptionUpdateParamsBillingCycleAnchor, SubscriptionUpdateParamsBillingSchedule as SubscriptionUpdateParamsBillingSchedule, SubscriptionUpdateParamsBillingScheduleAppliesTo as SubscriptionUpdateParamsBillingScheduleAppliesTo, SubscriptionUpdateParamsBillingScheduleBillUntil as SubscriptionUpdateParamsBillingScheduleBillUntil, @@ -3871,6 +4029,7 @@ SubscriptionUpdateParamsInvoiceSettingsIssuer as SubscriptionUpdateParamsInvoiceSettingsIssuer, SubscriptionUpdateParamsItem as SubscriptionUpdateParamsItem, SubscriptionUpdateParamsItemBillingThresholds as SubscriptionUpdateParamsItemBillingThresholds, + SubscriptionUpdateParamsItemCurrentTrial as SubscriptionUpdateParamsItemCurrentTrial, SubscriptionUpdateParamsItemDiscount as SubscriptionUpdateParamsItemDiscount, SubscriptionUpdateParamsItemPriceData as SubscriptionUpdateParamsItemPriceData, SubscriptionUpdateParamsItemPriceDataRecurring as SubscriptionUpdateParamsItemPriceDataRecurring, @@ -3881,6 +4040,10 @@ SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillie as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillie, + SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, + SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, + SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlik as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlik, + SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCard as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCard, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance, @@ -4084,12 +4247,14 @@ "forwarding": ("stripe.params.forwarding", True), "identity": ("stripe.params.identity", True), "issuing": ("stripe.params.issuing", True), + "product_catalog": ("stripe.params.product_catalog", True), "radar": ("stripe.params.radar", True), "reporting": ("stripe.params.reporting", True), "sigma": ("stripe.params.sigma", True), "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", @@ -4200,6 +4365,10 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsCapabilitiesBlikRecurringPayments": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsCapabilitiesBoletoPayments": ( "stripe.params._account_create_params", False, @@ -4328,6 +4497,10 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsCapabilitiesPaypayPayments": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsCapabilitiesPaytoPayments": ( "stripe.params._account_create_params", False, @@ -4364,6 +4537,10 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsCapabilitiesSequraPayments": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsCapabilitiesSofortPayments": ( "stripe.params._account_create_params", False, @@ -4609,6 +4786,30 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsSettingsPaypayPayments": ( + "stripe.params._account_create_params", + False, + ), + "AccountCreateParamsSettingsPaypayPaymentsSite": ( + "stripe.params._account_create_params", + False, + ), + "AccountCreateParamsSettingsPaypayPaymentsSiteAccessible": ( + "stripe.params._account_create_params", + False, + ), + "AccountCreateParamsSettingsPaypayPaymentsSiteInDevelopment": ( + "stripe.params._account_create_params", + False, + ), + "AccountCreateParamsSettingsPaypayPaymentsSiteRestricted": ( + "stripe.params._account_create_params", + False, + ), + "AccountCreateParamsSettingsSepaDebitPayments": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsSettingsTreasury": ( "stripe.params._account_create_params", False, @@ -5321,6 +5522,10 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsCapabilitiesBlikRecurringPayments": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsCapabilitiesBoletoPayments": ( "stripe.params._account_update_params", False, @@ -5449,6 +5654,10 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsCapabilitiesPaypayPayments": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsCapabilitiesPaytoPayments": ( "stripe.params._account_update_params", False, @@ -5485,6 +5694,10 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsCapabilitiesSequraPayments": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsCapabilitiesSofortPayments": ( "stripe.params._account_update_params", False, @@ -5722,6 +5935,26 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsSettingsPaypayPayments": ( + "stripe.params._account_update_params", + False, + ), + "AccountUpdateParamsSettingsPaypayPaymentsSite": ( + "stripe.params._account_update_params", + False, + ), + "AccountUpdateParamsSettingsPaypayPaymentsSiteAccessible": ( + "stripe.params._account_update_params", + False, + ), + "AccountUpdateParamsSettingsPaypayPaymentsSiteInDevelopment": ( + "stripe.params._account_update_params", + False, + ), + "AccountUpdateParamsSettingsPaypayPaymentsSiteRestricted": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsSettingsSepaDebitPayments": ( "stripe.params._account_update_params", False, @@ -6116,6 +6349,10 @@ "stripe.params._confirmation_token_create_params", False, ), + "ConfirmationTokenCreateParamsPaymentMethodDataPaypay": ( + "stripe.params._confirmation_token_create_params", + False, + ), "ConfirmationTokenCreateParamsPaymentMethodDataPayto": ( "stripe.params._confirmation_token_create_params", False, @@ -6152,6 +6389,10 @@ "stripe.params._confirmation_token_create_params", False, ), + "ConfirmationTokenCreateParamsPaymentMethodDataSequra": ( + "stripe.params._confirmation_token_create_params", + False, + ), "ConfirmationTokenCreateParamsPaymentMethodDataSofort": ( "stripe.params._confirmation_token_create_params", False, @@ -6907,6 +7148,10 @@ "stripe.params._invoice_add_lines_params", False, ), + "InvoiceAddLinesParamsLinePriceDataProductDataTaxDetails": ( + "stripe.params._invoice_add_lines_params", + False, + ), "InvoiceAddLinesParamsLinePricing": ( "stripe.params._invoice_add_lines_params", False, @@ -6972,6 +7217,18 @@ "stripe.params._invoice_create_params", False, ), + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._invoice_create_params", + False, + ), + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._invoice_create_params", + False, + ), + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBlik": ( + "stripe.params._invoice_create_params", + False, + ), "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCard": ( "stripe.params._invoice_create_params", False, @@ -7240,6 +7497,10 @@ "stripe.params._invoice_create_preview_params", False, ), + "InvoiceCreatePreviewParamsSubscriptionDetailsBillingCycleAnchor": ( + "stripe.params._invoice_create_preview_params", + False, + ), "InvoiceCreatePreviewParamsSubscriptionDetailsBillingMode": ( "stripe.params._invoice_create_preview_params", False, @@ -7272,6 +7533,10 @@ "stripe.params._invoice_create_preview_params", False, ), + "InvoiceCreatePreviewParamsSubscriptionDetailsItemCurrentTrial": ( + "stripe.params._invoice_create_preview_params", + False, + ), "InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscount": ( "stripe.params._invoice_create_preview_params", False, @@ -7284,6 +7549,22 @@ "stripe.params._invoice_create_preview_params", False, ), + "InvoiceCreatePreviewParamsSubscriptionDetailsPause": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom": ( + "stripe.params._invoice_create_preview_params", + False, + ), "InvoiceDeleteParams": ("stripe.params._invoice_delete_params", False), "InvoiceFinalizeInvoiceParams": ( "stripe.params._invoice_finalize_invoice_params", @@ -7389,6 +7670,10 @@ "stripe.params._invoice_line_item_update_params", False, ), + "InvoiceLineItemUpdateParamsPriceDataProductDataTaxDetails": ( + "stripe.params._invoice_line_item_update_params", + False, + ), "InvoiceLineItemUpdateParamsPricing": ( "stripe.params._invoice_line_item_update_params", False, @@ -7457,6 +7742,18 @@ "stripe.params._invoice_modify_params", False, ), + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._invoice_modify_params", + False, + ), + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._invoice_modify_params", + False, + ), + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBlik": ( + "stripe.params._invoice_modify_params", + False, + ), "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCard": ( "stripe.params._invoice_modify_params", False, @@ -7640,6 +7937,10 @@ "stripe.params._invoice_update_lines_params", False, ), + "InvoiceUpdateLinesParamsLinePriceDataProductDataTaxDetails": ( + "stripe.params._invoice_update_lines_params", + False, + ), "InvoiceUpdateLinesParamsLinePricing": ( "stripe.params._invoice_update_lines_params", False, @@ -7697,6 +7998,18 @@ "stripe.params._invoice_update_params", False, ), + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._invoice_update_params", + False, + ), + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._invoice_update_params", + False, + ), + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBlik": ( + "stripe.params._invoice_update_params", + False, + ), "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCard": ( "stripe.params._invoice_update_params", False, @@ -8142,6 +8455,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodDataPaypay": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodDataPayto": ( "stripe.params._payment_intent_confirm_params", False, @@ -8178,6 +8495,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodDataSequra": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodDataSofort": ( "stripe.params._payment_intent_confirm_params", False, @@ -8266,6 +8587,14 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._payment_intent_confirm_params", + False, + ), + "PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsBizum": ( "stripe.params._payment_intent_confirm_params", False, @@ -8274,6 +8603,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsBoleto": ( "stripe.params._payment_intent_confirm_params", False, @@ -8434,6 +8767,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsPaypay": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsPayto": ( "stripe.params._payment_intent_confirm_params", False, @@ -8478,6 +8815,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsSequra": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsSofort": ( "stripe.params._payment_intent_confirm_params", False, @@ -8790,6 +9131,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodDataPaypay": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodDataPayto": ( "stripe.params._payment_intent_create_params", False, @@ -8826,6 +9171,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodDataSequra": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodDataSofort": ( "stripe.params._payment_intent_create_params", False, @@ -8914,6 +9263,14 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._payment_intent_create_params", + False, + ), + "PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsBizum": ( "stripe.params._payment_intent_create_params", False, @@ -8922,6 +9279,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsBoleto": ( "stripe.params._payment_intent_create_params", False, @@ -9082,6 +9443,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsPaypay": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsPayto": ( "stripe.params._payment_intent_create_params", False, @@ -9126,6 +9491,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsSequra": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsSofort": ( "stripe.params._payment_intent_create_params", False, @@ -9502,6 +9871,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodDataPaypay": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodDataPayto": ( "stripe.params._payment_intent_modify_params", False, @@ -9538,6 +9911,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodDataSequra": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodDataSofort": ( "stripe.params._payment_intent_modify_params", False, @@ -9626,6 +10003,14 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._payment_intent_modify_params", + False, + ), + "PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsBizum": ( "stripe.params._payment_intent_modify_params", False, @@ -9634,6 +10019,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsBoleto": ( "stripe.params._payment_intent_modify_params", False, @@ -9794,6 +10183,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsPaypay": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsPayto": ( "stripe.params._payment_intent_modify_params", False, @@ -9838,6 +10231,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsSequra": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsSofort": ( "stripe.params._payment_intent_modify_params", False, @@ -10142,6 +10539,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodDataPaypay": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodDataPayto": ( "stripe.params._payment_intent_update_params", False, @@ -10178,6 +10579,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodDataSequra": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodDataSofort": ( "stripe.params._payment_intent_update_params", False, @@ -10266,6 +10671,14 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._payment_intent_update_params", + False, + ), + "PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsBizum": ( "stripe.params._payment_intent_update_params", False, @@ -10274,6 +10687,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsBoleto": ( "stripe.params._payment_intent_update_params", False, @@ -10434,6 +10851,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsPaypay": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsPayto": ( "stripe.params._payment_intent_update_params", False, @@ -10478,6 +10899,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsSequra": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsSofort": ( "stripe.params._payment_intent_update_params", False, @@ -10662,6 +11087,10 @@ "stripe.params._payment_link_create_params", False, ), + "PaymentLinkCreateParamsLineItemPriceDataProductDataTaxDetails": ( + "stripe.params._payment_link_create_params", + False, + ), "PaymentLinkCreateParamsLineItemPriceDataRecurring": ( "stripe.params._payment_link_create_params", False, @@ -11506,6 +11935,14 @@ "stripe.params._payment_method_configuration_create_params", False, ), + "PaymentMethodConfigurationCreateParamsPaypay": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), + "PaymentMethodConfigurationCreateParamsPaypayDisplayPreference": ( + "stripe.params._payment_method_configuration_create_params", + False, + ), "PaymentMethodConfigurationCreateParamsPayto": ( "stripe.params._payment_method_configuration_create_params", False, @@ -11570,6 +12007,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, + ), "PaymentMethodConfigurationCreateParamsSofort": ( "stripe.params._payment_method_configuration_create_params", False, @@ -11994,6 +12439,14 @@ "stripe.params._payment_method_configuration_modify_params", False, ), + "PaymentMethodConfigurationModifyParamsPaypay": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), + "PaymentMethodConfigurationModifyParamsPaypayDisplayPreference": ( + "stripe.params._payment_method_configuration_modify_params", + False, + ), "PaymentMethodConfigurationModifyParamsPayto": ( "stripe.params._payment_method_configuration_modify_params", False, @@ -12058,6 +12511,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, + ), "PaymentMethodConfigurationModifyParamsSofort": ( "stripe.params._payment_method_configuration_modify_params", False, @@ -12482,6 +12943,14 @@ "stripe.params._payment_method_configuration_update_params", False, ), + "PaymentMethodConfigurationUpdateParamsPaypay": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), + "PaymentMethodConfigurationUpdateParamsPaypayDisplayPreference": ( + "stripe.params._payment_method_configuration_update_params", + False, + ), "PaymentMethodConfigurationUpdateParamsPayto": ( "stripe.params._payment_method_configuration_update_params", False, @@ -12546,6 +13015,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, + ), "PaymentMethodConfigurationUpdateParamsSofort": ( "stripe.params._payment_method_configuration_update_params", False, @@ -12790,6 +13267,10 @@ "stripe.params._payment_method_create_params", False, ), + "PaymentMethodCreateParamsPaypay": ( + "stripe.params._payment_method_create_params", + False, + ), "PaymentMethodCreateParamsPayto": ( "stripe.params._payment_method_create_params", False, @@ -12826,6 +13307,10 @@ "stripe.params._payment_method_create_params", False, ), + "PaymentMethodCreateParamsSequra": ( + "stripe.params._payment_method_create_params", + False, + ), "PaymentMethodCreateParamsSofort": ( "stripe.params._payment_method_create_params", False, @@ -12914,10 +13399,6 @@ "stripe.params._payment_method_modify_params", False, ), - "PaymentMethodModifyParamsPayto": ( - "stripe.params._payment_method_modify_params", - False, - ), "PaymentMethodModifyParamsUsBankAccount": ( "stripe.params._payment_method_modify_params", False, @@ -12946,10 +13427,6 @@ "stripe.params._payment_method_update_params", False, ), - "PaymentMethodUpdateParamsPayto": ( - "stripe.params._payment_method_update_params", - False, - ), "PaymentMethodUpdateParamsUsBankAccount": ( "stripe.params._payment_method_update_params", False, @@ -12990,6 +13467,10 @@ "stripe.params._payment_record_report_payment_attempt_params", False, ), + "PaymentRecordReportPaymentAttemptParamsCanceled": ( + "stripe.params._payment_record_report_payment_attempt_params", + False, + ), "PaymentRecordReportPaymentAttemptParamsFailed": ( "stripe.params._payment_record_report_payment_attempt_params", False, @@ -13030,6 +13511,10 @@ "stripe.params._payment_record_report_payment_params", False, ), + "PaymentRecordReportPaymentParamsCanceled": ( + "stripe.params._payment_record_report_payment_params", + False, + ), "PaymentRecordReportPaymentParamsCustomerDetails": ( "stripe.params._payment_record_report_payment_params", False, @@ -13112,6 +13597,10 @@ "PayoutUpdateParams": ("stripe.params._payout_update_params", False), "PlanCreateParams": ("stripe.params._plan_create_params", False), "PlanCreateParamsProduct": ("stripe.params._plan_create_params", False), + "PlanCreateParamsProductTaxDetails": ( + "stripe.params._plan_create_params", + False, + ), "PlanCreateParamsTier": ("stripe.params._plan_create_params", False), "PlanCreateParamsTransformUsage": ( "stripe.params._plan_create_params", @@ -13144,6 +13633,10 @@ "stripe.params._price_create_params", False, ), + "PriceCreateParamsProductDataTaxDetails": ( + "stripe.params._price_create_params", + False, + ), "PriceCreateParamsRecurring": ( "stripe.params._price_create_params", False, @@ -13221,6 +13714,10 @@ "stripe.params._product_create_params", False, ), + "ProductCreateParamsTaxDetails": ( + "stripe.params._product_create_params", + False, + ), "ProductDeleteFeatureParams": ( "stripe.params._product_delete_feature_params", False, @@ -13257,6 +13754,10 @@ "stripe.params._product_modify_params", False, ), + "ProductModifyParamsTaxDetails": ( + "stripe.params._product_modify_params", + False, + ), "ProductRetrieveFeatureParams": ( "stripe.params._product_retrieve_feature_params", False, @@ -13272,6 +13773,10 @@ "stripe.params._product_update_params", False, ), + "ProductUpdateParamsTaxDetails": ( + "stripe.params._product_update_params", + False, + ), "PromotionCodeCreateParams": ( "stripe.params._promotion_code_create_params", False, @@ -13702,6 +14207,10 @@ "stripe.params._setup_intent_confirm_params", False, ), + "SetupIntentConfirmParamsPaymentMethodDataPaypay": ( + "stripe.params._setup_intent_confirm_params", + False, + ), "SetupIntentConfirmParamsPaymentMethodDataPayto": ( "stripe.params._setup_intent_confirm_params", False, @@ -13738,6 +14247,10 @@ "stripe.params._setup_intent_confirm_params", False, ), + "SetupIntentConfirmParamsPaymentMethodDataSequra": ( + "stripe.params._setup_intent_confirm_params", + False, + ), "SetupIntentConfirmParamsPaymentMethodDataSofort": ( "stripe.params._setup_intent_confirm_params", False, @@ -13802,6 +14315,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, @@ -14094,6 +14615,10 @@ "stripe.params._setup_intent_create_params", False, ), + "SetupIntentCreateParamsPaymentMethodDataPaypay": ( + "stripe.params._setup_intent_create_params", + False, + ), "SetupIntentCreateParamsPaymentMethodDataPayto": ( "stripe.params._setup_intent_create_params", False, @@ -14130,6 +14655,10 @@ "stripe.params._setup_intent_create_params", False, ), + "SetupIntentCreateParamsPaymentMethodDataSequra": ( + "stripe.params._setup_intent_create_params", + False, + ), "SetupIntentCreateParamsPaymentMethodDataSofort": ( "stripe.params._setup_intent_create_params", False, @@ -14194,6 +14723,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, @@ -14478,6 +15015,10 @@ "stripe.params._setup_intent_modify_params", False, ), + "SetupIntentModifyParamsPaymentMethodDataPaypay": ( + "stripe.params._setup_intent_modify_params", + False, + ), "SetupIntentModifyParamsPaymentMethodDataPayto": ( "stripe.params._setup_intent_modify_params", False, @@ -14514,6 +15055,10 @@ "stripe.params._setup_intent_modify_params", False, ), + "SetupIntentModifyParamsPaymentMethodDataSequra": ( + "stripe.params._setup_intent_modify_params", + False, + ), "SetupIntentModifyParamsPaymentMethodDataSofort": ( "stripe.params._setup_intent_modify_params", False, @@ -14578,6 +15123,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, @@ -14854,6 +15407,10 @@ "stripe.params._setup_intent_update_params", False, ), + "SetupIntentUpdateParamsPaymentMethodDataPaypay": ( + "stripe.params._setup_intent_update_params", + False, + ), "SetupIntentUpdateParamsPaymentMethodDataPayto": ( "stripe.params._setup_intent_update_params", False, @@ -14890,6 +15447,10 @@ "stripe.params._setup_intent_update_params", False, ), + "SetupIntentUpdateParamsPaymentMethodDataSequra": ( + "stripe.params._setup_intent_update_params", + False, + ), "SetupIntentUpdateParamsPaymentMethodDataSofort": ( "stripe.params._setup_intent_update_params", False, @@ -14954,6 +15515,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, @@ -15351,6 +15920,10 @@ "stripe.params._subscription_create_params", False, ), + "SubscriptionCreateParamsItemCurrentTrial": ( + "stripe.params._subscription_create_params", + False, + ), "SubscriptionCreateParamsItemDiscount": ( "stripe.params._subscription_create_params", False, @@ -15387,6 +15960,22 @@ "stripe.params._subscription_create_params", False, ), + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._subscription_create_params", + False, + ), + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._subscription_create_params", + False, + ), + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlik": ( + "stripe.params._subscription_create_params", + False, + ), + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._subscription_create_params", + False, + ), "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCard": ( "stripe.params._subscription_create_params", False, @@ -15479,6 +16068,10 @@ "stripe.params._subscription_item_create_params", False, ), + "SubscriptionItemCreateParamsCurrentTrial": ( + "stripe.params._subscription_item_create_params", + False, + ), "SubscriptionItemCreateParamsDiscount": ( "stripe.params._subscription_item_create_params", False, @@ -15507,6 +16100,10 @@ "stripe.params._subscription_item_modify_params", False, ), + "SubscriptionItemModifyParamsCurrentTrial": ( + "stripe.params._subscription_item_modify_params", + False, + ), "SubscriptionItemModifyParamsDiscount": ( "stripe.params._subscription_item_modify_params", False, @@ -15531,6 +16128,10 @@ "stripe.params._subscription_item_update_params", False, ), + "SubscriptionItemUpdateParamsCurrentTrial": ( + "stripe.params._subscription_item_update_params", + False, + ), "SubscriptionItemUpdateParamsDiscount": ( "stripe.params._subscription_item_update_params", False, @@ -15611,6 +16212,10 @@ "stripe.params._subscription_modify_params", False, ), + "SubscriptionModifyParamsBillingCycleAnchor": ( + "stripe.params._subscription_modify_params", + False, + ), "SubscriptionModifyParamsBillingSchedule": ( "stripe.params._subscription_modify_params", False, @@ -15659,6 +16264,10 @@ "stripe.params._subscription_modify_params", False, ), + "SubscriptionModifyParamsItemCurrentTrial": ( + "stripe.params._subscription_modify_params", + False, + ), "SubscriptionModifyParamsItemDiscount": ( "stripe.params._subscription_modify_params", False, @@ -15699,6 +16308,22 @@ "stripe.params._subscription_modify_params", False, ), + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._subscription_modify_params", + False, + ), + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._subscription_modify_params", + False, + ), + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlik": ( + "stripe.params._subscription_modify_params", + False, + ), + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._subscription_modify_params", + False, + ), "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCard": ( "stripe.params._subscription_modify_params", False, @@ -15779,10 +16404,30 @@ "stripe.params._subscription_modify_params", False, ), + "SubscriptionPauseParams": ( + "stripe.params._subscription_pause_params", + False, + ), + "SubscriptionPauseParamsBillFor": ( + "stripe.params._subscription_pause_params", + False, + ), + "SubscriptionPauseParamsBillForOutstandingUsageThrough": ( + "stripe.params._subscription_pause_params", + False, + ), + "SubscriptionPauseParamsBillForUnusedTimeFrom": ( + "stripe.params._subscription_pause_params", + False, + ), "SubscriptionResumeParams": ( "stripe.params._subscription_resume_params", False, ), + "SubscriptionResumeParamsBillingCycleAnchor": ( + "stripe.params._subscription_resume_params", + False, + ), "SubscriptionRetrieveParams": ( "stripe.params._subscription_retrieve_params", False, @@ -15835,6 +16480,50 @@ "stripe.params._subscription_schedule_create_params", False, ), + "SubscriptionScheduleCreateParamsPauseSchedule": ( + "stripe.params._subscription_schedule_create_params", + False, + ), + "SubscriptionScheduleCreateParamsPauseSchedulePause": ( + "stripe.params._subscription_schedule_create_params", + False, + ), + "SubscriptionScheduleCreateParamsPauseSchedulePausePauseAt": ( + "stripe.params._subscription_schedule_create_params", + False, + ), + "SubscriptionScheduleCreateParamsPauseSchedulePauseSettings": ( + "stripe.params._subscription_schedule_create_params", + False, + ), + "SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillFor": ( + "stripe.params._subscription_schedule_create_params", + False, + ), + "SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough": ( + "stripe.params._subscription_schedule_create_params", + False, + ), + "SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom": ( + "stripe.params._subscription_schedule_create_params", + False, + ), + "SubscriptionScheduleCreateParamsPauseScheduleResume": ( + "stripe.params._subscription_schedule_create_params", + False, + ), + "SubscriptionScheduleCreateParamsPauseScheduleResumeResumeAt": ( + "stripe.params._subscription_schedule_create_params", + False, + ), + "SubscriptionScheduleCreateParamsPauseScheduleResumeResumeAtDuration": ( + "stripe.params._subscription_schedule_create_params", + False, + ), + "SubscriptionScheduleCreateParamsPauseScheduleResumeSettings": ( + "stripe.params._subscription_schedule_create_params", + False, + ), "SubscriptionScheduleCreateParamsPhase": ( "stripe.params._subscription_schedule_create_params", False, @@ -15975,6 +16664,50 @@ "stripe.params._subscription_schedule_modify_params", False, ), + "SubscriptionScheduleModifyParamsPauseSchedule": ( + "stripe.params._subscription_schedule_modify_params", + False, + ), + "SubscriptionScheduleModifyParamsPauseSchedulePause": ( + "stripe.params._subscription_schedule_modify_params", + False, + ), + "SubscriptionScheduleModifyParamsPauseSchedulePausePauseAt": ( + "stripe.params._subscription_schedule_modify_params", + False, + ), + "SubscriptionScheduleModifyParamsPauseSchedulePauseSettings": ( + "stripe.params._subscription_schedule_modify_params", + False, + ), + "SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillFor": ( + "stripe.params._subscription_schedule_modify_params", + False, + ), + "SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough": ( + "stripe.params._subscription_schedule_modify_params", + False, + ), + "SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom": ( + "stripe.params._subscription_schedule_modify_params", + False, + ), + "SubscriptionScheduleModifyParamsPauseScheduleResume": ( + "stripe.params._subscription_schedule_modify_params", + False, + ), + "SubscriptionScheduleModifyParamsPauseScheduleResumeResumeAt": ( + "stripe.params._subscription_schedule_modify_params", + False, + ), + "SubscriptionScheduleModifyParamsPauseScheduleResumeResumeAtDuration": ( + "stripe.params._subscription_schedule_modify_params", + False, + ), + "SubscriptionScheduleModifyParamsPauseScheduleResumeSettings": ( + "stripe.params._subscription_schedule_modify_params", + False, + ), "SubscriptionScheduleModifyParamsPhase": ( "stripe.params._subscription_schedule_modify_params", False, @@ -16103,6 +16836,50 @@ "stripe.params._subscription_schedule_update_params", False, ), + "SubscriptionScheduleUpdateParamsPauseSchedule": ( + "stripe.params._subscription_schedule_update_params", + False, + ), + "SubscriptionScheduleUpdateParamsPauseSchedulePause": ( + "stripe.params._subscription_schedule_update_params", + False, + ), + "SubscriptionScheduleUpdateParamsPauseSchedulePausePauseAt": ( + "stripe.params._subscription_schedule_update_params", + False, + ), + "SubscriptionScheduleUpdateParamsPauseSchedulePauseSettings": ( + "stripe.params._subscription_schedule_update_params", + False, + ), + "SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillFor": ( + "stripe.params._subscription_schedule_update_params", + False, + ), + "SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough": ( + "stripe.params._subscription_schedule_update_params", + False, + ), + "SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom": ( + "stripe.params._subscription_schedule_update_params", + False, + ), + "SubscriptionScheduleUpdateParamsPauseScheduleResume": ( + "stripe.params._subscription_schedule_update_params", + False, + ), + "SubscriptionScheduleUpdateParamsPauseScheduleResumeResumeAt": ( + "stripe.params._subscription_schedule_update_params", + False, + ), + "SubscriptionScheduleUpdateParamsPauseScheduleResumeResumeAtDuration": ( + "stripe.params._subscription_schedule_update_params", + False, + ), + "SubscriptionScheduleUpdateParamsPauseScheduleResumeSettings": ( + "stripe.params._subscription_schedule_update_params", + False, + ), "SubscriptionScheduleUpdateParamsPhase": ( "stripe.params._subscription_schedule_update_params", False, @@ -16227,6 +17004,10 @@ "stripe.params._subscription_update_params", False, ), + "SubscriptionUpdateParamsBillingCycleAnchor": ( + "stripe.params._subscription_update_params", + False, + ), "SubscriptionUpdateParamsBillingSchedule": ( "stripe.params._subscription_update_params", False, @@ -16275,6 +17056,10 @@ "stripe.params._subscription_update_params", False, ), + "SubscriptionUpdateParamsItemCurrentTrial": ( + "stripe.params._subscription_update_params", + False, + ), "SubscriptionUpdateParamsItemDiscount": ( "stripe.params._subscription_update_params", False, @@ -16315,6 +17100,22 @@ "stripe.params._subscription_update_params", False, ), + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._subscription_update_params", + False, + ), + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._subscription_update_params", + False, + ), + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlik": ( + "stripe.params._subscription_update_params", + False, + ), + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params._subscription_update_params", + False, + ), "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCard": ( "stripe.params._subscription_update_params", False, diff --git a/stripe/params/_account_create_params.py b/stripe/params/_account_create_params.py index 80e129c0e..67a86174a 100644 --- a/stripe/params/_account_create_params.py +++ b/stripe/params/_account_create_params.py @@ -9,7 +9,7 @@ class AccountCreateParams(RequestOptions): account_token: NotRequired[str] """ - An [account token](https://api.stripe.com#create_account_token), used to securely provide details to the account. + An [account token](https://docs.stripe.com/api#create_account_token), used to securely provide details to the account. """ business_profile: NotRequired["AccountCreateParamsBusinessProfile"] """ @@ -142,6 +142,10 @@ class AccountCreateParamsBusinessProfile(TypedDict): """ Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. """ + specified_commercial_transactions_act_url: NotRequired["Literal['']|str"] + """ + A link to the business's publicly available terms related to the Specified Commercial Transaction Act. Used by the Checkout product and for Japanese payment methods. + """ support_address: NotRequired[ "AccountCreateParamsBusinessProfileSupportAddress" ] @@ -292,6 +296,12 @@ class AccountCreateParamsCapabilities(TypedDict): """ The blik_payments capability. """ + blik_recurring_payments: NotRequired[ + "AccountCreateParamsCapabilitiesBlikRecurringPayments" + ] + """ + The blik_recurring_payments capability. + """ boleto_payments: NotRequired[ "AccountCreateParamsCapabilitiesBoletoPayments" ] @@ -464,6 +474,12 @@ class AccountCreateParamsCapabilities(TypedDict): """ The paynow_payments capability. """ + paypay_payments: NotRequired[ + "AccountCreateParamsCapabilitiesPaypayPayments" + ] + """ + The paypay_payments capability. + """ payto_payments: NotRequired["AccountCreateParamsCapabilitiesPaytoPayments"] """ The payto_payments capability. @@ -514,6 +530,12 @@ class AccountCreateParamsCapabilities(TypedDict): """ The sepa_debit_payments capability. """ + sequra_payments: NotRequired[ + "AccountCreateParamsCapabilitiesSequraPayments" + ] + """ + The sequra_payments capability. + """ sofort_payments: NotRequired[ "AccountCreateParamsCapabilitiesSofortPayments" ] @@ -667,6 +689,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] """ @@ -891,6 +920,13 @@ class AccountCreateParamsCapabilitiesPaynowPayments(TypedDict): """ +class AccountCreateParamsCapabilitiesPaypayPayments(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 AccountCreateParamsCapabilitiesPaytoPayments(TypedDict): requested: NotRequired[bool] """ @@ -954,6 +990,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 AccountCreateParamsCapabilitiesSofortPayments(TypedDict): requested: NotRequired[bool] """ @@ -1372,11 +1415,11 @@ class AccountCreateParamsCompanyVerification(TypedDict): class AccountCreateParamsCompanyVerificationDocument(TypedDict): back: NotRequired[str] """ - The back of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of a document returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of a document returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ @@ -1472,49 +1515,49 @@ class AccountCreateParamsDocuments(TypedDict): class AccountCreateParamsDocumentsBankAccountOwnershipVerification(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountCreateParamsDocumentsCompanyLicense(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountCreateParamsDocumentsCompanyMemorandumOfAssociation(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountCreateParamsDocumentsCompanyMinisterialDecree(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountCreateParamsDocumentsCompanyRegistrationVerification(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountCreateParamsDocumentsCompanyTaxIdVerification(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountCreateParamsDocumentsProofOfAddress(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ @@ -1523,7 +1566,7 @@ class AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnership( ): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ signer: NotRequired[ "AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnershipSigner" @@ -1873,22 +1916,22 @@ class AccountCreateParamsIndividualVerification(TypedDict): class AccountCreateParamsIndividualVerificationAdditionalDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class AccountCreateParamsIndividualVerificationDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ @@ -1923,6 +1966,16 @@ class AccountCreateParamsSettings(TypedDict): """ Settings specific to the account's payouts. """ + paypay_payments: NotRequired["AccountCreateParamsSettingsPaypayPayments"] + """ + Settings specific to the PayPay payments method. + """ + sepa_debit_payments: NotRequired[ + "AccountCreateParamsSettingsSepaDebitPayments" + ] + """ + Settings specific to SEPA Direct Debit payments. + """ treasury: NotRequired["AccountCreateParamsSettingsTreasury"] """ Settings specific to the account's Treasury FinancialAccounts. @@ -2088,6 +2141,75 @@ class AccountCreateParamsSettingsPayoutsSchedule(TypedDict): """ +class AccountCreateParamsSettingsPaypayPayments(TypedDict): + additional_files: NotRequired[List[str]] + """ + Additional files that are required to support the onboarding process of your business. + """ + goods_type: NotRequired[Literal["digital_content", "other"]] + """ + The type of goods your business sells. Use `digital_content` if you sell digital content. Use `other` for all other types of goods or services. + """ + site: NotRequired["AccountCreateParamsSettingsPaypayPaymentsSite"] + """ + Details regarding your business's website. + """ + + +class AccountCreateParamsSettingsPaypayPaymentsSite(TypedDict): + accessible: NotRequired[ + "AccountCreateParamsSettingsPaypayPaymentsSiteAccessible" + ] + """ + Additional information about your business's website. + """ + in_development: NotRequired[ + "AccountCreateParamsSettingsPaypayPaymentsSiteInDevelopment" + ] + """ + Additional information about your business's website. + """ + restricted: NotRequired[ + "AccountCreateParamsSettingsPaypayPaymentsSiteRestricted" + ] + """ + Additional information about your business's website. + """ + type: NotRequired[Literal["accessible", "in_development", "restricted"]] + """ + The status of your business's website. + """ + + +class AccountCreateParamsSettingsPaypayPaymentsSiteAccessible(TypedDict): + pass + + +class AccountCreateParamsSettingsPaypayPaymentsSiteInDevelopment(TypedDict): + password: str + """ + The password needed to access your business's website. + """ + username: NotRequired[str] + """ + The username needed to access your business's website. + """ + + +class AccountCreateParamsSettingsPaypayPaymentsSiteRestricted(TypedDict): + payment_flow_file: NotRequired[str] + """ + The file explaining the payment flow for your business. + """ + + +class AccountCreateParamsSettingsSepaDebitPayments(TypedDict): + creditor_id: NotRequired[str] + """ + The business creditor id for european payments. + """ + + class AccountCreateParamsSettingsTreasury(TypedDict): tos_acceptance: NotRequired[ "AccountCreateParamsSettingsTreasuryTosAcceptance" diff --git a/stripe/params/_account_create_person_params.py b/stripe/params/_account_create_person_params.py index bf931c4cc..740ce5f50 100644 --- a/stripe/params/_account_create_person_params.py +++ b/stripe/params/_account_create_person_params.py @@ -285,21 +285,21 @@ class AccountCreatePersonParamsDocuments(TypedDict): class AccountCreatePersonParamsDocumentsCompanyAuthorization(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountCreatePersonParamsDocumentsPassport(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountCreatePersonParamsDocumentsVisa(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ @@ -467,20 +467,20 @@ class AccountCreatePersonParamsVerification(TypedDict): class AccountCreatePersonParamsVerificationAdditionalDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class AccountCreatePersonParamsVerificationDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ diff --git a/stripe/params/_account_external_account_update_params.py b/stripe/params/_account_external_account_update_params.py index 3149e110e..5dabbe5bd 100644 --- a/stripe/params/_account_external_account_update_params.py +++ b/stripe/params/_account_external_account_update_params.py @@ -92,5 +92,5 @@ class AccountExternalAccountUpdateParamsDocumentsBankAccountOwnershipVerificatio ): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ diff --git a/stripe/params/_account_modify_external_account_params.py b/stripe/params/_account_modify_external_account_params.py index 06184111d..e0e45d1fe 100644 --- a/stripe/params/_account_modify_external_account_params.py +++ b/stripe/params/_account_modify_external_account_params.py @@ -93,5 +93,5 @@ class AccountModifyExternalAccountParamsDocumentsBankAccountOwnershipVerificatio ): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ diff --git a/stripe/params/_account_modify_person_params.py b/stripe/params/_account_modify_person_params.py index 49bfd097c..d51aed0fd 100644 --- a/stripe/params/_account_modify_person_params.py +++ b/stripe/params/_account_modify_person_params.py @@ -285,21 +285,21 @@ class AccountModifyPersonParamsDocuments(TypedDict): class AccountModifyPersonParamsDocumentsCompanyAuthorization(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountModifyPersonParamsDocumentsPassport(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountModifyPersonParamsDocumentsVisa(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ @@ -467,20 +467,20 @@ class AccountModifyPersonParamsVerification(TypedDict): class AccountModifyPersonParamsVerificationAdditionalDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class AccountModifyPersonParamsVerificationDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ diff --git a/stripe/params/_account_person_create_params.py b/stripe/params/_account_person_create_params.py index 04397606d..87b602ce9 100644 --- a/stripe/params/_account_person_create_params.py +++ b/stripe/params/_account_person_create_params.py @@ -284,21 +284,21 @@ class AccountPersonCreateParamsDocuments(TypedDict): class AccountPersonCreateParamsDocumentsCompanyAuthorization(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountPersonCreateParamsDocumentsPassport(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountPersonCreateParamsDocumentsVisa(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ @@ -466,20 +466,20 @@ class AccountPersonCreateParamsVerification(TypedDict): class AccountPersonCreateParamsVerificationAdditionalDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class AccountPersonCreateParamsVerificationDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ diff --git a/stripe/params/_account_person_update_params.py b/stripe/params/_account_person_update_params.py index 5a00cb530..c8d5d94de 100644 --- a/stripe/params/_account_person_update_params.py +++ b/stripe/params/_account_person_update_params.py @@ -284,21 +284,21 @@ class AccountPersonUpdateParamsDocuments(TypedDict): class AccountPersonUpdateParamsDocumentsCompanyAuthorization(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountPersonUpdateParamsDocumentsPassport(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountPersonUpdateParamsDocumentsVisa(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ @@ -466,20 +466,20 @@ class AccountPersonUpdateParamsVerification(TypedDict): class AccountPersonUpdateParamsVerificationAdditionalDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class AccountPersonUpdateParamsVerificationDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ 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_update_params.py b/stripe/params/_account_update_params.py index be49da7ed..705dbb1f7 100644 --- a/stripe/params/_account_update_params.py +++ b/stripe/params/_account_update_params.py @@ -8,7 +8,7 @@ class AccountUpdateParams(TypedDict): account_token: NotRequired[str] """ - An [account token](https://api.stripe.com#create_account_token), used to securely provide details to the account. + An [account token](https://docs.stripe.com/api#create_account_token), used to securely provide details to the account. """ business_profile: NotRequired["AccountUpdateParamsBusinessProfile"] """ @@ -129,6 +129,10 @@ class AccountUpdateParamsBusinessProfile(TypedDict): """ Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. """ + specified_commercial_transactions_act_url: NotRequired["Literal['']|str"] + """ + A link to the business's publicly available terms related to the Specified Commercial Transaction Act. Only used for accounts in Japan. + """ support_address: NotRequired[ "AccountUpdateParamsBusinessProfileSupportAddress" ] @@ -279,6 +283,12 @@ class AccountUpdateParamsCapabilities(TypedDict): """ The blik_payments capability. """ + blik_recurring_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesBlikRecurringPayments" + ] + """ + The blik_recurring_payments capability. + """ boleto_payments: NotRequired[ "AccountUpdateParamsCapabilitiesBoletoPayments" ] @@ -451,6 +461,12 @@ class AccountUpdateParamsCapabilities(TypedDict): """ The paynow_payments capability. """ + paypay_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesPaypayPayments" + ] + """ + The paypay_payments capability. + """ payto_payments: NotRequired["AccountUpdateParamsCapabilitiesPaytoPayments"] """ The payto_payments capability. @@ -501,6 +517,12 @@ class AccountUpdateParamsCapabilities(TypedDict): """ The sepa_debit_payments capability. """ + sequra_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesSequraPayments" + ] + """ + The sequra_payments capability. + """ sofort_payments: NotRequired[ "AccountUpdateParamsCapabilitiesSofortPayments" ] @@ -654,6 +676,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] """ @@ -878,6 +907,13 @@ class AccountUpdateParamsCapabilitiesPaynowPayments(TypedDict): """ +class AccountUpdateParamsCapabilitiesPaypayPayments(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 AccountUpdateParamsCapabilitiesPaytoPayments(TypedDict): requested: NotRequired[bool] """ @@ -941,6 +977,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 AccountUpdateParamsCapabilitiesSofortPayments(TypedDict): requested: NotRequired[bool] """ @@ -1356,11 +1399,11 @@ class AccountUpdateParamsCompanyVerification(TypedDict): class AccountUpdateParamsCompanyVerificationDocument(TypedDict): back: NotRequired[str] """ - The back of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of a document returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of a document returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ @@ -1420,56 +1463,56 @@ class AccountUpdateParamsDocuments(TypedDict): class AccountUpdateParamsDocumentsBankAccountOwnershipVerification(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountUpdateParamsDocumentsCompanyLicense(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountUpdateParamsDocumentsCompanyMemorandumOfAssociation(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountUpdateParamsDocumentsCompanyMinisterialDecree(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountUpdateParamsDocumentsCompanyRegistrationVerification(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountUpdateParamsDocumentsCompanyTaxIdVerification(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountUpdateParamsDocumentsProofOfAddress(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class AccountUpdateParamsDocumentsProofOfRegistration(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ signer: NotRequired[ "AccountUpdateParamsDocumentsProofOfRegistrationSigner" @@ -1491,7 +1534,7 @@ class AccountUpdateParamsDocumentsProofOfUltimateBeneficialOwnership( ): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ signer: NotRequired[ "AccountUpdateParamsDocumentsProofOfUltimateBeneficialOwnershipSigner" @@ -1841,22 +1884,22 @@ class AccountUpdateParamsIndividualVerification(TypedDict): class AccountUpdateParamsIndividualVerificationAdditionalDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class AccountUpdateParamsIndividualVerificationDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ @@ -1891,6 +1934,10 @@ class AccountUpdateParamsSettings(TypedDict): """ Settings specific to the account's payouts. """ + paypay_payments: NotRequired["AccountUpdateParamsSettingsPaypayPayments"] + """ + Settings specific to the PayPay payments method. + """ sepa_debit_payments: NotRequired[ "AccountUpdateParamsSettingsSepaDebitPayments" ] @@ -2066,6 +2113,68 @@ class AccountUpdateParamsSettingsPayoutsSchedule(TypedDict): """ +class AccountUpdateParamsSettingsPaypayPayments(TypedDict): + additional_files: NotRequired[List[str]] + """ + Additional files that are required to support the onboarding process of your business. + """ + goods_type: NotRequired[Literal["digital_content", "other"]] + """ + The type of goods your business sells. Use `digital_content` if you sell digital content. Use `other` for all other types of goods or services. + """ + site: NotRequired["AccountUpdateParamsSettingsPaypayPaymentsSite"] + """ + Details regarding your business's website. + """ + + +class AccountUpdateParamsSettingsPaypayPaymentsSite(TypedDict): + accessible: NotRequired[ + "AccountUpdateParamsSettingsPaypayPaymentsSiteAccessible" + ] + """ + Additional information about your business's website. + """ + in_development: NotRequired[ + "AccountUpdateParamsSettingsPaypayPaymentsSiteInDevelopment" + ] + """ + Additional information about your business's website. + """ + restricted: NotRequired[ + "AccountUpdateParamsSettingsPaypayPaymentsSiteRestricted" + ] + """ + Additional information about your business's website. + """ + type: NotRequired[Literal["accessible", "in_development", "restricted"]] + """ + The status of your business's website. + """ + + +class AccountUpdateParamsSettingsPaypayPaymentsSiteAccessible(TypedDict): + pass + + +class AccountUpdateParamsSettingsPaypayPaymentsSiteInDevelopment(TypedDict): + password: str + """ + The password needed to access your business's website. + """ + username: NotRequired[str] + """ + The username needed to access your business's website. + """ + + +class AccountUpdateParamsSettingsPaypayPaymentsSiteRestricted(TypedDict): + payment_flow_file: NotRequired[str] + """ + The file explaining the payment flow for your business. + """ + + class AccountUpdateParamsSettingsSepaDebitPayments(TypedDict): creditor_id: NotRequired[str] """ diff --git a/stripe/params/_balance_transaction_list_params.py b/stripe/params/_balance_transaction_list_params.py index 04d0554ca..3f7cced0b 100644 --- a/stripe/params/_balance_transaction_list_params.py +++ b/stripe/params/_balance_transaction_list_params.py @@ -40,7 +40,7 @@ class BalanceTransactionListParams(RequestOptions): """ type: NotRequired[str] """ - Only returns transactions of the given type. One of: `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`. + Only returns transactions of the given type. One of: `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`. """ diff --git a/stripe/params/_charge_create_params.py b/stripe/params/_charge_create_params.py index 6d5b58deb..cfa3e339b 100644 --- a/stripe/params/_charge_create_params.py +++ b/stripe/params/_charge_create_params.py @@ -18,7 +18,7 @@ class ChargeCreateParams(RequestOptions): """ capture: NotRequired[bool] """ - Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://api.stripe.com#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://docs.stripe.com/charges/placing-a-hold) documentation. + Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://docs.stripe.com/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://docs.stripe.com/charges/placing-a-hold) documentation. """ currency: NotRequired[str] """ diff --git a/stripe/params/_confirmation_token_create_params.py b/stripe/params/_confirmation_token_create_params.py index f92a01130..44c01682d 100644 --- a/stripe/params/_confirmation_token_create_params.py +++ b/stripe/params/_confirmation_token_create_params.py @@ -72,13 +72,13 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ alma: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataAlma"] """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + If this is an Alma PaymentMethod, this hash contains details about the Alma payment method. """ amazon_pay: NotRequired[ "ConfirmationTokenCreateParamsPaymentMethodDataAmazonPay" ] """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. """ au_becs_debit: NotRequired[ "ConfirmationTokenCreateParamsPaymentMethodDataAuBecsDebit" @@ -250,6 +250,10 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. """ + paypay: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ payto: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPayto"] """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. @@ -300,6 +304,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. + """ sofort: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSofort"] """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. @@ -355,6 +363,7 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -363,6 +372,7 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -727,6 +737,10 @@ class ConfirmationTokenCreateParamsPaymentMethodDataPaypal(TypedDict): pass +class ConfirmationTokenCreateParamsPaymentMethodDataPaypay(TypedDict): + pass + + class ConfirmationTokenCreateParamsPaymentMethodDataPayto(TypedDict): account_number: NotRequired[str] """ @@ -780,6 +794,10 @@ class ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit(TypedDict): """ +class ConfirmationTokenCreateParamsPaymentMethodDataSequra(TypedDict): + pass + + class ConfirmationTokenCreateParamsPaymentMethodDataSofort(TypedDict): country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ diff --git a/stripe/params/_customer_create_params.py b/stripe/params/_customer_create_params.py index 7903ff669..47ee9ecd3 100644 --- a/stripe/params/_customer_create_params.py +++ b/stripe/params/_customer_create_params.py @@ -41,7 +41,7 @@ class CustomerCreateParams(RequestOptions): """ invoice_prefix: NotRequired[str] """ - The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + The prefix for the customer used to generate unique invoice numbers. Must be 1–12 uppercase letters or numbers. """ invoice_settings: NotRequired["CustomerCreateParamsInvoiceSettings"] """ diff --git a/stripe/params/_customer_list_payment_methods_params.py b/stripe/params/_customer_list_payment_methods_params.py index dd149493a..4360de5fe 100644 --- a/stripe/params/_customer_list_payment_methods_params.py +++ b/stripe/params/_customer_list_payment_methods_params.py @@ -29,7 +29,7 @@ class CustomerListPaymentMethodsParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ type: NotRequired[ - "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', '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', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']|str" + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', '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', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']|str" ] """ An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. diff --git a/stripe/params/_customer_modify_params.py b/stripe/params/_customer_modify_params.py index 31190633c..49ce2e0d1 100644 --- a/stripe/params/_customer_modify_params.py +++ b/stripe/params/_customer_modify_params.py @@ -49,7 +49,7 @@ class CustomerModifyParams(RequestOptions): """ invoice_prefix: NotRequired[str] """ - The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + The prefix for the customer used to generate unique invoice numbers. Must be 1–12 uppercase letters or numbers. """ invoice_settings: NotRequired["CustomerModifyParamsInvoiceSettings"] """ diff --git a/stripe/params/_customer_payment_method_list_params.py b/stripe/params/_customer_payment_method_list_params.py index e47585fa8..a0116a97c 100644 --- a/stripe/params/_customer_payment_method_list_params.py +++ b/stripe/params/_customer_payment_method_list_params.py @@ -28,7 +28,7 @@ class CustomerPaymentMethodListParams(TypedDict): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ type: NotRequired[ - "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', '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', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']|str" + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', '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', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']|str" ] """ An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. diff --git a/stripe/params/_customer_update_params.py b/stripe/params/_customer_update_params.py index 779fa949a..a07528cfe 100644 --- a/stripe/params/_customer_update_params.py +++ b/stripe/params/_customer_update_params.py @@ -48,7 +48,7 @@ class CustomerUpdateParams(TypedDict): """ invoice_prefix: NotRequired[str] """ - The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + The prefix for the customer used to generate unique invoice numbers. Must be 1–12 uppercase letters or numbers. """ invoice_settings: NotRequired["CustomerUpdateParamsInvoiceSettings"] """ diff --git a/stripe/params/_file_create_params.py b/stripe/params/_file_create_params.py index 9105b6868..0e03f42de 100644 --- a/stripe/params/_file_create_params.py +++ b/stripe/params/_file_create_params.py @@ -17,7 +17,7 @@ class FileCreateParams(RequestOptions): """ file_link_data: NotRequired["FileCreateParamsFileLinkData"] """ - Optional parameters that automatically create a [file link](https://api.stripe.com#file_links) for the newly created file. + Optional parameters that automatically create a [file link](https://docs.stripe.com/api#file_links) for the newly created file. """ purpose: Union[ Literal[ diff --git a/stripe/params/_invoice_add_lines_params.py b/stripe/params/_invoice_add_lines_params.py index 2f85fb150..e7cde9cf0 100644 --- a/stripe/params/_invoice_add_lines_params.py +++ b/stripe/params/_invoice_add_lines_params.py @@ -161,12 +161,29 @@ class InvoiceAddLinesParamsLinePriceDataProductData(TypedDict): """ A [tax code](https://docs.stripe.com/tax/tax-categories) ID. """ + tax_details: NotRequired[ + "InvoiceAddLinesParamsLinePriceDataProductDataTaxDetails" + ] + """ + Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location. + """ unit_label: NotRequired[str] """ A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. """ +class InvoiceAddLinesParamsLinePriceDataProductDataTaxDetails(TypedDict): + performance_location: NotRequired[str] + """ + A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://docs.stripe.com/tax/tax-categories) ID. + """ + + class InvoiceAddLinesParamsLinePricing(TypedDict): price: NotRequired[str] """ @@ -233,7 +250,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_params.py b/stripe/params/_invoice_create_params.py index 8f5be0c51..ba1653ed9 100644 --- a/stripe/params/_invoice_create_params.py +++ b/stripe/params/_invoice_create_params.py @@ -125,7 +125,7 @@ class InvoiceCreateParams(RequestOptions): """ rendering: NotRequired["InvoiceCreateParamsRendering"] """ - The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + The rendering-related settings that control how invoices render in customer-facing interfaces such as the PDF or hosted invoice page. """ shipping_cost: NotRequired["InvoiceCreateParamsShippingCost"] """ @@ -231,7 +231,7 @@ class InvoiceCreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -257,6 +257,12 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ If paying by `billie`, this sub-hash contains details about the Billie payment method options to pass to the invoice's PaymentIntent. """ + blik: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBlik" + ] + """ + If paying by `blik`, this sub-hash contains details about the Blik payment method options to pass to the invoice's PaymentIntent. + """ card: NotRequired[ "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCard" ] @@ -343,6 +349,77 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBancontact( class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillie(TypedDict): + company_details: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + reference: NotRequired[str] + """ + An identifier or reference that this payment corresponds to. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT ID number. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBlik(TypedDict): pass diff --git a/stripe/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index 5fc28ab6c..de5d02ab1 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -989,7 +989,9 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseTransferData(TypedDict): 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`. """ @@ -1035,6 +1037,14 @@ class InvoiceCreatePreviewParamsSubscriptionDetails(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`. """ + pause: NotRequired["InvoiceCreatePreviewParamsSubscriptionDetailsPause"] + """ + Previews the invoice that would be generated when pausing the subscription. Passing an empty hash won't preview pausing and instead returns the next invoice. + + To receive a preview invoice, set `invoicing_behavior` to `invoice`. A preview isn't available if the `bill_for` options produce no billable amounts. + + `pending_invoice_item` never has a preview available because pausing wouldn't generate an invoice, and paused subscriptions don't generate invoices either. + """ proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|str" ] @@ -1059,6 +1069,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" @@ -1158,6 +1181,12 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItem(TypedDict): """ Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. """ + current_trial: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsItemCurrentTrial" + ] + """ + The trial offer to apply to this subscription item. + """ deleted: NotRequired[bool] """ A flag that, if set to `true`, will delete the specified item. @@ -1184,13 +1213,13 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. You can use either `price` or `price_data`, but not both, to set or change this item's price. If you're updating an existing item without changing its price, omit both. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired[ "InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceData" ] """ - Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required. + Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. You can use either `price` or `price_data`, but not both, to set or change this item's price. If you're updating an existing item without changing its price, omit both. """ quantity: NotRequired[int] """ @@ -1211,6 +1240,13 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItemBillingThresholds( """ +class InvoiceCreatePreviewParamsSubscriptionDetailsItemCurrentTrial(TypedDict): + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ + + class InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscount(TypedDict): coupon: NotRequired[str] """ @@ -1268,3 +1304,55 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring( """ The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsPause(TypedDict): + bill_for: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor" + ] + """ + Controls what to bill for when pausing the subscription. + """ + invoicing_behavior: NotRequired[ + "Literal['invoice', 'pending_invoice_item']|str" + ] + """ + Determines how to handle debits and credits when pausing. Defaults to `pending_invoice_item`. + """ + type: NotRequired["Literal['subscription']|str"] + """ + The type of pause to apply. Defaults to `subscription`. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor(TypedDict): + outstanding_usage_through: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough" + ] + """ + Controls when to bill for metered usage in the current period. Defaults to `{ type: "now" }`. + """ + unused_time_from: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom" + ] + """ + Controls when to credit for unused time on licensed items. Defaults to `{ type: "now" }`. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough( + TypedDict, +): + type: Union[Literal["none", "now"], str] + """ + When to bill metered usage in the current period. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom( + TypedDict, +): + type: Union[Literal["item_current_period_start", "none", "now"], str] + """ + When to credit for unused time. + """ diff --git a/stripe/params/_invoice_item_modify_params.py b/stripe/params/_invoice_item_modify_params.py index fbf797986..d3062a1af 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. + """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" ] diff --git a/stripe/params/_invoice_item_update_params.py b/stripe/params/_invoice_item_update_params.py index efd676c51..19c1dc7c6 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. + """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" ] diff --git a/stripe/params/_invoice_line_item_update_params.py b/stripe/params/_invoice_line_item_update_params.py index 193400666..a6098e2d6 100644 --- a/stripe/params/_invoice_line_item_update_params.py +++ b/stripe/params/_invoice_line_item_update_params.py @@ -145,12 +145,29 @@ class InvoiceLineItemUpdateParamsPriceDataProductData(TypedDict): """ A [tax code](https://docs.stripe.com/tax/tax-categories) ID. """ + tax_details: NotRequired[ + "InvoiceLineItemUpdateParamsPriceDataProductDataTaxDetails" + ] + """ + Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location. + """ unit_label: NotRequired[str] """ A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. """ +class InvoiceLineItemUpdateParamsPriceDataProductDataTaxDetails(TypedDict): + performance_location: NotRequired[str] + """ + A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://docs.stripe.com/tax/tax-categories) ID. + """ + + class InvoiceLineItemUpdateParamsPricing(TypedDict): price: NotRequired[str] """ @@ -217,7 +234,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_modify_params.py b/stripe/params/_invoice_modify_params.py index a30012902..264a99804 100644 --- a/stripe/params/_invoice_modify_params.py +++ b/stripe/params/_invoice_modify_params.py @@ -103,7 +103,7 @@ class InvoiceModifyParams(RequestOptions): """ rendering: NotRequired["InvoiceModifyParamsRendering"] """ - The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + The rendering-related settings that control how invoices render in customer-facing interfaces such as the PDF or hosted invoice page. """ shipping_cost: NotRequired["Literal['']|InvoiceModifyParamsShippingCost"] """ @@ -196,7 +196,7 @@ class InvoiceModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -222,6 +222,12 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ If paying by `billie`, this sub-hash contains details about the Billie payment method options to pass to the invoice's PaymentIntent. """ + blik: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBlik" + ] + """ + If paying by `blik`, this sub-hash contains details about the Blik payment method options to pass to the invoice's PaymentIntent. + """ card: NotRequired[ "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCard" ] @@ -308,6 +314,77 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillie(TypedDict): + company_details: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + reference: NotRequired[str] + """ + An identifier or reference that this payment corresponds to. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT ID number. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBlik(TypedDict): pass diff --git a/stripe/params/_invoice_update_lines_params.py b/stripe/params/_invoice_update_lines_params.py index 23184d47b..425698693 100644 --- a/stripe/params/_invoice_update_lines_params.py +++ b/stripe/params/_invoice_update_lines_params.py @@ -163,12 +163,29 @@ class InvoiceUpdateLinesParamsLinePriceDataProductData(TypedDict): """ A [tax code](https://docs.stripe.com/tax/tax-categories) ID. """ + tax_details: NotRequired[ + "InvoiceUpdateLinesParamsLinePriceDataProductDataTaxDetails" + ] + """ + Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location. + """ unit_label: NotRequired[str] """ A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. """ +class InvoiceUpdateLinesParamsLinePriceDataProductDataTaxDetails(TypedDict): + performance_location: NotRequired[str] + """ + A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://docs.stripe.com/tax/tax-categories) ID. + """ + + class InvoiceUpdateLinesParamsLinePricing(TypedDict): price: NotRequired[str] """ @@ -235,7 +252,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/_invoice_update_params.py b/stripe/params/_invoice_update_params.py index 9917c3eb0..36c819ed2 100644 --- a/stripe/params/_invoice_update_params.py +++ b/stripe/params/_invoice_update_params.py @@ -102,7 +102,7 @@ class InvoiceUpdateParams(TypedDict): """ rendering: NotRequired["InvoiceUpdateParamsRendering"] """ - The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + The rendering-related settings that control how invoices render in customer-facing interfaces such as the PDF or hosted invoice page. """ shipping_cost: NotRequired["Literal['']|InvoiceUpdateParamsShippingCost"] """ @@ -195,7 +195,7 @@ class InvoiceUpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -221,6 +221,12 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ If paying by `billie`, this sub-hash contains details about the Billie payment method options to pass to the invoice's PaymentIntent. """ + blik: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBlik" + ] + """ + If paying by `blik`, this sub-hash contains details about the Blik payment method options to pass to the invoice's PaymentIntent. + """ card: NotRequired[ "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCard" ] @@ -307,6 +313,77 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact( class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillie(TypedDict): + company_details: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + reference: NotRequired[str] + """ + An identifier or reference that this payment corresponds to. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT ID number. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBlik(TypedDict): pass diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index 205d04608..738a404a7 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -27,6 +27,7 @@ class PaymentIntentConfirmParams(RequestOptions): "boleto", "capchase_pay", "card", + "card_present", "cashapp", "check_scan", "click_to_pay", @@ -47,6 +48,7 @@ class PaymentIntentConfirmParams(RequestOptions): "grabpay", "id_bank_transfer", "ideal", + "interac_present", "kakao_pay", "klarna", "knet", @@ -143,7 +145,7 @@ class PaymentIntentConfirmParams(RequestOptions): Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://docs.stripe.com/payments/save-card-without-authentication). """ excluded_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', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" + "Literal['']|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', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this payment. @@ -176,7 +178,7 @@ class PaymentIntentConfirmParams(RequestOptions): payment_method: NotRequired[str] """ ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://docs.stripe.com/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. - If the payment method is attached to a Customer, it must match the [customer](https://api.stripe.com#create_payment_intent-customer) that is set on this PaymentIntent. + If the payment method is attached to a Customer, it must match the [customer](https://docs.stripe.com/api#create_payment_intent-customer) that is set on this PaymentIntent. """ payment_method_data: NotRequired[ "PaymentIntentConfirmParamsPaymentMethodData" @@ -192,10 +194,6 @@ class PaymentIntentConfirmParams(RequestOptions): """ Payment method-specific configuration for this PaymentIntent. """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ radar_options: NotRequired["PaymentIntentConfirmParamsRadarOptions"] """ Options to configure Radar. Learn more about [Radar Sessions](https://docs.stripe.com/radar/radar-session). @@ -542,13 +540,13 @@ class PaymentIntentConfirmParamsPaymentMethodData(TypedDict): """ alma: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataAlma"] """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + If this is an Alma PaymentMethod, this hash contains details about the Alma payment method. """ amazon_pay: NotRequired[ "PaymentIntentConfirmParamsPaymentMethodDataAmazonPay" ] """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. """ au_becs_debit: NotRequired[ "PaymentIntentConfirmParamsPaymentMethodDataAuBecsDebit" @@ -710,6 +708,10 @@ class PaymentIntentConfirmParamsPaymentMethodData(TypedDict): """ If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. """ + paypay: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ payto: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataPayto"] """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. @@ -760,6 +762,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. + """ sofort: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataSofort"] """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. @@ -815,6 +821,7 @@ class PaymentIntentConfirmParamsPaymentMethodData(TypedDict): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -823,6 +830,7 @@ class PaymentIntentConfirmParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -1185,6 +1193,10 @@ class PaymentIntentConfirmParamsPaymentMethodDataPaypal(TypedDict): pass +class PaymentIntentConfirmParamsPaymentMethodDataPaypay(TypedDict): + pass + + class PaymentIntentConfirmParamsPaymentMethodDataPayto(TypedDict): account_number: NotRequired[str] """ @@ -1238,6 +1250,10 @@ class PaymentIntentConfirmParamsPaymentMethodDataSepaDebit(TypedDict): """ +class PaymentIntentConfirmParamsPaymentMethodDataSequra(TypedDict): + pass + + class PaymentIntentConfirmParamsPaymentMethodDataSofort(TypedDict): country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ @@ -1557,6 +1573,12 @@ class PaymentIntentConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. """ + paypay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsPaypay" + ] + """ + If this is a `paypay` PaymentMethod, this sub-hash contains details about the PayPay payment method options. + """ payto: NotRequired[ "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsPayto" ] @@ -1605,6 +1627,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. + """ sofort: NotRequired[ "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsSofort" ] @@ -1908,6 +1936,74 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsBillie(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + company_details: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + reference: NotRequired[str] + """ + An identifier or reference that this payment corresponds to. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT id number + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ class PaymentIntentConfirmParamsPaymentMethodOptionsBizum(TypedDict): @@ -1919,7 +2015,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. @@ -1933,6 +2037,15 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsBlik(TypedDict): """ +class PaymentIntentConfirmParamsPaymentMethodOptionsBlikMandateOptions( + TypedDict, +): + expires_at: NotRequired[int] + """ + Expiry date of the mandate. + """ + + class PaymentIntentConfirmParamsPaymentMethodOptionsBoleto(TypedDict): expires_after_days: NotRequired[int] """ @@ -2874,6 +2987,10 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPaypal(TypedDict): """ +class PaymentIntentConfirmParamsPaymentMethodOptionsPaypay(TypedDict): + pass + + class PaymentIntentConfirmParamsPaymentMethodOptionsPayto(TypedDict): mandate_options: NotRequired[ "PaymentIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions" @@ -3129,6 +3246,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 PaymentIntentConfirmParamsPaymentMethodOptionsSofort(TypedDict): preferred_language: NotRequired[ "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']|str" diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index d01c33822..415047d03 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -27,6 +27,7 @@ class PaymentIntentCreateParams(RequestOptions): "boleto", "capchase_pay", "card", + "card_present", "cashapp", "check_scan", "click_to_pay", @@ -47,6 +48,7 @@ class PaymentIntentCreateParams(RequestOptions): "grabpay", "id_bank_transfer", "ideal", + "interac_present", "kakao_pay", "klarna", "knet", @@ -164,7 +166,7 @@ class PaymentIntentCreateParams(RequestOptions): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If [setup_future_usage](https://docs.stripe.com/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ customer_account: NotRequired[str] """ @@ -172,7 +174,7 @@ class PaymentIntentCreateParams(RequestOptions): Payment methods attached to other Accounts cannot be used with this PaymentIntent. - If [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. + If [setup_future_usage](https://docs.stripe.com/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. """ description: NotRequired[str] """ @@ -223,6 +225,7 @@ class PaymentIntentCreateParams(RequestOptions): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -231,6 +234,7 @@ class PaymentIntentCreateParams(RequestOptions): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -286,7 +290,7 @@ class PaymentIntentCreateParams(RequestOptions): ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://docs.stripe.com/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. - If the payment method is attached to a Customer, you must also provide the ID of that Customer as the [customer](https://api.stripe.com#create_payment_intent-customer) parameter of this PaymentIntent. + If the payment method is attached to a Customer, you must also provide the ID of that Customer as the [customer](https://docs.stripe.com/api#create_payment_intent-customer) parameter of this PaymentIntent. end """ payment_method_configuration: NotRequired[str] @@ -307,10 +311,6 @@ class PaymentIntentCreateParams(RequestOptions): """ Payment method-specific configuration for this PaymentIntent. """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ radar_options: NotRequired["PaymentIntentCreateParamsRadarOptions"] """ Options to configure Radar. Learn more about [Radar Sessions](https://docs.stripe.com/radar/radar-session). @@ -681,13 +681,13 @@ class PaymentIntentCreateParamsPaymentMethodData(TypedDict): """ alma: NotRequired["PaymentIntentCreateParamsPaymentMethodDataAlma"] """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + If this is an Alma PaymentMethod, this hash contains details about the Alma payment method. """ amazon_pay: NotRequired[ "PaymentIntentCreateParamsPaymentMethodDataAmazonPay" ] """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. """ au_becs_debit: NotRequired[ "PaymentIntentCreateParamsPaymentMethodDataAuBecsDebit" @@ -849,6 +849,10 @@ class PaymentIntentCreateParamsPaymentMethodData(TypedDict): """ If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. """ + paypay: NotRequired["PaymentIntentCreateParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ payto: NotRequired["PaymentIntentCreateParamsPaymentMethodDataPayto"] """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. @@ -895,6 +899,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. + """ sofort: NotRequired["PaymentIntentCreateParamsPaymentMethodDataSofort"] """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. @@ -950,6 +958,7 @@ class PaymentIntentCreateParamsPaymentMethodData(TypedDict): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -958,6 +967,7 @@ class PaymentIntentCreateParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -1320,6 +1330,10 @@ class PaymentIntentCreateParamsPaymentMethodDataPaypal(TypedDict): pass +class PaymentIntentCreateParamsPaymentMethodDataPaypay(TypedDict): + pass + + class PaymentIntentCreateParamsPaymentMethodDataPayto(TypedDict): account_number: NotRequired[str] """ @@ -1373,6 +1387,10 @@ class PaymentIntentCreateParamsPaymentMethodDataSepaDebit(TypedDict): """ +class PaymentIntentCreateParamsPaymentMethodDataSequra(TypedDict): + pass + + class PaymentIntentCreateParamsPaymentMethodDataSofort(TypedDict): country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ @@ -1692,6 +1710,12 @@ class PaymentIntentCreateParamsPaymentMethodOptions(TypedDict): """ If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. """ + paypay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsPaypay" + ] + """ + If this is a `paypay` PaymentMethod, this sub-hash contains details about the PayPay payment method options. + """ payto: NotRequired[ "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsPayto" ] @@ -1740,6 +1764,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. + """ sofort: NotRequired[ "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsSofort" ] @@ -2041,6 +2071,74 @@ class PaymentIntentCreateParamsPaymentMethodOptionsBillie(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + company_details: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + reference: NotRequired[str] + """ + An identifier or reference that this payment corresponds to. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT id number + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ class PaymentIntentCreateParamsPaymentMethodOptionsBizum(TypedDict): @@ -2052,7 +2150,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. @@ -2066,6 +2172,15 @@ class PaymentIntentCreateParamsPaymentMethodOptionsBlik(TypedDict): """ +class PaymentIntentCreateParamsPaymentMethodOptionsBlikMandateOptions( + TypedDict, +): + expires_at: NotRequired[int] + """ + Expiry date of the mandate. + """ + + class PaymentIntentCreateParamsPaymentMethodOptionsBoleto(TypedDict): expires_after_days: NotRequired[int] """ @@ -3003,6 +3118,10 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPaypal(TypedDict): """ +class PaymentIntentCreateParamsPaymentMethodOptionsPaypay(TypedDict): + pass + + class PaymentIntentCreateParamsPaymentMethodOptionsPayto(TypedDict): mandate_options: NotRequired[ "PaymentIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions" @@ -3258,6 +3377,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 PaymentIntentCreateParamsPaymentMethodOptionsSofort(TypedDict): preferred_language: NotRequired[ "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']|str" diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index c9e793236..b6b7a2362 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -27,6 +27,7 @@ class PaymentIntentModifyParams(RequestOptions): "boleto", "capchase_pay", "card", + "card_present", "cashapp", "check_scan", "click_to_pay", @@ -47,6 +48,7 @@ class PaymentIntentModifyParams(RequestOptions): "grabpay", "id_bank_transfer", "ideal", + "interac_present", "kakao_pay", "klarna", "knet", @@ -146,7 +148,7 @@ class PaymentIntentModifyParams(RequestOptions): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If [setup_future_usage](https://docs.stripe.com/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ customer_account: NotRequired[str] """ @@ -154,14 +156,14 @@ class PaymentIntentModifyParams(RequestOptions): Payment methods attached to other Accounts cannot be used with this PaymentIntent. - If [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. + If [setup_future_usage](https://docs.stripe.com/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. """ description: NotRequired[str] """ An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_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', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" + "Literal['']|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', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this payment. @@ -208,10 +210,6 @@ class PaymentIntentModifyParams(RequestOptions): """ Payment-method-specific configuration for this PaymentIntent. """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ receipt_email: NotRequired["Literal['']|str"] """ Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). @@ -513,13 +511,13 @@ class PaymentIntentModifyParamsPaymentMethodData(TypedDict): """ alma: NotRequired["PaymentIntentModifyParamsPaymentMethodDataAlma"] """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + If this is an Alma PaymentMethod, this hash contains details about the Alma payment method. """ amazon_pay: NotRequired[ "PaymentIntentModifyParamsPaymentMethodDataAmazonPay" ] """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. """ au_becs_debit: NotRequired[ "PaymentIntentModifyParamsPaymentMethodDataAuBecsDebit" @@ -681,6 +679,10 @@ class PaymentIntentModifyParamsPaymentMethodData(TypedDict): """ If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. """ + paypay: NotRequired["PaymentIntentModifyParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ payto: NotRequired["PaymentIntentModifyParamsPaymentMethodDataPayto"] """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. @@ -727,6 +729,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. + """ sofort: NotRequired["PaymentIntentModifyParamsPaymentMethodDataSofort"] """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. @@ -782,6 +788,7 @@ class PaymentIntentModifyParamsPaymentMethodData(TypedDict): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -790,6 +797,7 @@ class PaymentIntentModifyParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -1152,6 +1160,10 @@ class PaymentIntentModifyParamsPaymentMethodDataPaypal(TypedDict): pass +class PaymentIntentModifyParamsPaymentMethodDataPaypay(TypedDict): + pass + + class PaymentIntentModifyParamsPaymentMethodDataPayto(TypedDict): account_number: NotRequired[str] """ @@ -1205,6 +1217,10 @@ class PaymentIntentModifyParamsPaymentMethodDataSepaDebit(TypedDict): """ +class PaymentIntentModifyParamsPaymentMethodDataSequra(TypedDict): + pass + + class PaymentIntentModifyParamsPaymentMethodDataSofort(TypedDict): country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ @@ -1524,6 +1540,12 @@ class PaymentIntentModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. """ + paypay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsPaypay" + ] + """ + If this is a `paypay` PaymentMethod, this sub-hash contains details about the PayPay payment method options. + """ payto: NotRequired[ "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsPayto" ] @@ -1572,6 +1594,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. + """ sofort: NotRequired[ "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsSofort" ] @@ -1873,6 +1901,74 @@ class PaymentIntentModifyParamsPaymentMethodOptionsBillie(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + company_details: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + reference: NotRequired[str] + """ + An identifier or reference that this payment corresponds to. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT id number + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ class PaymentIntentModifyParamsPaymentMethodOptionsBizum(TypedDict): @@ -1884,7 +1980,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. @@ -1898,6 +2002,15 @@ class PaymentIntentModifyParamsPaymentMethodOptionsBlik(TypedDict): """ +class PaymentIntentModifyParamsPaymentMethodOptionsBlikMandateOptions( + TypedDict, +): + expires_at: NotRequired[int] + """ + Expiry date of the mandate. + """ + + class PaymentIntentModifyParamsPaymentMethodOptionsBoleto(TypedDict): expires_after_days: NotRequired[int] """ @@ -2835,6 +2948,10 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPaypal(TypedDict): """ +class PaymentIntentModifyParamsPaymentMethodOptionsPaypay(TypedDict): + pass + + class PaymentIntentModifyParamsPaymentMethodOptionsPayto(TypedDict): mandate_options: NotRequired[ "PaymentIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions" @@ -3090,6 +3207,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 PaymentIntentModifyParamsPaymentMethodOptionsSofort(TypedDict): preferred_language: NotRequired[ "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']|str" diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index ee8e3693d..7400f1e0f 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -26,6 +26,7 @@ class PaymentIntentUpdateParams(TypedDict): "boleto", "capchase_pay", "card", + "card_present", "cashapp", "check_scan", "click_to_pay", @@ -46,6 +47,7 @@ class PaymentIntentUpdateParams(TypedDict): "grabpay", "id_bank_transfer", "ideal", + "interac_present", "kakao_pay", "klarna", "knet", @@ -145,7 +147,7 @@ class PaymentIntentUpdateParams(TypedDict): Payment methods attached to other Customers cannot be used with this PaymentIntent. - If [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + If [setup_future_usage](https://docs.stripe.com/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. """ customer_account: NotRequired[str] """ @@ -153,14 +155,14 @@ class PaymentIntentUpdateParams(TypedDict): Payment methods attached to other Accounts cannot be used with this PaymentIntent. - If [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. + If [setup_future_usage](https://docs.stripe.com/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. """ description: NotRequired[str] """ An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_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', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" + "Literal['']|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', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this payment. @@ -207,10 +209,6 @@ class PaymentIntentUpdateParams(TypedDict): """ Payment-method-specific configuration for this PaymentIntent. """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ receipt_email: NotRequired["Literal['']|str"] """ Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). @@ -512,13 +510,13 @@ class PaymentIntentUpdateParamsPaymentMethodData(TypedDict): """ alma: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataAlma"] """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + If this is an Alma PaymentMethod, this hash contains details about the Alma payment method. """ amazon_pay: NotRequired[ "PaymentIntentUpdateParamsPaymentMethodDataAmazonPay" ] """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. """ au_becs_debit: NotRequired[ "PaymentIntentUpdateParamsPaymentMethodDataAuBecsDebit" @@ -680,6 +678,10 @@ class PaymentIntentUpdateParamsPaymentMethodData(TypedDict): """ If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. """ + paypay: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ payto: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataPayto"] """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. @@ -726,6 +728,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. + """ sofort: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataSofort"] """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. @@ -781,6 +787,7 @@ class PaymentIntentUpdateParamsPaymentMethodData(TypedDict): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -789,6 +796,7 @@ class PaymentIntentUpdateParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -1151,6 +1159,10 @@ class PaymentIntentUpdateParamsPaymentMethodDataPaypal(TypedDict): pass +class PaymentIntentUpdateParamsPaymentMethodDataPaypay(TypedDict): + pass + + class PaymentIntentUpdateParamsPaymentMethodDataPayto(TypedDict): account_number: NotRequired[str] """ @@ -1204,6 +1216,10 @@ class PaymentIntentUpdateParamsPaymentMethodDataSepaDebit(TypedDict): """ +class PaymentIntentUpdateParamsPaymentMethodDataSequra(TypedDict): + pass + + class PaymentIntentUpdateParamsPaymentMethodDataSofort(TypedDict): country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ @@ -1523,6 +1539,12 @@ class PaymentIntentUpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. """ + paypay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsPaypay" + ] + """ + If this is a `paypay` PaymentMethod, this sub-hash contains details about the PayPay payment method options. + """ payto: NotRequired[ "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsPayto" ] @@ -1571,6 +1593,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. + """ sofort: NotRequired[ "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsSofort" ] @@ -1872,6 +1900,74 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsBillie(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + company_details: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + reference: NotRequired[str] + """ + An identifier or reference that this payment corresponds to. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT id number + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ class PaymentIntentUpdateParamsPaymentMethodOptionsBizum(TypedDict): @@ -1883,7 +1979,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. @@ -1897,6 +2001,15 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsBlik(TypedDict): """ +class PaymentIntentUpdateParamsPaymentMethodOptionsBlikMandateOptions( + TypedDict, +): + expires_at: NotRequired[int] + """ + Expiry date of the mandate. + """ + + class PaymentIntentUpdateParamsPaymentMethodOptionsBoleto(TypedDict): expires_after_days: NotRequired[int] """ @@ -2834,6 +2947,10 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPaypal(TypedDict): """ +class PaymentIntentUpdateParamsPaymentMethodOptionsPaypay(TypedDict): + pass + + class PaymentIntentUpdateParamsPaymentMethodOptionsPayto(TypedDict): mandate_options: NotRequired[ "PaymentIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions" @@ -3089,6 +3206,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 PaymentIntentUpdateParamsPaymentMethodOptionsSofort(TypedDict): preferred_language: NotRequired[ "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']|str" diff --git a/stripe/params/_payment_link_create_params.py b/stripe/params/_payment_link_create_params.py index fff786069..9498dfbcd 100644 --- a/stripe/params/_payment_link_create_params.py +++ b/stripe/params/_payment_link_create_params.py @@ -42,11 +42,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"] """ @@ -145,11 +145,13 @@ class PaymentLinkCreateParams(RequestOptions): "pay_by_bank", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", "satispay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -351,7 +353,7 @@ class PaymentLinkCreateParamsCustomFieldDropdownOption(TypedDict): class PaymentLinkCreateParamsCustomFieldLabel(TypedDict): custom: str """ - Custom text for the label, displayed to the customer. Up to 50 characters. + Custom text for the label, displayed to the customer. Up to 100 characters. """ type: Literal["custom"] """ @@ -623,12 +625,29 @@ class PaymentLinkCreateParamsLineItemPriceDataProductData(TypedDict): """ A [tax code](https://docs.stripe.com/tax/tax-categories) ID. """ + tax_details: NotRequired[ + "PaymentLinkCreateParamsLineItemPriceDataProductDataTaxDetails" + ] + """ + Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location. + """ unit_label: NotRequired[str] """ A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. """ +class PaymentLinkCreateParamsLineItemPriceDataProductDataTaxDetails(TypedDict): + performance_location: NotRequired[str] + """ + A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://docs.stripe.com/tax/tax-categories) ID. + """ + + class PaymentLinkCreateParamsLineItemPriceDataRecurring(TypedDict): interval: Union[Literal["day", "month", "week", "year"], str] """ @@ -1146,7 +1165,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 a4f6b479e..34851b6c1 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', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'satispay', 'sepa_debit', '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', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'satispay', 'sepa_debit', 'sequra', '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). @@ -308,7 +308,7 @@ class PaymentLinkModifyParamsCustomFieldDropdownOption(TypedDict): class PaymentLinkModifyParamsCustomFieldLabel(TypedDict): custom: str """ - Custom text for the label, displayed to the customer. Up to 50 characters. + Custom text for the label, displayed to the customer. Up to 100 characters. """ type: Literal["custom"] """ @@ -1007,7 +1007,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 4a3d7b329..0973b6882 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', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'satispay', 'sepa_debit', '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', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'satispay', 'sepa_debit', 'sequra', '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). @@ -307,7 +307,7 @@ class PaymentLinkUpdateParamsCustomFieldDropdownOption(TypedDict): class PaymentLinkUpdateParamsCustomFieldLabel(TypedDict): custom: str """ - Custom text for the label, displayed to the customer. Up to 50 characters. + Custom text for the label, displayed to the customer. Up to 100 characters. """ type: Literal["custom"] """ @@ -1006,7 +1006,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 cb5cd1b16..d5ef3d5cf 100644 --- a/stripe/params/_payment_method_configuration_create_params.py +++ b/stripe/params/_payment_method_configuration_create_params.py @@ -208,6 +208,10 @@ class PaymentMethodConfigurationCreateParams(RequestOptions): """ PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://docs.stripe.com/payments/paypal) for more details. """ + paypay: NotRequired["PaymentMethodConfigurationCreateParamsPaypay"] + """ + Customers can pay with PayPay online or using the PayPay app. + """ payto: NotRequired["PaymentMethodConfigurationCreateParamsPayto"] """ PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. @@ -244,6 +248,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. + """ sofort: NotRequired["PaymentMethodConfigurationCreateParamsSofort"] """ Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://docs.stripe.com/payments/sofort) for more details. @@ -1028,6 +1036,22 @@ class PaymentMethodConfigurationCreateParamsPaypalDisplayPreference(TypedDict): """ +class PaymentMethodConfigurationCreateParamsPaypay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsPaypayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsPaypayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationCreateParamsPayto(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationCreateParamsPaytoDisplayPreference" @@ -1168,6 +1192,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 PaymentMethodConfigurationCreateParamsSofort(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationCreateParamsSofortDisplayPreference" diff --git a/stripe/params/_payment_method_configuration_modify_params.py b/stripe/params/_payment_method_configuration_modify_params.py index d4f6b855a..cf8cf604f 100644 --- a/stripe/params/_payment_method_configuration_modify_params.py +++ b/stripe/params/_payment_method_configuration_modify_params.py @@ -208,6 +208,10 @@ class PaymentMethodConfigurationModifyParams(RequestOptions): """ PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://docs.stripe.com/payments/paypal) for more details. """ + paypay: NotRequired["PaymentMethodConfigurationModifyParamsPaypay"] + """ + Customers can pay with PayPay online or using the PayPay app. + """ payto: NotRequired["PaymentMethodConfigurationModifyParamsPayto"] """ PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. @@ -244,6 +248,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. + """ sofort: NotRequired["PaymentMethodConfigurationModifyParamsSofort"] """ Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://docs.stripe.com/payments/sofort) for more details. @@ -1028,6 +1036,22 @@ class PaymentMethodConfigurationModifyParamsPaypalDisplayPreference(TypedDict): """ +class PaymentMethodConfigurationModifyParamsPaypay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsPaypayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsPaypayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationModifyParamsPayto(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationModifyParamsPaytoDisplayPreference" @@ -1168,6 +1192,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 PaymentMethodConfigurationModifyParamsSofort(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationModifyParamsSofortDisplayPreference" diff --git a/stripe/params/_payment_method_configuration_update_params.py b/stripe/params/_payment_method_configuration_update_params.py index ab228fabb..9b03cd1ea 100644 --- a/stripe/params/_payment_method_configuration_update_params.py +++ b/stripe/params/_payment_method_configuration_update_params.py @@ -207,6 +207,10 @@ class PaymentMethodConfigurationUpdateParams(TypedDict): """ PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://docs.stripe.com/payments/paypal) for more details. """ + paypay: NotRequired["PaymentMethodConfigurationUpdateParamsPaypay"] + """ + Customers can pay with PayPay online or using the PayPay app. + """ payto: NotRequired["PaymentMethodConfigurationUpdateParamsPayto"] """ PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. @@ -243,6 +247,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. + """ sofort: NotRequired["PaymentMethodConfigurationUpdateParamsSofort"] """ Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://docs.stripe.com/payments/sofort) for more details. @@ -1027,6 +1035,22 @@ class PaymentMethodConfigurationUpdateParamsPaypalDisplayPreference(TypedDict): """ +class PaymentMethodConfigurationUpdateParamsPaypay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsPaypayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsPaypayDisplayPreference(TypedDict): + preference: NotRequired["Literal['none', 'off', 'on']|str"] + """ + The account's preference for whether or not to display this payment method. + """ + + class PaymentMethodConfigurationUpdateParamsPayto(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationUpdateParamsPaytoDisplayPreference" @@ -1167,6 +1191,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 PaymentMethodConfigurationUpdateParamsSofort(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationUpdateParamsSofortDisplayPreference" diff --git a/stripe/params/_payment_method_create_params.py b/stripe/params/_payment_method_create_params.py index 813f90eb2..afcef6bb0 100644 --- a/stripe/params/_payment_method_create_params.py +++ b/stripe/params/_payment_method_create_params.py @@ -31,11 +31,11 @@ class PaymentMethodCreateParams(RequestOptions): """ alma: NotRequired["PaymentMethodCreateParamsAlma"] """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + If this is an Alma PaymentMethod, this hash contains details about the Alma payment method. """ amazon_pay: NotRequired["PaymentMethodCreateParamsAmazonPay"] """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. """ au_becs_debit: NotRequired["PaymentMethodCreateParamsAuBecsDebit"] """ @@ -193,6 +193,10 @@ class PaymentMethodCreateParams(RequestOptions): """ If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. """ + paypay: NotRequired["PaymentMethodCreateParamsPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ payto: NotRequired["PaymentMethodCreateParamsPayto"] """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. @@ -229,6 +233,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. + """ sofort: NotRequired["PaymentMethodCreateParamsSofort"] """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. @@ -246,7 +254,7 @@ class PaymentMethodCreateParams(RequestOptions): If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. """ type: NotRequired[ - "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', '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', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']|str" + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', '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', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']|str" ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. @@ -636,6 +644,10 @@ class PaymentMethodCreateParamsPaypal(TypedDict): pass +class PaymentMethodCreateParamsPaypay(TypedDict): + pass + + class PaymentMethodCreateParamsPayto(TypedDict): account_number: NotRequired[str] """ @@ -689,6 +701,10 @@ class PaymentMethodCreateParamsSepaDebit(TypedDict): """ +class PaymentMethodCreateParamsSequra(TypedDict): + pass + + class PaymentMethodCreateParamsSofort(TypedDict): country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ diff --git a/stripe/params/_payment_method_list_params.py b/stripe/params/_payment_method_list_params.py index ef84564bf..760ededb3 100644 --- a/stripe/params/_payment_method_list_params.py +++ b/stripe/params/_payment_method_list_params.py @@ -37,7 +37,7 @@ class PaymentMethodListParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ type: NotRequired[ - "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', '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', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']|str" + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', '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', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']|str" ] """ Filters the list by the object `type` field. Unfiltered, the list returns all payment method types except `custom`. If your integration expects only one type of payment method in the response, specify that type value in the request to reduce your payload. diff --git a/stripe/params/_payment_method_modify_params.py b/stripe/params/_payment_method_modify_params.py index 89c62df5f..ad7683066 100644 --- a/stripe/params/_payment_method_modify_params.py +++ b/stripe/params/_payment_method_modify_params.py @@ -31,10 +31,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. @@ -117,21 +113,6 @@ class PaymentMethodModifyParamsCardNetworks(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 4bd40a7b1..7e9ec72b0 100644 --- a/stripe/params/_payment_method_update_params.py +++ b/stripe/params/_payment_method_update_params.py @@ -30,10 +30,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. @@ -116,21 +112,6 @@ class PaymentMethodUpdateParamsCardNetworks(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_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 64fefbab7..06eac213e 100644 --- a/stripe/params/_payment_record_report_payment_attempt_params.py +++ b/stripe/params/_payment_record_report_payment_attempt_params.py @@ -7,6 +7,10 @@ class PaymentRecordReportPaymentAttemptParams(RequestOptions): + canceled: NotRequired["PaymentRecordReportPaymentAttemptParamsCanceled"] + """ + Information about the payment attempt cancelation. + """ description: NotRequired[str] """ An arbitrary string attached to the object. Often useful for displaying to users. @@ -35,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. """ @@ -53,6 +57,13 @@ class PaymentRecordReportPaymentAttemptParams(RequestOptions): """ +class PaymentRecordReportPaymentAttemptParamsCanceled(TypedDict): + canceled_at: int + """ + When the reported payment was canceled. Measured in seconds since the Unix epoch. + """ + + class PaymentRecordReportPaymentAttemptParamsFailed(TypedDict): failed_at: int """ diff --git a/stripe/params/_payment_record_report_payment_params.py b/stripe/params/_payment_record_report_payment_params.py index 76dea78ce..cc41e3793 100644 --- a/stripe/params/_payment_record_report_payment_params.py +++ b/stripe/params/_payment_record_report_payment_params.py @@ -11,6 +11,10 @@ class PaymentRecordReportPaymentParams(RequestOptions): """ The amount you initially requested for this payment. """ + canceled: NotRequired["PaymentRecordReportPaymentParamsCanceled"] + """ + Information about the payment attempt cancelation. + """ customer_details: NotRequired[ "PaymentRecordReportPaymentParamsCustomerDetails" ] @@ -47,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. """ @@ -82,6 +86,13 @@ class PaymentRecordReportPaymentParamsAmountRequested(TypedDict): """ +class PaymentRecordReportPaymentParamsCanceled(TypedDict): + canceled_at: int + """ + When the reported payment was canceled. Measured in seconds since the Unix epoch. + """ + + class PaymentRecordReportPaymentParamsCustomerDetails(TypedDict): customer: NotRequired[str] """ @@ -89,7 +100,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/_payout_create_params.py b/stripe/params/_payout_create_params.py index bf98c6d19..1b1d439b2 100644 --- a/stripe/params/_payout_create_params.py +++ b/stripe/params/_payout_create_params.py @@ -9,7 +9,7 @@ class PayoutCreateParams(RequestOptions): amount: int """ - A positive integer in cents representing how much to payout. + A positive integer in cents representing how much to pay out. """ currency: str """ diff --git a/stripe/params/_plan_create_params.py b/stripe/params/_plan_create_params.py index 32d8e1693..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] """ @@ -108,12 +108,27 @@ class PlanCreateParamsProduct(TypedDict): """ A [tax code](https://docs.stripe.com/tax/tax-categories) ID. """ + tax_details: NotRequired["PlanCreateParamsProductTaxDetails"] + """ + Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location. + """ unit_label: NotRequired[str] """ A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. """ +class PlanCreateParamsProductTaxDetails(TypedDict): + performance_location: NotRequired[str] + """ + A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://docs.stripe.com/tax/tax-categories) ID. + """ + + class PlanCreateParamsTier(TypedDict): flat_amount: NotRequired[int] """ diff --git a/stripe/params/_price_create_params.py b/stripe/params/_price_create_params.py index 3089d980b..fb51f1a6a 100644 --- a/stripe/params/_price_create_params.py +++ b/stripe/params/_price_create_params.py @@ -205,12 +205,27 @@ class PriceCreateParamsProductData(TypedDict): """ A [tax code](https://docs.stripe.com/tax/tax-categories) ID. """ + tax_details: NotRequired["PriceCreateParamsProductDataTaxDetails"] + """ + Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location. + """ unit_label: NotRequired[str] """ A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. """ +class PriceCreateParamsProductDataTaxDetails(TypedDict): + performance_location: NotRequired[str] + """ + A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://docs.stripe.com/tax/tax-categories) ID. + """ + + class PriceCreateParamsRecurring(TypedDict): interval: Union[Literal["day", "month", "week", "year"], str] """ diff --git a/stripe/params/_product_create_params.py b/stripe/params/_product_create_params.py index 1c8962cca..70db0ded7 100644 --- a/stripe/params/_product_create_params.py +++ b/stripe/params/_product_create_params.py @@ -65,6 +65,10 @@ class ProductCreateParams(RequestOptions): """ A [tax code](https://docs.stripe.com/tax/tax-categories) ID. """ + tax_details: NotRequired["ProductCreateParamsTaxDetails"] + """ + Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location. + """ type: NotRequired["Literal['good', 'service']|str"] """ The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons. @@ -247,3 +251,14 @@ class ProductCreateParamsPackageDimensions(TypedDict): """ Width, in inches. Maximum precision is 2 decimal places. """ + + +class ProductCreateParamsTaxDetails(TypedDict): + performance_location: NotRequired[str] + """ + A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://docs.stripe.com/tax/tax-categories) ID. + """ diff --git a/stripe/params/_product_list_params.py b/stripe/params/_product_list_params.py index 280732a53..a235f2a5d 100644 --- a/stripe/params/_product_list_params.py +++ b/stripe/params/_product_list_params.py @@ -24,7 +24,7 @@ class ProductListParams(RequestOptions): """ ids: NotRequired[List[str]] """ - Only return products with the given IDs. Cannot be used with [starting_after](https://api.stripe.com#list_products-starting_after) or [ending_before](https://api.stripe.com#list_products-ending_before). + Only return products with the given IDs. Cannot be used with [starting_after](https://docs.stripe.com/api#list_products-starting_after) or [ending_before](https://docs.stripe.com/api#list_products-ending_before). """ limit: NotRequired[int] """ diff --git a/stripe/params/_product_modify_params.py b/stripe/params/_product_modify_params.py index c0bfb9d49..6aab00d0a 100644 --- a/stripe/params/_product_modify_params.py +++ b/stripe/params/_product_modify_params.py @@ -64,6 +64,10 @@ class ProductModifyParams(RequestOptions): """ A [tax code](https://docs.stripe.com/tax/tax-categories) ID. """ + tax_details: NotRequired["Literal['']|ProductModifyParamsTaxDetails"] + """ + Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location. + """ unit_label: NotRequired["Literal['']|str"] """ A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`. @@ -98,3 +102,14 @@ class ProductModifyParamsPackageDimensions(TypedDict): """ Width, in inches. Maximum precision is 2 decimal places. """ + + +class ProductModifyParamsTaxDetails(TypedDict): + performance_location: NotRequired[str] + """ + A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://docs.stripe.com/tax/tax-categories) ID. + """ diff --git a/stripe/params/_product_update_params.py b/stripe/params/_product_update_params.py index 2b5d89561..a3605914f 100644 --- a/stripe/params/_product_update_params.py +++ b/stripe/params/_product_update_params.py @@ -63,6 +63,10 @@ class ProductUpdateParams(TypedDict): """ A [tax code](https://docs.stripe.com/tax/tax-categories) ID. """ + tax_details: NotRequired["Literal['']|ProductUpdateParamsTaxDetails"] + """ + Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location. + """ unit_label: NotRequired["Literal['']|str"] """ A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`. @@ -97,3 +101,14 @@ class ProductUpdateParamsPackageDimensions(TypedDict): """ Width, in inches. Maximum precision is 2 decimal places. """ + + +class ProductUpdateParamsTaxDetails(TypedDict): + performance_location: NotRequired[str] + """ + A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://docs.stripe.com/tax/tax-categories) ID. + """ diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py index 235bc561d..5902d3868 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", @@ -234,13 +236,13 @@ class SetupIntentConfirmParamsPaymentMethodData(TypedDict): """ alma: NotRequired["SetupIntentConfirmParamsPaymentMethodDataAlma"] """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + If this is an Alma PaymentMethod, this hash contains details about the Alma payment method. """ amazon_pay: NotRequired[ "SetupIntentConfirmParamsPaymentMethodDataAmazonPay" ] """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. """ au_becs_debit: NotRequired[ "SetupIntentConfirmParamsPaymentMethodDataAuBecsDebit" @@ -398,6 +400,10 @@ class SetupIntentConfirmParamsPaymentMethodData(TypedDict): """ If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. """ + paypay: NotRequired["SetupIntentConfirmParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ payto: NotRequired["SetupIntentConfirmParamsPaymentMethodDataPayto"] """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. @@ -444,6 +450,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. + """ sofort: NotRequired["SetupIntentConfirmParamsPaymentMethodDataSofort"] """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. @@ -499,6 +509,7 @@ class SetupIntentConfirmParamsPaymentMethodData(TypedDict): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -507,6 +518,7 @@ class SetupIntentConfirmParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -869,6 +881,10 @@ class SetupIntentConfirmParamsPaymentMethodDataPaypal(TypedDict): pass +class SetupIntentConfirmParamsPaymentMethodDataPaypay(TypedDict): + pass + + class SetupIntentConfirmParamsPaymentMethodDataPayto(TypedDict): account_number: NotRequired[str] """ @@ -922,6 +938,10 @@ class SetupIntentConfirmParamsPaymentMethodDataSepaDebit(TypedDict): """ +class SetupIntentConfirmParamsPaymentMethodDataSequra(TypedDict): + pass + + class SetupIntentConfirmParamsPaymentMethodDataSofort(TypedDict): country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ @@ -1023,6 +1043,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. @@ -1147,6 +1171,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" diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index 4980b33c7..d8e9299c3 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", @@ -195,6 +197,7 @@ class SetupIntentCreateParams(RequestOptions): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -203,6 +206,7 @@ class SetupIntentCreateParams(RequestOptions): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -264,10 +268,6 @@ class SetupIntentCreateParams(RequestOptions): """ Payment method-specific configuration for this SetupIntent. """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ return_url: NotRequired[str] """ The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://docs.stripe.com/api/setup_intents/create#create_setup_intent-confirm). @@ -375,13 +375,13 @@ class SetupIntentCreateParamsPaymentMethodData(TypedDict): """ alma: NotRequired["SetupIntentCreateParamsPaymentMethodDataAlma"] """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + If this is an Alma PaymentMethod, this hash contains details about the Alma payment method. """ amazon_pay: NotRequired[ "SetupIntentCreateParamsPaymentMethodDataAmazonPay" ] """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. """ au_becs_debit: NotRequired[ "SetupIntentCreateParamsPaymentMethodDataAuBecsDebit" @@ -537,6 +537,10 @@ class SetupIntentCreateParamsPaymentMethodData(TypedDict): """ If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. """ + paypay: NotRequired["SetupIntentCreateParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ payto: NotRequired["SetupIntentCreateParamsPaymentMethodDataPayto"] """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. @@ -581,6 +585,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. + """ sofort: NotRequired["SetupIntentCreateParamsPaymentMethodDataSofort"] """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. @@ -636,6 +644,7 @@ class SetupIntentCreateParamsPaymentMethodData(TypedDict): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -644,6 +653,7 @@ class SetupIntentCreateParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -1004,6 +1014,10 @@ class SetupIntentCreateParamsPaymentMethodDataPaypal(TypedDict): pass +class SetupIntentCreateParamsPaymentMethodDataPaypay(TypedDict): + pass + + class SetupIntentCreateParamsPaymentMethodDataPayto(TypedDict): account_number: NotRequired[str] """ @@ -1057,6 +1071,10 @@ class SetupIntentCreateParamsPaymentMethodDataSepaDebit(TypedDict): """ +class SetupIntentCreateParamsPaymentMethodDataSequra(TypedDict): + pass + + class SetupIntentCreateParamsPaymentMethodDataSofort(TypedDict): country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ @@ -1158,6 +1176,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. @@ -1282,6 +1304,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" diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index c60fbb808..08841aee3 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). @@ -36,7 +36,7 @@ class SetupIntentModifyParams(RequestOptions): An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_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', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" + "Literal['']|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', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this SetupIntent. @@ -80,10 +80,6 @@ class SetupIntentModifyParams(RequestOptions): """ Payment method-specific configuration for this SetupIntent. """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ class SetupIntentModifyParamsPaymentMethodData(TypedDict): @@ -115,13 +111,13 @@ class SetupIntentModifyParamsPaymentMethodData(TypedDict): """ alma: NotRequired["SetupIntentModifyParamsPaymentMethodDataAlma"] """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + If this is an Alma PaymentMethod, this hash contains details about the Alma payment method. """ amazon_pay: NotRequired[ "SetupIntentModifyParamsPaymentMethodDataAmazonPay" ] """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. """ au_becs_debit: NotRequired[ "SetupIntentModifyParamsPaymentMethodDataAuBecsDebit" @@ -277,6 +273,10 @@ class SetupIntentModifyParamsPaymentMethodData(TypedDict): """ If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. """ + paypay: NotRequired["SetupIntentModifyParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ payto: NotRequired["SetupIntentModifyParamsPaymentMethodDataPayto"] """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. @@ -321,6 +321,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. + """ sofort: NotRequired["SetupIntentModifyParamsPaymentMethodDataSofort"] """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. @@ -376,6 +380,7 @@ class SetupIntentModifyParamsPaymentMethodData(TypedDict): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -384,6 +389,7 @@ class SetupIntentModifyParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -744,6 +750,10 @@ class SetupIntentModifyParamsPaymentMethodDataPaypal(TypedDict): pass +class SetupIntentModifyParamsPaymentMethodDataPaypay(TypedDict): + pass + + class SetupIntentModifyParamsPaymentMethodDataPayto(TypedDict): account_number: NotRequired[str] """ @@ -797,6 +807,10 @@ class SetupIntentModifyParamsPaymentMethodDataSepaDebit(TypedDict): """ +class SetupIntentModifyParamsPaymentMethodDataSequra(TypedDict): + pass + + class SetupIntentModifyParamsPaymentMethodDataSofort(TypedDict): country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ @@ -898,6 +912,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. @@ -1022,6 +1040,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" diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index 160182d69..38e8edfa5 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). @@ -35,7 +35,7 @@ class SetupIntentUpdateParams(TypedDict): An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_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', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" + "Literal['']|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', 'grabpay', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this SetupIntent. @@ -79,10 +79,6 @@ class SetupIntentUpdateParams(TypedDict): """ Payment method-specific configuration for this SetupIntent. """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ class SetupIntentUpdateParamsPaymentMethodData(TypedDict): @@ -114,13 +110,13 @@ class SetupIntentUpdateParamsPaymentMethodData(TypedDict): """ alma: NotRequired["SetupIntentUpdateParamsPaymentMethodDataAlma"] """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + If this is an Alma PaymentMethod, this hash contains details about the Alma payment method. """ amazon_pay: NotRequired[ "SetupIntentUpdateParamsPaymentMethodDataAmazonPay" ] """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. """ au_becs_debit: NotRequired[ "SetupIntentUpdateParamsPaymentMethodDataAuBecsDebit" @@ -276,6 +272,10 @@ class SetupIntentUpdateParamsPaymentMethodData(TypedDict): """ If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. """ + paypay: NotRequired["SetupIntentUpdateParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ payto: NotRequired["SetupIntentUpdateParamsPaymentMethodDataPayto"] """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. @@ -320,6 +320,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. + """ sofort: NotRequired["SetupIntentUpdateParamsPaymentMethodDataSofort"] """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. @@ -375,6 +379,7 @@ class SetupIntentUpdateParamsPaymentMethodData(TypedDict): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -383,6 +388,7 @@ class SetupIntentUpdateParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -743,6 +749,10 @@ class SetupIntentUpdateParamsPaymentMethodDataPaypal(TypedDict): pass +class SetupIntentUpdateParamsPaymentMethodDataPaypay(TypedDict): + pass + + class SetupIntentUpdateParamsPaymentMethodDataPayto(TypedDict): account_number: NotRequired[str] """ @@ -796,6 +806,10 @@ class SetupIntentUpdateParamsPaymentMethodDataSepaDebit(TypedDict): """ +class SetupIntentUpdateParamsPaymentMethodDataSequra(TypedDict): + pass + + class SetupIntentUpdateParamsPaymentMethodDataSofort(TypedDict): country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ @@ -897,6 +911,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. @@ -1021,6 +1039,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" diff --git a/stripe/params/_subscription_create_params.py b/stripe/params/_subscription_create_params.py index 176880283..70a9f1d36 100644 --- a/stripe/params/_subscription_create_params.py +++ b/stripe/params/_subscription_create_params.py @@ -160,15 +160,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"] """ @@ -485,6 +485,10 @@ class SubscriptionCreateParamsItem(TypedDict): """ Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. """ + current_trial: NotRequired["SubscriptionCreateParamsItemCurrentTrial"] + """ + The trial offer to apply to this subscription item. + """ discounts: NotRequired[ "Literal['']|List[SubscriptionCreateParamsItemDiscount]" ] @@ -524,6 +528,13 @@ class SubscriptionCreateParamsItemBillingThresholds(TypedDict): """ +class SubscriptionCreateParamsItemCurrentTrial(TypedDict): + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ + + class SubscriptionCreateParamsItemDiscount(TypedDict): coupon: NotRequired[str] """ @@ -587,7 +598,7 @@ class SubscriptionCreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration @@ -619,6 +630,12 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the Billie payment method options to pass to the invoice's PaymentIntent. """ + blik: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlik" + ] + """ + This sub-hash contains details about the Blik payment method options to pass to the invoice's PaymentIntent. + """ card: NotRequired[ "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCard" ] @@ -707,7 +724,90 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBancontact( class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillie( TypedDict, ): - pass + company_details: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT ID number. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlik( + TypedDict, +): + mandate_options: NotRequired[ + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions" + ] + """ + Configuration options for setting up a mandate + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions( + TypedDict, +): + 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. + """ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCard( @@ -985,8 +1085,12 @@ class SubscriptionCreateParamsTrialSettings(TypedDict): class SubscriptionCreateParamsTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Union[ - Literal["cancel", "create_invoice", "pause"], str + 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: 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_item_create_params.py b/stripe/params/_subscription_item_create_params.py index 751afee49..5516326b2 100644 --- a/stripe/params/_subscription_item_create_params.py +++ b/stripe/params/_subscription_item_create_params.py @@ -14,6 +14,10 @@ class SubscriptionItemCreateParams(RequestOptions): """ Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. """ + current_trial: NotRequired["SubscriptionItemCreateParamsCurrentTrial"] + """ + The trial offer to apply to this subscription item. + """ discounts: NotRequired[ "Literal['']|List[SubscriptionItemCreateParamsDiscount]" ] @@ -77,6 +81,13 @@ class SubscriptionItemCreateParamsBillingThresholds(TypedDict): """ +class SubscriptionItemCreateParamsCurrentTrial(TypedDict): + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ + + class SubscriptionItemCreateParamsDiscount(TypedDict): coupon: NotRequired[str] """ diff --git a/stripe/params/_subscription_item_modify_params.py b/stripe/params/_subscription_item_modify_params.py index 2c79037d0..a11b53b1b 100644 --- a/stripe/params/_subscription_item_modify_params.py +++ b/stripe/params/_subscription_item_modify_params.py @@ -14,6 +14,10 @@ class SubscriptionItemModifyParams(RequestOptions): """ Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. """ + current_trial: NotRequired["SubscriptionItemModifyParamsCurrentTrial"] + """ + The trial offer to apply to this subscription item. + """ discounts: NotRequired[ "Literal['']|List[SubscriptionItemModifyParamsDiscount]" ] @@ -46,11 +50,11 @@ class SubscriptionItemModifyParams(RequestOptions): """ price: NotRequired[str] """ - The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. You can use either `price` or `price_data`, but not both, to set or change this item's price. If you're updating an existing item without changing its price, omit both. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired["SubscriptionItemModifyParamsPriceData"] """ - Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required. + Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. You can use either `price` or `price_data`, but not both, to set or change this item's price. If you're updating an existing item without changing its price, omit both. """ proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|str" @@ -79,6 +83,13 @@ class SubscriptionItemModifyParamsBillingThresholds(TypedDict): """ +class SubscriptionItemModifyParamsCurrentTrial(TypedDict): + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ + + class SubscriptionItemModifyParamsDiscount(TypedDict): coupon: NotRequired[str] """ diff --git a/stripe/params/_subscription_item_update_params.py b/stripe/params/_subscription_item_update_params.py index bfa2299eb..a526e4cdc 100644 --- a/stripe/params/_subscription_item_update_params.py +++ b/stripe/params/_subscription_item_update_params.py @@ -13,6 +13,10 @@ class SubscriptionItemUpdateParams(TypedDict): """ Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. """ + current_trial: NotRequired["SubscriptionItemUpdateParamsCurrentTrial"] + """ + The trial offer to apply to this subscription item. + """ discounts: NotRequired[ "Literal['']|List[SubscriptionItemUpdateParamsDiscount]" ] @@ -45,11 +49,11 @@ class SubscriptionItemUpdateParams(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. You can use either `price` or `price_data`, but not both, to set or change this item's price. If you're updating an existing item without changing its price, omit both. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired["SubscriptionItemUpdateParamsPriceData"] """ - Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required. + Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. You can use either `price` or `price_data`, but not both, to set or change this item's price. If you're updating an existing item without changing its price, omit both. """ proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|str" @@ -78,6 +82,13 @@ class SubscriptionItemUpdateParamsBillingThresholds(TypedDict): """ +class SubscriptionItemUpdateParamsCurrentTrial(TypedDict): + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ + + class SubscriptionItemUpdateParamsDiscount(TypedDict): coupon: NotRequired[str] """ diff --git a/stripe/params/_subscription_modify_params.py b/stripe/params/_subscription_modify_params.py index ebc3779cd..9e4d1db5f 100644 --- a/stripe/params/_subscription_modify_params.py +++ b/stripe/params/_subscription_modify_params.py @@ -22,9 +22,11 @@ class SubscriptionModifyParams(RequestOptions): """ Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. """ - 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]" @@ -156,7 +158,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"] """ @@ -296,6 +298,13 @@ class SubscriptionModifyParamsAutomaticTaxLiability(TypedDict): """ +class SubscriptionModifyParamsBillingCycleAnchor(TypedDict): + type: Union[Literal["now", "unchanged"], str] + """ + Determines how the billing cycle anchor changes when the subscription is updated. + """ + + class SubscriptionModifyParamsBillingSchedule(TypedDict): applies_to: NotRequired[ List["SubscriptionModifyParamsBillingScheduleAppliesTo"] @@ -453,6 +462,10 @@ class SubscriptionModifyParamsItem(TypedDict): """ Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. """ + current_trial: NotRequired["SubscriptionModifyParamsItemCurrentTrial"] + """ + The trial offer to apply to this subscription item. + """ deleted: NotRequired[bool] """ A flag that, if set to `true`, will delete the specified item. @@ -479,11 +492,11 @@ class SubscriptionModifyParamsItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. You can use either `price` or `price_data`, but not both, to set or change this item's price. If you're updating an existing item without changing its price, omit both. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired["SubscriptionModifyParamsItemPriceData"] """ - Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required. + Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. You can use either `price` or `price_data`, but not both, to set or change this item's price. If you're updating an existing item without changing its price, omit both. """ quantity: NotRequired[int] """ @@ -502,6 +515,13 @@ class SubscriptionModifyParamsItemBillingThresholds(TypedDict): """ +class SubscriptionModifyParamsItemCurrentTrial(TypedDict): + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ + + class SubscriptionModifyParamsItemDiscount(TypedDict): coupon: NotRequired[str] """ @@ -578,7 +598,7 @@ class SubscriptionModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration @@ -610,6 +630,12 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the Billie payment method options to pass to the invoice's PaymentIntent. """ + blik: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlik" + ] + """ + This sub-hash contains details about the Blik payment method options to pass to the invoice's PaymentIntent. + """ card: NotRequired[ "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCard" ] @@ -698,7 +724,90 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillie( TypedDict, ): - pass + company_details: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT ID number. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlik( + TypedDict, +): + mandate_options: NotRequired[ + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions" + ] + """ + Configuration options for setting up a mandate + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions( + TypedDict, +): + 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. + """ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCard( @@ -976,8 +1085,12 @@ class SubscriptionModifyParamsTrialSettings(TypedDict): class SubscriptionModifyParamsTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Union[ - Literal["cancel", "create_invoice", "pause"], str + 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: 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_pause_params.py b/stripe/params/_subscription_pause_params.py new file mode 100644 index 000000000..41e9e5257 --- /dev/null +++ b/stripe/params/_subscription_pause_params.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class SubscriptionPauseParams(RequestOptions): + bill_for: NotRequired["SubscriptionPauseParamsBillFor"] + """ + Controls what to bill for when pausing the subscription. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoicing_behavior: NotRequired[ + "Literal['invoice', 'pending_invoice_item']|str" + ] + """ + Determines how to handle debits and credits when pausing. Defaults to `pending_invoice_item`. + """ + type: NotRequired["Literal['subscription']|str"] + """ + The type of pause to apply. Defaults to `subscription`. + """ + + +class SubscriptionPauseParamsBillFor(TypedDict): + outstanding_usage_through: NotRequired[ + "SubscriptionPauseParamsBillForOutstandingUsageThrough" + ] + """ + Controls when to bill for metered usage in the current period. Defaults to `{ type: "now" }`. + """ + unused_time_from: NotRequired[ + "SubscriptionPauseParamsBillForUnusedTimeFrom" + ] + """ + Controls when to credit for unused time on licensed items. Defaults to `{ type: "now" }`. + """ + + +class SubscriptionPauseParamsBillForOutstandingUsageThrough(TypedDict): + type: Union[Literal["none", "now"], str] + """ + When to bill metered usage in the current period. + """ + + +class SubscriptionPauseParamsBillForUnusedTimeFrom(TypedDict): + type: Union[Literal["item_current_period_start", "none", "now"], str] + """ + When to credit for unused time. + """ diff --git a/stripe/params/_subscription_resume_params.py b/stripe/params/_subscription_resume_params.py index e27735cb7..5e4cd9e3b 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). """ @@ -14,6 +16,12 @@ class SubscriptionResumeParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + payment_behavior: NotRequired[ + "Literal['resume_on_payment_attempt', 'resume_on_payment_success']|str" + ] + """ + Controls whether Stripe attempts payment on the resumption invoice in the resume request, and how payment on that invoice affects the subscription's status. The default is `resume_on_payment_attempt`. + """ proration_behavior: NotRequired[ "Literal['always_invoice', 'create_prorations', 'none']|str" ] @@ -24,3 +32,10 @@ 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): + type: Union[Literal["now", "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 f516084b5..215014172 100644 --- a/stripe/params/_subscription_schedule_create_params.py +++ b/stripe/params/_subscription_schedule_create_params.py @@ -46,6 +46,12 @@ class SubscriptionScheduleCreateParams(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`. """ + pause_schedules: NotRequired[ + List["SubscriptionScheduleCreateParamsPauseSchedule"] + ] + """ + Configures the subscription's pause behavior and, optionally, its resume behavior. Only one entry is supported. + """ phases: NotRequired[List["SubscriptionScheduleCreateParamsPhase"]] """ List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. @@ -231,6 +237,163 @@ class SubscriptionScheduleCreateParamsDefaultSettingsTransferData(TypedDict): """ +class SubscriptionScheduleCreateParamsPauseSchedule(TypedDict): + key: NotRequired[str] + """ + A unique identifier for this pause schedule entry. + """ + pause: NotRequired["SubscriptionScheduleCreateParamsPauseSchedulePause"] + """ + Configuration for when and how the subscription pauses. + """ + resume: NotRequired["SubscriptionScheduleCreateParamsPauseScheduleResume"] + """ + Configuration for when and how the subscription resumes. + """ + + +class SubscriptionScheduleCreateParamsPauseSchedulePause(TypedDict): + pause_at: "SubscriptionScheduleCreateParamsPauseSchedulePausePauseAt" + """ + When to pause the subscription. + """ + settings: NotRequired[ + "SubscriptionScheduleCreateParamsPauseSchedulePauseSettings" + ] + """ + Settings controlling billing behavior during the pause. + """ + + +class SubscriptionScheduleCreateParamsPauseSchedulePausePauseAt(TypedDict): + timestamp: NotRequired[int] + """ + The Unix timestamp at which to pause the subscription. Required when `type` is `timestamp`. + """ + type: Union[Literal["now", "timestamp"], str] + """ + When to pause the subscription. Use `now` to pause immediately or `timestamp` to pause at a specific time. + """ + + +class SubscriptionScheduleCreateParamsPauseSchedulePauseSettings(TypedDict): + bill_for: NotRequired[ + "SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillFor" + ] + """ + Controls what to bill for when pausing the subscription. + """ + invoicing_behavior: NotRequired[ + "Literal['invoice', 'pending_invoice_item']|str" + ] + """ + 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"] + """ + The pause type. Currently only `subscription` is supported. + """ + + +class SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillFor( + TypedDict, +): + outstanding_usage_through: NotRequired[ + "SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough" + ] + """ + Controls whether to collect metered usage accrued up to the pause date. + """ + unused_time_from: NotRequired[ + "SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom" + ] + """ + Controls how unused time on subscription items is credited when pausing. + """ + + +class SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough( + TypedDict, +): + type: NotRequired["Literal['none', 'pause_at']|str"] + """ + 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. + """ + + +class SubscriptionScheduleCreateParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom( + TypedDict, +): + type: NotRequired[ + "Literal['item_current_period_start', 'none', 'pause_at']|str" + ] + """ + 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. + """ + + +class SubscriptionScheduleCreateParamsPauseScheduleResume(TypedDict): + resume_at: "SubscriptionScheduleCreateParamsPauseScheduleResumeResumeAt" + """ + When to resume the subscription. + """ + settings: NotRequired[ + "SubscriptionScheduleCreateParamsPauseScheduleResumeSettings" + ] + """ + Settings controlling how the subscription resumes. + """ + + +class SubscriptionScheduleCreateParamsPauseScheduleResumeResumeAt(TypedDict): + duration: NotRequired[ + "SubscriptionScheduleCreateParamsPauseScheduleResumeResumeAtDuration" + ] + """ + The duration after which to resume the subscription. Required when `type` is `duration`. + """ + timestamp: NotRequired[int] + """ + The Unix timestamp at which to resume the subscription. Required when `type` is `timestamp`. + """ + type: Union[Literal["duration", "now", "timestamp"], str] + """ + When to resume the subscription. Use `now` to resume immediately, `duration` to resume after a set duration, or `timestamp` to resume at a specific time. + """ + + +class SubscriptionScheduleCreateParamsPauseScheduleResumeResumeAtDuration( + TypedDict, +): + interval: Union[Literal["day", "month", "week", "year"], str] + """ + The time unit for the resume duration. One of `day`, `week`, `month`, or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals after which the subscription resumes. + """ + + +class SubscriptionScheduleCreateParamsPauseScheduleResumeSettings(TypedDict): + billing_cycle_anchor: NotRequired["Literal['resume_at', 'unchanged']|str"] + """ + 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. 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. When adding a pause schedule, defaults to `create_prorations`. On updates, the existing value is preserved if not provided. + """ + + class SubscriptionScheduleCreateParamsPhase(TypedDict): add_invoice_items: NotRequired[ List["SubscriptionScheduleCreateParamsPhaseAddInvoiceItem"] diff --git a/stripe/params/_subscription_schedule_modify_params.py b/stripe/params/_subscription_schedule_modify_params.py index 4bf865c57..79b216e28 100644 --- a/stripe/params/_subscription_schedule_modify_params.py +++ b/stripe/params/_subscription_schedule_modify_params.py @@ -30,6 +30,12 @@ class SubscriptionScheduleModifyParams(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`. """ + pause_schedules: NotRequired[ + "Literal['']|List[SubscriptionScheduleModifyParamsPauseSchedule]" + ] + """ + Configures the subscription's pause behavior and, optionally, its resume behavior. Only one entry is supported. Include a key to update an existing entry. Omit to leave an existing pause schedule unchanged, or pass "" to clear it. + """ phases: NotRequired[List["SubscriptionScheduleModifyParamsPhase"]] """ List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. @@ -197,6 +203,169 @@ class SubscriptionScheduleModifyParamsDefaultSettingsTransferData(TypedDict): """ +class SubscriptionScheduleModifyParamsPauseSchedule(TypedDict): + key: NotRequired[str] + """ + A unique identifier for this pause schedule entry. + """ + pause: NotRequired["SubscriptionScheduleModifyParamsPauseSchedulePause"] + """ + Configuration for when and how the subscription pauses. + """ + resume: NotRequired[ + "Literal['']|SubscriptionScheduleModifyParamsPauseScheduleResume" + ] + """ + Configuration for when and how the subscription resumes. + """ + + +class SubscriptionScheduleModifyParamsPauseSchedulePause(TypedDict): + pause_at: NotRequired[ + "SubscriptionScheduleModifyParamsPauseSchedulePausePauseAt" + ] + """ + When to pause the subscription. + """ + settings: NotRequired[ + "SubscriptionScheduleModifyParamsPauseSchedulePauseSettings" + ] + """ + Settings controlling billing behavior during the pause. + """ + + +class SubscriptionScheduleModifyParamsPauseSchedulePausePauseAt(TypedDict): + timestamp: NotRequired[int] + """ + The Unix timestamp at which to pause the subscription. Required when `type` is `timestamp`. + """ + type: Union[Literal["now", "timestamp"], str] + """ + When to pause the subscription. Use `now` to pause immediately or `timestamp` to pause at a specific time. + """ + + +class SubscriptionScheduleModifyParamsPauseSchedulePauseSettings(TypedDict): + bill_for: NotRequired[ + "SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillFor" + ] + """ + Controls what to bill for when pausing the subscription. + """ + invoicing_behavior: NotRequired[ + "Literal['invoice', 'pending_invoice_item']|str" + ] + """ + 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"] + """ + The pause type. Currently only `subscription` is supported. + """ + + +class SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillFor( + TypedDict, +): + outstanding_usage_through: NotRequired[ + "SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough" + ] + """ + Controls whether to collect metered usage accrued up to the pause date. + """ + unused_time_from: NotRequired[ + "SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom" + ] + """ + Controls how unused time on subscription items is credited when pausing. + """ + + +class SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough( + TypedDict, +): + type: NotRequired["Literal['none', 'pause_at']|str"] + """ + 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. + """ + + +class SubscriptionScheduleModifyParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom( + TypedDict, +): + type: NotRequired[ + "Literal['item_current_period_start', 'none', 'pause_at']|str" + ] + """ + 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. + """ + + +class SubscriptionScheduleModifyParamsPauseScheduleResume(TypedDict): + resume_at: NotRequired[ + "SubscriptionScheduleModifyParamsPauseScheduleResumeResumeAt" + ] + """ + When to resume the subscription. + """ + settings: NotRequired[ + "SubscriptionScheduleModifyParamsPauseScheduleResumeSettings" + ] + """ + Settings controlling how the subscription resumes. + """ + + +class SubscriptionScheduleModifyParamsPauseScheduleResumeResumeAt(TypedDict): + duration: NotRequired[ + "SubscriptionScheduleModifyParamsPauseScheduleResumeResumeAtDuration" + ] + """ + The duration after which to resume the subscription. Required when `type` is `duration`. + """ + timestamp: NotRequired[int] + """ + The Unix timestamp at which to resume the subscription. Required when `type` is `timestamp`. + """ + type: Union[Literal["duration", "now", "timestamp"], str] + """ + When to resume the subscription. Use `now` to resume immediately, `duration` to resume after a set duration, or `timestamp` to resume at a specific time. + """ + + +class SubscriptionScheduleModifyParamsPauseScheduleResumeResumeAtDuration( + TypedDict, +): + interval: Union[Literal["day", "month", "week", "year"], str] + """ + The time unit for the resume duration. One of `day`, `week`, `month`, or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals after which the subscription resumes. + """ + + +class SubscriptionScheduleModifyParamsPauseScheduleResumeSettings(TypedDict): + billing_cycle_anchor: NotRequired["Literal['resume_at', 'unchanged']|str"] + """ + 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. 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. When adding a pause schedule, defaults to `create_prorations`. On updates, the existing value is preserved if not provided. + """ + + class SubscriptionScheduleModifyParamsPhase(TypedDict): add_invoice_items: NotRequired[ List["SubscriptionScheduleModifyParamsPhaseAddInvoiceItem"] diff --git a/stripe/params/_subscription_schedule_update_params.py b/stripe/params/_subscription_schedule_update_params.py index e363a54f3..302ca90b8 100644 --- a/stripe/params/_subscription_schedule_update_params.py +++ b/stripe/params/_subscription_schedule_update_params.py @@ -29,6 +29,12 @@ class SubscriptionScheduleUpdateParams(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`. """ + pause_schedules: NotRequired[ + "Literal['']|List[SubscriptionScheduleUpdateParamsPauseSchedule]" + ] + """ + Configures the subscription's pause behavior and, optionally, its resume behavior. Only one entry is supported. Include a key to update an existing entry. Omit to leave an existing pause schedule unchanged, or pass "" to clear it. + """ phases: NotRequired[List["SubscriptionScheduleUpdateParamsPhase"]] """ List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. @@ -196,6 +202,169 @@ class SubscriptionScheduleUpdateParamsDefaultSettingsTransferData(TypedDict): """ +class SubscriptionScheduleUpdateParamsPauseSchedule(TypedDict): + key: NotRequired[str] + """ + A unique identifier for this pause schedule entry. + """ + pause: NotRequired["SubscriptionScheduleUpdateParamsPauseSchedulePause"] + """ + Configuration for when and how the subscription pauses. + """ + resume: NotRequired[ + "Literal['']|SubscriptionScheduleUpdateParamsPauseScheduleResume" + ] + """ + Configuration for when and how the subscription resumes. + """ + + +class SubscriptionScheduleUpdateParamsPauseSchedulePause(TypedDict): + pause_at: NotRequired[ + "SubscriptionScheduleUpdateParamsPauseSchedulePausePauseAt" + ] + """ + When to pause the subscription. + """ + settings: NotRequired[ + "SubscriptionScheduleUpdateParamsPauseSchedulePauseSettings" + ] + """ + Settings controlling billing behavior during the pause. + """ + + +class SubscriptionScheduleUpdateParamsPauseSchedulePausePauseAt(TypedDict): + timestamp: NotRequired[int] + """ + The Unix timestamp at which to pause the subscription. Required when `type` is `timestamp`. + """ + type: Union[Literal["now", "timestamp"], str] + """ + When to pause the subscription. Use `now` to pause immediately or `timestamp` to pause at a specific time. + """ + + +class SubscriptionScheduleUpdateParamsPauseSchedulePauseSettings(TypedDict): + bill_for: NotRequired[ + "SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillFor" + ] + """ + Controls what to bill for when pausing the subscription. + """ + invoicing_behavior: NotRequired[ + "Literal['invoice', 'pending_invoice_item']|str" + ] + """ + 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"] + """ + The pause type. Currently only `subscription` is supported. + """ + + +class SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillFor( + TypedDict, +): + outstanding_usage_through: NotRequired[ + "SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough" + ] + """ + Controls whether to collect metered usage accrued up to the pause date. + """ + unused_time_from: NotRequired[ + "SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom" + ] + """ + Controls how unused time on subscription items is credited when pausing. + """ + + +class SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillForOutstandingUsageThrough( + TypedDict, +): + type: NotRequired["Literal['none', 'pause_at']|str"] + """ + 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. + """ + + +class SubscriptionScheduleUpdateParamsPauseSchedulePauseSettingsBillForUnusedTimeFrom( + TypedDict, +): + type: NotRequired[ + "Literal['item_current_period_start', 'none', 'pause_at']|str" + ] + """ + 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. + """ + + +class SubscriptionScheduleUpdateParamsPauseScheduleResume(TypedDict): + resume_at: NotRequired[ + "SubscriptionScheduleUpdateParamsPauseScheduleResumeResumeAt" + ] + """ + When to resume the subscription. + """ + settings: NotRequired[ + "SubscriptionScheduleUpdateParamsPauseScheduleResumeSettings" + ] + """ + Settings controlling how the subscription resumes. + """ + + +class SubscriptionScheduleUpdateParamsPauseScheduleResumeResumeAt(TypedDict): + duration: NotRequired[ + "SubscriptionScheduleUpdateParamsPauseScheduleResumeResumeAtDuration" + ] + """ + The duration after which to resume the subscription. Required when `type` is `duration`. + """ + timestamp: NotRequired[int] + """ + The Unix timestamp at which to resume the subscription. Required when `type` is `timestamp`. + """ + type: Union[Literal["duration", "now", "timestamp"], str] + """ + When to resume the subscription. Use `now` to resume immediately, `duration` to resume after a set duration, or `timestamp` to resume at a specific time. + """ + + +class SubscriptionScheduleUpdateParamsPauseScheduleResumeResumeAtDuration( + TypedDict, +): + interval: Union[Literal["day", "month", "week", "year"], str] + """ + The time unit for the resume duration. One of `day`, `week`, `month`, or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals after which the subscription resumes. + """ + + +class SubscriptionScheduleUpdateParamsPauseScheduleResumeSettings(TypedDict): + billing_cycle_anchor: NotRequired["Literal['resume_at', 'unchanged']|str"] + """ + 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. 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. When adding a pause schedule, defaults to `create_prorations`. On updates, the existing value is preserved if not provided. + """ + + class SubscriptionScheduleUpdateParamsPhase(TypedDict): add_invoice_items: NotRequired[ List["SubscriptionScheduleUpdateParamsPhaseAddInvoiceItem"] diff --git a/stripe/params/_subscription_update_params.py b/stripe/params/_subscription_update_params.py index a76150bab..98d103719 100644 --- a/stripe/params/_subscription_update_params.py +++ b/stripe/params/_subscription_update_params.py @@ -21,9 +21,11 @@ class SubscriptionUpdateParams(TypedDict): """ Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. """ - 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]" @@ -155,7 +157,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"] """ @@ -295,6 +297,13 @@ class SubscriptionUpdateParamsAutomaticTaxLiability(TypedDict): """ +class SubscriptionUpdateParamsBillingCycleAnchor(TypedDict): + type: Union[Literal["now", "unchanged"], str] + """ + Determines how the billing cycle anchor changes when the subscription is updated. + """ + + class SubscriptionUpdateParamsBillingSchedule(TypedDict): applies_to: NotRequired[ List["SubscriptionUpdateParamsBillingScheduleAppliesTo"] @@ -452,6 +461,10 @@ class SubscriptionUpdateParamsItem(TypedDict): """ Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. """ + current_trial: NotRequired["SubscriptionUpdateParamsItemCurrentTrial"] + """ + The trial offer to apply to this subscription item. + """ deleted: NotRequired[bool] """ A flag that, if set to `true`, will delete the specified item. @@ -478,11 +491,11 @@ class SubscriptionUpdateParamsItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. You can use either `price` or `price_data`, but not both, to set or change this item's price. If you're updating an existing item without changing its price, omit both. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired["SubscriptionUpdateParamsItemPriceData"] """ - Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required. + Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. You can use either `price` or `price_data`, but not both, to set or change this item's price. If you're updating an existing item without changing its price, omit both. """ quantity: NotRequired[int] """ @@ -501,6 +514,13 @@ class SubscriptionUpdateParamsItemBillingThresholds(TypedDict): """ +class SubscriptionUpdateParamsItemCurrentTrial(TypedDict): + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ + + class SubscriptionUpdateParamsItemDiscount(TypedDict): coupon: NotRequired[str] """ @@ -577,7 +597,7 @@ class SubscriptionUpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration @@ -609,6 +629,12 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the Billie payment method options to pass to the invoice's PaymentIntent. """ + blik: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlik" + ] + """ + This sub-hash contains details about the Blik payment method options to pass to the invoice's PaymentIntent. + """ card: NotRequired[ "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCard" ] @@ -697,7 +723,90 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact( class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillie( TypedDict, ): - pass + company_details: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT ID number. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlik( + TypedDict, +): + mandate_options: NotRequired[ + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions" + ] + """ + Configuration options for setting up a mandate + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlikMandateOptions( + TypedDict, +): + 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. + """ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCard( @@ -975,8 +1084,12 @@ class SubscriptionUpdateParamsTrialSettings(TypedDict): class SubscriptionUpdateParamsTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Union[ - Literal["cancel", "create_invoice", "pause"], str + 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: 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/_token_create_params.py b/stripe/params/_token_create_params.py index c12dbfaae..0a541b75a 100644 --- a/stripe/params/_token_create_params.py +++ b/stripe/params/_token_create_params.py @@ -402,11 +402,11 @@ class TokenCreateParamsAccountCompanyVerification(TypedDict): class TokenCreateParamsAccountCompanyVerificationDocument(TypedDict): back: NotRequired[str] """ - The back of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of a document returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of a document returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of a document returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ @@ -685,22 +685,22 @@ class TokenCreateParamsAccountIndividualVerificationAdditionalDocument( ): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class TokenCreateParamsAccountIndividualVerificationDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ @@ -1081,21 +1081,21 @@ class TokenCreateParamsPersonDocuments(TypedDict): class TokenCreateParamsPersonDocumentsCompanyAuthorization(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class TokenCreateParamsPersonDocumentsPassport(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ class TokenCreateParamsPersonDocumentsVisa(TypedDict): files: NotRequired[List[str]] """ - One or more document ids returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `account_requirement`. + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. """ @@ -1263,22 +1263,22 @@ class TokenCreateParamsPersonVerification(TypedDict): class TokenCreateParamsPersonVerificationAdditionalDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class TokenCreateParamsPersonVerificationDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ 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 0cf10fcfd..70d2f2673 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", ] ] """ @@ -161,6 +162,9 @@ class WebhookEndpointCreateParams(RequestOptions): "application_fee.created", "application_fee.refund.updated", "application_fee.refunded", + "apps.install.created", + "apps.install.deleted", + "apps.install.updated", "balance.available", "balance_settings.updated", "billing.alert.triggered", diff --git a/stripe/params/_webhook_endpoint_modify_params.py b/stripe/params/_webhook_endpoint_modify_params.py index 80b294a40..d872d71ae 100644 --- a/stripe/params/_webhook_endpoint_modify_params.py +++ b/stripe/params/_webhook_endpoint_modify_params.py @@ -28,6 +28,9 @@ class WebhookEndpointModifyParams(RequestOptions): "application_fee.created", "application_fee.refund.updated", "application_fee.refunded", + "apps.install.created", + "apps.install.deleted", + "apps.install.updated", "balance.available", "balance_settings.updated", "billing.alert.triggered", diff --git a/stripe/params/_webhook_endpoint_update_params.py b/stripe/params/_webhook_endpoint_update_params.py index 5c37f6f69..3c78fac79 100644 --- a/stripe/params/_webhook_endpoint_update_params.py +++ b/stripe/params/_webhook_endpoint_update_params.py @@ -27,6 +27,9 @@ class WebhookEndpointUpdateParams(TypedDict): "application_fee.created", "application_fee.refund.updated", "application_fee.refunded", + "apps.install.created", + "apps.install.deleted", + "apps.install.updated", "balance.available", "balance_settings.updated", "billing.alert.triggered", 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..a287a4696 --- /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`. A private app must be installed on `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..0b17bd1ac --- /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 app developers and embedding platforms, whose lists span the accounts that installed their app. + """ + 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. + """ + + +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/_feedback_option_create_params.py b/stripe/params/billing/_feedback_option_create_params.py index 5676db13f..dab92123a 100644 --- a/stripe/params/billing/_feedback_option_create_params.py +++ b/stripe/params/billing/_feedback_option_create_params.py @@ -7,6 +7,9 @@ class FeedbackOptionCreateParams(RequestOptions): description: str + """ + The text of the feedback option, which customers see when canceling. Maximum 100 characters. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. diff --git a/stripe/params/billing/_feedback_option_modify_params.py b/stripe/params/billing/_feedback_option_modify_params.py index a84f24863..6a55d21b2 100644 --- a/stripe/params/billing/_feedback_option_modify_params.py +++ b/stripe/params/billing/_feedback_option_modify_params.py @@ -7,6 +7,9 @@ class FeedbackOptionModifyParams(RequestOptions): description: NotRequired[str] + """ + The text of the feedback option, which customers see when canceling. Maximum 100 characters. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. diff --git a/stripe/params/billing/_feedback_option_update_params.py b/stripe/params/billing/_feedback_option_update_params.py index 29704b4a7..36a6bdee1 100644 --- a/stripe/params/billing/_feedback_option_update_params.py +++ b/stripe/params/billing/_feedback_option_update_params.py @@ -6,6 +6,9 @@ class FeedbackOptionUpdateParams(TypedDict): description: NotRequired[str] + """ + The text of the feedback option, which customers see when canceling. Maximum 100 characters. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. diff --git a/stripe/params/checkout/__init__.py b/stripe/params/checkout/__init__.py index 0c865ab53..79199601b 100644 --- a/stripe/params/checkout/__init__.py +++ b/stripe/params/checkout/__init__.py @@ -38,6 +38,7 @@ SessionCreateParamsLineItemAdjustableQuantity as SessionCreateParamsLineItemAdjustableQuantity, SessionCreateParamsLineItemPriceData as SessionCreateParamsLineItemPriceData, SessionCreateParamsLineItemPriceDataProductData as SessionCreateParamsLineItemPriceDataProductData, + SessionCreateParamsLineItemPriceDataProductDataTaxDetails as SessionCreateParamsLineItemPriceDataProductDataTaxDetails, SessionCreateParamsLineItemPriceDataRecurring as SessionCreateParamsLineItemPriceDataRecurring, SessionCreateParamsManagedPayments as SessionCreateParamsManagedPayments, SessionCreateParamsNameCollection as SessionCreateParamsNameCollection, @@ -63,6 +64,8 @@ SessionCreateParamsPaymentMethodOptionsBacsDebitMandateOptions as SessionCreateParamsPaymentMethodOptionsBacsDebitMandateOptions, SessionCreateParamsPaymentMethodOptionsBancontact as SessionCreateParamsPaymentMethodOptionsBancontact, SessionCreateParamsPaymentMethodOptionsBillie as SessionCreateParamsPaymentMethodOptionsBillie, + SessionCreateParamsPaymentMethodOptionsBlik as SessionCreateParamsPaymentMethodOptionsBlik, + SessionCreateParamsPaymentMethodOptionsBlikMandateOptions as SessionCreateParamsPaymentMethodOptionsBlikMandateOptions, SessionCreateParamsPaymentMethodOptionsBoleto as SessionCreateParamsPaymentMethodOptionsBoleto, SessionCreateParamsPaymentMethodOptionsCard as SessionCreateParamsPaymentMethodOptionsCard, SessionCreateParamsPaymentMethodOptionsCardInstallments as SessionCreateParamsPaymentMethodOptionsCardInstallments, @@ -104,6 +107,7 @@ SessionCreateParamsPaymentMethodOptionsScalapay as SessionCreateParamsPaymentMethodOptionsScalapay, SessionCreateParamsPaymentMethodOptionsSepaDebit as SessionCreateParamsPaymentMethodOptionsSepaDebit, SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions as SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions, + SessionCreateParamsPaymentMethodOptionsSequra as SessionCreateParamsPaymentMethodOptionsSequra, SessionCreateParamsPaymentMethodOptionsSofort as SessionCreateParamsPaymentMethodOptionsSofort, SessionCreateParamsPaymentMethodOptionsSunbit as SessionCreateParamsPaymentMethodOptionsSunbit, SessionCreateParamsPaymentMethodOptionsSwish as SessionCreateParamsPaymentMethodOptionsSwish, @@ -162,6 +166,7 @@ SessionModifyParamsLineItemAdjustableQuantity as SessionModifyParamsLineItemAdjustableQuantity, SessionModifyParamsLineItemPriceData as SessionModifyParamsLineItemPriceData, SessionModifyParamsLineItemPriceDataProductData as SessionModifyParamsLineItemPriceDataProductData, + SessionModifyParamsLineItemPriceDataProductDataTaxDetails as SessionModifyParamsLineItemPriceDataProductDataTaxDetails, SessionModifyParamsLineItemPriceDataRecurring as SessionModifyParamsLineItemPriceDataRecurring, SessionModifyParamsShippingOption as SessionModifyParamsShippingOption, SessionModifyParamsShippingOptionShippingRateData as SessionModifyParamsShippingOptionShippingRateData, @@ -183,6 +188,7 @@ SessionUpdateParamsLineItemAdjustableQuantity as SessionUpdateParamsLineItemAdjustableQuantity, SessionUpdateParamsLineItemPriceData as SessionUpdateParamsLineItemPriceData, SessionUpdateParamsLineItemPriceDataProductData as SessionUpdateParamsLineItemPriceDataProductData, + SessionUpdateParamsLineItemPriceDataProductDataTaxDetails as SessionUpdateParamsLineItemPriceDataProductDataTaxDetails, SessionUpdateParamsLineItemPriceDataRecurring as SessionUpdateParamsLineItemPriceDataRecurring, SessionUpdateParamsShippingOption as SessionUpdateParamsShippingOption, SessionUpdateParamsShippingOptionShippingRateData as SessionUpdateParamsShippingOptionShippingRateData, @@ -327,6 +333,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsLineItemPriceDataProductDataTaxDetails": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsLineItemPriceDataRecurring": ( "stripe.params.checkout._session_create_params", False, @@ -427,6 +437,14 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsPaymentMethodOptionsBlik": ( + "stripe.params.checkout._session_create_params", + False, + ), + "SessionCreateParamsPaymentMethodOptionsBlikMandateOptions": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsPaymentMethodOptionsBoleto": ( "stripe.params.checkout._session_create_params", False, @@ -591,6 +609,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsPaymentMethodOptionsSequra": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsPaymentMethodOptionsSofort": ( "stripe.params.checkout._session_create_params", False, @@ -783,6 +805,10 @@ "stripe.params.checkout._session_modify_params", False, ), + "SessionModifyParamsLineItemPriceDataProductDataTaxDetails": ( + "stripe.params.checkout._session_modify_params", + False, + ), "SessionModifyParamsLineItemPriceDataRecurring": ( "stripe.params.checkout._session_modify_params", False, @@ -851,6 +877,10 @@ "stripe.params.checkout._session_update_params", False, ), + "SessionUpdateParamsLineItemPriceDataProductDataTaxDetails": ( + "stripe.params.checkout._session_update_params", + False, + ), "SessionUpdateParamsLineItemPriceDataRecurring": ( "stripe.params.checkout._session_update_params", False, diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index 1d54e48f7..25f5ad922 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -20,6 +20,78 @@ 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", + "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", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "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. + """ automatic_tax: NotRequired["SessionCreateParamsAutomaticTax"] """ Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. @@ -52,11 +124,11 @@ 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_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] """ @@ -145,6 +217,7 @@ class SessionCreateParams(RequestOptions): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -153,6 +226,7 @@ class SessionCreateParams(RequestOptions): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -229,7 +303,7 @@ class SessionCreateParams(RequestOptions): For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices. - You can't set this parameter if `ui_mode` is `custom`. + You can't set this parameter if `ui_mode` is `elements` or `form`. """ origin_context: NotRequired["Literal['mobile_app', 'web']|str"] """ @@ -264,85 +338,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", - "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", - "payto", - "pix", - "promptpay", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "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`. """ @@ -627,7 +625,7 @@ class SessionCreateParamsCustomFieldDropdownOption(TypedDict): class SessionCreateParamsCustomFieldLabel(TypedDict): custom: str """ - Custom text for the label, displayed to the customer. Up to 50 characters. + Custom text for the label, displayed to the customer. Up to 100 characters. """ type: Literal["custom"] """ @@ -927,12 +925,29 @@ class SessionCreateParamsLineItemPriceDataProductData(TypedDict): """ A [tax code](https://docs.stripe.com/tax/tax-categories) ID. """ + tax_details: NotRequired[ + "SessionCreateParamsLineItemPriceDataProductDataTaxDetails" + ] + """ + Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location. + """ unit_label: NotRequired[str] """ A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. """ +class SessionCreateParamsLineItemPriceDataProductDataTaxDetails(TypedDict): + performance_location: NotRequired[str] + """ + A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://docs.stripe.com/tax/tax-categories) ID. + """ + + class SessionCreateParamsLineItemPriceDataRecurring(TypedDict): interval: Union[Literal["day", "month", "week", "year"], str] """ @@ -1206,6 +1221,10 @@ class SessionCreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Billie payment method options. """ + blik: NotRequired["SessionCreateParamsPaymentMethodOptionsBlik"] + """ + contains details about the BLIK payment method options. + """ boleto: NotRequired["SessionCreateParamsPaymentMethodOptionsBoleto"] """ contains details about the Boleto payment method options. @@ -1344,6 +1363,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. @@ -1565,7 +1588,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. @@ -1584,6 +1607,25 @@ class SessionCreateParamsPaymentMethodOptionsBillie(TypedDict): """ +class SessionCreateParamsPaymentMethodOptionsBlik(TypedDict): + mandate_options: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsBlikMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']|str" + ] + + +class SessionCreateParamsPaymentMethodOptionsBlikMandateOptions(TypedDict): + 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. + """ + + class SessionCreateParamsPaymentMethodOptionsBoleto(TypedDict): expires_after_days: NotRequired[int] """ @@ -1644,7 +1686,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"] """ @@ -2365,6 +2407,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"]] """ @@ -3136,7 +3185,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 15156068e..fa0dc6ba4 100644 --- a/stripe/params/checkout/_session_modify_params.py +++ b/stripe/params/checkout/_session_modify_params.py @@ -12,7 +12,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. """ expand: NotRequired[List[str]] """ @@ -201,12 +201,29 @@ class SessionModifyParamsLineItemPriceDataProductData(TypedDict): """ A [tax code](https://docs.stripe.com/tax/tax-categories) ID. """ + tax_details: NotRequired[ + "SessionModifyParamsLineItemPriceDataProductDataTaxDetails" + ] + """ + Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location. + """ unit_label: NotRequired[str] """ A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. """ +class SessionModifyParamsLineItemPriceDataProductDataTaxDetails(TypedDict): + performance_location: NotRequired[str] + """ + A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://docs.stripe.com/tax/tax-categories) ID. + """ + + class SessionModifyParamsLineItemPriceDataRecurring(TypedDict): interval: Union[Literal["day", "month", "week", "year"], str] """ diff --git a/stripe/params/checkout/_session_update_params.py b/stripe/params/checkout/_session_update_params.py index f00cb9a73..17b2c7f9e 100644 --- a/stripe/params/checkout/_session_update_params.py +++ b/stripe/params/checkout/_session_update_params.py @@ -11,7 +11,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. """ expand: NotRequired[List[str]] """ @@ -200,12 +200,29 @@ class SessionUpdateParamsLineItemPriceDataProductData(TypedDict): """ A [tax code](https://docs.stripe.com/tax/tax-categories) ID. """ + tax_details: NotRequired[ + "SessionUpdateParamsLineItemPriceDataProductDataTaxDetails" + ] + """ + Tax details for this product, including the [tax code](https://docs.stripe.com/tax/tax-codes) and an optional performance location. + """ unit_label: NotRequired[str] """ A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. """ +class SessionUpdateParamsLineItemPriceDataProductDataTaxDetails(TypedDict): + performance_location: NotRequired[str] + """ + A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://docs.stripe.com/tax/tax-categories) ID. + """ + + class SessionUpdateParamsLineItemPriceDataRecurring(TypedDict): interval: Union[Literal["day", "month", "week", "year"], str] """ diff --git a/stripe/params/financial_connections/_session_create_params.py b/stripe/params/financial_connections/_session_create_params.py index 79c8747af..24d366262 100644 --- a/stripe/params/financial_connections/_session_create_params.py +++ b/stripe/params/financial_connections/_session_create_params.py @@ -86,9 +86,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 collect accounts. + Country from which to collect accounts. """ require_payment_method_support: NotRequired[ Literal["all", "at_least_one", "none"] diff --git a/stripe/params/issuing/_cardholder_create_params.py b/stripe/params/issuing/_cardholder_create_params.py index e20d2baa8..ff353f286 100644 --- a/stripe/params/issuing/_cardholder_create_params.py +++ b/stripe/params/issuing/_cardholder_create_params.py @@ -177,11 +177,11 @@ class CardholderCreateParamsIndividualVerification(TypedDict): class CardholderCreateParamsIndividualVerificationDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. """ diff --git a/stripe/params/issuing/_cardholder_modify_params.py b/stripe/params/issuing/_cardholder_modify_params.py index 0965a2c61..34ab02be9 100644 --- a/stripe/params/issuing/_cardholder_modify_params.py +++ b/stripe/params/issuing/_cardholder_modify_params.py @@ -169,11 +169,11 @@ class CardholderModifyParamsIndividualVerification(TypedDict): class CardholderModifyParamsIndividualVerificationDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. """ diff --git a/stripe/params/issuing/_cardholder_update_params.py b/stripe/params/issuing/_cardholder_update_params.py index 4bb2ad334..874184977 100644 --- a/stripe/params/issuing/_cardholder_update_params.py +++ b/stripe/params/issuing/_cardholder_update_params.py @@ -168,11 +168,11 @@ class CardholderUpdateParamsIndividualVerification(TypedDict): class CardholderUpdateParamsIndividualVerificationDocument(TypedDict): back: NotRequired[str] """ - The back of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. + The back of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. """ front: NotRequired[str] """ - The front of an ID returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `identity_document`. + The front of an ID returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `identity_document`. """ diff --git a/stripe/params/product_catalog/__init__.py b/stripe/params/product_catalog/__init__.py new file mode 100644 index 000000000..3ad2e93c2 --- /dev/null +++ b/stripe/params/product_catalog/__init__.py @@ -0,0 +1,85 @@ +# -*- 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.product_catalog._trial_offer_create_params import ( + TrialOfferCreateParams as TrialOfferCreateParams, + TrialOfferCreateParamsDuration as TrialOfferCreateParamsDuration, + TrialOfferCreateParamsDurationRelative as TrialOfferCreateParamsDurationRelative, + TrialOfferCreateParamsEndBehavior as TrialOfferCreateParamsEndBehavior, + TrialOfferCreateParamsEndBehaviorTransition as TrialOfferCreateParamsEndBehaviorTransition, + ) + from stripe.params.product_catalog._trial_offer_list_params import ( + TrialOfferListParams as TrialOfferListParams, + TrialOfferListParamsCreated as TrialOfferListParamsCreated, + ) + from stripe.params.product_catalog._trial_offer_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 = { + "TrialOfferCreateParams": ( + "stripe.params.product_catalog._trial_offer_create_params", + False, + ), + "TrialOfferCreateParamsDuration": ( + "stripe.params.product_catalog._trial_offer_create_params", + False, + ), + "TrialOfferCreateParamsDurationRelative": ( + "stripe.params.product_catalog._trial_offer_create_params", + False, + ), + "TrialOfferCreateParamsEndBehavior": ( + "stripe.params.product_catalog._trial_offer_create_params", + False, + ), + "TrialOfferCreateParamsEndBehaviorTransition": ( + "stripe.params.product_catalog._trial_offer_create_params", + False, + ), + "TrialOfferListParams": ( + "stripe.params.product_catalog._trial_offer_list_params", + False, + ), + "TrialOfferListParamsCreated": ( + "stripe.params.product_catalog._trial_offer_list_params", + False, + ), + "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: + + 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/product_catalog/_trial_offer_create_params.py b/stripe/params/product_catalog/_trial_offer_create_params.py new file mode 100644 index 000000000..34fdda067 --- /dev/null +++ b/stripe/params/product_catalog/_trial_offer_create_params.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +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. + """ + end_behavior: "TrialOfferCreateParamsEndBehavior" + """ + Define behavior that occurs at the end of the trial. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + nickname: NotRequired[str] + """ + A brief description of the trial offer, hidden from customers. + """ + price: str + """ + Price configuration during the trial period (amount, billing scheme, etc). + """ + + +class TrialOfferCreateParamsDuration(TypedDict): + relative: NotRequired["TrialOfferCreateParamsDurationRelative"] + """ + The relative duration of the trial period computed as the number of recurring price intervals. + """ + type: Union[Literal["relative"], str] + """ + Specifies how the trial offer duration is determined. + """ + + +class TrialOfferCreateParamsDurationRelative(TypedDict): + iterations: int + """ + The number of recurring price's interval to apply for the trial period. + """ + + +class TrialOfferCreateParamsEndBehavior(TypedDict): + transition: "TrialOfferCreateParamsEndBehaviorTransition" + """ + The transition to apply when the trial offer ends. + """ + + +class TrialOfferCreateParamsEndBehaviorTransition(TypedDict): + price: str + """ + The price to transition the recurring item to when the trial offer ends. + """ diff --git a/stripe/params/product_catalog/_trial_offer_list_params.py b/stripe/params/product_catalog/_trial_offer_list_params.py new file mode 100644 index 000000000..0ff6b9759 --- /dev/null +++ b/stripe/params/product_catalog/_trial_offer_list_params.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class TrialOfferListParams(RequestOptions): + active: NotRequired[bool] + """ + Only return trial offers that are active (`true`) or archived (`false`). If omitted, both active and archived trial offers are returned. + """ + created: NotRequired["TrialOfferListParamsCreated|int"] + """ + Only return trial offers that were created during the given date interval. + """ + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + prices: NotRequired[List[str]] + """ + Only return trial offers that reference these prices (during the trial period). + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ + + +class TrialOfferListParamsCreated(TypedDict): + gt: NotRequired[int] + """ + Minimum value to filter by (exclusive) + """ + gte: NotRequired[int] + """ + Minimum value to filter by (inclusive) + """ + lt: NotRequired[int] + """ + Maximum value to filter by (exclusive) + """ + lte: NotRequired[int] + """ + Maximum value to filter by (inclusive) + """ diff --git a/stripe/params/product_catalog/_trial_offer_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_retrieve_params.py b/stripe/params/product_catalog/_trial_offer_retrieve_params.py new file mode 100644 index 000000000..ea22d8d8e --- /dev/null +++ b/stripe/params/product_catalog/_trial_offer_retrieve_params.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class TrialOfferRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/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/_payment_evaluation_create_params.py b/stripe/params/radar/_payment_evaluation_create_params.py index b575ad3a3..bc2360774 100644 --- a/stripe/params/radar/_payment_evaluation_create_params.py +++ b/stripe/params/radar/_payment_evaluation_create_params.py @@ -105,11 +105,11 @@ class PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetails( "PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsCard" ] """ - Describes card money movement details for the payment evaluation. + Describes card money movement details. """ money_movement_type: Literal["card"] """ - Describes the type of money movement. Currently only `card` is supported. + Describes the type of money movement. """ diff --git a/stripe/params/tax/__init__.py b/stripe/params/tax/__init__.py index bb07a15ce..4eec90bd0 100644 --- a/stripe/params/tax/__init__.py +++ b/stripe/params/tax/__init__.py @@ -26,6 +26,16 @@ from stripe.params.tax._calculation_retrieve_params import ( CalculationRetrieveParams as CalculationRetrieveParams, ) + from stripe.params.tax._location_create_params import ( + LocationCreateParams as LocationCreateParams, + LocationCreateParamsAddress as LocationCreateParamsAddress, + ) + from stripe.params.tax._location_list_params import ( + LocationListParams as LocationListParams, + ) + from stripe.params.tax._location_retrieve_params import ( + LocationRetrieveParams as LocationRetrieveParams, + ) from stripe.params.tax._registration_create_params import ( RegistrationCreateParams as RegistrationCreateParams, RegistrationCreateParamsCountryOptions as RegistrationCreateParamsCountryOptions, @@ -37,7 +47,6 @@ RegistrationCreateParamsCountryOptionsAo as RegistrationCreateParamsCountryOptionsAo, RegistrationCreateParamsCountryOptionsAoStandard as RegistrationCreateParamsCountryOptionsAoStandard, RegistrationCreateParamsCountryOptionsAt as RegistrationCreateParamsCountryOptionsAt, - RegistrationCreateParamsCountryOptionsAtIgic as RegistrationCreateParamsCountryOptionsAtIgic, RegistrationCreateParamsCountryOptionsAtStandard as RegistrationCreateParamsCountryOptionsAtStandard, RegistrationCreateParamsCountryOptionsAu as RegistrationCreateParamsCountryOptionsAu, RegistrationCreateParamsCountryOptionsAuStandard as RegistrationCreateParamsCountryOptionsAuStandard, @@ -51,12 +60,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, @@ -76,32 +83,24 @@ 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, - RegistrationCreateParamsCountryOptionsEsIgic as RegistrationCreateParamsCountryOptionsEsIgic, RegistrationCreateParamsCountryOptionsEsStandard as RegistrationCreateParamsCountryOptionsEsStandard, 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, @@ -109,23 +108,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, @@ -137,13 +131,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, @@ -154,13 +145,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, @@ -172,28 +161,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, @@ -206,12 +189,20 @@ RegistrationCreateParamsCountryOptionsUa as RegistrationCreateParamsCountryOptionsUa, RegistrationCreateParamsCountryOptionsUg as RegistrationCreateParamsCountryOptionsUg, RegistrationCreateParamsCountryOptionsUs as RegistrationCreateParamsCountryOptionsUs, + RegistrationCreateParamsCountryOptionsUsAdmissionsTax as RegistrationCreateParamsCountryOptionsUsAdmissionsTax, + RegistrationCreateParamsCountryOptionsUsAttendanceTax as RegistrationCreateParamsCountryOptionsUsAttendanceTax, + RegistrationCreateParamsCountryOptionsUsEntertainmentTax as RegistrationCreateParamsCountryOptionsUsEntertainmentTax, + RegistrationCreateParamsCountryOptionsUsGrossReceiptsTax as RegistrationCreateParamsCountryOptionsUsGrossReceiptsTax, + RegistrationCreateParamsCountryOptionsUsHospitalityTax as RegistrationCreateParamsCountryOptionsUsHospitalityTax, RegistrationCreateParamsCountryOptionsUsLocalAmusementTax as RegistrationCreateParamsCountryOptionsUsLocalAmusementTax, RegistrationCreateParamsCountryOptionsUsLocalLeaseTax as RegistrationCreateParamsCountryOptionsUsLocalLeaseTax, + RegistrationCreateParamsCountryOptionsUsLuxuryTax as RegistrationCreateParamsCountryOptionsUsLuxuryTax, RegistrationCreateParamsCountryOptionsUsMassTransitParkingTax as RegistrationCreateParamsCountryOptionsUsMassTransitParkingTax, RegistrationCreateParamsCountryOptionsUsParkingTax as RegistrationCreateParamsCountryOptionsUsParkingTax, + RegistrationCreateParamsCountryOptionsUsResortTax as RegistrationCreateParamsCountryOptionsUsResortTax, RegistrationCreateParamsCountryOptionsUsStateSalesTax as RegistrationCreateParamsCountryOptionsUsStateSalesTax, RegistrationCreateParamsCountryOptionsUsStateSalesTaxElection as RegistrationCreateParamsCountryOptionsUsStateSalesTaxElection, + RegistrationCreateParamsCountryOptionsUsTourismTax as RegistrationCreateParamsCountryOptionsUsTourismTax, RegistrationCreateParamsCountryOptionsUy as RegistrationCreateParamsCountryOptionsUy, RegistrationCreateParamsCountryOptionsUyStandard as RegistrationCreateParamsCountryOptionsUyStandard, RegistrationCreateParamsCountryOptionsUz as RegistrationCreateParamsCountryOptionsUz, @@ -317,6 +308,19 @@ "stripe.params.tax._calculation_retrieve_params", False, ), + "LocationCreateParams": ( + "stripe.params.tax._location_create_params", + False, + ), + "LocationCreateParamsAddress": ( + "stripe.params.tax._location_create_params", + False, + ), + "LocationListParams": ("stripe.params.tax._location_list_params", False), + "LocationRetrieveParams": ( + "stripe.params.tax._location_retrieve_params", + False, + ), "RegistrationCreateParams": ( "stripe.params.tax._registration_create_params", False, @@ -357,10 +361,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsAtIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsAtStandard": ( "stripe.params.tax._registration_create_params", False, @@ -413,10 +413,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsBeIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsBeStandard": ( "stripe.params.tax._registration_create_params", False, @@ -433,10 +429,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsBgIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsBgStandard": ( "stripe.params.tax._registration_create_params", False, @@ -513,10 +505,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsCyIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsCyStandard": ( "stripe.params.tax._registration_create_params", False, @@ -525,10 +513,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsCzIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsCzStandard": ( "stripe.params.tax._registration_create_params", False, @@ -537,10 +521,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsDeIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsDeStandard": ( "stripe.params.tax._registration_create_params", False, @@ -549,10 +529,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsDkIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsDkStandard": ( "stripe.params.tax._registration_create_params", False, @@ -565,10 +541,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsEeIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsEeStandard": ( "stripe.params.tax._registration_create_params", False, @@ -581,10 +553,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsEsIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsEsStandard": ( "stripe.params.tax._registration_create_params", False, @@ -601,10 +569,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsFiIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsFiStandard": ( "stripe.params.tax._registration_create_params", False, @@ -613,10 +577,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsFrIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsFrStandard": ( "stripe.params.tax._registration_create_params", False, @@ -645,10 +605,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsGrIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsGrStandard": ( "stripe.params.tax._registration_create_params", False, @@ -657,10 +613,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsHrIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsHrStandard": ( "stripe.params.tax._registration_create_params", False, @@ -669,10 +621,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsHuIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsHuStandard": ( "stripe.params.tax._registration_create_params", False, @@ -685,10 +633,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsIeIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsIeStandard": ( "stripe.params.tax._registration_create_params", False, @@ -709,10 +653,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsItIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsItStandard": ( "stripe.params.tax._registration_create_params", False, @@ -757,10 +697,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsLtIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsLtStandard": ( "stripe.params.tax._registration_create_params", False, @@ -769,10 +705,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsLuIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsLuStandard": ( "stripe.params.tax._registration_create_params", False, @@ -781,10 +713,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsLvIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsLvStandard": ( "stripe.params.tax._registration_create_params", False, @@ -825,10 +753,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsMtIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsMtStandard": ( "stripe.params.tax._registration_create_params", False, @@ -849,10 +773,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsNlIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsNlStandard": ( "stripe.params.tax._registration_create_params", False, @@ -897,10 +817,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsPlIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsPlStandard": ( "stripe.params.tax._registration_create_params", False, @@ -909,10 +825,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsPtIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsPtStandard": ( "stripe.params.tax._registration_create_params", False, @@ -921,10 +833,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsRoIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsRoStandard": ( "stripe.params.tax._registration_create_params", False, @@ -949,10 +857,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsSeIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsSeStandard": ( "stripe.params.tax._registration_create_params", False, @@ -969,10 +873,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsSiIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsSiStandard": ( "stripe.params.tax._registration_create_params", False, @@ -981,10 +881,6 @@ "stripe.params.tax._registration_create_params", False, ), - "RegistrationCreateParamsCountryOptionsSkIgic": ( - "stripe.params.tax._registration_create_params", - False, - ), "RegistrationCreateParamsCountryOptionsSkStandard": ( "stripe.params.tax._registration_create_params", False, @@ -1033,6 +929,26 @@ "stripe.params.tax._registration_create_params", False, ), + "RegistrationCreateParamsCountryOptionsUsAdmissionsTax": ( + "stripe.params.tax._registration_create_params", + False, + ), + "RegistrationCreateParamsCountryOptionsUsAttendanceTax": ( + "stripe.params.tax._registration_create_params", + False, + ), + "RegistrationCreateParamsCountryOptionsUsEntertainmentTax": ( + "stripe.params.tax._registration_create_params", + False, + ), + "RegistrationCreateParamsCountryOptionsUsGrossReceiptsTax": ( + "stripe.params.tax._registration_create_params", + False, + ), + "RegistrationCreateParamsCountryOptionsUsHospitalityTax": ( + "stripe.params.tax._registration_create_params", + False, + ), "RegistrationCreateParamsCountryOptionsUsLocalAmusementTax": ( "stripe.params.tax._registration_create_params", False, @@ -1041,6 +957,10 @@ "stripe.params.tax._registration_create_params", False, ), + "RegistrationCreateParamsCountryOptionsUsLuxuryTax": ( + "stripe.params.tax._registration_create_params", + False, + ), "RegistrationCreateParamsCountryOptionsUsMassTransitParkingTax": ( "stripe.params.tax._registration_create_params", False, @@ -1049,6 +969,10 @@ "stripe.params.tax._registration_create_params", False, ), + "RegistrationCreateParamsCountryOptionsUsResortTax": ( + "stripe.params.tax._registration_create_params", + False, + ), "RegistrationCreateParamsCountryOptionsUsStateSalesTax": ( "stripe.params.tax._registration_create_params", False, @@ -1057,6 +981,10 @@ "stripe.params.tax._registration_create_params", False, ), + "RegistrationCreateParamsCountryOptionsUsTourismTax": ( + "stripe.params.tax._registration_create_params", + False, + ), "RegistrationCreateParamsCountryOptionsUy": ( "stripe.params.tax._registration_create_params", False, diff --git a/stripe/params/tax/_calculation_create_params.py b/stripe/params/tax/_calculation_create_params.py index 59e5c3e13..44ea1631e 100644 --- a/stripe/params/tax/_calculation_create_params.py +++ b/stripe/params/tax/_calculation_create_params.py @@ -235,6 +235,10 @@ class CalculationCreateParamsLineItem(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. """ + performance_location: NotRequired[str] + """ + A tax location ID. Depending on the [tax code](https://docs.stripe.com/tax/tax-for-tickets/reference/tax-location-performance), this is required, optional, or not supported. + """ product: NotRequired[str] """ If provided, the product's `tax_code` will be used as the line item's `tax_code`. diff --git a/stripe/params/tax/_location_create_params.py b/stripe/params/tax/_location_create_params.py new file mode 100644 index 000000000..8aa5abfca --- /dev/null +++ b/stripe/params/tax/_location_create_params.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class LocationCreateParams(RequestOptions): + address: "LocationCreateParamsAddress" + """ + The physical address of the tax location. + """ + description: NotRequired[str] + """ + Details to identify the tax location by its venue, types of events held, or available services, such as "A spacious auditorium suitable for large concerts and events.". + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + type: Literal["performance"] + """ + The type of tax location. The only supported value is "performance". + """ + + +class LocationCreateParamsAddress(TypedDict): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: str + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired["Literal['']|str"] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired["Literal['']|str"] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired["Literal['']|str"] + """ + ZIP or postal code. + """ + state: NotRequired["Literal['']|str"] + """ + State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix, such as "NY" or "TX". + """ diff --git a/stripe/params/tax/_location_list_params.py b/stripe/params/tax/_location_list_params.py new file mode 100644 index 000000000..cbe266706 --- /dev/null +++ b/stripe/params/tax/_location_list_params.py @@ -0,0 +1,28 @@ +# -*- 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 LocationListParams(RequestOptions): + 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. + """ + type: Literal["performance"] + """ + Type of the tax location. Currently the only option is `performance`. + """ diff --git a/stripe/params/tax/_location_retrieve_params.py b/stripe/params/tax/_location_retrieve_params.py new file mode 100644 index 000000000..107563bb5 --- /dev/null +++ b/stripe/params/tax/_location_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 LocationRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/tax/_registration_create_params.py b/stripe/params/tax/_registration_create_params.py index aaee80a77..38f814bfa 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 @@ -1044,24 +956,13 @@ class RegistrationCreateParamsCountryOptionsEg(TypedDict): class RegistrationCreateParamsCountryOptionsEs(TypedDict): - igic: NotRequired["RegistrationCreateParamsCountryOptionsEsIgic"] - """ - Options for the IGIC registration. - """ standard: NotRequired["RegistrationCreateParamsCountryOptionsEsStandard"] """ Options for the standard registration. """ type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ - Type of registration to be created in an EU country. - """ - - -class RegistrationCreateParamsCountryOptionsEsIgic(TypedDict): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. + Type of registration to be created in ES. """ @@ -1095,10 +996,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 +1006,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 +1016,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 +1026,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 +1083,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 +1093,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 +1103,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 +1113,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 +1123,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 +1133,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 +1150,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 +1160,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 +1197,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 +1207,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 +1286,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 +1296,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 +1306,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 +1316,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 +1326,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 +1336,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 +1420,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 +1430,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 +1461,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 +1471,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 +1562,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 +1572,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 +1582,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 +1592,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 +1602,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 +1612,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 +1656,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 +1666,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 +1696,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 +1706,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 +1716,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 +1726,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 @@ -2109,6 +1812,36 @@ class RegistrationCreateParamsCountryOptionsUg(TypedDict): class RegistrationCreateParamsCountryOptionsUs(TypedDict): + admissions_tax: NotRequired[ + "RegistrationCreateParamsCountryOptionsUsAdmissionsTax" + ] + """ + Options for the admission tax registration. + """ + attendance_tax: NotRequired[ + "RegistrationCreateParamsCountryOptionsUsAttendanceTax" + ] + """ + Options for the attendance tax registration. + """ + entertainment_tax: NotRequired[ + "RegistrationCreateParamsCountryOptionsUsEntertainmentTax" + ] + """ + Options for the entertainment tax registration. + """ + gross_receipts_tax: NotRequired[ + "RegistrationCreateParamsCountryOptionsUsGrossReceiptsTax" + ] + """ + Options for the gross receipts tax registration. + """ + hospitality_tax: NotRequired[ + "RegistrationCreateParamsCountryOptionsUsHospitalityTax" + ] + """ + Options for the hospitality tax registration. + """ local_amusement_tax: NotRequired[ "RegistrationCreateParamsCountryOptionsUsLocalAmusementTax" ] @@ -2121,6 +1854,12 @@ class RegistrationCreateParamsCountryOptionsUs(TypedDict): """ Options for the local lease tax registration. """ + luxury_tax: NotRequired[ + "RegistrationCreateParamsCountryOptionsUsLuxuryTax" + ] + """ + Options for the luxury tax registration. + """ mass_transit_parking_tax: NotRequired[ "RegistrationCreateParamsCountryOptionsUsMassTransitParkingTax" ] @@ -2133,6 +1872,12 @@ class RegistrationCreateParamsCountryOptionsUs(TypedDict): """ Options for the parking tax registration. """ + resort_tax: NotRequired[ + "RegistrationCreateParamsCountryOptionsUsResortTax" + ] + """ + Options for the resort tax registration. + """ state: str """ Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). @@ -2143,15 +1888,29 @@ class RegistrationCreateParamsCountryOptionsUs(TypedDict): """ Options for the state sales tax registration. """ + tourism_tax: NotRequired[ + "RegistrationCreateParamsCountryOptionsUsTourismTax" + ] + """ + Options for the tourism tax registration. + """ type: Union[ Literal[ + "admissions_tax", + "attendance_tax", + "entertainment_tax", + "gross_receipts_tax", + "hospitality_tax", "local_amusement_tax", "local_lease_tax", + "luxury_tax", "mass_transit_parking_tax", "parking_tax", + "resort_tax", "state_communications_tax", "state_retail_delivery_fee", "state_sales_tax", + "tourism_tax", ], str, ] @@ -2160,6 +1919,41 @@ class RegistrationCreateParamsCountryOptionsUs(TypedDict): """ +class RegistrationCreateParamsCountryOptionsUsAdmissionsTax(TypedDict): + jurisdiction: str + """ + A jurisdiction code representing the [local jurisdiction](https://docs.stripe.com/tax/registering?type=admissions_tax#registration-types). + """ + + +class RegistrationCreateParamsCountryOptionsUsAttendanceTax(TypedDict): + jurisdiction: str + """ + A jurisdiction code representing the [local jurisdiction](https://docs.stripe.com/tax/registering?type=attendance_tax#registration-types). + """ + + +class RegistrationCreateParamsCountryOptionsUsEntertainmentTax(TypedDict): + jurisdiction: str + """ + A jurisdiction code representing the [local jurisdiction](https://docs.stripe.com/tax/registering?type=entertainment_tax#registration-types). + """ + + +class RegistrationCreateParamsCountryOptionsUsGrossReceiptsTax(TypedDict): + jurisdiction: str + """ + A jurisdiction code representing the [local jurisdiction](https://docs.stripe.com/tax/registering?type=gross_receipts_tax#registration-types). + """ + + +class RegistrationCreateParamsCountryOptionsUsHospitalityTax(TypedDict): + jurisdiction: str + """ + A jurisdiction code representing the [local jurisdiction](https://docs.stripe.com/tax/registering?type=hospitality_tax#registration-types). + """ + + class RegistrationCreateParamsCountryOptionsUsLocalAmusementTax(TypedDict): jurisdiction: str """ @@ -2174,6 +1968,13 @@ class RegistrationCreateParamsCountryOptionsUsLocalLeaseTax(TypedDict): """ +class RegistrationCreateParamsCountryOptionsUsLuxuryTax(TypedDict): + jurisdiction: str + """ + A jurisdiction code representing the [local jurisdiction](https://docs.stripe.com/tax/registering?type=luxury_tax#registration-types). + """ + + class RegistrationCreateParamsCountryOptionsUsMassTransitParkingTax(TypedDict): jurisdiction: str """ @@ -2188,6 +1989,13 @@ class RegistrationCreateParamsCountryOptionsUsParkingTax(TypedDict): """ +class RegistrationCreateParamsCountryOptionsUsResortTax(TypedDict): + jurisdiction: str + """ + A jurisdiction code representing the [local jurisdiction](https://docs.stripe.com/tax/registering?type=resort_tax#registration-types). + """ + + class RegistrationCreateParamsCountryOptionsUsStateSalesTax(TypedDict): elections: List[ "RegistrationCreateParamsCountryOptionsUsStateSalesTaxElection" @@ -2215,6 +2023,13 @@ class RegistrationCreateParamsCountryOptionsUsStateSalesTaxElection(TypedDict): """ +class RegistrationCreateParamsCountryOptionsUsTourismTax(TypedDict): + jurisdiction: str + """ + A jurisdiction code representing the [local jurisdiction](https://docs.stripe.com/tax/registering?type=tourism_tax#registration-types). + """ + + class RegistrationCreateParamsCountryOptionsUy(TypedDict): standard: NotRequired["RegistrationCreateParamsCountryOptionsUyStandard"] """ diff --git a/stripe/params/terminal/_configuration_create_params.py b/stripe/params/terminal/_configuration_create_params.py index 865ab6ee0..ab98b3b3a 100644 --- a/stripe/params/terminal/_configuration_create_params.py +++ b/stripe/params/terminal/_configuration_create_params.py @@ -89,14 +89,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 c3128f304..5e1566b42 100644 --- a/stripe/params/terminal/_configuration_modify_params.py +++ b/stripe/params/terminal/_configuration_modify_params.py @@ -105,14 +105,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 9cc30feda..bb627189b 100644 --- a/stripe/params/terminal/_configuration_update_params.py +++ b/stripe/params/terminal/_configuration_update_params.py @@ -104,14 +104,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/test_helpers/__init__.py b/stripe/params/test_helpers/__init__.py index ad5a16626..4514df315 100644 --- a/stripe/params/test_helpers/__init__.py +++ b/stripe/params/test_helpers/__init__.py @@ -53,6 +53,7 @@ ConfirmationTokenCreateParamsPaymentMethodDataPayco as ConfirmationTokenCreateParamsPaymentMethodDataPayco, ConfirmationTokenCreateParamsPaymentMethodDataPaynow as ConfirmationTokenCreateParamsPaymentMethodDataPaynow, ConfirmationTokenCreateParamsPaymentMethodDataPaypal as ConfirmationTokenCreateParamsPaymentMethodDataPaypal, + ConfirmationTokenCreateParamsPaymentMethodDataPaypay as ConfirmationTokenCreateParamsPaymentMethodDataPaypay, ConfirmationTokenCreateParamsPaymentMethodDataPayto as ConfirmationTokenCreateParamsPaymentMethodDataPayto, ConfirmationTokenCreateParamsPaymentMethodDataPix as ConfirmationTokenCreateParamsPaymentMethodDataPix, ConfirmationTokenCreateParamsPaymentMethodDataPromptpay as ConfirmationTokenCreateParamsPaymentMethodDataPromptpay, @@ -62,6 +63,7 @@ ConfirmationTokenCreateParamsPaymentMethodDataSatispay as ConfirmationTokenCreateParamsPaymentMethodDataSatispay, ConfirmationTokenCreateParamsPaymentMethodDataScalapay as ConfirmationTokenCreateParamsPaymentMethodDataScalapay, ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit as ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit, + ConfirmationTokenCreateParamsPaymentMethodDataSequra as ConfirmationTokenCreateParamsPaymentMethodDataSequra, ConfirmationTokenCreateParamsPaymentMethodDataSofort as ConfirmationTokenCreateParamsPaymentMethodDataSofort, ConfirmationTokenCreateParamsPaymentMethodDataSunbit as ConfirmationTokenCreateParamsPaymentMethodDataSunbit, ConfirmationTokenCreateParamsPaymentMethodDataSwish as ConfirmationTokenCreateParamsPaymentMethodDataSwish, @@ -277,6 +279,10 @@ "stripe.params.test_helpers._confirmation_token_create_params", False, ), + "ConfirmationTokenCreateParamsPaymentMethodDataPaypay": ( + "stripe.params.test_helpers._confirmation_token_create_params", + False, + ), "ConfirmationTokenCreateParamsPaymentMethodDataPayto": ( "stripe.params.test_helpers._confirmation_token_create_params", False, @@ -313,6 +319,10 @@ "stripe.params.test_helpers._confirmation_token_create_params", False, ), + "ConfirmationTokenCreateParamsPaymentMethodDataSequra": ( + "stripe.params.test_helpers._confirmation_token_create_params", + False, + ), "ConfirmationTokenCreateParamsPaymentMethodDataSofort": ( "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 490c475b6..c3bc193a7 100644 --- a/stripe/params/test_helpers/_confirmation_token_create_params.py +++ b/stripe/params/test_helpers/_confirmation_token_create_params.py @@ -71,13 +71,13 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ alma: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataAlma"] """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + If this is an Alma PaymentMethod, this hash contains details about the Alma payment method. """ amazon_pay: NotRequired[ "ConfirmationTokenCreateParamsPaymentMethodDataAmazonPay" ] """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. """ au_becs_debit: NotRequired[ "ConfirmationTokenCreateParamsPaymentMethodDataAuBecsDebit" @@ -249,6 +249,10 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. """ + paypay: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ payto: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPayto"] """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. @@ -299,6 +303,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. + """ sofort: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSofort"] """ If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. @@ -354,6 +362,7 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): "payco", "paynow", "paypal", + "paypay", "payto", "pix", "promptpay", @@ -362,6 +371,7 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", + "sequra", "sofort", "sunbit", "swish", @@ -726,6 +736,10 @@ class ConfirmationTokenCreateParamsPaymentMethodDataPaypal(TypedDict): pass +class ConfirmationTokenCreateParamsPaymentMethodDataPaypay(TypedDict): + pass + + class ConfirmationTokenCreateParamsPaymentMethodDataPayto(TypedDict): account_number: NotRequired[str] """ @@ -779,6 +793,10 @@ class ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit(TypedDict): """ +class ConfirmationTokenCreateParamsPaymentMethodDataSequra(TypedDict): + pass + + class ConfirmationTokenCreateParamsPaymentMethodDataSofort(TypedDict): country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ 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 d8afca2dd..b4d250b04 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 92275d41a..8e6700573 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/core/__init__.py b/stripe/params/v2/core/__init__.py index 03b8a87ee..9b4442e5a 100644 --- a/stripe/params/v2/core/__init__.py +++ b/stripe/params/v2/core/__init__.py @@ -35,6 +35,7 @@ AccountCreateParamsConfigurationMerchantCapabilitiesBacsDebitPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBacsDebitPayments, AccountCreateParamsConfigurationMerchantCapabilitiesBancontactPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBancontactPayments, AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments, AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPayments, AccountCreateParamsConfigurationMerchantCapabilitiesCardPayments as AccountCreateParamsConfigurationMerchantCapabilitiesCardPayments, AccountCreateParamsConfigurationMerchantCapabilitiesCartesBancairesPayments as AccountCreateParamsConfigurationMerchantCapabilitiesCartesBancairesPayments, @@ -63,8 +64,10 @@ AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPayments, AccountCreateParamsConfigurationMerchantCapabilitiesRevolutPayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesRevolutPayPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesSequraPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSequraPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments, AccountCreateParamsConfigurationMerchantCapabilitiesTwintPayments as AccountCreateParamsConfigurationMerchantCapabilitiesTwintPayments, @@ -78,6 +81,7 @@ AccountCreateParamsConfigurationMerchantScriptStatementDescriptor as AccountCreateParamsConfigurationMerchantScriptStatementDescriptor, AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKana as AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKana, AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji as AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji, + AccountCreateParamsConfigurationMerchantSepaDebitPayments as AccountCreateParamsConfigurationMerchantSepaDebitPayments, AccountCreateParamsConfigurationMerchantStatementDescriptor as AccountCreateParamsConfigurationMerchantStatementDescriptor, AccountCreateParamsConfigurationMerchantSupport as AccountCreateParamsConfigurationMerchantSupport, AccountCreateParamsConfigurationMerchantSupportAddress as AccountCreateParamsConfigurationMerchantSupportAddress, @@ -248,6 +252,7 @@ AccountUpdateParamsConfigurationMerchantCapabilitiesBacsDebitPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBacsDebitPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesBancontactPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBancontactPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesCardPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesCardPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesCartesBancairesPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesCartesBancairesPayments, @@ -276,8 +281,10 @@ AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesRevolutPayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesRevolutPayPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPayments, @@ -291,6 +298,7 @@ AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor, AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKana as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKana, AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji, + AccountUpdateParamsConfigurationMerchantSepaDebitPayments as AccountUpdateParamsConfigurationMerchantSepaDebitPayments, AccountUpdateParamsConfigurationMerchantStatementDescriptor as AccountUpdateParamsConfigurationMerchantStatementDescriptor, AccountUpdateParamsConfigurationMerchantSupport as AccountUpdateParamsConfigurationMerchantSupport, AccountUpdateParamsConfigurationMerchantSupportAddress as AccountUpdateParamsConfigurationMerchantSupportAddress, @@ -507,6 +515,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -619,6 +631,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -627,6 +643,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantCapabilitiesSequraPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -679,6 +699,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantSepaDebitPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantStatementDescriptor": ( "stripe.params.v2.core._account_create_params", False, @@ -1308,6 +1332,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPayments": ( "stripe.params.v2.core._account_update_params", False, @@ -1420,6 +1448,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments": ( "stripe.params.v2.core._account_update_params", False, @@ -1428,6 +1460,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments": ( "stripe.params.v2.core._account_update_params", False, @@ -1480,6 +1516,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantSepaDebitPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantStatementDescriptor": ( "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 e15f9ad42..525c75a53 100644 --- a/stripe/params/v2/core/_account_create_params.py +++ b/stripe/params/v2/core/_account_create_params.py @@ -10,7 +10,7 @@ class AccountCreateParams(TypedDict): account_token: NotRequired[str] """ - The account token generated by the account token api. + The account token generated by the account token API. """ configuration: NotRequired["AccountCreateParamsConfiguration"] """ @@ -282,6 +282,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. + """ statement_descriptor: NotRequired[ "AccountCreateParamsConfigurationMerchantStatementDescriptor" ] @@ -381,6 +387,12 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process BLIK payments. """ + blik_recurring_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments" + ] + """ + Allow the merchant to process recurring BLIK payments. + """ boleto_payments: NotRequired[ "AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPayments" ] @@ -549,6 +561,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" ] @@ -561,6 +579,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" ] @@ -683,6 +707,15 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments( """ +class AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + class AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPayments( TypedDict, ): @@ -935,6 +968,15 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments( """ +class AccountCreateParamsConfigurationMerchantCapabilitiesSatispayPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + class AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments( TypedDict, ): @@ -953,6 +995,15 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments( """ +class AccountCreateParamsConfigurationMerchantCapabilitiesSequraPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + class AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments( TypedDict, ): @@ -1102,6 +1153,13 @@ class AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji( """ +class AccountCreateParamsConfigurationMerchantSepaDebitPayments(TypedDict): + creditor_id: NotRequired[str] + """ + Creditor ID for SEPA Direct Debit payments. + """ + + class AccountCreateParamsConfigurationMerchantStatementDescriptor(TypedDict): descriptor: NotRequired[str] """ diff --git a/stripe/params/v2/core/_account_link_create_params.py b/stripe/params/v2/core/_account_link_create_params.py index 05980b221..03bef84a6 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. """ @@ -39,12 +41,6 @@ class AccountLinkCreateParamsUseCaseAccountOnboarding(TypedDict): """ Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ - configurations: List[ - Union[Literal["customer", "merchant", "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. @@ -75,12 +71,6 @@ class AccountLinkCreateParamsUseCaseAccountUpdate(TypedDict): """ Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ - configurations: List[ - Union[Literal["customer", "merchant", "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 81d7c8dc6..bd88a2ef1 100644 --- a/stripe/params/v2/core/_account_update_params.py +++ b/stripe/params/v2/core/_account_update_params.py @@ -10,7 +10,7 @@ class AccountUpdateParams(TypedDict): account_token: NotRequired[str] """ - The account token generated by the account token api. + The account token generated by the account token API. """ configuration: NotRequired["AccountUpdateParamsConfiguration"] """ @@ -300,6 +300,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. + """ statement_descriptor: NotRequired[ "AccountUpdateParamsConfigurationMerchantStatementDescriptor" ] @@ -399,6 +405,12 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process BLIK payments. """ + blik_recurring_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments" + ] + """ + Allow the merchant to process recurring BLIK payments. + """ boleto_payments: NotRequired[ "AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPayments" ] @@ -567,6 +579,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" ] @@ -579,6 +597,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" ] @@ -701,6 +725,15 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments( """ +class AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments( + TypedDict, +): + 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 AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPayments( TypedDict, ): @@ -953,6 +986,15 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments( """ +class AccountUpdateParamsConfigurationMerchantCapabilitiesSatispayPayments( + TypedDict, +): + 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 AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments( TypedDict, ): @@ -971,6 +1013,15 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments( """ +class AccountUpdateParamsConfigurationMerchantCapabilitiesSequraPayments( + TypedDict, +): + 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 AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments( TypedDict, ): @@ -1120,6 +1171,13 @@ class AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji( """ +class AccountUpdateParamsConfigurationMerchantSepaDebitPayments(TypedDict): + creditor_id: NotRequired[str] + """ + Creditor ID for SEPA Direct Debit payments. + """ + + class AccountUpdateParamsConfigurationMerchantStatementDescriptor(TypedDict): descriptor: NotRequired[str] """ 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/product_catalog/__init__.py b/stripe/product_catalog/__init__.py new file mode 100644 index 000000000..e9169be92 --- /dev/null +++ b/stripe/product_catalog/__init__.py @@ -0,0 +1,34 @@ +# -*- 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.product_catalog._trial_offer import TrialOffer as TrialOffer + from stripe.product_catalog._trial_offer_service import ( + TrialOfferService as TrialOfferService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "TrialOffer": ("stripe.product_catalog._trial_offer", False), + "TrialOfferService": ( + "stripe.product_catalog._trial_offer_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/product_catalog/_trial_offer.py b/stripe/product_catalog/_trial_offer.py new file mode 100644 index 000000000..fe031553a --- /dev/null +++ b/stripe/product_catalog/_trial_offer.py @@ -0,0 +1,229 @@ +# -*- 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 +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 + +if TYPE_CHECKING: + from stripe._price import Price + from stripe.params.product_catalog._trial_offer_create_params import ( + TrialOfferCreateParams, + ) + from stripe.params.product_catalog._trial_offer_list_params import ( + TrialOfferListParams, + ) + from stripe.params.product_catalog._trial_offer_modify_params import ( + TrialOfferModifyParams, + ) + from stripe.params.product_catalog._trial_offer_retrieve_params import ( + TrialOfferRetrieveParams, + ) + + +class TrialOffer( + CreateableAPIResource["TrialOffer"], + ListableAPIResource["TrialOffer"], + UpdateableAPIResource["TrialOffer"], +): + """ + Trial offers let you define free or paid introductory pricing for a subscription item. + A TrialOffer specifies the price to charge during the trial, how many billing intervals + the trial lasts, and what price the subscription item transitions to when the trial ends. + You attach a TrialOffer to a subscription item + using `items[current_trial][trial_offer]` when creating or updating a subscription. + """ + + OBJECT_NAME: ClassVar[Literal["product_catalog.trial_offer"]] = ( + "product_catalog.trial_offer" + ) + + class Duration(StripeObject): + class Relative(StripeObject): + iterations: int + """ + The number of iterations of the price's interval for this trial offer. + """ + + relative: Optional[Relative] + type: Union[Literal["relative"], str] + """ + The type of trial offer duration. + """ + _inner_class_types = {"relative": Relative} + + class EndBehavior(StripeObject): + class Transition(StripeObject): + price: ExpandableField["Price"] + """ + The new price to use at the end of the trial offer period. + """ + + transition: Optional[Transition] + type: Union[Literal["transition"], str] + """ + The type of behavior when the trial offer ends. + """ + _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 + """ + 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`. + """ + nickname: Optional[str] + """ + A brief description of the trial offer, hidden from customers. + """ + object: Literal["product_catalog.trial_offer"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + price: ExpandableField["Price"] + """ + The price during the trial offer. + """ + + @classmethod + def create( + cls, **params: Unpack["TrialOfferCreateParams"] + ) -> "TrialOffer": + """ + Creates a trial offer. + """ + return cast( + "TrialOffer", + cls._static_request( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + async def create_async( + cls, **params: Unpack["TrialOfferCreateParams"] + ) -> "TrialOffer": + """ + Creates a trial offer. + """ + return cast( + "TrialOffer", + await cls._static_request_async( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + def list( + cls, **params: Unpack["TrialOfferListParams"] + ) -> ListObject["TrialOffer"]: + """ + Returns a list of trial offers. + """ + result = cls._static_request( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + async def list_async( + cls, **params: Unpack["TrialOfferListParams"] + ) -> ListObject["TrialOffer"]: + """ + Returns a list of trial offers. + """ + result = await cls._static_request_async( + "get", + cls.class_url(), + params=params, + ) + if not isinstance(result, ListObject): + raise TypeError( + "Expected list object from API, got %s" + % (type(result).__name__) + ) + + return result + + @classmethod + def 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"] + ) -> "TrialOffer": + """ + Retrieves the trial offer with the given ID. + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["TrialOfferRetrieveParams"] + ) -> "TrialOffer": + """ + Retrieves the trial offer with the given ID. + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + + _inner_class_types = {"duration": Duration, "end_behavior": EndBehavior} diff --git a/stripe/product_catalog/_trial_offer_service.py b/stripe/product_catalog/_trial_offer_service.py new file mode 100644 index 000000000..448e9205e --- /dev/null +++ b/stripe/product_catalog/_trial_offer_service.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._list_object import ListObject + from stripe._request_options import RequestOptions + from stripe.params.product_catalog._trial_offer_create_params import ( + TrialOfferCreateParams, + ) + from stripe.params.product_catalog._trial_offer_list_params import ( + TrialOfferListParams, + ) + from stripe.params.product_catalog._trial_offer_retrieve_params import ( + TrialOfferRetrieveParams, + ) + from stripe.params.product_catalog._trial_offer_update_params import ( + TrialOfferUpdateParams, + ) + from stripe.product_catalog._trial_offer import TrialOffer + + +class TrialOfferService(StripeService): + def list( + self, + params: Optional["TrialOfferListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[TrialOffer]": + """ + Returns a list of trial offers. + """ + return cast( + "ListObject[TrialOffer]", + self._request( + "get", + "/v1/product_catalog/trial_offers", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["TrialOfferListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[TrialOffer]": + """ + Returns a list of trial offers. + """ + return cast( + "ListObject[TrialOffer]", + await self._request_async( + "get", + "/v1/product_catalog/trial_offers", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "TrialOfferCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "TrialOffer": + """ + Creates a trial offer. + """ + return cast( + "TrialOffer", + self._request( + "post", + "/v1/product_catalog/trial_offers", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "TrialOfferCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "TrialOffer": + """ + Creates a trial offer. + """ + return cast( + "TrialOffer", + await self._request_async( + "post", + "/v1/product_catalog/trial_offers", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["TrialOfferRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "TrialOffer": + """ + Retrieves the trial offer with the given ID. + """ + return cast( + "TrialOffer", + self._request( + "get", + "/v1/product_catalog/trial_offers/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["TrialOfferRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "TrialOffer": + """ + Retrieves the trial offer with the given ID. + """ + return cast( + "TrialOffer", + await self._request_async( + "get", + "/v1/product_catalog/trial_offers/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + 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/_payment_evaluation.py b/stripe/radar/_payment_evaluation.py index 0365c797b..2757495ab 100644 --- a/stripe/radar/_payment_evaluation.py +++ b/stripe/radar/_payment_evaluation.py @@ -298,7 +298,14 @@ class Card(StripeObject): Details of a succeeded outcome attached to this payment evaluation. """ type: Union[ - Literal["failed", "merchant_blocked", "rejected", "succeeded"], str + Literal[ + "failed", + "merchant_blocked", + "rejected", + "rerouted", + "succeeded", + ], + str, ] """ Indicates the outcome of the payment evaluation. @@ -335,11 +342,11 @@ class Card(StripeObject): card: Optional[Card] """ - Describes card money movement details for the payment evaluation. + Describes card money movement details. """ money_movement_type: Literal["card"] """ - Describes the type of money movement. Currently only `card` is supported. + Describes the type of money movement. """ _inner_class_types = {"card": Card} @@ -475,6 +482,54 @@ class Address(StripeObject): } class Signals(StripeObject): + class EarlyFraudWarning(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 of this signal, based on the score. + """ + 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. + """ + + class FraudulentDispute(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 of this signal, based on the score. + """ + 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. + """ + class FraudulentPayment(StripeObject): evaluated_at: int """ @@ -494,16 +549,28 @@ class FraudulentPayment(StripeObject): """ Risk level of this signal, based on the score. """ - score: float + score: Optional[float] """ - Score for this signal. Possible values for evaluated payments are between 0 and 100. The value is returned with two decimal places and higher scores indicate a higher likelihood of the signal being true. A score of -1 is returned when a model evaluation was not performed, such as requests from incomplete integrations. + 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. """ + early_fraud_warning: Optional[EarlyFraudWarning] + """ + The likelihood that this `PaymentEvaluation` results in an early fraud warning. + """ + fraudulent_dispute: Optional[FraudulentDispute] + """ + The likelihood that this `PaymentEvaluation` results in a dispute with reason code `fraudulent`. + """ fraudulent_payment: FraudulentPayment """ A payment evaluation signal with evaluated_at, risk_level, and score fields. """ - _inner_class_types = {"fraudulent_payment": FraudulentPayment} + _inner_class_types = { + "early_fraud_warning": EarlyFraudWarning, + "fraudulent_dispute": FraudulentDispute, + "fraudulent_payment": FraudulentPayment, + } client_device_metadata_details: Optional[ClientDeviceMetadataDetails] """ diff --git a/stripe/reserve/_hold.py b/stripe/reserve/_hold.py index 0f19b9ac4..5d2c3f4ce 100644 --- a/stripe/reserve/_hold.py +++ b/stripe/reserve/_hold.py @@ -57,6 +57,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 61cf24268..5d189674c 100644 --- a/stripe/reserve/_plan.py +++ b/stripe/reserve/_plan.py @@ -22,6 +22,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 """ @@ -44,6 +47,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. @@ -57,6 +64,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. @@ -70,15 +78,18 @@ 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. """ _inner_class_types = { "fixed_release": FixedRelease, + "manual_release": ManualRelease, "rolling_release": RollingRelease, } diff --git a/stripe/reserve/_release.py b/stripe/reserve/_release.py index 2ebb4557f..ccad9d25a 100644 --- a/stripe/reserve/_release.py +++ b/stripe/reserve/_release.py @@ -49,6 +49,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. @@ -67,7 +71,7 @@ class SourceTransaction(StripeObject): """ reason: Union[ Literal[ - "bulk_hold_expiry", + "hold_expired", "hold_released_early", "hold_reversed", "plan_disabled", 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/__init__.py b/stripe/tax/__init__.py index 958da52fc..5be51784d 100644 --- a/stripe/tax/__init__.py +++ b/stripe/tax/__init__.py @@ -18,6 +18,8 @@ from stripe.tax._calculation_service import ( CalculationService as CalculationService, ) + from stripe.tax._location import Location as Location + from stripe.tax._location_service import LocationService as LocationService from stripe.tax._registration import Registration as Registration from stripe.tax._registration_service import ( RegistrationService as RegistrationService, @@ -46,6 +48,8 @@ False, ), "CalculationService": ("stripe.tax._calculation_service", False), + "Location": ("stripe.tax._location", False), + "LocationService": ("stripe.tax._location_service", False), "Registration": ("stripe.tax._registration", False), "RegistrationService": ("stripe.tax._registration_service", False), "Settings": ("stripe.tax._settings", False), diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index cea762875..3ae2e6d53 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -276,21 +276,32 @@ class TaxRateDetails(StripeObject): """ tax_type: Union[ Literal[ + "admissions_tax", "amusement_tax", + "attendance_tax", "communications_tax", + "digital_excise_tax", + "entertainment_tax", + "gross_receipts_tax", "gst", + "hospitality_tax", "hst", "igst", "jct", "lease_tax", + "luxury_tax", "mass_transit_parking_tax", "parking_tax", "pst", "qst", + "recycling_fee", + "resort_tax", "retail_delivery_fee", "rst", "sales_tax", "service_tax", + "tourism_tax", + "utility_users_tax", "vat", ], str, @@ -304,7 +315,9 @@ class TaxRateDetails(StripeObject): The amount of tax, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). """ jurisdiction: Jurisdiction - sourcing: Union[Literal["destination", "origin"], str] + sourcing: Union[ + Literal["destination", "origin", "performance"], str + ] """ Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). """ @@ -407,21 +420,32 @@ class FlatAmount(StripeObject): tax_type: Optional[ Union[ Literal[ + "admissions_tax", "amusement_tax", + "attendance_tax", "communications_tax", + "digital_excise_tax", + "entertainment_tax", + "gross_receipts_tax", "gst", + "hospitality_tax", "hst", "igst", "jct", "lease_tax", + "luxury_tax", "mass_transit_parking_tax", "parking_tax", "pst", "qst", + "recycling_fee", + "resort_tax", "retail_delivery_fee", "rst", "sales_tax", "service_tax", + "tourism_tax", + "utility_users_tax", "vat", ], str, diff --git a/stripe/tax/_calculation_line_item.py b/stripe/tax/_calculation_line_item.py index ffd33e618..6057ba080 100644 --- a/stripe/tax/_calculation_line_item.py +++ b/stripe/tax/_calculation_line_item.py @@ -6,6 +6,10 @@ class CalculationLineItem(StripeObject): + """ + A Tax Calculation Line Item represents a single item in a tax calculation. + """ + OBJECT_NAME: ClassVar[Literal["tax.calculation_line_item"]] = ( "tax.calculation_line_item" ) @@ -42,21 +46,32 @@ class TaxRateDetails(StripeObject): """ tax_type: Union[ Literal[ + "admissions_tax", "amusement_tax", + "attendance_tax", "communications_tax", + "digital_excise_tax", + "entertainment_tax", + "gross_receipts_tax", "gst", + "hospitality_tax", "hst", "igst", "jct", "lease_tax", + "luxury_tax", "mass_transit_parking_tax", "parking_tax", "pst", "qst", + "recycling_fee", + "resort_tax", "retail_delivery_fee", "rst", "sales_tax", "service_tax", + "tourism_tax", + "utility_users_tax", "vat", ], str, @@ -70,7 +85,7 @@ class TaxRateDetails(StripeObject): The amount of tax, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). """ jurisdiction: Jurisdiction - sourcing: Union[Literal["destination", "origin"], str] + sourcing: Union[Literal["destination", "origin", "performance"], str] """ Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). """ @@ -134,6 +149,10 @@ class TaxRateDetails(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ + performance_location: Optional[str] + """ + Indicates the line item represents a performance where the venue location might determine the tax, not the customer address. Leave empty if the tax code doesn't require a tax location. If you provide this value for tax codes with an `optional` location requirement, it overrides the customer address. + """ product: Optional[str] """ The ID of an existing [Product](https://docs.stripe.com/api/products/object). diff --git a/stripe/tax/_location.py b/stripe/tax/_location.py new file mode 100644 index 000000000..e7820782b --- /dev/null +++ b/stripe/tax/_location.py @@ -0,0 +1,176 @@ +# -*- 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, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.tax._location_create_params import LocationCreateParams + from stripe.params.tax._location_list_params import LocationListParams + from stripe.params.tax._location_retrieve_params import ( + LocationRetrieveParams, + ) + + +class Location( + CreateableAPIResource["Location"], + ListableAPIResource["Location"], +): + """ + Tax locations represent venues for services, tickets, or other product types. + """ + + OBJECT_NAME: ClassVar[Literal["tax.location"]] = "tax.location" + + 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 + description: Optional[str] + """ + A descriptive text providing additional context about the tax location. This can include information about the venue, types of events held, services available, or any relevant details for better identification (for example, "A spacious auditorium suitable for large concerts and events."). + """ + 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`. + """ + object: Literal["tax.location"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + type: Literal["performance"] + """ + The type of tax location to be defined. Currently the only option is `performance`. + """ + + @classmethod + def create(cls, **params: Unpack["LocationCreateParams"]) -> "Location": + """ + Create a tax location to use in calculating taxes for a service, ticket, or other type of product. The resulting object contains the ID, address, type, and description of the tax location. + """ + return cast( + "Location", + cls._static_request( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + async def create_async( + cls, **params: Unpack["LocationCreateParams"] + ) -> "Location": + """ + Create a tax location to use in calculating taxes for a service, ticket, or other type of product. The resulting object contains the ID, address, type, and description of the tax location. + """ + return cast( + "Location", + await cls._static_request_async( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + def list( + cls, **params: Unpack["LocationListParams"] + ) -> ListObject["Location"]: + """ + Retrieve a list of all tax locations. Tax locations can represent the venues for services, tickets, or other product types. + + The response includes detailed information for each tax location, such as its address, type, and description. + + You can paginate through the list by using the limit parameter to control the number of results returned in each request. + """ + 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["LocationListParams"] + ) -> ListObject["Location"]: + """ + Retrieve a list of all tax locations. Tax locations can represent the venues for services, tickets, or other product types. + + The response includes detailed information for each tax location, such as its address, type, and description. + + You can paginate through the list by using the limit parameter to control the number of results returned in each request. + """ + 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["LocationRetrieveParams"] + ) -> "Location": + """ + Fetch the details of a specific tax location using its unique identifier. Use a tax location to calculate taxes based on the location of the end product, such as a performance, instead of the customer address. For more details, check the [integration guide](https://docs.stripe.com/tax/tax-for-tickets/integration-guide). + """ + instance = cls(id, **params) + instance.refresh() + return instance + + @classmethod + async def retrieve_async( + cls, id: str, **params: Unpack["LocationRetrieveParams"] + ) -> "Location": + """ + Fetch the details of a specific tax location using its unique identifier. Use a tax location to calculate taxes based on the location of the end product, such as a performance, instead of the customer address. For more details, check the [integration guide](https://docs.stripe.com/tax/tax-for-tickets/integration-guide). + """ + instance = cls(id, **params) + await instance.refresh_async() + return instance + + _inner_class_types = {"address": Address} diff --git a/stripe/tax/_location_service.py b/stripe/tax/_location_service.py new file mode 100644 index 000000000..bb52244f3 --- /dev/null +++ b/stripe/tax/_location_service.py @@ -0,0 +1,148 @@ +# -*- 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.tax._location_create_params import LocationCreateParams + from stripe.params.tax._location_list_params import LocationListParams + from stripe.params.tax._location_retrieve_params import ( + LocationRetrieveParams, + ) + from stripe.tax._location import Location + + +class LocationService(StripeService): + def list( + self, + params: "LocationListParams", + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Location]": + """ + Retrieve a list of all tax locations. Tax locations can represent the venues for services, tickets, or other product types. + + The response includes detailed information for each tax location, such as its address, type, and description. + + You can paginate through the list by using the limit parameter to control the number of results returned in each request. + """ + return cast( + "ListObject[Location]", + self._request( + "get", + "/v1/tax/locations", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: "LocationListParams", + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Location]": + """ + Retrieve a list of all tax locations. Tax locations can represent the venues for services, tickets, or other product types. + + The response includes detailed information for each tax location, such as its address, type, and description. + + You can paginate through the list by using the limit parameter to control the number of results returned in each request. + """ + return cast( + "ListObject[Location]", + await self._request_async( + "get", + "/v1/tax/locations", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "LocationCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "Location": + """ + Create a tax location to use in calculating taxes for a service, ticket, or other type of product. The resulting object contains the ID, address, type, and description of the tax location. + """ + return cast( + "Location", + self._request( + "post", + "/v1/tax/locations", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "LocationCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "Location": + """ + Create a tax location to use in calculating taxes for a service, ticket, or other type of product. The resulting object contains the ID, address, type, and description of the tax location. + """ + return cast( + "Location", + await self._request_async( + "post", + "/v1/tax/locations", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + location: str, + /, + params: Optional["LocationRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Location": + """ + Fetch the details of a specific tax location using its unique identifier. Use a tax location to calculate taxes based on the location of the end product, such as a performance, instead of the customer address. For more details, check the [integration guide](https://docs.stripe.com/tax/tax-for-tickets/integration-guide). + """ + return cast( + "Location", + self._request( + "get", + "/v1/tax/locations/{location}".format( + location=sanitize_id(location), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + location: str, + /, + params: Optional["LocationRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Location": + """ + Fetch the details of a specific tax location using its unique identifier. Use a tax location to calculate taxes based on the location of the end product, such as a performance, instead of the customer address. For more details, check the [integration guide](https://docs.stripe.com/tax/tax-for-tickets/integration-guide). + """ + return cast( + "Location", + await self._request_async( + "get", + "/v1/tax/locations/{location}".format( + location=sanitize_id(location), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/tax/_registration.py b/stripe/tax/_registration.py index 508702b76..02dc41a87 100644 --- a/stripe/tax/_registration.py +++ b/stripe/tax/_registration.py @@ -75,12 +75,6 @@ class Ao(StripeObject): """ class At(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -89,7 +83,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -97,7 +90,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Au(StripeObject): class Standard(StripeObject): @@ -146,12 +139,6 @@ class Bd(StripeObject): """ class Be(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -160,7 +147,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -168,7 +154,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Bf(StripeObject): type: Literal["standard"] @@ -177,12 +163,6 @@ class Bf(StripeObject): """ class Bg(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -191,7 +171,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -199,7 +178,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Bh(StripeObject): type: Literal["standard"] @@ -294,12 +273,6 @@ class Cv(StripeObject): """ class Cy(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -308,7 +281,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -316,15 +288,9 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Cz(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -333,7 +299,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -341,15 +306,9 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class De(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -358,7 +317,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -366,15 +324,9 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Dk(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -383,7 +335,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -391,7 +342,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Ec(StripeObject): type: Literal["simplified"] @@ -400,12 +351,6 @@ class Ec(StripeObject): """ class Ee(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -414,7 +359,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -422,7 +366,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Eg(StripeObject): type: Literal["simplified"] @@ -431,12 +375,6 @@ class Eg(StripeObject): """ class Es(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -445,15 +383,14 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str ] """ - Type of registration in an EU country. + Type of registration in ES. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Et(StripeObject): type: Literal["standard"] @@ -462,12 +399,6 @@ class Et(StripeObject): """ class Fi(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -476,7 +407,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -484,15 +414,9 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Fr(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -501,7 +425,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -509,7 +432,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Gb(StripeObject): class Standard(StripeObject): @@ -540,12 +463,6 @@ class Gn(StripeObject): """ class Gr(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -554,7 +471,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -562,15 +478,9 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Hr(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -579,7 +489,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -587,15 +496,9 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Hu(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -604,7 +507,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -612,7 +514,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Id(StripeObject): type: Literal["simplified"] @@ -621,12 +523,6 @@ class Id(StripeObject): """ class Ie(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -635,7 +531,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -643,7 +538,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class In(StripeObject): type: Literal["simplified"] @@ -658,12 +553,6 @@ class Is(StripeObject): """ class It(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -672,7 +561,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -680,7 +568,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Jp(StripeObject): class Standard(StripeObject): @@ -741,12 +629,6 @@ class Lk(StripeObject): """ class Lt(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -755,7 +637,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -763,15 +644,9 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Lu(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -780,7 +655,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -788,15 +662,9 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Lv(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -805,7 +673,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -813,7 +680,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Ma(StripeObject): type: Literal["simplified"] @@ -846,12 +713,6 @@ class Mr(StripeObject): """ class Mt(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -860,7 +721,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -868,7 +728,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Mx(StripeObject): type: Literal["simplified"] @@ -889,12 +749,6 @@ class Ng(StripeObject): """ class Nl(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -903,7 +757,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -911,7 +764,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class No(StripeObject): class Standard(StripeObject): @@ -970,12 +823,6 @@ class Ph(StripeObject): """ class Pl(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -984,7 +831,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -992,15 +838,9 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Pt(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1009,7 +849,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -1017,15 +856,9 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Ro(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1034,7 +867,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -1042,7 +874,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Rs(StripeObject): type: Literal["standard"] @@ -1063,12 +895,6 @@ class Sa(StripeObject): """ class Se(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1077,7 +903,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -1085,7 +910,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Sg(StripeObject): class Standard(StripeObject): @@ -1104,12 +929,6 @@ class Standard(StripeObject): _inner_class_types = {"standard": Standard} class Si(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1118,7 +937,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -1126,15 +944,9 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Sk(StripeObject): - class Igic(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] - """ - Place of supply scheme used in an IGIC registration. - """ - class Standard(StripeObject): place_of_supply_scheme: Union[ Literal["inbound_goods", "small_seller", "standard"], str @@ -1143,7 +955,6 @@ class Standard(StripeObject): Place of supply scheme used in an EU standard registration. """ - igic: Optional[Igic] standard: Optional[Standard] type: Union[ Literal["ioss", "oss_non_union", "oss_union", "standard"], str @@ -1151,7 +962,7 @@ class Standard(StripeObject): """ Type of registration in an EU country. """ - _inner_class_types = {"igic": Igic, "standard": Standard} + _inner_class_types = {"standard": Standard} class Sn(StripeObject): type: Literal["simplified"] @@ -1208,6 +1019,36 @@ class Ug(StripeObject): """ class Us(StripeObject): + class AdmissionsTax(StripeObject): + jurisdiction: str + """ + A [jurisdiction code](https://docs.stripe.com/tax/registering?type=admissions_tax#registration-types) representing the local jurisdiction. + """ + + class AttendanceTax(StripeObject): + jurisdiction: str + """ + A [jurisdiction code](https://docs.stripe.com/tax/registering?type=attendance_tax#registration-types) representing the local jurisdiction. + """ + + class EntertainmentTax(StripeObject): + jurisdiction: str + """ + A [jurisdiction code](https://docs.stripe.com/tax/registering?type=entertainment_tax#registration-types) representing the local jurisdiction. + """ + + class GrossReceiptsTax(StripeObject): + jurisdiction: str + """ + A [jurisdiction code](https://docs.stripe.com/tax/registering?type=gross_receipts_tax#registration-types) representing the local jurisdiction. + """ + + class HospitalityTax(StripeObject): + jurisdiction: str + """ + A [jurisdiction code](https://docs.stripe.com/tax/registering?type=hospitality_tax#registration-types) representing the local jurisdiction. + """ + class LocalAmusementTax(StripeObject): jurisdiction: str """ @@ -1220,6 +1061,12 @@ class LocalLeaseTax(StripeObject): A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. """ + class LuxuryTax(StripeObject): + jurisdiction: str + """ + A [jurisdiction code](https://docs.stripe.com/tax/registering?type=luxury_tax#registration-types) representing the local jurisdiction. + """ + class MassTransitParkingTax(StripeObject): jurisdiction: str """ @@ -1232,6 +1079,12 @@ class ParkingTax(StripeObject): A [jurisdiction code](https://docs.stripe.com/tax/registering?type=parking_tax#registration-types) representing the local jurisdiction. """ + class ResortTax(StripeObject): + jurisdiction: str + """ + A [jurisdiction code](https://docs.stripe.com/tax/registering?type=resort_tax#registration-types) representing the local jurisdiction. + """ + class StateSalesTax(StripeObject): class Election(StripeObject): jurisdiction: Optional[str] @@ -1256,24 +1109,46 @@ class Election(StripeObject): """ _inner_class_types = {"elections": Election} + class TourismTax(StripeObject): + jurisdiction: str + """ + A [jurisdiction code](https://docs.stripe.com/tax/registering?type=tourism_tax#registration-types) representing the local jurisdiction. + """ + + admissions_tax: Optional[AdmissionsTax] + attendance_tax: Optional[AttendanceTax] + entertainment_tax: Optional[EntertainmentTax] + gross_receipts_tax: Optional[GrossReceiptsTax] + hospitality_tax: Optional[HospitalityTax] local_amusement_tax: Optional[LocalAmusementTax] local_lease_tax: Optional[LocalLeaseTax] + luxury_tax: Optional[LuxuryTax] mass_transit_parking_tax: Optional[MassTransitParkingTax] parking_tax: Optional[ParkingTax] + resort_tax: Optional[ResortTax] state: str """ Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). """ state_sales_tax: Optional[StateSalesTax] + tourism_tax: Optional[TourismTax] type: Union[ Literal[ + "admissions_tax", + "attendance_tax", + "entertainment_tax", + "gross_receipts_tax", + "hospitality_tax", "local_amusement_tax", "local_lease_tax", + "luxury_tax", "mass_transit_parking_tax", "parking_tax", + "resort_tax", "state_communications_tax", "state_retail_delivery_fee", "state_sales_tax", + "tourism_tax", ], str, ] @@ -1281,11 +1156,19 @@ class Election(StripeObject): Type of registration in the US. """ _inner_class_types = { + "admissions_tax": AdmissionsTax, + "attendance_tax": AttendanceTax, + "entertainment_tax": EntertainmentTax, + "gross_receipts_tax": GrossReceiptsTax, + "hospitality_tax": HospitalityTax, "local_amusement_tax": LocalAmusementTax, "local_lease_tax": LocalLeaseTax, + "luxury_tax": LuxuryTax, "mass_transit_parking_tax": MassTransitParkingTax, "parking_tax": ParkingTax, + "resort_tax": ResortTax, "state_sales_tax": StateSalesTax, + "tourism_tax": TourismTax, } class Uy(StripeObject): 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 fa998167b..746a2f861 100644 --- a/stripe/tax/_settings_service.py +++ b/stripe/tax/_settings_service.py @@ -58,7 +58,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", @@ -77,7 +77,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 c6628c624..46c0aa69e 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -285,21 +285,32 @@ class TaxRateDetails(StripeObject): """ tax_type: Union[ Literal[ + "admissions_tax", "amusement_tax", + "attendance_tax", "communications_tax", + "digital_excise_tax", + "entertainment_tax", + "gross_receipts_tax", "gst", + "hospitality_tax", "hst", "igst", "jct", "lease_tax", + "luxury_tax", "mass_transit_parking_tax", "parking_tax", "pst", "qst", + "recycling_fee", + "resort_tax", "retail_delivery_fee", "rst", "sales_tax", "service_tax", + "tourism_tax", + "utility_users_tax", "vat", ], str, @@ -313,7 +324,9 @@ class TaxRateDetails(StripeObject): The amount of tax, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). """ jurisdiction: Jurisdiction - sourcing: Union[Literal["destination", "origin"], str] + sourcing: Union[ + Literal["destination", "origin", "performance"], str + ] """ Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). """ diff --git a/stripe/tax/_transaction_line_item.py b/stripe/tax/_transaction_line_item.py index 679492e18..c6f16221e 100644 --- a/stripe/tax/_transaction_line_item.py +++ b/stripe/tax/_transaction_line_item.py @@ -6,6 +6,10 @@ class TransactionLineItem(StripeObject): + """ + A Tax Transaction Line Item represents an individual item in a Tax Transaction. + """ + OBJECT_NAME: ClassVar[Literal["tax.transaction_line_item"]] = ( "tax.transaction_line_item" ) diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index ec44d2ba3..c7787092a 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -83,7 +83,7 @@ class Action(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] """ @@ -144,6 +144,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", @@ -154,6 +155,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_no_successful_transaction_refresh", "forwarding_api_inactive", "forwarding_api_invalid_parameter", @@ -207,6 +210,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", @@ -358,7 +362,7 @@ class ApiError(StripeObject): """ A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - Later, you can use [PaymentIntents](https://api.stripe.com#payment_intents) to drive the payment flow. + Later, you can use [PaymentIntents](https://docs.stripe.com/api#payment_intents) to drive the payment flow. Create a SetupIntent when you're ready to collect your customer's payment credentials. Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. @@ -369,9 +373,9 @@ class ApiError(StripeObject): For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). - If you use the SetupIntent with a [Customer](https://api.stripe.com#setup_intent_object-customer), + If you use the SetupIntent with a [Customer](https://docs.stripe.com/api#setup_intent_object-customer), it automatically attaches the resulting payment method to that Customer after successful setup. - We recommend using SetupIntents or [setup_future_usage](https://api.stripe.com#payment_intent_object-setup_future_usage) on + We recommend using SetupIntents or [setup_future_usage](https://docs.stripe.com/api#payment_intent_object-setup_future_usage) on PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. @@ -960,7 +964,7 @@ class LineItem(StripeObject): """ status: Optional[Union[Literal["offline", "online"], str]] """ - The networking status of the reader. We do not recommend using this field in flows that may block taking payments. + The networking status of the reader. This value is `null` for mobile readers. We do not recommend using this field in flows that may block taking payments. """ @classmethod 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/_credit_reversal.py b/stripe/treasury/_credit_reversal.py index 7e5076478..3fe46f7f1 100644 --- a/stripe/treasury/_credit_reversal.py +++ b/stripe/treasury/_credit_reversal.py @@ -26,7 +26,7 @@ class CreditReversal( ListableAPIResource["CreditReversal"], ): """ - You can reverse some [ReceivedCredits](https://api.stripe.com#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + You can reverse some [ReceivedCredits](https://docs.stripe.com/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. """ OBJECT_NAME: ClassVar[Literal["treasury.credit_reversal"]] = ( diff --git a/stripe/treasury/_debit_reversal.py b/stripe/treasury/_debit_reversal.py index 39e149e11..379541f5e 100644 --- a/stripe/treasury/_debit_reversal.py +++ b/stripe/treasury/_debit_reversal.py @@ -26,7 +26,7 @@ class DebitReversal( ListableAPIResource["DebitReversal"], ): """ - You can reverse some [ReceivedDebits](https://api.stripe.com#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + You can reverse some [ReceivedDebits](https://docs.stripe.com/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. """ OBJECT_NAME: ClassVar[Literal["treasury.debit_reversal"]] = ( diff --git a/stripe/treasury/_financial_account.py b/stripe/treasury/_financial_account.py index 45f688672..33ce64cb7 100644 --- a/stripe/treasury/_financial_account.py +++ b/stripe/treasury/_financial_account.py @@ -92,7 +92,7 @@ class Aba(StripeObject): ABA Records contain U.S. bank account details per the ABA format. """ supported_networks: Optional[ - List[Union[Literal["ach", "us_domestic_wire"], str]] + List[Union[Literal["ach", "rtp", "us_domestic_wire"], str]] ] """ The list of networks that the address supports diff --git a/stripe/treasury/_inbound_transfer.py b/stripe/treasury/_inbound_transfer.py index 12293da6f..40f845dee 100644 --- a/stripe/treasury/_inbound_transfer.py +++ b/stripe/treasury/_inbound_transfer.py @@ -41,7 +41,7 @@ class InboundTransfer( ListableAPIResource["InboundTransfer"], ): """ - Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://api.stripe.com#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://docs.stripe.com/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) """ @@ -201,7 +201,7 @@ class StatusTransitions(StripeObject): """ failure_details: Optional[FailureDetails] """ - Details about this InboundTransfer's failure. Only set when status is `failed`. + Details about this InboundTransfer's failure. Will be set when `status=failed` or `returned=true`. """ financial_account: str """ diff --git a/stripe/treasury/_outbound_payment.py b/stripe/treasury/_outbound_payment.py index 7d95b5166..28d557491 100644 --- a/stripe/treasury/_outbound_payment.py +++ b/stripe/treasury/_outbound_payment.py @@ -44,7 +44,7 @@ class OutboundPayment( ListableAPIResource["OutboundPayment"], ): """ - Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://api.stripe.com#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://api.stripe.com#outbound_transfers). + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://docs.stripe.com/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://docs.stripe.com/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. diff --git a/stripe/treasury/_outbound_transfer.py b/stripe/treasury/_outbound_transfer.py index 2320aadbe..890c7b689 100644 --- a/stripe/treasury/_outbound_transfer.py +++ b/stripe/treasury/_outbound_transfer.py @@ -44,7 +44,7 @@ class OutboundTransfer( ListableAPIResource["OutboundTransfer"], ): """ - Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://api.stripe.com#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://api.stripe.com#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://docs.stripe.com/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. diff --git a/stripe/treasury/_received_credit.py b/stripe/treasury/_received_credit.py index 918f423aa..ecdda797d 100644 --- a/stripe/treasury/_received_credit.py +++ b/stripe/treasury/_received_credit.py @@ -27,7 +27,7 @@ class ReceivedCredit(ListableAPIResource["ReceivedCredit"]): """ - ReceivedCredits represent funds sent to a [FinancialAccount](https://api.stripe.com#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + ReceivedCredits represent funds sent to a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. """ OBJECT_NAME: ClassVar[Literal["treasury.received_credit"]] = ( @@ -105,7 +105,7 @@ class UsBankAccount(StripeObject): financial_account: Optional[FinancialAccount] issuing_card: Optional[str] """ - Set when `type` is `issuing_card`. This is an [Issuing Card](https://api.stripe.com#issuing_cards) ID. + Set when `type` is `issuing_card`. This is an [Issuing Card](https://docs.stripe.com/api#issuing_cards) ID. """ type: Union[ Literal[ @@ -131,11 +131,11 @@ class LinkedFlows(StripeObject): class SourceFlowDetails(StripeObject): credit_reversal: Optional["CreditReversal"] """ - You can reverse some [ReceivedCredits](https://api.stripe.com#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + You can reverse some [ReceivedCredits](https://docs.stripe.com/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. """ outbound_payment: Optional["OutboundPayment"] """ - Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://api.stripe.com#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://api.stripe.com#outbound_transfers). + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://docs.stripe.com/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://docs.stripe.com/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. @@ -143,7 +143,7 @@ class SourceFlowDetails(StripeObject): """ outbound_transfer: Optional["OutboundTransfer"] """ - Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://api.stripe.com#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://api.stripe.com#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://docs.stripe.com/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. @@ -180,11 +180,11 @@ class SourceFlowDetails(StripeObject): """ issuing_authorization: Optional[str] """ - Set if the ReceivedCredit was created due to an [Issuing Authorization](https://api.stripe.com#issuing_authorizations) object. + Set if the ReceivedCredit was created due to an [Issuing Authorization](https://docs.stripe.com/api#issuing_authorizations) object. """ issuing_transaction: Optional[str] """ - Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://api.stripe.com#issuing_transactions) object. + Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://docs.stripe.com/api#issuing_transactions) object. """ source_flow: Optional[str] """ @@ -269,7 +269,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/treasury/_received_debit.py b/stripe/treasury/_received_debit.py index d25750e27..64d1ecf02 100644 --- a/stripe/treasury/_received_debit.py +++ b/stripe/treasury/_received_debit.py @@ -23,7 +23,7 @@ class ReceivedDebit(ListableAPIResource["ReceivedDebit"]): """ - ReceivedDebits represent funds pulled from a [FinancialAccount](https://api.stripe.com#financial_accounts). These are not initiated from the FinancialAccount. + ReceivedDebits represent funds pulled from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts). These are not initiated from the FinancialAccount. """ OBJECT_NAME: ClassVar[Literal["treasury.received_debit"]] = ( @@ -101,7 +101,7 @@ class UsBankAccount(StripeObject): financial_account: Optional[FinancialAccount] issuing_card: Optional[str] """ - Set when `type` is `issuing_card`. This is an [Issuing Card](https://api.stripe.com#issuing_cards) ID. + Set when `type` is `issuing_card`. This is an [Issuing Card](https://docs.stripe.com/api#issuing_cards) ID. """ type: Union[ Literal[ @@ -134,19 +134,19 @@ class LinkedFlows(StripeObject): """ issuing_authorization: Optional[str] """ - Set if the ReceivedDebit was created due to an [Issuing Authorization](https://api.stripe.com#issuing_authorizations) object. + Set if the ReceivedDebit was created due to an [Issuing Authorization](https://docs.stripe.com/api#issuing_authorizations) object. """ issuing_transaction: Optional[str] """ - Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://api.stripe.com#issuing_disputes) object. + Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://docs.stripe.com/api#issuing_disputes) object. """ payout: Optional[str] """ - Set if the ReceivedDebit was created due to a [Payout](https://api.stripe.com#payouts) object. + Set if the ReceivedDebit was created due to a [Payout](https://docs.stripe.com/api#payouts) object. """ topup: Optional[str] """ - Set if the ReceivedDebit was created due to a [Topup](https://api.stripe.com#topups) object. + Set if the ReceivedDebit was created due to a [Topup](https://docs.stripe.com/api#topups) object. """ class ReversalDetails(StripeObject): diff --git a/stripe/treasury/_transaction.py b/stripe/treasury/_transaction.py index baac71327..b6e0602f2 100644 --- a/stripe/treasury/_transaction.py +++ b/stripe/treasury/_transaction.py @@ -26,7 +26,7 @@ class Transaction(ListableAPIResource["Transaction"]): """ - Transactions represent changes to a [FinancialAccount's](https://api.stripe.com#financial_accounts) balance. + Transactions represent changes to a [FinancialAccount's](https://docs.stripe.com/api#financial_accounts) balance. """ OBJECT_NAME: ClassVar[Literal["treasury.transaction"]] = ( @@ -50,15 +50,15 @@ class BalanceImpact(StripeObject): class FlowDetails(StripeObject): credit_reversal: Optional["CreditReversal"] """ - You can reverse some [ReceivedCredits](https://api.stripe.com#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + You can reverse some [ReceivedCredits](https://docs.stripe.com/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. """ debit_reversal: Optional["DebitReversal"] """ - You can reverse some [ReceivedDebits](https://api.stripe.com#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + You can reverse some [ReceivedDebits](https://docs.stripe.com/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. """ inbound_transfer: Optional["InboundTransfer"] """ - Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://api.stripe.com#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://docs.stripe.com/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) """ @@ -72,7 +72,7 @@ class FlowDetails(StripeObject): """ outbound_payment: Optional["OutboundPayment"] """ - Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://api.stripe.com#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://api.stripe.com#outbound_transfers). + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://docs.stripe.com/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://docs.stripe.com/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. @@ -80,7 +80,7 @@ class FlowDetails(StripeObject): """ outbound_transfer: Optional["OutboundTransfer"] """ - Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://api.stripe.com#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://api.stripe.com#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://docs.stripe.com/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. @@ -88,11 +88,11 @@ class FlowDetails(StripeObject): """ received_credit: Optional["ReceivedCredit"] """ - ReceivedCredits represent funds sent to a [FinancialAccount](https://api.stripe.com#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + ReceivedCredits represent funds sent to a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. """ received_debit: Optional["ReceivedDebit"] """ - ReceivedDebits represent funds pulled from a [FinancialAccount](https://api.stripe.com#financial_accounts). These are not initiated from the FinancialAccount. + ReceivedDebits represent funds pulled from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts). These are not initiated from the FinancialAccount. """ type: Union[ Literal[ diff --git a/stripe/treasury/_transaction_entry.py b/stripe/treasury/_transaction_entry.py index b52cd2f7b..11bef2a3a 100644 --- a/stripe/treasury/_transaction_entry.py +++ b/stripe/treasury/_transaction_entry.py @@ -27,7 +27,7 @@ class TransactionEntry(ListableAPIResource["TransactionEntry"]): """ - TransactionEntries represent individual units of money movements within a single [Transaction](https://api.stripe.com#transactions). + TransactionEntries represent individual units of money movements within a single [Transaction](https://docs.stripe.com/api#transactions). """ OBJECT_NAME: ClassVar[Literal["treasury.transaction_entry"]] = ( @@ -51,15 +51,15 @@ class BalanceImpact(StripeObject): class FlowDetails(StripeObject): credit_reversal: Optional["CreditReversal"] """ - You can reverse some [ReceivedCredits](https://api.stripe.com#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + You can reverse some [ReceivedCredits](https://docs.stripe.com/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. """ debit_reversal: Optional["DebitReversal"] """ - You can reverse some [ReceivedDebits](https://api.stripe.com#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + You can reverse some [ReceivedDebits](https://docs.stripe.com/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. """ inbound_transfer: Optional["InboundTransfer"] """ - Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://api.stripe.com#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://docs.stripe.com/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) """ @@ -73,7 +73,7 @@ class FlowDetails(StripeObject): """ outbound_payment: Optional["OutboundPayment"] """ - Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://api.stripe.com#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://api.stripe.com#outbound_transfers). + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://docs.stripe.com/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://docs.stripe.com/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. @@ -81,7 +81,7 @@ class FlowDetails(StripeObject): """ outbound_transfer: Optional["OutboundTransfer"] """ - Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://api.stripe.com#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://api.stripe.com#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://docs.stripe.com/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. @@ -89,11 +89,11 @@ class FlowDetails(StripeObject): """ received_credit: Optional["ReceivedCredit"] """ - ReceivedCredits represent funds sent to a [FinancialAccount](https://api.stripe.com#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + ReceivedCredits represent funds sent to a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. """ received_debit: Optional["ReceivedDebit"] """ - ReceivedDebits represent funds pulled from a [FinancialAccount](https://api.stripe.com#financial_accounts). These are not initiated from the FinancialAccount. + ReceivedDebits represent funds pulled from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts). These are not initiated from the FinancialAccount. """ type: Union[ Literal[ diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index df5978725..dfdd584ad 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -117,6 +117,14 @@ class AutomaticIndirectTax(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", @@ -135,7 +143,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -260,6 +272,14 @@ class AchDebitPayments(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", @@ -278,7 +298,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -293,6 +317,14 @@ class AcssDebitPayments(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", @@ -311,7 +343,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -326,6 +362,14 @@ class AffirmPayments(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", @@ -344,7 +388,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -359,6 +407,14 @@ class AfterpayClearpayPayments(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", @@ -377,7 +433,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -392,6 +452,14 @@ class AlmaPayments(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", @@ -410,7 +478,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -425,6 +497,14 @@ class AmazonPayPayments(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", @@ -443,7 +523,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -458,6 +542,14 @@ class AuBecsDebitPayments(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", @@ -476,7 +568,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -491,6 +587,14 @@ class BacsDebitPayments(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", @@ -509,7 +613,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -524,6 +632,14 @@ class BancontactPayments(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", @@ -542,7 +658,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -557,6 +677,14 @@ class BlikPayments(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", @@ -575,7 +703,56 @@ class StatusDetail(StripeObject): """ 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 = {"status_details": StatusDetail} + + class BlikRecurringPayments(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. + """ + + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -590,6 +767,14 @@ class BoletoPayments(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", @@ -608,7 +793,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -623,6 +812,14 @@ class CardPayments(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", @@ -641,7 +838,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -656,6 +857,14 @@ class CartesBancairesPayments(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", @@ -674,7 +883,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -689,6 +902,14 @@ class CashappPayments(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", @@ -707,7 +928,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -722,6 +947,14 @@ class EpsPayments(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", @@ -740,7 +973,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -755,6 +992,14 @@ class FpxPayments(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", @@ -773,7 +1018,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -788,6 +1037,14 @@ class GbBankTransferPayments(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", @@ -806,7 +1063,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -821,6 +1082,14 @@ class GrabpayPayments(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", @@ -839,7 +1108,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -854,6 +1127,14 @@ class IdealPayments(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", @@ -872,7 +1153,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -887,6 +1172,14 @@ class JcbPayments(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", @@ -905,7 +1198,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -920,6 +1217,14 @@ class JpBankTransferPayments(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", @@ -938,7 +1243,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -953,6 +1262,14 @@ class KakaoPayPayments(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", @@ -971,7 +1288,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -986,6 +1307,14 @@ class KlarnaPayments(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", @@ -1004,7 +1333,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1019,6 +1352,14 @@ class KonbiniPayments(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", @@ -1037,7 +1378,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1052,6 +1397,14 @@ class KrCardPayments(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", @@ -1070,7 +1423,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1085,6 +1442,14 @@ class LinkPayments(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", @@ -1103,7 +1468,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1118,6 +1487,14 @@ class MobilepayPayments(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", @@ -1136,7 +1513,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1151,6 +1532,14 @@ class MultibancoPayments(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", @@ -1169,7 +1558,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1184,6 +1577,14 @@ class MxBankTransferPayments(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", @@ -1202,7 +1603,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1217,6 +1622,14 @@ class NaverPayPayments(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", @@ -1235,7 +1648,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1250,6 +1667,14 @@ class OxxoPayments(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", @@ -1268,7 +1693,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1283,6 +1712,14 @@ class P24Payments(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", @@ -1301,7 +1738,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1316,6 +1757,14 @@ class PayByBankPayments(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", @@ -1334,7 +1783,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1349,6 +1802,14 @@ class PaycoPayments(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", @@ -1367,7 +1828,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1382,6 +1847,14 @@ class PaynowPayments(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", @@ -1400,7 +1873,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1415,6 +1892,14 @@ class PromptpayPayments(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", @@ -1433,7 +1918,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1448,6 +1937,14 @@ class RevolutPayPayments(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", @@ -1466,7 +1963,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1481,6 +1982,14 @@ class SamsungPayPayments(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", @@ -1499,7 +2008,56 @@ class StatusDetail(StripeObject): """ 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 = {"status_details": StatusDetail} + + class SatispayPayments(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. + """ + + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1514,6 +2072,14 @@ class SepaBankTransferPayments(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", @@ -1532,7 +2098,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1547,6 +2117,14 @@ class SepaDebitPayments(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", @@ -1565,7 +2143,56 @@ class StatusDetail(StripeObject): """ 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 = {"status_details": StatusDetail} + + class SequraPayments(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. + """ + + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1581,6 +2208,14 @@ class Payouts(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", @@ -1601,7 +2236,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1622,6 +2261,14 @@ class SunbitPayments(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", @@ -1640,7 +2287,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1655,6 +2306,14 @@ class SwishPayments(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", @@ -1673,7 +2332,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1688,6 +2351,14 @@ class TwintPayments(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", @@ -1706,7 +2377,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1721,6 +2396,14 @@ class UsBankTransferPayments(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", @@ -1739,7 +2422,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1754,6 +2441,14 @@ class ZipPayments(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", @@ -1772,7 +2467,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -1823,6 +2522,10 @@ class StatusDetail(StripeObject): """ Allow the merchant to process BLIK payments. """ + blik_recurring_payments: Optional[BlikRecurringPayments] + """ + Allow the merchant to process recurring BLIK payments. + """ boleto_payments: Optional[BoletoPayments] """ Allow the merchant to process Boleto payments. @@ -1935,6 +2638,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. @@ -1943,6 +2650,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). @@ -1978,6 +2689,7 @@ class StatusDetail(StripeObject): "bacs_debit_payments": BacsDebitPayments, "bancontact_payments": BancontactPayments, "blik_payments": BlikPayments, + "blik_recurring_payments": BlikRecurringPayments, "boleto_payments": BoletoPayments, "card_payments": CardPayments, "cartes_bancaires_payments": CartesBancairesPayments, @@ -2006,8 +2718,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, @@ -2224,6 +2938,14 @@ class Payouts(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", @@ -2244,7 +2966,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2259,6 +2985,14 @@ class StripeTransfers(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", @@ -2279,7 +3013,11 @@ class StatusDetail(StripeObject): """ status: Literal[ - "active", "pending", "restricted", "unsupported" + "active", + "pending", + "rejected", + "restricted", + "unsupported", ] """ The status of the Capability. @@ -2492,8 +3230,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", @@ -2623,6 +3363,7 @@ class Deadline(StripeObject): "bank_accounts.local", "bank_accounts.wire", "blik_payments", + "blik_recurring_payments", "boleto_payments", "cards", "card_payments", @@ -2652,6 +3393,7 @@ class Deadline(StripeObject): "promptpay_payments", "revolut_pay_payments", "samsung_pay_payments", + "satispay_payments", "sepa_bank_transfer_payments", "sepa_debit_payments", "stripe_balance.payouts", @@ -4099,8 +4841,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", @@ -4230,6 +4974,7 @@ class Deadline(StripeObject): "bank_accounts.local", "bank_accounts.wire", "blik_payments", + "blik_recurring_payments", "boleto_payments", "cards", "card_payments", @@ -4259,6 +5004,7 @@ class Deadline(StripeObject): "promptpay_payments", "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 dd37ca9cf..7c334216c 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,12 +34,6 @@ class CollectionOptions(StripeObject): """ Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ - configurations: List[ - Union[Literal["customer", "merchant", "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. @@ -69,12 +63,6 @@ class CollectionOptions(StripeObject): """ Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ - configurations: List[ - Union[Literal["customer", "merchant", "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. @@ -128,6 +116,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.py b/stripe/v2/core/_event.py index 634ddae2f..d2fee6755 100644 --- a/stripe/v2/core/_event.py +++ b/stripe/v2/core/_event.py @@ -74,6 +74,10 @@ class Request(StripeObject): """ Reason for the event. """ + snapshot_event: Optional[str] + """ + For interop events, this is the snapshot event ID. + """ type: str """ The type of the event. diff --git a/stripe/v2/core/_event_destination.py b/stripe/v2/core/_event_destination.py index c1ecbbcdd..7066be9e8 100644 --- a/stripe/v2/core/_event_destination.py +++ b/stripe/v2/core/_event_destination.py @@ -7,7 +7,7 @@ class EventDestination(StripeObject): """ - Set up an event destination to receive events from Stripe across multiple destination types, including [webhook endpoints](https://docs.stripe.com/webhooks) and [Amazon EventBridge](https://docs.stripe.com/event-destinations/eventbridge). Event destinations support receiving [thin events](https://docs.stripe.com/api/v2/events) and [snapshot events](https://docs.stripe.com/api/events). + Set up an event destination to receive events from Stripe across multiple destination types, including [webhook endpoints](https://docs.stripe.com/webhooks), [Amazon EventBridge](https://docs.stripe.com/event-destinations/eventbridge), and [Azure Event Grid](https://docs.stripe.com/event-destinations/eventgrid). Event destinations support receiving [thin events](https://docs.stripe.com/api/v2/events) and [snapshot events](https://docs.stripe.com/api/events). """ OBJECT_NAME: ClassVar[Literal["v2.core.event_destination"]] = ( @@ -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. 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/tests/test_generated_examples.py b/tests/test_generated_examples.py index 83cda729c..ab7cd849c 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( @@ -43935,7 +43935,6 @@ def test_v2_core_account_link_post_service( "fields": "eventually_due", "future_requirements": "include", }, - "configurations": ["merchant"], "refresh_url": "refresh_url", "return_url": "return_url", }, @@ -43944,7 +43943,6 @@ def test_v2_core_account_link_post_service( "fields": "eventually_due", "future_requirements": "include", }, - "configurations": ["merchant"], "refresh_url": "refresh_url", "return_url": "return_url", }, @@ -43957,7 +43955,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":["merchant"],"refresh_url":"refresh_url","return_url":"return_url"},"account_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["merchant"],"refresh_url":"refresh_url","return_url":"return_url"},"type":"account_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"},"type":"account_onboarding"}}', is_json=True, )