diff --git a/.hark/changes/2026-09-16_stripe-openapi_90844114.change.md b/.hark/changes/2026-09-16_stripe-openapi_90844114.change.md new file mode 100644 index 000000000..bd0ca81bd --- /dev/null +++ b/.hark/changes/2026-09-16_stripe-openapi_90844114.change.md @@ -0,0 +1,54 @@ +--- +title: Update generated code +pr_url: https://github.com/stripe/stripe-python/pull/1903 +semver_level: major +is_stripe_api_change: true +--- + +* Add support for new resources `apps.Install` and `v2.core.vault.NetworkToken` +* Add support for `create_from_credential`, `create`, `generate_cryptogram`, and `retrieve` methods on resource `v2.core.vault.NetworkToken` +* ⚠️ Remove support for `nesting_demo` on `AccountSession.Component` +* Add support for `shared_payment_granted_token` on `Charge.PaymentMethodDetail` +* ⚠️ Change type of `Charge.PaymentMethodDetail.Card.mandate` from `string` to `expandable($Mandate)` +* Add support for `current_trial` on `Checkout.Session.Item.Subscription.Item` and `checkout.SessionCreateParamsItemSubscriptionItem` +* Add support for `verification_method` on `Checkout.Session.PaymentMethodOption.BacsDebit` and `checkout.SessionCreateParamsPaymentMethodOptionBacsDebit` +* Add support for new value `sequra` on enum `checkout.SessionCreateParams.payment_method_types` +* Add support for new values `address_validation_failed` and `person_verification_failed` on enum `Crypto.Customer.KycTier.verification_errors` +* Add support for new values `address_validation_failed` and `person_verification_failed` on enum `Crypto.Customer.Verification.errors` +* Add support for new value `ripusd` on enums `Crypto.OnrampSession.TransactionDetail.destination_currency`, `crypto.OnrampSessionCreateParams.destination_currency`, and `crypto.OnrampSessionListParams.destination_currency` +* Add support for new value `ripusd` on enums `Crypto.OnrampSession.TransactionDetail.destination_currencies` and `crypto.OnrampSessionCreateParams.destination_currencies` +* Add support for new values `cad`, `cop`, and `php` on enums `Crypto.OnrampSession.TransactionDetail.source_currency` and `crypto.OnrampSessionCreateParams.source_currency` +* Add support for `appeal` on `Dispute.Evidence` +* Add support for `bacs_debit` on `Invoice.PaymentSetting.PaymentMethodOption`, `InvoiceCreateParamsPaymentSettingPaymentMethodOption`, `InvoiceModifyParamsPaymentSettingPaymentMethodOption`, `QuotePreviewInvoice.PaymentSetting.PaymentMethodOption`, `Subscription.PaymentSetting.PaymentMethodOption`, `SubscriptionCreateParamsPaymentSettingPaymentMethodOption`, and `SubscriptionModifyParamsPaymentSettingPaymentMethodOption` +* Add support for `pricing_token` on `InvoiceCreatePreviewParams` +* Add support for `expires_at` on `Mandate.PaymentMethodDetail.Blik`, `PaymentIntent.NextAction.SwishHandleRedirectOrDisplayQrCode.QrCode`, and `Subscription.PaymentSetting.PaymentMethodOption.Blik.MandateOption` +* ⚠️ Remove support for `expires_after` on `Mandate.PaymentMethodDetail.Blik` and `Subscription.PaymentSetting.PaymentMethodOption.Blik.MandateOption` +* 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 `payout_method_options` on `PayoutCreateParams` +* ⚠️ Change `ProductCatalog.TrialOffer.EndBehavior.transition` to be optional +* Add support for `early_fraud_warning` and `fraudulent_dispute` on `Radar.PaymentEvaluation.Signal` +* ⚠️ 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.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`, and `Tax.Registration.CountryOption.Sk` +* Add support for new value `igic` on enum `Tax.Registration.CountryOption.E.type` +* Add support for `metadata` on `V2.Billing.Contract.OneTimeFee.Datum`, `v2.billing.ContractCreateParamsOneTimeFee`, `v2.billing.ContractModifyParamsOneTimeFeeActionAdd`, and `v2.billing.ContractModifyParamsOneTimeFeeActionUpdate` +* Add support for `bank_account` and `crypto_wallet` on `V2.MoneyManagement.FinancialAddress` and `v2.money_management.FinancialAddressCreateParams` +* Add support for `type` on `V2.MoneyManagement.FinancialAddress` and `V2.MoneyManagement.ReceivedCredit.CryptoWalletTransfer` +* ⚠️ Remove support for `credentials` and `currency` on `V2.MoneyManagement.FinancialAddress` +* Add support for `amount_received` on `V2.MoneyManagement.ReceivedCredit` +* Add support for `originating_bank_account` on `V2.MoneyManagement.ReceivedCredit.BankTransfer` +* ⚠️ Remove support for `origin_type` on `V2.MoneyManagement.ReceivedCredit.BankTransfer` and `V2.MoneyManagement.ReceivedCredit.CryptoWalletTransfer` +* Add support for `latest_payment_attempt_record_details` on `V2.Payments.OffSessionPayment` +* Add support for `account_reviewed` on `V2.Signals.AccountActivity` and `v2.signals.AccountActivityCreateParams` +* Add support for new value `account_reviewed` on enums `V2.Signals.AccountActivity.type`, `v2.signals.AccountActivityCreateParams.type`, and `v2.signals.AccountEvaluationCreateParamsAccountActivityDetailData.type` +* ⚠️ Change `V2.Signals.PaymentRetrySignal.payment_record` to be optional +* Add support for `include` on `v2.payments.OffSessionPaymentCreateParams` +* ⚠️ Remove support for `include` on `v2.money_management.FinancialAddressListParams` and `v2.money_management.FinancialAddressRetrieveParams` +* ⚠️ Remove support for `crypto_properties` and `sepa_bank_account` on `v2.money_management.FinancialAddressCreateParams` +* ⚠️ Add support for new value `bank_account` on enum `v2.money_management.FinancialAddressCreateParams.type` +* ⚠️ Remove support for values `ca_bank_account`, `gb_bank_account`, `mx_bank_account`, `sepa_bank_account`, and `us_bank_account` from enum `v2.money_management.FinancialAddressCreateParams.type` +* Add support for error type `MerchantNotGatedError` +* Add support for error code `merchant_not_enrolled` on `BlockedByStripeError` +* Add support for error codes `card_brand_not_supported`, `cryptogram_type_unsupported`, `network_token_not_active`, and `tokenization_not_supported` on `CannotProceedError` +* Add support for error codes `billing_contract_rate_limit_exceeded` and `cryptogram_rate_limit` on `RateLimitError` diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index c78bdabe9..b6725fccf 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -90b73b113ac83bfa223396806e725225c547b6e6 \ No newline at end of file +638708680336c05240c03b40897c5a750bffd773 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 80a86d0e6..ca8d9888b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2472 \ No newline at end of file +v2485 \ No newline at end of file diff --git a/examples/async_event_notification_handler_endpoint.py b/examples/async_event_notification_handler_endpoint.py index 2cad998ed..3a7f6a9ec 100644 --- a/examples/async_event_notification_handler_endpoint.py +++ b/examples/async_event_notification_handler_endpoint.py @@ -22,7 +22,7 @@ app = FastAPI() api_key = os.environ.get("STRIPE_API_KEY", "") -webhook_secret = os.environ.get("WEBHOOK_SECRET", "") +webhook_secret = os.environ["WEBHOOK_SECRET"] # Webhooks can be delivered more than once, so we track ids we've already # processed. In production, back this with something durable and shared diff --git a/examples/event_notification_handler_endpoint.py b/examples/event_notification_handler_endpoint.py index c1db46f13..b33b845b2 100644 --- a/examples/event_notification_handler_endpoint.py +++ b/examples/event_notification_handler_endpoint.py @@ -19,7 +19,7 @@ app = Flask(__name__) api_key = os.environ.get("STRIPE_API_KEY", "") -webhook_secret = os.environ.get("WEBHOOK_SECRET", "") +webhook_secret = os.environ["WEBHOOK_SECRET"] # Webhooks can be delivered more than once, so we track ids we've already # processed. In production, back this with something durable and shared diff --git a/examples/event_notification_webhook_handler.py b/examples/event_notification_webhook_handler.py index 16264a997..a9d288455 100644 --- a/examples/event_notification_webhook_handler.py +++ b/examples/event_notification_webhook_handler.py @@ -27,7 +27,7 @@ app = Flask(__name__) api_key = os.environ.get("STRIPE_API_KEY", "") -webhook_secret = os.environ.get("WEBHOOK_SECRET", "") +webhook_secret = os.environ["WEBHOOK_SECRET"] client = StripeClient(api_key) diff --git a/examples/webhooks.py b/examples/webhooks.py index 79352b1a6..5f393bf00 100644 --- a/examples/webhooks.py +++ b/examples/webhooks.py @@ -6,7 +6,7 @@ # this is for handling v1-style Snapshot Events. # To handle v2-style Events, see `event_notification_webhook_handler.py` -webhook_secret = os.environ.get("WEBHOOK_SECRET") +webhook_secret = os.environ["WEBHOOK_SECRET"] app = Flask(__name__) diff --git a/pyproject.toml b/pyproject.toml index e0c0b18cb..3f86eec08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ reportUnnecessaryComparison = true reportUnnecessaryContains = true reportUnnecessaryIsInstance = true reportPrivateImportUsage = true -reportUnnecessaryTypeIgnoreComment = true +reportUnnecessaryTypeIgnoreComment = false [tool.mypy] follow_imports = "silent" diff --git a/stripe/__init__.py b/stripe/__init__.py index 9a2c57720..d8791f859 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -364,6 +364,7 @@ def add_beta_version( InvalidPaymentMethodError as InvalidPaymentMethodError, InvalidPayoutMethodError as InvalidPayoutMethodError, InvalidRequestError as InvalidRequestError, + MerchantNotGatedError as MerchantNotGatedError, NonZeroBalanceError as NonZeroBalanceError, NotCancelableError as NotCancelableError, PermissionError as PermissionError, @@ -871,6 +872,7 @@ def add_beta_version( "InvalidPaymentMethodError": ("stripe._error", False), "InvalidPayoutMethodError": ("stripe._error", False), "InvalidRequestError": ("stripe._error", False), + "MerchantNotGatedError": ("stripe._error", False), "NonZeroBalanceError": ("stripe._error", False), "NotCancelableError": ("stripe._error", False), "PermissionError": ("stripe._error", False), diff --git a/stripe/_account.py b/stripe/_account.py index 987928f87..7f5395435 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -2194,7 +2194,7 @@ async def list_async( @classmethod def _cls_persons( - cls, account: str, **params: Unpack["AccountPersonsParams"] + cls, account: str, /, **params: Unpack["AccountPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -2213,7 +2213,7 @@ def _cls_persons( @overload @staticmethod def persons( - account: str, **params: Unpack["AccountPersonsParams"] + account: str, /, **params: Unpack["AccountPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -2249,7 +2249,7 @@ def persons( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_persons_async( - cls, account: str, **params: Unpack["AccountPersonsParams"] + cls, account: str, /, **params: Unpack["AccountPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -2268,7 +2268,7 @@ async def _cls_persons_async( @overload @staticmethod async def persons_async( - account: str, **params: Unpack["AccountPersonsParams"] + account: str, /, **params: Unpack["AccountPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -2304,7 +2304,7 @@ async def persons_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_reject( - cls, account: str, **params: Unpack["AccountRejectParams"] + cls, account: str, /, **params: Unpack["AccountRejectParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can reject accounts that you have flagged as suspicious. @@ -2325,7 +2325,7 @@ def _cls_reject( @overload @staticmethod def reject( - account: str, **params: Unpack["AccountRejectParams"] + account: str, /, **params: Unpack["AccountRejectParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can reject accounts that you have flagged as suspicious. @@ -2365,7 +2365,7 @@ def reject( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_reject_async( - cls, account: str, **params: Unpack["AccountRejectParams"] + cls, account: str, /, **params: Unpack["AccountRejectParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can reject accounts that you have flagged as suspicious. @@ -2386,7 +2386,7 @@ async def _cls_reject_async( @overload @staticmethod async def reject_async( - account: str, **params: Unpack["AccountRejectParams"] + account: str, /, **params: Unpack["AccountRejectParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can reject accounts that you have flagged as suspicious. @@ -2428,7 +2428,7 @@ async def reject_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_unreject( - cls, account: str, **params: Unpack["AccountUnrejectParams"] + cls, account: str, /, **params: Unpack["AccountUnrejectParams"] ) -> "Account": """ With Connect, you can unreject accounts that you have previously rejected. @@ -2451,7 +2451,7 @@ def _cls_unreject( @overload @staticmethod def unreject( - account: str, **params: Unpack["AccountUnrejectParams"] + account: str, /, **params: Unpack["AccountUnrejectParams"] ) -> "Account": """ With Connect, you can unreject accounts that you have previously rejected. @@ -2497,7 +2497,7 @@ def unreject( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_unreject_async( - cls, account: str, **params: Unpack["AccountUnrejectParams"] + cls, account: str, /, **params: Unpack["AccountUnrejectParams"] ) -> "Account": """ With Connect, you can unreject accounts that you have previously rejected. @@ -2520,7 +2520,7 @@ async def _cls_unreject_async( @overload @staticmethod async def unreject_async( - account: str, **params: Unpack["AccountUnrejectParams"] + account: str, /, **params: Unpack["AccountUnrejectParams"] ) -> "Account": """ With Connect, you can unreject accounts that you have previously rejected. @@ -2618,7 +2618,7 @@ def serialize(self, previous): @classmethod def list_capabilities( - cls, account: str, **params: Unpack["AccountListCapabilitiesParams"] + cls, account: str, /, **params: Unpack["AccountListCapabilitiesParams"] ) -> ListObject["Capability"]: """ Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first. @@ -2636,7 +2636,7 @@ def list_capabilities( @classmethod async def list_capabilities_async( - cls, account: str, **params: Unpack["AccountListCapabilitiesParams"] + cls, account: str, /, **params: Unpack["AccountListCapabilitiesParams"] ) -> ListObject["Capability"]: """ Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first. @@ -2657,6 +2657,7 @@ def retrieve_capability( cls, account: str, capability: str, + /, **params: Unpack["AccountRetrieveCapabilityParams"], ) -> "Capability": """ @@ -2679,6 +2680,7 @@ async def retrieve_capability_async( cls, account: str, capability: str, + /, **params: Unpack["AccountRetrieveCapabilityParams"], ) -> "Capability": """ @@ -2701,6 +2703,7 @@ def modify_capability( cls, account: str, capability: str, + /, **params: Unpack["AccountModifyCapabilityParams"], ) -> "Capability": """ @@ -2723,6 +2726,7 @@ async def modify_capability_async( cls, account: str, capability: str, + /, **params: Unpack["AccountModifyCapabilityParams"], ) -> "Capability": """ @@ -2745,6 +2749,7 @@ def delete_external_account( cls, account: str, id: str, + /, **params: Unpack["AccountDeleteExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ @@ -2766,6 +2771,7 @@ async def delete_external_account_async( cls, account: str, id: str, + /, **params: Unpack["AccountDeleteExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ @@ -2787,6 +2793,7 @@ def retrieve_external_account( cls, account: str, id: str, + /, **params: Unpack["AccountRetrieveExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ @@ -2808,6 +2815,7 @@ async def retrieve_external_account_async( cls, account: str, id: str, + /, **params: Unpack["AccountRetrieveExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ @@ -2829,6 +2837,7 @@ def modify_external_account( cls, account: str, id: str, + /, **params: Unpack["AccountModifyExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ @@ -2857,6 +2866,7 @@ async def modify_external_account_async( cls, account: str, id: str, + /, **params: Unpack["AccountModifyExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ @@ -2884,6 +2894,7 @@ async def modify_external_account_async( def list_external_accounts( cls, account: str, + /, **params: Unpack["AccountListExternalAccountsParams"], ) -> ListObject[Union["BankAccount", "Card"]]: """ @@ -2904,6 +2915,7 @@ def list_external_accounts( async def list_external_accounts_async( cls, account: str, + /, **params: Unpack["AccountListExternalAccountsParams"], ) -> ListObject[Union["BankAccount", "Card"]]: """ @@ -2924,6 +2936,7 @@ async def list_external_accounts_async( def create_external_account( cls, account: str, + /, **params: Unpack["AccountCreateExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ @@ -2944,6 +2957,7 @@ def create_external_account( async def create_external_account_async( cls, account: str, + /, **params: Unpack["AccountCreateExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ @@ -2962,7 +2976,7 @@ async def create_external_account_async( @classmethod def create_login_link( - cls, account: str, **params: Unpack["AccountCreateLoginLinkParams"] + cls, account: str, /, **params: Unpack["AccountCreateLoginLinkParams"] ) -> "LoginLink": """ Creates a login link for a connected account to access the Express Dashboard. @@ -2982,7 +2996,7 @@ def create_login_link( @classmethod async def create_login_link_async( - cls, account: str, **params: Unpack["AccountCreateLoginLinkParams"] + cls, account: str, /, **params: Unpack["AccountCreateLoginLinkParams"] ) -> "LoginLink": """ Creates a login link for a connected account to access the Express Dashboard. @@ -3005,6 +3019,7 @@ def delete_person( cls, account: str, person: str, + /, **params: Unpack["AccountDeletePersonParams"], ) -> "Person": """ @@ -3026,6 +3041,7 @@ async def delete_person_async( cls, account: str, person: str, + /, **params: Unpack["AccountDeletePersonParams"], ) -> "Person": """ @@ -3047,6 +3063,7 @@ def retrieve_person( cls, account: str, person: str, + /, **params: Unpack["AccountRetrievePersonParams"], ) -> "Person": """ @@ -3068,6 +3085,7 @@ async def retrieve_person_async( cls, account: str, person: str, + /, **params: Unpack["AccountRetrievePersonParams"], ) -> "Person": """ @@ -3089,6 +3107,7 @@ def modify_person( cls, account: str, person: str, + /, **params: Unpack["AccountModifyPersonParams"], ) -> "Person": """ @@ -3110,6 +3129,7 @@ async def modify_person_async( cls, account: str, person: str, + /, **params: Unpack["AccountModifyPersonParams"], ) -> "Person": """ @@ -3128,7 +3148,7 @@ async def modify_person_async( @classmethod def list_persons( - cls, account: str, **params: Unpack["AccountListPersonsParams"] + cls, account: str, /, **params: Unpack["AccountListPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -3146,7 +3166,7 @@ def list_persons( @classmethod async def list_persons_async( - cls, account: str, **params: Unpack["AccountListPersonsParams"] + cls, account: str, /, **params: Unpack["AccountListPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -3164,7 +3184,7 @@ async def list_persons_async( @classmethod def create_person( - cls, account: str, **params: Unpack["AccountCreatePersonParams"] + cls, account: str, /, **params: Unpack["AccountCreatePersonParams"] ) -> "Person": """ Creates a new person. @@ -3182,7 +3202,7 @@ def create_person( @classmethod async def create_person_async( - cls, account: str, **params: Unpack["AccountCreatePersonParams"] + cls, account: str, /, **params: Unpack["AccountCreatePersonParams"] ) -> "Person": """ Creates a new person. @@ -3200,7 +3220,10 @@ async def create_person_async( @classmethod def retrieve_signal( - cls, account_id: str, **params: Unpack["AccountRetrieveSignalParams"] + cls, + account_id: str, + /, + **params: Unpack["AccountRetrieveSignalParams"], ) -> "AccountSignals": """ Retrieves the account's Signal objects @@ -3218,7 +3241,10 @@ def retrieve_signal( @classmethod async def retrieve_signal_async( - cls, account_id: str, **params: Unpack["AccountRetrieveSignalParams"] + cls, + account_id: str, + /, + **params: Unpack["AccountRetrieveSignalParams"], ) -> "AccountSignals": """ Retrieves the account's Signal objects diff --git a/stripe/_account_capability_service.py b/stripe/_account_capability_service.py index afe33c8c4..9c58c1a93 100644 --- a/stripe/_account_capability_service.py +++ b/stripe/_account_capability_service.py @@ -24,6 +24,7 @@ class AccountCapabilityService(StripeService): def list( self, account: str, + /, params: Optional["AccountCapabilityListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[Capability]": @@ -46,6 +47,7 @@ def list( async def list_async( self, account: str, + /, params: Optional["AccountCapabilityListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[Capability]": @@ -69,6 +71,7 @@ def retrieve( self, account: str, capability: str, + /, params: Optional["AccountCapabilityRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Capability": @@ -93,6 +96,7 @@ async def retrieve_async( self, account: str, capability: str, + /, params: Optional["AccountCapabilityRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Capability": @@ -117,6 +121,7 @@ def update( self, account: str, capability: str, + /, params: Optional["AccountCapabilityUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Capability": @@ -141,6 +146,7 @@ async def update_async( self, account: str, capability: str, + /, params: Optional["AccountCapabilityUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Capability": diff --git a/stripe/_account_external_account_service.py b/stripe/_account_external_account_service.py index c599096f0..4d78dae7a 100644 --- a/stripe/_account_external_account_service.py +++ b/stripe/_account_external_account_service.py @@ -33,6 +33,7 @@ def delete( self, account: str, id: str, + /, params: Optional["AccountExternalAccountDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[BankAccount, Card]": @@ -57,6 +58,7 @@ async def delete_async( self, account: str, id: str, + /, params: Optional["AccountExternalAccountDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[BankAccount, Card]": @@ -81,6 +83,7 @@ def retrieve( self, account: str, id: str, + /, params: Optional["AccountExternalAccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[BankAccount, Card]": @@ -105,6 +108,7 @@ async def retrieve_async( self, account: str, id: str, + /, params: Optional["AccountExternalAccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[BankAccount, Card]": @@ -129,6 +133,7 @@ def update( self, account: str, id: str, + /, params: Optional["AccountExternalAccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[BankAccount, Card]": @@ -160,6 +165,7 @@ async def update_async( self, account: str, id: str, + /, params: Optional["AccountExternalAccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[BankAccount, Card]": @@ -190,6 +196,7 @@ async def update_async( def list( self, account: str, + /, params: Optional["AccountExternalAccountListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[Union[BankAccount, Card]]": @@ -212,6 +219,7 @@ def list( async def list_async( self, account: str, + /, params: Optional["AccountExternalAccountListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[Union[BankAccount, Card]]": @@ -234,6 +242,7 @@ async def list_async( def create( self, account: str, + /, params: "AccountExternalAccountCreateParams", options: Optional["RequestOptions"] = None, ) -> "Union[BankAccount, Card]": @@ -256,6 +265,7 @@ def create( async def create_async( self, account: str, + /, params: "AccountExternalAccountCreateParams", options: Optional["RequestOptions"] = None, ) -> "Union[BankAccount, Card]": diff --git a/stripe/_account_login_link_service.py b/stripe/_account_login_link_service.py index 39212510d..bee20933e 100644 --- a/stripe/_account_login_link_service.py +++ b/stripe/_account_login_link_service.py @@ -17,6 +17,7 @@ class AccountLoginLinkService(StripeService): def create( self, account: str, + /, params: Optional["AccountLoginLinkCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "LoginLink": @@ -41,6 +42,7 @@ def create( async def create_async( self, account: str, + /, params: Optional["AccountLoginLinkCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "LoginLink": diff --git a/stripe/_account_notice_service.py b/stripe/_account_notice_service.py index 44604204a..e28f14738 100644 --- a/stripe/_account_notice_service.py +++ b/stripe/_account_notice_service.py @@ -62,6 +62,7 @@ async def list_async( def retrieve( self, account_notice: str, + /, params: Optional["AccountNoticeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountNotice": @@ -84,6 +85,7 @@ def retrieve( async def retrieve_async( self, account_notice: str, + /, params: Optional["AccountNoticeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountNotice": @@ -106,6 +108,7 @@ async def retrieve_async( def update( self, account_notice: str, + /, params: "AccountNoticeUpdateParams", options: Optional["RequestOptions"] = None, ) -> "AccountNotice": @@ -128,6 +131,7 @@ def update( async def update_async( self, account_notice: str, + /, params: "AccountNoticeUpdateParams", options: Optional["RequestOptions"] = None, ) -> "AccountNotice": diff --git a/stripe/_account_person_service.py b/stripe/_account_person_service.py index 1720d8c1a..d0b6748fa 100644 --- a/stripe/_account_person_service.py +++ b/stripe/_account_person_service.py @@ -31,6 +31,7 @@ def delete( self, account: str, person: str, + /, params: Optional["AccountPersonDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Person": @@ -55,6 +56,7 @@ async def delete_async( self, account: str, person: str, + /, params: Optional["AccountPersonDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Person": @@ -79,6 +81,7 @@ def retrieve( self, account: str, person: str, + /, params: Optional["AccountPersonRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Person": @@ -103,6 +106,7 @@ async def retrieve_async( self, account: str, person: str, + /, params: Optional["AccountPersonRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Person": @@ -127,6 +131,7 @@ def update( self, account: str, person: str, + /, params: Optional["AccountPersonUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Person": @@ -151,6 +156,7 @@ async def update_async( self, account: str, person: str, + /, params: Optional["AccountPersonUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Person": @@ -174,6 +180,7 @@ async def update_async( def list( self, account: str, + /, params: Optional["AccountPersonListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[Person]": @@ -196,6 +203,7 @@ def list( async def list_async( self, account: str, + /, params: Optional["AccountPersonListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[Person]": @@ -218,6 +226,7 @@ async def list_async( def create( self, account: str, + /, params: Optional["AccountPersonCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Person": @@ -240,6 +249,7 @@ def create( async def create_async( self, account: str, + /, params: Optional["AccountPersonCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Person": diff --git a/stripe/_account_service.py b/stripe/_account_service.py index 8e14fdfa1..a04420539 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -78,6 +78,7 @@ def __getattr__(self, name): def delete( self, account: str, + /, params: Optional["AccountDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -104,6 +105,7 @@ def delete( async def delete_async( self, account: str, + /, params: Optional["AccountDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -130,6 +132,7 @@ async def delete_async( def retrieve( self, account: str, + /, params: Optional["AccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -150,6 +153,7 @@ def retrieve( async def retrieve_async( self, account: str, + /, params: Optional["AccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -170,6 +174,7 @@ async def retrieve_async( def update( self, account: str, + /, params: Optional["AccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -202,6 +207,7 @@ def update( async def update_async( self, account: str, + /, params: Optional["AccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -358,6 +364,7 @@ async def create_async( def reject( self, account: str, + /, params: "AccountRejectParams", options: Optional["RequestOptions"] = None, ) -> "Account": @@ -382,6 +389,7 @@ def reject( async def reject_async( self, account: str, + /, params: "AccountRejectParams", options: Optional["RequestOptions"] = None, ) -> "Account": @@ -406,6 +414,7 @@ async def reject_async( def unreject( self, account: str, + /, params: Optional["AccountUnrejectParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -432,6 +441,7 @@ def unreject( async def unreject_async( self, account: str, + /, params: Optional["AccountUnrejectParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -458,6 +468,7 @@ async def unreject_async( def serialize_batch_delete( self, account: str, + /, params: Optional["AccountDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -482,6 +493,7 @@ def serialize_batch_delete( def serialize_batch_update( self, account: str, + /, params: Optional["AccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 68a08f942..19c4ce1a9 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -424,17 +424,6 @@ class Features(StripeObject): features: Features _inner_class_types = {"features": Features} - class NestingDemo(StripeObject): - class Features(StripeObject): - pass - - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: Features - _inner_class_types = {"features": Features} - class NetworkCostPassthroughReport(StripeObject): class Features(StripeObject): pass @@ -735,10 +724,6 @@ class Features(StripeObject): instant_payouts_promotion: InstantPayoutsPromotion issuing_card: IssuingCard issuing_cards_list: IssuingCardsList - nesting_demo: Optional[NestingDemo] - """ - Configuration for the [Nestingdemo](https://docs.stripe.com/connect/supported-embedded-components/nesting-demo/) embedded component. - """ network_cost_passthrough_report: Optional[NetworkCostPassthroughReport] """ Configuration for the [network cost passthrough report](https://docs.stripe.com/connect/supported-embedded-components/network-cost-passthrough-report/) embedded component. @@ -788,7 +773,6 @@ class Features(StripeObject): "instant_payouts_promotion": InstantPayoutsPromotion, "issuing_card": IssuingCard, "issuing_cards_list": IssuingCardsList, - "nesting_demo": NestingDemo, "network_cost_passthrough_report": NetworkCostPassthroughReport, "notification_banner": NotificationBanner, "payment_details": PaymentDetails, @@ -837,7 +821,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", @@ -853,7 +837,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/_account_signals_service.py b/stripe/_account_signals_service.py index 9b0c4b4ed..37d242bed 100644 --- a/stripe/_account_signals_service.py +++ b/stripe/_account_signals_service.py @@ -17,6 +17,7 @@ class AccountSignalsService(StripeService): def retrieve( self, account_id: str, + /, params: Optional["AccountSignalsRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountSignals": @@ -39,6 +40,7 @@ def retrieve( async def retrieve_async( self, account_id: str, + /, params: Optional["AccountSignalsRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountSignals": diff --git a/stripe/_api_requestor.py b/stripe/_api_requestor.py index 912b1a425..0040d5682 100644 --- a/stripe/_api_requestor.py +++ b/stripe/_api_requestor.py @@ -430,6 +430,8 @@ def specific_v2_api_error(self, rbody, rcode, resp, rheaders, error_data): ) elif type == "invalid_payout_method": return error.InvalidPayoutMethodError(**error_args) + elif type == "merchant_not_gated": + return error.MerchantNotGatedError(**error_args) elif type == "non_zero_balance": return error.NonZeroBalanceError(**error_args) elif type == "not_cancelable": @@ -539,6 +541,7 @@ def specific_oauth_error(self, rbody, rcode, resp, rheaders, error_code): ("CODEX_CI", "codex_cli"), ("CURSOR_AGENT", "cursor"), ("GEMINI_CLI", "gemini_cli"), + ("HERMES_AGENT", "hermes"), ("OPENCLAW_SHELL", "openclaw"), ("OPENCODE", "open_code"), # aiAgents: The end of the section generated from our OpenAPI spec diff --git a/stripe/_api_version.py b/stripe/_api_version.py index 15868d4ff..f5a1201b1 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.preview" + CURRENT = "2026-09-16.preview" CURRENT_MAJOR = "" diff --git a/stripe/_apple_pay_domain_service.py b/stripe/_apple_pay_domain_service.py index 6c72f7d65..beb0b6559 100644 --- a/stripe/_apple_pay_domain_service.py +++ b/stripe/_apple_pay_domain_service.py @@ -27,6 +27,7 @@ class ApplePayDomainService(StripeService): def delete( self, domain: str, + /, params: Optional["ApplePayDomainDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApplePayDomain": @@ -49,6 +50,7 @@ def delete( async def delete_async( self, domain: str, + /, params: Optional["ApplePayDomainDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApplePayDomain": @@ -71,6 +73,7 @@ async def delete_async( def retrieve( self, domain: str, + /, params: Optional["ApplePayDomainRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApplePayDomain": @@ -93,6 +96,7 @@ def retrieve( async def retrieve_async( self, domain: str, + /, params: Optional["ApplePayDomainRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApplePayDomain": diff --git a/stripe/_application_fee.py b/stripe/_application_fee.py index 14011b766..6673192e1 100644 --- a/stripe/_application_fee.py +++ b/stripe/_application_fee.py @@ -187,7 +187,7 @@ async def list_async( @classmethod def _cls_refund( - cls, id: str, **params: Unpack["ApplicationFeeRefundParams"] + cls, id: str, /, **params: Unpack["ApplicationFeeRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. @@ -212,7 +212,7 @@ def _cls_refund( @overload @staticmethod def refund( - id: str, **params: Unpack["ApplicationFeeRefundParams"] + id: str, /, **params: Unpack["ApplicationFeeRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. @@ -272,7 +272,7 @@ def refund( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_refund_async( - cls, id: str, **params: Unpack["ApplicationFeeRefundParams"] + cls, id: str, /, **params: Unpack["ApplicationFeeRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. @@ -297,7 +297,7 @@ async def _cls_refund_async( @overload @staticmethod async def refund_async( - id: str, **params: Unpack["ApplicationFeeRefundParams"] + id: str, /, **params: Unpack["ApplicationFeeRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. @@ -382,6 +382,7 @@ def retrieve_refund( cls, fee: str, id: str, + /, **params: Unpack["ApplicationFeeRetrieveRefundParams"], ) -> "ApplicationFeeRefund": """ @@ -403,6 +404,7 @@ async def retrieve_refund_async( cls, fee: str, id: str, + /, **params: Unpack["ApplicationFeeRetrieveRefundParams"], ) -> "ApplicationFeeRefund": """ @@ -424,6 +426,7 @@ def modify_refund( cls, fee: str, id: str, + /, **params: Unpack["ApplicationFeeModifyRefundParams"], ) -> "ApplicationFeeRefund": """ @@ -447,6 +450,7 @@ async def modify_refund_async( cls, fee: str, id: str, + /, **params: Unpack["ApplicationFeeModifyRefundParams"], ) -> "ApplicationFeeRefund": """ @@ -467,7 +471,7 @@ async def modify_refund_async( @classmethod def list_refunds( - cls, id: str, **params: Unpack["ApplicationFeeListRefundsParams"] + cls, id: str, /, **params: Unpack["ApplicationFeeListRefundsParams"] ) -> ListObject["ApplicationFeeRefund"]: """ You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds. @@ -483,7 +487,7 @@ def list_refunds( @classmethod async def list_refunds_async( - cls, id: str, **params: Unpack["ApplicationFeeListRefundsParams"] + cls, id: str, /, **params: Unpack["ApplicationFeeListRefundsParams"] ) -> ListObject["ApplicationFeeRefund"]: """ You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds. @@ -499,7 +503,7 @@ async def list_refunds_async( @classmethod def create_refund( - cls, id: str, **params: Unpack["ApplicationFeeCreateRefundParams"] + cls, id: str, /, **params: Unpack["ApplicationFeeCreateRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. @@ -523,7 +527,7 @@ def create_refund( @classmethod async def create_refund_async( - cls, id: str, **params: Unpack["ApplicationFeeCreateRefundParams"] + cls, id: str, /, **params: Unpack["ApplicationFeeCreateRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. diff --git a/stripe/_application_fee_refund_service.py b/stripe/_application_fee_refund_service.py index 1f109689e..ed0180ce1 100644 --- a/stripe/_application_fee_refund_service.py +++ b/stripe/_application_fee_refund_service.py @@ -28,6 +28,7 @@ def retrieve( self, fee: str, id: str, + /, params: Optional["ApplicationFeeRefundRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApplicationFeeRefund": @@ -52,6 +53,7 @@ async def retrieve_async( self, fee: str, id: str, + /, params: Optional["ApplicationFeeRefundRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApplicationFeeRefund": @@ -76,6 +78,7 @@ def update( self, fee: str, id: str, + /, params: Optional["ApplicationFeeRefundUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApplicationFeeRefund": @@ -102,6 +105,7 @@ async def update_async( self, fee: str, id: str, + /, params: Optional["ApplicationFeeRefundUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApplicationFeeRefund": @@ -127,6 +131,7 @@ async def update_async( def list( self, id: str, + /, params: Optional["ApplicationFeeRefundListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[ApplicationFeeRefund]": @@ -147,6 +152,7 @@ def list( async def list_async( self, id: str, + /, params: Optional["ApplicationFeeRefundListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[ApplicationFeeRefund]": @@ -167,6 +173,7 @@ async def list_async( def create( self, id: str, + /, params: Optional["ApplicationFeeRefundCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApplicationFeeRefund": @@ -195,6 +202,7 @@ def create( async def create_async( self, id: str, + /, params: Optional["ApplicationFeeRefundCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApplicationFeeRefund": diff --git a/stripe/_application_fee_service.py b/stripe/_application_fee_service.py index 814c3ad95..1926ea117 100644 --- a/stripe/_application_fee_service.py +++ b/stripe/_application_fee_service.py @@ -91,6 +91,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["ApplicationFeeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApplicationFee": @@ -111,6 +112,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ApplicationFeeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApplicationFee": diff --git a/stripe/_balance_transaction_service.py b/stripe/_balance_transaction_service.py index 2166a14fc..44c7eb0c1 100644 --- a/stripe/_balance_transaction_service.py +++ b/stripe/_balance_transaction_service.py @@ -63,6 +63,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["BalanceTransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BalanceTransaction": @@ -85,6 +86,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["BalanceTransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BalanceTransaction": diff --git a/stripe/_charge.py b/stripe/_charge.py index f9162fdaa..486032736 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -62,7 +62,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" @@ -967,7 +967,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. """ @@ -2519,6 +2519,10 @@ class Zip(StripeObject): sepa_credit_transfer: Optional[SepaCreditTransfer] sepa_debit: Optional[SepaDebit] sequra: Optional[Sequra] + shared_payment_granted_token: Optional[str] + """ + ID of the shared payment granted token used to make this payment. + """ shopeepay: Optional[Shopeepay] sofort: Optional[Sofort] stripe_account: Optional[StripeAccount] @@ -2888,14 +2892,10 @@ class TransferData(StripeObject): @classmethod def _cls_capture( - cls, charge: str, **params: Unpack["ChargeCaptureParams"] + 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", @@ -2911,25 +2911,17 @@ def _cls_capture( @overload @staticmethod def capture( - charge: str, **params: Unpack["ChargeCaptureParams"] + 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). """ ... @@ -2938,11 +2930,7 @@ def capture( # pyright: ignore[reportGeneralTypeIssues] 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", @@ -2957,14 +2945,10 @@ def capture( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_capture_async( - cls, charge: str, **params: Unpack["ChargeCaptureParams"] + 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", @@ -2980,14 +2964,10 @@ async def _cls_capture_async( @overload @staticmethod async def capture_async( - charge: str, **params: Unpack["ChargeCaptureParams"] + 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). """ ... @@ -2996,11 +2976,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). """ ... @@ -3009,11 +2985,7 @@ async def capture_async( # pyright: ignore[reportGeneralTypeIssues] 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", @@ -3029,9 +3001,7 @@ async def capture_async( # pyright: ignore[reportGeneralTypeIssues] @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", @@ -3047,9 +3017,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", @@ -3217,6 +3185,7 @@ def retrieve_refund( cls, charge: str, refund: str, + /, **params: Unpack["ChargeRetrieveRefundParams"], ) -> "Refund": """ @@ -3238,6 +3207,7 @@ async def retrieve_refund_async( cls, charge: str, refund: str, + /, **params: Unpack["ChargeRetrieveRefundParams"], ) -> "Refund": """ @@ -3256,7 +3226,7 @@ async def retrieve_refund_async( @classmethod def list_refunds( - cls, charge: str, **params: Unpack["ChargeListRefundsParams"] + cls, charge: str, /, **params: Unpack["ChargeListRefundsParams"] ) -> ListObject["Refund"]: """ You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds. @@ -3274,7 +3244,7 @@ def list_refunds( @classmethod async def list_refunds_async( - cls, charge: str, **params: Unpack["ChargeListRefundsParams"] + cls, charge: str, /, **params: Unpack["ChargeListRefundsParams"] ) -> ListObject["Refund"]: """ You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds. diff --git a/stripe/_charge_service.py b/stripe/_charge_service.py index 2fca76593..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", @@ -102,6 +98,7 @@ async def create_async( def retrieve( self, charge: str, + /, params: Optional["ChargeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Charge": @@ -122,6 +119,7 @@ def retrieve( async def retrieve_async( self, charge: str, + /, params: Optional["ChargeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Charge": @@ -142,6 +140,7 @@ async def retrieve_async( def update( self, charge: str, + /, params: Optional["ChargeUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Charge": @@ -162,6 +161,7 @@ def update( async def update_async( self, charge: str, + /, params: Optional["ChargeUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Charge": @@ -226,15 +226,12 @@ async def search_async( def capture( self, charge: str, + /, params: Optional["ChargeCaptureParams"] = None, 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", @@ -252,15 +249,12 @@ def capture( async def capture_async( self, charge: str, + /, params: Optional["ChargeCaptureParams"] = None, 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_service.py b/stripe/_confirmation_token_service.py index 066b43fcf..cccbceccd 100644 --- a/stripe/_confirmation_token_service.py +++ b/stripe/_confirmation_token_service.py @@ -17,6 +17,7 @@ class ConfirmationTokenService(StripeService): def retrieve( self, confirmation_token: str, + /, params: Optional["ConfirmationTokenRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ConfirmationToken": @@ -39,6 +40,7 @@ def retrieve( async def retrieve_async( self, confirmation_token: str, + /, params: Optional["ConfirmationTokenRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ConfirmationToken": diff --git a/stripe/_country_spec_service.py b/stripe/_country_spec_service.py index b5e14736e..135ca9160 100644 --- a/stripe/_country_spec_service.py +++ b/stripe/_country_spec_service.py @@ -57,6 +57,7 @@ async def list_async( def retrieve( self, country: str, + /, params: Optional["CountrySpecRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CountrySpec": @@ -79,6 +80,7 @@ def retrieve( async def retrieve_async( self, country: str, + /, params: Optional["CountrySpecRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CountrySpec": diff --git a/stripe/_coupon_service.py b/stripe/_coupon_service.py index d3fecc3f1..d75ba7b2a 100644 --- a/stripe/_coupon_service.py +++ b/stripe/_coupon_service.py @@ -23,6 +23,7 @@ class CouponService(StripeService): def delete( self, coupon: str, + /, params: Optional["CouponDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Coupon": @@ -43,6 +44,7 @@ def delete( async def delete_async( self, coupon: str, + /, params: Optional["CouponDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Coupon": @@ -63,6 +65,7 @@ async def delete_async( def retrieve( self, coupon: str, + /, params: Optional["CouponRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Coupon": @@ -83,6 +86,7 @@ def retrieve( async def retrieve_async( self, coupon: str, + /, params: Optional["CouponRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Coupon": @@ -103,6 +107,7 @@ async def retrieve_async( def update( self, coupon: str, + /, params: Optional["CouponUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Coupon": @@ -123,6 +128,7 @@ def update( async def update_async( self, coupon: str, + /, params: Optional["CouponUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Coupon": @@ -223,6 +229,7 @@ async def create_async( def serialize_batch_delete( self, coupon: str, + /, params: Optional["CouponDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -247,6 +254,7 @@ def serialize_batch_delete( def serialize_batch_update( self, coupon: str, + /, params: Optional["CouponUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_credit_note.py b/stripe/_credit_note.py index 3a82b6822..bc79a03a6 100644 --- a/stripe/_credit_note.py +++ b/stripe/_credit_note.py @@ -604,7 +604,7 @@ async def retrieve_async( @classmethod def _cls_void_credit_note( - cls, id: str, **params: Unpack["CreditNoteVoidCreditNoteParams"] + cls, id: str, /, **params: Unpack["CreditNoteVoidCreditNoteParams"] ) -> "CreditNote": """ Marks a credit note as void. Learn more about [voiding credit notes](https://docs.stripe.com/docs/billing/invoices/credit-notes#voiding). @@ -621,7 +621,7 @@ def _cls_void_credit_note( @overload @staticmethod def void_credit_note( - id: str, **params: Unpack["CreditNoteVoidCreditNoteParams"] + id: str, /, **params: Unpack["CreditNoteVoidCreditNoteParams"] ) -> "CreditNote": """ Marks a credit note as void. Learn more about [voiding credit notes](https://docs.stripe.com/docs/billing/invoices/credit-notes#voiding). @@ -657,7 +657,7 @@ def void_credit_note( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_void_credit_note_async( - cls, id: str, **params: Unpack["CreditNoteVoidCreditNoteParams"] + cls, id: str, /, **params: Unpack["CreditNoteVoidCreditNoteParams"] ) -> "CreditNote": """ Marks a credit note as void. Learn more about [voiding credit notes](https://docs.stripe.com/docs/billing/invoices/credit-notes#voiding). @@ -674,7 +674,7 @@ async def _cls_void_credit_note_async( @overload @staticmethod async def void_credit_note_async( - id: str, **params: Unpack["CreditNoteVoidCreditNoteParams"] + id: str, /, **params: Unpack["CreditNoteVoidCreditNoteParams"] ) -> "CreditNote": """ Marks a credit note as void. Learn more about [voiding credit notes](https://docs.stripe.com/docs/billing/invoices/credit-notes#voiding). @@ -710,7 +710,7 @@ async def void_credit_note_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list_lines( - cls, credit_note: str, **params: Unpack["CreditNoteListLinesParams"] + cls, credit_note: str, /, **params: Unpack["CreditNoteListLinesParams"] ) -> ListObject["CreditNoteLineItem"]: """ When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -728,7 +728,7 @@ def list_lines( @classmethod async def list_lines_async( - cls, credit_note: str, **params: Unpack["CreditNoteListLinesParams"] + cls, credit_note: str, /, **params: Unpack["CreditNoteListLinesParams"] ) -> ListObject["CreditNoteLineItem"]: """ When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/stripe/_credit_note_line_item_service.py b/stripe/_credit_note_line_item_service.py index e5b85b2d5..ea1f5d098 100644 --- a/stripe/_credit_note_line_item_service.py +++ b/stripe/_credit_note_line_item_service.py @@ -18,6 +18,7 @@ class CreditNoteLineItemService(StripeService): def list( self, credit_note: str, + /, params: Optional["CreditNoteLineItemListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CreditNoteLineItem]": @@ -40,6 +41,7 @@ def list( async def list_async( self, credit_note: str, + /, params: Optional["CreditNoteLineItemListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CreditNoteLineItem]": diff --git a/stripe/_credit_note_service.py b/stripe/_credit_note_service.py index 804c35656..68c3c9b90 100644 --- a/stripe/_credit_note_service.py +++ b/stripe/_credit_note_service.py @@ -172,6 +172,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["CreditNoteRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditNote": @@ -192,6 +193,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["CreditNoteRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditNote": @@ -212,6 +214,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["CreditNoteUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditNote": @@ -232,6 +235,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["CreditNoteUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditNote": @@ -290,6 +294,7 @@ async def preview_async( def void_credit_note( self, id: str, + /, params: Optional["CreditNoteVoidCreditNoteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditNote": @@ -310,6 +315,7 @@ def void_credit_note( async def void_credit_note_async( self, id: str, + /, params: Optional["CreditNoteVoidCreditNoteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditNote": diff --git a/stripe/_customer.py b/stripe/_customer.py index ebcdd88c2..25362e481 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -486,6 +486,7 @@ async def create_async( def _cls_create_funding_instructions( cls, customer: str, + /, **params: Unpack["CustomerCreateFundingInstructionsParams"], ) -> "FundingInstructions": """ @@ -508,6 +509,7 @@ def _cls_create_funding_instructions( @staticmethod def create_funding_instructions( customer: str, + /, **params: Unpack["CustomerCreateFundingInstructionsParams"], ) -> "FundingInstructions": """ @@ -552,6 +554,7 @@ def create_funding_instructions( # pyright: ignore[reportGeneralTypeIssues] async def _cls_create_funding_instructions_async( cls, customer: str, + /, **params: Unpack["CustomerCreateFundingInstructionsParams"], ) -> "FundingInstructions": """ @@ -574,6 +577,7 @@ async def _cls_create_funding_instructions_async( @staticmethod async def create_funding_instructions_async( customer: str, + /, **params: Unpack["CustomerCreateFundingInstructionsParams"], ) -> "FundingInstructions": """ @@ -712,7 +716,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_delete_discount( - cls, customer: str, **params: Unpack["CustomerDeleteDiscountParams"] + cls, customer: str, /, **params: Unpack["CustomerDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a customer. @@ -731,7 +735,7 @@ def _cls_delete_discount( @overload @staticmethod def delete_discount( - customer: str, **params: Unpack["CustomerDeleteDiscountParams"] + customer: str, /, **params: Unpack["CustomerDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a customer. @@ -767,7 +771,7 @@ def delete_discount( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_discount_async( - cls, customer: str, **params: Unpack["CustomerDeleteDiscountParams"] + cls, customer: str, /, **params: Unpack["CustomerDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a customer. @@ -786,7 +790,7 @@ async def _cls_delete_discount_async( @overload @staticmethod async def delete_discount_async( - customer: str, **params: Unpack["CustomerDeleteDiscountParams"] + customer: str, /, **params: Unpack["CustomerDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a customer. @@ -864,6 +868,7 @@ async def list_async( def _cls_list_payment_methods( cls, customer: str, + /, **params: Unpack["CustomerListPaymentMethodsParams"], ) -> ListObject["PaymentMethod"]: """ @@ -883,7 +888,7 @@ def _cls_list_payment_methods( @overload @staticmethod def list_payment_methods( - customer: str, **params: Unpack["CustomerListPaymentMethodsParams"] + customer: str, /, **params: Unpack["CustomerListPaymentMethodsParams"] ) -> ListObject["PaymentMethod"]: """ Returns a list of PaymentMethods for a given Customer @@ -921,6 +926,7 @@ def list_payment_methods( # pyright: ignore[reportGeneralTypeIssues] async def _cls_list_payment_methods_async( cls, customer: str, + /, **params: Unpack["CustomerListPaymentMethodsParams"], ) -> ListObject["PaymentMethod"]: """ @@ -940,7 +946,7 @@ async def _cls_list_payment_methods_async( @overload @staticmethod async def list_payment_methods_async( - customer: str, **params: Unpack["CustomerListPaymentMethodsParams"] + customer: str, /, **params: Unpack["CustomerListPaymentMethodsParams"] ) -> ListObject["PaymentMethod"]: """ Returns a list of PaymentMethods for a given Customer @@ -1039,6 +1045,7 @@ def _cls_retrieve_payment_method( cls, customer: str, payment_method: str, + /, **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ @@ -1061,6 +1068,7 @@ def _cls_retrieve_payment_method( def retrieve_payment_method( customer: str, payment_method: str, + /, **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ @@ -1072,6 +1080,7 @@ def retrieve_payment_method( def retrieve_payment_method( self, payment_method: str, + /, **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ @@ -1083,6 +1092,7 @@ def retrieve_payment_method( def retrieve_payment_method( # pyright: ignore[reportGeneralTypeIssues] self, payment_method: str, + /, **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ @@ -1105,6 +1115,7 @@ async def _cls_retrieve_payment_method_async( cls, customer: str, payment_method: str, + /, **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ @@ -1127,6 +1138,7 @@ async def _cls_retrieve_payment_method_async( async def retrieve_payment_method_async( customer: str, payment_method: str, + /, **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ @@ -1138,6 +1150,7 @@ async def retrieve_payment_method_async( async def retrieve_payment_method_async( self, payment_method: str, + /, **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ @@ -1149,6 +1162,7 @@ async def retrieve_payment_method_async( async def retrieve_payment_method_async( # pyright: ignore[reportGeneralTypeIssues] self, payment_method: str, + /, **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ @@ -1208,6 +1222,7 @@ async def search_auto_paging_iter_async( def list_balance_transactions( cls, customer: str, + /, **params: Unpack["CustomerListBalanceTransactionsParams"], ) -> ListObject["CustomerBalanceTransaction"]: """ @@ -1228,6 +1243,7 @@ def list_balance_transactions( async def list_balance_transactions_async( cls, customer: str, + /, **params: Unpack["CustomerListBalanceTransactionsParams"], ) -> ListObject["CustomerBalanceTransaction"]: """ @@ -1248,6 +1264,7 @@ async def list_balance_transactions_async( def create_balance_transaction( cls, customer: str, + /, **params: Unpack["CustomerCreateBalanceTransactionParams"], ) -> "CustomerBalanceTransaction": """ @@ -1268,6 +1285,7 @@ def create_balance_transaction( async def create_balance_transaction_async( cls, customer: str, + /, **params: Unpack["CustomerCreateBalanceTransactionParams"], ) -> "CustomerBalanceTransaction": """ @@ -1289,6 +1307,7 @@ def retrieve_balance_transaction( cls, customer: str, transaction: str, + /, **params: Unpack["CustomerRetrieveBalanceTransactionParams"], ) -> "CustomerBalanceTransaction": """ @@ -1311,6 +1330,7 @@ async def retrieve_balance_transaction_async( cls, customer: str, transaction: str, + /, **params: Unpack["CustomerRetrieveBalanceTransactionParams"], ) -> "CustomerBalanceTransaction": """ @@ -1333,6 +1353,7 @@ def modify_balance_transaction( cls, customer: str, transaction: str, + /, **params: Unpack["CustomerModifyBalanceTransactionParams"], ) -> "CustomerBalanceTransaction": """ @@ -1355,6 +1376,7 @@ async def modify_balance_transaction_async( cls, customer: str, transaction: str, + /, **params: Unpack["CustomerModifyBalanceTransactionParams"], ) -> "CustomerBalanceTransaction": """ @@ -1376,6 +1398,7 @@ async def modify_balance_transaction_async( def list_cash_balance_transactions( cls, customer: str, + /, **params: Unpack["CustomerListCashBalanceTransactionsParams"], ) -> ListObject["CustomerCashBalanceTransaction"]: """ @@ -1396,6 +1419,7 @@ def list_cash_balance_transactions( async def list_cash_balance_transactions_async( cls, customer: str, + /, **params: Unpack["CustomerListCashBalanceTransactionsParams"], ) -> ListObject["CustomerCashBalanceTransaction"]: """ @@ -1417,6 +1441,7 @@ def retrieve_cash_balance_transaction( cls, customer: str, transaction: str, + /, **params: Unpack["CustomerRetrieveCashBalanceTransactionParams"], ) -> "CustomerCashBalanceTransaction": """ @@ -1439,6 +1464,7 @@ async def retrieve_cash_balance_transaction_async( cls, customer: str, transaction: str, + /, **params: Unpack["CustomerRetrieveCashBalanceTransactionParams"], ) -> "CustomerCashBalanceTransaction": """ @@ -1461,6 +1487,7 @@ def delete_tax_exemption( cls, customer: str, id: str, + /, **params: Unpack["CustomerDeleteTaxExemptionParams"], ) -> "CustomerTaxExemption": """ @@ -1482,6 +1509,7 @@ async def delete_tax_exemption_async( cls, customer: str, id: str, + /, **params: Unpack["CustomerDeleteTaxExemptionParams"], ) -> "CustomerTaxExemption": """ @@ -1503,6 +1531,7 @@ def retrieve_tax_exemption( cls, customer: str, id: str, + /, **params: Unpack["CustomerRetrieveTaxExemptionParams"], ) -> "CustomerTaxExemption": """ @@ -1524,6 +1553,7 @@ async def retrieve_tax_exemption_async( cls, customer: str, id: str, + /, **params: Unpack["CustomerRetrieveTaxExemptionParams"], ) -> "CustomerTaxExemption": """ @@ -1542,7 +1572,10 @@ async def retrieve_tax_exemption_async( @classmethod def list_tax_exemptions( - cls, customer: str, **params: Unpack["CustomerListTaxExemptionsParams"] + cls, + customer: str, + /, + **params: Unpack["CustomerListTaxExemptionsParams"], ) -> ListObject["CustomerTaxExemption"]: """ List all location specific tax exemptions for a customer. @@ -1560,7 +1593,10 @@ def list_tax_exemptions( @classmethod async def list_tax_exemptions_async( - cls, customer: str, **params: Unpack["CustomerListTaxExemptionsParams"] + cls, + customer: str, + /, + **params: Unpack["CustomerListTaxExemptionsParams"], ) -> ListObject["CustomerTaxExemption"]: """ List all location specific tax exemptions for a customer. @@ -1580,6 +1616,7 @@ async def list_tax_exemptions_async( def create_tax_exemption( cls, customer: str, + /, **params: Unpack["CustomerCreateTaxExemptionParams"], ) -> "CustomerTaxExemption": """ @@ -1600,6 +1637,7 @@ def create_tax_exemption( async def create_tax_exemption_async( cls, customer: str, + /, **params: Unpack["CustomerCreateTaxExemptionParams"], ) -> "CustomerTaxExemption": """ @@ -1618,7 +1656,7 @@ async def create_tax_exemption_async( @classmethod def list_sources( - cls, customer: str, **params: Unpack["CustomerListSourcesParams"] + cls, customer: str, /, **params: Unpack["CustomerListSourcesParams"] ) -> ListObject[Union["Account", "BankAccount", "Card", "Source"]]: """ List sources for a specified customer. @@ -1636,7 +1674,7 @@ def list_sources( @classmethod async def list_sources_async( - cls, customer: str, **params: Unpack["CustomerListSourcesParams"] + cls, customer: str, /, **params: Unpack["CustomerListSourcesParams"] ) -> ListObject[Union["Account", "BankAccount", "Card", "Source"]]: """ List sources for a specified customer. @@ -1654,7 +1692,7 @@ async def list_sources_async( @classmethod def create_source( - cls, customer: str, **params: Unpack["CustomerCreateSourceParams"] + cls, customer: str, /, **params: Unpack["CustomerCreateSourceParams"] ) -> Union["Account", "BankAccount", "Card", "Source"]: """ When you create a new credit card, you must specify a customer or recipient on which to create it. @@ -1676,7 +1714,7 @@ def create_source( @classmethod async def create_source_async( - cls, customer: str, **params: Unpack["CustomerCreateSourceParams"] + cls, customer: str, /, **params: Unpack["CustomerCreateSourceParams"] ) -> Union["Account", "BankAccount", "Card", "Source"]: """ When you create a new credit card, you must specify a customer or recipient on which to create it. @@ -1701,6 +1739,7 @@ def retrieve_source( cls, customer: str, id: str, + /, **params: Unpack["CustomerRetrieveSourceParams"], ) -> Union["Account", "BankAccount", "Card", "Source"]: """ @@ -1722,6 +1761,7 @@ async def retrieve_source_async( cls, customer: str, id: str, + /, **params: Unpack["CustomerRetrieveSourceParams"], ) -> Union["Account", "BankAccount", "Card", "Source"]: """ @@ -1743,6 +1783,7 @@ def modify_source( cls, customer: str, id: str, + /, **params: Unpack["CustomerModifySourceParams"], ) -> Union["Account", "BankAccount", "Card", "Source"]: """ @@ -1764,6 +1805,7 @@ async def modify_source_async( cls, customer: str, id: str, + /, **params: Unpack["CustomerModifySourceParams"], ) -> Union["Account", "BankAccount", "Card", "Source"]: """ @@ -1785,6 +1827,7 @@ def delete_source( cls, customer: str, id: str, + /, **params: Unpack["CustomerDeleteSourceParams"], ) -> Union["Account", "BankAccount", "Card", "Source"]: """ @@ -1806,6 +1849,7 @@ async def delete_source_async( cls, customer: str, id: str, + /, **params: Unpack["CustomerDeleteSourceParams"], ) -> Union["Account", "BankAccount", "Card", "Source"]: """ @@ -1824,7 +1868,7 @@ async def delete_source_async( @classmethod def create_tax_id( - cls, customer: str, **params: Unpack["CustomerCreateTaxIdParams"] + cls, customer: str, /, **params: Unpack["CustomerCreateTaxIdParams"] ) -> "TaxId": """ Creates a new tax_id object for a customer. @@ -1842,7 +1886,7 @@ def create_tax_id( @classmethod async def create_tax_id_async( - cls, customer: str, **params: Unpack["CustomerCreateTaxIdParams"] + cls, customer: str, /, **params: Unpack["CustomerCreateTaxIdParams"] ) -> "TaxId": """ Creates a new tax_id object for a customer. @@ -1863,6 +1907,7 @@ def retrieve_tax_id( cls, customer: str, id: str, + /, **params: Unpack["CustomerRetrieveTaxIdParams"], ) -> "TaxId": """ @@ -1884,6 +1929,7 @@ async def retrieve_tax_id_async( cls, customer: str, id: str, + /, **params: Unpack["CustomerRetrieveTaxIdParams"], ) -> "TaxId": """ @@ -1905,6 +1951,7 @@ def delete_tax_id( cls, customer: str, id: str, + /, **params: Unpack["CustomerDeleteTaxIdParams"], ) -> "TaxId": """ @@ -1926,6 +1973,7 @@ async def delete_tax_id_async( cls, customer: str, id: str, + /, **params: Unpack["CustomerDeleteTaxIdParams"], ) -> "TaxId": """ @@ -1944,7 +1992,7 @@ async def delete_tax_id_async( @classmethod def list_tax_ids( - cls, customer: str, **params: Unpack["CustomerListTaxIdsParams"] + cls, customer: str, /, **params: Unpack["CustomerListTaxIdsParams"] ) -> ListObject["TaxId"]: """ Returns a list of tax IDs for a customer. @@ -1962,7 +2010,7 @@ def list_tax_ids( @classmethod async def list_tax_ids_async( - cls, customer: str, **params: Unpack["CustomerListTaxIdsParams"] + cls, customer: str, /, **params: Unpack["CustomerListTaxIdsParams"] ) -> ListObject["TaxId"]: """ Returns a list of tax IDs for a customer. @@ -1982,6 +2030,7 @@ async def list_tax_ids_async( def retrieve_cash_balance( cls, customer: str, + /, **params: Unpack["CustomerRetrieveCashBalanceParams"], ) -> "CashBalance": """ @@ -2002,6 +2051,7 @@ def retrieve_cash_balance( async def retrieve_cash_balance_async( cls, customer: str, + /, **params: Unpack["CustomerRetrieveCashBalanceParams"], ) -> "CashBalance": """ @@ -2020,7 +2070,10 @@ async def retrieve_cash_balance_async( @classmethod def modify_cash_balance( - cls, customer: str, **params: Unpack["CustomerModifyCashBalanceParams"] + cls, + customer: str, + /, + **params: Unpack["CustomerModifyCashBalanceParams"], ) -> "CashBalance": """ Changes the settings on a customer's cash balance. @@ -2038,7 +2091,10 @@ def modify_cash_balance( @classmethod async def modify_cash_balance_async( - cls, customer: str, **params: Unpack["CustomerModifyCashBalanceParams"] + cls, + customer: str, + /, + **params: Unpack["CustomerModifyCashBalanceParams"], ) -> "CashBalance": """ Changes the settings on a customer's cash balance. @@ -2061,6 +2117,7 @@ class TestHelpers(APIResourceTestHelpers["Customer"]): def _cls_fund_cash_balance( cls, customer: str, + /, **params: Unpack["CustomerFundCashBalanceParams"], ) -> "CustomerCashBalanceTransaction": """ @@ -2080,7 +2137,7 @@ def _cls_fund_cash_balance( @overload @staticmethod def fund_cash_balance( - customer: str, **params: Unpack["CustomerFundCashBalanceParams"] + customer: str, /, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ Create an incoming testmode bank transfer @@ -2118,6 +2175,7 @@ def fund_cash_balance( # pyright: ignore[reportGeneralTypeIssues] async def _cls_fund_cash_balance_async( cls, customer: str, + /, **params: Unpack["CustomerFundCashBalanceParams"], ) -> "CustomerCashBalanceTransaction": """ @@ -2137,7 +2195,7 @@ async def _cls_fund_cash_balance_async( @overload @staticmethod async def fund_cash_balance_async( - customer: str, **params: Unpack["CustomerFundCashBalanceParams"] + customer: str, /, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ Create an incoming testmode bank transfer diff --git a/stripe/_customer_balance_transaction_service.py b/stripe/_customer_balance_transaction_service.py index 3848ea193..be8f807c3 100644 --- a/stripe/_customer_balance_transaction_service.py +++ b/stripe/_customer_balance_transaction_service.py @@ -30,6 +30,7 @@ class CustomerBalanceTransactionService(StripeService): def list( self, customer: str, + /, params: Optional["CustomerBalanceTransactionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CustomerBalanceTransaction]": @@ -52,6 +53,7 @@ def list( async def list_async( self, customer: str, + /, params: Optional["CustomerBalanceTransactionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CustomerBalanceTransaction]": @@ -74,6 +76,7 @@ async def list_async( def create( self, customer: str, + /, params: "CustomerBalanceTransactionCreateParams", options: Optional["RequestOptions"] = None, ) -> "CustomerBalanceTransaction": @@ -96,6 +99,7 @@ def create( async def create_async( self, customer: str, + /, params: "CustomerBalanceTransactionCreateParams", options: Optional["RequestOptions"] = None, ) -> "CustomerBalanceTransaction": @@ -119,6 +123,7 @@ def retrieve( self, customer: str, transaction: str, + /, params: Optional["CustomerBalanceTransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomerBalanceTransaction": @@ -143,6 +148,7 @@ async def retrieve_async( self, customer: str, transaction: str, + /, params: Optional["CustomerBalanceTransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomerBalanceTransaction": @@ -167,6 +173,7 @@ def update( self, customer: str, transaction: str, + /, params: Optional["CustomerBalanceTransactionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomerBalanceTransaction": @@ -191,6 +198,7 @@ async def update_async( self, customer: str, transaction: str, + /, params: Optional["CustomerBalanceTransactionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomerBalanceTransaction": @@ -214,6 +222,7 @@ async def update_async( def serialize_batch_create( self, customer: str, + /, params: Optional["CustomerBalanceTransactionCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -239,6 +248,7 @@ def serialize_batch_update( self, customer: str, transaction: str, + /, params: Optional["CustomerBalanceTransactionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_customer_cash_balance_service.py b/stripe/_customer_cash_balance_service.py index 014ad3855..2a3003866 100644 --- a/stripe/_customer_cash_balance_service.py +++ b/stripe/_customer_cash_balance_service.py @@ -23,6 +23,7 @@ class CustomerCashBalanceService(StripeService): def retrieve( self, customer: str, + /, params: Optional["CustomerCashBalanceRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CashBalance": @@ -45,6 +46,7 @@ def retrieve( async def retrieve_async( self, customer: str, + /, params: Optional["CustomerCashBalanceRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CashBalance": @@ -67,6 +69,7 @@ async def retrieve_async( def update( self, customer: str, + /, params: Optional["CustomerCashBalanceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CashBalance": @@ -89,6 +92,7 @@ def update( async def update_async( self, customer: str, + /, params: Optional["CustomerCashBalanceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CashBalance": @@ -111,6 +115,7 @@ async def update_async( def serialize_batch_update( self, customer: str, + /, params: Optional["CustomerCashBalanceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_customer_cash_balance_transaction_service.py b/stripe/_customer_cash_balance_transaction_service.py index e9ceb3203..5e25ad234 100644 --- a/stripe/_customer_cash_balance_transaction_service.py +++ b/stripe/_customer_cash_balance_transaction_service.py @@ -23,6 +23,7 @@ class CustomerCashBalanceTransactionService(StripeService): def list( self, customer: str, + /, params: Optional["CustomerCashBalanceTransactionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CustomerCashBalanceTransaction]": @@ -45,6 +46,7 @@ def list( async def list_async( self, customer: str, + /, params: Optional["CustomerCashBalanceTransactionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CustomerCashBalanceTransaction]": @@ -68,6 +70,7 @@ def retrieve( self, customer: str, transaction: str, + /, params: Optional[ "CustomerCashBalanceTransactionRetrieveParams" ] = None, @@ -94,6 +97,7 @@ async def retrieve_async( self, customer: str, transaction: str, + /, params: Optional[ "CustomerCashBalanceTransactionRetrieveParams" ] = None, diff --git a/stripe/_customer_funding_instructions_service.py b/stripe/_customer_funding_instructions_service.py index 56a9ff740..67653c945 100644 --- a/stripe/_customer_funding_instructions_service.py +++ b/stripe/_customer_funding_instructions_service.py @@ -20,6 +20,7 @@ class CustomerFundingInstructionsService(StripeService): def create( self, customer: str, + /, params: "CustomerFundingInstructionsCreateParams", options: Optional["RequestOptions"] = None, ) -> "FundingInstructions": @@ -44,6 +45,7 @@ def create( async def create_async( self, customer: str, + /, params: "CustomerFundingInstructionsCreateParams", options: Optional["RequestOptions"] = None, ) -> "FundingInstructions": @@ -68,6 +70,7 @@ async def create_async( def serialize_batch_create_funding_instructions( self, customer: str, + /, params: Optional["CustomerFundingInstructionsCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_customer_payment_method_service.py b/stripe/_customer_payment_method_service.py index 05d0e9b6d..48eaa5fbb 100644 --- a/stripe/_customer_payment_method_service.py +++ b/stripe/_customer_payment_method_service.py @@ -21,6 +21,7 @@ class CustomerPaymentMethodService(StripeService): def list( self, customer: str, + /, params: Optional["CustomerPaymentMethodListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[PaymentMethod]": @@ -43,6 +44,7 @@ def list( async def list_async( self, customer: str, + /, params: Optional["CustomerPaymentMethodListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[PaymentMethod]": @@ -66,6 +68,7 @@ def retrieve( self, customer: str, payment_method: str, + /, params: Optional["CustomerPaymentMethodRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethod": @@ -90,6 +93,7 @@ async def retrieve_async( self, customer: str, payment_method: str, + /, params: Optional["CustomerPaymentMethodRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethod": diff --git a/stripe/_customer_payment_source_service.py b/stripe/_customer_payment_source_service.py index 15291b426..0beb8d7a7 100644 --- a/stripe/_customer_payment_source_service.py +++ b/stripe/_customer_payment_source_service.py @@ -40,6 +40,7 @@ class CustomerPaymentSourceService(StripeService): def list( self, customer: str, + /, params: Optional["CustomerPaymentSourceListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[Union[Account, BankAccount, Card, Source]]": @@ -62,6 +63,7 @@ def list( async def list_async( self, customer: str, + /, params: Optional["CustomerPaymentSourceListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[Union[Account, BankAccount, Card, Source]]": @@ -84,6 +86,7 @@ async def list_async( def create( self, customer: str, + /, params: "CustomerPaymentSourceCreateParams", options: Optional["RequestOptions"] = None, ) -> "Union[Account, BankAccount, Card, Source]": @@ -110,6 +113,7 @@ def create( async def create_async( self, customer: str, + /, params: "CustomerPaymentSourceCreateParams", options: Optional["RequestOptions"] = None, ) -> "Union[Account, BankAccount, Card, Source]": @@ -137,6 +141,7 @@ def retrieve( self, customer: str, id: str, + /, params: Optional["CustomerPaymentSourceRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[Account, BankAccount, Card, Source]": @@ -161,6 +166,7 @@ async def retrieve_async( self, customer: str, id: str, + /, params: Optional["CustomerPaymentSourceRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[Account, BankAccount, Card, Source]": @@ -185,6 +191,7 @@ def update( self, customer: str, id: str, + /, params: Optional["CustomerPaymentSourceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[Account, BankAccount, Card, Source]": @@ -209,6 +216,7 @@ async def update_async( self, customer: str, id: str, + /, params: Optional["CustomerPaymentSourceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[Account, BankAccount, Card, Source]": @@ -233,6 +241,7 @@ def delete( self, customer: str, id: str, + /, params: Optional["CustomerPaymentSourceDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[Account, BankAccount, Card, Source]": @@ -257,6 +266,7 @@ async def delete_async( self, customer: str, id: str, + /, params: Optional["CustomerPaymentSourceDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[Account, BankAccount, Card, Source]": @@ -281,6 +291,7 @@ def verify( self, customer: str, id: str, + /, params: Optional["CustomerPaymentSourceVerifyParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BankAccount": @@ -305,6 +316,7 @@ async def verify_async( self, customer: str, id: str, + /, params: Optional["CustomerPaymentSourceVerifyParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BankAccount": @@ -328,6 +340,7 @@ async def verify_async( def serialize_batch_create( self, customer: str, + /, params: Optional["CustomerPaymentSourceCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -353,6 +366,7 @@ def serialize_batch_update( self, customer: str, id: str, + /, params: Optional["CustomerPaymentSourceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -378,6 +392,7 @@ def serialize_batch_delete( self, customer: str, id: str, + /, params: Optional["CustomerPaymentSourceDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -403,6 +418,7 @@ def serialize_batch_verify( self, customer: str, id: str, + /, params: Optional["CustomerPaymentSourceVerifyParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_customer_service.py b/stripe/_customer_service.py index c986fbca5..3b203e2e8 100644 --- a/stripe/_customer_service.py +++ b/stripe/_customer_service.py @@ -112,6 +112,7 @@ def __getattr__(self, name): def delete( self, customer: str, + /, params: Optional["CustomerDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Customer": @@ -134,6 +135,7 @@ def delete( async def delete_async( self, customer: str, + /, params: Optional["CustomerDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Customer": @@ -156,6 +158,7 @@ async def delete_async( def retrieve( self, customer: str, + /, params: Optional["CustomerRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Customer": @@ -178,6 +181,7 @@ def retrieve( async def retrieve_async( self, customer: str, + /, params: Optional["CustomerRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Customer": @@ -200,6 +204,7 @@ async def retrieve_async( def update( self, customer: str, + /, params: Optional["CustomerUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Customer": @@ -224,6 +229,7 @@ def update( async def update_async( self, customer: str, + /, params: Optional["CustomerUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Customer": @@ -248,6 +254,7 @@ async def update_async( def delete_discount( self, customer: str, + /, params: Optional["CustomerDeleteDiscountParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Discount": @@ -270,6 +277,7 @@ def delete_discount( async def delete_discount_async( self, customer: str, + /, params: Optional["CustomerDeleteDiscountParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Discount": @@ -412,6 +420,7 @@ async def search_async( def serialize_batch_delete( self, customer: str, + /, params: Optional["CustomerDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -436,6 +445,7 @@ def serialize_batch_delete( def serialize_batch_update( self, customer: str, + /, params: Optional["CustomerUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -460,6 +470,7 @@ def serialize_batch_update( def serialize_batch_delete_discount( self, customer: str, + /, params: Optional["CustomerDeleteDiscountParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_customer_tax_exemption_service.py b/stripe/_customer_tax_exemption_service.py index 3f61a6226..bc43ad7ac 100644 --- a/stripe/_customer_tax_exemption_service.py +++ b/stripe/_customer_tax_exemption_service.py @@ -28,6 +28,7 @@ def delete( self, customer: str, id: str, + /, params: Optional["CustomerTaxExemptionDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomerTaxExemption": @@ -52,6 +53,7 @@ async def delete_async( self, customer: str, id: str, + /, params: Optional["CustomerTaxExemptionDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomerTaxExemption": @@ -76,6 +78,7 @@ def retrieve( self, customer: str, id: str, + /, params: Optional["CustomerTaxExemptionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomerTaxExemption": @@ -100,6 +103,7 @@ async def retrieve_async( self, customer: str, id: str, + /, params: Optional["CustomerTaxExemptionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomerTaxExemption": @@ -123,6 +127,7 @@ async def retrieve_async( def list( self, customer: str, + /, params: Optional["CustomerTaxExemptionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CustomerTaxExemption]": @@ -145,6 +150,7 @@ def list( async def list_async( self, customer: str, + /, params: Optional["CustomerTaxExemptionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CustomerTaxExemption]": @@ -167,6 +173,7 @@ async def list_async( def create( self, customer: str, + /, params: "CustomerTaxExemptionCreateParams", options: Optional["RequestOptions"] = None, ) -> "CustomerTaxExemption": @@ -189,6 +196,7 @@ def create( async def create_async( self, customer: str, + /, params: "CustomerTaxExemptionCreateParams", options: Optional["RequestOptions"] = None, ) -> "CustomerTaxExemption": diff --git a/stripe/_customer_tax_id_service.py b/stripe/_customer_tax_id_service.py index 9b70b72b3..2fa1b2ad1 100644 --- a/stripe/_customer_tax_id_service.py +++ b/stripe/_customer_tax_id_service.py @@ -31,6 +31,7 @@ def delete( self, customer: str, id: str, + /, params: Optional["CustomerTaxIdDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxId": @@ -55,6 +56,7 @@ async def delete_async( self, customer: str, id: str, + /, params: Optional["CustomerTaxIdDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxId": @@ -79,6 +81,7 @@ def retrieve( self, customer: str, id: str, + /, params: Optional["CustomerTaxIdRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxId": @@ -103,6 +106,7 @@ async def retrieve_async( self, customer: str, id: str, + /, params: Optional["CustomerTaxIdRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxId": @@ -126,6 +130,7 @@ async def retrieve_async( def list( self, customer: str, + /, params: Optional["CustomerTaxIdListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[TaxId]": @@ -148,6 +153,7 @@ def list( async def list_async( self, customer: str, + /, params: Optional["CustomerTaxIdListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[TaxId]": @@ -170,6 +176,7 @@ async def list_async( def create( self, customer: str, + /, params: "CustomerTaxIdCreateParams", options: Optional["RequestOptions"] = None, ) -> "TaxId": @@ -192,6 +199,7 @@ def create( async def create_async( self, customer: str, + /, params: "CustomerTaxIdCreateParams", options: Optional["RequestOptions"] = None, ) -> "TaxId": @@ -215,6 +223,7 @@ def serialize_batch_delete( self, customer: str, id: str, + /, params: Optional["CustomerTaxIdDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -239,6 +248,7 @@ def serialize_batch_delete( def serialize_batch_create_for_customer( self, customer: str, + /, params: Optional["CustomerTaxIdCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_dispute.py b/stripe/_dispute.py index 96a3571ba..db82e9e95 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -34,6 +34,20 @@ class Dispute( OBJECT_NAME: ClassVar[Literal["dispute"]] = "dispute" class Evidence(StripeObject): + class Appeal(StripeObject): + class Card(StripeObject): + reason_for_filing: Optional[str] + """ + The reason for filing the appeal. + """ + supporting_files: Optional[List[str]] + """ + One or more document IDs returned by a [file upload](https://api.stripe.com#create_file) with a `purpose` value of `dispute_evidence` to support the appeal. + """ + + card: Optional[Card] + _inner_class_types = {"card": Card} + class EnhancedEvidence(StripeObject): class MastercardCompliance(StripeObject): fee_acknowledged: bool @@ -198,6 +212,7 @@ class VisaCompliance(StripeObject): """ Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. """ + appeal: Optional[Appeal] billing_address: Optional[str] """ The billing address provided by the customer. @@ -303,7 +318,10 @@ class VisaCompliance(StripeObject): """ Any additional evidence or statements. """ - _inner_class_types = {"enhanced_evidence": EnhancedEvidence} + _inner_class_types = { + "appeal": Appeal, + "enhanced_evidence": EnhancedEvidence, + } class EvidenceDetails(StripeObject): class EnhancedEligibility(StripeObject): @@ -568,7 +586,7 @@ class SmartDisputes(StripeObject): @classmethod def _cls_close( - cls, dispute: str, **params: Unpack["DisputeCloseParams"] + cls, dispute: str, /, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute (accepting it), acknowledging it as lost. @@ -589,7 +607,7 @@ def _cls_close( @overload @staticmethod def close( - dispute: str, **params: Unpack["DisputeCloseParams"] + dispute: str, /, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute (accepting it), acknowledging it as lost. @@ -629,7 +647,7 @@ def close( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_close_async( - cls, dispute: str, **params: Unpack["DisputeCloseParams"] + cls, dispute: str, /, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute (accepting it), acknowledging it as lost. @@ -650,7 +668,7 @@ async def _cls_close_async( @overload @staticmethod async def close_async( - dispute: str, **params: Unpack["DisputeCloseParams"] + dispute: str, /, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute (accepting it), acknowledging it as lost. diff --git a/stripe/_dispute_service.py b/stripe/_dispute_service.py index 69beee49e..c4cbead0f 100644 --- a/stripe/_dispute_service.py +++ b/stripe/_dispute_service.py @@ -60,6 +60,7 @@ async def list_async( def retrieve( self, dispute: str, + /, params: Optional["DisputeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -80,6 +81,7 @@ def retrieve( async def retrieve_async( self, dispute: str, + /, params: Optional["DisputeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -100,6 +102,7 @@ async def retrieve_async( def update( self, dispute: str, + /, params: Optional["DisputeUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -122,6 +125,7 @@ def update( async def update_async( self, dispute: str, + /, params: Optional["DisputeUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -144,6 +148,7 @@ async def update_async( def close( self, dispute: str, + /, params: Optional["DisputeCloseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -168,6 +173,7 @@ def close( async def close_async( self, dispute: str, + /, params: Optional["DisputeCloseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -192,6 +198,7 @@ async def close_async( def serialize_batch_close( self, dispute: str, + /, params: Optional["DisputeCloseParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_ephemeral_key_service.py b/stripe/_ephemeral_key_service.py index a8d45b08a..20cafc5a0 100644 --- a/stripe/_ephemeral_key_service.py +++ b/stripe/_ephemeral_key_service.py @@ -20,6 +20,7 @@ class EphemeralKeyService(StripeService): def delete( self, key: str, + /, params: Optional["EphemeralKeyDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "EphemeralKey": @@ -40,6 +41,7 @@ def delete( async def delete_async( self, key: str, + /, params: Optional["EphemeralKeyDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "EphemeralKey": diff --git a/stripe/_error.py b/stripe/_error.py index c052e2ded..8b3c59cb8 100644 --- a/stripe/_error.py +++ b/stripe/_error.py @@ -276,6 +276,10 @@ class InvalidPayoutMethodError(StripeError): pass +class MerchantNotGatedError(StripeError): + pass + + class NonZeroBalanceError(StripeError): pass diff --git a/stripe/_event_service.py b/stripe/_event_service.py index f11a9e1ee..2ea67cd99 100644 --- a/stripe/_event_service.py +++ b/stripe/_event_service.py @@ -55,6 +55,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["EventRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Event": @@ -75,6 +76,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["EventRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Event": diff --git a/stripe/_exchange_rate_service.py b/stripe/_exchange_rate_service.py index 16675be03..d39b18642 100644 --- a/stripe/_exchange_rate_service.py +++ b/stripe/_exchange_rate_service.py @@ -61,6 +61,7 @@ async def list_async( def retrieve( self, rate_id: str, + /, params: Optional["ExchangeRateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ExchangeRate": @@ -85,6 +86,7 @@ def retrieve( async def retrieve_async( self, rate_id: str, + /, params: Optional["ExchangeRateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ExchangeRate": diff --git a/stripe/_external_account_service.py b/stripe/_external_account_service.py index fa40ebf0c..54e543e43 100644 --- a/stripe/_external_account_service.py +++ b/stripe/_external_account_service.py @@ -32,6 +32,7 @@ class ExternalAccountService(StripeService): def delete( self, id: str, + /, params: Optional["ExternalAccountDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[BankAccount, Card]": @@ -52,6 +53,7 @@ def delete( async def delete_async( self, id: str, + /, params: Optional["ExternalAccountDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[BankAccount, Card]": @@ -72,6 +74,7 @@ async def delete_async( def retrieve( self, id: str, + /, params: Optional["ExternalAccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[BankAccount, Card]": @@ -92,6 +95,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ExternalAccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[BankAccount, Card]": @@ -112,6 +116,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["ExternalAccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[BankAccount, Card]": @@ -139,6 +144,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["ExternalAccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[BankAccount, Card]": diff --git a/stripe/_file_link_service.py b/stripe/_file_link_service.py index 8a9653803..c40e7fa67 100644 --- a/stripe/_file_link_service.py +++ b/stripe/_file_link_service.py @@ -95,6 +95,7 @@ async def create_async( def retrieve( self, link: str, + /, params: Optional["FileLinkRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FileLink": @@ -115,6 +116,7 @@ def retrieve( async def retrieve_async( self, link: str, + /, params: Optional["FileLinkRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FileLink": @@ -135,6 +137,7 @@ async def retrieve_async( def update( self, link: str, + /, params: Optional["FileLinkUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FileLink": @@ -155,6 +158,7 @@ def update( async def update_async( self, link: str, + /, params: Optional["FileLinkUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FileLink": diff --git a/stripe/_file_service.py b/stripe/_file_service.py index 7822f15e4..1f16e3e57 100644 --- a/stripe/_file_service.py +++ b/stripe/_file_service.py @@ -104,6 +104,7 @@ async def create_async( def retrieve( self, file: str, + /, params: Optional["FileRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "File": @@ -124,6 +125,7 @@ def retrieve( async def retrieve_async( self, file: str, + /, params: Optional["FileRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "File": diff --git a/stripe/_fx_quote_service.py b/stripe/_fx_quote_service.py index ed33a3cf5..6e16c0147 100644 --- a/stripe/_fx_quote_service.py +++ b/stripe/_fx_quote_service.py @@ -94,6 +94,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["FxQuoteRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FxQuote": @@ -114,6 +115,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["FxQuoteRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FxQuote": diff --git a/stripe/_gift_card.py b/stripe/_gift_card.py index 934b92879..7f933fdbf 100644 --- a/stripe/_gift_card.py +++ b/stripe/_gift_card.py @@ -66,7 +66,7 @@ class GiftCard(CreateableAPIResource["GiftCard"]): @classmethod def _cls_activate( - cls, gift_card: str, **params: Unpack["GiftCardActivateParams"] + cls, gift_card: str, /, **params: Unpack["GiftCardActivateParams"] ) -> "GiftCardOperation": """ Activates a third-party gift card and optionally sets its balance. @@ -85,7 +85,7 @@ def _cls_activate( @overload @staticmethod def activate( - gift_card: str, **params: Unpack["GiftCardActivateParams"] + gift_card: str, /, **params: Unpack["GiftCardActivateParams"] ) -> "GiftCardOperation": """ Activates a third-party gift card and optionally sets its balance. @@ -121,7 +121,7 @@ def activate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_activate_async( - cls, gift_card: str, **params: Unpack["GiftCardActivateParams"] + cls, gift_card: str, /, **params: Unpack["GiftCardActivateParams"] ) -> "GiftCardOperation": """ Activates a third-party gift card and optionally sets its balance. @@ -140,7 +140,7 @@ async def _cls_activate_async( @overload @staticmethod async def activate_async( - gift_card: str, **params: Unpack["GiftCardActivateParams"] + gift_card: str, /, **params: Unpack["GiftCardActivateParams"] ) -> "GiftCardOperation": """ Activates a third-party gift card and optionally sets its balance. @@ -176,7 +176,7 @@ async def activate_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_cashout( - cls, gift_card: str, **params: Unpack["GiftCardCashoutParams"] + cls, gift_card: str, /, **params: Unpack["GiftCardCashoutParams"] ) -> "GiftCardOperation": """ Cashout a third-party gift card by zeroing its balance. @@ -195,7 +195,7 @@ def _cls_cashout( @overload @staticmethod def cashout( - gift_card: str, **params: Unpack["GiftCardCashoutParams"] + gift_card: str, /, **params: Unpack["GiftCardCashoutParams"] ) -> "GiftCardOperation": """ Cashout a third-party gift card by zeroing its balance. @@ -231,7 +231,7 @@ def cashout( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cashout_async( - cls, gift_card: str, **params: Unpack["GiftCardCashoutParams"] + cls, gift_card: str, /, **params: Unpack["GiftCardCashoutParams"] ) -> "GiftCardOperation": """ Cashout a third-party gift card by zeroing its balance. @@ -250,7 +250,7 @@ async def _cls_cashout_async( @overload @staticmethod async def cashout_async( - gift_card: str, **params: Unpack["GiftCardCashoutParams"] + gift_card: str, /, **params: Unpack["GiftCardCashoutParams"] ) -> "GiftCardOperation": """ Cashout a third-party gift card by zeroing its balance. @@ -286,7 +286,7 @@ async def cashout_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_check_balance( - cls, gift_card: str, **params: Unpack["GiftCardCheckBalanceParams"] + cls, gift_card: str, /, **params: Unpack["GiftCardCheckBalanceParams"] ) -> "GiftCardOperation": """ Checks the balance of a third-party gift card. @@ -305,7 +305,7 @@ def _cls_check_balance( @overload @staticmethod def check_balance( - gift_card: str, **params: Unpack["GiftCardCheckBalanceParams"] + gift_card: str, /, **params: Unpack["GiftCardCheckBalanceParams"] ) -> "GiftCardOperation": """ Checks the balance of a third-party gift card. @@ -341,7 +341,7 @@ def check_balance( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_check_balance_async( - cls, gift_card: str, **params: Unpack["GiftCardCheckBalanceParams"] + cls, gift_card: str, /, **params: Unpack["GiftCardCheckBalanceParams"] ) -> "GiftCardOperation": """ Checks the balance of a third-party gift card. @@ -360,7 +360,7 @@ async def _cls_check_balance_async( @overload @staticmethod async def check_balance_async( - gift_card: str, **params: Unpack["GiftCardCheckBalanceParams"] + gift_card: str, /, **params: Unpack["GiftCardCheckBalanceParams"] ) -> "GiftCardOperation": """ Checks the balance of a third-party gift card. @@ -426,7 +426,7 @@ async def create_async( @classmethod def _cls_reload( - cls, gift_card: str, **params: Unpack["GiftCardReloadParams"] + cls, gift_card: str, /, **params: Unpack["GiftCardReloadParams"] ) -> "GiftCardOperation": """ Reloads a third-party gift card by adding the specified amount to its balance. @@ -445,7 +445,7 @@ def _cls_reload( @overload @staticmethod def reload( - gift_card: str, **params: Unpack["GiftCardReloadParams"] + gift_card: str, /, **params: Unpack["GiftCardReloadParams"] ) -> "GiftCardOperation": """ Reloads a third-party gift card by adding the specified amount to its balance. @@ -481,7 +481,7 @@ def reload( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_reload_async( - cls, gift_card: str, **params: Unpack["GiftCardReloadParams"] + cls, gift_card: str, /, **params: Unpack["GiftCardReloadParams"] ) -> "GiftCardOperation": """ Reloads a third-party gift card by adding the specified amount to its balance. @@ -500,7 +500,7 @@ async def _cls_reload_async( @overload @staticmethod async def reload_async( - gift_card: str, **params: Unpack["GiftCardReloadParams"] + gift_card: str, /, **params: Unpack["GiftCardReloadParams"] ) -> "GiftCardOperation": """ Reloads a third-party gift card by adding the specified amount to its balance. @@ -558,7 +558,7 @@ async def retrieve_async( @classmethod def _cls_void_operation( - cls, gift_card: str, **params: Unpack["GiftCardVoidOperationParams"] + cls, gift_card: str, /, **params: Unpack["GiftCardVoidOperationParams"] ) -> "GiftCardOperation": """ Voids a previously performed gift card operation. @@ -577,7 +577,7 @@ def _cls_void_operation( @overload @staticmethod def void_operation( - gift_card: str, **params: Unpack["GiftCardVoidOperationParams"] + gift_card: str, /, **params: Unpack["GiftCardVoidOperationParams"] ) -> "GiftCardOperation": """ Voids a previously performed gift card operation. @@ -613,7 +613,7 @@ def void_operation( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_void_operation_async( - cls, gift_card: str, **params: Unpack["GiftCardVoidOperationParams"] + cls, gift_card: str, /, **params: Unpack["GiftCardVoidOperationParams"] ) -> "GiftCardOperation": """ Voids a previously performed gift card operation. @@ -632,7 +632,7 @@ async def _cls_void_operation_async( @overload @staticmethod async def void_operation_async( - gift_card: str, **params: Unpack["GiftCardVoidOperationParams"] + gift_card: str, /, **params: Unpack["GiftCardVoidOperationParams"] ) -> "GiftCardOperation": """ Voids a previously performed gift card operation. diff --git a/stripe/_gift_card_operation_service.py b/stripe/_gift_card_operation_service.py index 7b1c65e00..2d0df5cc3 100644 --- a/stripe/_gift_card_operation_service.py +++ b/stripe/_gift_card_operation_service.py @@ -17,6 +17,7 @@ class GiftCardOperationService(StripeService): def retrieve( self, id: str, + /, params: Optional["GiftCardOperationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GiftCardOperation": @@ -37,6 +38,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["GiftCardOperationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GiftCardOperation": diff --git a/stripe/_gift_card_service.py b/stripe/_gift_card_service.py index 27c774673..2e0e1e281 100644 --- a/stripe/_gift_card_service.py +++ b/stripe/_gift_card_service.py @@ -26,6 +26,7 @@ class GiftCardService(StripeService): def retrieve( self, gift_card: str, + /, params: Optional["GiftCardRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GiftCard": @@ -48,6 +49,7 @@ def retrieve( async def retrieve_async( self, gift_card: str, + /, params: Optional["GiftCardRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GiftCard": @@ -108,6 +110,7 @@ async def create_async( def activate( self, gift_card: str, + /, params: Optional["GiftCardActivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GiftCardOperation": @@ -130,6 +133,7 @@ def activate( async def activate_async( self, gift_card: str, + /, params: Optional["GiftCardActivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GiftCardOperation": @@ -152,6 +156,7 @@ async def activate_async( def cashout( self, gift_card: str, + /, params: Optional["GiftCardCashoutParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GiftCardOperation": @@ -174,6 +179,7 @@ def cashout( async def cashout_async( self, gift_card: str, + /, params: Optional["GiftCardCashoutParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GiftCardOperation": @@ -196,6 +202,7 @@ async def cashout_async( def check_balance( self, gift_card: str, + /, params: Optional["GiftCardCheckBalanceParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GiftCardOperation": @@ -218,6 +225,7 @@ def check_balance( async def check_balance_async( self, gift_card: str, + /, params: Optional["GiftCardCheckBalanceParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GiftCardOperation": @@ -240,6 +248,7 @@ async def check_balance_async( def reload( self, gift_card: str, + /, params: "GiftCardReloadParams", options: Optional["RequestOptions"] = None, ) -> "GiftCardOperation": @@ -262,6 +271,7 @@ def reload( async def reload_async( self, gift_card: str, + /, params: "GiftCardReloadParams", options: Optional["RequestOptions"] = None, ) -> "GiftCardOperation": @@ -284,6 +294,7 @@ async def reload_async( def void_operation( self, gift_card: str, + /, params: "GiftCardVoidOperationParams", options: Optional["RequestOptions"] = None, ) -> "GiftCardOperation": @@ -306,6 +317,7 @@ def void_operation( async def void_operation_async( self, gift_card: str, + /, params: "GiftCardVoidOperationParams", options: Optional["RequestOptions"] = None, ) -> "GiftCardOperation": diff --git a/stripe/_invoice.py b/stripe/_invoice.py index a3ed2ea35..2071ced8e 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -912,6 +912,15 @@ class MandateOptions(StripeObject): """ _inner_class_types = {"mandate_options": MandateOptions} + class BacsDebit(StripeObject): + target_date: Optional[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: Optional[ + Union[Literal["automatic", "payer_name_verification"], str] + ] + class Bancontact(StripeObject): preferred_language: Union[Literal["de", "en", "fr", "nl"], str] """ @@ -1200,6 +1209,10 @@ class WechatPay(StripeObject): """ If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. """ + bacs_debit: Optional[BacsDebit] + """ + If paying by `bacs_debit`, this sub-hash contains details about the Bacs Direct Debit payment method options to pass to the invoice's PaymentIntent. + """ bancontact: Optional[Bancontact] """ If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. @@ -1262,6 +1275,7 @@ class WechatPay(StripeObject): """ _inner_class_types = { "acss_debit": AcssDebit, + "bacs_debit": BacsDebit, "bancontact": Bancontact, "billie": Billie, "bizum": Bizum, @@ -1922,7 +1936,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] """ @@ -1991,7 +2005,7 @@ class TaxRateDetails(StripeObject): @classmethod def _cls_add_lines( - cls, invoice: str, **params: Unpack["InvoiceAddLinesParams"] + cls, invoice: str, /, **params: Unpack["InvoiceAddLinesParams"] ) -> "Invoice": """ Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. @@ -2010,7 +2024,7 @@ def _cls_add_lines( @overload @staticmethod def add_lines( - invoice: str, **params: Unpack["InvoiceAddLinesParams"] + invoice: str, /, **params: Unpack["InvoiceAddLinesParams"] ) -> "Invoice": """ Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. @@ -2046,7 +2060,7 @@ def add_lines( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_add_lines_async( - cls, invoice: str, **params: Unpack["InvoiceAddLinesParams"] + cls, invoice: str, /, **params: Unpack["InvoiceAddLinesParams"] ) -> "Invoice": """ Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. @@ -2065,7 +2079,7 @@ async def _cls_add_lines_async( @overload @staticmethod async def add_lines_async( - invoice: str, **params: Unpack["InvoiceAddLinesParams"] + invoice: str, /, **params: Unpack["InvoiceAddLinesParams"] ) -> "Invoice": """ Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. @@ -2101,7 +2115,7 @@ async def add_lines_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_attach_payment( - cls, invoice: str, **params: Unpack["InvoiceAttachPaymentParams"] + cls, invoice: str, /, **params: Unpack["InvoiceAttachPaymentParams"] ) -> "Invoice": """ Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. @@ -2129,7 +2143,7 @@ def _cls_attach_payment( @overload @staticmethod def attach_payment( - invoice: str, **params: Unpack["InvoiceAttachPaymentParams"] + invoice: str, /, **params: Unpack["InvoiceAttachPaymentParams"] ) -> "Invoice": """ Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. @@ -2192,7 +2206,7 @@ def attach_payment( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_attach_payment_async( - cls, invoice: str, **params: Unpack["InvoiceAttachPaymentParams"] + cls, invoice: str, /, **params: Unpack["InvoiceAttachPaymentParams"] ) -> "Invoice": """ Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. @@ -2220,7 +2234,7 @@ async def _cls_attach_payment_async( @overload @staticmethod async def attach_payment_async( - invoice: str, **params: Unpack["InvoiceAttachPaymentParams"] + invoice: str, /, **params: Unpack["InvoiceAttachPaymentParams"] ) -> "Invoice": """ Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. @@ -2455,7 +2469,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_detach_payment( - cls, invoice: str, **params: Unpack["InvoiceDetachPaymentParams"] + cls, invoice: str, /, **params: Unpack["InvoiceDetachPaymentParams"] ) -> "Invoice": """ Detaches a payment from the invoice, removing it from the list of payments @@ -2474,7 +2488,7 @@ def _cls_detach_payment( @overload @staticmethod def detach_payment( - invoice: str, **params: Unpack["InvoiceDetachPaymentParams"] + invoice: str, /, **params: Unpack["InvoiceDetachPaymentParams"] ) -> "Invoice": """ Detaches a payment from the invoice, removing it from the list of payments @@ -2510,7 +2524,7 @@ def detach_payment( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_detach_payment_async( - cls, invoice: str, **params: Unpack["InvoiceDetachPaymentParams"] + cls, invoice: str, /, **params: Unpack["InvoiceDetachPaymentParams"] ) -> "Invoice": """ Detaches a payment from the invoice, removing it from the list of payments @@ -2529,7 +2543,7 @@ async def _cls_detach_payment_async( @overload @staticmethod async def detach_payment_async( - invoice: str, **params: Unpack["InvoiceDetachPaymentParams"] + invoice: str, /, **params: Unpack["InvoiceDetachPaymentParams"] ) -> "Invoice": """ Detaches a payment from the invoice, removing it from the list of payments @@ -2565,7 +2579,7 @@ async def detach_payment_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_finalize_invoice( - cls, invoice: str, **params: Unpack["InvoiceFinalizeInvoiceParams"] + cls, invoice: str, /, **params: Unpack["InvoiceFinalizeInvoiceParams"] ) -> "Invoice": """ Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. @@ -2584,7 +2598,7 @@ def _cls_finalize_invoice( @overload @staticmethod def finalize_invoice( - invoice: str, **params: Unpack["InvoiceFinalizeInvoiceParams"] + invoice: str, /, **params: Unpack["InvoiceFinalizeInvoiceParams"] ) -> "Invoice": """ Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. @@ -2620,7 +2634,7 @@ def finalize_invoice( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_finalize_invoice_async( - cls, invoice: str, **params: Unpack["InvoiceFinalizeInvoiceParams"] + cls, invoice: str, /, **params: Unpack["InvoiceFinalizeInvoiceParams"] ) -> "Invoice": """ Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. @@ -2639,7 +2653,7 @@ async def _cls_finalize_invoice_async( @overload @staticmethod async def finalize_invoice_async( - invoice: str, **params: Unpack["InvoiceFinalizeInvoiceParams"] + invoice: str, /, **params: Unpack["InvoiceFinalizeInvoiceParams"] ) -> "Invoice": """ Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. @@ -2715,7 +2729,10 @@ async def list_async( @classmethod def _cls_mark_uncollectible( - cls, invoice: str, **params: Unpack["InvoiceMarkUncollectibleParams"] + cls, + invoice: str, + /, + **params: Unpack["InvoiceMarkUncollectibleParams"], ) -> "Invoice": """ Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. @@ -2734,7 +2751,7 @@ def _cls_mark_uncollectible( @overload @staticmethod def mark_uncollectible( - invoice: str, **params: Unpack["InvoiceMarkUncollectibleParams"] + invoice: str, /, **params: Unpack["InvoiceMarkUncollectibleParams"] ) -> "Invoice": """ Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. @@ -2770,7 +2787,10 @@ def mark_uncollectible( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_mark_uncollectible_async( - cls, invoice: str, **params: Unpack["InvoiceMarkUncollectibleParams"] + cls, + invoice: str, + /, + **params: Unpack["InvoiceMarkUncollectibleParams"], ) -> "Invoice": """ Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. @@ -2789,7 +2809,7 @@ async def _cls_mark_uncollectible_async( @overload @staticmethod async def mark_uncollectible_async( - invoice: str, **params: Unpack["InvoiceMarkUncollectibleParams"] + invoice: str, /, **params: Unpack["InvoiceMarkUncollectibleParams"] ) -> "Invoice": """ Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. @@ -2829,7 +2849,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 @@ -2851,7 +2872,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 @@ -2869,7 +2891,7 @@ async def modify_async( @classmethod def _cls_pay( - cls, invoice: str, **params: Unpack["InvoicePayParams"] + cls, invoice: str, /, **params: Unpack["InvoicePayParams"] ) -> "Invoice": """ Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. @@ -2887,7 +2909,9 @@ def _cls_pay( @overload @staticmethod - def pay(invoice: str, **params: Unpack["InvoicePayParams"]) -> "Invoice": + def pay( + invoice: str, /, **params: Unpack["InvoicePayParams"] + ) -> "Invoice": """ Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. """ @@ -2920,7 +2944,7 @@ def pay( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_pay_async( - cls, invoice: str, **params: Unpack["InvoicePayParams"] + cls, invoice: str, /, **params: Unpack["InvoicePayParams"] ) -> "Invoice": """ Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. @@ -2939,7 +2963,7 @@ async def _cls_pay_async( @overload @staticmethod async def pay_async( - invoice: str, **params: Unpack["InvoicePayParams"] + invoice: str, /, **params: Unpack["InvoicePayParams"] ) -> "Invoice": """ Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. @@ -2975,7 +2999,7 @@ async def pay_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_remove_lines( - cls, invoice: str, **params: Unpack["InvoiceRemoveLinesParams"] + cls, invoice: str, /, **params: Unpack["InvoiceRemoveLinesParams"] ) -> "Invoice": """ Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. @@ -2994,7 +3018,7 @@ def _cls_remove_lines( @overload @staticmethod def remove_lines( - invoice: str, **params: Unpack["InvoiceRemoveLinesParams"] + invoice: str, /, **params: Unpack["InvoiceRemoveLinesParams"] ) -> "Invoice": """ Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. @@ -3030,7 +3054,7 @@ def remove_lines( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_remove_lines_async( - cls, invoice: str, **params: Unpack["InvoiceRemoveLinesParams"] + cls, invoice: str, /, **params: Unpack["InvoiceRemoveLinesParams"] ) -> "Invoice": """ Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. @@ -3049,7 +3073,7 @@ async def _cls_remove_lines_async( @overload @staticmethod async def remove_lines_async( - invoice: str, **params: Unpack["InvoiceRemoveLinesParams"] + invoice: str, /, **params: Unpack["InvoiceRemoveLinesParams"] ) -> "Invoice": """ Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. @@ -3107,7 +3131,7 @@ async def retrieve_async( @classmethod def _cls_send_invoice( - cls, invoice: str, **params: Unpack["InvoiceSendInvoiceParams"] + cls, invoice: str, /, **params: Unpack["InvoiceSendInvoiceParams"] ) -> "Invoice": """ Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. @@ -3128,7 +3152,7 @@ def _cls_send_invoice( @overload @staticmethod def send_invoice( - invoice: str, **params: Unpack["InvoiceSendInvoiceParams"] + invoice: str, /, **params: Unpack["InvoiceSendInvoiceParams"] ) -> "Invoice": """ Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. @@ -3170,7 +3194,7 @@ def send_invoice( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_send_invoice_async( - cls, invoice: str, **params: Unpack["InvoiceSendInvoiceParams"] + cls, invoice: str, /, **params: Unpack["InvoiceSendInvoiceParams"] ) -> "Invoice": """ Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. @@ -3191,7 +3215,7 @@ async def _cls_send_invoice_async( @overload @staticmethod async def send_invoice_async( - invoice: str, **params: Unpack["InvoiceSendInvoiceParams"] + invoice: str, /, **params: Unpack["InvoiceSendInvoiceParams"] ) -> "Invoice": """ Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. @@ -3233,7 +3257,7 @@ async def send_invoice_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_update_lines( - cls, invoice: str, **params: Unpack["InvoiceUpdateLinesParams"] + cls, invoice: str, /, **params: Unpack["InvoiceUpdateLinesParams"] ) -> "Invoice": """ Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. @@ -3252,7 +3276,7 @@ def _cls_update_lines( @overload @staticmethod def update_lines( - invoice: str, **params: Unpack["InvoiceUpdateLinesParams"] + invoice: str, /, **params: Unpack["InvoiceUpdateLinesParams"] ) -> "Invoice": """ Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. @@ -3288,7 +3312,7 @@ def update_lines( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_update_lines_async( - cls, invoice: str, **params: Unpack["InvoiceUpdateLinesParams"] + cls, invoice: str, /, **params: Unpack["InvoiceUpdateLinesParams"] ) -> "Invoice": """ Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. @@ -3307,7 +3331,7 @@ async def _cls_update_lines_async( @overload @staticmethod async def update_lines_async( - invoice: str, **params: Unpack["InvoiceUpdateLinesParams"] + invoice: str, /, **params: Unpack["InvoiceUpdateLinesParams"] ) -> "Invoice": """ Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. @@ -3343,7 +3367,7 @@ async def update_lines_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_void_invoice( - cls, invoice: str, **params: Unpack["InvoiceVoidInvoiceParams"] + cls, invoice: str, /, **params: Unpack["InvoiceVoidInvoiceParams"] ) -> "Invoice": """ Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api/invoices/delete), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. @@ -3364,7 +3388,7 @@ def _cls_void_invoice( @overload @staticmethod def void_invoice( - invoice: str, **params: Unpack["InvoiceVoidInvoiceParams"] + invoice: str, /, **params: Unpack["InvoiceVoidInvoiceParams"] ) -> "Invoice": """ Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api/invoices/delete), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. @@ -3406,7 +3430,7 @@ def void_invoice( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_void_invoice_async( - cls, invoice: str, **params: Unpack["InvoiceVoidInvoiceParams"] + cls, invoice: str, /, **params: Unpack["InvoiceVoidInvoiceParams"] ) -> "Invoice": """ Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api/invoices/delete), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. @@ -3427,7 +3451,7 @@ async def _cls_void_invoice_async( @overload @staticmethod async def void_invoice_async( - invoice: str, **params: Unpack["InvoiceVoidInvoiceParams"] + invoice: str, /, **params: Unpack["InvoiceVoidInvoiceParams"] ) -> "Invoice": """ Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api/invoices/delete), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. @@ -3507,7 +3531,7 @@ async def search_auto_paging_iter_async( @classmethod def list_lines( - cls, invoice: str, **params: Unpack["InvoiceListLinesParams"] + cls, invoice: str, /, **params: Unpack["InvoiceListLinesParams"] ) -> ListObject["InvoiceLineItem"]: """ When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -3525,7 +3549,7 @@ def list_lines( @classmethod async def list_lines_async( - cls, invoice: str, **params: Unpack["InvoiceListLinesParams"] + cls, invoice: str, /, **params: Unpack["InvoiceListLinesParams"] ) -> ListObject["InvoiceLineItem"]: """ When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/stripe/_invoice_item.py b/stripe/_invoice_item.py index f4c1cdd21..7ef5dc5ba 100644 --- a/stripe/_invoice_item.py +++ b/stripe/_invoice_item.py @@ -276,7 +276,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, diff --git a/stripe/_invoice_item_service.py b/stripe/_invoice_item_service.py index 44372330a..dcc87e3fa 100644 --- a/stripe/_invoice_item_service.py +++ b/stripe/_invoice_item_service.py @@ -31,6 +31,7 @@ class InvoiceItemService(StripeService): def delete( self, invoiceitem: str, + /, params: Optional["InvoiceItemDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoiceItem": @@ -53,6 +54,7 @@ def delete( async def delete_async( self, invoiceitem: str, + /, params: Optional["InvoiceItemDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoiceItem": @@ -75,6 +77,7 @@ async def delete_async( def retrieve( self, invoiceitem: str, + /, params: Optional["InvoiceItemRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoiceItem": @@ -97,6 +100,7 @@ def retrieve( async def retrieve_async( self, invoiceitem: str, + /, params: Optional["InvoiceItemRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoiceItem": @@ -119,6 +123,7 @@ async def retrieve_async( def update( self, invoiceitem: str, + /, params: Optional["InvoiceItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoiceItem": @@ -141,6 +146,7 @@ def update( async def update_async( self, invoiceitem: str, + /, params: Optional["InvoiceItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoiceItem": @@ -239,6 +245,7 @@ async def create_async( def serialize_batch_delete( self, invoiceitem: str, + /, params: Optional["InvoiceItemDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -263,6 +270,7 @@ def serialize_batch_delete( def serialize_batch_update( self, invoiceitem: str, + /, params: Optional["InvoiceItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_invoice_line_item_service.py b/stripe/_invoice_line_item_service.py index b715e0c67..29a2b05c8 100644 --- a/stripe/_invoice_line_item_service.py +++ b/stripe/_invoice_line_item_service.py @@ -24,6 +24,7 @@ class InvoiceLineItemService(StripeService): def list( self, invoice: str, + /, params: Optional["InvoiceLineItemListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[InvoiceLineItem]": @@ -46,6 +47,7 @@ def list( async def list_async( self, invoice: str, + /, params: Optional["InvoiceLineItemListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[InvoiceLineItem]": @@ -69,6 +71,7 @@ def update( self, invoice: str, line_item_id: str, + /, params: Optional["InvoiceLineItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoiceLineItem": @@ -96,6 +99,7 @@ async def update_async( self, invoice: str, line_item_id: str, + /, params: Optional["InvoiceLineItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoiceLineItem": @@ -123,6 +127,7 @@ def serialize_batch_update( self, invoice: str, line_item_id: str, + /, params: Optional["InvoiceLineItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_invoice_payment.py b/stripe/_invoice_payment.py index 41d54abed..56ad55dc9 100644 --- a/stripe/_invoice_payment.py +++ b/stripe/_invoice_payment.py @@ -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_payment_service.py b/stripe/_invoice_payment_service.py index c7e998e3f..f5ed117c7 100644 --- a/stripe/_invoice_payment_service.py +++ b/stripe/_invoice_payment_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, invoice_payment: str, + /, params: Optional["InvoicePaymentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoicePayment": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, invoice_payment: str, + /, params: Optional["InvoicePaymentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoicePayment": diff --git a/stripe/_invoice_rendering_template.py b/stripe/_invoice_rendering_template.py index f70a67258..6486596eb 100644 --- a/stripe/_invoice_rendering_template.py +++ b/stripe/_invoice_rendering_template.py @@ -70,6 +70,7 @@ class InvoiceRenderingTemplate( def _cls_archive( cls, template: str, + /, **params: Unpack["InvoiceRenderingTemplateArchiveParams"], ) -> "InvoiceRenderingTemplate": """ @@ -90,6 +91,7 @@ def _cls_archive( @staticmethod def archive( template: str, + /, **params: Unpack["InvoiceRenderingTemplateArchiveParams"], ) -> "InvoiceRenderingTemplate": """ @@ -128,6 +130,7 @@ def archive( # pyright: ignore[reportGeneralTypeIssues] async def _cls_archive_async( cls, template: str, + /, **params: Unpack["InvoiceRenderingTemplateArchiveParams"], ) -> "InvoiceRenderingTemplate": """ @@ -148,6 +151,7 @@ async def _cls_archive_async( @staticmethod async def archive_async( template: str, + /, **params: Unpack["InvoiceRenderingTemplateArchiveParams"], ) -> "InvoiceRenderingTemplate": """ @@ -252,6 +256,7 @@ async def retrieve_async( def _cls_unarchive( cls, template: str, + /, **params: Unpack["InvoiceRenderingTemplateUnarchiveParams"], ) -> "InvoiceRenderingTemplate": """ @@ -272,6 +277,7 @@ def _cls_unarchive( @staticmethod def unarchive( template: str, + /, **params: Unpack["InvoiceRenderingTemplateUnarchiveParams"], ) -> "InvoiceRenderingTemplate": """ @@ -310,6 +316,7 @@ def unarchive( # pyright: ignore[reportGeneralTypeIssues] async def _cls_unarchive_async( cls, template: str, + /, **params: Unpack["InvoiceRenderingTemplateUnarchiveParams"], ) -> "InvoiceRenderingTemplate": """ @@ -330,6 +337,7 @@ async def _cls_unarchive_async( @staticmethod async def unarchive_async( template: str, + /, **params: Unpack["InvoiceRenderingTemplateUnarchiveParams"], ) -> "InvoiceRenderingTemplate": """ diff --git a/stripe/_invoice_rendering_template_service.py b/stripe/_invoice_rendering_template_service.py index 54a1316ca..1570f0c2d 100644 --- a/stripe/_invoice_rendering_template_service.py +++ b/stripe/_invoice_rendering_template_service.py @@ -68,6 +68,7 @@ async def list_async( def retrieve( self, template: str, + /, params: Optional["InvoiceRenderingTemplateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoiceRenderingTemplate": @@ -90,6 +91,7 @@ def retrieve( async def retrieve_async( self, template: str, + /, params: Optional["InvoiceRenderingTemplateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoiceRenderingTemplate": @@ -112,6 +114,7 @@ async def retrieve_async( def archive( self, template: str, + /, params: Optional["InvoiceRenderingTemplateArchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoiceRenderingTemplate": @@ -134,6 +137,7 @@ def archive( async def archive_async( self, template: str, + /, params: Optional["InvoiceRenderingTemplateArchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoiceRenderingTemplate": @@ -156,6 +160,7 @@ async def archive_async( def unarchive( self, template: str, + /, params: Optional["InvoiceRenderingTemplateUnarchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoiceRenderingTemplate": @@ -178,6 +183,7 @@ def unarchive( async def unarchive_async( self, template: str, + /, params: Optional["InvoiceRenderingTemplateUnarchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InvoiceRenderingTemplate": @@ -200,6 +206,7 @@ async def unarchive_async( def serialize_batch_archive( self, template: str, + /, params: Optional["InvoiceRenderingTemplateArchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -224,6 +231,7 @@ def serialize_batch_archive( def serialize_batch_unarchive( self, template: str, + /, params: Optional["InvoiceRenderingTemplateUnarchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index e9917914a..0bb6a4beb 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -84,6 +84,7 @@ def __getattr__(self, name): def delete( self, invoice: str, + /, params: Optional["InvoiceDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -104,6 +105,7 @@ def delete( async def delete_async( self, invoice: str, + /, params: Optional["InvoiceDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -124,6 +126,7 @@ async def delete_async( def retrieve( self, invoice: str, + /, params: Optional["InvoiceRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -144,6 +147,7 @@ def retrieve( async def retrieve_async( self, invoice: str, + /, params: Optional["InvoiceRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -164,12 +168,14 @@ async def retrieve_async( def update( self, invoice: str, + /, params: Optional["InvoiceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "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 @@ -189,12 +195,14 @@ def update( async def update_async( self, invoice: str, + /, params: Optional["InvoiceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "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 @@ -334,6 +342,7 @@ async def search_async( def add_lines( self, invoice: str, + /, params: "InvoiceAddLinesParams", options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -356,6 +365,7 @@ def add_lines( async def add_lines_async( self, invoice: str, + /, params: "InvoiceAddLinesParams", options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -378,6 +388,7 @@ async def add_lines_async( def attach_payment( self, invoice: str, + /, params: Optional["InvoiceAttachPaymentParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -409,6 +420,7 @@ def attach_payment( async def attach_payment_async( self, invoice: str, + /, params: Optional["InvoiceAttachPaymentParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -440,6 +452,7 @@ async def attach_payment_async( def detach_payment( self, invoice: str, + /, params: Optional["InvoiceDetachPaymentParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -462,6 +475,7 @@ def detach_payment( async def detach_payment_async( self, invoice: str, + /, params: Optional["InvoiceDetachPaymentParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -484,6 +498,7 @@ async def detach_payment_async( def finalize_invoice( self, invoice: str, + /, params: Optional["InvoiceFinalizeInvoiceParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -506,6 +521,7 @@ def finalize_invoice( async def finalize_invoice_async( self, invoice: str, + /, params: Optional["InvoiceFinalizeInvoiceParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -528,6 +544,7 @@ async def finalize_invoice_async( def mark_uncollectible( self, invoice: str, + /, params: Optional["InvoiceMarkUncollectibleParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -550,6 +567,7 @@ def mark_uncollectible( async def mark_uncollectible_async( self, invoice: str, + /, params: Optional["InvoiceMarkUncollectibleParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -572,6 +590,7 @@ async def mark_uncollectible_async( def pay( self, invoice: str, + /, params: Optional["InvoicePayParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -594,6 +613,7 @@ def pay( async def pay_async( self, invoice: str, + /, params: Optional["InvoicePayParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -616,6 +636,7 @@ async def pay_async( def remove_lines( self, invoice: str, + /, params: "InvoiceRemoveLinesParams", options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -638,6 +659,7 @@ def remove_lines( async def remove_lines_async( self, invoice: str, + /, params: "InvoiceRemoveLinesParams", options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -660,6 +682,7 @@ async def remove_lines_async( def send_invoice( self, invoice: str, + /, params: Optional["InvoiceSendInvoiceParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -684,6 +707,7 @@ def send_invoice( async def send_invoice_async( self, invoice: str, + /, params: Optional["InvoiceSendInvoiceParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -708,6 +732,7 @@ async def send_invoice_async( def update_lines( self, invoice: str, + /, params: "InvoiceUpdateLinesParams", options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -730,6 +755,7 @@ def update_lines( async def update_lines_async( self, invoice: str, + /, params: "InvoiceUpdateLinesParams", options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -752,6 +778,7 @@ async def update_lines_async( def void_invoice( self, invoice: str, + /, params: Optional["InvoiceVoidInvoiceParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -776,6 +803,7 @@ def void_invoice( async def void_invoice_async( self, invoice: str, + /, params: Optional["InvoiceVoidInvoiceParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Invoice": @@ -854,6 +882,7 @@ async def create_preview_async( def serialize_batch_delete( self, invoice: str, + /, params: Optional["InvoiceDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -878,6 +907,7 @@ def serialize_batch_delete( def serialize_batch_update( self, invoice: str, + /, params: Optional["InvoiceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -924,6 +954,7 @@ def serialize_batch_create( def serialize_batch_add_lines( self, invoice: str, + /, params: Optional["InvoiceAddLinesParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -948,6 +979,7 @@ def serialize_batch_add_lines( def serialize_batch_finalize_invoice( self, invoice: str, + /, params: Optional["InvoiceFinalizeInvoiceParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -972,6 +1004,7 @@ def serialize_batch_finalize_invoice( def serialize_batch_mark_uncollectible( self, invoice: str, + /, params: Optional["InvoiceMarkUncollectibleParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -996,6 +1029,7 @@ def serialize_batch_mark_uncollectible( def serialize_batch_pay( self, invoice: str, + /, params: Optional["InvoicePayParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -1020,6 +1054,7 @@ def serialize_batch_pay( def serialize_batch_remove_lines( self, invoice: str, + /, params: Optional["InvoiceRemoveLinesParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -1044,6 +1079,7 @@ def serialize_batch_remove_lines( def serialize_batch_send_invoice( self, invoice: str, + /, params: Optional["InvoiceSendInvoiceParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -1068,6 +1104,7 @@ def serialize_batch_send_invoice( def serialize_batch_update_lines( self, invoice: str, + /, params: Optional["InvoiceUpdateLinesParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -1092,6 +1129,7 @@ def serialize_batch_update_lines( def serialize_batch_void_invoice( self, invoice: str, + /, params: Optional["InvoiceVoidInvoiceParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_mandate.py b/stripe/_mandate.py index 536c699a3..b85708b23 100644 --- a/stripe/_mandate.py +++ b/stripe/_mandate.py @@ -128,7 +128,7 @@ class BacsDebit(StripeObject): """ class Blik(StripeObject): - expires_after: Optional[int] + expires_at: Optional[int] """ Date at which the mandate expires. """ diff --git a/stripe/_mandate_service.py b/stripe/_mandate_service.py index 429ce66b7..b763a6b87 100644 --- a/stripe/_mandate_service.py +++ b/stripe/_mandate_service.py @@ -55,6 +55,7 @@ async def list_async( def retrieve( self, mandate: str, + /, params: Optional["MandateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Mandate": @@ -75,6 +76,7 @@ def retrieve( async def retrieve_async( self, mandate: str, + /, params: Optional["MandateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Mandate": diff --git a/stripe/_margin_service.py b/stripe/_margin_service.py index c020b2e59..78ce7ce67 100644 --- a/stripe/_margin_service.py +++ b/stripe/_margin_service.py @@ -95,6 +95,7 @@ async def create_async( def retrieve( self, margin: str, + /, params: Optional["MarginRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Margin": @@ -117,6 +118,7 @@ def retrieve( async def retrieve_async( self, margin: str, + /, params: Optional["MarginRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Margin": @@ -139,6 +141,7 @@ async def retrieve_async( def update( self, margin: str, + /, params: Optional["MarginUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Margin": @@ -161,6 +164,7 @@ def update( async def update_async( self, margin: str, + /, params: Optional["MarginUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Margin": diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index c88493079..ca2be3ba6 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -25,6 +25,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"), @@ -647,6 +648,10 @@ "stripe.v2.core.vault._gb_bank_account", "GbBankAccount", ), + "v2.core.vault.network_token": ( + "stripe.v2.core.vault._network_token", + "NetworkToken", + ), "v2.core.vault.us_bank_account": ( "stripe.v2.core.vault._us_bank_account", "UsBankAccount", diff --git a/stripe/_order.py b/stripe/_order.py index 75a35b5b4..f37b7da39 100644 --- a/stripe/_order.py +++ b/stripe/_order.py @@ -1253,7 +1253,7 @@ async def retrieve_async( @classmethod def _cls_submit( - cls, id: str, **params: Unpack["OrderSubmitParams"] + cls, id: str, /, **params: Unpack["OrderSubmitParams"] ) -> "Order": """ Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://docs.stripe.com/api#reopen_order) method is called. @@ -1269,7 +1269,7 @@ def _cls_submit( @overload @staticmethod - def submit(id: str, **params: Unpack["OrderSubmitParams"]) -> "Order": + def submit(id: str, /, **params: Unpack["OrderSubmitParams"]) -> "Order": """ Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://docs.stripe.com/api#reopen_order) method is called. """ @@ -1302,7 +1302,7 @@ def submit( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_submit_async( - cls, id: str, **params: Unpack["OrderSubmitParams"] + cls, id: str, /, **params: Unpack["OrderSubmitParams"] ) -> "Order": """ Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://docs.stripe.com/api#reopen_order) method is called. @@ -1319,7 +1319,7 @@ async def _cls_submit_async( @overload @staticmethod async def submit_async( - id: str, **params: Unpack["OrderSubmitParams"] + id: str, /, **params: Unpack["OrderSubmitParams"] ) -> "Order": """ Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://docs.stripe.com/api#reopen_order) method is called. diff --git a/stripe/_order_service.py b/stripe/_order_service.py index 53fb41c62..c4b91a87a 100644 --- a/stripe/_order_service.py +++ b/stripe/_order_service.py @@ -96,6 +96,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["OrderRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Order": @@ -116,6 +117,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["OrderRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Order": @@ -136,6 +138,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["OrderUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Order": @@ -156,6 +159,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["OrderUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Order": @@ -176,6 +180,7 @@ async def update_async( def submit( self, id: str, + /, params: "OrderSubmitParams", options: Optional["RequestOptions"] = None, ) -> "Order": @@ -196,6 +201,7 @@ def submit( async def submit_async( self, id: str, + /, params: "OrderSubmitParams", options: Optional["RequestOptions"] = None, ) -> "Order": diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 744305567..b06812d26 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -590,7 +590,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. @@ -606,19 +609,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] @@ -1574,6 +1582,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 @@ -1607,6 +1619,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] """ @@ -2229,6 +2251,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] @@ -2313,6 +2336,7 @@ class Zip(StripeObject): "link": Link, "mb_way": MbWay, "mobilepay": Mobilepay, + "momo": Momo, "multibanco": Multibanco, "naver_pay": NaverPay, "nz_bank_account": NzBankAccount, @@ -2576,6 +2600,7 @@ async def list_async( def _cls_report_authenticated( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportAuthenticatedParams"], ) -> "PaymentAttemptRecord": """ @@ -2596,6 +2621,7 @@ def _cls_report_authenticated( @staticmethod def report_authenticated( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportAuthenticatedParams"], ) -> "PaymentAttemptRecord": """ @@ -2634,6 +2660,7 @@ def report_authenticated( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_authenticated_async( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportAuthenticatedParams"], ) -> "PaymentAttemptRecord": """ @@ -2654,6 +2681,7 @@ async def _cls_report_authenticated_async( @staticmethod async def report_authenticated_async( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportAuthenticatedParams"], ) -> "PaymentAttemptRecord": """ @@ -2692,6 +2720,7 @@ async def report_authenticated_async( # pyright: ignore[reportGeneralTypeIssues def _cls_report_authorized( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportAuthorizedParams"], ) -> "PaymentAttemptRecord": """ @@ -2712,6 +2741,7 @@ def _cls_report_authorized( @staticmethod def report_authorized( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportAuthorizedParams"], ) -> "PaymentAttemptRecord": """ @@ -2750,6 +2780,7 @@ def report_authorized( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_authorized_async( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportAuthorizedParams"], ) -> "PaymentAttemptRecord": """ @@ -2770,6 +2801,7 @@ async def _cls_report_authorized_async( @staticmethod async def report_authorized_async( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportAuthorizedParams"], ) -> "PaymentAttemptRecord": """ @@ -2808,6 +2840,7 @@ async def report_authorized_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_report_canceled( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportCanceledParams"], ) -> "PaymentAttemptRecord": """ @@ -2828,6 +2861,7 @@ def _cls_report_canceled( @staticmethod def report_canceled( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportCanceledParams"], ) -> "PaymentAttemptRecord": """ @@ -2866,6 +2900,7 @@ def report_canceled( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_canceled_async( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportCanceledParams"], ) -> "PaymentAttemptRecord": """ @@ -2886,6 +2921,7 @@ async def _cls_report_canceled_async( @staticmethod async def report_canceled_async( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportCanceledParams"], ) -> "PaymentAttemptRecord": """ @@ -2924,6 +2960,7 @@ async def report_canceled_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_report_early_fraud_warning( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportEarlyFraudWarningParams"], ) -> "PaymentAttemptRecord": """ @@ -2944,6 +2981,7 @@ def _cls_report_early_fraud_warning( @staticmethod def report_early_fraud_warning( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportEarlyFraudWarningParams"], ) -> "PaymentAttemptRecord": """ @@ -2984,6 +3022,7 @@ def report_early_fraud_warning( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_early_fraud_warning_async( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportEarlyFraudWarningParams"], ) -> "PaymentAttemptRecord": """ @@ -3004,6 +3043,7 @@ async def _cls_report_early_fraud_warning_async( @staticmethod async def report_early_fraud_warning_async( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportEarlyFraudWarningParams"], ) -> "PaymentAttemptRecord": """ @@ -3044,6 +3084,7 @@ async def report_early_fraud_warning_async( # pyright: ignore[reportGeneralType def _cls_report_failed( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportFailedParams"], ) -> "PaymentAttemptRecord": """ @@ -3064,6 +3105,7 @@ def _cls_report_failed( @staticmethod def report_failed( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportFailedParams"], ) -> "PaymentAttemptRecord": """ @@ -3102,6 +3144,7 @@ def report_failed( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_failed_async( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportFailedParams"], ) -> "PaymentAttemptRecord": """ @@ -3122,6 +3165,7 @@ async def _cls_report_failed_async( @staticmethod async def report_failed_async( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportFailedParams"], ) -> "PaymentAttemptRecord": """ @@ -3160,6 +3204,7 @@ async def report_failed_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_report_guaranteed( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportGuaranteedParams"], ) -> "PaymentAttemptRecord": """ @@ -3180,6 +3225,7 @@ def _cls_report_guaranteed( @staticmethod def report_guaranteed( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportGuaranteedParams"], ) -> "PaymentAttemptRecord": """ @@ -3218,6 +3264,7 @@ def report_guaranteed( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_guaranteed_async( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportGuaranteedParams"], ) -> "PaymentAttemptRecord": """ @@ -3238,6 +3285,7 @@ async def _cls_report_guaranteed_async( @staticmethod async def report_guaranteed_async( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportGuaranteedParams"], ) -> "PaymentAttemptRecord": """ @@ -3276,6 +3324,7 @@ async def report_guaranteed_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_report_informational( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportInformationalParams"], ) -> "PaymentAttemptRecord": """ @@ -3296,6 +3345,7 @@ def _cls_report_informational( @staticmethod def report_informational( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportInformationalParams"], ) -> "PaymentAttemptRecord": """ @@ -3334,6 +3384,7 @@ def report_informational( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_informational_async( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportInformationalParams"], ) -> "PaymentAttemptRecord": """ @@ -3354,6 +3405,7 @@ async def _cls_report_informational_async( @staticmethod async def report_informational_async( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportInformationalParams"], ) -> "PaymentAttemptRecord": """ @@ -3392,6 +3444,7 @@ async def report_informational_async( # pyright: ignore[reportGeneralTypeIssues def _cls_report_refund( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportRefundParams"], ) -> "PaymentAttemptRecord": """ @@ -3412,6 +3465,7 @@ def _cls_report_refund( @staticmethod def report_refund( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportRefundParams"], ) -> "PaymentAttemptRecord": """ @@ -3450,6 +3504,7 @@ def report_refund( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_refund_async( cls, payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportRefundParams"], ) -> "PaymentAttemptRecord": """ @@ -3470,6 +3525,7 @@ async def _cls_report_refund_async( @staticmethod async def report_refund_async( payment_attempt_record: str, + /, **params: Unpack["PaymentAttemptRecordReportRefundParams"], ) -> "PaymentAttemptRecord": """ diff --git a/stripe/_payment_attempt_record_service.py b/stripe/_payment_attempt_record_service.py index bb63941de..da7d2e1c8 100644 --- a/stripe/_payment_attempt_record_service.py +++ b/stripe/_payment_attempt_record_service.py @@ -83,6 +83,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["PaymentAttemptRecordRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentAttemptRecord": @@ -103,6 +104,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["PaymentAttemptRecordRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentAttemptRecord": @@ -123,6 +125,7 @@ async def retrieve_async( def report_authenticated( self, payment_attempt_record: str, + /, params: Optional[ "PaymentAttemptRecordReportAuthenticatedParams" ] = None, @@ -147,6 +150,7 @@ def report_authenticated( async def report_authenticated_async( self, payment_attempt_record: str, + /, params: Optional[ "PaymentAttemptRecordReportAuthenticatedParams" ] = None, @@ -171,6 +175,7 @@ async def report_authenticated_async( def report_authorized( self, payment_attempt_record: str, + /, params: Optional["PaymentAttemptRecordReportAuthorizedParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentAttemptRecord": @@ -193,6 +198,7 @@ def report_authorized( async def report_authorized_async( self, payment_attempt_record: str, + /, params: Optional["PaymentAttemptRecordReportAuthorizedParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentAttemptRecord": @@ -215,6 +221,7 @@ async def report_authorized_async( def report_canceled( self, payment_attempt_record: str, + /, params: Optional["PaymentAttemptRecordReportCanceledParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentAttemptRecord": @@ -237,6 +244,7 @@ def report_canceled( async def report_canceled_async( self, payment_attempt_record: str, + /, params: Optional["PaymentAttemptRecordReportCanceledParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentAttemptRecord": @@ -259,6 +267,7 @@ async def report_canceled_async( def report_early_fraud_warning( self, payment_attempt_record: str, + /, params: "PaymentAttemptRecordReportEarlyFraudWarningParams", options: Optional["RequestOptions"] = None, ) -> "PaymentAttemptRecord": @@ -281,6 +290,7 @@ def report_early_fraud_warning( async def report_early_fraud_warning_async( self, payment_attempt_record: str, + /, params: "PaymentAttemptRecordReportEarlyFraudWarningParams", options: Optional["RequestOptions"] = None, ) -> "PaymentAttemptRecord": @@ -303,6 +313,7 @@ async def report_early_fraud_warning_async( def report_failed( self, payment_attempt_record: str, + /, params: Optional["PaymentAttemptRecordReportFailedParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentAttemptRecord": @@ -325,6 +336,7 @@ def report_failed( async def report_failed_async( self, payment_attempt_record: str, + /, params: Optional["PaymentAttemptRecordReportFailedParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentAttemptRecord": @@ -347,6 +359,7 @@ async def report_failed_async( def report_guaranteed( self, payment_attempt_record: str, + /, params: Optional["PaymentAttemptRecordReportGuaranteedParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentAttemptRecord": @@ -369,6 +382,7 @@ def report_guaranteed( async def report_guaranteed_async( self, payment_attempt_record: str, + /, params: Optional["PaymentAttemptRecordReportGuaranteedParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentAttemptRecord": @@ -391,6 +405,7 @@ async def report_guaranteed_async( def report_informational( self, payment_attempt_record: str, + /, params: Optional[ "PaymentAttemptRecordReportInformationalParams" ] = None, @@ -415,6 +430,7 @@ def report_informational( async def report_informational_async( self, payment_attempt_record: str, + /, params: Optional[ "PaymentAttemptRecordReportInformationalParams" ] = None, @@ -439,6 +455,7 @@ async def report_informational_async( def report_refund( self, payment_attempt_record: str, + /, params: "PaymentAttemptRecordReportRefundParams", options: Optional["RequestOptions"] = None, ) -> "PaymentAttemptRecord": @@ -461,6 +478,7 @@ def report_refund( async def report_refund_async( self, payment_attempt_record: str, + /, params: "PaymentAttemptRecordReportRefundParams", options: Optional["RequestOptions"] = None, ) -> "PaymentAttemptRecord": diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index f2f5dd80d..81511c61c 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -1640,6 +1640,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 @@ -3585,7 +3589,7 @@ class MandateOptions(StripeObject): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: Optional[ - Literal["automatic", "payer_name_verification"] + Union[Literal["automatic", "payer_name_verification"], str] ] _inner_class_types = {"mandate_options": MandateOptions} @@ -5986,6 +5990,7 @@ class PaymentData(StripeObject): def _cls_apply_customer_balance( cls, intent: str, + /, **params: Unpack["PaymentIntentApplyCustomerBalanceParams"], ) -> "PaymentIntent": """ @@ -6006,6 +6011,7 @@ def _cls_apply_customer_balance( @staticmethod def apply_customer_balance( intent: str, + /, **params: Unpack["PaymentIntentApplyCustomerBalanceParams"], ) -> "PaymentIntent": """ @@ -6044,6 +6050,7 @@ def apply_customer_balance( # pyright: ignore[reportGeneralTypeIssues] async def _cls_apply_customer_balance_async( cls, intent: str, + /, **params: Unpack["PaymentIntentApplyCustomerBalanceParams"], ) -> "PaymentIntent": """ @@ -6064,6 +6071,7 @@ async def _cls_apply_customer_balance_async( @staticmethod async def apply_customer_balance_async( intent: str, + /, **params: Unpack["PaymentIntentApplyCustomerBalanceParams"], ) -> "PaymentIntent": """ @@ -6100,7 +6108,7 @@ async def apply_customer_balance_async( # pyright: ignore[reportGeneralTypeIssu @classmethod def _cls_cancel( - cls, intent: str, **params: Unpack["PaymentIntentCancelParams"] + cls, intent: str, /, **params: Unpack["PaymentIntentCancelParams"] ) -> "PaymentIntent": """ You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://docs.stripe.com/docs/payments/intents), processing. @@ -6123,7 +6131,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - intent: str, **params: Unpack["PaymentIntentCancelParams"] + intent: str, /, **params: Unpack["PaymentIntentCancelParams"] ) -> "PaymentIntent": """ You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://docs.stripe.com/docs/payments/intents), processing. @@ -6171,7 +6179,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, intent: str, **params: Unpack["PaymentIntentCancelParams"] + cls, intent: str, /, **params: Unpack["PaymentIntentCancelParams"] ) -> "PaymentIntent": """ You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://docs.stripe.com/docs/payments/intents), processing. @@ -6194,7 +6202,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - intent: str, **params: Unpack["PaymentIntentCancelParams"] + intent: str, /, **params: Unpack["PaymentIntentCancelParams"] ) -> "PaymentIntent": """ You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://docs.stripe.com/docs/payments/intents), processing. @@ -6242,7 +6250,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_capture( - cls, intent: str, **params: Unpack["PaymentIntentCaptureParams"] + cls, intent: str, /, **params: Unpack["PaymentIntentCaptureParams"] ) -> "PaymentIntent": """ Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. @@ -6265,7 +6273,7 @@ def _cls_capture( @overload @staticmethod def capture( - intent: str, **params: Unpack["PaymentIntentCaptureParams"] + intent: str, /, **params: Unpack["PaymentIntentCaptureParams"] ) -> "PaymentIntent": """ Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. @@ -6313,7 +6321,7 @@ def capture( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_capture_async( - cls, intent: str, **params: Unpack["PaymentIntentCaptureParams"] + cls, intent: str, /, **params: Unpack["PaymentIntentCaptureParams"] ) -> "PaymentIntent": """ Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. @@ -6336,7 +6344,7 @@ async def _cls_capture_async( @overload @staticmethod async def capture_async( - intent: str, **params: Unpack["PaymentIntentCaptureParams"] + intent: str, /, **params: Unpack["PaymentIntentCaptureParams"] ) -> "PaymentIntent": """ Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. @@ -6384,7 +6392,7 @@ async def capture_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_confirm( - cls, intent: str, **params: Unpack["PaymentIntentConfirmParams"] + cls, intent: str, /, **params: Unpack["PaymentIntentConfirmParams"] ) -> "PaymentIntent": """ Confirm that your customer intends to pay with current or provided @@ -6432,7 +6440,7 @@ def _cls_confirm( @overload @staticmethod def confirm( - intent: str, **params: Unpack["PaymentIntentConfirmParams"] + intent: str, /, **params: Unpack["PaymentIntentConfirmParams"] ) -> "PaymentIntent": """ Confirm that your customer intends to pay with current or provided @@ -6555,7 +6563,7 @@ def confirm( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_confirm_async( - cls, intent: str, **params: Unpack["PaymentIntentConfirmParams"] + cls, intent: str, /, **params: Unpack["PaymentIntentConfirmParams"] ) -> "PaymentIntent": """ Confirm that your customer intends to pay with current or provided @@ -6603,7 +6611,7 @@ async def _cls_confirm_async( @overload @staticmethod async def confirm_async( - intent: str, **params: Unpack["PaymentIntentConfirmParams"] + intent: str, /, **params: Unpack["PaymentIntentConfirmParams"] ) -> "PaymentIntent": """ Confirm that your customer intends to pay with current or provided @@ -6778,6 +6786,7 @@ async def create_async( def _cls_decrement_authorization( cls, intent: str, + /, **params: Unpack["PaymentIntentDecrementAuthorizationParams"], ) -> "PaymentIntent": """ @@ -6813,6 +6822,7 @@ def _cls_decrement_authorization( @staticmethod def decrement_authorization( intent: str, + /, **params: Unpack["PaymentIntentDecrementAuthorizationParams"], ) -> "PaymentIntent": """ @@ -6896,6 +6906,7 @@ def decrement_authorization( # pyright: ignore[reportGeneralTypeIssues] async def _cls_decrement_authorization_async( cls, intent: str, + /, **params: Unpack["PaymentIntentDecrementAuthorizationParams"], ) -> "PaymentIntent": """ @@ -6931,6 +6942,7 @@ async def _cls_decrement_authorization_async( @staticmethod async def decrement_authorization_async( intent: str, + /, **params: Unpack["PaymentIntentDecrementAuthorizationParams"], ) -> "PaymentIntent": """ @@ -7014,6 +7026,7 @@ async def decrement_authorization_async( # pyright: ignore[reportGeneralTypeIss def _cls_increment_authorization( cls, intent: str, + /, **params: Unpack["PaymentIntentIncrementAuthorizationParams"], ) -> "PaymentIntent": """ @@ -7059,6 +7072,7 @@ def _cls_increment_authorization( @staticmethod def increment_authorization( intent: str, + /, **params: Unpack["PaymentIntentIncrementAuthorizationParams"], ) -> "PaymentIntent": """ @@ -7172,6 +7186,7 @@ def increment_authorization( # pyright: ignore[reportGeneralTypeIssues] async def _cls_increment_authorization_async( cls, intent: str, + /, **params: Unpack["PaymentIntentIncrementAuthorizationParams"], ) -> "PaymentIntent": """ @@ -7217,6 +7232,7 @@ async def _cls_increment_authorization_async( @staticmethod async def increment_authorization_async( intent: str, + /, **params: Unpack["PaymentIntentIncrementAuthorizationParams"], ) -> "PaymentIntent": """ @@ -7414,7 +7430,7 @@ async def modify_async( @classmethod def _cls_reauthorize( - cls, intent: str, **params: Unpack["PaymentIntentReauthorizeParams"] + cls, intent: str, /, **params: Unpack["PaymentIntentReauthorizeParams"] ) -> "PaymentIntent": """ Reauthorize a PaymentIntent to obtain a new valid authorization after the initial authorization has expired. @@ -7440,7 +7456,7 @@ def _cls_reauthorize( @overload @staticmethod def reauthorize( - intent: str, **params: Unpack["PaymentIntentReauthorizeParams"] + intent: str, /, **params: Unpack["PaymentIntentReauthorizeParams"] ) -> "PaymentIntent": """ Reauthorize a PaymentIntent to obtain a new valid authorization after the initial authorization has expired. @@ -7497,7 +7513,7 @@ def reauthorize( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_reauthorize_async( - cls, intent: str, **params: Unpack["PaymentIntentReauthorizeParams"] + cls, intent: str, /, **params: Unpack["PaymentIntentReauthorizeParams"] ) -> "PaymentIntent": """ Reauthorize a PaymentIntent to obtain a new valid authorization after the initial authorization has expired. @@ -7523,7 +7539,7 @@ async def _cls_reauthorize_async( @overload @staticmethod async def reauthorize_async( - intent: str, **params: Unpack["PaymentIntentReauthorizeParams"] + intent: str, /, **params: Unpack["PaymentIntentReauthorizeParams"] ) -> "PaymentIntent": """ Reauthorize a PaymentIntent to obtain a new valid authorization after the initial authorization has expired. @@ -7610,7 +7626,10 @@ async def retrieve_async( @classmethod def _cls_trigger_action( - cls, intent: str, **params: Unpack["PaymentIntentTriggerActionParams"] + cls, + intent: str, + /, + **params: Unpack["PaymentIntentTriggerActionParams"], ) -> "PaymentIntent": """ Trigger an external action on a PaymentIntent. @@ -7629,7 +7648,7 @@ def _cls_trigger_action( @overload @staticmethod def trigger_action( - intent: str, **params: Unpack["PaymentIntentTriggerActionParams"] + intent: str, /, **params: Unpack["PaymentIntentTriggerActionParams"] ) -> "PaymentIntent": """ Trigger an external action on a PaymentIntent. @@ -7665,7 +7684,10 @@ def trigger_action( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_trigger_action_async( - cls, intent: str, **params: Unpack["PaymentIntentTriggerActionParams"] + cls, + intent: str, + /, + **params: Unpack["PaymentIntentTriggerActionParams"], ) -> "PaymentIntent": """ Trigger an external action on a PaymentIntent. @@ -7684,7 +7706,7 @@ async def _cls_trigger_action_async( @overload @staticmethod async def trigger_action_async( - intent: str, **params: Unpack["PaymentIntentTriggerActionParams"] + intent: str, /, **params: Unpack["PaymentIntentTriggerActionParams"] ) -> "PaymentIntent": """ Trigger an external action on a PaymentIntent. @@ -7722,6 +7744,7 @@ async def trigger_action_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_update_crypto_refund_address( cls, intent: str, + /, **params: Unpack["PaymentIntentUpdateCryptoRefundAddressParams"], ) -> "PaymentIntent": """ @@ -7742,6 +7765,7 @@ def _cls_update_crypto_refund_address( @staticmethod def update_crypto_refund_address( intent: str, + /, **params: Unpack["PaymentIntentUpdateCryptoRefundAddressParams"], ) -> "PaymentIntent": """ @@ -7780,6 +7804,7 @@ def update_crypto_refund_address( # pyright: ignore[reportGeneralTypeIssues] async def _cls_update_crypto_refund_address_async( cls, intent: str, + /, **params: Unpack["PaymentIntentUpdateCryptoRefundAddressParams"], ) -> "PaymentIntent": """ @@ -7800,6 +7825,7 @@ async def _cls_update_crypto_refund_address_async( @staticmethod async def update_crypto_refund_address_async( intent: str, + /, **params: Unpack["PaymentIntentUpdateCryptoRefundAddressParams"], ) -> "PaymentIntent": """ @@ -7838,6 +7864,7 @@ async def update_crypto_refund_address_async( # pyright: ignore[reportGeneralTy def _cls_verify_microdeposits( cls, intent: str, + /, **params: Unpack["PaymentIntentVerifyMicrodepositsParams"], ) -> "PaymentIntent": """ @@ -7857,7 +7884,9 @@ def _cls_verify_microdeposits( @overload @staticmethod def verify_microdeposits( - intent: str, **params: Unpack["PaymentIntentVerifyMicrodepositsParams"] + intent: str, + /, + **params: Unpack["PaymentIntentVerifyMicrodepositsParams"], ) -> "PaymentIntent": """ Verifies microdeposits on a PaymentIntent object. @@ -7895,6 +7924,7 @@ def verify_microdeposits( # pyright: ignore[reportGeneralTypeIssues] async def _cls_verify_microdeposits_async( cls, intent: str, + /, **params: Unpack["PaymentIntentVerifyMicrodepositsParams"], ) -> "PaymentIntent": """ @@ -7914,7 +7944,9 @@ async def _cls_verify_microdeposits_async( @overload @staticmethod async def verify_microdeposits_async( - intent: str, **params: Unpack["PaymentIntentVerifyMicrodepositsParams"] + intent: str, + /, + **params: Unpack["PaymentIntentVerifyMicrodepositsParams"], ) -> "PaymentIntent": """ Verifies microdeposits on a PaymentIntent object. @@ -7992,6 +8024,7 @@ async def search_auto_paging_iter_async( def list_amount_details_line_items( cls, intent: str, + /, **params: Unpack["PaymentIntentListAmountDetailsLineItemsParams"], ) -> ListObject["PaymentIntentAmountDetailsLineItem"]: """ @@ -8012,6 +8045,7 @@ def list_amount_details_line_items( async def list_amount_details_line_items_async( cls, intent: str, + /, **params: Unpack["PaymentIntentListAmountDetailsLineItemsParams"], ) -> ListObject["PaymentIntentAmountDetailsLineItem"]: """ @@ -8035,6 +8069,7 @@ class TestHelpers(APIResourceTestHelpers["PaymentIntent"]): def _cls_simulate_crypto_deposit( cls, intent: str, + /, **params: Unpack["PaymentIntentSimulateCryptoDepositParams"], ) -> "PaymentIntent": """ @@ -8055,6 +8090,7 @@ def _cls_simulate_crypto_deposit( @staticmethod def simulate_crypto_deposit( intent: str, + /, **params: Unpack["PaymentIntentSimulateCryptoDepositParams"], ) -> "PaymentIntent": """ @@ -8093,6 +8129,7 @@ def simulate_crypto_deposit( # pyright: ignore[reportGeneralTypeIssues] async def _cls_simulate_crypto_deposit_async( cls, intent: str, + /, **params: Unpack["PaymentIntentSimulateCryptoDepositParams"], ) -> "PaymentIntent": """ @@ -8113,6 +8150,7 @@ async def _cls_simulate_crypto_deposit_async( @staticmethod async def simulate_crypto_deposit_async( intent: str, + /, **params: Unpack["PaymentIntentSimulateCryptoDepositParams"], ) -> "PaymentIntent": """ diff --git a/stripe/_payment_intent_amount_details_line_item_service.py b/stripe/_payment_intent_amount_details_line_item_service.py index a8ac4bc15..1cadd061e 100644 --- a/stripe/_payment_intent_amount_details_line_item_service.py +++ b/stripe/_payment_intent_amount_details_line_item_service.py @@ -20,6 +20,7 @@ class PaymentIntentAmountDetailsLineItemService(StripeService): def list( self, intent: str, + /, params: Optional[ "PaymentIntentAmountDetailsLineItemListParams" ] = None, @@ -44,6 +45,7 @@ def list( async def list_async( self, intent: str, + /, params: Optional[ "PaymentIntentAmountDetailsLineItemListParams" ] = None, diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index b5a9ebad0..d88bbbd50 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -187,6 +187,7 @@ async def create_async( def retrieve( self, intent: str, + /, params: Optional["PaymentIntentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -213,6 +214,7 @@ def retrieve( async def retrieve_async( self, intent: str, + /, params: Optional["PaymentIntentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -239,6 +241,7 @@ async def retrieve_async( def update( self, intent: str, + /, params: Optional["PaymentIntentUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -267,6 +270,7 @@ def update( async def update_async( self, intent: str, + /, params: Optional["PaymentIntentUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -339,6 +343,7 @@ async def search_async( def apply_customer_balance( self, intent: str, + /, params: Optional["PaymentIntentApplyCustomerBalanceParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -361,6 +366,7 @@ def apply_customer_balance( async def apply_customer_balance_async( self, intent: str, + /, params: Optional["PaymentIntentApplyCustomerBalanceParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -383,6 +389,7 @@ async def apply_customer_balance_async( def cancel( self, intent: str, + /, params: Optional["PaymentIntentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -409,6 +416,7 @@ def cancel( async def cancel_async( self, intent: str, + /, params: Optional["PaymentIntentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -435,6 +443,7 @@ async def cancel_async( def capture( self, intent: str, + /, params: Optional["PaymentIntentCaptureParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -461,6 +470,7 @@ def capture( async def capture_async( self, intent: str, + /, params: Optional["PaymentIntentCaptureParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -487,6 +497,7 @@ async def capture_async( def confirm( self, intent: str, + /, params: Optional["PaymentIntentConfirmParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -538,6 +549,7 @@ def confirm( async def confirm_async( self, intent: str, + /, params: Optional["PaymentIntentConfirmParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -589,6 +601,7 @@ async def confirm_async( def decrement_authorization( self, intent: str, + /, params: "PaymentIntentDecrementAuthorizationParams", options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -626,6 +639,7 @@ def decrement_authorization( async def decrement_authorization_async( self, intent: str, + /, params: "PaymentIntentDecrementAuthorizationParams", options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -663,6 +677,7 @@ async def decrement_authorization_async( def increment_authorization( self, intent: str, + /, params: "PaymentIntentIncrementAuthorizationParams", options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -710,6 +725,7 @@ def increment_authorization( async def increment_authorization_async( self, intent: str, + /, params: "PaymentIntentIncrementAuthorizationParams", options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -757,6 +773,7 @@ async def increment_authorization_async( def reauthorize( self, intent: str, + /, params: Optional["PaymentIntentReauthorizeParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -786,6 +803,7 @@ def reauthorize( async def reauthorize_async( self, intent: str, + /, params: Optional["PaymentIntentReauthorizeParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -815,6 +833,7 @@ async def reauthorize_async( def update_crypto_refund_address( self, intent: str, + /, params: "PaymentIntentUpdateCryptoRefundAddressParams", options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -837,6 +856,7 @@ def update_crypto_refund_address( async def update_crypto_refund_address_async( self, intent: str, + /, params: "PaymentIntentUpdateCryptoRefundAddressParams", options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -859,6 +879,7 @@ async def update_crypto_refund_address_async( def verify_microdeposits( self, intent: str, + /, params: Optional["PaymentIntentVerifyMicrodepositsParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -881,6 +902,7 @@ def verify_microdeposits( async def verify_microdeposits_async( self, intent: str, + /, params: Optional["PaymentIntentVerifyMicrodepositsParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -903,6 +925,7 @@ async def verify_microdeposits_async( def trigger_action( self, intent: str, + /, params: "PaymentIntentTriggerActionParams", options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -925,6 +948,7 @@ def trigger_action( async def trigger_action_async( self, intent: str, + /, params: "PaymentIntentTriggerActionParams", options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index 6379c46f3..2b67a8de1 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -165,7 +165,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"] """ @@ -1076,6 +1076,7 @@ async def list_async( def _cls_list_line_items( cls, payment_link: str, + /, **params: Unpack["PaymentLinkListLineItemsParams"], ) -> ListObject["LineItem"]: """ @@ -1095,7 +1096,9 @@ def _cls_list_line_items( @overload @staticmethod def list_line_items( - payment_link: str, **params: Unpack["PaymentLinkListLineItemsParams"] + payment_link: str, + /, + **params: Unpack["PaymentLinkListLineItemsParams"], ) -> ListObject["LineItem"]: """ When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -1133,6 +1136,7 @@ def list_line_items( # pyright: ignore[reportGeneralTypeIssues] async def _cls_list_line_items_async( cls, payment_link: str, + /, **params: Unpack["PaymentLinkListLineItemsParams"], ) -> ListObject["LineItem"]: """ @@ -1152,7 +1156,9 @@ async def _cls_list_line_items_async( @overload @staticmethod async def list_line_items_async( - payment_link: str, **params: Unpack["PaymentLinkListLineItemsParams"] + payment_link: str, + /, + **params: Unpack["PaymentLinkListLineItemsParams"], ) -> ListObject["LineItem"]: """ When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/stripe/_payment_link_line_item_service.py b/stripe/_payment_link_line_item_service.py index d480f536c..43d6a43da 100644 --- a/stripe/_payment_link_line_item_service.py +++ b/stripe/_payment_link_line_item_service.py @@ -18,6 +18,7 @@ class PaymentLinkLineItemService(StripeService): def list( self, payment_link: str, + /, params: Optional["PaymentLinkLineItemListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[LineItem]": @@ -40,6 +41,7 @@ def list( async def list_async( self, payment_link: str, + /, params: Optional["PaymentLinkLineItemListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[LineItem]": diff --git a/stripe/_payment_link_service.py b/stripe/_payment_link_service.py index 0fc673475..9536b8df4 100644 --- a/stripe/_payment_link_service.py +++ b/stripe/_payment_link_service.py @@ -133,6 +133,7 @@ async def create_async( def retrieve( self, payment_link: str, + /, params: Optional["PaymentLinkRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentLink": @@ -155,6 +156,7 @@ def retrieve( async def retrieve_async( self, payment_link: str, + /, params: Optional["PaymentLinkRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentLink": @@ -177,6 +179,7 @@ async def retrieve_async( def update( self, payment_link: str, + /, params: Optional["PaymentLinkUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentLink": @@ -199,6 +202,7 @@ def update( async def update_async( self, payment_link: str, + /, params: Optional["PaymentLinkUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentLink": diff --git a/stripe/_payment_location_capability_service.py b/stripe/_payment_location_capability_service.py index 5ea8c8b8b..30dc1d9dd 100644 --- a/stripe/_payment_location_capability_service.py +++ b/stripe/_payment_location_capability_service.py @@ -62,6 +62,7 @@ async def list_async( def retrieve( self, capability: str, + /, params: "PaymentLocationCapabilityRetrieveParams", options: Optional["RequestOptions"] = None, ) -> "PaymentLocationCapability": @@ -84,6 +85,7 @@ def retrieve( async def retrieve_async( self, capability: str, + /, params: "PaymentLocationCapabilityRetrieveParams", options: Optional["RequestOptions"] = None, ) -> "PaymentLocationCapability": @@ -106,6 +108,7 @@ async def retrieve_async( def update( self, capability: str, + /, params: "PaymentLocationCapabilityUpdateParams", options: Optional["RequestOptions"] = None, ) -> "PaymentLocationCapability": @@ -128,6 +131,7 @@ def update( async def update_async( self, capability: str, + /, params: "PaymentLocationCapabilityUpdateParams", options: Optional["RequestOptions"] = None, ) -> "PaymentLocationCapability": diff --git a/stripe/_payment_location_service.py b/stripe/_payment_location_service.py index b7abddfba..7e3af4096 100644 --- a/stripe/_payment_location_service.py +++ b/stripe/_payment_location_service.py @@ -30,6 +30,7 @@ class PaymentLocationService(StripeService): def delete( self, id: str, + /, params: Optional["PaymentLocationDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentLocation": @@ -50,6 +51,7 @@ def delete( async def delete_async( self, id: str, + /, params: Optional["PaymentLocationDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentLocation": @@ -70,6 +72,7 @@ async def delete_async( def retrieve( self, id: str, + /, params: Optional["PaymentLocationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentLocation": @@ -90,6 +93,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["PaymentLocationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentLocation": @@ -110,6 +114,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["PaymentLocationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentLocation": @@ -130,6 +135,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["PaymentLocationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentLocation": diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 0038cf280..a6ed710ae 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -1838,7 +1838,10 @@ class Zip(StripeObject): @classmethod def _cls_attach( - cls, payment_method: str, **params: Unpack["PaymentMethodAttachParams"] + cls, + payment_method: str, + /, + **params: Unpack["PaymentMethodAttachParams"], ) -> "PaymentMethod": """ Attaches a PaymentMethod object to a Customer. @@ -1869,7 +1872,7 @@ def _cls_attach( @overload @staticmethod def attach( - payment_method: str, **params: Unpack["PaymentMethodAttachParams"] + payment_method: str, /, **params: Unpack["PaymentMethodAttachParams"] ) -> "PaymentMethod": """ Attaches a PaymentMethod object to a Customer. @@ -1941,7 +1944,10 @@ def attach( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_attach_async( - cls, payment_method: str, **params: Unpack["PaymentMethodAttachParams"] + cls, + payment_method: str, + /, + **params: Unpack["PaymentMethodAttachParams"], ) -> "PaymentMethod": """ Attaches a PaymentMethod object to a Customer. @@ -1972,7 +1978,7 @@ async def _cls_attach_async( @overload @staticmethod async def attach_async( - payment_method: str, **params: Unpack["PaymentMethodAttachParams"] + payment_method: str, /, **params: Unpack["PaymentMethodAttachParams"] ) -> "PaymentMethod": """ Attaches a PaymentMethod object to a Customer. @@ -2046,6 +2052,7 @@ async def attach_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_check_balance( cls, payment_method: str, + /, **params: Unpack["PaymentMethodCheckBalanceParams"], ) -> "PaymentMethodBalance": """ @@ -2066,6 +2073,7 @@ def _cls_check_balance( @staticmethod def check_balance( payment_method: str, + /, **params: Unpack["PaymentMethodCheckBalanceParams"], ) -> "PaymentMethodBalance": """ @@ -2104,6 +2112,7 @@ def check_balance( # pyright: ignore[reportGeneralTypeIssues] async def _cls_check_balance_async( cls, payment_method: str, + /, **params: Unpack["PaymentMethodCheckBalanceParams"], ) -> "PaymentMethodBalance": """ @@ -2124,6 +2133,7 @@ async def _cls_check_balance_async( @staticmethod async def check_balance_async( payment_method: str, + /, **params: Unpack["PaymentMethodCheckBalanceParams"], ) -> "PaymentMethodBalance": """ @@ -2196,7 +2206,10 @@ async def create_async( @classmethod def _cls_detach( - cls, payment_method: str, **params: Unpack["PaymentMethodDetachParams"] + cls, + payment_method: str, + /, + **params: Unpack["PaymentMethodDetachParams"], ) -> "PaymentMethod": """ Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer. @@ -2215,7 +2228,7 @@ def _cls_detach( @overload @staticmethod def detach( - payment_method: str, **params: Unpack["PaymentMethodDetachParams"] + payment_method: str, /, **params: Unpack["PaymentMethodDetachParams"] ) -> "PaymentMethod": """ Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer. @@ -2251,7 +2264,10 @@ def detach( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_detach_async( - cls, payment_method: str, **params: Unpack["PaymentMethodDetachParams"] + cls, + payment_method: str, + /, + **params: Unpack["PaymentMethodDetachParams"], ) -> "PaymentMethod": """ Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer. @@ -2270,7 +2286,7 @@ async def _cls_detach_async( @overload @staticmethod async def detach_async( - payment_method: str, **params: Unpack["PaymentMethodDetachParams"] + payment_method: str, /, **params: Unpack["PaymentMethodDetachParams"] ) -> "PaymentMethod": """ Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer. diff --git a/stripe/_payment_method_configuration_service.py b/stripe/_payment_method_configuration_service.py index e8421f119..8a637b2cb 100644 --- a/stripe/_payment_method_configuration_service.py +++ b/stripe/_payment_method_configuration_service.py @@ -103,6 +103,7 @@ async def create_async( def retrieve( self, configuration: str, + /, params: Optional["PaymentMethodConfigurationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethodConfiguration": @@ -125,6 +126,7 @@ def retrieve( async def retrieve_async( self, configuration: str, + /, params: Optional["PaymentMethodConfigurationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethodConfiguration": @@ -147,6 +149,7 @@ async def retrieve_async( def update( self, configuration: str, + /, params: Optional["PaymentMethodConfigurationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethodConfiguration": @@ -169,6 +172,7 @@ def update( async def update_async( self, configuration: str, + /, params: Optional["PaymentMethodConfigurationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethodConfiguration": diff --git a/stripe/_payment_method_domain.py b/stripe/_payment_method_domain.py index 31d7467bd..d60833b78 100644 --- a/stripe/_payment_method_domain.py +++ b/stripe/_payment_method_domain.py @@ -326,6 +326,7 @@ async def retrieve_async( def _cls_validate( cls, payment_method_domain: str, + /, **params: Unpack["PaymentMethodDomainValidateParams"], ) -> "PaymentMethodDomain": """ @@ -351,6 +352,7 @@ def _cls_validate( @staticmethod def validate( payment_method_domain: str, + /, **params: Unpack["PaymentMethodDomainValidateParams"], ) -> "PaymentMethodDomain": """ @@ -404,6 +406,7 @@ def validate( # pyright: ignore[reportGeneralTypeIssues] async def _cls_validate_async( cls, payment_method_domain: str, + /, **params: Unpack["PaymentMethodDomainValidateParams"], ) -> "PaymentMethodDomain": """ @@ -429,6 +432,7 @@ async def _cls_validate_async( @staticmethod async def validate_async( payment_method_domain: str, + /, **params: Unpack["PaymentMethodDomainValidateParams"], ) -> "PaymentMethodDomain": """ diff --git a/stripe/_payment_method_domain_service.py b/stripe/_payment_method_domain_service.py index 122bb45a3..f508640e4 100644 --- a/stripe/_payment_method_domain_service.py +++ b/stripe/_payment_method_domain_service.py @@ -106,6 +106,7 @@ async def create_async( def retrieve( self, payment_method_domain: str, + /, params: Optional["PaymentMethodDomainRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethodDomain": @@ -128,6 +129,7 @@ def retrieve( async def retrieve_async( self, payment_method_domain: str, + /, params: Optional["PaymentMethodDomainRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethodDomain": @@ -150,6 +152,7 @@ async def retrieve_async( def update( self, payment_method_domain: str, + /, params: Optional["PaymentMethodDomainUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethodDomain": @@ -172,6 +175,7 @@ def update( async def update_async( self, payment_method_domain: str, + /, params: Optional["PaymentMethodDomainUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethodDomain": @@ -194,6 +198,7 @@ async def update_async( def validate( self, payment_method_domain: str, + /, params: Optional["PaymentMethodDomainValidateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethodDomain": @@ -221,6 +226,7 @@ def validate( async def validate_async( self, payment_method_domain: str, + /, params: Optional["PaymentMethodDomainValidateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethodDomain": diff --git a/stripe/_payment_method_service.py b/stripe/_payment_method_service.py index dac3399e8..e07dce63d 100644 --- a/stripe/_payment_method_service.py +++ b/stripe/_payment_method_service.py @@ -120,6 +120,7 @@ async def create_async( def retrieve( self, payment_method: str, + /, params: Optional["PaymentMethodRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethod": @@ -142,6 +143,7 @@ def retrieve( async def retrieve_async( self, payment_method: str, + /, params: Optional["PaymentMethodRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethod": @@ -164,6 +166,7 @@ async def retrieve_async( def update( self, payment_method: str, + /, params: Optional["PaymentMethodUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethod": @@ -186,6 +189,7 @@ def update( async def update_async( self, payment_method: str, + /, params: Optional["PaymentMethodUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethod": @@ -208,6 +212,7 @@ async def update_async( def attach( self, payment_method: str, + /, params: Optional["PaymentMethodAttachParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethod": @@ -242,6 +247,7 @@ def attach( async def attach_async( self, payment_method: str, + /, params: Optional["PaymentMethodAttachParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethod": @@ -276,6 +282,7 @@ async def attach_async( def check_balance( self, payment_method: str, + /, params: Optional["PaymentMethodCheckBalanceParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethodBalance": @@ -298,6 +305,7 @@ def check_balance( async def check_balance_async( self, payment_method: str, + /, params: Optional["PaymentMethodCheckBalanceParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethodBalance": @@ -320,6 +328,7 @@ async def check_balance_async( def detach( self, payment_method: str, + /, params: Optional["PaymentMethodDetachParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethod": @@ -342,6 +351,7 @@ def detach( async def detach_async( self, payment_method: str, + /, params: Optional["PaymentMethodDetachParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentMethod": @@ -364,6 +374,7 @@ async def detach_async( def serialize_batch_attach( self, payment_method: str, + /, params: Optional["PaymentMethodAttachParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_payment_plan_service.py b/stripe/_payment_plan_service.py index 1b0a6009d..068430057 100644 --- a/stripe/_payment_plan_service.py +++ b/stripe/_payment_plan_service.py @@ -101,6 +101,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["PaymentPlanRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentPlan": @@ -121,6 +122,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["PaymentPlanRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentPlan": @@ -141,6 +143,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["PaymentPlanUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentPlan": @@ -161,6 +164,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["PaymentPlanUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentPlan": diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 9c567f5e9..0e23c69ee 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -605,7 +605,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. @@ -621,19 +624,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] @@ -1589,6 +1597,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 @@ -1622,6 +1634,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] """ @@ -2244,6 +2266,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] @@ -2328,6 +2351,7 @@ class Zip(StripeObject): "link": Link, "mb_way": MbWay, "mobilepay": Mobilepay, + "momo": Momo, "multibanco": Multibanco, "naver_pay": NaverPay, "nz_bank_account": NzBankAccount, @@ -2589,7 +2613,7 @@ async def list_async( @classmethod def _cls_report_dispute( - cls, id: str, **params: Unpack["PaymentRecordReportDisputeParams"] + cls, id: str, /, **params: Unpack["PaymentRecordReportDisputeParams"] ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2609,7 +2633,7 @@ def _cls_report_dispute( @overload @staticmethod def report_dispute( - id: str, **params: Unpack["PaymentRecordReportDisputeParams"] + id: str, /, **params: Unpack["PaymentRecordReportDisputeParams"] ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2648,7 +2672,7 @@ def report_dispute( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_report_dispute_async( - cls, id: str, **params: Unpack["PaymentRecordReportDisputeParams"] + cls, id: str, /, **params: Unpack["PaymentRecordReportDisputeParams"] ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2668,7 +2692,7 @@ async def _cls_report_dispute_async( @overload @staticmethod async def report_dispute_async( - id: str, **params: Unpack["PaymentRecordReportDisputeParams"] + id: str, /, **params: Unpack["PaymentRecordReportDisputeParams"] ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2745,6 +2769,7 @@ async def report_payment_async( def _cls_report_payment_attempt( cls, id: str, + /, **params: Unpack["PaymentRecordReportPaymentAttemptParams"], ) -> "PaymentRecord": """ @@ -2765,7 +2790,7 @@ def _cls_report_payment_attempt( @overload @staticmethod def report_payment_attempt( - id: str, **params: Unpack["PaymentRecordReportPaymentAttemptParams"] + id: str, /, **params: Unpack["PaymentRecordReportPaymentAttemptParams"] ) -> "PaymentRecord": """ Report a new payment attempt on the specified Payment Record. A new payment @@ -2806,6 +2831,7 @@ def report_payment_attempt( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_payment_attempt_async( cls, id: str, + /, **params: Unpack["PaymentRecordReportPaymentAttemptParams"], ) -> "PaymentRecord": """ @@ -2826,7 +2852,7 @@ async def _cls_report_payment_attempt_async( @overload @staticmethod async def report_payment_attempt_async( - id: str, **params: Unpack["PaymentRecordReportPaymentAttemptParams"] + id: str, /, **params: Unpack["PaymentRecordReportPaymentAttemptParams"] ) -> "PaymentRecord": """ Report a new payment attempt on the specified Payment Record. A new payment @@ -2867,6 +2893,7 @@ async def report_payment_attempt_async( # pyright: ignore[reportGeneralTypeIssu def _cls_report_payment_attempt_canceled( cls, id: str, + /, **params: Unpack["PaymentRecordReportPaymentAttemptCanceledParams"], ) -> "PaymentRecord": """ @@ -2888,6 +2915,7 @@ def _cls_report_payment_attempt_canceled( @staticmethod def report_payment_attempt_canceled( id: str, + /, **params: Unpack["PaymentRecordReportPaymentAttemptCanceledParams"], ) -> "PaymentRecord": """ @@ -2931,6 +2959,7 @@ def report_payment_attempt_canceled( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_payment_attempt_canceled_async( cls, id: str, + /, **params: Unpack["PaymentRecordReportPaymentAttemptCanceledParams"], ) -> "PaymentRecord": """ @@ -2952,6 +2981,7 @@ async def _cls_report_payment_attempt_canceled_async( @staticmethod async def report_payment_attempt_canceled_async( id: str, + /, **params: Unpack["PaymentRecordReportPaymentAttemptCanceledParams"], ) -> "PaymentRecord": """ @@ -2995,6 +3025,7 @@ async def report_payment_attempt_canceled_async( # pyright: ignore[reportGenera def _cls_report_payment_attempt_failed( cls, id: str, + /, **params: Unpack["PaymentRecordReportPaymentAttemptFailedParams"], ) -> "PaymentRecord": """ @@ -3016,6 +3047,7 @@ def _cls_report_payment_attempt_failed( @staticmethod def report_payment_attempt_failed( id: str, + /, **params: Unpack["PaymentRecordReportPaymentAttemptFailedParams"], ) -> "PaymentRecord": """ @@ -3057,6 +3089,7 @@ def report_payment_attempt_failed( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_payment_attempt_failed_async( cls, id: str, + /, **params: Unpack["PaymentRecordReportPaymentAttemptFailedParams"], ) -> "PaymentRecord": """ @@ -3078,6 +3111,7 @@ async def _cls_report_payment_attempt_failed_async( @staticmethod async def report_payment_attempt_failed_async( id: str, + /, **params: Unpack["PaymentRecordReportPaymentAttemptFailedParams"], ) -> "PaymentRecord": """ @@ -3119,6 +3153,7 @@ async def report_payment_attempt_failed_async( # pyright: ignore[reportGeneralT def _cls_report_payment_attempt_guaranteed( cls, id: str, + /, **params: Unpack["PaymentRecordReportPaymentAttemptGuaranteedParams"], ) -> "PaymentRecord": """ @@ -3140,6 +3175,7 @@ def _cls_report_payment_attempt_guaranteed( @staticmethod def report_payment_attempt_guaranteed( id: str, + /, **params: Unpack["PaymentRecordReportPaymentAttemptGuaranteedParams"], ) -> "PaymentRecord": """ @@ -3183,6 +3219,7 @@ def report_payment_attempt_guaranteed( # pyright: ignore[reportGeneralTypeIssue async def _cls_report_payment_attempt_guaranteed_async( cls, id: str, + /, **params: Unpack["PaymentRecordReportPaymentAttemptGuaranteedParams"], ) -> "PaymentRecord": """ @@ -3204,6 +3241,7 @@ async def _cls_report_payment_attempt_guaranteed_async( @staticmethod async def report_payment_attempt_guaranteed_async( id: str, + /, **params: Unpack["PaymentRecordReportPaymentAttemptGuaranteedParams"], ) -> "PaymentRecord": """ @@ -3247,6 +3285,7 @@ async def report_payment_attempt_guaranteed_async( # pyright: ignore[reportGene def _cls_report_payment_attempt_informational( cls, id: str, + /, **params: Unpack[ "PaymentRecordReportPaymentAttemptInformationalParams" ], @@ -3269,6 +3308,7 @@ def _cls_report_payment_attempt_informational( @staticmethod def report_payment_attempt_informational( id: str, + /, **params: Unpack[ "PaymentRecordReportPaymentAttemptInformationalParams" ], @@ -3315,6 +3355,7 @@ def report_payment_attempt_informational( # pyright: ignore[reportGeneralTypeIs async def _cls_report_payment_attempt_informational_async( cls, id: str, + /, **params: Unpack[ "PaymentRecordReportPaymentAttemptInformationalParams" ], @@ -3337,6 +3378,7 @@ async def _cls_report_payment_attempt_informational_async( @staticmethod async def report_payment_attempt_informational_async( id: str, + /, **params: Unpack[ "PaymentRecordReportPaymentAttemptInformationalParams" ], @@ -3381,7 +3423,7 @@ async def report_payment_attempt_informational_async( # pyright: ignore[reportG @classmethod def _cls_report_refund( - cls, id: str, **params: Unpack["PaymentRecordReportRefundParams"] + cls, id: str, /, **params: Unpack["PaymentRecordReportRefundParams"] ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3401,7 +3443,7 @@ def _cls_report_refund( @overload @staticmethod def report_refund( - id: str, **params: Unpack["PaymentRecordReportRefundParams"] + id: str, /, **params: Unpack["PaymentRecordReportRefundParams"] ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3440,7 +3482,7 @@ def report_refund( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_report_refund_async( - cls, id: str, **params: Unpack["PaymentRecordReportRefundParams"] + cls, id: str, /, **params: Unpack["PaymentRecordReportRefundParams"] ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3460,7 +3502,7 @@ async def _cls_report_refund_async( @overload @staticmethod async def report_refund_async( - id: str, **params: Unpack["PaymentRecordReportRefundParams"] + id: str, /, **params: Unpack["PaymentRecordReportRefundParams"] ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record diff --git a/stripe/_payment_record_service.py b/stripe/_payment_record_service.py index 3ca94b536..fd6211b33 100644 --- a/stripe/_payment_record_service.py +++ b/stripe/_payment_record_service.py @@ -87,6 +87,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["PaymentRecordRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentRecord": @@ -107,6 +108,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["PaymentRecordRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentRecord": @@ -171,6 +173,7 @@ async def search_async( def report_dispute( self, id: str, + /, params: "PaymentRecordReportDisputeParams", options: Optional["RequestOptions"] = None, ) -> "PaymentRecord": @@ -194,6 +197,7 @@ def report_dispute( async def report_dispute_async( self, id: str, + /, params: "PaymentRecordReportDisputeParams", options: Optional["RequestOptions"] = None, ) -> "PaymentRecord": @@ -217,6 +221,7 @@ async def report_dispute_async( def report_payment_attempt( self, id: str, + /, params: "PaymentRecordReportPaymentAttemptParams", options: Optional["RequestOptions"] = None, ) -> "PaymentRecord": @@ -240,6 +245,7 @@ def report_payment_attempt( async def report_payment_attempt_async( self, id: str, + /, params: "PaymentRecordReportPaymentAttemptParams", options: Optional["RequestOptions"] = None, ) -> "PaymentRecord": @@ -263,6 +269,7 @@ async def report_payment_attempt_async( def report_payment_attempt_canceled( self, id: str, + /, params: Optional[ "PaymentRecordReportPaymentAttemptCanceledParams" ] = None, @@ -288,6 +295,7 @@ def report_payment_attempt_canceled( async def report_payment_attempt_canceled_async( self, id: str, + /, params: Optional[ "PaymentRecordReportPaymentAttemptCanceledParams" ] = None, @@ -313,6 +321,7 @@ async def report_payment_attempt_canceled_async( def report_payment_attempt_failed( self, id: str, + /, params: Optional[ "PaymentRecordReportPaymentAttemptFailedParams" ] = None, @@ -338,6 +347,7 @@ def report_payment_attempt_failed( async def report_payment_attempt_failed_async( self, id: str, + /, params: Optional[ "PaymentRecordReportPaymentAttemptFailedParams" ] = None, @@ -363,6 +373,7 @@ async def report_payment_attempt_failed_async( def report_payment_attempt_guaranteed( self, id: str, + /, params: Optional[ "PaymentRecordReportPaymentAttemptGuaranteedParams" ] = None, @@ -388,6 +399,7 @@ def report_payment_attempt_guaranteed( async def report_payment_attempt_guaranteed_async( self, id: str, + /, params: Optional[ "PaymentRecordReportPaymentAttemptGuaranteedParams" ] = None, @@ -413,6 +425,7 @@ async def report_payment_attempt_guaranteed_async( def report_payment_attempt_informational( self, id: str, + /, params: Optional[ "PaymentRecordReportPaymentAttemptInformationalParams" ] = None, @@ -437,6 +450,7 @@ def report_payment_attempt_informational( async def report_payment_attempt_informational_async( self, id: str, + /, params: Optional[ "PaymentRecordReportPaymentAttemptInformationalParams" ] = None, @@ -461,6 +475,7 @@ async def report_payment_attempt_informational_async( def report_refund( self, id: str, + /, params: "PaymentRecordReportRefundParams", options: Optional["RequestOptions"] = None, ) -> "PaymentRecord": @@ -484,6 +499,7 @@ def report_refund( async def report_refund_async( self, id: str, + /, params: "PaymentRecordReportRefundParams", options: Optional["RequestOptions"] = None, ) -> "PaymentRecord": diff --git a/stripe/_payout.py b/stripe/_payout.py index 1d40fbb53..81f269c27 100644 --- a/stripe/_payout.py +++ b/stripe/_payout.py @@ -166,7 +166,7 @@ class TraceId(StripeObject): @classmethod def _cls_cancel( - cls, payout: str, **params: Unpack["PayoutCancelParams"] + cls, payout: str, /, **params: Unpack["PayoutCancelParams"] ) -> "Payout": """ You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. @@ -185,7 +185,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - payout: str, **params: Unpack["PayoutCancelParams"] + payout: str, /, **params: Unpack["PayoutCancelParams"] ) -> "Payout": """ You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. @@ -219,7 +219,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, payout: str, **params: Unpack["PayoutCancelParams"] + cls, payout: str, /, **params: Unpack["PayoutCancelParams"] ) -> "Payout": """ You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. @@ -238,7 +238,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - payout: str, **params: Unpack["PayoutCancelParams"] + payout: str, /, **params: Unpack["PayoutCancelParams"] ) -> "Payout": """ You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. @@ -408,7 +408,7 @@ async def retrieve_async( @classmethod def _cls_reverse( - cls, payout: str, **params: Unpack["PayoutReverseParams"] + cls, payout: str, /, **params: Unpack["PayoutReverseParams"] ) -> "Payout": """ Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. @@ -429,7 +429,7 @@ def _cls_reverse( @overload @staticmethod def reverse( - payout: str, **params: Unpack["PayoutReverseParams"] + payout: str, /, **params: Unpack["PayoutReverseParams"] ) -> "Payout": """ Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. @@ -469,7 +469,7 @@ def reverse( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_reverse_async( - cls, payout: str, **params: Unpack["PayoutReverseParams"] + cls, payout: str, /, **params: Unpack["PayoutReverseParams"] ) -> "Payout": """ Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. @@ -490,7 +490,7 @@ async def _cls_reverse_async( @overload @staticmethod async def reverse_async( - payout: str, **params: Unpack["PayoutReverseParams"] + payout: str, /, **params: Unpack["PayoutReverseParams"] ) -> "Payout": """ Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. diff --git a/stripe/_payout_service.py b/stripe/_payout_service.py index 14920cc3a..b19b07983 100644 --- a/stripe/_payout_service.py +++ b/stripe/_payout_service.py @@ -105,6 +105,7 @@ async def create_async( def retrieve( self, payout: str, + /, params: Optional["PayoutRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Payout": @@ -125,6 +126,7 @@ def retrieve( async def retrieve_async( self, payout: str, + /, params: Optional["PayoutRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Payout": @@ -145,6 +147,7 @@ async def retrieve_async( def update( self, payout: str, + /, params: Optional["PayoutUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Payout": @@ -165,6 +168,7 @@ def update( async def update_async( self, payout: str, + /, params: Optional["PayoutUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Payout": @@ -185,6 +189,7 @@ async def update_async( def cancel( self, payout: str, + /, params: Optional["PayoutCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Payout": @@ -207,6 +212,7 @@ def cancel( async def cancel_async( self, payout: str, + /, params: Optional["PayoutCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Payout": @@ -229,6 +235,7 @@ async def cancel_async( def reverse( self, payout: str, + /, params: Optional["PayoutReverseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Payout": @@ -253,6 +260,7 @@ def reverse( async def reverse_async( self, payout: str, + /, params: Optional["PayoutReverseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Payout": diff --git a/stripe/_plan_service.py b/stripe/_plan_service.py index 8bbdf7304..b2bcd53a8 100644 --- a/stripe/_plan_service.py +++ b/stripe/_plan_service.py @@ -20,6 +20,7 @@ class PlanService(StripeService): def delete( self, plan: str, + /, params: Optional["PlanDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Plan": @@ -40,6 +41,7 @@ def delete( async def delete_async( self, plan: str, + /, params: Optional["PlanDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Plan": @@ -60,6 +62,7 @@ async def delete_async( def retrieve( self, plan: str, + /, params: Optional["PlanRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Plan": @@ -80,6 +83,7 @@ def retrieve( async def retrieve_async( self, plan: str, + /, params: Optional["PlanRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Plan": @@ -100,6 +104,7 @@ async def retrieve_async( def update( self, plan: str, + /, params: Optional["PlanUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Plan": @@ -120,6 +125,7 @@ def update( async def update_async( self, plan: str, + /, params: Optional["PlanUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Plan": diff --git a/stripe/_price_service.py b/stripe/_price_service.py index 0b9b9cb3d..a861d666b 100644 --- a/stripe/_price_service.py +++ b/stripe/_price_service.py @@ -100,6 +100,7 @@ async def create_async( def retrieve( self, price: str, + /, params: Optional["PriceRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Price": @@ -120,6 +121,7 @@ def retrieve( async def retrieve_async( self, price: str, + /, params: Optional["PriceRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Price": @@ -140,6 +142,7 @@ async def retrieve_async( def update( self, price: str, + /, params: Optional["PriceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Price": @@ -160,6 +163,7 @@ def update( async def update_async( self, price: str, + /, params: Optional["PriceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Price": @@ -246,6 +250,7 @@ def serialize_batch_create( def serialize_batch_update( self, price: str, + /, params: Optional["PriceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_product.py b/stripe/_product.py index 719762e97..1161d6146 100644 --- a/stripe/_product.py +++ b/stripe/_product.py @@ -508,6 +508,7 @@ def delete_feature( cls, product: str, id: str, + /, **params: Unpack["ProductDeleteFeatureParams"], ) -> "ProductFeature": """ @@ -529,6 +530,7 @@ async def delete_feature_async( cls, product: str, id: str, + /, **params: Unpack["ProductDeleteFeatureParams"], ) -> "ProductFeature": """ @@ -550,6 +552,7 @@ def retrieve_feature( cls, product: str, id: str, + /, **params: Unpack["ProductRetrieveFeatureParams"], ) -> "ProductFeature": """ @@ -571,6 +574,7 @@ async def retrieve_feature_async( cls, product: str, id: str, + /, **params: Unpack["ProductRetrieveFeatureParams"], ) -> "ProductFeature": """ @@ -589,7 +593,7 @@ async def retrieve_feature_async( @classmethod def list_features( - cls, product: str, **params: Unpack["ProductListFeaturesParams"] + cls, product: str, /, **params: Unpack["ProductListFeaturesParams"] ) -> ListObject["ProductFeature"]: """ Retrieve a list of features for a product @@ -607,7 +611,7 @@ def list_features( @classmethod async def list_features_async( - cls, product: str, **params: Unpack["ProductListFeaturesParams"] + cls, product: str, /, **params: Unpack["ProductListFeaturesParams"] ) -> ListObject["ProductFeature"]: """ Retrieve a list of features for a product @@ -625,7 +629,7 @@ async def list_features_async( @classmethod def create_feature( - cls, product: str, **params: Unpack["ProductCreateFeatureParams"] + cls, product: str, /, **params: Unpack["ProductCreateFeatureParams"] ) -> "ProductFeature": """ Creates a product_feature, which represents a feature attachment to a product @@ -643,7 +647,7 @@ def create_feature( @classmethod async def create_feature_async( - cls, product: str, **params: Unpack["ProductCreateFeatureParams"] + cls, product: str, /, **params: Unpack["ProductCreateFeatureParams"] ) -> "ProductFeature": """ Creates a product_feature, which represents a feature attachment to a product diff --git a/stripe/_product_feature_service.py b/stripe/_product_feature_service.py index b5576ec3a..16fde9a3f 100644 --- a/stripe/_product_feature_service.py +++ b/stripe/_product_feature_service.py @@ -31,6 +31,7 @@ def delete( self, product: str, id: str, + /, params: Optional["ProductFeatureDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ProductFeature": @@ -55,6 +56,7 @@ async def delete_async( self, product: str, id: str, + /, params: Optional["ProductFeatureDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ProductFeature": @@ -79,6 +81,7 @@ def retrieve( self, product: str, id: str, + /, params: Optional["ProductFeatureRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ProductFeature": @@ -103,6 +106,7 @@ async def retrieve_async( self, product: str, id: str, + /, params: Optional["ProductFeatureRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ProductFeature": @@ -126,6 +130,7 @@ async def retrieve_async( def list( self, product: str, + /, params: Optional["ProductFeatureListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[ProductFeature]": @@ -148,6 +153,7 @@ def list( async def list_async( self, product: str, + /, params: Optional["ProductFeatureListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[ProductFeature]": @@ -170,6 +176,7 @@ async def list_async( def create( self, product: str, + /, params: "ProductFeatureCreateParams", options: Optional["RequestOptions"] = None, ) -> "ProductFeature": @@ -192,6 +199,7 @@ def create( async def create_async( self, product: str, + /, params: "ProductFeatureCreateParams", options: Optional["RequestOptions"] = None, ) -> "ProductFeature": @@ -215,6 +223,7 @@ def serialize_batch_delete( self, product: str, id: str, + /, params: Optional["ProductFeatureDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -239,6 +248,7 @@ def serialize_batch_delete( def serialize_batch_create( self, product: str, + /, params: Optional["ProductFeatureCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_product_service.py b/stripe/_product_service.py index 70dcd9b4c..502267928 100644 --- a/stripe/_product_service.py +++ b/stripe/_product_service.py @@ -52,6 +52,7 @@ def __getattr__(self, name): def delete( self, id: str, + /, params: Optional["ProductDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Product": @@ -72,6 +73,7 @@ def delete( async def delete_async( self, id: str, + /, params: Optional["ProductDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Product": @@ -92,6 +94,7 @@ async def delete_async( def retrieve( self, id: str, + /, params: Optional["ProductRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Product": @@ -112,6 +115,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ProductRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Product": @@ -132,6 +136,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["ProductUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Product": @@ -152,6 +157,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["ProductUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Product": @@ -292,6 +298,7 @@ async def search_async( def serialize_batch_delete( self, id: str, + /, params: Optional["ProductDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -316,6 +323,7 @@ def serialize_batch_delete( def serialize_batch_update( self, id: str, + /, params: Optional["ProductUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_promotion_code_service.py b/stripe/_promotion_code_service.py index cc7cb920d..8ffc29c3f 100644 --- a/stripe/_promotion_code_service.py +++ b/stripe/_promotion_code_service.py @@ -106,6 +106,7 @@ async def create_async( def retrieve( self, promotion_code: str, + /, params: Optional["PromotionCodeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PromotionCode": @@ -128,6 +129,7 @@ def retrieve( async def retrieve_async( self, promotion_code: str, + /, params: Optional["PromotionCodeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PromotionCode": @@ -150,6 +152,7 @@ async def retrieve_async( def update( self, promotion_code: str, + /, params: Optional["PromotionCodeUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PromotionCode": @@ -172,6 +175,7 @@ def update( async def update_async( self, promotion_code: str, + /, params: Optional["PromotionCodeUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PromotionCode": @@ -216,6 +220,7 @@ def serialize_batch_create( def serialize_batch_update( self, promotion_code: str, + /, params: Optional["PromotionCodeUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_quote.py b/stripe/_quote.py index 84164c87a..f1aa5f1f0 100644 --- a/stripe/_quote.py +++ b/stripe/_quote.py @@ -1404,7 +1404,7 @@ class TransferData(StripeObject): @classmethod def _cls_accept( - cls, quote: str, **params: Unpack["QuoteAcceptParams"] + cls, quote: str, /, **params: Unpack["QuoteAcceptParams"] ) -> "Quote": """ Accepts the specified quote. @@ -1420,7 +1420,9 @@ def _cls_accept( @overload @staticmethod - def accept(quote: str, **params: Unpack["QuoteAcceptParams"]) -> "Quote": + def accept( + quote: str, /, **params: Unpack["QuoteAcceptParams"] + ) -> "Quote": """ Accepts the specified quote. """ @@ -1453,7 +1455,7 @@ def accept( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_accept_async( - cls, quote: str, **params: Unpack["QuoteAcceptParams"] + cls, quote: str, /, **params: Unpack["QuoteAcceptParams"] ) -> "Quote": """ Accepts the specified quote. @@ -1470,7 +1472,7 @@ async def _cls_accept_async( @overload @staticmethod async def accept_async( - quote: str, **params: Unpack["QuoteAcceptParams"] + quote: str, /, **params: Unpack["QuoteAcceptParams"] ) -> "Quote": """ Accepts the specified quote. @@ -1506,7 +1508,7 @@ async def accept_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_cancel( - cls, quote: str, **params: Unpack["QuoteCancelParams"] + cls, quote: str, /, **params: Unpack["QuoteCancelParams"] ) -> "Quote": """ Cancels the quote. @@ -1522,7 +1524,9 @@ def _cls_cancel( @overload @staticmethod - def cancel(quote: str, **params: Unpack["QuoteCancelParams"]) -> "Quote": + def cancel( + quote: str, /, **params: Unpack["QuoteCancelParams"] + ) -> "Quote": """ Cancels the quote. """ @@ -1555,7 +1559,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, quote: str, **params: Unpack["QuoteCancelParams"] + cls, quote: str, /, **params: Unpack["QuoteCancelParams"] ) -> "Quote": """ Cancels the quote. @@ -1572,7 +1576,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - quote: str, **params: Unpack["QuoteCancelParams"] + quote: str, /, **params: Unpack["QuoteCancelParams"] ) -> "Quote": """ Cancels the quote. @@ -1638,7 +1642,7 @@ async def create_async( @classmethod def _cls_finalize_quote( - cls, quote: str, **params: Unpack["QuoteFinalizeQuoteParams"] + cls, quote: str, /, **params: Unpack["QuoteFinalizeQuoteParams"] ) -> "Quote": """ Finalizes the quote. @@ -1655,7 +1659,7 @@ def _cls_finalize_quote( @overload @staticmethod def finalize_quote( - quote: str, **params: Unpack["QuoteFinalizeQuoteParams"] + quote: str, /, **params: Unpack["QuoteFinalizeQuoteParams"] ) -> "Quote": """ Finalizes the quote. @@ -1691,7 +1695,7 @@ def finalize_quote( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_finalize_quote_async( - cls, quote: str, **params: Unpack["QuoteFinalizeQuoteParams"] + cls, quote: str, /, **params: Unpack["QuoteFinalizeQuoteParams"] ) -> "Quote": """ Finalizes the quote. @@ -1708,7 +1712,7 @@ async def _cls_finalize_quote_async( @overload @staticmethod async def finalize_quote_async( - quote: str, **params: Unpack["QuoteFinalizeQuoteParams"] + quote: str, /, **params: Unpack["QuoteFinalizeQuoteParams"] ) -> "Quote": """ Finalizes the quote. @@ -1784,6 +1788,7 @@ async def list_async( def _cls_list_computed_upfront_line_items( cls, quote: str, + /, **params: Unpack["QuoteListComputedUpfrontLineItemsParams"], ) -> ListObject["LineItem"]: """ @@ -1803,7 +1808,9 @@ def _cls_list_computed_upfront_line_items( @overload @staticmethod def list_computed_upfront_line_items( - quote: str, **params: Unpack["QuoteListComputedUpfrontLineItemsParams"] + quote: str, + /, + **params: Unpack["QuoteListComputedUpfrontLineItemsParams"], ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. @@ -1841,6 +1848,7 @@ def list_computed_upfront_line_items( # pyright: ignore[reportGeneralTypeIssues async def _cls_list_computed_upfront_line_items_async( cls, quote: str, + /, **params: Unpack["QuoteListComputedUpfrontLineItemsParams"], ) -> ListObject["LineItem"]: """ @@ -1860,7 +1868,9 @@ async def _cls_list_computed_upfront_line_items_async( @overload @staticmethod async def list_computed_upfront_line_items_async( - quote: str, **params: Unpack["QuoteListComputedUpfrontLineItemsParams"] + quote: str, + /, + **params: Unpack["QuoteListComputedUpfrontLineItemsParams"], ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. @@ -1896,7 +1906,7 @@ async def list_computed_upfront_line_items_async( # pyright: ignore[reportGener @classmethod def _cls_list_line_items( - cls, quote: str, **params: Unpack["QuoteListLineItemsParams"] + cls, quote: str, /, **params: Unpack["QuoteListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -1915,7 +1925,7 @@ def _cls_list_line_items( @overload @staticmethod def list_line_items( - quote: str, **params: Unpack["QuoteListLineItemsParams"] + quote: str, /, **params: Unpack["QuoteListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -1951,7 +1961,7 @@ def list_line_items( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_list_line_items_async( - cls, quote: str, **params: Unpack["QuoteListLineItemsParams"] + cls, quote: str, /, **params: Unpack["QuoteListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -1970,7 +1980,7 @@ async def _cls_list_line_items_async( @overload @staticmethod async def list_line_items_async( - quote: str, **params: Unpack["QuoteListLineItemsParams"] + quote: str, /, **params: Unpack["QuoteListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -2006,7 +2016,7 @@ async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_list_lines( - cls, quote: str, **params: Unpack["QuoteListLinesParams"] + cls, quote: str, /, **params: Unpack["QuoteListLinesParams"] ) -> ListObject["QuoteLine"]: """ Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. @@ -2023,7 +2033,7 @@ def _cls_list_lines( @overload @staticmethod def list_lines( - quote: str, **params: Unpack["QuoteListLinesParams"] + quote: str, /, **params: Unpack["QuoteListLinesParams"] ) -> ListObject["QuoteLine"]: """ Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. @@ -2059,7 +2069,7 @@ def list_lines( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_list_lines_async( - cls, quote: str, **params: Unpack["QuoteListLinesParams"] + cls, quote: str, /, **params: Unpack["QuoteListLinesParams"] ) -> ListObject["QuoteLine"]: """ Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. @@ -2076,7 +2086,7 @@ async def _cls_list_lines_async( @overload @staticmethod async def list_lines_async( - quote: str, **params: Unpack["QuoteListLinesParams"] + quote: str, /, **params: Unpack["QuoteListLinesParams"] ) -> ListObject["QuoteLine"]: """ Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. @@ -2115,6 +2125,7 @@ def _cls_list_preview_invoice_lines( cls, quote: str, preview_invoice: str, + /, **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ @@ -2137,6 +2148,7 @@ def _cls_list_preview_invoice_lines( def list_preview_invoice_lines( quote: str, preview_invoice: str, + /, **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ @@ -2148,6 +2160,7 @@ def list_preview_invoice_lines( def list_preview_invoice_lines( self, preview_invoice: str, + /, **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ @@ -2159,6 +2172,7 @@ def list_preview_invoice_lines( def list_preview_invoice_lines( # pyright: ignore[reportGeneralTypeIssues] self, preview_invoice: str, + /, **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ @@ -2181,6 +2195,7 @@ async def _cls_list_preview_invoice_lines_async( cls, quote: str, preview_invoice: str, + /, **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ @@ -2203,6 +2218,7 @@ async def _cls_list_preview_invoice_lines_async( async def list_preview_invoice_lines_async( quote: str, preview_invoice: str, + /, **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ @@ -2214,6 +2230,7 @@ async def list_preview_invoice_lines_async( async def list_preview_invoice_lines_async( self, preview_invoice: str, + /, **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ @@ -2225,6 +2242,7 @@ async def list_preview_invoice_lines_async( async def list_preview_invoice_lines_async( # pyright: ignore[reportGeneralTypeIssues] self, preview_invoice: str, + /, **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ @@ -2244,7 +2262,7 @@ async def list_preview_invoice_lines_async( # pyright: ignore[reportGeneralType @classmethod def _cls_mark_draft( - cls, quote: str, **params: Unpack["QuoteMarkDraftParams"] + cls, quote: str, /, **params: Unpack["QuoteMarkDraftParams"] ) -> "Quote": """ Converts a stale quote to draft. @@ -2263,7 +2281,7 @@ def _cls_mark_draft( @overload @staticmethod def mark_draft( - quote: str, **params: Unpack["QuoteMarkDraftParams"] + quote: str, /, **params: Unpack["QuoteMarkDraftParams"] ) -> "Quote": """ Converts a stale quote to draft. @@ -2297,7 +2315,7 @@ def mark_draft( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_mark_draft_async( - cls, quote: str, **params: Unpack["QuoteMarkDraftParams"] + cls, quote: str, /, **params: Unpack["QuoteMarkDraftParams"] ) -> "Quote": """ Converts a stale quote to draft. @@ -2316,7 +2334,7 @@ async def _cls_mark_draft_async( @overload @staticmethod async def mark_draft_async( - quote: str, **params: Unpack["QuoteMarkDraftParams"] + quote: str, /, **params: Unpack["QuoteMarkDraftParams"] ) -> "Quote": """ Converts a stale quote to draft. @@ -2352,7 +2370,7 @@ async def mark_draft_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_mark_stale( - cls, quote: str, **params: Unpack["QuoteMarkStaleParams"] + cls, quote: str, /, **params: Unpack["QuoteMarkStaleParams"] ) -> "Quote": """ Converts a draft or open quote to stale. @@ -2371,7 +2389,7 @@ def _cls_mark_stale( @overload @staticmethod def mark_stale( - quote: str, **params: Unpack["QuoteMarkStaleParams"] + quote: str, /, **params: Unpack["QuoteMarkStaleParams"] ) -> "Quote": """ Converts a draft or open quote to stale. @@ -2405,7 +2423,7 @@ def mark_stale( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_mark_stale_async( - cls, quote: str, **params: Unpack["QuoteMarkStaleParams"] + cls, quote: str, /, **params: Unpack["QuoteMarkStaleParams"] ) -> "Quote": """ Converts a draft or open quote to stale. @@ -2424,7 +2442,7 @@ async def _cls_mark_stale_async( @overload @staticmethod async def mark_stale_async( - quote: str, **params: Unpack["QuoteMarkStaleParams"] + quote: str, /, **params: Unpack["QuoteMarkStaleParams"] ) -> "Quote": """ Converts a draft or open quote to stale. @@ -2491,7 +2509,9 @@ async def modify_async( ) @classmethod - def _cls_pdf(cls, quote: str, **params: Unpack["QuotePdfParams"]) -> Any: + def _cls_pdf( + cls, quote: str, /, **params: Unpack["QuotePdfParams"] + ) -> Any: """ Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ @@ -2507,7 +2527,7 @@ def _cls_pdf(cls, quote: str, **params: Unpack["QuotePdfParams"]) -> Any: @overload @staticmethod - def pdf(quote: str, **params: Unpack["QuotePdfParams"]) -> Any: + def pdf(quote: str, /, **params: Unpack["QuotePdfParams"]) -> Any: """ Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ @@ -2541,7 +2561,7 @@ def pdf( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_pdf_async( - cls, quote: str, **params: Unpack["QuotePdfParams"] + cls, quote: str, /, **params: Unpack["QuotePdfParams"] ) -> Any: """ Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) @@ -2558,7 +2578,9 @@ async def _cls_pdf_async( @overload @staticmethod - async def pdf_async(quote: str, **params: Unpack["QuotePdfParams"]) -> Any: + async def pdf_async( + quote: str, /, **params: Unpack["QuotePdfParams"] + ) -> Any: """ Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ @@ -2592,7 +2614,7 @@ async def pdf_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_reestimate( - cls, quote: str, **params: Unpack["QuoteReestimateParams"] + cls, quote: str, /, **params: Unpack["QuoteReestimateParams"] ) -> "Quote": """ Recompute the upcoming invoice estimate for the quote. @@ -2611,7 +2633,7 @@ def _cls_reestimate( @overload @staticmethod def reestimate( - quote: str, **params: Unpack["QuoteReestimateParams"] + quote: str, /, **params: Unpack["QuoteReestimateParams"] ) -> "Quote": """ Recompute the upcoming invoice estimate for the quote. @@ -2645,7 +2667,7 @@ def reestimate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_reestimate_async( - cls, quote: str, **params: Unpack["QuoteReestimateParams"] + cls, quote: str, /, **params: Unpack["QuoteReestimateParams"] ) -> "Quote": """ Recompute the upcoming invoice estimate for the quote. @@ -2664,7 +2686,7 @@ async def _cls_reestimate_async( @overload @staticmethod async def reestimate_async( - quote: str, **params: Unpack["QuoteReestimateParams"] + quote: str, /, **params: Unpack["QuoteReestimateParams"] ) -> "Quote": """ Recompute the upcoming invoice estimate for the quote. @@ -2722,7 +2744,7 @@ async def retrieve_async( @classmethod def list_preview_invoices( - cls, quote: str, **params: Unpack["QuoteListPreviewInvoicesParams"] + cls, quote: str, /, **params: Unpack["QuoteListPreviewInvoicesParams"] ) -> ListObject["QuotePreviewInvoice"]: """ Preview the invoices that would be generated by accepting the quote. @@ -2740,7 +2762,7 @@ def list_preview_invoices( @classmethod async def list_preview_invoices_async( - cls, quote: str, **params: Unpack["QuoteListPreviewInvoicesParams"] + cls, quote: str, /, **params: Unpack["QuoteListPreviewInvoicesParams"] ) -> ListObject["QuotePreviewInvoice"]: """ Preview the invoices that would be generated by accepting the quote. @@ -2760,6 +2782,7 @@ async def list_preview_invoices_async( def list_preview_subscription_schedules( cls, quote: str, + /, **params: Unpack["QuoteListPreviewSubscriptionSchedulesParams"], ) -> ListObject["QuotePreviewSubscriptionSchedule"]: """ @@ -2780,6 +2803,7 @@ def list_preview_subscription_schedules( async def list_preview_subscription_schedules_async( cls, quote: str, + /, **params: Unpack["QuoteListPreviewSubscriptionSchedulesParams"], ) -> ListObject["QuotePreviewSubscriptionSchedule"]: """ diff --git a/stripe/_quote_computed_upfront_line_items_service.py b/stripe/_quote_computed_upfront_line_items_service.py index a9f5cf4d2..680bfb164 100644 --- a/stripe/_quote_computed_upfront_line_items_service.py +++ b/stripe/_quote_computed_upfront_line_items_service.py @@ -18,6 +18,7 @@ class QuoteComputedUpfrontLineItemsService(StripeService): def list( self, quote: str, + /, params: Optional["QuoteComputedUpfrontLineItemsListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[LineItem]": @@ -40,6 +41,7 @@ def list( async def list_async( self, quote: str, + /, params: Optional["QuoteComputedUpfrontLineItemsListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[LineItem]": diff --git a/stripe/_quote_line_item_service.py b/stripe/_quote_line_item_service.py index ca5571800..b4ba6f24a 100644 --- a/stripe/_quote_line_item_service.py +++ b/stripe/_quote_line_item_service.py @@ -18,6 +18,7 @@ class QuoteLineItemService(StripeService): def list( self, quote: str, + /, params: Optional["QuoteLineItemListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[LineItem]": @@ -40,6 +41,7 @@ def list( async def list_async( self, quote: str, + /, params: Optional["QuoteLineItemListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[LineItem]": diff --git a/stripe/_quote_line_service.py b/stripe/_quote_line_service.py index d0ee8e0f5..d9d5dd724 100644 --- a/stripe/_quote_line_service.py +++ b/stripe/_quote_line_service.py @@ -16,6 +16,7 @@ class QuoteLineService(StripeService): def list( self, quote: str, + /, params: Optional["QuoteLineListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[QuoteLine]": @@ -36,6 +37,7 @@ def list( async def list_async( self, quote: str, + /, params: Optional["QuoteLineListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[QuoteLine]": diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py index d28743e75..5e9ba55a2 100644 --- a/stripe/_quote_preview_invoice.py +++ b/stripe/_quote_preview_invoice.py @@ -867,6 +867,15 @@ class MandateOptions(StripeObject): """ _inner_class_types = {"mandate_options": MandateOptions} + class BacsDebit(StripeObject): + target_date: Optional[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: Optional[ + Union[Literal["automatic", "payer_name_verification"], str] + ] + class Bancontact(StripeObject): preferred_language: Union[Literal["de", "en", "fr", "nl"], str] """ @@ -1155,6 +1164,10 @@ class WechatPay(StripeObject): """ If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. """ + bacs_debit: Optional[BacsDebit] + """ + If paying by `bacs_debit`, this sub-hash contains details about the Bacs Direct Debit payment method options to pass to the invoice's PaymentIntent. + """ bancontact: Optional[Bancontact] """ If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. @@ -1217,6 +1230,7 @@ class WechatPay(StripeObject): """ _inner_class_types = { "acss_debit": AcssDebit, + "bacs_debit": BacsDebit, "bancontact": Bancontact, "billie": Billie, "bizum": Bizum, @@ -1854,7 +1868,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] """ diff --git a/stripe/_quote_preview_invoice_service.py b/stripe/_quote_preview_invoice_service.py index ab4109d88..a53d9841f 100644 --- a/stripe/_quote_preview_invoice_service.py +++ b/stripe/_quote_preview_invoice_service.py @@ -18,6 +18,7 @@ class QuotePreviewInvoiceService(StripeService): def list( self, quote: str, + /, params: Optional["QuotePreviewInvoiceListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[QuotePreviewInvoice]": @@ -40,6 +41,7 @@ def list( async def list_async( self, quote: str, + /, params: Optional["QuotePreviewInvoiceListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[QuotePreviewInvoice]": diff --git a/stripe/_quote_preview_subscription_schedule_service.py b/stripe/_quote_preview_subscription_schedule_service.py index 636a0a49b..479170869 100644 --- a/stripe/_quote_preview_subscription_schedule_service.py +++ b/stripe/_quote_preview_subscription_schedule_service.py @@ -20,6 +20,7 @@ class QuotePreviewSubscriptionScheduleService(StripeService): def list( self, quote: str, + /, params: Optional["QuotePreviewSubscriptionScheduleListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[QuotePreviewSubscriptionSchedule]": @@ -42,6 +43,7 @@ def list( async def list_async( self, quote: str, + /, params: Optional["QuotePreviewSubscriptionScheduleListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[QuotePreviewSubscriptionSchedule]": diff --git a/stripe/_quote_service.py b/stripe/_quote_service.py index 248977ea0..02bd83dcc 100644 --- a/stripe/_quote_service.py +++ b/stripe/_quote_service.py @@ -163,6 +163,7 @@ async def create_async( def retrieve( self, quote: str, + /, params: Optional["QuoteRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -183,6 +184,7 @@ def retrieve( async def retrieve_async( self, quote: str, + /, params: Optional["QuoteRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -203,6 +205,7 @@ async def retrieve_async( def update( self, quote: str, + /, params: Optional["QuoteUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -223,6 +226,7 @@ def update( async def update_async( self, quote: str, + /, params: Optional["QuoteUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -243,6 +247,7 @@ async def update_async( def accept( self, quote: str, + /, params: Optional["QuoteAcceptParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -263,6 +268,7 @@ def accept( async def accept_async( self, quote: str, + /, params: Optional["QuoteAcceptParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -283,6 +289,7 @@ async def accept_async( def cancel( self, quote: str, + /, params: Optional["QuoteCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -303,6 +310,7 @@ def cancel( async def cancel_async( self, quote: str, + /, params: Optional["QuoteCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -323,6 +331,7 @@ async def cancel_async( def finalize_quote( self, quote: str, + /, params: Optional["QuoteFinalizeQuoteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -343,6 +352,7 @@ def finalize_quote( async def finalize_quote_async( self, quote: str, + /, params: Optional["QuoteFinalizeQuoteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -363,6 +373,7 @@ async def finalize_quote_async( def mark_draft( self, quote: str, + /, params: Optional["QuoteMarkDraftParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -385,6 +396,7 @@ def mark_draft( async def mark_draft_async( self, quote: str, + /, params: Optional["QuoteMarkDraftParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -407,6 +419,7 @@ async def mark_draft_async( def mark_stale( self, quote: str, + /, params: Optional["QuoteMarkStaleParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -429,6 +442,7 @@ def mark_stale( async def mark_stale_async( self, quote: str, + /, params: Optional["QuoteMarkStaleParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -451,6 +465,7 @@ async def mark_stale_async( def reestimate( self, quote: str, + /, params: Optional["QuoteReestimateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -473,6 +488,7 @@ def reestimate( async def reestimate_async( self, quote: str, + /, params: Optional["QuoteReestimateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Quote": @@ -495,6 +511,7 @@ async def reestimate_async( def pdf( self, quote: str, + /, params: Optional["QuotePdfParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Any": @@ -515,6 +532,7 @@ def pdf( async def pdf_async( self, quote: str, + /, params: Optional["QuotePdfParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Any": @@ -536,6 +554,7 @@ def list_preview_invoice_lines( self, quote: str, preview_invoice: str, + /, params: Optional["QuoteListPreviewInvoiceLinesParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[InvoiceLineItem]": @@ -560,6 +579,7 @@ async def list_preview_invoice_lines_async( self, quote: str, preview_invoice: str, + /, params: Optional["QuoteListPreviewInvoiceLinesParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[InvoiceLineItem]": diff --git a/stripe/_refund.py b/stripe/_refund.py index db2a57802..602ade3fc 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -500,7 +500,7 @@ class PresentmentDetails(StripeObject): @classmethod def _cls_cancel( - cls, refund: str, **params: Unpack["RefundCancelParams"] + cls, refund: str, /, **params: Unpack["RefundCancelParams"] ) -> "Refund": """ Cancels a refund with a status of requires_action. @@ -521,7 +521,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - refund: str, **params: Unpack["RefundCancelParams"] + refund: str, /, **params: Unpack["RefundCancelParams"] ) -> "Refund": """ Cancels a refund with a status of requires_action. @@ -561,7 +561,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, refund: str, **params: Unpack["RefundCancelParams"] + cls, refund: str, /, **params: Unpack["RefundCancelParams"] ) -> "Refund": """ Cancels a refund with a status of requires_action. @@ -582,7 +582,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - refund: str, **params: Unpack["RefundCancelParams"] + refund: str, /, **params: Unpack["RefundCancelParams"] ) -> "Refund": """ Cancels a refund with a status of requires_action. @@ -777,7 +777,7 @@ class TestHelpers(APIResourceTestHelpers["Refund"]): @classmethod def _cls_expire( - cls, refund: str, **params: Unpack["RefundExpireParams"] + cls, refund: str, /, **params: Unpack["RefundExpireParams"] ) -> "Refund": """ Expire a refund with a status of requires_action. @@ -796,7 +796,7 @@ def _cls_expire( @overload @staticmethod def expire( - refund: str, **params: Unpack["RefundExpireParams"] + refund: str, /, **params: Unpack["RefundExpireParams"] ) -> "Refund": """ Expire a refund with a status of requires_action. @@ -830,7 +830,7 @@ def expire( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_expire_async( - cls, refund: str, **params: Unpack["RefundExpireParams"] + cls, refund: str, /, **params: Unpack["RefundExpireParams"] ) -> "Refund": """ Expire a refund with a status of requires_action. @@ -849,7 +849,7 @@ async def _cls_expire_async( @overload @staticmethod async def expire_async( - refund: str, **params: Unpack["RefundExpireParams"] + refund: str, /, **params: Unpack["RefundExpireParams"] ) -> "Refund": """ Expire a refund with a status of requires_action. diff --git a/stripe/_refund_service.py b/stripe/_refund_service.py index caad6b128..deabcd2e2 100644 --- a/stripe/_refund_service.py +++ b/stripe/_refund_service.py @@ -119,6 +119,7 @@ async def create_async( def retrieve( self, refund: str, + /, params: Optional["RefundRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Refund": @@ -139,6 +140,7 @@ def retrieve( async def retrieve_async( self, refund: str, + /, params: Optional["RefundRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Refund": @@ -159,6 +161,7 @@ async def retrieve_async( def update( self, refund: str, + /, params: Optional["RefundUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Refund": @@ -181,6 +184,7 @@ def update( async def update_async( self, refund: str, + /, params: Optional["RefundUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Refund": @@ -203,6 +207,7 @@ async def update_async( def cancel( self, refund: str, + /, params: Optional["RefundCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Refund": @@ -227,6 +232,7 @@ def cancel( async def cancel_async( self, refund: str, + /, params: Optional["RefundCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Refund": @@ -273,6 +279,7 @@ def serialize_batch_create( def serialize_batch_cancel( self, refund: str, + /, params: Optional["RefundCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_review.py b/stripe/_review.py index 4f6de010e..482ed6732 100644 --- a/stripe/_review.py +++ b/stripe/_review.py @@ -136,7 +136,7 @@ class Session(StripeObject): @classmethod def _cls_approve( - cls, review: str, **params: Unpack["ReviewApproveParams"] + cls, review: str, /, **params: Unpack["ReviewApproveParams"] ) -> "Review": """ Approves a Review object, closing it and removing it from the list of reviews. @@ -155,7 +155,7 @@ def _cls_approve( @overload @staticmethod def approve( - review: str, **params: Unpack["ReviewApproveParams"] + review: str, /, **params: Unpack["ReviewApproveParams"] ) -> "Review": """ Approves a Review object, closing it and removing it from the list of reviews. @@ -189,7 +189,7 @@ def approve( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_approve_async( - cls, review: str, **params: Unpack["ReviewApproveParams"] + cls, review: str, /, **params: Unpack["ReviewApproveParams"] ) -> "Review": """ Approves a Review object, closing it and removing it from the list of reviews. @@ -208,7 +208,7 @@ async def _cls_approve_async( @overload @staticmethod async def approve_async( - review: str, **params: Unpack["ReviewApproveParams"] + review: str, /, **params: Unpack["ReviewApproveParams"] ) -> "Review": """ Approves a Review object, closing it and removing it from the list of reviews. diff --git a/stripe/_review_service.py b/stripe/_review_service.py index 030985dda..e2cb95135 100644 --- a/stripe/_review_service.py +++ b/stripe/_review_service.py @@ -56,6 +56,7 @@ async def list_async( def retrieve( self, review: str, + /, params: Optional["ReviewRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Review": @@ -76,6 +77,7 @@ def retrieve( async def retrieve_async( self, review: str, + /, params: Optional["ReviewRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Review": @@ -96,6 +98,7 @@ async def retrieve_async( def approve( self, review: str, + /, params: Optional["ReviewApproveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Review": @@ -118,6 +121,7 @@ def approve( async def approve_async( self, review: str, + /, params: Optional["ReviewApproveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Review": diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index f6b5a8e11..e036cebc0 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -616,7 +616,7 @@ class MandateOptions(StripeObject): mandate_options: Optional[MandateOptions] verification_method: Optional[ - Literal["automatic", "payer_name_verification"] + Union[Literal["automatic", "payer_name_verification"], str] ] _inner_class_types = {"mandate_options": MandateOptions} @@ -1365,7 +1365,7 @@ class FrMealVoucher(StripeObject): @classmethod def _cls_cancel( - cls, intent: str, **params: Unpack["SetupIntentCancelParams"] + cls, intent: str, /, **params: Unpack["SetupIntentCancelParams"] ) -> "SetupIntent": """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. @@ -1386,7 +1386,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - intent: str, **params: Unpack["SetupIntentCancelParams"] + intent: str, /, **params: Unpack["SetupIntentCancelParams"] ) -> "SetupIntent": """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. @@ -1428,7 +1428,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, intent: str, **params: Unpack["SetupIntentCancelParams"] + cls, intent: str, /, **params: Unpack["SetupIntentCancelParams"] ) -> "SetupIntent": """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. @@ -1449,7 +1449,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - intent: str, **params: Unpack["SetupIntentCancelParams"] + intent: str, /, **params: Unpack["SetupIntentCancelParams"] ) -> "SetupIntent": """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. @@ -1491,7 +1491,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_confirm( - cls, intent: str, **params: Unpack["SetupIntentConfirmParams"] + cls, intent: str, /, **params: Unpack["SetupIntentConfirmParams"] ) -> "SetupIntent": """ Confirm that your customer intends to set up the current or @@ -1523,7 +1523,7 @@ def _cls_confirm( @overload @staticmethod def confirm( - intent: str, **params: Unpack["SetupIntentConfirmParams"] + intent: str, /, **params: Unpack["SetupIntentConfirmParams"] ) -> "SetupIntent": """ Confirm that your customer intends to set up the current or @@ -1598,7 +1598,7 @@ def confirm( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_confirm_async( - cls, intent: str, **params: Unpack["SetupIntentConfirmParams"] + cls, intent: str, /, **params: Unpack["SetupIntentConfirmParams"] ) -> "SetupIntent": """ Confirm that your customer intends to set up the current or @@ -1630,7 +1630,7 @@ async def _cls_confirm_async( @overload @staticmethod async def confirm_async( - intent: str, **params: Unpack["SetupIntentConfirmParams"] + intent: str, /, **params: Unpack["SetupIntentConfirmParams"] ) -> "SetupIntent": """ Confirm that your customer intends to set up the current or @@ -1849,6 +1849,7 @@ async def retrieve_async( def _cls_verify_microdeposits( cls, intent: str, + /, **params: Unpack["SetupIntentVerifyMicrodepositsParams"], ) -> "SetupIntent": """ @@ -1868,7 +1869,9 @@ def _cls_verify_microdeposits( @overload @staticmethod def verify_microdeposits( - intent: str, **params: Unpack["SetupIntentVerifyMicrodepositsParams"] + intent: str, + /, + **params: Unpack["SetupIntentVerifyMicrodepositsParams"], ) -> "SetupIntent": """ Verifies microdeposits on a SetupIntent object. @@ -1906,6 +1909,7 @@ def verify_microdeposits( # pyright: ignore[reportGeneralTypeIssues] async def _cls_verify_microdeposits_async( cls, intent: str, + /, **params: Unpack["SetupIntentVerifyMicrodepositsParams"], ) -> "SetupIntent": """ @@ -1925,7 +1929,9 @@ async def _cls_verify_microdeposits_async( @overload @staticmethod async def verify_microdeposits_async( - intent: str, **params: Unpack["SetupIntentVerifyMicrodepositsParams"] + intent: str, + /, + **params: Unpack["SetupIntentVerifyMicrodepositsParams"], ) -> "SetupIntent": """ Verifies microdeposits on a SetupIntent object. diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index 62d196d0c..f0adbeb4b 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -116,6 +116,7 @@ async def create_async( def retrieve( self, intent: str, + /, params: Optional["SetupIntentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SetupIntent": @@ -142,6 +143,7 @@ def retrieve( async def retrieve_async( self, intent: str, + /, params: Optional["SetupIntentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SetupIntent": @@ -168,6 +170,7 @@ async def retrieve_async( def update( self, intent: str, + /, params: Optional["SetupIntentUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SetupIntent": @@ -190,6 +193,7 @@ def update( async def update_async( self, intent: str, + /, params: Optional["SetupIntentUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SetupIntent": @@ -212,6 +216,7 @@ async def update_async( def cancel( self, intent: str, + /, params: Optional["SetupIntentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SetupIntent": @@ -236,6 +241,7 @@ def cancel( async def cancel_async( self, intent: str, + /, params: Optional["SetupIntentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SetupIntent": @@ -260,6 +266,7 @@ async def cancel_async( def confirm( self, intent: str, + /, params: Optional["SetupIntentConfirmParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SetupIntent": @@ -295,6 +302,7 @@ def confirm( async def confirm_async( self, intent: str, + /, params: Optional["SetupIntentConfirmParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SetupIntent": @@ -330,6 +338,7 @@ async def confirm_async( def verify_microdeposits( self, intent: str, + /, params: Optional["SetupIntentVerifyMicrodepositsParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SetupIntent": @@ -352,6 +361,7 @@ def verify_microdeposits( async def verify_microdeposits_async( self, intent: str, + /, params: Optional["SetupIntentVerifyMicrodepositsParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SetupIntent": diff --git a/stripe/_shipping_rate_service.py b/stripe/_shipping_rate_service.py index c11542923..739980bc6 100644 --- a/stripe/_shipping_rate_service.py +++ b/stripe/_shipping_rate_service.py @@ -101,6 +101,7 @@ async def create_async( def retrieve( self, shipping_rate_token: str, + /, params: Optional["ShippingRateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ShippingRate": @@ -123,6 +124,7 @@ def retrieve( async def retrieve_async( self, shipping_rate_token: str, + /, params: Optional["ShippingRateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ShippingRate": @@ -145,6 +147,7 @@ async def retrieve_async( def update( self, shipping_rate_token: str, + /, params: Optional["ShippingRateUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ShippingRate": @@ -167,6 +170,7 @@ def update( async def update_async( self, shipping_rate_token: str, + /, params: Optional["ShippingRateUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ShippingRate": diff --git a/stripe/_source.py b/stripe/_source.py index 3a40acfb2..68f4353c0 100644 --- a/stripe/_source.py +++ b/stripe/_source.py @@ -658,6 +658,7 @@ async def create_async( def _cls_list_source_transactions( cls, source: str, + /, **params: Unpack["SourceListSourceTransactionsParams"], ) -> ListObject["SourceTransaction"]: """ @@ -677,7 +678,7 @@ def _cls_list_source_transactions( @overload @staticmethod def list_source_transactions( - source: str, **params: Unpack["SourceListSourceTransactionsParams"] + source: str, /, **params: Unpack["SourceListSourceTransactionsParams"] ) -> ListObject["SourceTransaction"]: """ List source transactions for a given source. @@ -715,6 +716,7 @@ def list_source_transactions( # pyright: ignore[reportGeneralTypeIssues] async def _cls_list_source_transactions_async( cls, source: str, + /, **params: Unpack["SourceListSourceTransactionsParams"], ) -> ListObject["SourceTransaction"]: """ @@ -734,7 +736,7 @@ async def _cls_list_source_transactions_async( @overload @staticmethod async def list_source_transactions_async( - source: str, **params: Unpack["SourceListSourceTransactionsParams"] + source: str, /, **params: Unpack["SourceListSourceTransactionsParams"] ) -> ListObject["SourceTransaction"]: """ List source transactions for a given source. @@ -830,7 +832,7 @@ async def retrieve_async( @classmethod def _cls_verify( - cls, source: str, **params: Unpack["SourceVerifyParams"] + cls, source: str, /, **params: Unpack["SourceVerifyParams"] ) -> "Source": """ Verify a given source. @@ -849,7 +851,7 @@ def _cls_verify( @overload @staticmethod def verify( - source: str, **params: Unpack["SourceVerifyParams"] + source: str, /, **params: Unpack["SourceVerifyParams"] ) -> "Source": """ Verify a given source. @@ -883,7 +885,7 @@ def verify( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_verify_async( - cls, source: str, **params: Unpack["SourceVerifyParams"] + cls, source: str, /, **params: Unpack["SourceVerifyParams"] ) -> "Source": """ Verify a given source. @@ -902,7 +904,7 @@ async def _cls_verify_async( @overload @staticmethod async def verify_async( - source: str, **params: Unpack["SourceVerifyParams"] + source: str, /, **params: Unpack["SourceVerifyParams"] ) -> "Source": """ Verify a given source. diff --git a/stripe/_source_service.py b/stripe/_source_service.py index 849f2e742..7f7de39e9 100644 --- a/stripe/_source_service.py +++ b/stripe/_source_service.py @@ -54,6 +54,7 @@ def detach( self, customer: str, id: str, + /, params: Optional["SourceDetachParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[Account, BankAccount, Card, Source]": @@ -78,6 +79,7 @@ async def detach_async( self, customer: str, id: str, + /, params: Optional["SourceDetachParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Union[Account, BankAccount, Card, Source]": @@ -101,6 +103,7 @@ async def detach_async( def retrieve( self, source: str, + /, params: Optional["SourceRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Source": @@ -121,6 +124,7 @@ def retrieve( async def retrieve_async( self, source: str, + /, params: Optional["SourceRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Source": @@ -141,6 +145,7 @@ async def retrieve_async( def update( self, source: str, + /, params: Optional["SourceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Source": @@ -163,6 +168,7 @@ def update( async def update_async( self, source: str, + /, params: Optional["SourceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Source": @@ -223,6 +229,7 @@ async def create_async( def verify( self, source: str, + /, params: "SourceVerifyParams", options: Optional["RequestOptions"] = None, ) -> "Source": @@ -245,6 +252,7 @@ def verify( async def verify_async( self, source: str, + /, params: "SourceVerifyParams", options: Optional["RequestOptions"] = None, ) -> "Source": diff --git a/stripe/_source_transaction_service.py b/stripe/_source_transaction_service.py index b40e91503..c86b48bb3 100644 --- a/stripe/_source_transaction_service.py +++ b/stripe/_source_transaction_service.py @@ -18,6 +18,7 @@ class SourceTransactionService(StripeService): def list( self, source: str, + /, params: Optional["SourceTransactionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[SourceTransaction]": @@ -40,6 +41,7 @@ def list( async def list_async( self, source: str, + /, params: Optional["SourceTransactionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[SourceTransaction]": diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 78833d851..4a507e22a 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -369,6 +369,15 @@ class MandateOptions(StripeObject): """ _inner_class_types = {"mandate_options": MandateOptions} + class BacsDebit(StripeObject): + debit_behavior: str + """ + Controls when the funds will be captured from the customer's account. + """ + verification_method: Optional[ + Union[Literal["automatic", "payer_name_verification"], str] + ] + class Bancontact(StripeObject): preferred_language: Union[Literal["de", "en", "fr", "nl"], str] """ @@ -460,7 +469,7 @@ class MandateOptions(StripeObject): class Blik(StripeObject): class MandateOptions(StripeObject): - expires_after: Optional[int] + 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. """ @@ -731,6 +740,10 @@ class WechatPay(StripeObject): """ This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. """ + bacs_debit: Optional[BacsDebit] + """ + This sub-hash contains details about the Bacs Direct Debit payment method options to pass to invoices created by the subscription. + """ bancontact: Optional[Bancontact] """ This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. @@ -793,6 +806,7 @@ class WechatPay(StripeObject): """ _inner_class_types = { "acss_debit": AcssDebit, + "bacs_debit": BacsDebit, "bancontact": Bancontact, "billie": Billie, "bizum": Bizum, @@ -1263,6 +1277,7 @@ class EndBehavior(StripeObject): def _cls_attach_cadence( cls, subscription: str, + /, **params: Unpack["SubscriptionAttachCadenceParams"], ) -> "Subscription": """ @@ -1282,7 +1297,9 @@ def _cls_attach_cadence( @overload @staticmethod def attach_cadence( - subscription: str, **params: Unpack["SubscriptionAttachCadenceParams"] + subscription: str, + /, + **params: Unpack["SubscriptionAttachCadenceParams"], ) -> "Subscription": """ Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the Billing Cadence. @@ -1320,6 +1337,7 @@ def attach_cadence( # pyright: ignore[reportGeneralTypeIssues] async def _cls_attach_cadence_async( cls, subscription: str, + /, **params: Unpack["SubscriptionAttachCadenceParams"], ) -> "Subscription": """ @@ -1339,7 +1357,9 @@ async def _cls_attach_cadence_async( @overload @staticmethod async def attach_cadence_async( - subscription: str, **params: Unpack["SubscriptionAttachCadenceParams"] + subscription: str, + /, + **params: Unpack["SubscriptionAttachCadenceParams"], ) -> "Subscription": """ Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the Billing Cadence. @@ -1377,6 +1397,7 @@ async def attach_cadence_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_cancel( cls, subscription_exposed_id: str, + /, **params: Unpack["SubscriptionCancelParams"], ) -> "Subscription": """ @@ -1403,6 +1424,7 @@ def _cls_cancel( @staticmethod def cancel( subscription_exposed_id: str, + /, **params: Unpack["SubscriptionCancelParams"], ) -> "Subscription": """ @@ -1453,6 +1475,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] async def _cls_cancel_async( cls, subscription_exposed_id: str, + /, **params: Unpack["SubscriptionCancelParams"], ) -> "Subscription": """ @@ -1479,6 +1502,7 @@ async def _cls_cancel_async( @staticmethod async def cancel_async( subscription_exposed_id: str, + /, **params: Unpack["SubscriptionCancelParams"], ) -> "Subscription": """ @@ -1573,6 +1597,7 @@ async def create_async( def _cls_delete_discount( cls, subscription_exposed_id: str, + /, **params: Unpack["SubscriptionDeleteDiscountParams"], ) -> "Discount": """ @@ -1595,6 +1620,7 @@ def _cls_delete_discount( @staticmethod def delete_discount( subscription_exposed_id: str, + /, **params: Unpack["SubscriptionDeleteDiscountParams"], ) -> "Discount": """ @@ -1633,6 +1659,7 @@ def delete_discount( # pyright: ignore[reportGeneralTypeIssues] async def _cls_delete_discount_async( cls, subscription_exposed_id: str, + /, **params: Unpack["SubscriptionDeleteDiscountParams"], ) -> "Discount": """ @@ -1655,6 +1682,7 @@ async def _cls_delete_discount_async( @staticmethod async def delete_discount_async( subscription_exposed_id: str, + /, **params: Unpack["SubscriptionDeleteDiscountParams"], ) -> "Discount": """ @@ -1731,7 +1759,10 @@ async def list_async( @classmethod def _cls_migrate( - cls, subscription: str, **params: Unpack["SubscriptionMigrateParams"] + cls, + subscription: str, + /, + **params: Unpack["SubscriptionMigrateParams"], ) -> "Subscription": """ Upgrade the billing_mode of an existing subscription. @@ -1750,7 +1781,7 @@ def _cls_migrate( @overload @staticmethod def migrate( - subscription: str, **params: Unpack["SubscriptionMigrateParams"] + subscription: str, /, **params: Unpack["SubscriptionMigrateParams"] ) -> "Subscription": """ Upgrade the billing_mode of an existing subscription. @@ -1786,7 +1817,10 @@ def migrate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_migrate_async( - cls, subscription: str, **params: Unpack["SubscriptionMigrateParams"] + cls, + subscription: str, + /, + **params: Unpack["SubscriptionMigrateParams"], ) -> "Subscription": """ Upgrade the billing_mode of an existing subscription. @@ -1805,7 +1839,7 @@ async def _cls_migrate_async( @overload @staticmethod async def migrate_async( - subscription: str, **params: Unpack["SubscriptionMigrateParams"] + subscription: str, /, **params: Unpack["SubscriptionMigrateParams"] ) -> "Subscription": """ Upgrade the billing_mode of an existing subscription. @@ -1915,7 +1949,7 @@ async def modify_async( @classmethod def _cls_pause( - cls, subscription: str, **params: Unpack["SubscriptionPauseParams"] + 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. @@ -1934,7 +1968,7 @@ def _cls_pause( @overload @staticmethod def pause( - subscription: str, **params: Unpack["SubscriptionPauseParams"] + 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. @@ -1970,7 +2004,7 @@ def pause( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_pause_async( - cls, subscription: str, **params: Unpack["SubscriptionPauseParams"] + 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. @@ -1989,7 +2023,7 @@ async def _cls_pause_async( @overload @staticmethod async def pause_async( - subscription: str, **params: Unpack["SubscriptionPauseParams"] + 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. @@ -2025,7 +2059,7 @@ async def pause_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_resume( - cls, subscription: str, **params: Unpack["SubscriptionResumeParams"] + cls, subscription: str, /, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. Resume is only available for subscriptions that use charge_automatically collection. If Stripe doesn't generate a resumption invoice, the subscription becomes active immediately. When a resumption invoice is generated, Stripe finalizes it immediately. If the invoice is paid or marked uncollectible, the subscription becomes active. If the invoice is manually voided, the subscription stays paused. If there is no payment attempt within 23 hours, Stripe voids the invoice and the subscription stays paused. Learn more about [resuming subscriptions](https://docs.stripe.com/docs/billing/subscriptions/pause#resume-subscriptions). @@ -2044,7 +2078,7 @@ def _cls_resume( @overload @staticmethod def resume( - subscription: str, **params: Unpack["SubscriptionResumeParams"] + subscription: str, /, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. Resume is only available for subscriptions that use charge_automatically collection. If Stripe doesn't generate a resumption invoice, the subscription becomes active immediately. When a resumption invoice is generated, Stripe finalizes it immediately. If the invoice is paid or marked uncollectible, the subscription becomes active. If the invoice is manually voided, the subscription stays paused. If there is no payment attempt within 23 hours, Stripe voids the invoice and the subscription stays paused. Learn more about [resuming subscriptions](https://docs.stripe.com/docs/billing/subscriptions/pause#resume-subscriptions). @@ -2080,7 +2114,7 @@ def resume( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_resume_async( - cls, subscription: str, **params: Unpack["SubscriptionResumeParams"] + cls, subscription: str, /, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. Resume is only available for subscriptions that use charge_automatically collection. If Stripe doesn't generate a resumption invoice, the subscription becomes active immediately. When a resumption invoice is generated, Stripe finalizes it immediately. If the invoice is paid or marked uncollectible, the subscription becomes active. If the invoice is manually voided, the subscription stays paused. If there is no payment attempt within 23 hours, Stripe voids the invoice and the subscription stays paused. Learn more about [resuming subscriptions](https://docs.stripe.com/docs/billing/subscriptions/pause#resume-subscriptions). @@ -2099,7 +2133,7 @@ async def _cls_resume_async( @overload @staticmethod async def resume_async( - subscription: str, **params: Unpack["SubscriptionResumeParams"] + subscription: str, /, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. Resume is only available for subscriptions that use charge_automatically collection. If Stripe doesn't generate a resumption invoice, the subscription becomes active immediately. When a resumption invoice is generated, Stripe finalizes it immediately. If the invoice is paid or marked uncollectible, the subscription becomes active. If the invoice is manually voided, the subscription stays paused. If there is no payment attempt within 23 hours, Stripe voids the invoice and the subscription stays paused. Learn more about [resuming subscriptions](https://docs.stripe.com/docs/billing/subscriptions/pause#resume-subscriptions). diff --git a/stripe/_subscription_item_service.py b/stripe/_subscription_item_service.py index 083a2f923..287ebef40 100644 --- a/stripe/_subscription_item_service.py +++ b/stripe/_subscription_item_service.py @@ -33,6 +33,7 @@ class SubscriptionItemService(StripeService): def delete( self, item: str, + /, params: Optional["SubscriptionItemDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionItem": @@ -53,6 +54,7 @@ def delete( async def delete_async( self, item: str, + /, params: Optional["SubscriptionItemDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionItem": @@ -73,6 +75,7 @@ async def delete_async( def retrieve( self, item: str, + /, params: Optional["SubscriptionItemRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionItem": @@ -93,6 +96,7 @@ def retrieve( async def retrieve_async( self, item: str, + /, params: Optional["SubscriptionItemRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionItem": @@ -113,6 +117,7 @@ async def retrieve_async( def update( self, item: str, + /, params: Optional["SubscriptionItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionItem": @@ -133,6 +138,7 @@ def update( async def update_async( self, item: str, + /, params: Optional["SubscriptionItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionItem": @@ -229,6 +235,7 @@ async def create_async( def serialize_batch_delete( self, item: str, + /, params: Optional["SubscriptionItemDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -253,6 +260,7 @@ def serialize_batch_delete( def serialize_batch_update( self, item: str, + /, params: Optional["SubscriptionItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_subscription_schedule.py b/stripe/_subscription_schedule.py index f698f8f59..ecd1966f8 100644 --- a/stripe/_subscription_schedule.py +++ b/stripe/_subscription_schedule.py @@ -1132,7 +1132,10 @@ class Prebilling(StripeObject): @classmethod def _cls_amend( - cls, schedule: str, **params: Unpack["SubscriptionScheduleAmendParams"] + cls, + schedule: str, + /, + **params: Unpack["SubscriptionScheduleAmendParams"], ) -> "SubscriptionSchedule": """ Amends an existing subscription schedule. @@ -1151,7 +1154,7 @@ def _cls_amend( @overload @staticmethod def amend( - schedule: str, **params: Unpack["SubscriptionScheduleAmendParams"] + schedule: str, /, **params: Unpack["SubscriptionScheduleAmendParams"] ) -> "SubscriptionSchedule": """ Amends an existing subscription schedule. @@ -1187,7 +1190,10 @@ def amend( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_amend_async( - cls, schedule: str, **params: Unpack["SubscriptionScheduleAmendParams"] + cls, + schedule: str, + /, + **params: Unpack["SubscriptionScheduleAmendParams"], ) -> "SubscriptionSchedule": """ Amends an existing subscription schedule. @@ -1206,7 +1212,7 @@ async def _cls_amend_async( @overload @staticmethod async def amend_async( - schedule: str, **params: Unpack["SubscriptionScheduleAmendParams"] + schedule: str, /, **params: Unpack["SubscriptionScheduleAmendParams"] ) -> "SubscriptionSchedule": """ Amends an existing subscription schedule. @@ -1244,6 +1250,7 @@ async def amend_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_cancel( cls, schedule: str, + /, **params: Unpack["SubscriptionScheduleCancelParams"], ) -> "SubscriptionSchedule": """ @@ -1263,7 +1270,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - schedule: str, **params: Unpack["SubscriptionScheduleCancelParams"] + schedule: str, /, **params: Unpack["SubscriptionScheduleCancelParams"] ) -> "SubscriptionSchedule": """ Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active. @@ -1301,6 +1308,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] async def _cls_cancel_async( cls, schedule: str, + /, **params: Unpack["SubscriptionScheduleCancelParams"], ) -> "SubscriptionSchedule": """ @@ -1320,7 +1328,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - schedule: str, **params: Unpack["SubscriptionScheduleCancelParams"] + schedule: str, /, **params: Unpack["SubscriptionScheduleCancelParams"] ) -> "SubscriptionSchedule": """ Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active. @@ -1464,6 +1472,7 @@ async def modify_async( def _cls_release( cls, schedule: str, + /, **params: Unpack["SubscriptionScheduleReleaseParams"], ) -> "SubscriptionSchedule": """ @@ -1483,7 +1492,7 @@ def _cls_release( @overload @staticmethod def release( - schedule: str, **params: Unpack["SubscriptionScheduleReleaseParams"] + schedule: str, /, **params: Unpack["SubscriptionScheduleReleaseParams"] ) -> "SubscriptionSchedule": """ Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property. @@ -1521,6 +1530,7 @@ def release( # pyright: ignore[reportGeneralTypeIssues] async def _cls_release_async( cls, schedule: str, + /, **params: Unpack["SubscriptionScheduleReleaseParams"], ) -> "SubscriptionSchedule": """ @@ -1540,7 +1550,7 @@ async def _cls_release_async( @overload @staticmethod async def release_async( - schedule: str, **params: Unpack["SubscriptionScheduleReleaseParams"] + schedule: str, /, **params: Unpack["SubscriptionScheduleReleaseParams"] ) -> "SubscriptionSchedule": """ Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property. diff --git a/stripe/_subscription_schedule_service.py b/stripe/_subscription_schedule_service.py index 6aee754d6..2ee9483ed 100644 --- a/stripe/_subscription_schedule_service.py +++ b/stripe/_subscription_schedule_service.py @@ -115,6 +115,7 @@ async def create_async( def retrieve( self, schedule: str, + /, params: Optional["SubscriptionScheduleRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionSchedule": @@ -137,6 +138,7 @@ def retrieve( async def retrieve_async( self, schedule: str, + /, params: Optional["SubscriptionScheduleRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionSchedule": @@ -159,6 +161,7 @@ async def retrieve_async( def update( self, schedule: str, + /, params: Optional["SubscriptionScheduleUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionSchedule": @@ -181,6 +184,7 @@ def update( async def update_async( self, schedule: str, + /, params: Optional["SubscriptionScheduleUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionSchedule": @@ -203,6 +207,7 @@ async def update_async( def amend( self, schedule: str, + /, params: Optional["SubscriptionScheduleAmendParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionSchedule": @@ -225,6 +230,7 @@ def amend( async def amend_async( self, schedule: str, + /, params: Optional["SubscriptionScheduleAmendParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionSchedule": @@ -247,6 +253,7 @@ async def amend_async( def cancel( self, schedule: str, + /, params: Optional["SubscriptionScheduleCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionSchedule": @@ -269,6 +276,7 @@ def cancel( async def cancel_async( self, schedule: str, + /, params: Optional["SubscriptionScheduleCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionSchedule": @@ -291,6 +299,7 @@ async def cancel_async( def release( self, schedule: str, + /, params: Optional["SubscriptionScheduleReleaseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionSchedule": @@ -313,6 +322,7 @@ def release( async def release_async( self, schedule: str, + /, params: Optional["SubscriptionScheduleReleaseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SubscriptionSchedule": @@ -357,6 +367,7 @@ def serialize_batch_create( def serialize_batch_update( self, schedule: str, + /, params: Optional["SubscriptionScheduleUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -381,6 +392,7 @@ def serialize_batch_update( def serialize_batch_cancel( self, schedule: str, + /, params: Optional["SubscriptionScheduleCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -405,6 +417,7 @@ def serialize_batch_cancel( def serialize_batch_release( self, schedule: str, + /, params: Optional["SubscriptionScheduleReleaseParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index 097b85e15..1f71f2e38 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -51,6 +51,7 @@ class SubscriptionService(StripeService): def cancel( self, subscription_exposed_id: str, + /, params: Optional["SubscriptionCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Subscription": @@ -79,6 +80,7 @@ def cancel( async def cancel_async( self, subscription_exposed_id: str, + /, params: Optional["SubscriptionCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Subscription": @@ -107,6 +109,7 @@ async def cancel_async( def retrieve( self, subscription_exposed_id: str, + /, params: Optional["SubscriptionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Subscription": @@ -131,6 +134,7 @@ def retrieve( async def retrieve_async( self, subscription_exposed_id: str, + /, params: Optional["SubscriptionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Subscription": @@ -155,6 +159,7 @@ async def retrieve_async( def update( self, subscription_exposed_id: str, + /, params: Optional["SubscriptionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Subscription": @@ -199,6 +204,7 @@ def update( async def update_async( self, subscription_exposed_id: str, + /, params: Optional["SubscriptionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Subscription": @@ -243,6 +249,7 @@ async def update_async( def delete_discount( self, subscription_exposed_id: str, + /, params: Optional["SubscriptionDeleteDiscountParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Discount": @@ -267,6 +274,7 @@ def delete_discount( async def delete_discount_async( self, subscription_exposed_id: str, + /, params: Optional["SubscriptionDeleteDiscountParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Discount": @@ -423,6 +431,7 @@ async def search_async( def attach_cadence( self, subscription: str, + /, params: "SubscriptionAttachCadenceParams", options: Optional["RequestOptions"] = None, ) -> "Subscription": @@ -445,6 +454,7 @@ def attach_cadence( async def attach_cadence_async( self, subscription: str, + /, params: "SubscriptionAttachCadenceParams", options: Optional["RequestOptions"] = None, ) -> "Subscription": @@ -467,6 +477,7 @@ async def attach_cadence_async( def migrate( self, subscription: str, + /, params: "SubscriptionMigrateParams", options: Optional["RequestOptions"] = None, ) -> "Subscription": @@ -489,6 +500,7 @@ def migrate( async def migrate_async( self, subscription: str, + /, params: "SubscriptionMigrateParams", options: Optional["RequestOptions"] = None, ) -> "Subscription": @@ -511,6 +523,7 @@ async def migrate_async( def pause( self, subscription: str, + /, params: Optional["SubscriptionPauseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Subscription": @@ -533,6 +546,7 @@ def pause( async def pause_async( self, subscription: str, + /, params: Optional["SubscriptionPauseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Subscription": @@ -555,6 +569,7 @@ async def pause_async( def resume( self, subscription: str, + /, params: Optional["SubscriptionResumeParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Subscription": @@ -577,6 +592,7 @@ def resume( async def resume_async( self, subscription: str, + /, params: Optional["SubscriptionResumeParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Subscription": @@ -599,6 +615,7 @@ async def resume_async( def serialize_batch_cancel( self, subscription_exposed_id: str, + /, params: Optional["SubscriptionCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -625,6 +642,7 @@ def serialize_batch_cancel( def serialize_batch_update( self, subscription_exposed_id: str, + /, params: Optional["SubscriptionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -673,6 +691,7 @@ def serialize_batch_create( def serialize_batch_migrate( self, subscription: str, + /, params: Optional["SubscriptionMigrateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -697,6 +716,7 @@ def serialize_batch_migrate( def serialize_batch_pause( self, subscription: str, + /, params: Optional["SubscriptionPauseParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: @@ -721,6 +741,7 @@ def serialize_batch_pause( def serialize_batch_resume( self, subscription: str, + /, params: Optional["SubscriptionResumeParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_tax_code_service.py b/stripe/_tax_code_service.py index ed5f2a54b..436a48f0b 100644 --- a/stripe/_tax_code_service.py +++ b/stripe/_tax_code_service.py @@ -55,6 +55,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["TaxCodeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxCode": @@ -75,6 +76,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["TaxCodeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxCode": diff --git a/stripe/_tax_fund_service.py b/stripe/_tax_fund_service.py index d4d495868..2fe1fe348 100644 --- a/stripe/_tax_fund_service.py +++ b/stripe/_tax_fund_service.py @@ -55,6 +55,7 @@ async def list_async( def retrieve( self, tax_fund: str, + /, params: Optional["TaxFundRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxFund": @@ -77,6 +78,7 @@ def retrieve( async def retrieve_async( self, tax_fund: str, + /, params: Optional["TaxFundRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxFund": diff --git a/stripe/_tax_id_service.py b/stripe/_tax_id_service.py index 12e586d37..cb828cee8 100644 --- a/stripe/_tax_id_service.py +++ b/stripe/_tax_id_service.py @@ -22,6 +22,7 @@ class TaxIdService(StripeService): def delete( self, id: str, + /, params: Optional["TaxIdDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxId": @@ -42,6 +43,7 @@ def delete( async def delete_async( self, id: str, + /, params: Optional["TaxIdDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxId": @@ -62,6 +64,7 @@ async def delete_async( def retrieve( self, id: str, + /, params: Optional["TaxIdRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxId": @@ -82,6 +85,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["TaxIdRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxId": diff --git a/stripe/_tax_rate_service.py b/stripe/_tax_rate_service.py index 7af1b2146..d78ec6e35 100644 --- a/stripe/_tax_rate_service.py +++ b/stripe/_tax_rate_service.py @@ -98,6 +98,7 @@ async def create_async( def retrieve( self, tax_rate: str, + /, params: Optional["TaxRateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxRate": @@ -120,6 +121,7 @@ def retrieve( async def retrieve_async( self, tax_rate: str, + /, params: Optional["TaxRateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxRate": @@ -142,6 +144,7 @@ async def retrieve_async( def update( self, tax_rate: str, + /, params: Optional["TaxRateUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxRate": @@ -164,6 +167,7 @@ def update( async def update_async( self, tax_rate: str, + /, params: Optional["TaxRateUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TaxRate": @@ -208,6 +212,7 @@ def serialize_batch_create( def serialize_batch_update( self, tax_rate: str, + /, params: Optional["TaxRateUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/_token_service.py b/stripe/_token_service.py index a5cd81c28..ea024866b 100644 --- a/stripe/_token_service.py +++ b/stripe/_token_service.py @@ -16,6 +16,7 @@ class TokenService(StripeService): def retrieve( self, token: str, + /, params: Optional["TokenRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Token": @@ -36,6 +37,7 @@ def retrieve( async def retrieve_async( self, token: str, + /, params: Optional["TokenRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Token": diff --git a/stripe/_topup.py b/stripe/_topup.py index 296cd7d7f..1cbece59e 100644 --- a/stripe/_topup.py +++ b/stripe/_topup.py @@ -130,7 +130,7 @@ class UsBankAccount(StripeObject): @classmethod def _cls_cancel( - cls, topup: str, **params: Unpack["TopupCancelParams"] + cls, topup: str, /, **params: Unpack["TopupCancelParams"] ) -> "Topup": """ Cancels a top-up. Only pending top-ups can be canceled. @@ -146,7 +146,9 @@ def _cls_cancel( @overload @staticmethod - def cancel(topup: str, **params: Unpack["TopupCancelParams"]) -> "Topup": + def cancel( + topup: str, /, **params: Unpack["TopupCancelParams"] + ) -> "Topup": """ Cancels a top-up. Only pending top-ups can be canceled. """ @@ -179,7 +181,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, topup: str, **params: Unpack["TopupCancelParams"] + cls, topup: str, /, **params: Unpack["TopupCancelParams"] ) -> "Topup": """ Cancels a top-up. Only pending top-ups can be canceled. @@ -196,7 +198,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - topup: str, **params: Unpack["TopupCancelParams"] + topup: str, /, **params: Unpack["TopupCancelParams"] ) -> "Topup": """ Cancels a top-up. Only pending top-ups can be canceled. diff --git a/stripe/_topup_service.py b/stripe/_topup_service.py index 0f8b849fa..652cb0207 100644 --- a/stripe/_topup_service.py +++ b/stripe/_topup_service.py @@ -96,6 +96,7 @@ async def create_async( def retrieve( self, topup: str, + /, params: Optional["TopupRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Topup": @@ -116,6 +117,7 @@ def retrieve( async def retrieve_async( self, topup: str, + /, params: Optional["TopupRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Topup": @@ -136,6 +138,7 @@ async def retrieve_async( def update( self, topup: str, + /, params: Optional["TopupUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Topup": @@ -156,6 +159,7 @@ def update( async def update_async( self, topup: str, + /, params: Optional["TopupUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Topup": @@ -176,6 +180,7 @@ async def update_async( def cancel( self, topup: str, + /, params: Optional["TopupCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Topup": @@ -196,6 +201,7 @@ def cancel( async def cancel_async( self, topup: str, + /, params: Optional["TopupCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Topup": diff --git a/stripe/_transfer.py b/stripe/_transfer.py index f8fc3801c..60aaefd92 100644 --- a/stripe/_transfer.py +++ b/stripe/_transfer.py @@ -262,7 +262,7 @@ async def retrieve_async( @classmethod def list_reversals( - cls, id: str, **params: Unpack["TransferListReversalsParams"] + cls, id: str, /, **params: Unpack["TransferListReversalsParams"] ) -> ListObject["Reversal"]: """ You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals. @@ -278,7 +278,7 @@ def list_reversals( @classmethod async def list_reversals_async( - cls, id: str, **params: Unpack["TransferListReversalsParams"] + cls, id: str, /, **params: Unpack["TransferListReversalsParams"] ) -> ListObject["Reversal"]: """ You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals. @@ -294,7 +294,7 @@ async def list_reversals_async( @classmethod def create_reversal( - cls, id: str, **params: Unpack["TransferCreateReversalParams"] + cls, id: str, /, **params: Unpack["TransferCreateReversalParams"] ) -> "Reversal": """ When you create a new reversal, you must specify a transfer to create it on. @@ -314,7 +314,7 @@ def create_reversal( @classmethod async def create_reversal_async( - cls, id: str, **params: Unpack["TransferCreateReversalParams"] + cls, id: str, /, **params: Unpack["TransferCreateReversalParams"] ) -> "Reversal": """ When you create a new reversal, you must specify a transfer to create it on. @@ -337,6 +337,7 @@ def retrieve_reversal( cls, transfer: str, id: str, + /, **params: Unpack["TransferRetrieveReversalParams"], ) -> "Reversal": """ @@ -358,6 +359,7 @@ async def retrieve_reversal_async( cls, transfer: str, id: str, + /, **params: Unpack["TransferRetrieveReversalParams"], ) -> "Reversal": """ @@ -379,6 +381,7 @@ def modify_reversal( cls, transfer: str, id: str, + /, **params: Unpack["TransferModifyReversalParams"], ) -> "Reversal": """ @@ -402,6 +405,7 @@ async def modify_reversal_async( cls, transfer: str, id: str, + /, **params: Unpack["TransferModifyReversalParams"], ) -> "Reversal": """ diff --git a/stripe/_transfer_reversal_service.py b/stripe/_transfer_reversal_service.py index 0d74e0684..e25f76cf0 100644 --- a/stripe/_transfer_reversal_service.py +++ b/stripe/_transfer_reversal_service.py @@ -27,6 +27,7 @@ class TransferReversalService(StripeService): def list( self, id: str, + /, params: Optional["TransferReversalListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[Reversal]": @@ -47,6 +48,7 @@ def list( async def list_async( self, id: str, + /, params: Optional["TransferReversalListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[Reversal]": @@ -67,6 +69,7 @@ async def list_async( def create( self, id: str, + /, params: Optional["TransferReversalCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reversal": @@ -91,6 +94,7 @@ def create( async def create_async( self, id: str, + /, params: Optional["TransferReversalCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reversal": @@ -116,6 +120,7 @@ def retrieve( self, transfer: str, id: str, + /, params: Optional["TransferReversalRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reversal": @@ -140,6 +145,7 @@ async def retrieve_async( self, transfer: str, id: str, + /, params: Optional["TransferReversalRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reversal": @@ -164,6 +170,7 @@ def update( self, transfer: str, id: str, + /, params: Optional["TransferReversalUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reversal": @@ -190,6 +197,7 @@ async def update_async( self, transfer: str, id: str, + /, params: Optional["TransferReversalUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reversal": diff --git a/stripe/_transfer_service.py b/stripe/_transfer_service.py index 4a32fb4f8..281f12470 100644 --- a/stripe/_transfer_service.py +++ b/stripe/_transfer_service.py @@ -125,6 +125,7 @@ async def create_async( def retrieve( self, transfer: str, + /, params: Optional["TransferRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transfer": @@ -147,6 +148,7 @@ def retrieve( async def retrieve_async( self, transfer: str, + /, params: Optional["TransferRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transfer": @@ -169,6 +171,7 @@ async def retrieve_async( def update( self, transfer: str, + /, params: Optional["TransferUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transfer": @@ -193,6 +196,7 @@ def update( async def update_async( self, transfer: str, + /, params: Optional["TransferUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transfer": diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py index 22c517185..e54453a90 100644 --- a/stripe/_webhook_endpoint_service.py +++ b/stripe/_webhook_endpoint_service.py @@ -30,6 +30,7 @@ class WebhookEndpointService(StripeService): def delete( self, webhook_endpoint: str, + /, params: Optional["WebhookEndpointDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "WebhookEndpoint": @@ -52,6 +53,7 @@ def delete( async def delete_async( self, webhook_endpoint: str, + /, params: Optional["WebhookEndpointDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "WebhookEndpoint": @@ -74,6 +76,7 @@ async def delete_async( def retrieve( self, webhook_endpoint: str, + /, params: Optional["WebhookEndpointRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "WebhookEndpoint": @@ -96,6 +99,7 @@ def retrieve( async def retrieve_async( self, webhook_endpoint: str, + /, params: Optional["WebhookEndpointRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "WebhookEndpoint": @@ -118,6 +122,7 @@ async def retrieve_async( def update( self, webhook_endpoint: str, + /, params: Optional["WebhookEndpointUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "WebhookEndpoint": @@ -140,6 +145,7 @@ def update( async def update_async( self, webhook_endpoint: str, + /, params: Optional["WebhookEndpointUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "WebhookEndpoint": diff --git a/stripe/apps/__init__.py b/stripe/apps/__init__.py index f4e11b24d..9d7e1db90 100644 --- a/stripe/apps/__init__.py +++ b/stripe/apps/__init__.py @@ -4,11 +4,13 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: + from stripe.apps._install import Install as Install 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), "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..fa2b1e6be --- /dev/null +++ b/stripe/apps/_install.py @@ -0,0 +1,121 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class Install(StripeObject): + """ + An object representing an app installation. + """ + + OBJECT_NAME: ClassVar[Literal["apps.install"]] = "apps.install" + + class AuthorizedContentSecurityPolicy(StripeObject): + connect_src: Optional[List[str]] + image_src: Optional[List[str]] + purpose: Optional[str] + + class ContentSecurityPolicyGranted(StripeObject): + connect_src: Optional[List[str]] + image_src: Optional[List[str]] + + class ContentSecurityPolicyPending(StripeObject): + connect_src: Optional[List[str]] + image_src: Optional[List[str]] + + 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. + """ + auth_code: Optional[str] + """ + The authorization code for an oauth app install. + """ + authorized_content_security_policy: AuthorizedContentSecurityPolicy + authorized_endpoints: List[str] + """ + The endpoint URLs authorized by the installer. + """ + authorized_permissions: List[str] + """ + The permissions authorized by the installer. + """ + channel: str + """ + The distribution channel associated with the app install. + """ + content_security_policy_granted: Optional[ContentSecurityPolicyGranted] + """ + The content security policy entries authorized by the installer. + """ + content_security_policy_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: Optional[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: Optional[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. + """ + state: str + """ + The status of the app install. + """ + status: Optional[ + Union[ + Literal[ + "install_failed", + "installed", + "installing", + "uninstall_failed", + "uninstalling", + ], + str, + ] + ] + """ + The status of the app install. + """ + _inner_class_types = { + "authorized_content_security_policy": AuthorizedContentSecurityPolicy, + "content_security_policy_granted": ContentSecurityPolicyGranted, + "content_security_policy_pending": ContentSecurityPolicyPending, + } diff --git a/stripe/billing/_alert.py b/stripe/billing/_alert.py index 752ba98d1..79308c147 100644 --- a/stripe/billing/_alert.py +++ b/stripe/billing/_alert.py @@ -306,7 +306,7 @@ class Filter(StripeObject): @classmethod def _cls_activate( - cls, id: str, **params: Unpack["AlertActivateParams"] + cls, id: str, /, **params: Unpack["AlertActivateParams"] ) -> "Alert": """ Reactivates this alert, allowing it to trigger again. @@ -322,7 +322,9 @@ def _cls_activate( @overload @staticmethod - def activate(id: str, **params: Unpack["AlertActivateParams"]) -> "Alert": + def activate( + id: str, /, **params: Unpack["AlertActivateParams"] + ) -> "Alert": """ Reactivates this alert, allowing it to trigger again. """ @@ -355,7 +357,7 @@ def activate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_activate_async( - cls, id: str, **params: Unpack["AlertActivateParams"] + cls, id: str, /, **params: Unpack["AlertActivateParams"] ) -> "Alert": """ Reactivates this alert, allowing it to trigger again. @@ -372,7 +374,7 @@ async def _cls_activate_async( @overload @staticmethod async def activate_async( - id: str, **params: Unpack["AlertActivateParams"] + id: str, /, **params: Unpack["AlertActivateParams"] ) -> "Alert": """ Reactivates this alert, allowing it to trigger again. @@ -408,7 +410,7 @@ async def activate_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_archive( - cls, id: str, **params: Unpack["AlertArchiveParams"] + cls, id: str, /, **params: Unpack["AlertArchiveParams"] ) -> "Alert": """ Archives this alert, removing it from the list view and APIs. This is non-reversible. @@ -424,7 +426,7 @@ def _cls_archive( @overload @staticmethod - def archive(id: str, **params: Unpack["AlertArchiveParams"]) -> "Alert": + def archive(id: str, /, **params: Unpack["AlertArchiveParams"]) -> "Alert": """ Archives this alert, removing it from the list view and APIs. This is non-reversible. """ @@ -457,7 +459,7 @@ def archive( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_archive_async( - cls, id: str, **params: Unpack["AlertArchiveParams"] + cls, id: str, /, **params: Unpack["AlertArchiveParams"] ) -> "Alert": """ Archives this alert, removing it from the list view and APIs. This is non-reversible. @@ -474,7 +476,7 @@ async def _cls_archive_async( @overload @staticmethod async def archive_async( - id: str, **params: Unpack["AlertArchiveParams"] + id: str, /, **params: Unpack["AlertArchiveParams"] ) -> "Alert": """ Archives this alert, removing it from the list view and APIs. This is non-reversible. @@ -540,7 +542,7 @@ async def create_async( @classmethod def _cls_deactivate( - cls, id: str, **params: Unpack["AlertDeactivateParams"] + cls, id: str, /, **params: Unpack["AlertDeactivateParams"] ) -> "Alert": """ Deactivates this alert, preventing it from triggering. @@ -559,7 +561,7 @@ def _cls_deactivate( @overload @staticmethod def deactivate( - id: str, **params: Unpack["AlertDeactivateParams"] + id: str, /, **params: Unpack["AlertDeactivateParams"] ) -> "Alert": """ Deactivates this alert, preventing it from triggering. @@ -593,7 +595,7 @@ def deactivate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_deactivate_async( - cls, id: str, **params: Unpack["AlertDeactivateParams"] + cls, id: str, /, **params: Unpack["AlertDeactivateParams"] ) -> "Alert": """ Deactivates this alert, preventing it from triggering. @@ -612,7 +614,7 @@ async def _cls_deactivate_async( @overload @staticmethod async def deactivate_async( - id: str, **params: Unpack["AlertDeactivateParams"] + id: str, /, **params: Unpack["AlertDeactivateParams"] ) -> "Alert": """ Deactivates this alert, preventing it from triggering. @@ -708,7 +710,7 @@ async def retrieve_async( @classmethod def list_notifications( - cls, id: str, **params: Unpack["AlertListNotificationsParams"] + cls, id: str, /, **params: Unpack["AlertListNotificationsParams"] ) -> ListObject["AlertNotification"]: """ Lists sent billing alert triggered and recovered notifications for a billing alert. @@ -726,7 +728,7 @@ def list_notifications( @classmethod async def list_notifications_async( - cls, id: str, **params: Unpack["AlertListNotificationsParams"] + cls, id: str, /, **params: Unpack["AlertListNotificationsParams"] ) -> ListObject["AlertNotification"]: """ Lists sent billing alert triggered and recovered notifications for a billing alert. diff --git a/stripe/billing/_alert_notification_service.py b/stripe/billing/_alert_notification_service.py index ce25fb042..a9705ad73 100644 --- a/stripe/billing/_alert_notification_service.py +++ b/stripe/billing/_alert_notification_service.py @@ -18,6 +18,7 @@ class AlertNotificationService(StripeService): def list( self, id: str, + /, params: "AlertNotificationListParams", options: Optional["RequestOptions"] = None, ) -> "ListObject[AlertNotification]": @@ -40,6 +41,7 @@ def list( async def list_async( self, id: str, + /, params: "AlertNotificationListParams", options: Optional["RequestOptions"] = None, ) -> "ListObject[AlertNotification]": diff --git a/stripe/billing/_alert_service.py b/stripe/billing/_alert_service.py index 9ea5d6ca6..4c40a54b0 100644 --- a/stripe/billing/_alert_service.py +++ b/stripe/billing/_alert_service.py @@ -135,6 +135,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["AlertRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Alert": @@ -155,6 +156,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["AlertRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Alert": @@ -175,6 +177,7 @@ async def retrieve_async( def activate( self, id: str, + /, params: Optional["AlertActivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Alert": @@ -195,6 +198,7 @@ def activate( async def activate_async( self, id: str, + /, params: Optional["AlertActivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Alert": @@ -215,6 +219,7 @@ async def activate_async( def archive( self, id: str, + /, params: Optional["AlertArchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Alert": @@ -235,6 +240,7 @@ def archive( async def archive_async( self, id: str, + /, params: Optional["AlertArchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Alert": @@ -255,6 +261,7 @@ async def archive_async( def deactivate( self, id: str, + /, params: Optional["AlertDeactivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Alert": @@ -277,6 +284,7 @@ def deactivate( async def deactivate_async( self, id: str, + /, params: Optional["AlertDeactivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Alert": diff --git a/stripe/billing/_credit_balance_transaction_service.py b/stripe/billing/_credit_balance_transaction_service.py index 52f511b49..5e36f3430 100644 --- a/stripe/billing/_credit_balance_transaction_service.py +++ b/stripe/billing/_credit_balance_transaction_service.py @@ -61,6 +61,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["CreditBalanceTransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditBalanceTransaction": @@ -83,6 +84,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["CreditBalanceTransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditBalanceTransaction": diff --git a/stripe/billing/_credit_grant.py b/stripe/billing/_credit_grant.py index 4b5e05a54..58053bc9a 100644 --- a/stripe/billing/_credit_grant.py +++ b/stripe/billing/_credit_grant.py @@ -263,7 +263,7 @@ async def create_async( @classmethod def _cls_expire( - cls, id: str, **params: Unpack["CreditGrantExpireParams"] + cls, id: str, /, **params: Unpack["CreditGrantExpireParams"] ) -> "CreditGrant": """ Expires a credit grant. @@ -282,7 +282,7 @@ def _cls_expire( @overload @staticmethod def expire( - id: str, **params: Unpack["CreditGrantExpireParams"] + id: str, /, **params: Unpack["CreditGrantExpireParams"] ) -> "CreditGrant": """ Expires a credit grant. @@ -318,7 +318,7 @@ def expire( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_expire_async( - cls, id: str, **params: Unpack["CreditGrantExpireParams"] + cls, id: str, /, **params: Unpack["CreditGrantExpireParams"] ) -> "CreditGrant": """ Expires a credit grant. @@ -337,7 +337,7 @@ async def _cls_expire_async( @overload @staticmethod async def expire_async( - id: str, **params: Unpack["CreditGrantExpireParams"] + id: str, /, **params: Unpack["CreditGrantExpireParams"] ) -> "CreditGrant": """ Expires a credit grant. @@ -469,7 +469,7 @@ async def retrieve_async( @classmethod def _cls_void_grant( - cls, id: str, **params: Unpack["CreditGrantVoidGrantParams"] + cls, id: str, /, **params: Unpack["CreditGrantVoidGrantParams"] ) -> "CreditGrant": """ Voids a credit grant. @@ -488,7 +488,7 @@ def _cls_void_grant( @overload @staticmethod def void_grant( - id: str, **params: Unpack["CreditGrantVoidGrantParams"] + id: str, /, **params: Unpack["CreditGrantVoidGrantParams"] ) -> "CreditGrant": """ Voids a credit grant. @@ -524,7 +524,7 @@ def void_grant( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_void_grant_async( - cls, id: str, **params: Unpack["CreditGrantVoidGrantParams"] + cls, id: str, /, **params: Unpack["CreditGrantVoidGrantParams"] ) -> "CreditGrant": """ Voids a credit grant. @@ -543,7 +543,7 @@ async def _cls_void_grant_async( @overload @staticmethod async def void_grant_async( - id: str, **params: Unpack["CreditGrantVoidGrantParams"] + id: str, /, **params: Unpack["CreditGrantVoidGrantParams"] ) -> "CreditGrant": """ Voids a credit grant. diff --git a/stripe/billing/_credit_grant_service.py b/stripe/billing/_credit_grant_service.py index 047cf0f57..4a84f4b0e 100644 --- a/stripe/billing/_credit_grant_service.py +++ b/stripe/billing/_credit_grant_service.py @@ -109,6 +109,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["CreditGrantRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditGrant": @@ -129,6 +130,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["CreditGrantRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditGrant": @@ -149,6 +151,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["CreditGrantUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditGrant": @@ -169,6 +172,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["CreditGrantUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditGrant": @@ -189,6 +193,7 @@ async def update_async( def expire( self, id: str, + /, params: Optional["CreditGrantExpireParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditGrant": @@ -211,6 +216,7 @@ def expire( async def expire_async( self, id: str, + /, params: Optional["CreditGrantExpireParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditGrant": @@ -233,6 +239,7 @@ async def expire_async( def void_grant( self, id: str, + /, params: Optional["CreditGrantVoidGrantParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditGrant": @@ -255,6 +262,7 @@ def void_grant( async def void_grant_async( self, id: str, + /, params: Optional["CreditGrantVoidGrantParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditGrant": diff --git a/stripe/billing/_feedback_option.py b/stripe/billing/_feedback_option.py index ebf098a85..1bb86bf4a 100644 --- a/stripe/billing/_feedback_option.py +++ b/stripe/billing/_feedback_option.py @@ -106,7 +106,7 @@ async def create_async( @classmethod def _cls_deactivate( - cls, id: str, **params: Unpack["FeedbackOptionDeactivateParams"] + cls, id: str, /, **params: Unpack["FeedbackOptionDeactivateParams"] ) -> "FeedbackOption": """ Deactivates a feedback option. Deactivated feedback options cannot be used in portal configurations. @@ -125,7 +125,7 @@ def _cls_deactivate( @overload @staticmethod def deactivate( - id: str, **params: Unpack["FeedbackOptionDeactivateParams"] + id: str, /, **params: Unpack["FeedbackOptionDeactivateParams"] ) -> "FeedbackOption": """ Deactivates a feedback option. Deactivated feedback options cannot be used in portal configurations. @@ -161,7 +161,7 @@ def deactivate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_deactivate_async( - cls, id: str, **params: Unpack["FeedbackOptionDeactivateParams"] + cls, id: str, /, **params: Unpack["FeedbackOptionDeactivateParams"] ) -> "FeedbackOption": """ Deactivates a feedback option. Deactivated feedback options cannot be used in portal configurations. @@ -180,7 +180,7 @@ async def _cls_deactivate_async( @overload @staticmethod async def deactivate_async( - id: str, **params: Unpack["FeedbackOptionDeactivateParams"] + id: str, /, **params: Unpack["FeedbackOptionDeactivateParams"] ) -> "FeedbackOption": """ Deactivates a feedback option. Deactivated feedback options cannot be used in portal configurations. diff --git a/stripe/billing/_feedback_option_service.py b/stripe/billing/_feedback_option_service.py index 535ddd813..ca375169d 100644 --- a/stripe/billing/_feedback_option_service.py +++ b/stripe/billing/_feedback_option_service.py @@ -106,6 +106,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["FeedbackOptionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FeedbackOption": @@ -126,6 +127,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["FeedbackOptionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FeedbackOption": @@ -146,6 +148,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["FeedbackOptionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FeedbackOption": @@ -166,6 +169,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["FeedbackOptionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FeedbackOption": @@ -186,6 +190,7 @@ async def update_async( def deactivate( self, id: str, + /, params: Optional["FeedbackOptionDeactivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FeedbackOption": @@ -208,6 +213,7 @@ def deactivate( async def deactivate_async( self, id: str, + /, params: Optional["FeedbackOptionDeactivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FeedbackOption": diff --git a/stripe/billing/_meter.py b/stripe/billing/_meter.py index 6be8b5ab9..879ef194b 100644 --- a/stripe/billing/_meter.py +++ b/stripe/billing/_meter.py @@ -148,7 +148,7 @@ async def create_async( @classmethod def _cls_deactivate( - cls, id: str, **params: Unpack["MeterDeactivateParams"] + cls, id: str, /, **params: Unpack["MeterDeactivateParams"] ) -> "Meter": """ When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. @@ -167,7 +167,7 @@ def _cls_deactivate( @overload @staticmethod def deactivate( - id: str, **params: Unpack["MeterDeactivateParams"] + id: str, /, **params: Unpack["MeterDeactivateParams"] ) -> "Meter": """ When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. @@ -201,7 +201,7 @@ def deactivate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_deactivate_async( - cls, id: str, **params: Unpack["MeterDeactivateParams"] + cls, id: str, /, **params: Unpack["MeterDeactivateParams"] ) -> "Meter": """ When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. @@ -220,7 +220,7 @@ async def _cls_deactivate_async( @overload @staticmethod async def deactivate_async( - id: str, **params: Unpack["MeterDeactivateParams"] + id: str, /, **params: Unpack["MeterDeactivateParams"] ) -> "Meter": """ When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. @@ -326,7 +326,7 @@ async def modify_async( @classmethod def _cls_reactivate( - cls, id: str, **params: Unpack["MeterReactivateParams"] + cls, id: str, /, **params: Unpack["MeterReactivateParams"] ) -> "Meter": """ When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. @@ -345,7 +345,7 @@ def _cls_reactivate( @overload @staticmethod def reactivate( - id: str, **params: Unpack["MeterReactivateParams"] + id: str, /, **params: Unpack["MeterReactivateParams"] ) -> "Meter": """ When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. @@ -379,7 +379,7 @@ def reactivate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_reactivate_async( - cls, id: str, **params: Unpack["MeterReactivateParams"] + cls, id: str, /, **params: Unpack["MeterReactivateParams"] ) -> "Meter": """ When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. @@ -398,7 +398,7 @@ async def _cls_reactivate_async( @overload @staticmethod async def reactivate_async( - id: str, **params: Unpack["MeterReactivateParams"] + id: str, /, **params: Unpack["MeterReactivateParams"] ) -> "Meter": """ When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. @@ -456,7 +456,7 @@ async def retrieve_async( @classmethod def list_event_summaries( - cls, id: str, **params: Unpack["MeterListEventSummariesParams"] + cls, id: str, /, **params: Unpack["MeterListEventSummariesParams"] ) -> ListObject["MeterEventSummary"]: """ Retrieve a list of billing meter event summaries. @@ -474,7 +474,7 @@ def list_event_summaries( @classmethod async def list_event_summaries_async( - cls, id: str, **params: Unpack["MeterListEventSummariesParams"] + cls, id: str, /, **params: Unpack["MeterListEventSummariesParams"] ) -> ListObject["MeterEventSummary"]: """ Retrieve a list of billing meter event summaries. diff --git a/stripe/billing/_meter_event_summary_service.py b/stripe/billing/_meter_event_summary_service.py index 3cc196d0e..b12857c03 100644 --- a/stripe/billing/_meter_event_summary_service.py +++ b/stripe/billing/_meter_event_summary_service.py @@ -18,6 +18,7 @@ class MeterEventSummaryService(StripeService): def list( self, id: str, + /, params: "MeterEventSummaryListParams", options: Optional["RequestOptions"] = None, ) -> "ListObject[MeterEventSummary]": @@ -40,6 +41,7 @@ def list( async def list_async( self, id: str, + /, params: "MeterEventSummaryListParams", options: Optional["RequestOptions"] = None, ) -> "ListObject[MeterEventSummary]": diff --git a/stripe/billing/_meter_service.py b/stripe/billing/_meter_service.py index 018b4ff73..7ac2efc5d 100644 --- a/stripe/billing/_meter_service.py +++ b/stripe/billing/_meter_service.py @@ -135,6 +135,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["MeterRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Meter": @@ -155,6 +156,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["MeterRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Meter": @@ -175,6 +177,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["MeterUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Meter": @@ -195,6 +198,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["MeterUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Meter": @@ -215,6 +219,7 @@ async def update_async( def deactivate( self, id: str, + /, params: Optional["MeterDeactivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Meter": @@ -237,6 +242,7 @@ def deactivate( async def deactivate_async( self, id: str, + /, params: Optional["MeterDeactivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Meter": @@ -259,6 +265,7 @@ async def deactivate_async( def reactivate( self, id: str, + /, params: Optional["MeterReactivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Meter": @@ -281,6 +288,7 @@ def reactivate( async def reactivate_async( self, id: str, + /, params: Optional["MeterReactivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Meter": diff --git a/stripe/billing_portal/_configuration_service.py b/stripe/billing_portal/_configuration_service.py index ba9084e70..84f33f6cd 100644 --- a/stripe/billing_portal/_configuration_service.py +++ b/stripe/billing_portal/_configuration_service.py @@ -103,6 +103,7 @@ async def create_async( def retrieve( self, configuration: str, + /, params: Optional["ConfigurationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Configuration": @@ -125,6 +126,7 @@ def retrieve( async def retrieve_async( self, configuration: str, + /, params: Optional["ConfigurationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Configuration": @@ -147,6 +149,7 @@ async def retrieve_async( def update( self, configuration: str, + /, params: Optional["ConfigurationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Configuration": @@ -169,6 +172,7 @@ def update( async def update_async( self, configuration: str, + /, params: Optional["ConfigurationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Configuration": diff --git a/stripe/capital/_financing_offer.py b/stripe/capital/_financing_offer.py index e8e2175ec..3838813fc 100644 --- a/stripe/capital/_financing_offer.py +++ b/stripe/capital/_financing_offer.py @@ -241,6 +241,7 @@ async def list_async( def _cls_mark_delivered( cls, financing_offer: str, + /, **params: Unpack["FinancingOfferMarkDeliveredParams"], ) -> "FinancingOffer": """ @@ -262,6 +263,7 @@ def _cls_mark_delivered( @staticmethod def mark_delivered( financing_offer: str, + /, **params: Unpack["FinancingOfferMarkDeliveredParams"], ) -> "FinancingOffer": """ @@ -303,6 +305,7 @@ def mark_delivered( # pyright: ignore[reportGeneralTypeIssues] async def _cls_mark_delivered_async( cls, financing_offer: str, + /, **params: Unpack["FinancingOfferMarkDeliveredParams"], ) -> "FinancingOffer": """ @@ -324,6 +327,7 @@ async def _cls_mark_delivered_async( @staticmethod async def mark_delivered_async( financing_offer: str, + /, **params: Unpack["FinancingOfferMarkDeliveredParams"], ) -> "FinancingOffer": """ @@ -422,6 +426,7 @@ async def create_async( def _cls_refill( cls, financing_offer: str, + /, **params: Unpack["FinancingOfferRefillParams"], ) -> "FinancingOffer": """ @@ -442,6 +447,7 @@ def _cls_refill( @staticmethod def refill( financing_offer: str, + /, **params: Unpack["FinancingOfferRefillParams"], ) -> "FinancingOffer": """ @@ -482,6 +488,7 @@ def refill( # pyright: ignore[reportGeneralTypeIssues] async def _cls_refill_async( cls, financing_offer: str, + /, **params: Unpack["FinancingOfferRefillParams"], ) -> "FinancingOffer": """ @@ -502,6 +509,7 @@ async def _cls_refill_async( @staticmethod async def refill_async( financing_offer: str, + /, **params: Unpack["FinancingOfferRefillParams"], ) -> "FinancingOffer": """ diff --git a/stripe/capital/_financing_offer_service.py b/stripe/capital/_financing_offer_service.py index cdf5e08aa..4d546ed56 100644 --- a/stripe/capital/_financing_offer_service.py +++ b/stripe/capital/_financing_offer_service.py @@ -62,6 +62,7 @@ async def list_async( def retrieve( self, financing_offer: str, + /, params: Optional["FinancingOfferRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancingOffer": @@ -84,6 +85,7 @@ def retrieve( async def retrieve_async( self, financing_offer: str, + /, params: Optional["FinancingOfferRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancingOffer": @@ -106,6 +108,7 @@ async def retrieve_async( def mark_delivered( self, financing_offer: str, + /, params: Optional["FinancingOfferMarkDeliveredParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancingOffer": @@ -129,6 +132,7 @@ def mark_delivered( async def mark_delivered_async( self, financing_offer: str, + /, params: Optional["FinancingOfferMarkDeliveredParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancingOffer": diff --git a/stripe/capital/_financing_transaction_service.py b/stripe/capital/_financing_transaction_service.py index d58480340..d0d6c33b8 100644 --- a/stripe/capital/_financing_transaction_service.py +++ b/stripe/capital/_financing_transaction_service.py @@ -61,6 +61,7 @@ async def list_async( def retrieve( self, financing_transaction: str, + /, params: Optional["FinancingTransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancingTransaction": @@ -83,6 +84,7 @@ def retrieve( async def retrieve_async( self, financing_transaction: str, + /, params: Optional["FinancingTransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancingTransaction": diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index a666540f6..6ef7afbaa 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -818,7 +818,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"] """ @@ -1212,6 +1212,16 @@ class RenderingOptions(StripeObject): class Item(StripeObject): class Subscription(StripeObject): class Item(StripeObject): + class CurrentTrial(StripeObject): + trial_offer: str + """ + The ID of the trial offer applied to this subscription item. + """ + + current_trial: Optional[CurrentTrial] + """ + The trial offer applied to this subscription item. + """ price: ExpandableField["Price"] """ The price for this subscription item. @@ -1220,6 +1230,7 @@ class Item(StripeObject): """ The quantity for this subscription item. """ + _inner_class_types = {"current_trial": CurrentTrial} class PendingInvoiceItemInterval(StripeObject): interval: Union[Literal["day", "month", "week", "year"], str] @@ -1536,6 +1547,9 @@ class MandateOptions(StripeObject): """ Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ + verification_method: Optional[ + Union[Literal["automatic", "payer_name_verification"], str] + ] _inner_class_types = {"mandate_options": MandateOptions} class Bancontact(StripeObject): @@ -3465,7 +3479,7 @@ class Link(StripeObject): @classmethod def _cls_approve( - cls, session: str, **params: Unpack["SessionApproveParams"] + cls, session: str, /, **params: Unpack["SessionApproveParams"] ) -> "Session": """ Approves a customer's attempt to pay for a Checkout Session with approval_method set to manual. @@ -3484,7 +3498,7 @@ def _cls_approve( @overload @staticmethod def approve( - session: str, **params: Unpack["SessionApproveParams"] + session: str, /, **params: Unpack["SessionApproveParams"] ) -> "Session": """ Approves a customer's attempt to pay for a Checkout Session with approval_method set to manual. @@ -3518,7 +3532,7 @@ def approve( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_approve_async( - cls, session: str, **params: Unpack["SessionApproveParams"] + cls, session: str, /, **params: Unpack["SessionApproveParams"] ) -> "Session": """ Approves a customer's attempt to pay for a Checkout Session with approval_method set to manual. @@ -3537,7 +3551,7 @@ async def _cls_approve_async( @overload @staticmethod async def approve_async( - session: str, **params: Unpack["SessionApproveParams"] + session: str, /, **params: Unpack["SessionApproveParams"] ) -> "Session": """ Approves a customer's attempt to pay for a Checkout Session with approval_method set to manual. @@ -3603,7 +3617,7 @@ async def create_async( @classmethod def _cls_expire( - cls, session: str, **params: Unpack["SessionExpireParams"] + cls, session: str, /, **params: Unpack["SessionExpireParams"] ) -> "Session": """ A Checkout Session can be expired when it is in one of these statuses: open @@ -3624,7 +3638,7 @@ def _cls_expire( @overload @staticmethod def expire( - session: str, **params: Unpack["SessionExpireParams"] + session: str, /, **params: Unpack["SessionExpireParams"] ) -> "Session": """ A Checkout Session can be expired when it is in one of these statuses: open @@ -3664,7 +3678,7 @@ def expire( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_expire_async( - cls, session: str, **params: Unpack["SessionExpireParams"] + cls, session: str, /, **params: Unpack["SessionExpireParams"] ) -> "Session": """ A Checkout Session can be expired when it is in one of these statuses: open @@ -3685,7 +3699,7 @@ async def _cls_expire_async( @overload @staticmethod async def expire_async( - session: str, **params: Unpack["SessionExpireParams"] + session: str, /, **params: Unpack["SessionExpireParams"] ) -> "Session": """ A Checkout Session can be expired when it is in one of these statuses: open @@ -3767,7 +3781,7 @@ async def list_async( @classmethod def _cls_list_line_items( - cls, session: str, **params: Unpack["SessionListLineItemsParams"] + cls, session: str, /, **params: Unpack["SessionListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -3786,7 +3800,7 @@ def _cls_list_line_items( @overload @staticmethod def list_line_items( - session: str, **params: Unpack["SessionListLineItemsParams"] + session: str, /, **params: Unpack["SessionListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -3822,7 +3836,7 @@ def list_line_items( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_list_line_items_async( - cls, session: str, **params: Unpack["SessionListLineItemsParams"] + cls, session: str, /, **params: Unpack["SessionListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -3841,7 +3855,7 @@ async def _cls_list_line_items_async( @overload @staticmethod async def list_line_items_async( - session: str, **params: Unpack["SessionListLineItemsParams"] + session: str, /, **params: Unpack["SessionListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/stripe/checkout/_session_line_item_service.py b/stripe/checkout/_session_line_item_service.py index e056ae2ba..4c2855fab 100644 --- a/stripe/checkout/_session_line_item_service.py +++ b/stripe/checkout/_session_line_item_service.py @@ -18,6 +18,7 @@ class SessionLineItemService(StripeService): def list( self, session: str, + /, params: Optional["SessionLineItemListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[LineItem]": @@ -40,6 +41,7 @@ def list( async def list_async( self, session: str, + /, params: Optional["SessionLineItemListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[LineItem]": diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index e31a6f094..6b6e1dc29 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -139,6 +139,7 @@ async def create_async( def retrieve( self, session: str, + /, params: Optional["SessionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Session": @@ -161,6 +162,7 @@ def retrieve( async def retrieve_async( self, session: str, + /, params: Optional["SessionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Session": @@ -183,6 +185,7 @@ async def retrieve_async( def update( self, session: str, + /, params: Optional["SessionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Session": @@ -207,6 +210,7 @@ def update( async def update_async( self, session: str, + /, params: Optional["SessionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Session": @@ -231,6 +235,7 @@ async def update_async( def approve( self, session: str, + /, params: "SessionApproveParams", options: Optional["RequestOptions"] = None, ) -> "Session": @@ -253,6 +258,7 @@ def approve( async def approve_async( self, session: str, + /, params: "SessionApproveParams", options: Optional["RequestOptions"] = None, ) -> "Session": @@ -275,6 +281,7 @@ async def approve_async( def expire( self, session: str, + /, params: Optional["SessionExpireParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Session": @@ -299,6 +306,7 @@ def expire( async def expire_async( self, session: str, + /, params: Optional["SessionExpireParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Session": diff --git a/stripe/climate/_order.py b/stripe/climate/_order.py index 75c5bcc5a..b491769ca 100644 --- a/stripe/climate/_order.py +++ b/stripe/climate/_order.py @@ -181,7 +181,7 @@ class Location(StripeObject): @classmethod def _cls_cancel( - cls, order: str, **params: Unpack["OrderCancelParams"] + cls, order: str, /, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the @@ -202,7 +202,9 @@ def _cls_cancel( @overload @staticmethod - def cancel(order: str, **params: Unpack["OrderCancelParams"]) -> "Order": + def cancel( + order: str, /, **params: Unpack["OrderCancelParams"] + ) -> "Order": """ Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier @@ -244,7 +246,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, order: str, **params: Unpack["OrderCancelParams"] + cls, order: str, /, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the @@ -266,7 +268,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - order: str, **params: Unpack["OrderCancelParams"] + order: str, /, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the diff --git a/stripe/climate/_order_service.py b/stripe/climate/_order_service.py index 0eb3b4859..719c13ad0 100644 --- a/stripe/climate/_order_service.py +++ b/stripe/climate/_order_service.py @@ -102,6 +102,7 @@ async def create_async( def retrieve( self, order: str, + /, params: Optional["OrderRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Order": @@ -122,6 +123,7 @@ def retrieve( async def retrieve_async( self, order: str, + /, params: Optional["OrderRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Order": @@ -142,6 +144,7 @@ async def retrieve_async( def update( self, order: str, + /, params: Optional["OrderUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Order": @@ -162,6 +165,7 @@ def update( async def update_async( self, order: str, + /, params: Optional["OrderUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Order": @@ -182,6 +186,7 @@ async def update_async( def cancel( self, order: str, + /, params: Optional["OrderCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Order": @@ -207,6 +212,7 @@ def cancel( async def cancel_async( self, order: str, + /, params: Optional["OrderCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Order": diff --git a/stripe/climate/_product_service.py b/stripe/climate/_product_service.py index d58cd419b..fe261feb8 100644 --- a/stripe/climate/_product_service.py +++ b/stripe/climate/_product_service.py @@ -57,6 +57,7 @@ async def list_async( def retrieve( self, product: str, + /, params: Optional["ProductRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Product": @@ -79,6 +80,7 @@ def retrieve( async def retrieve_async( self, product: str, + /, params: Optional["ProductRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Product": diff --git a/stripe/climate/_supplier_service.py b/stripe/climate/_supplier_service.py index f31a10f93..dc4598b90 100644 --- a/stripe/climate/_supplier_service.py +++ b/stripe/climate/_supplier_service.py @@ -57,6 +57,7 @@ async def list_async( def retrieve( self, supplier: str, + /, params: Optional["SupplierRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Supplier": @@ -79,6 +80,7 @@ def retrieve( async def retrieve_async( self, supplier: str, + /, params: Optional["SupplierRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Supplier": diff --git a/stripe/crypto/_customer.py b/stripe/crypto/_customer.py index 24a3e6ac5..929aa4009 100644 --- a/stripe/crypto/_customer.py +++ b/stripe/crypto/_customer.py @@ -39,7 +39,9 @@ class KycTier(StripeObject): verification_errors: List[ Union[ Literal[ + "address_validation_failed", "id_document_verification_failed", + "person_verification_failed", "phone_verification_failed", "user_has_reached_max_verification_attempts", ], @@ -67,7 +69,9 @@ class Verification(StripeObject): errors: List[ Union[ Literal[ + "address_validation_failed", "id_document_verification_failed", + "person_verification_failed", "phone_verification_failed", "user_has_reached_max_verification_attempts", ], @@ -173,6 +177,7 @@ async def retrieve_async( def list_crypto_consumer_wallets( cls, id: str, + /, **params: Unpack["CustomerListCryptoConsumerWalletsParams"], ) -> ListObject["CustomerConsumerWallet"]: """ @@ -193,6 +198,7 @@ def list_crypto_consumer_wallets( async def list_crypto_consumer_wallets_async( cls, id: str, + /, **params: Unpack["CustomerListCryptoConsumerWalletsParams"], ) -> ListObject["CustomerConsumerWallet"]: """ @@ -211,7 +217,7 @@ async def list_crypto_consumer_wallets_async( @classmethod def list_payment_tokens( - cls, id: str, **params: Unpack["CustomerListPaymentTokensParams"] + cls, id: str, /, **params: Unpack["CustomerListPaymentTokensParams"] ) -> ListObject["CustomerPaymentToken"]: """ Lists the Payment Tokens for a Crypto Customer. @@ -229,7 +235,7 @@ def list_payment_tokens( @classmethod async def list_payment_tokens_async( - cls, id: str, **params: Unpack["CustomerListPaymentTokensParams"] + cls, id: str, /, **params: Unpack["CustomerListPaymentTokensParams"] ) -> ListObject["CustomerPaymentToken"]: """ Lists the Payment Tokens for a Crypto Customer. diff --git a/stripe/crypto/_customer_consumer_wallet_service.py b/stripe/crypto/_customer_consumer_wallet_service.py index 99f54f9b4..671b76efe 100644 --- a/stripe/crypto/_customer_consumer_wallet_service.py +++ b/stripe/crypto/_customer_consumer_wallet_service.py @@ -18,6 +18,7 @@ class CustomerConsumerWalletService(StripeService): def list( self, id: str, + /, params: Optional["CustomerConsumerWalletListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CustomerConsumerWallet]": @@ -40,6 +41,7 @@ def list( async def list_async( self, id: str, + /, params: Optional["CustomerConsumerWalletListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CustomerConsumerWallet]": diff --git a/stripe/crypto/_customer_payment_token_service.py b/stripe/crypto/_customer_payment_token_service.py index d40afa833..11b34c768 100644 --- a/stripe/crypto/_customer_payment_token_service.py +++ b/stripe/crypto/_customer_payment_token_service.py @@ -18,6 +18,7 @@ class CustomerPaymentTokenService(StripeService): def list( self, id: str, + /, params: Optional["CustomerPaymentTokenListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CustomerPaymentToken]": @@ -40,6 +41,7 @@ def list( async def list_async( self, id: str, + /, params: Optional["CustomerPaymentTokenListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CustomerPaymentToken]": diff --git a/stripe/crypto/_customer_service.py b/stripe/crypto/_customer_service.py index 69d3623de..121ac1bf0 100644 --- a/stripe/crypto/_customer_service.py +++ b/stripe/crypto/_customer_service.py @@ -57,6 +57,7 @@ def __getattr__(self, name): def retrieve( self, id: str, + /, params: Optional["CustomerRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Customer": @@ -77,6 +78,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["CustomerRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Customer": diff --git a/stripe/crypto/_deposit_address_service.py b/stripe/crypto/_deposit_address_service.py index 3be6408e1..b89d45175 100644 --- a/stripe/crypto/_deposit_address_service.py +++ b/stripe/crypto/_deposit_address_service.py @@ -104,6 +104,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["DepositAddressRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DepositAddress": @@ -124,6 +125,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["DepositAddressRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DepositAddress": diff --git a/stripe/crypto/_onramp_session.py b/stripe/crypto/_onramp_session.py index 0eda2e8eb..a0a62f4a5 100644 --- a/stripe/crypto/_onramp_session.py +++ b/stripe/crypto/_onramp_session.py @@ -126,6 +126,7 @@ class DestinationTags(StripeObject): "btc", "eth", "matic", + "ripusd", "sol", "usdc", "usdt", @@ -146,6 +147,7 @@ class DestinationTags(StripeObject): "btc", "eth", "matic", + "ripusd", "sol", "usdc", "usdt", @@ -223,7 +225,9 @@ class DestinationTags(StripeObject): """ The amount of fiat we intend to onramp - excluding fees """ - source_currency: Optional[Union[Literal["eur", "gbp", "usd"], str]] + source_currency: Optional[ + Union[Literal["cad", "cop", "eur", "gbp", "php", "usd"], str] + ] """ A fiat currency code """ @@ -288,7 +292,7 @@ class DestinationTags(StripeObject): @classmethod def _cls_checkout( - cls, id: str, **params: Unpack["OnrampSessionCheckoutParams"] + cls, id: str, /, **params: Unpack["OnrampSessionCheckoutParams"] ) -> "OnrampSession": """ Completes a headless CryptoOnrampSession. @@ -309,7 +313,7 @@ def _cls_checkout( @overload @staticmethod def checkout( - id: str, **params: Unpack["OnrampSessionCheckoutParams"] + id: str, /, **params: Unpack["OnrampSessionCheckoutParams"] ) -> "OnrampSession": """ Completes a headless CryptoOnrampSession. @@ -351,7 +355,7 @@ def checkout( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_checkout_async( - cls, id: str, **params: Unpack["OnrampSessionCheckoutParams"] + cls, id: str, /, **params: Unpack["OnrampSessionCheckoutParams"] ) -> "OnrampSession": """ Completes a headless CryptoOnrampSession. @@ -372,7 +376,7 @@ async def _cls_checkout_async( @overload @staticmethod async def checkout_async( - id: str, **params: Unpack["OnrampSessionCheckoutParams"] + id: str, /, **params: Unpack["OnrampSessionCheckoutParams"] ) -> "OnrampSession": """ Completes a headless CryptoOnrampSession. @@ -494,7 +498,7 @@ async def list_async( @classmethod def _cls_quote( - cls, id: str, **params: Unpack["OnrampSessionQuoteParams"] + cls, id: str, /, **params: Unpack["OnrampSessionQuoteParams"] ) -> "OnrampSession": """ Refreshes an executable quote for a CryptoOnrampSession. @@ -513,7 +517,7 @@ def _cls_quote( @overload @staticmethod def quote( - id: str, **params: Unpack["OnrampSessionQuoteParams"] + id: str, /, **params: Unpack["OnrampSessionQuoteParams"] ) -> "OnrampSession": """ Refreshes an executable quote for a CryptoOnrampSession. @@ -549,7 +553,7 @@ def quote( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_quote_async( - cls, id: str, **params: Unpack["OnrampSessionQuoteParams"] + cls, id: str, /, **params: Unpack["OnrampSessionQuoteParams"] ) -> "OnrampSession": """ Refreshes an executable quote for a CryptoOnrampSession. @@ -568,7 +572,7 @@ async def _cls_quote_async( @overload @staticmethod async def quote_async( - id: str, **params: Unpack["OnrampSessionQuoteParams"] + id: str, /, **params: Unpack["OnrampSessionQuoteParams"] ) -> "OnrampSession": """ Refreshes an executable quote for a CryptoOnrampSession. diff --git a/stripe/crypto/_onramp_session_service.py b/stripe/crypto/_onramp_session_service.py index 43f3bd7c6..239947403 100644 --- a/stripe/crypto/_onramp_session_service.py +++ b/stripe/crypto/_onramp_session_service.py @@ -114,6 +114,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["OnrampSessionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OnrampSession": @@ -134,6 +135,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["OnrampSessionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OnrampSession": @@ -154,6 +156,7 @@ async def retrieve_async( def checkout( self, id: str, + /, params: Optional["OnrampSessionCheckoutParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OnrampSession": @@ -178,6 +181,7 @@ def checkout( async def checkout_async( self, id: str, + /, params: Optional["OnrampSessionCheckoutParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OnrampSession": @@ -202,6 +206,7 @@ async def checkout_async( def quote( self, id: str, + /, params: Optional["OnrampSessionQuoteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OnrampSession": @@ -224,6 +229,7 @@ def quote( async def quote_async( self, id: str, + /, params: Optional["OnrampSessionQuoteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OnrampSession": diff --git a/stripe/delegated_checkout/_order_service.py b/stripe/delegated_checkout/_order_service.py index fe84d8399..e0e0009dd 100644 --- a/stripe/delegated_checkout/_order_service.py +++ b/stripe/delegated_checkout/_order_service.py @@ -17,6 +17,7 @@ class OrderService(StripeService): def retrieve( self, order_id: str, + /, params: Optional["OrderRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Order": @@ -39,6 +40,7 @@ def retrieve( async def retrieve_async( self, order_id: str, + /, params: Optional["OrderRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Order": diff --git a/stripe/delegated_checkout/_requested_session.py b/stripe/delegated_checkout/_requested_session.py index 19fcbfc64..b3fe93183 100644 --- a/stripe/delegated_checkout/_requested_session.py +++ b/stripe/delegated_checkout/_requested_session.py @@ -662,7 +662,7 @@ class MarketplaceSellerDetails(StripeObject): List[Union[Literal["affirm", "card", "klarna"], str]] ] """ - The payment method types supported by the seller. + The payment method types supported by the seller. Stripe sources these from a non-empty `allowed_payment_method_types` response from the seller's checkout customization hook when present. Otherwise, Stripe resolves them from the seller's active or default payment method configuration. Stripe might filter agent-facing displayable payment methods for compatibility. """ privacy_notice_url: Optional[str] """ @@ -862,6 +862,7 @@ class Discount(StripeObject): def _cls_confirm( cls, requested_session: str, + /, **params: Unpack["RequestedSessionConfirmParams"], ) -> "RequestedSession": """ @@ -882,6 +883,7 @@ def _cls_confirm( @staticmethod def confirm( requested_session: str, + /, **params: Unpack["RequestedSessionConfirmParams"], ) -> "RequestedSession": """ @@ -920,6 +922,7 @@ def confirm( # pyright: ignore[reportGeneralTypeIssues] async def _cls_confirm_async( cls, requested_session: str, + /, **params: Unpack["RequestedSessionConfirmParams"], ) -> "RequestedSession": """ @@ -940,6 +943,7 @@ async def _cls_confirm_async( @staticmethod async def confirm_async( requested_session: str, + /, **params: Unpack["RequestedSessionConfirmParams"], ) -> "RequestedSession": """ @@ -1010,6 +1014,7 @@ async def create_async( def _cls_expire( cls, requested_session: str, + /, **params: Unpack["RequestedSessionExpireParams"], ) -> "RequestedSession": """ @@ -1030,6 +1035,7 @@ def _cls_expire( @staticmethod def expire( requested_session: str, + /, **params: Unpack["RequestedSessionExpireParams"], ) -> "RequestedSession": """ @@ -1068,6 +1074,7 @@ def expire( # pyright: ignore[reportGeneralTypeIssues] async def _cls_expire_async( cls, requested_session: str, + /, **params: Unpack["RequestedSessionExpireParams"], ) -> "RequestedSession": """ @@ -1088,6 +1095,7 @@ async def _cls_expire_async( @staticmethod async def expire_async( requested_session: str, + /, **params: Unpack["RequestedSessionExpireParams"], ) -> "RequestedSession": """ @@ -1126,6 +1134,7 @@ async def expire_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_list_orders( cls, requested_session: str, + /, **params: Unpack["RequestedSessionListOrdersParams"], ) -> ListObject["Order"]: """ @@ -1146,6 +1155,7 @@ def _cls_list_orders( @staticmethod def list_orders( requested_session: str, + /, **params: Unpack["RequestedSessionListOrdersParams"], ) -> ListObject["Order"]: """ @@ -1184,6 +1194,7 @@ def list_orders( # pyright: ignore[reportGeneralTypeIssues] async def _cls_list_orders_async( cls, requested_session: str, + /, **params: Unpack["RequestedSessionListOrdersParams"], ) -> ListObject["Order"]: """ @@ -1204,6 +1215,7 @@ async def _cls_list_orders_async( @staticmethod async def list_orders_async( requested_session: str, + /, **params: Unpack["RequestedSessionListOrdersParams"], ) -> ListObject["Order"]: """ diff --git a/stripe/delegated_checkout/_requested_session_order_service.py b/stripe/delegated_checkout/_requested_session_order_service.py index 1144e65e6..2e52f0e56 100644 --- a/stripe/delegated_checkout/_requested_session_order_service.py +++ b/stripe/delegated_checkout/_requested_session_order_service.py @@ -18,6 +18,7 @@ class RequestedSessionOrderService(StripeService): def list( self, requested_session: str, + /, params: Optional["RequestedSessionOrderListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[Order]": @@ -40,6 +41,7 @@ def list( async def list_async( self, requested_session: str, + /, params: Optional["RequestedSessionOrderListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[Order]": diff --git a/stripe/delegated_checkout/_requested_session_service.py b/stripe/delegated_checkout/_requested_session_service.py index cf23843d0..b9622c4f9 100644 --- a/stripe/delegated_checkout/_requested_session_service.py +++ b/stripe/delegated_checkout/_requested_session_service.py @@ -61,6 +61,7 @@ def __getattr__(self, name): def retrieve( self, requested_session: str, + /, params: Optional["RequestedSessionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RequestedSession": @@ -83,6 +84,7 @@ def retrieve( async def retrieve_async( self, requested_session: str, + /, params: Optional["RequestedSessionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RequestedSession": @@ -105,6 +107,7 @@ async def retrieve_async( def update( self, requested_session: str, + /, params: Optional["RequestedSessionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RequestedSession": @@ -127,6 +130,7 @@ def update( async def update_async( self, requested_session: str, + /, params: Optional["RequestedSessionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RequestedSession": @@ -187,6 +191,7 @@ async def create_async( def confirm( self, requested_session: str, + /, params: Optional["RequestedSessionConfirmParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RequestedSession": @@ -209,6 +214,7 @@ def confirm( async def confirm_async( self, requested_session: str, + /, params: Optional["RequestedSessionConfirmParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RequestedSession": @@ -231,6 +237,7 @@ async def confirm_async( def expire( self, requested_session: str, + /, params: Optional["RequestedSessionExpireParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RequestedSession": @@ -253,6 +260,7 @@ def expire( async def expire_async( self, requested_session: str, + /, params: Optional["RequestedSessionExpireParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RequestedSession": diff --git a/stripe/entitlements/_active_entitlement_service.py b/stripe/entitlements/_active_entitlement_service.py index db359907c..67f407459 100644 --- a/stripe/entitlements/_active_entitlement_service.py +++ b/stripe/entitlements/_active_entitlement_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["ActiveEntitlementRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ActiveEntitlement": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ActiveEntitlementRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ActiveEntitlement": diff --git a/stripe/entitlements/_feature_service.py b/stripe/entitlements/_feature_service.py index 6844a337e..dfbe7304f 100644 --- a/stripe/entitlements/_feature_service.py +++ b/stripe/entitlements/_feature_service.py @@ -103,6 +103,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["FeatureRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Feature": @@ -123,6 +124,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["FeatureRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Feature": @@ -143,6 +145,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["FeatureUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Feature": @@ -163,6 +166,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["FeatureUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Feature": diff --git a/stripe/financial_connections/_account.py b/stripe/financial_connections/_account.py index 40b2a022d..e4bb2256d 100644 --- a/stripe/financial_connections/_account.py +++ b/stripe/financial_connections/_account.py @@ -397,7 +397,7 @@ class TransactionRefresh(StripeObject): @classmethod def _cls_disconnect( - cls, account: str, **params: Unpack["AccountDisconnectParams"] + cls, account: str, /, **params: Unpack["AccountDisconnectParams"] ) -> "Account": """ Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). @@ -416,7 +416,7 @@ def _cls_disconnect( @overload @staticmethod def disconnect( - account: str, **params: Unpack["AccountDisconnectParams"] + account: str, /, **params: Unpack["AccountDisconnectParams"] ) -> "Account": """ Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). @@ -452,7 +452,7 @@ def disconnect( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_disconnect_async( - cls, account: str, **params: Unpack["AccountDisconnectParams"] + cls, account: str, /, **params: Unpack["AccountDisconnectParams"] ) -> "Account": """ Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). @@ -471,7 +471,7 @@ async def _cls_disconnect_async( @overload @staticmethod async def disconnect_async( - account: str, **params: Unpack["AccountDisconnectParams"] + account: str, /, **params: Unpack["AccountDisconnectParams"] ) -> "Account": """ Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). @@ -547,7 +547,7 @@ async def list_async( @classmethod def _cls_list_owners( - cls, account: str, **params: Unpack["AccountListOwnersParams"] + cls, account: str, /, **params: Unpack["AccountListOwnersParams"] ) -> ListObject["AccountOwner"]: """ Lists all owners for a given Account @@ -566,7 +566,7 @@ def _cls_list_owners( @overload @staticmethod def list_owners( - account: str, **params: Unpack["AccountListOwnersParams"] + account: str, /, **params: Unpack["AccountListOwnersParams"] ) -> ListObject["AccountOwner"]: """ Lists all owners for a given Account @@ -602,7 +602,7 @@ def list_owners( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_list_owners_async( - cls, account: str, **params: Unpack["AccountListOwnersParams"] + cls, account: str, /, **params: Unpack["AccountListOwnersParams"] ) -> ListObject["AccountOwner"]: """ Lists all owners for a given Account @@ -621,7 +621,7 @@ async def _cls_list_owners_async( @overload @staticmethod async def list_owners_async( - account: str, **params: Unpack["AccountListOwnersParams"] + account: str, /, **params: Unpack["AccountListOwnersParams"] ) -> ListObject["AccountOwner"]: """ Lists all owners for a given Account @@ -657,7 +657,7 @@ async def list_owners_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_refresh_account( - cls, account: str, **params: Unpack["AccountRefreshAccountParams"] + cls, account: str, /, **params: Unpack["AccountRefreshAccountParams"] ) -> "Account": """ Refreshes the data associated with a Financial Connections Account. @@ -676,7 +676,7 @@ def _cls_refresh_account( @overload @staticmethod def refresh_account( - account: str, **params: Unpack["AccountRefreshAccountParams"] + account: str, /, **params: Unpack["AccountRefreshAccountParams"] ) -> "Account": """ Refreshes the data associated with a Financial Connections Account. @@ -712,7 +712,7 @@ def refresh_account( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_refresh_account_async( - cls, account: str, **params: Unpack["AccountRefreshAccountParams"] + cls, account: str, /, **params: Unpack["AccountRefreshAccountParams"] ) -> "Account": """ Refreshes the data associated with a Financial Connections Account. @@ -731,7 +731,7 @@ async def _cls_refresh_account_async( @overload @staticmethod async def refresh_account_async( - account: str, **params: Unpack["AccountRefreshAccountParams"] + account: str, /, **params: Unpack["AccountRefreshAccountParams"] ) -> "Account": """ Refreshes the data associated with a Financial Connections Account. @@ -770,7 +770,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() @@ -781,7 +781,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() @@ -789,7 +789,7 @@ async def retrieve_async( @classmethod def _cls_subscribe( - cls, account: str, **params: Unpack["AccountSubscribeParams"] + cls, account: str, /, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day. @@ -808,7 +808,7 @@ def _cls_subscribe( @overload @staticmethod def subscribe( - account: str, **params: Unpack["AccountSubscribeParams"] + account: str, /, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day. @@ -844,7 +844,7 @@ def subscribe( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_subscribe_async( - cls, account: str, **params: Unpack["AccountSubscribeParams"] + cls, account: str, /, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day. @@ -863,7 +863,7 @@ async def _cls_subscribe_async( @overload @staticmethod async def subscribe_async( - account: str, **params: Unpack["AccountSubscribeParams"] + account: str, /, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day. @@ -899,7 +899,7 @@ async def subscribe_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_unsubscribe( - cls, account: str, **params: Unpack["AccountUnsubscribeParams"] + cls, account: str, /, **params: Unpack["AccountUnsubscribeParams"] ) -> "Account": """ Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. @@ -918,7 +918,7 @@ def _cls_unsubscribe( @overload @staticmethod def unsubscribe( - account: str, **params: Unpack["AccountUnsubscribeParams"] + account: str, /, **params: Unpack["AccountUnsubscribeParams"] ) -> "Account": """ Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. @@ -954,7 +954,7 @@ def unsubscribe( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_unsubscribe_async( - cls, account: str, **params: Unpack["AccountUnsubscribeParams"] + cls, account: str, /, **params: Unpack["AccountUnsubscribeParams"] ) -> "Account": """ Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. @@ -973,7 +973,7 @@ async def _cls_unsubscribe_async( @overload @staticmethod async def unsubscribe_async( - account: str, **params: Unpack["AccountUnsubscribeParams"] + account: str, /, **params: Unpack["AccountUnsubscribeParams"] ) -> "Account": """ Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. @@ -1011,6 +1011,7 @@ async def unsubscribe_async( # pyright: ignore[reportGeneralTypeIssues] def list_inferred_balances( cls, account: str, + /, **params: Unpack["AccountListInferredBalancesParams"], ) -> ListObject["AccountInferredBalance"]: """ @@ -1031,6 +1032,7 @@ def list_inferred_balances( async def list_inferred_balances_async( cls, account: str, + /, **params: Unpack["AccountListInferredBalancesParams"], ) -> ListObject["AccountInferredBalance"]: """ diff --git a/stripe/financial_connections/_account_inferred_balance_service.py b/stripe/financial_connections/_account_inferred_balance_service.py index bd6373889..d8243f237 100644 --- a/stripe/financial_connections/_account_inferred_balance_service.py +++ b/stripe/financial_connections/_account_inferred_balance_service.py @@ -20,6 +20,7 @@ class AccountInferredBalanceService(StripeService): def list( self, account: str, + /, params: Optional["AccountInferredBalanceListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[AccountInferredBalance]": @@ -42,6 +43,7 @@ def list( async def list_async( self, account: str, + /, params: Optional["AccountInferredBalanceListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[AccountInferredBalance]": diff --git a/stripe/financial_connections/_account_owner_service.py b/stripe/financial_connections/_account_owner_service.py index fa2851260..382799eb7 100644 --- a/stripe/financial_connections/_account_owner_service.py +++ b/stripe/financial_connections/_account_owner_service.py @@ -18,6 +18,7 @@ class AccountOwnerService(StripeService): def list( self, account: str, + /, params: "AccountOwnerListParams", options: Optional["RequestOptions"] = None, ) -> "ListObject[AccountOwner]": @@ -40,6 +41,7 @@ def list( async def list_async( self, account: str, + /, params: "AccountOwnerListParams", options: Optional["RequestOptions"] = None, ) -> "ListObject[AccountOwner]": diff --git a/stripe/financial_connections/_account_service.py b/stripe/financial_connections/_account_service.py index e0cbacdb1..baa3f80d2 100644 --- a/stripe/financial_connections/_account_service.py +++ b/stripe/financial_connections/_account_service.py @@ -111,11 +111,12 @@ async def list_async( def retrieve( self, account: str, + /, params: Optional["AccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": """ - Retrieves the details of an Financial Connections Account. + Retrieves the details of a Financial Connections Account. """ return cast( "Account", @@ -133,11 +134,12 @@ def retrieve( async def retrieve_async( self, account: str, + /, params: Optional["AccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": """ - Retrieves the details of an Financial Connections Account. + Retrieves the details of a Financial Connections Account. """ return cast( "Account", @@ -155,6 +157,7 @@ async def retrieve_async( def disconnect( self, account: str, + /, params: Optional["AccountDisconnectParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -177,6 +180,7 @@ def disconnect( async def disconnect_async( self, account: str, + /, params: Optional["AccountDisconnectParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -199,6 +203,7 @@ async def disconnect_async( def refresh( self, account: str, + /, params: "AccountRefreshParams", options: Optional["RequestOptions"] = None, ) -> "Account": @@ -221,6 +226,7 @@ def refresh( async def refresh_async( self, account: str, + /, params: "AccountRefreshParams", options: Optional["RequestOptions"] = None, ) -> "Account": @@ -243,6 +249,7 @@ async def refresh_async( def subscribe( self, account: str, + /, params: "AccountSubscribeParams", options: Optional["RequestOptions"] = None, ) -> "Account": @@ -265,6 +272,7 @@ def subscribe( async def subscribe_async( self, account: str, + /, params: "AccountSubscribeParams", options: Optional["RequestOptions"] = None, ) -> "Account": @@ -287,6 +295,7 @@ async def subscribe_async( def unsubscribe( self, account: str, + /, params: "AccountUnsubscribeParams", options: Optional["RequestOptions"] = None, ) -> "Account": @@ -309,6 +318,7 @@ def unsubscribe( async def unsubscribe_async( self, account: str, + /, params: "AccountUnsubscribeParams", options: Optional["RequestOptions"] = None, ) -> "Account": diff --git a/stripe/financial_connections/_authorization.py b/stripe/financial_connections/_authorization.py index 59c1b1111..7d5b01d2e 100644 --- a/stripe/financial_connections/_authorization.py +++ b/stripe/financial_connections/_authorization.py @@ -95,7 +95,7 @@ def retrieve( cls, id: str, **params: Unpack["AuthorizationRetrieveParams"] ) -> "Authorization": """ - Retrieves the details of an Financial Connections Authorization. + Retrieves the details of a Financial Connections Authorization. """ instance = cls(id, **params) instance.refresh() @@ -106,7 +106,7 @@ async def retrieve_async( cls, id: str, **params: Unpack["AuthorizationRetrieveParams"] ) -> "Authorization": """ - Retrieves the details of an Financial Connections Authorization. + Retrieves the details of a Financial Connections Authorization. """ instance = cls(id, **params) await instance.refresh_async() diff --git a/stripe/financial_connections/_authorization_service.py b/stripe/financial_connections/_authorization_service.py index a142e1922..2dcb3eaeb 100644 --- a/stripe/financial_connections/_authorization_service.py +++ b/stripe/financial_connections/_authorization_service.py @@ -17,11 +17,12 @@ class AuthorizationService(StripeService): def retrieve( self, authorization: str, + /, params: Optional["AuthorizationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": """ - Retrieves the details of an Financial Connections Authorization. + Retrieves the details of a Financial Connections Authorization. """ return cast( "Authorization", @@ -39,11 +40,12 @@ def retrieve( async def retrieve_async( self, authorization: str, + /, params: Optional["AuthorizationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": """ - Retrieves the details of an Financial Connections Authorization. + Retrieves the details of a Financial Connections Authorization. """ return cast( "Authorization", diff --git a/stripe/financial_connections/_institution_service.py b/stripe/financial_connections/_institution_service.py index fbc8c3054..f8c969e39 100644 --- a/stripe/financial_connections/_institution_service.py +++ b/stripe/financial_connections/_institution_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, institution: str, + /, params: Optional["InstitutionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Institution": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, institution: str, + /, params: Optional["InstitutionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Institution": diff --git a/stripe/financial_connections/_session_service.py b/stripe/financial_connections/_session_service.py index ca7477e04..d288cebaf 100644 --- a/stripe/financial_connections/_session_service.py +++ b/stripe/financial_connections/_session_service.py @@ -20,6 +20,7 @@ class SessionService(StripeService): def retrieve( self, session: str, + /, params: Optional["SessionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Session": @@ -42,6 +43,7 @@ def retrieve( async def retrieve_async( self, session: str, + /, params: Optional["SessionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Session": diff --git a/stripe/financial_connections/_transaction_service.py b/stripe/financial_connections/_transaction_service.py index bf33c3b6f..c98ba8413 100644 --- a/stripe/financial_connections/_transaction_service.py +++ b/stripe/financial_connections/_transaction_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, transaction: str, + /, params: Optional["TransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, transaction: str, + /, params: Optional["TransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": diff --git a/stripe/forwarding/_request_service.py b/stripe/forwarding/_request_service.py index b52e6a3af..a1e894a3a 100644 --- a/stripe/forwarding/_request_service.py +++ b/stripe/forwarding/_request_service.py @@ -98,6 +98,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["RequestRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Request": @@ -118,6 +119,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["RequestRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Request": diff --git a/stripe/identity/_blocklist_entry.py b/stripe/identity/_blocklist_entry.py index 599976292..70aecafb7 100644 --- a/stripe/identity/_blocklist_entry.py +++ b/stripe/identity/_blocklist_entry.py @@ -130,7 +130,7 @@ async def create_async( @classmethod def _cls_disable( - cls, id: str, **params: Unpack["BlocklistEntryDisableParams"] + cls, id: str, /, **params: Unpack["BlocklistEntryDisableParams"] ) -> "BlocklistEntry": """ Disables a BlocklistEntry object. @@ -155,7 +155,7 @@ def _cls_disable( @overload @staticmethod def disable( - id: str, **params: Unpack["BlocklistEntryDisableParams"] + id: str, /, **params: Unpack["BlocklistEntryDisableParams"] ) -> "BlocklistEntry": """ Disables a BlocklistEntry object. @@ -209,7 +209,7 @@ def disable( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_disable_async( - cls, id: str, **params: Unpack["BlocklistEntryDisableParams"] + cls, id: str, /, **params: Unpack["BlocklistEntryDisableParams"] ) -> "BlocklistEntry": """ Disables a BlocklistEntry object. @@ -234,7 +234,7 @@ async def _cls_disable_async( @overload @staticmethod async def disable_async( - id: str, **params: Unpack["BlocklistEntryDisableParams"] + id: str, /, **params: Unpack["BlocklistEntryDisableParams"] ) -> "BlocklistEntry": """ Disables a BlocklistEntry object. diff --git a/stripe/identity/_blocklist_entry_service.py b/stripe/identity/_blocklist_entry_service.py index bd78c558f..d063578b4 100644 --- a/stripe/identity/_blocklist_entry_service.py +++ b/stripe/identity/_blocklist_entry_service.py @@ -125,6 +125,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["BlocklistEntryRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BlocklistEntry": @@ -149,6 +150,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["BlocklistEntryRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BlocklistEntry": @@ -173,6 +175,7 @@ async def retrieve_async( def disable( self, id: str, + /, params: Optional["BlocklistEntryDisableParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BlocklistEntry": @@ -201,6 +204,7 @@ def disable( async def disable_async( self, id: str, + /, params: Optional["BlocklistEntryDisableParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BlocklistEntry": diff --git a/stripe/identity/_verification_report_service.py b/stripe/identity/_verification_report_service.py index 65b8b1631..6c44e40d2 100644 --- a/stripe/identity/_verification_report_service.py +++ b/stripe/identity/_verification_report_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, report: str, + /, params: Optional["VerificationReportRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "VerificationReport": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, report: str, + /, params: Optional["VerificationReportRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "VerificationReport": diff --git a/stripe/identity/_verification_session.py b/stripe/identity/_verification_session.py index 30716e2f0..3b00b06a6 100644 --- a/stripe/identity/_verification_session.py +++ b/stripe/identity/_verification_session.py @@ -366,7 +366,10 @@ class Dob(StripeObject): @classmethod def _cls_cancel( - cls, session: str, **params: Unpack["VerificationSessionCancelParams"] + cls, + session: str, + /, + **params: Unpack["VerificationSessionCancelParams"], ) -> "VerificationSession": """ A VerificationSession object can be canceled when it is in requires_input [status](https://docs.stripe.com/docs/identity/how-sessions-work). @@ -387,7 +390,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - session: str, **params: Unpack["VerificationSessionCancelParams"] + session: str, /, **params: Unpack["VerificationSessionCancelParams"] ) -> "VerificationSession": """ A VerificationSession object can be canceled when it is in requires_input [status](https://docs.stripe.com/docs/identity/how-sessions-work). @@ -429,7 +432,10 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, session: str, **params: Unpack["VerificationSessionCancelParams"] + cls, + session: str, + /, + **params: Unpack["VerificationSessionCancelParams"], ) -> "VerificationSession": """ A VerificationSession object can be canceled when it is in requires_input [status](https://docs.stripe.com/docs/identity/how-sessions-work). @@ -450,7 +456,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - session: str, **params: Unpack["VerificationSessionCancelParams"] + session: str, /, **params: Unpack["VerificationSessionCancelParams"] ) -> "VerificationSession": """ A VerificationSession object can be canceled when it is in requires_input [status](https://docs.stripe.com/docs/identity/how-sessions-work). @@ -616,7 +622,10 @@ async def modify_async( @classmethod def _cls_redact( - cls, session: str, **params: Unpack["VerificationSessionRedactParams"] + cls, + session: str, + /, + **params: Unpack["VerificationSessionRedactParams"], ) -> "VerificationSession": """ Redact a VerificationSession to remove all collected information from Stripe. This will redact @@ -653,7 +662,7 @@ def _cls_redact( @overload @staticmethod def redact( - session: str, **params: Unpack["VerificationSessionRedactParams"] + session: str, /, **params: Unpack["VerificationSessionRedactParams"] ) -> "VerificationSession": """ Redact a VerificationSession to remove all collected information from Stripe. This will redact @@ -743,7 +752,10 @@ def redact( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_redact_async( - cls, session: str, **params: Unpack["VerificationSessionRedactParams"] + cls, + session: str, + /, + **params: Unpack["VerificationSessionRedactParams"], ) -> "VerificationSession": """ Redact a VerificationSession to remove all collected information from Stripe. This will redact @@ -780,7 +792,7 @@ async def _cls_redact_async( @overload @staticmethod async def redact_async( - session: str, **params: Unpack["VerificationSessionRedactParams"] + session: str, /, **params: Unpack["VerificationSessionRedactParams"] ) -> "VerificationSession": """ Redact a VerificationSession to remove all collected information from Stripe. This will redact diff --git a/stripe/identity/_verification_session_service.py b/stripe/identity/_verification_session_service.py index 69aace00f..78c0af60d 100644 --- a/stripe/identity/_verification_session_service.py +++ b/stripe/identity/_verification_session_service.py @@ -121,6 +121,7 @@ async def create_async( def retrieve( self, session: str, + /, params: Optional["VerificationSessionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "VerificationSession": @@ -146,6 +147,7 @@ def retrieve( async def retrieve_async( self, session: str, + /, params: Optional["VerificationSessionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "VerificationSession": @@ -171,6 +173,7 @@ async def retrieve_async( def update( self, session: str, + /, params: Optional["VerificationSessionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "VerificationSession": @@ -196,6 +199,7 @@ def update( async def update_async( self, session: str, + /, params: Optional["VerificationSessionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "VerificationSession": @@ -221,6 +225,7 @@ async def update_async( def cancel( self, session: str, + /, params: Optional["VerificationSessionCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "VerificationSession": @@ -245,6 +250,7 @@ def cancel( async def cancel_async( self, session: str, + /, params: Optional["VerificationSessionCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "VerificationSession": @@ -269,6 +275,7 @@ async def cancel_async( def redact( self, session: str, + /, params: Optional["VerificationSessionRedactParams"] = None, options: Optional["RequestOptions"] = None, ) -> "VerificationSession": @@ -309,6 +316,7 @@ def redact( async def redact_async( self, session: str, + /, params: Optional["VerificationSessionRedactParams"] = None, options: Optional["RequestOptions"] = None, ) -> "VerificationSession": diff --git a/stripe/issuing/_authorization.py b/stripe/issuing/_authorization.py index 68db25fb3..456fcbaae 100644 --- a/stripe/issuing/_authorization.py +++ b/stripe/issuing/_authorization.py @@ -1313,7 +1313,7 @@ class TraceId(StripeObject): """ network_response_code: Optional[str] """ - The network-specific response code associated with Stripe's decision for this authorization request. The value is a Visa or Mastercard response code depending on the network over which the authorization was routed. + The network-specific response code associated with the authorization decision for this authorization request. The value is a Visa or Mastercard response code depending on the network over which the authorization was routed. """ network_risk_score: Optional[int] """ @@ -1990,7 +1990,10 @@ class ThreeDSecure(StripeObject): @classmethod def _cls_approve( - cls, authorization: str, **params: Unpack["AuthorizationApproveParams"] + cls, + authorization: str, + /, + **params: Unpack["AuthorizationApproveParams"], ) -> "Authorization": """ [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -2010,7 +2013,7 @@ def _cls_approve( @overload @staticmethod def approve( - authorization: str, **params: Unpack["AuthorizationApproveParams"] + authorization: str, /, **params: Unpack["AuthorizationApproveParams"] ) -> "Authorization": """ [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -2049,7 +2052,10 @@ def approve( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_approve_async( - cls, authorization: str, **params: Unpack["AuthorizationApproveParams"] + cls, + authorization: str, + /, + **params: Unpack["AuthorizationApproveParams"], ) -> "Authorization": """ [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -2069,7 +2075,7 @@ async def _cls_approve_async( @overload @staticmethod async def approve_async( - authorization: str, **params: Unpack["AuthorizationApproveParams"] + authorization: str, /, **params: Unpack["AuthorizationApproveParams"] ) -> "Authorization": """ [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -2108,7 +2114,10 @@ async def approve_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_decline( - cls, authorization: str, **params: Unpack["AuthorizationDeclineParams"] + cls, + authorization: str, + /, + **params: Unpack["AuthorizationDeclineParams"], ) -> "Authorization": """ [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -2128,7 +2137,7 @@ def _cls_decline( @overload @staticmethod def decline( - authorization: str, **params: Unpack["AuthorizationDeclineParams"] + authorization: str, /, **params: Unpack["AuthorizationDeclineParams"] ) -> "Authorization": """ [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -2167,7 +2176,10 @@ def decline( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_decline_async( - cls, authorization: str, **params: Unpack["AuthorizationDeclineParams"] + cls, + authorization: str, + /, + **params: Unpack["AuthorizationDeclineParams"], ) -> "Authorization": """ [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -2187,7 +2199,7 @@ async def _cls_decline_async( @overload @staticmethod async def decline_async( - authorization: str, **params: Unpack["AuthorizationDeclineParams"] + authorization: str, /, **params: Unpack["AuthorizationDeclineParams"] ) -> "Authorization": """ [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -2327,6 +2339,7 @@ class TestHelpers(APIResourceTestHelpers["Authorization"]): def _cls_capture( cls, authorization: str, + /, **params: Unpack["AuthorizationCaptureParams"], ) -> "Authorization": """ @@ -2346,7 +2359,9 @@ def _cls_capture( @overload @staticmethod def capture( - authorization: str, **params: Unpack["AuthorizationCaptureParams"] + authorization: str, + /, + **params: Unpack["AuthorizationCaptureParams"], ) -> "Authorization": """ Capture a test-mode authorization. @@ -2386,6 +2401,7 @@ def capture( # pyright: ignore[reportGeneralTypeIssues] async def _cls_capture_async( cls, authorization: str, + /, **params: Unpack["AuthorizationCaptureParams"], ) -> "Authorization": """ @@ -2405,7 +2421,9 @@ async def _cls_capture_async( @overload @staticmethod async def capture_async( - authorization: str, **params: Unpack["AuthorizationCaptureParams"] + authorization: str, + /, + **params: Unpack["AuthorizationCaptureParams"], ) -> "Authorization": """ Capture a test-mode authorization. @@ -2477,6 +2495,7 @@ async def create_async( def _cls_expire( cls, authorization: str, + /, **params: Unpack["AuthorizationExpireParams"], ) -> "Authorization": """ @@ -2496,7 +2515,9 @@ def _cls_expire( @overload @staticmethod def expire( - authorization: str, **params: Unpack["AuthorizationExpireParams"] + authorization: str, + /, + **params: Unpack["AuthorizationExpireParams"], ) -> "Authorization": """ Expire a test-mode Authorization. @@ -2536,6 +2557,7 @@ def expire( # pyright: ignore[reportGeneralTypeIssues] async def _cls_expire_async( cls, authorization: str, + /, **params: Unpack["AuthorizationExpireParams"], ) -> "Authorization": """ @@ -2555,7 +2577,9 @@ async def _cls_expire_async( @overload @staticmethod async def expire_async( - authorization: str, **params: Unpack["AuthorizationExpireParams"] + authorization: str, + /, + **params: Unpack["AuthorizationExpireParams"], ) -> "Authorization": """ Expire a test-mode Authorization. @@ -2595,6 +2619,7 @@ async def expire_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_finalize_amount( cls, authorization: str, + /, **params: Unpack["AuthorizationFinalizeAmountParams"], ) -> "Authorization": """ @@ -2615,6 +2640,7 @@ def _cls_finalize_amount( @staticmethod def finalize_amount( authorization: str, + /, **params: Unpack["AuthorizationFinalizeAmountParams"], ) -> "Authorization": """ @@ -2655,6 +2681,7 @@ def finalize_amount( # pyright: ignore[reportGeneralTypeIssues] async def _cls_finalize_amount_async( cls, authorization: str, + /, **params: Unpack["AuthorizationFinalizeAmountParams"], ) -> "Authorization": """ @@ -2675,6 +2702,7 @@ async def _cls_finalize_amount_async( @staticmethod async def finalize_amount_async( authorization: str, + /, **params: Unpack["AuthorizationFinalizeAmountParams"], ) -> "Authorization": """ @@ -2715,6 +2743,7 @@ async def finalize_amount_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_increment( cls, authorization: str, + /, **params: Unpack["AuthorizationIncrementParams"], ) -> "Authorization": """ @@ -2735,6 +2764,7 @@ def _cls_increment( @staticmethod def increment( authorization: str, + /, **params: Unpack["AuthorizationIncrementParams"], ) -> "Authorization": """ @@ -2775,6 +2805,7 @@ def increment( # pyright: ignore[reportGeneralTypeIssues] async def _cls_increment_async( cls, authorization: str, + /, **params: Unpack["AuthorizationIncrementParams"], ) -> "Authorization": """ @@ -2795,6 +2826,7 @@ async def _cls_increment_async( @staticmethod async def increment_async( authorization: str, + /, **params: Unpack["AuthorizationIncrementParams"], ) -> "Authorization": """ @@ -2835,6 +2867,7 @@ async def increment_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_respond( cls, authorization: str, + /, **params: Unpack["AuthorizationRespondParams"], ) -> "Authorization": """ @@ -2854,7 +2887,9 @@ def _cls_respond( @overload @staticmethod def respond( - authorization: str, **params: Unpack["AuthorizationRespondParams"] + authorization: str, + /, + **params: Unpack["AuthorizationRespondParams"], ) -> "Authorization": """ Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. @@ -2894,6 +2929,7 @@ def respond( # pyright: ignore[reportGeneralTypeIssues] async def _cls_respond_async( cls, authorization: str, + /, **params: Unpack["AuthorizationRespondParams"], ) -> "Authorization": """ @@ -2913,7 +2949,9 @@ async def _cls_respond_async( @overload @staticmethod async def respond_async( - authorization: str, **params: Unpack["AuthorizationRespondParams"] + authorization: str, + /, + **params: Unpack["AuthorizationRespondParams"], ) -> "Authorization": """ Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. @@ -2953,6 +2991,7 @@ async def respond_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_reverse( cls, authorization: str, + /, **params: Unpack["AuthorizationReverseParams"], ) -> "Authorization": """ @@ -2972,7 +3011,9 @@ def _cls_reverse( @overload @staticmethod def reverse( - authorization: str, **params: Unpack["AuthorizationReverseParams"] + authorization: str, + /, + **params: Unpack["AuthorizationReverseParams"], ) -> "Authorization": """ Reverse a test-mode Authorization. @@ -3012,6 +3053,7 @@ def reverse( # pyright: ignore[reportGeneralTypeIssues] async def _cls_reverse_async( cls, authorization: str, + /, **params: Unpack["AuthorizationReverseParams"], ) -> "Authorization": """ @@ -3031,7 +3073,9 @@ async def _cls_reverse_async( @overload @staticmethod async def reverse_async( - authorization: str, **params: Unpack["AuthorizationReverseParams"] + authorization: str, + /, + **params: Unpack["AuthorizationReverseParams"], ) -> "Authorization": """ Reverse a test-mode Authorization. diff --git a/stripe/issuing/_authorization_service.py b/stripe/issuing/_authorization_service.py index 0e2c82d56..afac45a81 100644 --- a/stripe/issuing/_authorization_service.py +++ b/stripe/issuing/_authorization_service.py @@ -68,6 +68,7 @@ async def list_async( def retrieve( self, authorization: str, + /, params: Optional["AuthorizationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -90,6 +91,7 @@ def retrieve( async def retrieve_async( self, authorization: str, + /, params: Optional["AuthorizationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -112,6 +114,7 @@ async def retrieve_async( def update( self, authorization: str, + /, params: Optional["AuthorizationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -134,6 +137,7 @@ def update( async def update_async( self, authorization: str, + /, params: Optional["AuthorizationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -156,6 +160,7 @@ async def update_async( def approve( self, authorization: str, + /, params: Optional["AuthorizationApproveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -179,6 +184,7 @@ def approve( async def approve_async( self, authorization: str, + /, params: Optional["AuthorizationApproveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -202,6 +208,7 @@ async def approve_async( def decline( self, authorization: str, + /, params: Optional["AuthorizationDeclineParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -225,6 +232,7 @@ def decline( async def decline_async( self, authorization: str, + /, params: Optional["AuthorizationDeclineParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index 33f06709c..c18d6055b 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -1555,7 +1555,7 @@ class TestHelpers(APIResourceTestHelpers["Card"]): @classmethod def _cls_deliver_card( - cls, card: str, **params: Unpack["CardDeliverCardParams"] + cls, card: str, /, **params: Unpack["CardDeliverCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to delivered. @@ -1574,7 +1574,7 @@ def _cls_deliver_card( @overload @staticmethod def deliver_card( - card: str, **params: Unpack["CardDeliverCardParams"] + card: str, /, **params: Unpack["CardDeliverCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to delivered. @@ -1610,7 +1610,7 @@ def deliver_card( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_deliver_card_async( - cls, card: str, **params: Unpack["CardDeliverCardParams"] + cls, card: str, /, **params: Unpack["CardDeliverCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to delivered. @@ -1629,7 +1629,7 @@ async def _cls_deliver_card_async( @overload @staticmethod async def deliver_card_async( - card: str, **params: Unpack["CardDeliverCardParams"] + card: str, /, **params: Unpack["CardDeliverCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to delivered. @@ -1665,7 +1665,7 @@ async def deliver_card_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_fail_card( - cls, card: str, **params: Unpack["CardFailCardParams"] + cls, card: str, /, **params: Unpack["CardFailCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to failure. @@ -1684,7 +1684,7 @@ def _cls_fail_card( @overload @staticmethod def fail_card( - card: str, **params: Unpack["CardFailCardParams"] + card: str, /, **params: Unpack["CardFailCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to failure. @@ -1718,7 +1718,7 @@ def fail_card( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_fail_card_async( - cls, card: str, **params: Unpack["CardFailCardParams"] + cls, card: str, /, **params: Unpack["CardFailCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to failure. @@ -1737,7 +1737,7 @@ async def _cls_fail_card_async( @overload @staticmethod async def fail_card_async( - card: str, **params: Unpack["CardFailCardParams"] + card: str, /, **params: Unpack["CardFailCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to failure. @@ -1773,7 +1773,7 @@ async def fail_card_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_return_card( - cls, card: str, **params: Unpack["CardReturnCardParams"] + cls, card: str, /, **params: Unpack["CardReturnCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to returned. @@ -1792,7 +1792,7 @@ def _cls_return_card( @overload @staticmethod def return_card( - card: str, **params: Unpack["CardReturnCardParams"] + card: str, /, **params: Unpack["CardReturnCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to returned. @@ -1828,7 +1828,7 @@ def return_card( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_return_card_async( - cls, card: str, **params: Unpack["CardReturnCardParams"] + cls, card: str, /, **params: Unpack["CardReturnCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to returned. @@ -1847,7 +1847,7 @@ async def _cls_return_card_async( @overload @staticmethod async def return_card_async( - card: str, **params: Unpack["CardReturnCardParams"] + card: str, /, **params: Unpack["CardReturnCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to returned. @@ -1883,7 +1883,7 @@ async def return_card_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_ship_card( - cls, card: str, **params: Unpack["CardShipCardParams"] + cls, card: str, /, **params: Unpack["CardShipCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to shipped. @@ -1902,7 +1902,7 @@ def _cls_ship_card( @overload @staticmethod def ship_card( - card: str, **params: Unpack["CardShipCardParams"] + card: str, /, **params: Unpack["CardShipCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to shipped. @@ -1936,7 +1936,7 @@ def ship_card( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_ship_card_async( - cls, card: str, **params: Unpack["CardShipCardParams"] + cls, card: str, /, **params: Unpack["CardShipCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to shipped. @@ -1955,7 +1955,7 @@ async def _cls_ship_card_async( @overload @staticmethod async def ship_card_async( - card: str, **params: Unpack["CardShipCardParams"] + card: str, /, **params: Unpack["CardShipCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to shipped. @@ -1991,7 +1991,7 @@ async def ship_card_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_submit_card( - cls, card: str, **params: Unpack["CardSubmitCardParams"] + cls, card: str, /, **params: Unpack["CardSubmitCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. @@ -2010,7 +2010,7 @@ def _cls_submit_card( @overload @staticmethod def submit_card( - card: str, **params: Unpack["CardSubmitCardParams"] + card: str, /, **params: Unpack["CardSubmitCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. @@ -2046,7 +2046,7 @@ def submit_card( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_submit_card_async( - cls, card: str, **params: Unpack["CardSubmitCardParams"] + cls, card: str, /, **params: Unpack["CardSubmitCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. @@ -2065,7 +2065,7 @@ async def _cls_submit_card_async( @overload @staticmethod async def submit_card_async( - card: str, **params: Unpack["CardSubmitCardParams"] + card: str, /, **params: Unpack["CardSubmitCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. diff --git a/stripe/issuing/_card_service.py b/stripe/issuing/_card_service.py index 215290129..e00a25512 100644 --- a/stripe/issuing/_card_service.py +++ b/stripe/issuing/_card_service.py @@ -95,6 +95,7 @@ async def create_async( def retrieve( self, card: str, + /, params: Optional["CardRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Card": @@ -115,6 +116,7 @@ def retrieve( async def retrieve_async( self, card: str, + /, params: Optional["CardRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Card": @@ -135,6 +137,7 @@ async def retrieve_async( def update( self, card: str, + /, params: Optional["CardUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Card": @@ -155,6 +158,7 @@ def update( async def update_async( self, card: str, + /, params: Optional["CardUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Card": diff --git a/stripe/issuing/_cardholder_service.py b/stripe/issuing/_cardholder_service.py index 54affd264..8e9f98933 100644 --- a/stripe/issuing/_cardholder_service.py +++ b/stripe/issuing/_cardholder_service.py @@ -103,6 +103,7 @@ async def create_async( def retrieve( self, cardholder: str, + /, params: Optional["CardholderRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Cardholder": @@ -125,6 +126,7 @@ def retrieve( async def retrieve_async( self, cardholder: str, + /, params: Optional["CardholderRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Cardholder": @@ -147,6 +149,7 @@ async def retrieve_async( def update( self, cardholder: str, + /, params: Optional["CardholderUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Cardholder": @@ -169,6 +172,7 @@ def update( async def update_async( self, cardholder: str, + /, params: Optional["CardholderUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Cardholder": diff --git a/stripe/issuing/_credit_underwriting_record.py b/stripe/issuing/_credit_underwriting_record.py index 22e848104..76ba651b6 100644 --- a/stripe/issuing/_credit_underwriting_record.py +++ b/stripe/issuing/_credit_underwriting_record.py @@ -461,6 +461,7 @@ class UnderwritingException(StripeObject): def _cls_correct( cls, credit_underwriting_record: str, + /, **params: Unpack["CreditUnderwritingRecordCorrectParams"], ) -> "CreditUnderwritingRecord": """ @@ -483,6 +484,7 @@ def _cls_correct( @staticmethod def correct( credit_underwriting_record: str, + /, **params: Unpack["CreditUnderwritingRecordCorrectParams"], ) -> "CreditUnderwritingRecord": """ @@ -523,6 +525,7 @@ def correct( # pyright: ignore[reportGeneralTypeIssues] async def _cls_correct_async( cls, credit_underwriting_record: str, + /, **params: Unpack["CreditUnderwritingRecordCorrectParams"], ) -> "CreditUnderwritingRecord": """ @@ -545,6 +548,7 @@ async def _cls_correct_async( @staticmethod async def correct_async( credit_underwriting_record: str, + /, **params: Unpack["CreditUnderwritingRecordCorrectParams"], ) -> "CreditUnderwritingRecord": """ @@ -701,6 +705,7 @@ async def list_async( def _cls_report_decision( cls, credit_underwriting_record: str, + /, **params: Unpack["CreditUnderwritingRecordReportDecisionParams"], ) -> "CreditUnderwritingRecord": """ @@ -723,6 +728,7 @@ def _cls_report_decision( @staticmethod def report_decision( credit_underwriting_record: str, + /, **params: Unpack["CreditUnderwritingRecordReportDecisionParams"], ) -> "CreditUnderwritingRecord": """ @@ -763,6 +769,7 @@ def report_decision( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_decision_async( cls, credit_underwriting_record: str, + /, **params: Unpack["CreditUnderwritingRecordReportDecisionParams"], ) -> "CreditUnderwritingRecord": """ @@ -785,6 +792,7 @@ async def _cls_report_decision_async( @staticmethod async def report_decision_async( credit_underwriting_record: str, + /, **params: Unpack["CreditUnderwritingRecordReportDecisionParams"], ) -> "CreditUnderwritingRecord": """ @@ -825,6 +833,7 @@ async def report_decision_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_report_offer_acceptance( cls, credit_underwriting_record: str, + /, **params: Unpack[ "CreditUnderwritingRecordReportOfferAcceptanceParams" ], @@ -849,6 +858,7 @@ def _cls_report_offer_acceptance( @staticmethod def report_offer_acceptance( credit_underwriting_record: str, + /, **params: Unpack[ "CreditUnderwritingRecordReportOfferAcceptanceParams" ], @@ -897,6 +907,7 @@ def report_offer_acceptance( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_offer_acceptance_async( cls, credit_underwriting_record: str, + /, **params: Unpack[ "CreditUnderwritingRecordReportOfferAcceptanceParams" ], @@ -921,6 +932,7 @@ async def _cls_report_offer_acceptance_async( @staticmethod async def report_offer_acceptance_async( credit_underwriting_record: str, + /, **params: Unpack[ "CreditUnderwritingRecordReportOfferAcceptanceParams" ], diff --git a/stripe/issuing/_credit_underwriting_record_service.py b/stripe/issuing/_credit_underwriting_record_service.py index 099b8b62e..af4981791 100644 --- a/stripe/issuing/_credit_underwriting_record_service.py +++ b/stripe/issuing/_credit_underwriting_record_service.py @@ -76,6 +76,7 @@ async def list_async( def retrieve( self, credit_underwriting_record: str, + /, params: Optional["CreditUnderwritingRecordRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditUnderwritingRecord": @@ -100,6 +101,7 @@ def retrieve( async def retrieve_async( self, credit_underwriting_record: str, + /, params: Optional["CreditUnderwritingRecordRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditUnderwritingRecord": @@ -124,6 +126,7 @@ async def retrieve_async( def correct( self, credit_underwriting_record: str, + /, params: Optional["CreditUnderwritingRecordCorrectParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditUnderwritingRecord": @@ -148,6 +151,7 @@ def correct( async def correct_async( self, credit_underwriting_record: str, + /, params: Optional["CreditUnderwritingRecordCorrectParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditUnderwritingRecord": @@ -172,6 +176,7 @@ async def correct_async( def report_decision( self, credit_underwriting_record: str, + /, params: "CreditUnderwritingRecordReportDecisionParams", options: Optional["RequestOptions"] = None, ) -> "CreditUnderwritingRecord": @@ -196,6 +201,7 @@ def report_decision( async def report_decision_async( self, credit_underwriting_record: str, + /, params: "CreditUnderwritingRecordReportDecisionParams", options: Optional["RequestOptions"] = None, ) -> "CreditUnderwritingRecord": @@ -220,6 +226,7 @@ async def report_decision_async( def report_offer_acceptance( self, credit_underwriting_record: str, + /, params: Optional[ "CreditUnderwritingRecordReportOfferAcceptanceParams" ] = None, @@ -246,6 +253,7 @@ def report_offer_acceptance( async def report_offer_acceptance_async( self, credit_underwriting_record: str, + /, params: Optional[ "CreditUnderwritingRecordReportOfferAcceptanceParams" ] = None, diff --git a/stripe/issuing/_dispute.py b/stripe/issuing/_dispute.py index 1e5f6e646..45651b52f 100644 --- a/stripe/issuing/_dispute.py +++ b/stripe/issuing/_dispute.py @@ -735,7 +735,7 @@ async def retrieve_async( @classmethod def _cls_submit( - cls, dispute: str, **params: Unpack["DisputeSubmitParams"] + cls, dispute: str, /, **params: Unpack["DisputeSubmitParams"] ) -> "Dispute": """ Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). @@ -754,7 +754,7 @@ def _cls_submit( @overload @staticmethod def submit( - dispute: str, **params: Unpack["DisputeSubmitParams"] + dispute: str, /, **params: Unpack["DisputeSubmitParams"] ) -> "Dispute": """ Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). @@ -788,7 +788,7 @@ def submit( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_submit_async( - cls, dispute: str, **params: Unpack["DisputeSubmitParams"] + cls, dispute: str, /, **params: Unpack["DisputeSubmitParams"] ) -> "Dispute": """ Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). @@ -807,7 +807,7 @@ async def _cls_submit_async( @overload @staticmethod async def submit_async( - dispute: str, **params: Unpack["DisputeSubmitParams"] + dispute: str, /, **params: Unpack["DisputeSubmitParams"] ) -> "Dispute": """ Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). @@ -846,7 +846,7 @@ class TestHelpers(APIResourceTestHelpers["Dispute"]): @classmethod def _cls_close( - cls, dispute: str, **params: Unpack["DisputeCloseParams"] + cls, dispute: str, /, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Test helper: closes a test-mode Issuing dispute as won or lost. @@ -865,7 +865,7 @@ def _cls_close( @overload @staticmethod def close( - dispute: str, **params: Unpack["DisputeCloseParams"] + dispute: str, /, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Test helper: closes a test-mode Issuing dispute as won or lost. @@ -899,7 +899,7 @@ def close( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_close_async( - cls, dispute: str, **params: Unpack["DisputeCloseParams"] + cls, dispute: str, /, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Test helper: closes a test-mode Issuing dispute as won or lost. @@ -918,7 +918,7 @@ async def _cls_close_async( @overload @staticmethod async def close_async( - dispute: str, **params: Unpack["DisputeCloseParams"] + dispute: str, /, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Test helper: closes a test-mode Issuing dispute as won or lost. @@ -956,6 +956,7 @@ async def close_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_provisional_credit( cls, dispute: str, + /, **params: Unpack["DisputeProvisionalCreditParams"], ) -> "Dispute": """ @@ -975,7 +976,7 @@ def _cls_provisional_credit( @overload @staticmethod def provisional_credit( - dispute: str, **params: Unpack["DisputeProvisionalCreditParams"] + dispute: str, /, **params: Unpack["DisputeProvisionalCreditParams"] ) -> "Dispute": """ Test helper: overrides the grant_deadline and revocable_after timestamps on a test-mode Issuing dispute's provisional credit, allowing tests to simulate timer-driven status transitions without waiting for real regulatory deadlines to pass. @@ -1013,6 +1014,7 @@ def provisional_credit( # pyright: ignore[reportGeneralTypeIssues] async def _cls_provisional_credit_async( cls, dispute: str, + /, **params: Unpack["DisputeProvisionalCreditParams"], ) -> "Dispute": """ @@ -1032,7 +1034,7 @@ async def _cls_provisional_credit_async( @overload @staticmethod async def provisional_credit_async( - dispute: str, **params: Unpack["DisputeProvisionalCreditParams"] + dispute: str, /, **params: Unpack["DisputeProvisionalCreditParams"] ) -> "Dispute": """ Test helper: overrides the grant_deadline and revocable_after timestamps on a test-mode Issuing dispute's provisional credit, allowing tests to simulate timer-driven status transitions without waiting for real regulatory deadlines to pass. @@ -1070,6 +1072,7 @@ async def provisional_credit_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_simulate_network_lifecycle_dispute_response( cls, dispute: str, + /, **params: Unpack[ "DisputeSimulateNetworkLifecycleDisputeResponseParams" ], @@ -1092,6 +1095,7 @@ def _cls_simulate_network_lifecycle_dispute_response( @staticmethod def simulate_network_lifecycle_dispute_response( dispute: str, + /, **params: Unpack[ "DisputeSimulateNetworkLifecycleDisputeResponseParams" ], @@ -1140,6 +1144,7 @@ def simulate_network_lifecycle_dispute_response( # pyright: ignore[reportGenera async def _cls_simulate_network_lifecycle_dispute_response_async( cls, dispute: str, + /, **params: Unpack[ "DisputeSimulateNetworkLifecycleDisputeResponseParams" ], @@ -1162,6 +1167,7 @@ async def _cls_simulate_network_lifecycle_dispute_response_async( @staticmethod async def simulate_network_lifecycle_dispute_response_async( dispute: str, + /, **params: Unpack[ "DisputeSimulateNetworkLifecycleDisputeResponseParams" ], @@ -1210,6 +1216,7 @@ async def simulate_network_lifecycle_dispute_response_async( # pyright: ignore[ def _cls_simulate_network_lifecycle_pre_arbitration_response( cls, dispute: str, + /, **params: Unpack[ "DisputeSimulateNetworkLifecyclePreArbitrationResponseParams" ], @@ -1232,6 +1239,7 @@ def _cls_simulate_network_lifecycle_pre_arbitration_response( @staticmethod def simulate_network_lifecycle_pre_arbitration_response( dispute: str, + /, **params: Unpack[ "DisputeSimulateNetworkLifecyclePreArbitrationResponseParams" ], @@ -1280,6 +1288,7 @@ def simulate_network_lifecycle_pre_arbitration_response( # pyright: ignore[repo async def _cls_simulate_network_lifecycle_pre_arbitration_response_async( cls, dispute: str, + /, **params: Unpack[ "DisputeSimulateNetworkLifecyclePreArbitrationResponseParams" ], @@ -1302,6 +1311,7 @@ async def _cls_simulate_network_lifecycle_pre_arbitration_response_async( @staticmethod async def simulate_network_lifecycle_pre_arbitration_response_async( dispute: str, + /, **params: Unpack[ "DisputeSimulateNetworkLifecyclePreArbitrationResponseParams" ], @@ -1350,6 +1360,7 @@ async def simulate_network_lifecycle_pre_arbitration_response_async( # pyright: def _cls_simulate_network_lifecycle_pre_arbitration_submission( cls, dispute: str, + /, **params: Unpack[ "DisputeSimulateNetworkLifecyclePreArbitrationSubmissionParams" ], @@ -1372,6 +1383,7 @@ def _cls_simulate_network_lifecycle_pre_arbitration_submission( @staticmethod def simulate_network_lifecycle_pre_arbitration_submission( dispute: str, + /, **params: Unpack[ "DisputeSimulateNetworkLifecyclePreArbitrationSubmissionParams" ], @@ -1420,6 +1432,7 @@ def simulate_network_lifecycle_pre_arbitration_submission( # pyright: ignore[re async def _cls_simulate_network_lifecycle_pre_arbitration_submission_async( cls, dispute: str, + /, **params: Unpack[ "DisputeSimulateNetworkLifecyclePreArbitrationSubmissionParams" ], @@ -1442,6 +1455,7 @@ async def _cls_simulate_network_lifecycle_pre_arbitration_submission_async( @staticmethod async def simulate_network_lifecycle_pre_arbitration_submission_async( dispute: str, + /, **params: Unpack[ "DisputeSimulateNetworkLifecyclePreArbitrationSubmissionParams" ], diff --git a/stripe/issuing/_dispute_service.py b/stripe/issuing/_dispute_service.py index 2631bd197..498cd7415 100644 --- a/stripe/issuing/_dispute_service.py +++ b/stripe/issuing/_dispute_service.py @@ -104,6 +104,7 @@ async def create_async( def retrieve( self, dispute: str, + /, params: Optional["DisputeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -126,6 +127,7 @@ def retrieve( async def retrieve_async( self, dispute: str, + /, params: Optional["DisputeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -148,6 +150,7 @@ async def retrieve_async( def update( self, dispute: str, + /, params: Optional["DisputeUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -170,6 +173,7 @@ def update( async def update_async( self, dispute: str, + /, params: Optional["DisputeUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -192,6 +196,7 @@ async def update_async( def submit( self, dispute: str, + /, params: Optional["DisputeSubmitParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -214,6 +219,7 @@ def submit( async def submit_async( self, dispute: str, + /, params: Optional["DisputeSubmitParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Dispute": diff --git a/stripe/issuing/_dispute_settlement_detail_service.py b/stripe/issuing/_dispute_settlement_detail_service.py index 792a52fed..afff6aa44 100644 --- a/stripe/issuing/_dispute_settlement_detail_service.py +++ b/stripe/issuing/_dispute_settlement_detail_service.py @@ -61,6 +61,7 @@ async def list_async( def retrieve( self, dispute_settlement_detail: str, + /, params: Optional["DisputeSettlementDetailRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DisputeSettlementDetail": @@ -85,6 +86,7 @@ def retrieve( async def retrieve_async( self, dispute_settlement_detail: str, + /, params: Optional["DisputeSettlementDetailRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DisputeSettlementDetail": diff --git a/stripe/issuing/_fraud_liability_debit_service.py b/stripe/issuing/_fraud_liability_debit_service.py index 542c492fd..81eb44168 100644 --- a/stripe/issuing/_fraud_liability_debit_service.py +++ b/stripe/issuing/_fraud_liability_debit_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, fraud_liability_debit: str, + /, params: Optional["FraudLiabilityDebitRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FraudLiabilityDebit": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, fraud_liability_debit: str, + /, params: Optional["FraudLiabilityDebitRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FraudLiabilityDebit": diff --git a/stripe/issuing/_personalization_design.py b/stripe/issuing/_personalization_design.py index cc45c428a..1b82b1246 100644 --- a/stripe/issuing/_personalization_design.py +++ b/stripe/issuing/_personalization_design.py @@ -301,6 +301,7 @@ class TestHelpers(APIResourceTestHelpers["PersonalizationDesign"]): def _cls_activate( cls, personalization_design: str, + /, **params: Unpack["PersonalizationDesignActivateParams"], ) -> "PersonalizationDesign": """ @@ -323,6 +324,7 @@ def _cls_activate( @staticmethod def activate( personalization_design: str, + /, **params: Unpack["PersonalizationDesignActivateParams"], ) -> "PersonalizationDesign": """ @@ -363,6 +365,7 @@ def activate( # pyright: ignore[reportGeneralTypeIssues] async def _cls_activate_async( cls, personalization_design: str, + /, **params: Unpack["PersonalizationDesignActivateParams"], ) -> "PersonalizationDesign": """ @@ -385,6 +388,7 @@ async def _cls_activate_async( @staticmethod async def activate_async( personalization_design: str, + /, **params: Unpack["PersonalizationDesignActivateParams"], ) -> "PersonalizationDesign": """ @@ -425,6 +429,7 @@ async def activate_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_deactivate( cls, personalization_design: str, + /, **params: Unpack["PersonalizationDesignDeactivateParams"], ) -> "PersonalizationDesign": """ @@ -447,6 +452,7 @@ def _cls_deactivate( @staticmethod def deactivate( personalization_design: str, + /, **params: Unpack["PersonalizationDesignDeactivateParams"], ) -> "PersonalizationDesign": """ @@ -487,6 +493,7 @@ def deactivate( # pyright: ignore[reportGeneralTypeIssues] async def _cls_deactivate_async( cls, personalization_design: str, + /, **params: Unpack["PersonalizationDesignDeactivateParams"], ) -> "PersonalizationDesign": """ @@ -509,6 +516,7 @@ async def _cls_deactivate_async( @staticmethod async def deactivate_async( personalization_design: str, + /, **params: Unpack["PersonalizationDesignDeactivateParams"], ) -> "PersonalizationDesign": """ @@ -549,6 +557,7 @@ async def deactivate_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_reject( cls, personalization_design: str, + /, **params: Unpack["PersonalizationDesignRejectParams"], ) -> "PersonalizationDesign": """ @@ -571,6 +580,7 @@ def _cls_reject( @staticmethod def reject( personalization_design: str, + /, **params: Unpack["PersonalizationDesignRejectParams"], ) -> "PersonalizationDesign": """ @@ -611,6 +621,7 @@ def reject( # pyright: ignore[reportGeneralTypeIssues] async def _cls_reject_async( cls, personalization_design: str, + /, **params: Unpack["PersonalizationDesignRejectParams"], ) -> "PersonalizationDesign": """ @@ -633,6 +644,7 @@ async def _cls_reject_async( @staticmethod async def reject_async( personalization_design: str, + /, **params: Unpack["PersonalizationDesignRejectParams"], ) -> "PersonalizationDesign": """ diff --git a/stripe/issuing/_personalization_design_service.py b/stripe/issuing/_personalization_design_service.py index 0738bf406..285b11c59 100644 --- a/stripe/issuing/_personalization_design_service.py +++ b/stripe/issuing/_personalization_design_service.py @@ -103,6 +103,7 @@ async def create_async( def retrieve( self, personalization_design: str, + /, params: Optional["PersonalizationDesignRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PersonalizationDesign": @@ -125,6 +126,7 @@ def retrieve( async def retrieve_async( self, personalization_design: str, + /, params: Optional["PersonalizationDesignRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PersonalizationDesign": @@ -147,6 +149,7 @@ async def retrieve_async( def update( self, personalization_design: str, + /, params: Optional["PersonalizationDesignUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PersonalizationDesign": @@ -169,6 +172,7 @@ def update( async def update_async( self, personalization_design: str, + /, params: Optional["PersonalizationDesignUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PersonalizationDesign": diff --git a/stripe/issuing/_physical_bundle_service.py b/stripe/issuing/_physical_bundle_service.py index d3cba2006..3b338da3e 100644 --- a/stripe/issuing/_physical_bundle_service.py +++ b/stripe/issuing/_physical_bundle_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, physical_bundle: str, + /, params: Optional["PhysicalBundleRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PhysicalBundle": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, physical_bundle: str, + /, params: Optional["PhysicalBundleRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PhysicalBundle": diff --git a/stripe/issuing/_program_service.py b/stripe/issuing/_program_service.py index 5915afb65..4a2a844de 100644 --- a/stripe/issuing/_program_service.py +++ b/stripe/issuing/_program_service.py @@ -101,6 +101,7 @@ async def create_async( def retrieve( self, program: str, + /, params: Optional["ProgramRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Program": @@ -123,6 +124,7 @@ def retrieve( async def retrieve_async( self, program: str, + /, params: Optional["ProgramRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Program": @@ -145,6 +147,7 @@ async def retrieve_async( def update( self, program: str, + /, params: Optional["ProgramUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Program": @@ -167,6 +170,7 @@ def update( async def update_async( self, program: str, + /, params: Optional["ProgramUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Program": diff --git a/stripe/issuing/_token_service.py b/stripe/issuing/_token_service.py index 8146af5c3..d78a54920 100644 --- a/stripe/issuing/_token_service.py +++ b/stripe/issuing/_token_service.py @@ -58,6 +58,7 @@ async def list_async( def retrieve( self, token: str, + /, params: Optional["TokenRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Token": @@ -78,6 +79,7 @@ def retrieve( async def retrieve_async( self, token: str, + /, params: Optional["TokenRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Token": @@ -98,6 +100,7 @@ async def retrieve_async( def update( self, token: str, + /, params: "TokenUpdateParams", options: Optional["RequestOptions"] = None, ) -> "Token": @@ -118,6 +121,7 @@ def update( async def update_async( self, token: str, + /, params: "TokenUpdateParams", options: Optional["RequestOptions"] = None, ) -> "Token": diff --git a/stripe/issuing/_transaction.py b/stripe/issuing/_transaction.py index 2971ce0ec..7cfd70b74 100644 --- a/stripe/issuing/_transaction.py +++ b/stripe/issuing/_transaction.py @@ -855,7 +855,10 @@ async def create_unlinked_refund_async( @classmethod def _cls_refund( - cls, transaction: str, **params: Unpack["TransactionRefundParams"] + cls, + transaction: str, + /, + **params: Unpack["TransactionRefundParams"], ) -> "Transaction": """ Refund a test-mode Transaction. @@ -874,7 +877,7 @@ def _cls_refund( @overload @staticmethod def refund( - transaction: str, **params: Unpack["TransactionRefundParams"] + transaction: str, /, **params: Unpack["TransactionRefundParams"] ) -> "Transaction": """ Refund a test-mode Transaction. @@ -910,7 +913,10 @@ def refund( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_refund_async( - cls, transaction: str, **params: Unpack["TransactionRefundParams"] + cls, + transaction: str, + /, + **params: Unpack["TransactionRefundParams"], ) -> "Transaction": """ Refund a test-mode Transaction. @@ -929,7 +935,7 @@ async def _cls_refund_async( @overload @staticmethod async def refund_async( - transaction: str, **params: Unpack["TransactionRefundParams"] + transaction: str, /, **params: Unpack["TransactionRefundParams"] ) -> "Transaction": """ Refund a test-mode Transaction. diff --git a/stripe/issuing/_transaction_service.py b/stripe/issuing/_transaction_service.py index 8c888266c..33e35d5a6 100644 --- a/stripe/issuing/_transaction_service.py +++ b/stripe/issuing/_transaction_service.py @@ -62,6 +62,7 @@ async def list_async( def retrieve( self, transaction: str, + /, params: Optional["TransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": @@ -84,6 +85,7 @@ def retrieve( async def retrieve_async( self, transaction: str, + /, params: Optional["TransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": @@ -106,6 +108,7 @@ async def retrieve_async( def update( self, transaction: str, + /, params: Optional["TransactionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": @@ -128,6 +131,7 @@ def update( async def update_async( self, transaction: str, + /, params: Optional["TransactionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": diff --git a/stripe/orchestration/_payment_attempt_service.py b/stripe/orchestration/_payment_attempt_service.py index 7c054f4b4..681e056ff 100644 --- a/stripe/orchestration/_payment_attempt_service.py +++ b/stripe/orchestration/_payment_attempt_service.py @@ -17,6 +17,7 @@ class PaymentAttemptService(StripeService): def retrieve( self, payment_attempt_record: str, + /, params: Optional["PaymentAttemptRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentAttempt": @@ -39,6 +40,7 @@ def retrieve( async def retrieve_async( self, payment_attempt_record: str, + /, params: Optional["PaymentAttemptRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentAttempt": diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index 0515bfc87..80a8999f7 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -1585,6 +1585,7 @@ InvoiceCreateParamsPaymentSettingsPaymentMethodOptions as InvoiceCreateParamsPaymentSettingsPaymentMethodOptions, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, + InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBacsDebit as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBacsDebit, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBancontact as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBancontact, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillie as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillie, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, @@ -1849,6 +1850,7 @@ InvoiceModifyParamsPaymentSettingsPaymentMethodOptions as InvoiceModifyParamsPaymentSettingsPaymentMethodOptions, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, + InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBacsDebit as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBacsDebit, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBancontact as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBancontact, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillie as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillie, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, @@ -1951,6 +1953,7 @@ InvoiceUpdateParamsPaymentSettingsPaymentMethodOptions as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptions, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, + InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBacsDebit as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBacsDebit, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillie as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillie, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, @@ -4714,6 +4717,8 @@ ) from stripe.params._payout_create_params import ( PayoutCreateParams as PayoutCreateParams, + PayoutCreateParamsPayoutMethodOptions as PayoutCreateParamsPayoutMethodOptions, + PayoutCreateParamsPayoutMethodOptionsFinancialAccount as PayoutCreateParamsPayoutMethodOptionsFinancialAccount, ) from stripe.params._payout_list_params import ( PayoutListParams as PayoutListParams, @@ -5849,6 +5854,7 @@ SubscriptionCreateParamsPaymentSettingsPaymentMethodOptions as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptions, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, + SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBacsDebit as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBacsDebit, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBancontact as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBancontact, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillie as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillie, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, @@ -5989,6 +5995,7 @@ SubscriptionModifyParamsPaymentSettingsPaymentMethodOptions as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptions, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, + SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBacsDebit as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBacsDebit, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillie as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillie, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, @@ -6343,6 +6350,7 @@ SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptions as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptions, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, + SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBacsDebit as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBacsDebit, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillie as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillie, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, @@ -11064,6 +11072,10 @@ "stripe.params._invoice_create_params", False, ), + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBacsDebit": ( + "stripe.params._invoice_create_params", + False, + ), "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBancontact": ( "stripe.params._invoice_create_params", False, @@ -11977,6 +11989,10 @@ "stripe.params._invoice_modify_params", False, ), + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBacsDebit": ( + "stripe.params._invoice_modify_params", + False, + ), "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBancontact": ( "stripe.params._invoice_modify_params", False, @@ -12269,6 +12285,10 @@ "stripe.params._invoice_update_params", False, ), + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBacsDebit": ( + "stripe.params._invoice_update_params", + False, + ), "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact": ( "stripe.params._invoice_update_params", False, @@ -22473,6 +22493,14 @@ ), "PayoutCancelParams": ("stripe.params._payout_cancel_params", False), "PayoutCreateParams": ("stripe.params._payout_create_params", False), + "PayoutCreateParamsPayoutMethodOptions": ( + "stripe.params._payout_create_params", + False, + ), + "PayoutCreateParamsPayoutMethodOptionsFinancialAccount": ( + "stripe.params._payout_create_params", + False, + ), "PayoutListParams": ("stripe.params._payout_list_params", False), "PayoutListParamsArrivalDate": ( "stripe.params._payout_list_params", @@ -26028,6 +26056,10 @@ "stripe.params._subscription_create_params", False, ), + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBacsDebit": ( + "stripe.params._subscription_create_params", + False, + ), "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBancontact": ( "stripe.params._subscription_create_params", False, @@ -26508,6 +26540,10 @@ "stripe.params._subscription_modify_params", False, ), + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBacsDebit": ( + "stripe.params._subscription_modify_params", + False, + ), "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact": ( "stripe.params._subscription_modify_params", False, @@ -27820,6 +27856,10 @@ "stripe.params._subscription_update_params", False, ), + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBacsDebit": ( + "stripe.params._subscription_update_params", + False, + ), "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact": ( "stripe.params._subscription_update_params", False, diff --git a/stripe/params/_confirmation_token_create_params.py b/stripe/params/_confirmation_token_create_params.py index d281929f9..03230540e 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" diff --git a/stripe/params/_invoice_create_params.py b/stripe/params/_invoice_create_params.py index 9c1e8fcf6..89138fc42 100644 --- a/stripe/params/_invoice_create_params.py +++ b/stripe/params/_invoice_create_params.py @@ -137,7 +137,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"] """ @@ -313,6 +313,12 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. """ + bacs_debit: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBacsDebit" + ] + """ + If paying by `bacs_debit`, this sub-hash contains details about the Bacs Direct Debit payment method options to pass to the invoice's PaymentIntent. + """ bancontact: NotRequired[ "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBancontact" ] @@ -431,6 +437,18 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOpti """ +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBacsDebit( + TypedDict, +): + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + "Literal['automatic', 'payer_name_verification']|str" + ] + + class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, ): diff --git a/stripe/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index 89d1de889..1d202c338 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -58,6 +58,10 @@ class InvoiceCreatePreviewParams(RequestOptions): """ Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. """ + pricing_token: NotRequired[str] + """ + A pricing token whose presentment currency and exchange rate are used to convert the amounts on the previewed invoice into the customer-facing presentment currency. When omitted, amounts are returned in the settlement currency. + """ schedule: NotRequired[str] """ The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. @@ -2700,13 +2704,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] """ diff --git a/stripe/params/_invoice_modify_params.py b/stripe/params/_invoice_modify_params.py index 06189d2aa..ef27b82df 100644 --- a/stripe/params/_invoice_modify_params.py +++ b/stripe/params/_invoice_modify_params.py @@ -111,7 +111,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"] """ @@ -267,6 +267,12 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. """ + bacs_debit: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBacsDebit" + ] + """ + If paying by `bacs_debit`, this sub-hash contains details about the Bacs Direct Debit payment method options to pass to the invoice's PaymentIntent. + """ bancontact: NotRequired[ "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBancontact" ] @@ -385,6 +391,18 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOpti """ +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBacsDebit( + TypedDict, +): + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + "Literal['automatic', 'payer_name_verification']|str" + ] + + class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, ): diff --git a/stripe/params/_invoice_update_params.py b/stripe/params/_invoice_update_params.py index 3c256ac78..967aca75c 100644 --- a/stripe/params/_invoice_update_params.py +++ b/stripe/params/_invoice_update_params.py @@ -110,7 +110,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"] """ @@ -266,6 +266,12 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. """ + bacs_debit: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBacsDebit" + ] + """ + If paying by `bacs_debit`, this sub-hash contains details about the Bacs Direct Debit payment method options to pass to the invoice's PaymentIntent. + """ bancontact: NotRequired[ "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact" ] @@ -384,6 +390,18 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOpti """ +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBacsDebit( + TypedDict, +): + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + "Literal['automatic', 'payer_name_verification']|str" + ] + + class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, ): diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index 667e9a175..3f449aff8 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -2828,13 +2828,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" @@ -4340,7 +4340,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: NotRequired[ - Literal["automatic", "payer_name_verification"] + "Literal['automatic', 'payer_name_verification']|str" ] diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index 9d7b2a6e5..eedbdfc74 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -2970,13 +2970,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" @@ -4474,7 +4474,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsBacsDebit(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: NotRequired[ - Literal["automatic", "payer_name_verification"] + "Literal['automatic', 'payer_name_verification']|str" ] diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index 438951e0a..029d3bb2f 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -2813,13 +2813,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" @@ -4317,7 +4317,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: NotRequired[ - Literal["automatic", "payer_name_verification"] + "Literal['automatic', 'payer_name_verification']|str" ] diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index 1214e4040..1302b7955 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -2812,13 +2812,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" @@ -4316,7 +4316,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: NotRequired[ - Literal["automatic", "payer_name_verification"] + "Literal['automatic', 'payer_name_verification']|str" ] diff --git a/stripe/params/_payment_link_create_params.py b/stripe/params/_payment_link_create_params.py index bf4bf1410..d5546edf0 100644 --- a/stripe/params/_payment_link_create_params.py +++ b/stripe/params/_payment_link_create_params.py @@ -381,7 +381,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"] """ diff --git a/stripe/params/_payment_link_modify_params.py b/stripe/params/_payment_link_modify_params.py index a13a678f3..a790809ef 100644 --- a/stripe/params/_payment_link_modify_params.py +++ b/stripe/params/_payment_link_modify_params.py @@ -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"] """ diff --git a/stripe/params/_payment_link_update_params.py b/stripe/params/_payment_link_update_params.py index b893876c7..7dc172abb 100644 --- a/stripe/params/_payment_link_update_params.py +++ b/stripe/params/_payment_link_update_params.py @@ -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"] """ diff --git a/stripe/params/_payment_method_create_params.py b/stripe/params/_payment_method_create_params.py index 58a622ae8..78b4eacfc 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"] """ diff --git a/stripe/params/_payout_create_params.py b/stripe/params/_payout_create_params.py index bf98c6d19..2f832eef8 100644 --- a/stripe/params/_payout_create_params.py +++ b/stripe/params/_payout_create_params.py @@ -3,13 +3,13 @@ from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject from typing import Dict, List -from typing_extensions import Literal, NotRequired +from typing_extensions import Literal, NotRequired, TypedDict 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 """ @@ -39,6 +39,10 @@ class PayoutCreateParams(RequestOptions): """ The ID of a v2 FinancialAccount to send funds to. """ + payout_method_options: NotRequired["PayoutCreateParamsPayoutMethodOptions"] + """ + Additional options that complement the payout_method. The keys in this dictionary identify the type of payout method the options apply to. + """ source_type: NotRequired["Literal['bank_account', 'card', 'fpx']|str"] """ The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`. @@ -47,3 +51,19 @@ class PayoutCreateParams(RequestOptions): """ A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. For US ACH payouts, this maps to the ACH Company Entry Description field, which the NACHA standard limits to 10 characters. Stripe truncates descriptors longer than 10 characters for US ACH payouts. """ + + +class PayoutCreateParamsPayoutMethodOptions(TypedDict): + financial_account: NotRequired[ + "PayoutCreateParamsPayoutMethodOptionsFinancialAccount" + ] + """ + Additional options for a Financial Account payout method. Only valid when payout_method is a Financial Account ID. + """ + + +class PayoutCreateParamsPayoutMethodOptionsFinancialAccount(TypedDict): + destination_currency: NotRequired[str] + """ + Identifies the currency to credit in the destination Financial Account. Must be a currency supported by the target Financial Account. When omitted, the payout uses the currency parameter. + """ diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py index 5f4cced14..eaedba539 100644 --- a/stripe/params/_setup_intent_confirm_params.py +++ b/stripe/params/_setup_intent_confirm_params.py @@ -238,13 +238,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" @@ -1271,7 +1271,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): Additional fields for Mandate creation """ verification_method: NotRequired[ - Literal["automatic", "payer_name_verification"] + "Literal['automatic', 'payer_name_verification']|str" ] diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index e37ee93e5..51011c5d4 100644 --- a/stripe/params/_setup_intent_create_params.py +++ b/stripe/params/_setup_intent_create_params.py @@ -386,13 +386,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" @@ -1411,7 +1411,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsBacsDebit(TypedDict): Additional fields for Mandate creation """ verification_method: NotRequired[ - Literal["automatic", "payer_name_verification"] + "Literal['automatic', 'payer_name_verification']|str" ] diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index bd55b2dcf..59b52a8e6 100644 --- a/stripe/params/_setup_intent_modify_params.py +++ b/stripe/params/_setup_intent_modify_params.py @@ -115,13 +115,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" @@ -1140,7 +1140,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): Additional fields for Mandate creation """ verification_method: NotRequired[ - Literal["automatic", "payer_name_verification"] + "Literal['automatic', 'payer_name_verification']|str" ] diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index 4c3176676..071fbefdf 100644 --- a/stripe/params/_setup_intent_update_params.py +++ b/stripe/params/_setup_intent_update_params.py @@ -114,13 +114,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" @@ -1139,7 +1139,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): Additional fields for Mandate creation """ verification_method: NotRequired[ - Literal["automatic", "payer_name_verification"] + "Literal['automatic', 'payer_name_verification']|str" ] diff --git a/stripe/params/_subscription_create_params.py b/stripe/params/_subscription_create_params.py index 25e6a075c..4fa286408 100644 --- a/stripe/params/_subscription_create_params.py +++ b/stripe/params/_subscription_create_params.py @@ -869,6 +869,12 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. """ + bacs_debit: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBacsDebit" + ] + """ + This sub-hash contains details about the Bacs Direct Debit payment method options to pass to the invoice's PaymentIntent. + """ bancontact: NotRequired[ "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBancontact" ] @@ -987,6 +993,18 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandat """ +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBacsDebit( + TypedDict, +): + debit_behavior: NotRequired[str] + """ + Controls when the funds will be captured from the customer's account. + """ + verification_method: NotRequired[ + "Literal['automatic', 'payer_name_verification']|str" + ] + + class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, ): diff --git a/stripe/params/_subscription_item_modify_params.py b/stripe/params/_subscription_item_modify_params.py index 0397d8bd4..88059d397 100644 --- a/stripe/params/_subscription_item_modify_params.py +++ b/stripe/params/_subscription_item_modify_params.py @@ -50,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" diff --git a/stripe/params/_subscription_item_update_params.py b/stripe/params/_subscription_item_update_params.py index bdc94a039..8204b1d0c 100644 --- a/stripe/params/_subscription_item_update_params.py +++ b/stripe/params/_subscription_item_update_params.py @@ -49,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" diff --git a/stripe/params/_subscription_modify_params.py b/stripe/params/_subscription_modify_params.py index ea3d5613d..cdf0cf53c 100644 --- a/stripe/params/_subscription_modify_params.py +++ b/stripe/params/_subscription_modify_params.py @@ -624,11 +624,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] """ @@ -849,6 +849,12 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. """ + bacs_debit: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBacsDebit" + ] + """ + This sub-hash contains details about the Bacs Direct Debit payment method options to pass to the invoice's PaymentIntent. + """ bancontact: NotRequired[ "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact" ] @@ -967,6 +973,18 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandat """ +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBacsDebit( + TypedDict, +): + debit_behavior: NotRequired[str] + """ + Controls when the funds will be captured from the customer's account. + """ + verification_method: NotRequired[ + "Literal['automatic', 'payer_name_verification']|str" + ] + + class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, ): diff --git a/stripe/params/_subscription_update_params.py b/stripe/params/_subscription_update_params.py index 182b2c6dc..bca59a044 100644 --- a/stripe/params/_subscription_update_params.py +++ b/stripe/params/_subscription_update_params.py @@ -623,11 +623,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] """ @@ -848,6 +848,12 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. """ + bacs_debit: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBacsDebit" + ] + """ + This sub-hash contains details about the Bacs Direct Debit payment method options to pass to the invoice's PaymentIntent. + """ bancontact: NotRequired[ "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact" ] @@ -966,6 +972,18 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandat """ +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBacsDebit( + TypedDict, +): + debit_behavior: NotRequired[str] + """ + Controls when the funds will be captured from the customer's account. + """ + verification_method: NotRequired[ + "Literal['automatic', 'payer_name_verification']|str" + ] + + class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, ): diff --git a/stripe/params/checkout/__init__.py b/stripe/params/checkout/__init__.py index 82853f6f4..d8072a1a0 100644 --- a/stripe/params/checkout/__init__.py +++ b/stripe/params/checkout/__init__.py @@ -52,6 +52,7 @@ SessionCreateParamsItemSubscriptionBillingMode as SessionCreateParamsItemSubscriptionBillingMode, SessionCreateParamsItemSubscriptionBillingModeFlexible as SessionCreateParamsItemSubscriptionBillingModeFlexible, SessionCreateParamsItemSubscriptionItem as SessionCreateParamsItemSubscriptionItem, + SessionCreateParamsItemSubscriptionItemCurrentTrial as SessionCreateParamsItemSubscriptionItemCurrentTrial, SessionCreateParamsItemSubscriptionItemPriceData as SessionCreateParamsItemSubscriptionItemPriceData, SessionCreateParamsItemSubscriptionItemPriceDataProductData as SessionCreateParamsItemSubscriptionItemPriceDataProductData, SessionCreateParamsItemSubscriptionItemPriceDataProductDataTaxDetails as SessionCreateParamsItemSubscriptionItemPriceDataProductDataTaxDetails, @@ -432,6 +433,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsItemSubscriptionItemCurrentTrial": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsItemSubscriptionItemPriceData": ( "stripe.params.checkout._session_create_params", False, diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index 428251c74..540bc6f94 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -347,6 +347,7 @@ class SessionCreateParams(RequestOptions): "satispay", "scalapay", "sepa_debit", + "sequra", "shopeepay", "sofort", "sunbit", @@ -689,7 +690,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"] """ @@ -1032,6 +1033,12 @@ class SessionCreateParamsItemSubscriptionBillingModeFlexible(TypedDict): class SessionCreateParamsItemSubscriptionItem(TypedDict): + current_trial: NotRequired[ + "SessionCreateParamsItemSubscriptionItemCurrentTrial" + ] + """ + The trial offer to apply to this subscription item. + """ price: NotRequired[str] """ The ID of the [Price](https://docs.stripe.com/api/prices). One of `price` or `price_data` is required. @@ -1046,6 +1053,13 @@ class SessionCreateParamsItemSubscriptionItem(TypedDict): """ +class SessionCreateParamsItemSubscriptionItemCurrentTrial(TypedDict): + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ + + class SessionCreateParamsItemSubscriptionItemPriceData(TypedDict): currency: str """ @@ -1918,6 +1932,9 @@ class SessionCreateParamsPaymentMethodOptionsBacsDebit(TypedDict): """ Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ + verification_method: NotRequired[ + "Literal['automatic', 'payer_name_verification']|str" + ] class SessionCreateParamsPaymentMethodOptionsBacsDebitMandateOptions( diff --git a/stripe/params/checkout/_session_modify_params.py b/stripe/params/checkout/_session_modify_params.py index adcbc38af..18101e317 100644 --- a/stripe/params/checkout/_session_modify_params.py +++ b/stripe/params/checkout/_session_modify_params.py @@ -54,9 +54,9 @@ class SessionModifyParams(RequestOptions): """ payment_intent_data: NotRequired["SessionModifyParamsPaymentIntentData"] """ - A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + A subset of parameters to apply to the PaymentIntent for Checkout Sessions in `payment` mode. - You can only update these parameters when `ui_mode` is `elements` and while the session is active. + You can only update these parameters when `ui_mode` is `elements` and while the session is active. If the PaymentIntent requires customer action or confirmation, updating these parameters abandons the current payment attempt and returns the PaymentIntent to `requires_payment_method`. You can't update these parameters after the PaymentIntent begins processing, requires capture, succeeds, or is canceled. """ shipping_options: NotRequired[ "Literal['']|List[SessionModifyParamsShippingOption]" diff --git a/stripe/params/checkout/_session_update_params.py b/stripe/params/checkout/_session_update_params.py index 721b6a514..122499984 100644 --- a/stripe/params/checkout/_session_update_params.py +++ b/stripe/params/checkout/_session_update_params.py @@ -53,9 +53,9 @@ class SessionUpdateParams(TypedDict): """ payment_intent_data: NotRequired["SessionUpdateParamsPaymentIntentData"] """ - A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + A subset of parameters to apply to the PaymentIntent for Checkout Sessions in `payment` mode. - You can only update these parameters when `ui_mode` is `elements` and while the session is active. + You can only update these parameters when `ui_mode` is `elements` and while the session is active. If the PaymentIntent requires customer action or confirmation, updating these parameters abandons the current payment attempt and returns the PaymentIntent to `requires_payment_method`. You can't update these parameters after the PaymentIntent begins processing, requires capture, succeeds, or is canceled. """ shipping_options: NotRequired[ "Literal['']|List[SessionUpdateParamsShippingOption]" diff --git a/stripe/params/crypto/_onramp_session_create_params.py b/stripe/params/crypto/_onramp_session_create_params.py index 87613b92a..766a31977 100644 --- a/stripe/params/crypto/_onramp_session_create_params.py +++ b/stripe/params/crypto/_onramp_session_create_params.py @@ -30,6 +30,7 @@ class OnrampSessionCreateParams(RequestOptions): "btc", "eth", "matic", + "ripusd", "sol", "usdc", "usdt", @@ -47,7 +48,7 @@ class OnrampSessionCreateParams(RequestOptions): * When set, it must be a non-empty array where all values in the array are valid cryptocurrencies. You can use it to lock users to a specific cryptocurrency by passing a single value array. Users **cannot** override this parameter. """ destination_currency: NotRequired[ - "Literal['avax', 'btc', 'eth', 'matic', 'sol', 'usdc', 'usdt', 'wld', 'xlm']|str" + "Literal['avax', 'btc', 'eth', 'matic', 'ripusd', 'sol', 'usdc', 'usdt', 'wld', 'xlm']|str" ] """ The default destination cryptocurrency. @@ -123,7 +124,9 @@ class OnrampSessionCreateParams(RequestOptions): * When left null, a default value is computed if `destination_amount` is set. * When set, setting `source_amount` is mutually exclusive with setting `destination_amount` (only one or the other is supported). We don't support fractional pennies. If fractional minor units of a currency are passed in, it generates an error. Users can update the value in the onramp UI. """ - source_currency: NotRequired["Literal['eur', 'gbp', 'usd']|str"] + source_currency: NotRequired[ + "Literal['cad', 'cop', 'eur', 'gbp', 'php', 'usd']|str" + ] """ The default source fiat currency for the onramp session. diff --git a/stripe/params/crypto/_onramp_session_list_params.py b/stripe/params/crypto/_onramp_session_list_params.py index c34568b38..3c84a5473 100644 --- a/stripe/params/crypto/_onramp_session_list_params.py +++ b/stripe/params/crypto/_onramp_session_list_params.py @@ -11,7 +11,7 @@ class OnrampSessionListParams(RequestOptions): Only return onramp sessions that were created during the given date interval. """ destination_currency: NotRequired[ - "Literal['avax', 'btc', 'eth', 'matic', 'sol', 'usdc', 'usdt', 'wld', 'xlm']|str" + "Literal['avax', 'btc', 'eth', 'matic', 'ripusd', 'sol', 'usdc', 'usdt', 'wld', 'xlm']|str" ] """ The destination cryptocurrency to filter by. diff --git a/stripe/params/radar/_billing_evaluation_create_params.py b/stripe/params/radar/_billing_evaluation_create_params.py index b33f2d4cc..8096c3d0f 100644 --- a/stripe/params/radar/_billing_evaluation_create_params.py +++ b/stripe/params/radar/_billing_evaluation_create_params.py @@ -49,7 +49,7 @@ class BillingEvaluationCreateParamsCustomerDetails(TypedDict): """ data: NotRequired["BillingEvaluationCreateParamsCustomerDetailsData"] """ - Attributes of the customer being evaluated. Supply these when the customer isn't represented by a Customer or an Account. If `customer` or `customer_account` is also supplied, the attributes on that object are used and these are ignored. + Attributes of the customer being evaluated. Exactly one of `customer`, `customer_account`, and `data` must be supplied: use `data` when the customer isn't represented by a Customer or an Account. """ diff --git a/stripe/params/tax/_form_list_params.py b/stripe/params/tax/_form_list_params.py index 055b02386..86cd786d3 100644 --- a/stripe/params/tax/_form_list_params.py +++ b/stripe/params/tax/_form_list_params.py @@ -45,5 +45,5 @@ class FormListParamsPayee(TypedDict): """ type: NotRequired["Literal['account', 'external_reference']|str"] """ - Specifies the payee type. Either `account` or `external_reference`. + Specifies the payee type. """ diff --git a/stripe/params/test_helpers/_confirmation_token_create_params.py b/stripe/params/test_helpers/_confirmation_token_create_params.py index 51aa98c3e..495520d0b 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" diff --git a/stripe/params/v2/billing/_contract_create_params.py b/stripe/params/v2/billing/_contract_create_params.py index ae47d9c81..17ba99c48 100644 --- a/stripe/params/v2/billing/_contract_create_params.py +++ b/stripe/params/v2/billing/_contract_create_params.py @@ -211,6 +211,10 @@ class ContractCreateParamsOneTimeFee(TypedDict): """ A user-provided lookup key. """ + metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] + """ + Set of key-value pairs that you can attach to an object. + """ product: str """ The id of the product for this fee. diff --git a/stripe/params/v2/billing/_contract_update_params.py b/stripe/params/v2/billing/_contract_update_params.py index f2e69f4eb..3b6978f5c 100644 --- a/stripe/params/v2/billing/_contract_update_params.py +++ b/stripe/params/v2/billing/_contract_update_params.py @@ -82,6 +82,10 @@ class ContractUpdateParamsOneTimeFeeActionAdd(TypedDict): """ A user-provided lookup key. """ + metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] + """ + Metadata for the one-time fee. + """ product: str """ The id of the product for this fee. @@ -127,6 +131,12 @@ class ContractUpdateParamsOneTimeFeeActionUpdate(TypedDict): """ The lookup key of the one-time fee to update. """ + metadata: NotRequired[ + "Dict[str, Optional[str]]|UntypedStripeObject[Optional[str]]" + ] + """ + Metadata mutations to apply to the one-time fee. + """ class ContractUpdateParamsOneTimeFeeActionUpdateBillAt(TypedDict): diff --git a/stripe/params/v2/core/vault/__init__.py b/stripe/params/v2/core/vault/__init__.py index cb6115ae9..398005127 100644 --- a/stripe/params/v2/core/vault/__init__.py +++ b/stripe/params/v2/core/vault/__init__.py @@ -23,6 +23,21 @@ from stripe.params.v2.core.vault._gb_bank_account_retrieve_params import ( GbBankAccountRetrieveParams as GbBankAccountRetrieveParams, ) + from stripe.params.v2.core.vault._network_token_create_from_credential_params import ( + NetworkTokenCreateFromCredentialParams as NetworkTokenCreateFromCredentialParams, + NetworkTokenCreateFromCredentialParamsCard as NetworkTokenCreateFromCredentialParamsCard, + ) + from stripe.params.v2.core.vault._network_token_create_params import ( + NetworkTokenCreateParams as NetworkTokenCreateParams, + NetworkTokenCreateParamsCard as NetworkTokenCreateParamsCard, + NetworkTokenCreateParamsCardOwnerDetails as NetworkTokenCreateParamsCardOwnerDetails, + ) + from stripe.params.v2.core.vault._network_token_generate_cryptogram_params import ( + NetworkTokenGenerateCryptogramParams as NetworkTokenGenerateCryptogramParams, + ) + from stripe.params.v2.core.vault._network_token_retrieve_params import ( + NetworkTokenRetrieveParams as NetworkTokenRetrieveParams, + ) from stripe.params.v2.core.vault._us_bank_account_archive_params import ( UsBankAccountArchiveParams as UsBankAccountArchiveParams, ) @@ -75,6 +90,34 @@ "stripe.params.v2.core.vault._gb_bank_account_retrieve_params", False, ), + "NetworkTokenCreateFromCredentialParams": ( + "stripe.params.v2.core.vault._network_token_create_from_credential_params", + False, + ), + "NetworkTokenCreateFromCredentialParamsCard": ( + "stripe.params.v2.core.vault._network_token_create_from_credential_params", + False, + ), + "NetworkTokenCreateParams": ( + "stripe.params.v2.core.vault._network_token_create_params", + False, + ), + "NetworkTokenCreateParamsCard": ( + "stripe.params.v2.core.vault._network_token_create_params", + False, + ), + "NetworkTokenCreateParamsCardOwnerDetails": ( + "stripe.params.v2.core.vault._network_token_create_params", + False, + ), + "NetworkTokenGenerateCryptogramParams": ( + "stripe.params.v2.core.vault._network_token_generate_cryptogram_params", + False, + ), + "NetworkTokenRetrieveParams": ( + "stripe.params.v2.core.vault._network_token_retrieve_params", + False, + ), "UsBankAccountArchiveParams": ( "stripe.params.v2.core.vault._us_bank_account_archive_params", False, diff --git a/stripe/params/v2/core/vault/_network_token_create_from_credential_params.py b/stripe/params/v2/core/vault/_network_token_create_from_credential_params.py new file mode 100644 index 000000000..686f41cb8 --- /dev/null +++ b/stripe/params/v2/core/vault/_network_token_create_from_credential_params.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class NetworkTokenCreateFromCredentialParams(TypedDict): + card: NotRequired["NetworkTokenCreateFromCredentialParamsCard"] + """ + The existing Stripe card reference to provision or resolve. + """ + type: Literal["card"] + """ + Private preview supports card only. + """ + + +class NetworkTokenCreateFromCredentialParamsCard(TypedDict): + origin: NotRequired[Literal["card_on_file"]] + """ + The optional origin attestation for the referenced card. + """ + reference: str + """ + A supported v2 Card ID or v1 PaymentMethod ID of type card. + """ diff --git a/stripe/params/v2/core/vault/_network_token_create_params.py b/stripe/params/v2/core/vault/_network_token_create_params.py new file mode 100644 index 000000000..fd561504b --- /dev/null +++ b/stripe/params/v2/core/vault/_network_token_create_params.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class NetworkTokenCreateParams(TypedDict): + card: NotRequired["NetworkTokenCreateParamsCard"] + """ + Raw card values used to provision the network token. + """ + type: Literal["card"] + """ + Private preview supports card only. + """ + + +class NetworkTokenCreateParamsCard(TypedDict): + exp_month: str + """ + The two-digit number representing the card's expiration month. + """ + exp_year: str + """ + The four-digit number representing the card's expiration year. + """ + number: str + """ + The card number. + """ + origin: NotRequired[Literal["card_on_file"]] + """ + The optional origin attestation for the card. + """ + owner_details: NotRequired["NetworkTokenCreateParamsCardOwnerDetails"] + """ + Optional owner contact details used only when a network requires them for raw-card tokenization. + """ + + +class NetworkTokenCreateParamsCardOwnerDetails(TypedDict): + email: NotRequired[str] + """ + Cardholder email address. + """ + phone: NotRequired[str] + """ + Cardholder phone number in international format, for example +15555550123. + """ diff --git a/stripe/params/v2/core/vault/_network_token_generate_cryptogram_params.py b/stripe/params/v2/core/vault/_network_token_generate_cryptogram_params.py new file mode 100644 index 000000000..7ec78f46a --- /dev/null +++ b/stripe/params/v2/core/vault/_network_token_generate_cryptogram_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class NetworkTokenGenerateCryptogramParams(TypedDict): + type: NotRequired[Literal["token_cryptogram"]] + """ + The cryptogram type. When omitted, token_cryptogram is used. + """ diff --git a/stripe/params/v2/core/vault/_network_token_retrieve_params.py b/stripe/params/v2/core/vault/_network_token_retrieve_params.py new file mode 100644 index 000000000..33269bc2d --- /dev/null +++ b/stripe/params/v2/core/vault/_network_token_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class NetworkTokenRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/__init__.py b/stripe/params/v2/money_management/__init__.py index 5738669fe..3d55fbd87 100644 --- a/stripe/params/v2/money_management/__init__.py +++ b/stripe/params/v2/money_management/__init__.py @@ -56,8 +56,8 @@ ) from stripe.params.v2.money_management._financial_address_create_params import ( FinancialAddressCreateParams as FinancialAddressCreateParams, - FinancialAddressCreateParamsCryptoProperties as FinancialAddressCreateParamsCryptoProperties, - FinancialAddressCreateParamsSepaBankAccount as FinancialAddressCreateParamsSepaBankAccount, + FinancialAddressCreateParamsBankAccount as FinancialAddressCreateParamsBankAccount, + FinancialAddressCreateParamsCryptoWallet as FinancialAddressCreateParamsCryptoWallet, ) from stripe.params.v2.money_management._financial_address_list_params import ( FinancialAddressListParams as FinancialAddressListParams, @@ -342,11 +342,11 @@ "stripe.params.v2.money_management._financial_address_create_params", False, ), - "FinancialAddressCreateParamsCryptoProperties": ( + "FinancialAddressCreateParamsBankAccount": ( "stripe.params.v2.money_management._financial_address_create_params", False, ), - "FinancialAddressCreateParamsSepaBankAccount": ( + "FinancialAddressCreateParamsCryptoWallet": ( "stripe.params.v2.money_management._financial_address_create_params", False, ), diff --git a/stripe/params/v2/money_management/_financial_address_create_params.py b/stripe/params/v2/money_management/_financial_address_create_params.py index 1d976a7ed..17dbd327b 100644 --- a/stripe/params/v2/money_management/_financial_address_create_params.py +++ b/stripe/params/v2/money_management/_financial_address_create_params.py @@ -5,43 +5,34 @@ class FinancialAddressCreateParams(TypedDict): - crypto_properties: NotRequired[ - "FinancialAddressCreateParamsCryptoProperties" - ] + bank_account: NotRequired["FinancialAddressCreateParamsBankAccount"] """ - Properties needed to create a FinancialAddress for an FA with USDC currency. + Properties for creating a bank account FinancialAddress. """ + crypto_wallet: NotRequired["FinancialAddressCreateParamsCryptoWallet"] financial_account: str """ The ID of the FinancialAccount the new FinancialAddress should be associated with. """ - sepa_bank_account: NotRequired[ - "FinancialAddressCreateParamsSepaBankAccount" - ] + settlement_currency: NotRequired[str] + type: Union[Literal["bank_account", "crypto_wallet"], str] """ - Optional SEPA Bank account options, used to configure the type of SEPA Bank account to create, such as the originating country. + The type of FinancialAddress to create. Must agree with which branch of financial_address_type_properties is set. """ - settlement_currency: NotRequired[str] + + +class FinancialAddressCreateParamsBankAccount(TypedDict): + country: NotRequired[str] """ - Open Enum. The currency the FinancialAddress settles into the FinancialAccount. Currently, only the `usd`, `gbp` and `usdc` values are supported. + The country for the bank account. Used to select the appropriate rails (e.g. for SEPA). """ - type: Union[ - Literal[ - "ca_bank_account", - "crypto_wallet", - "gb_bank_account", - "mx_bank_account", - "sepa_bank_account", - "us_bank_account", - ], - str, - ] + currency: Union[Literal["cad", "eur", "gbp", "mxn", "usd"], str] """ - The type of FinancialAddress details to provision. + The currency of the bank account to provision. """ -class FinancialAddressCreateParamsCryptoProperties(TypedDict): +class FinancialAddressCreateParamsCryptoWallet(TypedDict): network: Union[ Literal[ "arbitrum", @@ -59,10 +50,3 @@ class FinancialAddressCreateParamsCryptoProperties(TypedDict): """ The blockchain network of the crypto wallet. """ - - -class FinancialAddressCreateParamsSepaBankAccount(TypedDict): - country: str - """ - The originating country of the SEPA Bank account. - """ diff --git a/stripe/params/v2/money_management/_financial_address_list_params.py b/stripe/params/v2/money_management/_financial_address_list_params.py index cf7737b0d..f0599762b 100644 --- a/stripe/params/v2/money_management/_financial_address_list_params.py +++ b/stripe/params/v2/money_management/_financial_address_list_params.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List, Union -from typing_extensions import Literal, NotRequired, TypedDict +from typing_extensions import NotRequired, TypedDict class FinancialAddressListParams(TypedDict): @@ -9,22 +8,6 @@ class FinancialAddressListParams(TypedDict): """ The ID of the FinancialAccount for which FinancialAddresses are to be returned. """ - include: NotRequired[ - List[ - Union[ - Literal[ - "credentials.ca_bank_account.account_number", - "credentials.gb_bank_account.account_number", - "credentials.sepa_bank_account.iban", - "credentials.us_bank_account.account_number", - ], - str, - ] - ] - ] - """ - Open Enum. A list of fields to reveal in the FinancialAddresses returned. - """ limit: NotRequired[int] """ The page limit. diff --git a/stripe/params/v2/money_management/_financial_address_retrieve_params.py b/stripe/params/v2/money_management/_financial_address_retrieve_params.py index 86fd9a9e5..43f14693e 100644 --- a/stripe/params/v2/money_management/_financial_address_retrieve_params.py +++ b/stripe/params/v2/money_management/_financial_address_retrieve_params.py @@ -1,23 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List, Union -from typing_extensions import Literal, NotRequired, TypedDict +from typing_extensions import TypedDict class FinancialAddressRetrieveParams(TypedDict): - include: NotRequired[ - List[ - Union[ - Literal[ - "credentials.ca_bank_account.account_number", - "credentials.gb_bank_account.account_number", - "credentials.sepa_bank_account.iban", - "credentials.us_bank_account.account_number", - ], - str, - ] - ] - ] - """ - Open Enum. A list of fields to reveal in the FinancialAddresses returned. - """ + pass diff --git a/stripe/params/v2/payments/_off_session_payment_create_params.py b/stripe/params/v2/payments/_off_session_payment_create_params.py index bccd5b8fc..49853c6ae 100644 --- a/stripe/params/v2/payments/_off_session_payment_create_params.py +++ b/stripe/params/v2/payments/_off_session_payment_create_params.py @@ -9,7 +9,7 @@ class OffSessionPaymentCreateParams(TypedDict): amount: AmountParam """ - The "presentment amount" to be collected from the customer. + Amount intended to be collected by this payment. """ amount_details: NotRequired["OffSessionPaymentCreateParamsAmountDetails"] """ @@ -36,6 +36,12 @@ class OffSessionPaymentCreateParams(TypedDict): """ An arbitrary string attached to the object. Often useful for displaying to users. """ + include: NotRequired[ + List[Literal["latest_payment_attempt_record_details"]] + ] + """ + Additional fields to include in the response. + """ metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can diff --git a/stripe/params/v2/signals/__init__.py b/stripe/params/v2/signals/__init__.py index e339d6dd2..d922417f6 100644 --- a/stripe/params/v2/signals/__init__.py +++ b/stripe/params/v2/signals/__init__.py @@ -13,6 +13,7 @@ AccountActivityCreateParamsAccountDetailsDataIdentity as AccountActivityCreateParamsAccountDetailsDataIdentity, AccountActivityCreateParamsAccountDetailsDataIdentityBusinessDetails as AccountActivityCreateParamsAccountDetailsDataIdentityBusinessDetails, AccountActivityCreateParamsAccountRestricted as AccountActivityCreateParamsAccountRestricted, + AccountActivityCreateParamsAccountReviewed as AccountActivityCreateParamsAccountReviewed, AccountActivityCreateParamsAccountSuspended as AccountActivityCreateParamsAccountSuspended, AccountActivityCreateParamsLoginAttempt as AccountActivityCreateParamsLoginAttempt, AccountActivityCreateParamsLoginAttemptClientDetails as AccountActivityCreateParamsLoginAttemptClientDetails, @@ -106,6 +107,10 @@ "stripe.params.v2.signals._account_activity_create_params", False, ), + "AccountActivityCreateParamsAccountReviewed": ( + "stripe.params.v2.signals._account_activity_create_params", + False, + ), "AccountActivityCreateParamsAccountSuspended": ( "stripe.params.v2.signals._account_activity_create_params", False, diff --git a/stripe/params/v2/signals/_account_activity_create_params.py b/stripe/params/v2/signals/_account_activity_create_params.py index 8f0ce6560..ef6b70099 100644 --- a/stripe/params/v2/signals/_account_activity_create_params.py +++ b/stripe/params/v2/signals/_account_activity_create_params.py @@ -21,6 +21,11 @@ class AccountActivityCreateParams(TypedDict): Details for the account restriction. Provide only when type is account_restricted. The activity requires an existing account_details.account or account_details.customer; inline data is unsupported. """ + account_reviewed: NotRequired["AccountActivityCreateParamsAccountReviewed"] + """ + Details for the account review. Provide only when type is account_reviewed. The activity + requires an existing account_details.account or account_details.customer; inline data is unsupported. + """ account_suspended: NotRequired[ "AccountActivityCreateParamsAccountSuspended" ] @@ -59,6 +64,7 @@ class AccountActivityCreateParams(TypedDict): type: Union[ Literal[ "account_restricted", + "account_reviewed", "account_suspended", "login_attempt", "login_decision", @@ -149,6 +155,13 @@ class AccountActivityCreateParamsAccountRestricted(TypedDict): """ +class AccountActivityCreateParamsAccountReviewed(TypedDict): + outcome: Union[Literal["trusted"], str] + """ + The outcome of the merchant review. + """ + + class AccountActivityCreateParamsAccountSuspended(TypedDict): reason: Union[Literal["abuse", "other"], str] """ diff --git a/stripe/params/v2/signals/_account_evaluation_create_params.py b/stripe/params/v2/signals/_account_evaluation_create_params.py index fcb2fb6fa..d0dcbefac 100644 --- a/stripe/params/v2/signals/_account_evaluation_create_params.py +++ b/stripe/params/v2/signals/_account_evaluation_create_params.py @@ -63,6 +63,7 @@ class AccountEvaluationCreateParamsAccountActivityDetailsData(TypedDict): type: Union[ Literal[ "account_restricted", + "account_reviewed", "account_suspended", "login_attempt", "login_decision", diff --git a/stripe/privacy/_redaction_job.py b/stripe/privacy/_redaction_job.py index c3804e7ef..befd30f72 100644 --- a/stripe/privacy/_redaction_job.py +++ b/stripe/privacy/_redaction_job.py @@ -142,7 +142,7 @@ class Objects(StripeObject): @classmethod def _cls_cancel( - cls, job: str, **params: Unpack["RedactionJobCancelParams"] + cls, job: str, /, **params: Unpack["RedactionJobCancelParams"] ) -> "RedactionJob": """ You can cancel a redaction job when it's in one of these statuses: ready, failed. @@ -163,7 +163,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - job: str, **params: Unpack["RedactionJobCancelParams"] + job: str, /, **params: Unpack["RedactionJobCancelParams"] ) -> "RedactionJob": """ You can cancel a redaction job when it's in one of these statuses: ready, failed. @@ -205,7 +205,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, job: str, **params: Unpack["RedactionJobCancelParams"] + cls, job: str, /, **params: Unpack["RedactionJobCancelParams"] ) -> "RedactionJob": """ You can cancel a redaction job when it's in one of these statuses: ready, failed. @@ -226,7 +226,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - job: str, **params: Unpack["RedactionJobCancelParams"] + job: str, /, **params: Unpack["RedactionJobCancelParams"] ) -> "RedactionJob": """ You can cancel a redaction job when it's in one of these statuses: ready, failed. @@ -400,7 +400,7 @@ async def retrieve_async( @classmethod def _cls_run( - cls, job: str, **params: Unpack["RedactionJobRunParams"] + cls, job: str, /, **params: Unpack["RedactionJobRunParams"] ) -> "RedactionJob": """ Run a redaction job in a ready status. @@ -423,7 +423,7 @@ def _cls_run( @overload @staticmethod def run( - job: str, **params: Unpack["RedactionJobRunParams"] + job: str, /, **params: Unpack["RedactionJobRunParams"] ) -> "RedactionJob": """ Run a redaction job in a ready status. @@ -469,7 +469,7 @@ def run( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_run_async( - cls, job: str, **params: Unpack["RedactionJobRunParams"] + cls, job: str, /, **params: Unpack["RedactionJobRunParams"] ) -> "RedactionJob": """ Run a redaction job in a ready status. @@ -492,7 +492,7 @@ async def _cls_run_async( @overload @staticmethod async def run_async( - job: str, **params: Unpack["RedactionJobRunParams"] + job: str, /, **params: Unpack["RedactionJobRunParams"] ) -> "RedactionJob": """ Run a redaction job in a ready status. @@ -540,7 +540,7 @@ async def run_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_validate( - cls, job: str, **params: Unpack["RedactionJobValidateParams"] + cls, job: str, /, **params: Unpack["RedactionJobValidateParams"] ) -> "RedactionJob": """ Validate a redaction job when it is in a failed status. @@ -563,7 +563,7 @@ def _cls_validate( @overload @staticmethod def validate( - job: str, **params: Unpack["RedactionJobValidateParams"] + job: str, /, **params: Unpack["RedactionJobValidateParams"] ) -> "RedactionJob": """ Validate a redaction job when it is in a failed status. @@ -611,7 +611,7 @@ def validate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_validate_async( - cls, job: str, **params: Unpack["RedactionJobValidateParams"] + cls, job: str, /, **params: Unpack["RedactionJobValidateParams"] ) -> "RedactionJob": """ Validate a redaction job when it is in a failed status. @@ -634,7 +634,7 @@ async def _cls_validate_async( @overload @staticmethod async def validate_async( - job: str, **params: Unpack["RedactionJobValidateParams"] + job: str, /, **params: Unpack["RedactionJobValidateParams"] ) -> "RedactionJob": """ Validate a redaction job when it is in a failed status. @@ -684,6 +684,7 @@ async def validate_async( # pyright: ignore[reportGeneralTypeIssues] def list_validation_errors( cls, job: str, + /, **params: Unpack["RedactionJobListValidationErrorsParams"], ) -> ListObject["RedactionJobValidationError"]: """ @@ -704,6 +705,7 @@ def list_validation_errors( async def list_validation_errors_async( cls, job: str, + /, **params: Unpack["RedactionJobListValidationErrorsParams"], ) -> ListObject["RedactionJobValidationError"]: """ diff --git a/stripe/privacy/_redaction_job_service.py b/stripe/privacy/_redaction_job_service.py index 561037fc0..b788a3759 100644 --- a/stripe/privacy/_redaction_job_service.py +++ b/stripe/privacy/_redaction_job_service.py @@ -144,6 +144,7 @@ async def create_async( def retrieve( self, job: str, + /, params: Optional["RedactionJobRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RedactionJob": @@ -166,6 +167,7 @@ def retrieve( async def retrieve_async( self, job: str, + /, params: Optional["RedactionJobRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RedactionJob": @@ -188,6 +190,7 @@ async def retrieve_async( def update( self, job: str, + /, params: Optional["RedactionJobUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RedactionJob": @@ -212,6 +215,7 @@ def update( async def update_async( self, job: str, + /, params: Optional["RedactionJobUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RedactionJob": @@ -236,6 +240,7 @@ async def update_async( def cancel( self, job: str, + /, params: Optional["RedactionJobCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RedactionJob": @@ -260,6 +265,7 @@ def cancel( async def cancel_async( self, job: str, + /, params: Optional["RedactionJobCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RedactionJob": @@ -284,6 +290,7 @@ async def cancel_async( def run( self, job: str, + /, params: Optional["RedactionJobRunParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RedactionJob": @@ -310,6 +317,7 @@ def run( async def run_async( self, job: str, + /, params: Optional["RedactionJobRunParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RedactionJob": @@ -336,6 +344,7 @@ async def run_async( def validate( self, job: str, + /, params: Optional["RedactionJobValidateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RedactionJob": @@ -362,6 +371,7 @@ def validate( async def validate_async( self, job: str, + /, params: Optional["RedactionJobValidateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RedactionJob": diff --git a/stripe/privacy/_redaction_job_validation_error_service.py b/stripe/privacy/_redaction_job_validation_error_service.py index 1914542cb..23fe66069 100644 --- a/stripe/privacy/_redaction_job_validation_error_service.py +++ b/stripe/privacy/_redaction_job_validation_error_service.py @@ -20,6 +20,7 @@ class RedactionJobValidationErrorService(StripeService): def list( self, job: str, + /, params: Optional["RedactionJobValidationErrorListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[RedactionJobValidationError]": @@ -42,6 +43,7 @@ def list( async def list_async( self, job: str, + /, params: Optional["RedactionJobValidationErrorListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[RedactionJobValidationError]": diff --git a/stripe/product_catalog/_trial_offer.py b/stripe/product_catalog/_trial_offer.py index 1b740f53a..7f7c1d7a0 100644 --- a/stripe/product_catalog/_trial_offer.py +++ b/stripe/product_catalog/_trial_offer.py @@ -58,7 +58,7 @@ class Transition(StripeObject): The new price to use at the end of the trial offer period. """ - transition: Transition + transition: Optional[Transition] type: Union[Literal["transition"], str] """ The type of behavior when the trial offer ends. diff --git a/stripe/product_catalog/_trial_offer_service.py b/stripe/product_catalog/_trial_offer_service.py index 825d14c1b..ca47f69b3 100644 --- a/stripe/product_catalog/_trial_offer_service.py +++ b/stripe/product_catalog/_trial_offer_service.py @@ -100,6 +100,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["TrialOfferRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TrialOffer": @@ -122,6 +123,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["TrialOfferRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TrialOffer": diff --git a/stripe/radar/_account_evaluation_service.py b/stripe/radar/_account_evaluation_service.py index b6dd4c473..472b17d09 100644 --- a/stripe/radar/_account_evaluation_service.py +++ b/stripe/radar/_account_evaluation_service.py @@ -23,6 +23,7 @@ class AccountEvaluationService(StripeService): def retrieve( self, account_evaluation: str, + /, params: Optional["AccountEvaluationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountEvaluation": @@ -45,6 +46,7 @@ def retrieve( async def retrieve_async( self, account_evaluation: str, + /, params: Optional["AccountEvaluationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountEvaluation": @@ -105,6 +107,7 @@ async def create_async( def update( self, account_evaluation: str, + /, params: "AccountEvaluationUpdateParams", options: Optional["RequestOptions"] = None, ) -> "AccountEvaluation": @@ -127,6 +130,7 @@ def update( async def update_async( self, account_evaluation: str, + /, params: "AccountEvaluationUpdateParams", options: Optional["RequestOptions"] = None, ) -> "AccountEvaluation": diff --git a/stripe/radar/_billing_evaluation.py b/stripe/radar/_billing_evaluation.py index 1011f111c..9bff1f825 100644 --- a/stripe/radar/_billing_evaluation.py +++ b/stripe/radar/_billing_evaluation.py @@ -51,7 +51,7 @@ class Data(StripeObject): """ data: Optional[Data] """ - Attributes of the customer being evaluated. These are populated from the `customer` or `customer_account` object when one was supplied, and from the request otherwise. + Attributes of the customer being evaluated, as supplied on the request. Null when the customer was identified by `customer` or `customer_account`. """ _inner_class_types = {"data": Data} diff --git a/stripe/radar/_customer_evaluation_service.py b/stripe/radar/_customer_evaluation_service.py index 435b42f83..7b6b62095 100644 --- a/stripe/radar/_customer_evaluation_service.py +++ b/stripe/radar/_customer_evaluation_service.py @@ -23,6 +23,7 @@ class CustomerEvaluationService(StripeService): def retrieve( self, customer_evaluation: str, + /, params: Optional["CustomerEvaluationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomerEvaluation": @@ -45,6 +46,7 @@ def retrieve( async def retrieve_async( self, customer_evaluation: str, + /, params: Optional["CustomerEvaluationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomerEvaluation": @@ -105,6 +107,7 @@ async def create_async( def update( self, customer_evaluation: str, + /, params: Optional["CustomerEvaluationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomerEvaluation": @@ -127,6 +130,7 @@ def update( async def update_async( self, customer_evaluation: str, + /, params: Optional["CustomerEvaluationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomerEvaluation": diff --git a/stripe/radar/_early_fraud_warning_service.py b/stripe/radar/_early_fraud_warning_service.py index b5f909c04..6e97dbb48 100644 --- a/stripe/radar/_early_fraud_warning_service.py +++ b/stripe/radar/_early_fraud_warning_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, early_fraud_warning: str, + /, params: Optional["EarlyFraudWarningRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "EarlyFraudWarning": @@ -83,6 +84,7 @@ def retrieve( async def retrieve_async( self, early_fraud_warning: str, + /, params: Optional["EarlyFraudWarningRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "EarlyFraudWarning": diff --git a/stripe/radar/_payment_evaluation.py b/stripe/radar/_payment_evaluation.py index c666bd580..fe6927006 100644 --- a/stripe/radar/_payment_evaluation.py +++ b/stripe/radar/_payment_evaluation.py @@ -531,6 +531,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: 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: 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 """ @@ -552,14 +600,26 @@ class FraudulentPayment(StripeObject): """ score: 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/radar/_value_list_item_service.py b/stripe/radar/_value_list_item_service.py index 808869076..6a7be0cbb 100644 --- a/stripe/radar/_value_list_item_service.py +++ b/stripe/radar/_value_list_item_service.py @@ -30,6 +30,7 @@ class ValueListItemService(StripeService): def delete( self, item: str, + /, params: Optional["ValueListItemDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ValueListItem": @@ -52,6 +53,7 @@ def delete( async def delete_async( self, item: str, + /, params: Optional["ValueListItemDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ValueListItem": @@ -74,6 +76,7 @@ async def delete_async( def retrieve( self, item: str, + /, params: Optional["ValueListItemRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ValueListItem": @@ -96,6 +99,7 @@ def retrieve( async def retrieve_async( self, item: str, + /, params: Optional["ValueListItemRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ValueListItem": diff --git a/stripe/radar/_value_list_service.py b/stripe/radar/_value_list_service.py index 637cb2cad..57b48cf56 100644 --- a/stripe/radar/_value_list_service.py +++ b/stripe/radar/_value_list_service.py @@ -28,6 +28,7 @@ class ValueListService(StripeService): def delete( self, value_list: str, + /, params: Optional["ValueListDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ValueList": @@ -50,6 +51,7 @@ def delete( async def delete_async( self, value_list: str, + /, params: Optional["ValueListDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ValueList": @@ -72,6 +74,7 @@ async def delete_async( def retrieve( self, value_list: str, + /, params: Optional["ValueListRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ValueList": @@ -94,6 +97,7 @@ def retrieve( async def retrieve_async( self, value_list: str, + /, params: Optional["ValueListRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ValueList": @@ -116,6 +120,7 @@ async def retrieve_async( def update( self, value_list: str, + /, params: Optional["ValueListUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ValueList": @@ -138,6 +143,7 @@ def update( async def update_async( self, value_list: str, + /, params: Optional["ValueListUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ValueList": diff --git a/stripe/reporting/_report_run_service.py b/stripe/reporting/_report_run_service.py index 40ab869b4..c16b8ee78 100644 --- a/stripe/reporting/_report_run_service.py +++ b/stripe/reporting/_report_run_service.py @@ -100,6 +100,7 @@ async def create_async( def retrieve( self, report_run: str, + /, params: Optional["ReportRunRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReportRun": @@ -122,6 +123,7 @@ def retrieve( async def retrieve_async( self, report_run: str, + /, params: Optional["ReportRunRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReportRun": diff --git a/stripe/reporting/_report_type_service.py b/stripe/reporting/_report_type_service.py index d3d93e13f..fc1f71717 100644 --- a/stripe/reporting/_report_type_service.py +++ b/stripe/reporting/_report_type_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, report_type: str, + /, params: Optional["ReportTypeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReportType": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, report_type: str, + /, params: Optional["ReportTypeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReportType": diff --git a/stripe/reserve/_hold_service.py b/stripe/reserve/_hold_service.py index 16de9bc3e..552d912b0 100644 --- a/stripe/reserve/_hold_service.py +++ b/stripe/reserve/_hold_service.py @@ -55,6 +55,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["HoldRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Hold": @@ -75,6 +76,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["HoldRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Hold": diff --git a/stripe/reserve/_plan_service.py b/stripe/reserve/_plan_service.py index c33d93a51..872831dc9 100644 --- a/stripe/reserve/_plan_service.py +++ b/stripe/reserve/_plan_service.py @@ -15,6 +15,7 @@ class PlanService(StripeService): def retrieve( self, id: str, + /, params: Optional["PlanRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Plan": @@ -35,6 +36,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["PlanRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Plan": diff --git a/stripe/reserve/_release_service.py b/stripe/reserve/_release_service.py index 20f8a9c0f..f453e927c 100644 --- a/stripe/reserve/_release_service.py +++ b/stripe/reserve/_release_service.py @@ -57,6 +57,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["ReleaseRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Release": @@ -77,6 +78,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ReleaseRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Release": diff --git a/stripe/shared_payment/_granted_token.py b/stripe/shared_payment/_granted_token.py index 21310fb2d..e5fa8d377 100644 --- a/stripe/shared_payment/_granted_token.py +++ b/stripe/shared_payment/_granted_token.py @@ -678,6 +678,7 @@ async def create_async( def _cls_revoke( cls, shared_payment_granted_token: str, + /, **params: Unpack["GrantedTokenRevokeParams"], ) -> "GrantedToken": """ @@ -700,6 +701,7 @@ def _cls_revoke( @staticmethod def revoke( shared_payment_granted_token: str, + /, **params: Unpack["GrantedTokenRevokeParams"], ) -> "GrantedToken": """ @@ -740,6 +742,7 @@ def revoke( # pyright: ignore[reportGeneralTypeIssues] async def _cls_revoke_async( cls, shared_payment_granted_token: str, + /, **params: Unpack["GrantedTokenRevokeParams"], ) -> "GrantedToken": """ @@ -762,6 +765,7 @@ async def _cls_revoke_async( @staticmethod async def revoke_async( shared_payment_granted_token: str, + /, **params: Unpack["GrantedTokenRevokeParams"], ) -> "GrantedToken": """ diff --git a/stripe/shared_payment/_granted_token_service.py b/stripe/shared_payment/_granted_token_service.py index 686c89bc7..acbdffca1 100644 --- a/stripe/shared_payment/_granted_token_service.py +++ b/stripe/shared_payment/_granted_token_service.py @@ -17,6 +17,7 @@ class GrantedTokenService(StripeService): def retrieve( self, shared_payment_granted_token: str, + /, params: Optional["GrantedTokenRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GrantedToken": @@ -41,6 +42,7 @@ def retrieve( async def retrieve_async( self, shared_payment_granted_token: str, + /, params: Optional["GrantedTokenRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GrantedToken": diff --git a/stripe/shared_payment/_issued_token.py b/stripe/shared_payment/_issued_token.py index d0fec92a9..a84073d7f 100644 --- a/stripe/shared_payment/_issued_token.py +++ b/stripe/shared_payment/_issued_token.py @@ -340,6 +340,7 @@ async def retrieve_async( def _cls_revoke( cls, shared_payment_issued_token: str, + /, **params: Unpack["IssuedTokenRevokeParams"], ) -> "IssuedToken": """ @@ -362,6 +363,7 @@ def _cls_revoke( @staticmethod def revoke( shared_payment_issued_token: str, + /, **params: Unpack["IssuedTokenRevokeParams"], ) -> "IssuedToken": """ @@ -402,6 +404,7 @@ def revoke( # pyright: ignore[reportGeneralTypeIssues] async def _cls_revoke_async( cls, shared_payment_issued_token: str, + /, **params: Unpack["IssuedTokenRevokeParams"], ) -> "IssuedToken": """ @@ -424,6 +427,7 @@ async def _cls_revoke_async( @staticmethod async def revoke_async( shared_payment_issued_token: str, + /, **params: Unpack["IssuedTokenRevokeParams"], ) -> "IssuedToken": """ diff --git a/stripe/shared_payment/_issued_token_service.py b/stripe/shared_payment/_issued_token_service.py index 53d847f40..5827511ef 100644 --- a/stripe/shared_payment/_issued_token_service.py +++ b/stripe/shared_payment/_issued_token_service.py @@ -23,6 +23,7 @@ class IssuedTokenService(StripeService): def retrieve( self, shared_payment_issued_token: str, + /, params: Optional["IssuedTokenRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "IssuedToken": @@ -47,6 +48,7 @@ def retrieve( async def retrieve_async( self, shared_payment_issued_token: str, + /, params: Optional["IssuedTokenRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "IssuedToken": @@ -109,6 +111,7 @@ async def create_async( def revoke( self, shared_payment_issued_token: str, + /, params: Optional["IssuedTokenRevokeParams"] = None, options: Optional["RequestOptions"] = None, ) -> "IssuedToken": @@ -133,6 +136,7 @@ def revoke( async def revoke_async( self, shared_payment_issued_token: str, + /, params: Optional["IssuedTokenRevokeParams"] = None, options: Optional["RequestOptions"] = None, ) -> "IssuedToken": diff --git a/stripe/sigma/_scheduled_query_run_service.py b/stripe/sigma/_scheduled_query_run_service.py index 33d81725e..77196be6a 100644 --- a/stripe/sigma/_scheduled_query_run_service.py +++ b/stripe/sigma/_scheduled_query_run_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, scheduled_query_run: str, + /, params: Optional["ScheduledQueryRunRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ScheduledQueryRun": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, scheduled_query_run: str, + /, params: Optional["ScheduledQueryRunRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ScheduledQueryRun": diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index 6127b1f47..140c4b8e2 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -586,6 +586,7 @@ async def create_async( def _cls_list_line_items( cls, calculation: str, + /, **params: Unpack["CalculationListLineItemsParams"], ) -> ListObject["CalculationLineItem"]: """ @@ -605,7 +606,7 @@ def _cls_list_line_items( @overload @staticmethod def list_line_items( - calculation: str, **params: Unpack["CalculationListLineItemsParams"] + calculation: str, /, **params: Unpack["CalculationListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. @@ -643,6 +644,7 @@ def list_line_items( # pyright: ignore[reportGeneralTypeIssues] async def _cls_list_line_items_async( cls, calculation: str, + /, **params: Unpack["CalculationListLineItemsParams"], ) -> ListObject["CalculationLineItem"]: """ @@ -662,7 +664,7 @@ async def _cls_list_line_items_async( @overload @staticmethod async def list_line_items_async( - calculation: str, **params: Unpack["CalculationListLineItemsParams"] + calculation: str, /, **params: Unpack["CalculationListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. diff --git a/stripe/tax/_calculation_line_item_service.py b/stripe/tax/_calculation_line_item_service.py index 48c946c49..26aa8a0ad 100644 --- a/stripe/tax/_calculation_line_item_service.py +++ b/stripe/tax/_calculation_line_item_service.py @@ -18,6 +18,7 @@ class CalculationLineItemService(StripeService): def list( self, calculation: str, + /, params: Optional["CalculationLineItemListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CalculationLineItem]": @@ -40,6 +41,7 @@ def list( async def list_async( self, calculation: str, + /, params: Optional["CalculationLineItemListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CalculationLineItem]": diff --git a/stripe/tax/_calculation_service.py b/stripe/tax/_calculation_service.py index cddd00669..4616b200a 100644 --- a/stripe/tax/_calculation_service.py +++ b/stripe/tax/_calculation_service.py @@ -52,6 +52,7 @@ def __getattr__(self, name): def retrieve( self, calculation: str, + /, params: Optional["CalculationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Calculation": @@ -74,6 +75,7 @@ def retrieve( async def retrieve_async( self, calculation: str, + /, params: Optional["CalculationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Calculation": diff --git a/stripe/tax/_form.py b/stripe/tax/_form.py index b7a90f9e4..c276dabf4 100644 --- a/stripe/tax/_form.py +++ b/stripe/tax/_form.py @@ -111,7 +111,7 @@ class Payee(StripeObject): """ type: Union[Literal["account", "external_reference"], str] """ - Either `account` or `external_reference`. + Specifies the payee type. """ class Us1099K(StripeObject): @@ -221,7 +221,7 @@ async def list_async( return result @classmethod - def _cls_pdf(cls, id: str, **params: Unpack["FormPdfParams"]) -> Any: + def _cls_pdf(cls, id: str, /, **params: Unpack["FormPdfParams"]) -> Any: """ Download the PDF for a tax form. """ @@ -237,7 +237,7 @@ def _cls_pdf(cls, id: str, **params: Unpack["FormPdfParams"]) -> Any: @overload @staticmethod - def pdf(id: str, **params: Unpack["FormPdfParams"]) -> Any: + def pdf(id: str, /, **params: Unpack["FormPdfParams"]) -> Any: """ Download the PDF for a tax form. """ @@ -271,7 +271,7 @@ def pdf( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_pdf_async( - cls, id: str, **params: Unpack["FormPdfParams"] + cls, id: str, /, **params: Unpack["FormPdfParams"] ) -> Any: """ Download the PDF for a tax form. @@ -288,7 +288,7 @@ async def _cls_pdf_async( @overload @staticmethod - async def pdf_async(id: str, **params: Unpack["FormPdfParams"]) -> Any: + async def pdf_async(id: str, /, **params: Unpack["FormPdfParams"]) -> Any: """ Download the PDF for a tax form. """ diff --git a/stripe/tax/_form_service.py b/stripe/tax/_form_service.py index 85633bc3c..68044398a 100644 --- a/stripe/tax/_form_service.py +++ b/stripe/tax/_form_service.py @@ -57,6 +57,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["FormRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Form": @@ -77,6 +78,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["FormRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Form": @@ -97,6 +99,7 @@ async def retrieve_async( def pdf( self, id: str, + /, params: Optional["FormPdfParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Any": @@ -117,6 +120,7 @@ def pdf( async def pdf_async( self, id: str, + /, params: Optional["FormPdfParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Any": diff --git a/stripe/tax/_location_service.py b/stripe/tax/_location_service.py index 3d33322b7..3d2f1262b 100644 --- a/stripe/tax/_location_service.py +++ b/stripe/tax/_location_service.py @@ -104,6 +104,7 @@ async def create_async( def retrieve( self, location: str, + /, params: Optional["LocationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Location": @@ -126,6 +127,7 @@ def retrieve( async def retrieve_async( self, location: str, + /, params: Optional["LocationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Location": diff --git a/stripe/tax/_registration.py b/stripe/tax/_registration.py index f2ec86c17..242640fde 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"] @@ -448,10 +392,13 @@ class Standard(StripeObject): igic: Optional[Igic] standard: Optional[Standard] type: Union[ - Literal["ioss", "oss_non_union", "oss_union", "standard"], str + Literal[ + "igic", "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} @@ -462,12 +409,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 +417,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 +424,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 +435,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 +442,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 +473,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 +481,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 +488,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 +499,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 +506,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 +517,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 +524,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 +533,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 +541,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 +548,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 +563,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 +571,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 +578,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 +639,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 +647,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 +654,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 +665,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 +672,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 +683,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 +690,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 +723,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 +731,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 +738,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 +759,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 +767,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 +774,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 +833,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 +841,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 +848,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 +859,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 +866,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 +877,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 +884,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 +905,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 +913,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 +920,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 +939,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 +947,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 +954,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 +965,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 +972,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"] diff --git a/stripe/tax/_registration_service.py b/stripe/tax/_registration_service.py index 97cc68b99..a60ff9813 100644 --- a/stripe/tax/_registration_service.py +++ b/stripe/tax/_registration_service.py @@ -106,6 +106,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["RegistrationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Registration": @@ -126,6 +127,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["RegistrationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Registration": @@ -146,6 +148,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["RegistrationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Registration": @@ -168,6 +171,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["RegistrationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Registration": @@ -212,6 +216,7 @@ def serialize_batch_create( def serialize_batch_update( self, id: str, + /, params: Optional["RegistrationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> str: diff --git a/stripe/tax/_transaction.py b/stripe/tax/_transaction.py index ae9f2709d..54e2c9438 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -523,6 +523,7 @@ async def create_reversal_async( def _cls_list_line_items( cls, transaction: str, + /, **params: Unpack["TransactionListLineItemsParams"], ) -> ListObject["TransactionLineItem"]: """ @@ -542,7 +543,7 @@ def _cls_list_line_items( @overload @staticmethod def list_line_items( - transaction: str, **params: Unpack["TransactionListLineItemsParams"] + transaction: str, /, **params: Unpack["TransactionListLineItemsParams"] ) -> ListObject["TransactionLineItem"]: """ Retrieves the line items of a committed standalone transaction as a collection. @@ -580,6 +581,7 @@ def list_line_items( # pyright: ignore[reportGeneralTypeIssues] async def _cls_list_line_items_async( cls, transaction: str, + /, **params: Unpack["TransactionListLineItemsParams"], ) -> ListObject["TransactionLineItem"]: """ @@ -599,7 +601,7 @@ async def _cls_list_line_items_async( @overload @staticmethod async def list_line_items_async( - transaction: str, **params: Unpack["TransactionListLineItemsParams"] + transaction: str, /, **params: Unpack["TransactionListLineItemsParams"] ) -> ListObject["TransactionLineItem"]: """ Retrieves the line items of a committed standalone transaction as a collection. 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/tax/_transaction_line_item_service.py b/stripe/tax/_transaction_line_item_service.py index 2393374b8..3190e6dac 100644 --- a/stripe/tax/_transaction_line_item_service.py +++ b/stripe/tax/_transaction_line_item_service.py @@ -18,6 +18,7 @@ class TransactionLineItemService(StripeService): def list( self, transaction: str, + /, params: Optional["TransactionLineItemListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[TransactionLineItem]": @@ -40,6 +41,7 @@ def list( async def list_async( self, transaction: str, + /, params: Optional["TransactionLineItemListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[TransactionLineItem]": diff --git a/stripe/tax/_transaction_service.py b/stripe/tax/_transaction_service.py index dc964f82c..2699f4b56 100644 --- a/stripe/tax/_transaction_service.py +++ b/stripe/tax/_transaction_service.py @@ -58,6 +58,7 @@ def __getattr__(self, name): def retrieve( self, transaction: str, + /, params: Optional["TransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": @@ -80,6 +81,7 @@ def retrieve( async def retrieve_async( self, transaction: str, + /, params: Optional["TransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": diff --git a/stripe/terminal/_configuration_service.py b/stripe/terminal/_configuration_service.py index 0d6f251ee..040a10834 100644 --- a/stripe/terminal/_configuration_service.py +++ b/stripe/terminal/_configuration_service.py @@ -30,6 +30,7 @@ class ConfigurationService(StripeService): def delete( self, configuration: str, + /, params: Optional["ConfigurationDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Configuration": @@ -52,6 +53,7 @@ def delete( async def delete_async( self, configuration: str, + /, params: Optional["ConfigurationDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Configuration": @@ -74,6 +76,7 @@ async def delete_async( def retrieve( self, configuration: str, + /, params: Optional["ConfigurationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Configuration": @@ -96,6 +99,7 @@ def retrieve( async def retrieve_async( self, configuration: str, + /, params: Optional["ConfigurationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Configuration": @@ -118,6 +122,7 @@ async def retrieve_async( def update( self, configuration: str, + /, params: Optional["ConfigurationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Configuration": @@ -140,6 +145,7 @@ def update( async def update_async( self, configuration: str, + /, params: Optional["ConfigurationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Configuration": diff --git a/stripe/terminal/_location_service.py b/stripe/terminal/_location_service.py index 9c0aaf36d..05589040e 100644 --- a/stripe/terminal/_location_service.py +++ b/stripe/terminal/_location_service.py @@ -28,6 +28,7 @@ class LocationService(StripeService): def delete( self, location: str, + /, params: Optional["LocationDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Location": @@ -50,6 +51,7 @@ def delete( async def delete_async( self, location: str, + /, params: Optional["LocationDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Location": @@ -72,6 +74,7 @@ async def delete_async( def retrieve( self, location: str, + /, params: Optional["LocationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Location": @@ -94,6 +97,7 @@ def retrieve( async def retrieve_async( self, location: str, + /, params: Optional["LocationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Location": @@ -116,6 +120,7 @@ async def retrieve_async( def update( self, location: str, + /, params: Optional["LocationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Location": @@ -138,6 +143,7 @@ def update( async def update_async( self, location: str, + /, params: Optional["LocationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Location": diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index e82b63dbe..a97ddbcc3 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -1085,7 +1085,7 @@ class LineItem(StripeObject): @classmethod def _cls_activate_gift_card( - cls, reader: str, **params: Unpack["ReaderActivateGiftCardParams"] + cls, reader: str, /, **params: Unpack["ReaderActivateGiftCardParams"] ) -> "Reader": """ Initiates a gift card activation flow on a Reader and optionally sets its balance. @@ -1104,7 +1104,7 @@ def _cls_activate_gift_card( @overload @staticmethod def activate_gift_card( - reader: str, **params: Unpack["ReaderActivateGiftCardParams"] + reader: str, /, **params: Unpack["ReaderActivateGiftCardParams"] ) -> "Reader": """ Initiates a gift card activation flow on a Reader and optionally sets its balance. @@ -1140,7 +1140,7 @@ def activate_gift_card( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_activate_gift_card_async( - cls, reader: str, **params: Unpack["ReaderActivateGiftCardParams"] + cls, reader: str, /, **params: Unpack["ReaderActivateGiftCardParams"] ) -> "Reader": """ Initiates a gift card activation flow on a Reader and optionally sets its balance. @@ -1159,7 +1159,7 @@ async def _cls_activate_gift_card_async( @overload @staticmethod async def activate_gift_card_async( - reader: str, **params: Unpack["ReaderActivateGiftCardParams"] + reader: str, /, **params: Unpack["ReaderActivateGiftCardParams"] ) -> "Reader": """ Initiates a gift card activation flow on a Reader and optionally sets its balance. @@ -1195,7 +1195,7 @@ async def activate_gift_card_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_cancel_action( - cls, reader: str, **params: Unpack["ReaderCancelActionParams"] + cls, reader: str, /, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. @@ -1214,7 +1214,7 @@ def _cls_cancel_action( @overload @staticmethod def cancel_action( - reader: str, **params: Unpack["ReaderCancelActionParams"] + reader: str, /, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. @@ -1250,7 +1250,7 @@ def cancel_action( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_action_async( - cls, reader: str, **params: Unpack["ReaderCancelActionParams"] + cls, reader: str, /, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. @@ -1269,7 +1269,7 @@ async def _cls_cancel_action_async( @overload @staticmethod async def cancel_action_async( - reader: str, **params: Unpack["ReaderCancelActionParams"] + reader: str, /, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details. @@ -1305,7 +1305,7 @@ async def cancel_action_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_cashout_gift_card( - cls, reader: str, **params: Unpack["ReaderCashoutGiftCardParams"] + cls, reader: str, /, **params: Unpack["ReaderCashoutGiftCardParams"] ) -> "Reader": """ Initiates a gift card cashout flow on a Reader. A cashout sets the gift card balance to 0. @@ -1324,7 +1324,7 @@ def _cls_cashout_gift_card( @overload @staticmethod def cashout_gift_card( - reader: str, **params: Unpack["ReaderCashoutGiftCardParams"] + reader: str, /, **params: Unpack["ReaderCashoutGiftCardParams"] ) -> "Reader": """ Initiates a gift card cashout flow on a Reader. A cashout sets the gift card balance to 0. @@ -1360,7 +1360,7 @@ def cashout_gift_card( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cashout_gift_card_async( - cls, reader: str, **params: Unpack["ReaderCashoutGiftCardParams"] + cls, reader: str, /, **params: Unpack["ReaderCashoutGiftCardParams"] ) -> "Reader": """ Initiates a gift card cashout flow on a Reader. A cashout sets the gift card balance to 0. @@ -1379,7 +1379,7 @@ async def _cls_cashout_gift_card_async( @overload @staticmethod async def cashout_gift_card_async( - reader: str, **params: Unpack["ReaderCashoutGiftCardParams"] + reader: str, /, **params: Unpack["ReaderCashoutGiftCardParams"] ) -> "Reader": """ Initiates a gift card cashout flow on a Reader. A cashout sets the gift card balance to 0. @@ -1415,7 +1415,10 @@ async def cashout_gift_card_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_check_gift_card_balance( - cls, reader: str, **params: Unpack["ReaderCheckGiftCardBalanceParams"] + cls, + reader: str, + /, + **params: Unpack["ReaderCheckGiftCardBalanceParams"], ) -> "Reader": """ Initiates a gift card balance check flow on a Reader. @@ -1434,7 +1437,7 @@ def _cls_check_gift_card_balance( @overload @staticmethod def check_gift_card_balance( - reader: str, **params: Unpack["ReaderCheckGiftCardBalanceParams"] + reader: str, /, **params: Unpack["ReaderCheckGiftCardBalanceParams"] ) -> "Reader": """ Initiates a gift card balance check flow on a Reader. @@ -1470,7 +1473,10 @@ def check_gift_card_balance( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_check_gift_card_balance_async( - cls, reader: str, **params: Unpack["ReaderCheckGiftCardBalanceParams"] + cls, + reader: str, + /, + **params: Unpack["ReaderCheckGiftCardBalanceParams"], ) -> "Reader": """ Initiates a gift card balance check flow on a Reader. @@ -1489,7 +1495,7 @@ async def _cls_check_gift_card_balance_async( @overload @staticmethod async def check_gift_card_balance_async( - reader: str, **params: Unpack["ReaderCheckGiftCardBalanceParams"] + reader: str, /, **params: Unpack["ReaderCheckGiftCardBalanceParams"] ) -> "Reader": """ Initiates a gift card balance check flow on a Reader. @@ -1525,7 +1531,7 @@ async def check_gift_card_balance_async( # pyright: ignore[reportGeneralTypeIss @classmethod def _cls_collect_inputs( - cls, reader: str, **params: Unpack["ReaderCollectInputsParams"] + cls, reader: str, /, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. @@ -1544,7 +1550,7 @@ def _cls_collect_inputs( @overload @staticmethod def collect_inputs( - reader: str, **params: Unpack["ReaderCollectInputsParams"] + reader: str, /, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. @@ -1580,7 +1586,7 @@ def collect_inputs( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_collect_inputs_async( - cls, reader: str, **params: Unpack["ReaderCollectInputsParams"] + cls, reader: str, /, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. @@ -1599,7 +1605,7 @@ async def _cls_collect_inputs_async( @overload @staticmethod async def collect_inputs_async( - reader: str, **params: Unpack["ReaderCollectInputsParams"] + reader: str, /, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers. @@ -1635,7 +1641,10 @@ async def collect_inputs_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_collect_payment_method( - cls, reader: str, **params: Unpack["ReaderCollectPaymentMethodParams"] + cls, + reader: str, + /, + **params: Unpack["ReaderCollectPaymentMethodParams"], ) -> "Reader": """ Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. @@ -1654,7 +1663,7 @@ def _cls_collect_payment_method( @overload @staticmethod def collect_payment_method( - reader: str, **params: Unpack["ReaderCollectPaymentMethodParams"] + reader: str, /, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. @@ -1690,7 +1699,10 @@ def collect_payment_method( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_collect_payment_method_async( - cls, reader: str, **params: Unpack["ReaderCollectPaymentMethodParams"] + cls, + reader: str, + /, + **params: Unpack["ReaderCollectPaymentMethodParams"], ) -> "Reader": """ Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. @@ -1709,7 +1721,7 @@ async def _cls_collect_payment_method_async( @overload @staticmethod async def collect_payment_method_async( - reader: str, **params: Unpack["ReaderCollectPaymentMethodParams"] + reader: str, /, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details. @@ -1745,7 +1757,10 @@ async def collect_payment_method_async( # pyright: ignore[reportGeneralTypeIssu @classmethod def _cls_confirm_payment_intent( - cls, reader: str, **params: Unpack["ReaderConfirmPaymentIntentParams"] + cls, + reader: str, + /, + **params: Unpack["ReaderConfirmPaymentIntentParams"], ) -> "Reader": """ Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. @@ -1764,7 +1779,7 @@ def _cls_confirm_payment_intent( @overload @staticmethod def confirm_payment_intent( - reader: str, **params: Unpack["ReaderConfirmPaymentIntentParams"] + reader: str, /, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. @@ -1800,7 +1815,10 @@ def confirm_payment_intent( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_confirm_payment_intent_async( - cls, reader: str, **params: Unpack["ReaderConfirmPaymentIntentParams"] + cls, + reader: str, + /, + **params: Unpack["ReaderConfirmPaymentIntentParams"], ) -> "Reader": """ Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. @@ -1819,7 +1837,7 @@ async def _cls_confirm_payment_intent_async( @overload @staticmethod async def confirm_payment_intent_async( - reader: str, **params: Unpack["ReaderConfirmPaymentIntentParams"] + reader: str, /, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details. @@ -2053,7 +2071,10 @@ async def modify_async( @classmethod def _cls_process_payment_intent( - cls, reader: str, **params: Unpack["ReaderProcessPaymentIntentParams"] + cls, + reader: str, + /, + **params: Unpack["ReaderProcessPaymentIntentParams"], ) -> "Reader": """ Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. @@ -2072,7 +2093,7 @@ def _cls_process_payment_intent( @overload @staticmethod def process_payment_intent( - reader: str, **params: Unpack["ReaderProcessPaymentIntentParams"] + reader: str, /, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. @@ -2108,7 +2129,10 @@ def process_payment_intent( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_process_payment_intent_async( - cls, reader: str, **params: Unpack["ReaderProcessPaymentIntentParams"] + cls, + reader: str, + /, + **params: Unpack["ReaderProcessPaymentIntentParams"], ) -> "Reader": """ Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. @@ -2127,7 +2151,7 @@ async def _cls_process_payment_intent_async( @overload @staticmethod async def process_payment_intent_async( - reader: str, **params: Unpack["ReaderProcessPaymentIntentParams"] + reader: str, /, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details. @@ -2163,7 +2187,7 @@ async def process_payment_intent_async( # pyright: ignore[reportGeneralTypeIssu @classmethod def _cls_process_setup_intent( - cls, reader: str, **params: Unpack["ReaderProcessSetupIntentParams"] + cls, reader: str, /, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details. @@ -2182,7 +2206,7 @@ def _cls_process_setup_intent( @overload @staticmethod def process_setup_intent( - reader: str, **params: Unpack["ReaderProcessSetupIntentParams"] + reader: str, /, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details. @@ -2218,7 +2242,7 @@ def process_setup_intent( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_process_setup_intent_async( - cls, reader: str, **params: Unpack["ReaderProcessSetupIntentParams"] + cls, reader: str, /, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details. @@ -2237,7 +2261,7 @@ async def _cls_process_setup_intent_async( @overload @staticmethod async def process_setup_intent_async( - reader: str, **params: Unpack["ReaderProcessSetupIntentParams"] + reader: str, /, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details. @@ -2273,7 +2297,7 @@ async def process_setup_intent_async( # pyright: ignore[reportGeneralTypeIssues @classmethod def _cls_refund_payment( - cls, reader: str, **params: Unpack["ReaderRefundPaymentParams"] + cls, reader: str, /, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. @@ -2292,7 +2316,7 @@ def _cls_refund_payment( @overload @staticmethod def refund_payment( - reader: str, **params: Unpack["ReaderRefundPaymentParams"] + reader: str, /, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. @@ -2328,7 +2352,7 @@ def refund_payment( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_refund_payment_async( - cls, reader: str, **params: Unpack["ReaderRefundPaymentParams"] + cls, reader: str, /, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. @@ -2347,7 +2371,7 @@ async def _cls_refund_payment_async( @overload @staticmethod async def refund_payment_async( - reader: str, **params: Unpack["ReaderRefundPaymentParams"] + reader: str, /, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details. @@ -2383,7 +2407,7 @@ async def refund_payment_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_reload_gift_card( - cls, reader: str, **params: Unpack["ReaderReloadGiftCardParams"] + cls, reader: str, /, **params: Unpack["ReaderReloadGiftCardParams"] ) -> "Reader": """ Initiates a gift card reload flow on a Reader by adding the specified amount to its balance. @@ -2402,7 +2426,7 @@ def _cls_reload_gift_card( @overload @staticmethod def reload_gift_card( - reader: str, **params: Unpack["ReaderReloadGiftCardParams"] + reader: str, /, **params: Unpack["ReaderReloadGiftCardParams"] ) -> "Reader": """ Initiates a gift card reload flow on a Reader by adding the specified amount to its balance. @@ -2438,7 +2462,7 @@ def reload_gift_card( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_reload_gift_card_async( - cls, reader: str, **params: Unpack["ReaderReloadGiftCardParams"] + cls, reader: str, /, **params: Unpack["ReaderReloadGiftCardParams"] ) -> "Reader": """ Initiates a gift card reload flow on a Reader by adding the specified amount to its balance. @@ -2457,7 +2481,7 @@ async def _cls_reload_gift_card_async( @overload @staticmethod async def reload_gift_card_async( - reader: str, **params: Unpack["ReaderReloadGiftCardParams"] + reader: str, /, **params: Unpack["ReaderReloadGiftCardParams"] ) -> "Reader": """ Initiates a gift card reload flow on a Reader by adding the specified amount to its balance. @@ -2515,7 +2539,7 @@ async def retrieve_async( @classmethod def _cls_set_reader_display( - cls, reader: str, **params: Unpack["ReaderSetReaderDisplayParams"] + cls, reader: str, /, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display). @@ -2534,7 +2558,7 @@ def _cls_set_reader_display( @overload @staticmethod def set_reader_display( - reader: str, **params: Unpack["ReaderSetReaderDisplayParams"] + reader: str, /, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display). @@ -2570,7 +2594,7 @@ def set_reader_display( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_set_reader_display_async( - cls, reader: str, **params: Unpack["ReaderSetReaderDisplayParams"] + cls, reader: str, /, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display). @@ -2589,7 +2613,7 @@ async def _cls_set_reader_display_async( @overload @staticmethod async def set_reader_display_async( - reader: str, **params: Unpack["ReaderSetReaderDisplayParams"] + reader: str, /, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display). @@ -2630,6 +2654,7 @@ class TestHelpers(APIResourceTestHelpers["Reader"]): def _cls_present_payment_method( cls, reader: str, + /, **params: Unpack["ReaderPresentPaymentMethodParams"], ) -> "Reader": """ @@ -2649,7 +2674,9 @@ def _cls_present_payment_method( @overload @staticmethod def present_payment_method( - reader: str, **params: Unpack["ReaderPresentPaymentMethodParams"] + reader: str, + /, + **params: Unpack["ReaderPresentPaymentMethodParams"], ) -> "Reader": """ Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. @@ -2687,6 +2714,7 @@ def present_payment_method( # pyright: ignore[reportGeneralTypeIssues] async def _cls_present_payment_method_async( cls, reader: str, + /, **params: Unpack["ReaderPresentPaymentMethodParams"], ) -> "Reader": """ @@ -2706,7 +2734,9 @@ async def _cls_present_payment_method_async( @overload @staticmethod async def present_payment_method_async( - reader: str, **params: Unpack["ReaderPresentPaymentMethodParams"] + reader: str, + /, + **params: Unpack["ReaderPresentPaymentMethodParams"], ) -> "Reader": """ Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. @@ -2744,6 +2774,7 @@ async def present_payment_method_async( # pyright: ignore[reportGeneralTypeIssu def _cls_succeed_input_collection( cls, reader: str, + /, **params: Unpack["ReaderSucceedInputCollectionParams"], ) -> "Reader": """ @@ -2763,7 +2794,9 @@ def _cls_succeed_input_collection( @overload @staticmethod def succeed_input_collection( - reader: str, **params: Unpack["ReaderSucceedInputCollectionParams"] + reader: str, + /, + **params: Unpack["ReaderSucceedInputCollectionParams"], ) -> "Reader": """ Use this endpoint to trigger a successful input collection on a simulated reader. @@ -2801,6 +2834,7 @@ def succeed_input_collection( # pyright: ignore[reportGeneralTypeIssues] async def _cls_succeed_input_collection_async( cls, reader: str, + /, **params: Unpack["ReaderSucceedInputCollectionParams"], ) -> "Reader": """ @@ -2820,7 +2854,9 @@ async def _cls_succeed_input_collection_async( @overload @staticmethod async def succeed_input_collection_async( - reader: str, **params: Unpack["ReaderSucceedInputCollectionParams"] + reader: str, + /, + **params: Unpack["ReaderSucceedInputCollectionParams"], ) -> "Reader": """ Use this endpoint to trigger a successful input collection on a simulated reader. @@ -2858,6 +2894,7 @@ async def succeed_input_collection_async( # pyright: ignore[reportGeneralTypeIs def _cls_timeout_input_collection( cls, reader: str, + /, **params: Unpack["ReaderTimeoutInputCollectionParams"], ) -> "Reader": """ @@ -2877,7 +2914,9 @@ def _cls_timeout_input_collection( @overload @staticmethod def timeout_input_collection( - reader: str, **params: Unpack["ReaderTimeoutInputCollectionParams"] + reader: str, + /, + **params: Unpack["ReaderTimeoutInputCollectionParams"], ) -> "Reader": """ Use this endpoint to complete an input collection with a timeout error on a simulated reader. @@ -2915,6 +2954,7 @@ def timeout_input_collection( # pyright: ignore[reportGeneralTypeIssues] async def _cls_timeout_input_collection_async( cls, reader: str, + /, **params: Unpack["ReaderTimeoutInputCollectionParams"], ) -> "Reader": """ @@ -2934,7 +2974,9 @@ async def _cls_timeout_input_collection_async( @overload @staticmethod async def timeout_input_collection_async( - reader: str, **params: Unpack["ReaderTimeoutInputCollectionParams"] + reader: str, + /, + **params: Unpack["ReaderTimeoutInputCollectionParams"], ) -> "Reader": """ Use this endpoint to complete an input collection with a timeout error on a simulated reader. diff --git a/stripe/terminal/_reader_collected_data_service.py b/stripe/terminal/_reader_collected_data_service.py index 188a014c3..117e86d26 100644 --- a/stripe/terminal/_reader_collected_data_service.py +++ b/stripe/terminal/_reader_collected_data_service.py @@ -17,6 +17,7 @@ class ReaderCollectedDataService(StripeService): def retrieve( self, reader_collected_data: str, + /, params: Optional["ReaderCollectedDataRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReaderCollectedData": @@ -39,6 +40,7 @@ def retrieve( async def retrieve_async( self, reader_collected_data: str, + /, params: Optional["ReaderCollectedDataRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReaderCollectedData": diff --git a/stripe/terminal/_reader_service.py b/stripe/terminal/_reader_service.py index fdf467eba..edefb7a76 100644 --- a/stripe/terminal/_reader_service.py +++ b/stripe/terminal/_reader_service.py @@ -58,6 +58,7 @@ class ReaderService(StripeService): def delete( self, reader: str, + /, params: Optional["ReaderDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -80,6 +81,7 @@ def delete( async def delete_async( self, reader: str, + /, params: Optional["ReaderDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -102,6 +104,7 @@ async def delete_async( def retrieve( self, reader: str, + /, params: Optional["ReaderRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -124,6 +127,7 @@ def retrieve( async def retrieve_async( self, reader: str, + /, params: Optional["ReaderRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -146,6 +150,7 @@ async def retrieve_async( def update( self, reader: str, + /, params: Optional["ReaderUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -168,6 +173,7 @@ def update( async def update_async( self, reader: str, + /, params: Optional["ReaderUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -266,6 +272,7 @@ async def create_async( def activate_gift_card( self, reader: str, + /, params: "ReaderActivateGiftCardParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -288,6 +295,7 @@ def activate_gift_card( async def activate_gift_card_async( self, reader: str, + /, params: "ReaderActivateGiftCardParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -310,6 +318,7 @@ async def activate_gift_card_async( def cancel_action( self, reader: str, + /, params: Optional["ReaderCancelActionParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -332,6 +341,7 @@ def cancel_action( async def cancel_action_async( self, reader: str, + /, params: Optional["ReaderCancelActionParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -354,6 +364,7 @@ async def cancel_action_async( def cashout_gift_card( self, reader: str, + /, params: "ReaderCashoutGiftCardParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -376,6 +387,7 @@ def cashout_gift_card( async def cashout_gift_card_async( self, reader: str, + /, params: "ReaderCashoutGiftCardParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -398,6 +410,7 @@ async def cashout_gift_card_async( def check_gift_card_balance( self, reader: str, + /, params: "ReaderCheckGiftCardBalanceParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -420,6 +433,7 @@ def check_gift_card_balance( async def check_gift_card_balance_async( self, reader: str, + /, params: "ReaderCheckGiftCardBalanceParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -442,6 +456,7 @@ async def check_gift_card_balance_async( def collect_inputs( self, reader: str, + /, params: "ReaderCollectInputsParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -464,6 +479,7 @@ def collect_inputs( async def collect_inputs_async( self, reader: str, + /, params: "ReaderCollectInputsParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -486,6 +502,7 @@ async def collect_inputs_async( def collect_payment_method( self, reader: str, + /, params: "ReaderCollectPaymentMethodParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -508,6 +525,7 @@ def collect_payment_method( async def collect_payment_method_async( self, reader: str, + /, params: "ReaderCollectPaymentMethodParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -530,6 +548,7 @@ async def collect_payment_method_async( def confirm_payment_intent( self, reader: str, + /, params: "ReaderConfirmPaymentIntentParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -552,6 +571,7 @@ def confirm_payment_intent( async def confirm_payment_intent_async( self, reader: str, + /, params: "ReaderConfirmPaymentIntentParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -574,6 +594,7 @@ async def confirm_payment_intent_async( def process_payment_intent( self, reader: str, + /, params: "ReaderProcessPaymentIntentParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -596,6 +617,7 @@ def process_payment_intent( async def process_payment_intent_async( self, reader: str, + /, params: "ReaderProcessPaymentIntentParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -618,6 +640,7 @@ async def process_payment_intent_async( def process_setup_intent( self, reader: str, + /, params: "ReaderProcessSetupIntentParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -640,6 +663,7 @@ def process_setup_intent( async def process_setup_intent_async( self, reader: str, + /, params: "ReaderProcessSetupIntentParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -662,6 +686,7 @@ async def process_setup_intent_async( def refund_payment( self, reader: str, + /, params: Optional["ReaderRefundPaymentParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -684,6 +709,7 @@ def refund_payment( async def refund_payment_async( self, reader: str, + /, params: Optional["ReaderRefundPaymentParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -706,6 +732,7 @@ async def refund_payment_async( def reload_gift_card( self, reader: str, + /, params: "ReaderReloadGiftCardParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -728,6 +755,7 @@ def reload_gift_card( async def reload_gift_card_async( self, reader: str, + /, params: "ReaderReloadGiftCardParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -750,6 +778,7 @@ async def reload_gift_card_async( def set_reader_display( self, reader: str, + /, params: "ReaderSetReaderDisplayParams", options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -772,6 +801,7 @@ def set_reader_display( async def set_reader_display_async( self, reader: str, + /, params: "ReaderSetReaderDisplayParams", options: Optional["RequestOptions"] = None, ) -> "Reader": diff --git a/stripe/test_helpers/_customer_service.py b/stripe/test_helpers/_customer_service.py index a9da41ccd..e6b651ff3 100644 --- a/stripe/test_helpers/_customer_service.py +++ b/stripe/test_helpers/_customer_service.py @@ -19,6 +19,7 @@ class CustomerService(StripeService): def fund_cash_balance( self, customer: str, + /, params: "CustomerFundCashBalanceParams", options: Optional["RequestOptions"] = None, ) -> "CustomerCashBalanceTransaction": @@ -41,6 +42,7 @@ def fund_cash_balance( async def fund_cash_balance_async( self, customer: str, + /, params: "CustomerFundCashBalanceParams", options: Optional["RequestOptions"] = None, ) -> "CustomerCashBalanceTransaction": diff --git a/stripe/test_helpers/_payment_intent_service.py b/stripe/test_helpers/_payment_intent_service.py index 86f8f32ec..c92570fcc 100644 --- a/stripe/test_helpers/_payment_intent_service.py +++ b/stripe/test_helpers/_payment_intent_service.py @@ -17,6 +17,7 @@ class PaymentIntentService(StripeService): def simulate_crypto_deposit( self, intent: str, + /, params: "PaymentIntentSimulateCryptoDepositParams", options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": @@ -39,6 +40,7 @@ def simulate_crypto_deposit( async def simulate_crypto_deposit_async( self, intent: str, + /, params: "PaymentIntentSimulateCryptoDepositParams", options: Optional["RequestOptions"] = None, ) -> "PaymentIntent": diff --git a/stripe/test_helpers/_refund_service.py b/stripe/test_helpers/_refund_service.py index 92969f298..893194706 100644 --- a/stripe/test_helpers/_refund_service.py +++ b/stripe/test_helpers/_refund_service.py @@ -17,6 +17,7 @@ class RefundService(StripeService): def expire( self, refund: str, + /, params: Optional["RefundExpireParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Refund": @@ -39,6 +40,7 @@ def expire( async def expire_async( self, refund: str, + /, params: Optional["RefundExpireParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Refund": diff --git a/stripe/test_helpers/_test_clock.py b/stripe/test_helpers/_test_clock.py index e0aa91ed9..5cfc58f8f 100644 --- a/stripe/test_helpers/_test_clock.py +++ b/stripe/test_helpers/_test_clock.py @@ -92,7 +92,7 @@ class Advancing(StripeObject): @classmethod def _cls_advance( - cls, test_clock: str, **params: Unpack["TestClockAdvanceParams"] + cls, test_clock: str, /, **params: Unpack["TestClockAdvanceParams"] ) -> "TestClock": """ Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. @@ -111,7 +111,7 @@ def _cls_advance( @overload @staticmethod def advance( - test_clock: str, **params: Unpack["TestClockAdvanceParams"] + test_clock: str, /, **params: Unpack["TestClockAdvanceParams"] ) -> "TestClock": """ Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. @@ -147,7 +147,7 @@ def advance( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_advance_async( - cls, test_clock: str, **params: Unpack["TestClockAdvanceParams"] + cls, test_clock: str, /, **params: Unpack["TestClockAdvanceParams"] ) -> "TestClock": """ Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. @@ -166,7 +166,7 @@ async def _cls_advance_async( @overload @staticmethod async def advance_async( - test_clock: str, **params: Unpack["TestClockAdvanceParams"] + test_clock: str, /, **params: Unpack["TestClockAdvanceParams"] ) -> "TestClock": """ Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. diff --git a/stripe/test_helpers/_test_clock_service.py b/stripe/test_helpers/_test_clock_service.py index 07f5af6f4..99b2ea2b2 100644 --- a/stripe/test_helpers/_test_clock_service.py +++ b/stripe/test_helpers/_test_clock_service.py @@ -30,6 +30,7 @@ class TestClockService(StripeService): def delete( self, test_clock: str, + /, params: Optional["TestClockDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TestClock": @@ -52,6 +53,7 @@ def delete( async def delete_async( self, test_clock: str, + /, params: Optional["TestClockDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TestClock": @@ -74,6 +76,7 @@ async def delete_async( def retrieve( self, test_clock: str, + /, params: Optional["TestClockRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TestClock": @@ -96,6 +99,7 @@ def retrieve( async def retrieve_async( self, test_clock: str, + /, params: Optional["TestClockRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TestClock": @@ -194,6 +198,7 @@ async def create_async( def advance( self, test_clock: str, + /, params: "TestClockAdvanceParams", options: Optional["RequestOptions"] = None, ) -> "TestClock": @@ -216,6 +221,7 @@ def advance( async def advance_async( self, test_clock: str, + /, params: "TestClockAdvanceParams", options: Optional["RequestOptions"] = None, ) -> "TestClock": diff --git a/stripe/test_helpers/capital/_financing_offer_service.py b/stripe/test_helpers/capital/_financing_offer_service.py index 143a25627..980007193 100644 --- a/stripe/test_helpers/capital/_financing_offer_service.py +++ b/stripe/test_helpers/capital/_financing_offer_service.py @@ -58,6 +58,7 @@ async def create_async( def refill( self, financing_offer: str, + /, params: "FinancingOfferRefillParams", options: Optional["RequestOptions"] = None, ) -> "FinancingOffer": @@ -80,6 +81,7 @@ def refill( async def refill_async( self, financing_offer: str, + /, params: "FinancingOfferRefillParams", options: Optional["RequestOptions"] = None, ) -> "FinancingOffer": diff --git a/stripe/test_helpers/issuing/_authorization_service.py b/stripe/test_helpers/issuing/_authorization_service.py index df546d3f9..23f40f7c9 100644 --- a/stripe/test_helpers/issuing/_authorization_service.py +++ b/stripe/test_helpers/issuing/_authorization_service.py @@ -73,6 +73,7 @@ async def create_async( def capture( self, authorization: str, + /, params: Optional["AuthorizationCaptureParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -95,6 +96,7 @@ def capture( async def capture_async( self, authorization: str, + /, params: Optional["AuthorizationCaptureParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -117,6 +119,7 @@ async def capture_async( def expire( self, authorization: str, + /, params: Optional["AuthorizationExpireParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -139,6 +142,7 @@ def expire( async def expire_async( self, authorization: str, + /, params: Optional["AuthorizationExpireParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -161,6 +165,7 @@ async def expire_async( def finalize_amount( self, authorization: str, + /, params: "AuthorizationFinalizeAmountParams", options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -183,6 +188,7 @@ def finalize_amount( async def finalize_amount_async( self, authorization: str, + /, params: "AuthorizationFinalizeAmountParams", options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -205,6 +211,7 @@ async def finalize_amount_async( def respond( self, authorization: str, + /, params: "AuthorizationRespondParams", options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -227,6 +234,7 @@ def respond( async def respond_async( self, authorization: str, + /, params: "AuthorizationRespondParams", options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -249,6 +257,7 @@ async def respond_async( def increment( self, authorization: str, + /, params: "AuthorizationIncrementParams", options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -271,6 +280,7 @@ def increment( async def increment_async( self, authorization: str, + /, params: "AuthorizationIncrementParams", options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -293,6 +303,7 @@ async def increment_async( def reverse( self, authorization: str, + /, params: Optional["AuthorizationReverseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": @@ -315,6 +326,7 @@ def reverse( async def reverse_async( self, authorization: str, + /, params: Optional["AuthorizationReverseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Authorization": diff --git a/stripe/test_helpers/issuing/_card_service.py b/stripe/test_helpers/issuing/_card_service.py index 8aaf8937b..ad0e1a573 100644 --- a/stripe/test_helpers/issuing/_card_service.py +++ b/stripe/test_helpers/issuing/_card_service.py @@ -29,6 +29,7 @@ class CardService(StripeService): def deliver_card( self, card: str, + /, params: Optional["CardDeliverCardParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Card": @@ -51,6 +52,7 @@ def deliver_card( async def deliver_card_async( self, card: str, + /, params: Optional["CardDeliverCardParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Card": @@ -73,6 +75,7 @@ async def deliver_card_async( def fail_card( self, card: str, + /, params: Optional["CardFailCardParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Card": @@ -95,6 +98,7 @@ def fail_card( async def fail_card_async( self, card: str, + /, params: Optional["CardFailCardParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Card": @@ -117,6 +121,7 @@ async def fail_card_async( def return_card( self, card: str, + /, params: Optional["CardReturnCardParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Card": @@ -139,6 +144,7 @@ def return_card( async def return_card_async( self, card: str, + /, params: Optional["CardReturnCardParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Card": @@ -161,6 +167,7 @@ async def return_card_async( def ship_card( self, card: str, + /, params: Optional["CardShipCardParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Card": @@ -183,6 +190,7 @@ def ship_card( async def ship_card_async( self, card: str, + /, params: Optional["CardShipCardParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Card": @@ -205,6 +213,7 @@ async def ship_card_async( def submit_card( self, card: str, + /, params: Optional["CardSubmitCardParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Card": @@ -227,6 +236,7 @@ def submit_card( async def submit_card_async( self, card: str, + /, params: Optional["CardSubmitCardParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Card": diff --git a/stripe/test_helpers/issuing/_dispute_service.py b/stripe/test_helpers/issuing/_dispute_service.py index 6580d9051..e83e2960c 100644 --- a/stripe/test_helpers/issuing/_dispute_service.py +++ b/stripe/test_helpers/issuing/_dispute_service.py @@ -29,6 +29,7 @@ class DisputeService(StripeService): def close( self, dispute: str, + /, params: "DisputeCloseParams", options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -51,6 +52,7 @@ def close( async def close_async( self, dispute: str, + /, params: "DisputeCloseParams", options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -73,6 +75,7 @@ async def close_async( def provisional_credit( self, dispute: str, + /, params: Optional["DisputeProvisionalCreditParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -95,6 +98,7 @@ def provisional_credit( async def provisional_credit_async( self, dispute: str, + /, params: Optional["DisputeProvisionalCreditParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -117,6 +121,7 @@ async def provisional_credit_async( def simulate_network_lifecycle_dispute_response( self, dispute: str, + /, params: "DisputeSimulateNetworkLifecycleDisputeResponseParams", options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -139,6 +144,7 @@ def simulate_network_lifecycle_dispute_response( async def simulate_network_lifecycle_dispute_response_async( self, dispute: str, + /, params: "DisputeSimulateNetworkLifecycleDisputeResponseParams", options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -161,6 +167,7 @@ async def simulate_network_lifecycle_dispute_response_async( def simulate_network_lifecycle_pre_arbitration_response( self, dispute: str, + /, params: "DisputeSimulateNetworkLifecyclePreArbitrationResponseParams", options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -183,6 +190,7 @@ def simulate_network_lifecycle_pre_arbitration_response( async def simulate_network_lifecycle_pre_arbitration_response_async( self, dispute: str, + /, params: "DisputeSimulateNetworkLifecyclePreArbitrationResponseParams", options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -205,6 +213,7 @@ async def simulate_network_lifecycle_pre_arbitration_response_async( def simulate_network_lifecycle_pre_arbitration_submission( self, dispute: str, + /, params: "DisputeSimulateNetworkLifecyclePreArbitrationSubmissionParams", options: Optional["RequestOptions"] = None, ) -> "Dispute": @@ -227,6 +236,7 @@ def simulate_network_lifecycle_pre_arbitration_submission( async def simulate_network_lifecycle_pre_arbitration_submission_async( self, dispute: str, + /, params: "DisputeSimulateNetworkLifecyclePreArbitrationSubmissionParams", options: Optional["RequestOptions"] = None, ) -> "Dispute": diff --git a/stripe/test_helpers/issuing/_personalization_design_service.py b/stripe/test_helpers/issuing/_personalization_design_service.py index 4079e8352..ca6adc3d7 100644 --- a/stripe/test_helpers/issuing/_personalization_design_service.py +++ b/stripe/test_helpers/issuing/_personalization_design_service.py @@ -23,6 +23,7 @@ class PersonalizationDesignService(StripeService): def activate( self, personalization_design: str, + /, params: Optional["PersonalizationDesignActivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PersonalizationDesign": @@ -45,6 +46,7 @@ def activate( async def activate_async( self, personalization_design: str, + /, params: Optional["PersonalizationDesignActivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PersonalizationDesign": @@ -67,6 +69,7 @@ async def activate_async( def deactivate( self, personalization_design: str, + /, params: Optional["PersonalizationDesignDeactivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PersonalizationDesign": @@ -89,6 +92,7 @@ def deactivate( async def deactivate_async( self, personalization_design: str, + /, params: Optional["PersonalizationDesignDeactivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PersonalizationDesign": @@ -111,6 +115,7 @@ async def deactivate_async( def reject( self, personalization_design: str, + /, params: "PersonalizationDesignRejectParams", options: Optional["RequestOptions"] = None, ) -> "PersonalizationDesign": @@ -133,6 +138,7 @@ def reject( async def reject_async( self, personalization_design: str, + /, params: "PersonalizationDesignRejectParams", options: Optional["RequestOptions"] = None, ) -> "PersonalizationDesign": diff --git a/stripe/test_helpers/issuing/_transaction_service.py b/stripe/test_helpers/issuing/_transaction_service.py index fcd28302d..f2c60fa63 100644 --- a/stripe/test_helpers/issuing/_transaction_service.py +++ b/stripe/test_helpers/issuing/_transaction_service.py @@ -23,6 +23,7 @@ class TransactionService(StripeService): def refund( self, transaction: str, + /, params: Optional["TransactionRefundParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": @@ -45,6 +46,7 @@ def refund( async def refund_async( self, transaction: str, + /, params: Optional["TransactionRefundParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": diff --git a/stripe/test_helpers/shared_payment/_granted_token_service.py b/stripe/test_helpers/shared_payment/_granted_token_service.py index 66bfd21b2..a02a8bca7 100644 --- a/stripe/test_helpers/shared_payment/_granted_token_service.py +++ b/stripe/test_helpers/shared_payment/_granted_token_service.py @@ -58,6 +58,7 @@ async def create_async( def revoke( self, shared_payment_granted_token: str, + /, params: Optional["GrantedTokenRevokeParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GrantedToken": @@ -82,6 +83,7 @@ def revoke( async def revoke_async( self, shared_payment_granted_token: str, + /, params: Optional["GrantedTokenRevokeParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GrantedToken": diff --git a/stripe/test_helpers/terminal/_reader_service.py b/stripe/test_helpers/terminal/_reader_service.py index 307b8d19a..57d6aa575 100644 --- a/stripe/test_helpers/terminal/_reader_service.py +++ b/stripe/test_helpers/terminal/_reader_service.py @@ -23,6 +23,7 @@ class ReaderService(StripeService): def present_payment_method( self, reader: str, + /, params: Optional["ReaderPresentPaymentMethodParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -45,6 +46,7 @@ def present_payment_method( async def present_payment_method_async( self, reader: str, + /, params: Optional["ReaderPresentPaymentMethodParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -67,6 +69,7 @@ async def present_payment_method_async( def succeed_input_collection( self, reader: str, + /, params: Optional["ReaderSucceedInputCollectionParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -89,6 +92,7 @@ def succeed_input_collection( async def succeed_input_collection_async( self, reader: str, + /, params: Optional["ReaderSucceedInputCollectionParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -111,6 +115,7 @@ async def succeed_input_collection_async( def timeout_input_collection( self, reader: str, + /, params: Optional["ReaderTimeoutInputCollectionParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": @@ -133,6 +138,7 @@ def timeout_input_collection( async def timeout_input_collection_async( self, reader: str, + /, params: Optional["ReaderTimeoutInputCollectionParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Reader": diff --git a/stripe/test_helpers/treasury/_inbound_transfer_service.py b/stripe/test_helpers/treasury/_inbound_transfer_service.py index c37255e54..13402c931 100644 --- a/stripe/test_helpers/treasury/_inbound_transfer_service.py +++ b/stripe/test_helpers/treasury/_inbound_transfer_service.py @@ -23,6 +23,7 @@ class InboundTransferService(StripeService): def fail( self, id: str, + /, params: Optional["InboundTransferFailParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": @@ -45,6 +46,7 @@ def fail( async def fail_async( self, id: str, + /, params: Optional["InboundTransferFailParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": @@ -67,6 +69,7 @@ async def fail_async( def return_inbound_transfer( self, id: str, + /, params: Optional["InboundTransferReturnInboundTransferParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": @@ -89,6 +92,7 @@ def return_inbound_transfer( async def return_inbound_transfer_async( self, id: str, + /, params: Optional["InboundTransferReturnInboundTransferParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": @@ -111,6 +115,7 @@ async def return_inbound_transfer_async( def succeed( self, id: str, + /, params: Optional["InboundTransferSucceedParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": @@ -133,6 +138,7 @@ def succeed( async def succeed_async( self, id: str, + /, params: Optional["InboundTransferSucceedParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": diff --git a/stripe/test_helpers/treasury/_outbound_payment_service.py b/stripe/test_helpers/treasury/_outbound_payment_service.py index 42aff8495..e3c187e54 100644 --- a/stripe/test_helpers/treasury/_outbound_payment_service.py +++ b/stripe/test_helpers/treasury/_outbound_payment_service.py @@ -26,6 +26,7 @@ class OutboundPaymentService(StripeService): def update( self, id: str, + /, params: "OutboundPaymentUpdateParams", options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": @@ -48,6 +49,7 @@ def update( async def update_async( self, id: str, + /, params: "OutboundPaymentUpdateParams", options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": @@ -70,6 +72,7 @@ async def update_async( def fail( self, id: str, + /, params: Optional["OutboundPaymentFailParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": @@ -92,6 +95,7 @@ def fail( async def fail_async( self, id: str, + /, params: Optional["OutboundPaymentFailParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": @@ -114,6 +118,7 @@ async def fail_async( def post( self, id: str, + /, params: Optional["OutboundPaymentPostParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": @@ -136,6 +141,7 @@ def post( async def post_async( self, id: str, + /, params: Optional["OutboundPaymentPostParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": @@ -158,6 +164,7 @@ async def post_async( def return_outbound_payment( self, id: str, + /, params: Optional["OutboundPaymentReturnOutboundPaymentParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": @@ -180,6 +187,7 @@ def return_outbound_payment( async def return_outbound_payment_async( self, id: str, + /, params: Optional["OutboundPaymentReturnOutboundPaymentParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": diff --git a/stripe/test_helpers/treasury/_outbound_transfer_service.py b/stripe/test_helpers/treasury/_outbound_transfer_service.py index 68ffe4fba..eca1872cd 100644 --- a/stripe/test_helpers/treasury/_outbound_transfer_service.py +++ b/stripe/test_helpers/treasury/_outbound_transfer_service.py @@ -26,6 +26,7 @@ class OutboundTransferService(StripeService): def update( self, outbound_transfer: str, + /, params: "OutboundTransferUpdateParams", options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": @@ -48,6 +49,7 @@ def update( async def update_async( self, outbound_transfer: str, + /, params: "OutboundTransferUpdateParams", options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": @@ -70,6 +72,7 @@ async def update_async( def fail( self, outbound_transfer: str, + /, params: Optional["OutboundTransferFailParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": @@ -92,6 +95,7 @@ def fail( async def fail_async( self, outbound_transfer: str, + /, params: Optional["OutboundTransferFailParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": @@ -114,6 +118,7 @@ async def fail_async( def post( self, outbound_transfer: str, + /, params: Optional["OutboundTransferPostParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": @@ -136,6 +141,7 @@ def post( async def post_async( self, outbound_transfer: str, + /, params: Optional["OutboundTransferPostParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": @@ -158,6 +164,7 @@ async def post_async( def return_outbound_transfer( self, outbound_transfer: str, + /, params: Optional[ "OutboundTransferReturnOutboundTransferParams" ] = None, @@ -182,6 +189,7 @@ def return_outbound_transfer( async def return_outbound_transfer_async( self, outbound_transfer: str, + /, params: Optional[ "OutboundTransferReturnOutboundTransferParams" ] = None, diff --git a/stripe/treasury/_credit_reversal_service.py b/stripe/treasury/_credit_reversal_service.py index 1d4407f97..3b0942d6b 100644 --- a/stripe/treasury/_credit_reversal_service.py +++ b/stripe/treasury/_credit_reversal_service.py @@ -100,6 +100,7 @@ async def create_async( def retrieve( self, credit_reversal: str, + /, params: Optional["CreditReversalRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditReversal": @@ -122,6 +123,7 @@ def retrieve( async def retrieve_async( self, credit_reversal: str, + /, params: Optional["CreditReversalRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CreditReversal": diff --git a/stripe/treasury/_debit_reversal_service.py b/stripe/treasury/_debit_reversal_service.py index f39dd5435..e14134eef 100644 --- a/stripe/treasury/_debit_reversal_service.py +++ b/stripe/treasury/_debit_reversal_service.py @@ -100,6 +100,7 @@ async def create_async( def retrieve( self, debit_reversal: str, + /, params: Optional["DebitReversalRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DebitReversal": @@ -122,6 +123,7 @@ def retrieve( async def retrieve_async( self, debit_reversal: str, + /, params: Optional["DebitReversalRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DebitReversal": diff --git a/stripe/treasury/_financial_account.py b/stripe/treasury/_financial_account.py index 908d8a199..c0277f1c1 100644 --- a/stripe/treasury/_financial_account.py +++ b/stripe/treasury/_financial_account.py @@ -268,6 +268,7 @@ class Closed(StripeObject): def _cls_close( cls, financial_account: str, + /, **params: Unpack["FinancialAccountCloseParams"], ) -> "FinancialAccount": """ @@ -287,7 +288,9 @@ def _cls_close( @overload @staticmethod def close( - financial_account: str, **params: Unpack["FinancialAccountCloseParams"] + financial_account: str, + /, + **params: Unpack["FinancialAccountCloseParams"], ) -> "FinancialAccount": """ Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards. @@ -325,6 +328,7 @@ def close( # pyright: ignore[reportGeneralTypeIssues] async def _cls_close_async( cls, financial_account: str, + /, **params: Unpack["FinancialAccountCloseParams"], ) -> "FinancialAccount": """ @@ -344,7 +348,9 @@ async def _cls_close_async( @overload @staticmethod async def close_async( - financial_account: str, **params: Unpack["FinancialAccountCloseParams"] + financial_account: str, + /, + **params: Unpack["FinancialAccountCloseParams"], ) -> "FinancialAccount": """ Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards. @@ -510,6 +516,7 @@ async def retrieve_async( def _cls_retrieve_features( cls, financial_account: str, + /, **params: Unpack["FinancialAccountRetrieveFeaturesParams"], ) -> "FinancialAccountFeatures": """ @@ -530,6 +537,7 @@ def _cls_retrieve_features( @staticmethod def retrieve_features( financial_account: str, + /, **params: Unpack["FinancialAccountRetrieveFeaturesParams"], ) -> "FinancialAccountFeatures": """ @@ -568,6 +576,7 @@ def retrieve_features( # pyright: ignore[reportGeneralTypeIssues] async def _cls_retrieve_features_async( cls, financial_account: str, + /, **params: Unpack["FinancialAccountRetrieveFeaturesParams"], ) -> "FinancialAccountFeatures": """ @@ -588,6 +597,7 @@ async def _cls_retrieve_features_async( @staticmethod async def retrieve_features_async( financial_account: str, + /, **params: Unpack["FinancialAccountRetrieveFeaturesParams"], ) -> "FinancialAccountFeatures": """ @@ -626,6 +636,7 @@ async def retrieve_features_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_update_features( cls, financial_account: str, + /, **params: Unpack["FinancialAccountUpdateFeaturesParams"], ) -> "FinancialAccountFeatures": """ @@ -646,6 +657,7 @@ def _cls_update_features( @staticmethod def update_features( financial_account: str, + /, **params: Unpack["FinancialAccountUpdateFeaturesParams"], ) -> "FinancialAccountFeatures": """ @@ -684,6 +696,7 @@ def update_features( # pyright: ignore[reportGeneralTypeIssues] async def _cls_update_features_async( cls, financial_account: str, + /, **params: Unpack["FinancialAccountUpdateFeaturesParams"], ) -> "FinancialAccountFeatures": """ @@ -704,6 +717,7 @@ async def _cls_update_features_async( @staticmethod async def update_features_async( financial_account: str, + /, **params: Unpack["FinancialAccountUpdateFeaturesParams"], ) -> "FinancialAccountFeatures": """ diff --git a/stripe/treasury/_financial_account_features_service.py b/stripe/treasury/_financial_account_features_service.py index b89cec2d7..f526ea9c0 100644 --- a/stripe/treasury/_financial_account_features_service.py +++ b/stripe/treasury/_financial_account_features_service.py @@ -22,6 +22,7 @@ class FinancialAccountFeaturesService(StripeService): def update( self, financial_account: str, + /, params: Optional["FinancialAccountFeaturesUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccountFeatures": @@ -44,6 +45,7 @@ def update( async def update_async( self, financial_account: str, + /, params: Optional["FinancialAccountFeaturesUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccountFeatures": @@ -66,6 +68,7 @@ async def update_async( def retrieve( self, financial_account: str, + /, params: Optional["FinancialAccountFeaturesRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccountFeatures": @@ -88,6 +91,7 @@ def retrieve( async def retrieve_async( self, financial_account: str, + /, params: Optional["FinancialAccountFeaturesRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccountFeatures": diff --git a/stripe/treasury/_financial_account_service.py b/stripe/treasury/_financial_account_service.py index 269b67ec4..9f3542c6f 100644 --- a/stripe/treasury/_financial_account_service.py +++ b/stripe/treasury/_financial_account_service.py @@ -138,6 +138,7 @@ async def create_async( def retrieve( self, financial_account: str, + /, params: Optional["FinancialAccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccount": @@ -160,6 +161,7 @@ def retrieve( async def retrieve_async( self, financial_account: str, + /, params: Optional["FinancialAccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccount": @@ -182,6 +184,7 @@ async def retrieve_async( def update( self, financial_account: str, + /, params: Optional["FinancialAccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccount": @@ -204,6 +207,7 @@ def update( async def update_async( self, financial_account: str, + /, params: Optional["FinancialAccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccount": @@ -226,6 +230,7 @@ async def update_async( def close( self, financial_account: str, + /, params: Optional["FinancialAccountCloseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccount": @@ -248,6 +253,7 @@ def close( async def close_async( self, financial_account: str, + /, params: Optional["FinancialAccountCloseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccount": diff --git a/stripe/treasury/_inbound_transfer.py b/stripe/treasury/_inbound_transfer.py index 1c3b31675..5dde10b18 100644 --- a/stripe/treasury/_inbound_transfer.py +++ b/stripe/treasury/_inbound_transfer.py @@ -260,6 +260,7 @@ class StatusTransitions(StripeObject): def _cls_cancel( cls, inbound_transfer: str, + /, **params: Unpack["InboundTransferCancelParams"], ) -> "InboundTransfer": """ @@ -279,7 +280,9 @@ def _cls_cancel( @overload @staticmethod def cancel( - inbound_transfer: str, **params: Unpack["InboundTransferCancelParams"] + inbound_transfer: str, + /, + **params: Unpack["InboundTransferCancelParams"], ) -> "InboundTransfer": """ Cancels an InboundTransfer. @@ -317,6 +320,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] async def _cls_cancel_async( cls, inbound_transfer: str, + /, **params: Unpack["InboundTransferCancelParams"], ) -> "InboundTransfer": """ @@ -336,7 +340,9 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - inbound_transfer: str, **params: Unpack["InboundTransferCancelParams"] + inbound_transfer: str, + /, + **params: Unpack["InboundTransferCancelParams"], ) -> "InboundTransfer": """ Cancels an InboundTransfer. @@ -469,7 +475,7 @@ class TestHelpers(APIResourceTestHelpers["InboundTransfer"]): @classmethod def _cls_fail( - cls, id: str, **params: Unpack["InboundTransferFailParams"] + cls, id: str, /, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. @@ -488,7 +494,7 @@ def _cls_fail( @overload @staticmethod def fail( - id: str, **params: Unpack["InboundTransferFailParams"] + id: str, /, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. @@ -524,7 +530,7 @@ def fail( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_fail_async( - cls, id: str, **params: Unpack["InboundTransferFailParams"] + cls, id: str, /, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. @@ -543,7 +549,7 @@ async def _cls_fail_async( @overload @staticmethod async def fail_async( - id: str, **params: Unpack["InboundTransferFailParams"] + id: str, /, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. @@ -581,6 +587,7 @@ async def fail_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_return_inbound_transfer( cls, id: str, + /, **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ @@ -601,6 +608,7 @@ def _cls_return_inbound_transfer( @staticmethod def return_inbound_transfer( id: str, + /, **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ @@ -641,6 +649,7 @@ def return_inbound_transfer( # pyright: ignore[reportGeneralTypeIssues] async def _cls_return_inbound_transfer_async( cls, id: str, + /, **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ @@ -661,6 +670,7 @@ async def _cls_return_inbound_transfer_async( @staticmethod async def return_inbound_transfer_async( id: str, + /, **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ @@ -699,7 +709,7 @@ async def return_inbound_transfer_async( # pyright: ignore[reportGeneralTypeIss @classmethod def _cls_succeed( - cls, id: str, **params: Unpack["InboundTransferSucceedParams"] + cls, id: str, /, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. @@ -718,7 +728,7 @@ def _cls_succeed( @overload @staticmethod def succeed( - id: str, **params: Unpack["InboundTransferSucceedParams"] + id: str, /, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. @@ -754,7 +764,7 @@ def succeed( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_succeed_async( - cls, id: str, **params: Unpack["InboundTransferSucceedParams"] + cls, id: str, /, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. @@ -773,7 +783,7 @@ async def _cls_succeed_async( @overload @staticmethod async def succeed_async( - id: str, **params: Unpack["InboundTransferSucceedParams"] + id: str, /, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. diff --git a/stripe/treasury/_inbound_transfer_service.py b/stripe/treasury/_inbound_transfer_service.py index 7ce66d3e5..91a68a098 100644 --- a/stripe/treasury/_inbound_transfer_service.py +++ b/stripe/treasury/_inbound_transfer_service.py @@ -103,6 +103,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["InboundTransferRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": @@ -125,6 +126,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["InboundTransferRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": @@ -147,6 +149,7 @@ async def retrieve_async( def cancel( self, inbound_transfer: str, + /, params: Optional["InboundTransferCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": @@ -169,6 +172,7 @@ def cancel( async def cancel_async( self, inbound_transfer: str, + /, params: Optional["InboundTransferCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": diff --git a/stripe/treasury/_outbound_payment.py b/stripe/treasury/_outbound_payment.py index 4512897ec..29c1a0e5f 100644 --- a/stripe/treasury/_outbound_payment.py +++ b/stripe/treasury/_outbound_payment.py @@ -330,7 +330,7 @@ class UsDomesticWire(StripeObject): @classmethod def _cls_cancel( - cls, id: str, **params: Unpack["OutboundPaymentCancelParams"] + cls, id: str, /, **params: Unpack["OutboundPaymentCancelParams"] ) -> "OutboundPayment": """ Cancel an OutboundPayment. @@ -349,7 +349,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - id: str, **params: Unpack["OutboundPaymentCancelParams"] + id: str, /, **params: Unpack["OutboundPaymentCancelParams"] ) -> "OutboundPayment": """ Cancel an OutboundPayment. @@ -385,7 +385,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, id: str, **params: Unpack["OutboundPaymentCancelParams"] + cls, id: str, /, **params: Unpack["OutboundPaymentCancelParams"] ) -> "OutboundPayment": """ Cancel an OutboundPayment. @@ -404,7 +404,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - id: str, **params: Unpack["OutboundPaymentCancelParams"] + id: str, /, **params: Unpack["OutboundPaymentCancelParams"] ) -> "OutboundPayment": """ Cancel an OutboundPayment. @@ -537,7 +537,7 @@ class TestHelpers(APIResourceTestHelpers["OutboundPayment"]): @classmethod def _cls_fail( - cls, id: str, **params: Unpack["OutboundPaymentFailParams"] + cls, id: str, /, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. @@ -556,7 +556,7 @@ def _cls_fail( @overload @staticmethod def fail( - id: str, **params: Unpack["OutboundPaymentFailParams"] + id: str, /, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. @@ -592,7 +592,7 @@ def fail( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_fail_async( - cls, id: str, **params: Unpack["OutboundPaymentFailParams"] + cls, id: str, /, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. @@ -611,7 +611,7 @@ async def _cls_fail_async( @overload @staticmethod async def fail_async( - id: str, **params: Unpack["OutboundPaymentFailParams"] + id: str, /, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. @@ -647,7 +647,7 @@ async def fail_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_post( - cls, id: str, **params: Unpack["OutboundPaymentPostParams"] + cls, id: str, /, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. @@ -666,7 +666,7 @@ def _cls_post( @overload @staticmethod def post( - id: str, **params: Unpack["OutboundPaymentPostParams"] + id: str, /, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. @@ -702,7 +702,7 @@ def post( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_post_async( - cls, id: str, **params: Unpack["OutboundPaymentPostParams"] + cls, id: str, /, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. @@ -721,7 +721,7 @@ async def _cls_post_async( @overload @staticmethod async def post_async( - id: str, **params: Unpack["OutboundPaymentPostParams"] + id: str, /, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. @@ -759,6 +759,7 @@ async def post_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_return_outbound_payment( cls, id: str, + /, **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ @@ -779,6 +780,7 @@ def _cls_return_outbound_payment( @staticmethod def return_outbound_payment( id: str, + /, **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ @@ -819,6 +821,7 @@ def return_outbound_payment( # pyright: ignore[reportGeneralTypeIssues] async def _cls_return_outbound_payment_async( cls, id: str, + /, **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ @@ -839,6 +842,7 @@ async def _cls_return_outbound_payment_async( @staticmethod async def return_outbound_payment_async( id: str, + /, **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ @@ -877,7 +881,7 @@ async def return_outbound_payment_async( # pyright: ignore[reportGeneralTypeIss @classmethod def _cls_update( - cls, id: str, **params: Unpack["OutboundPaymentUpdateParams"] + cls, id: str, /, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. @@ -896,7 +900,7 @@ def _cls_update( @overload @staticmethod def update( - id: str, **params: Unpack["OutboundPaymentUpdateParams"] + id: str, /, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. @@ -932,7 +936,7 @@ def update( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_update_async( - cls, id: str, **params: Unpack["OutboundPaymentUpdateParams"] + cls, id: str, /, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. @@ -951,7 +955,7 @@ async def _cls_update_async( @overload @staticmethod async def update_async( - id: str, **params: Unpack["OutboundPaymentUpdateParams"] + id: str, /, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. diff --git a/stripe/treasury/_outbound_payment_service.py b/stripe/treasury/_outbound_payment_service.py index 97a27c73a..9d7912efa 100644 --- a/stripe/treasury/_outbound_payment_service.py +++ b/stripe/treasury/_outbound_payment_service.py @@ -103,6 +103,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["OutboundPaymentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": @@ -125,6 +126,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["OutboundPaymentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": @@ -147,6 +149,7 @@ async def retrieve_async( def cancel( self, id: str, + /, params: Optional["OutboundPaymentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": @@ -169,6 +172,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["OutboundPaymentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": diff --git a/stripe/treasury/_outbound_transfer.py b/stripe/treasury/_outbound_transfer.py index 414884ba1..51710d2a8 100644 --- a/stripe/treasury/_outbound_transfer.py +++ b/stripe/treasury/_outbound_transfer.py @@ -326,6 +326,7 @@ class UsDomesticWire(StripeObject): def _cls_cancel( cls, outbound_transfer: str, + /, **params: Unpack["OutboundTransferCancelParams"], ) -> "OutboundTransfer": """ @@ -346,6 +347,7 @@ def _cls_cancel( @staticmethod def cancel( outbound_transfer: str, + /, **params: Unpack["OutboundTransferCancelParams"], ) -> "OutboundTransfer": """ @@ -384,6 +386,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] async def _cls_cancel_async( cls, outbound_transfer: str, + /, **params: Unpack["OutboundTransferCancelParams"], ) -> "OutboundTransfer": """ @@ -404,6 +407,7 @@ async def _cls_cancel_async( @staticmethod async def cancel_async( outbound_transfer: str, + /, **params: Unpack["OutboundTransferCancelParams"], ) -> "OutboundTransfer": """ @@ -539,6 +543,7 @@ class TestHelpers(APIResourceTestHelpers["OutboundTransfer"]): def _cls_fail( cls, outbound_transfer: str, + /, **params: Unpack["OutboundTransferFailParams"], ) -> "OutboundTransfer": """ @@ -559,6 +564,7 @@ def _cls_fail( @staticmethod def fail( outbound_transfer: str, + /, **params: Unpack["OutboundTransferFailParams"], ) -> "OutboundTransfer": """ @@ -599,6 +605,7 @@ def fail( # pyright: ignore[reportGeneralTypeIssues] async def _cls_fail_async( cls, outbound_transfer: str, + /, **params: Unpack["OutboundTransferFailParams"], ) -> "OutboundTransfer": """ @@ -619,6 +626,7 @@ async def _cls_fail_async( @staticmethod async def fail_async( outbound_transfer: str, + /, **params: Unpack["OutboundTransferFailParams"], ) -> "OutboundTransfer": """ @@ -659,6 +667,7 @@ async def fail_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_post( cls, outbound_transfer: str, + /, **params: Unpack["OutboundTransferPostParams"], ) -> "OutboundTransfer": """ @@ -679,6 +688,7 @@ def _cls_post( @staticmethod def post( outbound_transfer: str, + /, **params: Unpack["OutboundTransferPostParams"], ) -> "OutboundTransfer": """ @@ -719,6 +729,7 @@ def post( # pyright: ignore[reportGeneralTypeIssues] async def _cls_post_async( cls, outbound_transfer: str, + /, **params: Unpack["OutboundTransferPostParams"], ) -> "OutboundTransfer": """ @@ -739,6 +750,7 @@ async def _cls_post_async( @staticmethod async def post_async( outbound_transfer: str, + /, **params: Unpack["OutboundTransferPostParams"], ) -> "OutboundTransfer": """ @@ -779,6 +791,7 @@ async def post_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_return_outbound_transfer( cls, outbound_transfer: str, + /, **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ @@ -799,6 +812,7 @@ def _cls_return_outbound_transfer( @staticmethod def return_outbound_transfer( outbound_transfer: str, + /, **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ @@ -841,6 +855,7 @@ def return_outbound_transfer( # pyright: ignore[reportGeneralTypeIssues] async def _cls_return_outbound_transfer_async( cls, outbound_transfer: str, + /, **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ @@ -861,6 +876,7 @@ async def _cls_return_outbound_transfer_async( @staticmethod async def return_outbound_transfer_async( outbound_transfer: str, + /, **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ @@ -903,6 +919,7 @@ async def return_outbound_transfer_async( # pyright: ignore[reportGeneralTypeIs def _cls_update( cls, outbound_transfer: str, + /, **params: Unpack["OutboundTransferUpdateParams"], ) -> "OutboundTransfer": """ @@ -923,6 +940,7 @@ def _cls_update( @staticmethod def update( outbound_transfer: str, + /, **params: Unpack["OutboundTransferUpdateParams"], ) -> "OutboundTransfer": """ @@ -963,6 +981,7 @@ def update( # pyright: ignore[reportGeneralTypeIssues] async def _cls_update_async( cls, outbound_transfer: str, + /, **params: Unpack["OutboundTransferUpdateParams"], ) -> "OutboundTransfer": """ @@ -983,6 +1002,7 @@ async def _cls_update_async( @staticmethod async def update_async( outbound_transfer: str, + /, **params: Unpack["OutboundTransferUpdateParams"], ) -> "OutboundTransfer": """ diff --git a/stripe/treasury/_outbound_transfer_service.py b/stripe/treasury/_outbound_transfer_service.py index b4783fb4b..87d77d1aa 100644 --- a/stripe/treasury/_outbound_transfer_service.py +++ b/stripe/treasury/_outbound_transfer_service.py @@ -103,6 +103,7 @@ async def create_async( def retrieve( self, outbound_transfer: str, + /, params: Optional["OutboundTransferRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": @@ -125,6 +126,7 @@ def retrieve( async def retrieve_async( self, outbound_transfer: str, + /, params: Optional["OutboundTransferRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": @@ -147,6 +149,7 @@ async def retrieve_async( def cancel( self, outbound_transfer: str, + /, params: Optional["OutboundTransferCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": @@ -169,6 +172,7 @@ def cancel( async def cancel_async( self, outbound_transfer: str, + /, params: Optional["OutboundTransferCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": diff --git a/stripe/treasury/_received_credit_service.py b/stripe/treasury/_received_credit_service.py index 06baf6013..cc88b686a 100644 --- a/stripe/treasury/_received_credit_service.py +++ b/stripe/treasury/_received_credit_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["ReceivedCreditRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReceivedCredit": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ReceivedCreditRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReceivedCredit": diff --git a/stripe/treasury/_received_debit_service.py b/stripe/treasury/_received_debit_service.py index 678e51dbb..c2dc3df0b 100644 --- a/stripe/treasury/_received_debit_service.py +++ b/stripe/treasury/_received_debit_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["ReceivedDebitRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReceivedDebit": @@ -79,6 +80,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ReceivedDebitRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReceivedDebit": diff --git a/stripe/treasury/_transaction_entry_service.py b/stripe/treasury/_transaction_entry_service.py index 590fa1c06..2266c6d19 100644 --- a/stripe/treasury/_transaction_entry_service.py +++ b/stripe/treasury/_transaction_entry_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["TransactionEntryRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TransactionEntry": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["TransactionEntryRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TransactionEntry": diff --git a/stripe/treasury/_transaction_service.py b/stripe/treasury/_transaction_service.py index c43c50687..10ec3d2d2 100644 --- a/stripe/treasury/_transaction_service.py +++ b/stripe/treasury/_transaction_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["TransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": @@ -79,6 +80,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["TransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": diff --git a/stripe/v2/billing/_bill_setting_service.py b/stripe/v2/billing/_bill_setting_service.py index 7fc004ae3..78edddc1b 100644 --- a/stripe/v2/billing/_bill_setting_service.py +++ b/stripe/v2/billing/_bill_setting_service.py @@ -133,6 +133,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["BillSettingRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BillSetting": @@ -153,6 +154,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["BillSettingRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BillSetting": @@ -173,6 +175,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["BillSettingUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BillSetting": @@ -193,6 +196,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["BillSettingUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BillSetting": diff --git a/stripe/v2/billing/_cadence_service.py b/stripe/v2/billing/_cadence_service.py index 1d766db90..4257aa36a 100644 --- a/stripe/v2/billing/_cadence_service.py +++ b/stripe/v2/billing/_cadence_service.py @@ -136,6 +136,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["CadenceRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Cadence": @@ -156,6 +157,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["CadenceRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Cadence": @@ -176,6 +178,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["CadenceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Cadence": @@ -196,6 +199,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["CadenceUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Cadence": @@ -216,6 +220,7 @@ async def update_async( def cancel( self, id: str, + /, params: Optional["CadenceCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Cadence": @@ -236,6 +241,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["CadenceCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Cadence": diff --git a/stripe/v2/billing/_collection_setting_service.py b/stripe/v2/billing/_collection_setting_service.py index e546c5651..e9b62232b 100644 --- a/stripe/v2/billing/_collection_setting_service.py +++ b/stripe/v2/billing/_collection_setting_service.py @@ -154,6 +154,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["CollectionSettingRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CollectionSetting": @@ -176,6 +177,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["CollectionSettingRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CollectionSetting": @@ -198,6 +200,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["CollectionSettingUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CollectionSetting": @@ -229,6 +232,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["CollectionSettingUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CollectionSetting": diff --git a/stripe/v2/billing/_contract.py b/stripe/v2/billing/_contract.py index 34ff393fd..1a58677df 100644 --- a/stripe/v2/billing/_contract.py +++ b/stripe/v2/billing/_contract.py @@ -129,6 +129,10 @@ class BillAt(StripeObject): """ The user-provided lookup key. """ + metadata: Optional[UntypedStripeObject[str]] + """ + Set of key-value pairs. + """ product: str """ The id of the product for this fee. diff --git a/stripe/v2/billing/_contract_service.py b/stripe/v2/billing/_contract_service.py index 4e7252d50..644d2ba79 100644 --- a/stripe/v2/billing/_contract_service.py +++ b/stripe/v2/billing/_contract_service.py @@ -172,6 +172,7 @@ async def create_async( def delete( self, id: str, + /, params: Optional["ContractDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DeletedObject": @@ -192,6 +193,7 @@ def delete( async def delete_async( self, id: str, + /, params: Optional["ContractDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DeletedObject": @@ -212,6 +214,7 @@ async def delete_async( def retrieve( self, id: str, + /, params: Optional["ContractRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Contract": @@ -232,6 +235,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ContractRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Contract": @@ -252,6 +256,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["ContractUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Contract": @@ -296,6 +301,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["ContractUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Contract": @@ -340,6 +346,7 @@ async def update_async( def activate( self, id: str, + /, params: Optional["ContractActivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Contract": @@ -362,6 +369,7 @@ def activate( async def activate_async( self, id: str, + /, params: Optional["ContractActivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Contract": @@ -384,6 +392,7 @@ async def activate_async( def cancel( self, id: str, + /, params: Optional["ContractCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Contract": @@ -404,6 +413,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["ContractCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Contract": diff --git a/stripe/v2/billing/_custom_pricing_unit_service.py b/stripe/v2/billing/_custom_pricing_unit_service.py index 012e113cb..0f2517e5c 100644 --- a/stripe/v2/billing/_custom_pricing_unit_service.py +++ b/stripe/v2/billing/_custom_pricing_unit_service.py @@ -103,6 +103,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["CustomPricingUnitRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomPricingUnit": @@ -125,6 +126,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["CustomPricingUnitRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomPricingUnit": @@ -147,6 +149,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["CustomPricingUnitUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomPricingUnit": @@ -169,6 +172,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["CustomPricingUnitUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CustomPricingUnit": diff --git a/stripe/v2/billing/_intent_service.py b/stripe/v2/billing/_intent_service.py index e3d81ef54..629528945 100644 --- a/stripe/v2/billing/_intent_service.py +++ b/stripe/v2/billing/_intent_service.py @@ -164,6 +164,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["IntentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Intent": @@ -184,6 +185,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["IntentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Intent": @@ -204,6 +206,7 @@ async def retrieve_async( def cancel( self, id: str, + /, params: Optional["IntentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Intent": @@ -224,6 +227,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["IntentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Intent": @@ -244,6 +248,7 @@ async def cancel_async( def commit( self, id: str, + /, params: Optional["IntentCommitParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Intent": @@ -264,6 +269,7 @@ def commit( async def commit_async( self, id: str, + /, params: Optional["IntentCommitParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Intent": @@ -284,6 +290,7 @@ async def commit_async( def release_reservation( self, id: str, + /, params: Optional["IntentReleaseReservationParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Intent": @@ -306,6 +313,7 @@ def release_reservation( async def release_reservation_async( self, id: str, + /, params: Optional["IntentReleaseReservationParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Intent": @@ -328,6 +336,7 @@ async def release_reservation_async( def reserve( self, id: str, + /, params: Optional["IntentReserveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Intent": @@ -348,6 +357,7 @@ def reserve( async def reserve_async( self, id: str, + /, params: Optional["IntentReserveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Intent": diff --git a/stripe/v2/billing/_license_fee_service.py b/stripe/v2/billing/_license_fee_service.py index 0422edab5..c3764759e 100644 --- a/stripe/v2/billing/_license_fee_service.py +++ b/stripe/v2/billing/_license_fee_service.py @@ -146,6 +146,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["LicenseFeeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "LicenseFee": @@ -166,6 +167,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["LicenseFeeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "LicenseFee": @@ -186,6 +188,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["LicenseFeeUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "LicenseFee": @@ -212,6 +215,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["LicenseFeeUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "LicenseFee": diff --git a/stripe/v2/billing/_licensed_item_service.py b/stripe/v2/billing/_licensed_item_service.py index ba45d740c..7d3a780be 100644 --- a/stripe/v2/billing/_licensed_item_service.py +++ b/stripe/v2/billing/_licensed_item_service.py @@ -103,6 +103,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["LicensedItemRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "LicensedItem": @@ -123,6 +124,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["LicensedItemRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "LicensedItem": @@ -143,6 +145,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["LicensedItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "LicensedItem": @@ -163,6 +166,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["LicensedItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "LicensedItem": diff --git a/stripe/v2/billing/_metered_item_service.py b/stripe/v2/billing/_metered_item_service.py index f658ed178..f3d1fc70a 100644 --- a/stripe/v2/billing/_metered_item_service.py +++ b/stripe/v2/billing/_metered_item_service.py @@ -103,6 +103,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["MeteredItemRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "MeteredItem": @@ -123,6 +124,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["MeteredItemRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "MeteredItem": @@ -143,6 +145,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["MeteredItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "MeteredItem": @@ -163,6 +166,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["MeteredItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "MeteredItem": diff --git a/stripe/v2/billing/_one_time_item_service.py b/stripe/v2/billing/_one_time_item_service.py index 2b12e2057..176f61c04 100644 --- a/stripe/v2/billing/_one_time_item_service.py +++ b/stripe/v2/billing/_one_time_item_service.py @@ -103,6 +103,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["OneTimeItemRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OneTimeItem": @@ -123,6 +124,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["OneTimeItemRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OneTimeItem": @@ -143,6 +145,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["OneTimeItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OneTimeItem": @@ -163,6 +166,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["OneTimeItemUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OneTimeItem": diff --git a/stripe/v2/billing/_pricing_plan_service.py b/stripe/v2/billing/_pricing_plan_service.py index 13bfd5c5e..24ac2d5e8 100644 --- a/stripe/v2/billing/_pricing_plan_service.py +++ b/stripe/v2/billing/_pricing_plan_service.py @@ -141,6 +141,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["PricingPlanRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PricingPlan": @@ -161,6 +162,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["PricingPlanRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PricingPlan": @@ -181,6 +183,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["PricingPlanUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PricingPlan": @@ -201,6 +204,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["PricingPlanUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PricingPlan": diff --git a/stripe/v2/billing/_pricing_plan_subscription_service.py b/stripe/v2/billing/_pricing_plan_subscription_service.py index 9d61362eb..1856f250b 100644 --- a/stripe/v2/billing/_pricing_plan_subscription_service.py +++ b/stripe/v2/billing/_pricing_plan_subscription_service.py @@ -67,6 +67,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["PricingPlanSubscriptionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PricingPlanSubscription": @@ -89,6 +90,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["PricingPlanSubscriptionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PricingPlanSubscription": @@ -111,6 +113,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["PricingPlanSubscriptionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PricingPlanSubscription": @@ -133,6 +136,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["PricingPlanSubscriptionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PricingPlanSubscription": @@ -155,6 +159,7 @@ async def update_async( def remove_discounts( self, id: str, + /, params: Optional[ "PricingPlanSubscriptionRemoveDiscountsParams" ] = None, @@ -179,6 +184,7 @@ def remove_discounts( async def remove_discounts_async( self, id: str, + /, params: Optional[ "PricingPlanSubscriptionRemoveDiscountsParams" ] = None, diff --git a/stripe/v2/billing/_profile_service.py b/stripe/v2/billing/_profile_service.py index bb75385f5..eb5705dfc 100644 --- a/stripe/v2/billing/_profile_service.py +++ b/stripe/v2/billing/_profile_service.py @@ -101,6 +101,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["ProfileRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Profile": @@ -121,6 +122,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ProfileRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Profile": @@ -141,6 +143,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["ProfileUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Profile": @@ -161,6 +164,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["ProfileUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Profile": diff --git a/stripe/v2/billing/_rate_card_service.py b/stripe/v2/billing/_rate_card_service.py index 0e2f14f7a..1c91ea5c1 100644 --- a/stripe/v2/billing/_rate_card_service.py +++ b/stripe/v2/billing/_rate_card_service.py @@ -149,6 +149,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["RateCardRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCard": @@ -169,6 +170,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["RateCardRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCard": @@ -189,6 +191,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["RateCardUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCard": @@ -209,6 +212,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["RateCardUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCard": @@ -229,6 +233,7 @@ async def update_async( def modify_rates( self, id: str, + /, params: "RateCardModifyRatesParams", options: Optional["RequestOptions"] = None, ) -> "RateCardVersion": @@ -261,6 +266,7 @@ def modify_rates( async def modify_rates_async( self, id: str, + /, params: "RateCardModifyRatesParams", options: Optional["RequestOptions"] = None, ) -> "RateCardVersion": diff --git a/stripe/v2/billing/_rate_card_subscription_service.py b/stripe/v2/billing/_rate_card_subscription_service.py index 710edfbbb..440188dfc 100644 --- a/stripe/v2/billing/_rate_card_subscription_service.py +++ b/stripe/v2/billing/_rate_card_subscription_service.py @@ -106,6 +106,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["RateCardSubscriptionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCardSubscription": @@ -128,6 +129,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["RateCardSubscriptionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCardSubscription": @@ -150,6 +152,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["RateCardSubscriptionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCardSubscription": @@ -172,6 +175,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["RateCardSubscriptionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCardSubscription": @@ -194,6 +198,7 @@ async def update_async( def cancel( self, id: str, + /, params: Optional["RateCardSubscriptionCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCardSubscription": @@ -216,6 +221,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["RateCardSubscriptionCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCardSubscription": diff --git a/stripe/v2/billing/_service_action_service.py b/stripe/v2/billing/_service_action_service.py index ca1bcf389..9c552ea80 100644 --- a/stripe/v2/billing/_service_action_service.py +++ b/stripe/v2/billing/_service_action_service.py @@ -98,6 +98,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["ServiceActionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ServiceAction": @@ -118,6 +119,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ServiceActionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ServiceAction": @@ -138,6 +140,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["ServiceActionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ServiceAction": @@ -158,6 +161,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["ServiceActionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ServiceAction": diff --git a/stripe/v2/billing/bill_settings/_version_service.py b/stripe/v2/billing/bill_settings/_version_service.py index 7b3cf7c99..35f907c8f 100644 --- a/stripe/v2/billing/bill_settings/_version_service.py +++ b/stripe/v2/billing/bill_settings/_version_service.py @@ -21,6 +21,7 @@ class VersionService(StripeService): def list( self, bill_setting_id: str, + /, params: Optional["VersionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[BillSettingVersion]": @@ -43,6 +44,7 @@ def list( async def list_async( self, bill_setting_id: str, + /, params: Optional["VersionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[BillSettingVersion]": @@ -66,6 +68,7 @@ def retrieve( self, bill_setting_id: str, id: str, + /, params: Optional["VersionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BillSettingVersion": @@ -90,6 +93,7 @@ async def retrieve_async( self, bill_setting_id: str, id: str, + /, params: Optional["VersionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BillSettingVersion": diff --git a/stripe/v2/billing/cadences/_spend_modifier_rule_service.py b/stripe/v2/billing/cadences/_spend_modifier_rule_service.py index a7cc3e868..59ab98649 100644 --- a/stripe/v2/billing/cadences/_spend_modifier_rule_service.py +++ b/stripe/v2/billing/cadences/_spend_modifier_rule_service.py @@ -21,6 +21,7 @@ class SpendModifierRuleService(StripeService): def list( self, cadence_id: str, + /, params: Optional["SpendModifierRuleListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CadenceSpendModifier]": @@ -43,6 +44,7 @@ def list( async def list_async( self, cadence_id: str, + /, params: Optional["SpendModifierRuleListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CadenceSpendModifier]": @@ -66,6 +68,7 @@ def retrieve( self, cadence_id: str, id: str, + /, params: Optional["SpendModifierRuleRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CadenceSpendModifier": @@ -90,6 +93,7 @@ async def retrieve_async( self, cadence_id: str, id: str, + /, params: Optional["SpendModifierRuleRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CadenceSpendModifier": diff --git a/stripe/v2/billing/collection_settings/_version_service.py b/stripe/v2/billing/collection_settings/_version_service.py index c18f96932..ed3ffb1b5 100644 --- a/stripe/v2/billing/collection_settings/_version_service.py +++ b/stripe/v2/billing/collection_settings/_version_service.py @@ -23,6 +23,7 @@ class VersionService(StripeService): def list( self, collection_setting_id: str, + /, params: Optional["VersionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CollectionSettingVersion]": @@ -45,6 +46,7 @@ def list( async def list_async( self, collection_setting_id: str, + /, params: Optional["VersionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[CollectionSettingVersion]": @@ -68,6 +70,7 @@ def retrieve( self, collection_setting_id: str, id: str, + /, params: Optional["VersionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CollectionSettingVersion": @@ -92,6 +95,7 @@ async def retrieve_async( self, collection_setting_id: str, id: str, + /, params: Optional["VersionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CollectionSettingVersion": diff --git a/stripe/v2/billing/contracts/pricing_lines/_quantity_change_service.py b/stripe/v2/billing/contracts/pricing_lines/_quantity_change_service.py index dc6740960..c8af044b6 100644 --- a/stripe/v2/billing/contracts/pricing_lines/_quantity_change_service.py +++ b/stripe/v2/billing/contracts/pricing_lines/_quantity_change_service.py @@ -21,6 +21,7 @@ def list_contract_pricing_line_quantity_changes( self, contract_id: str, pricing_line_id: str, + /, params: Optional[ "QuantityChangeListContractPricingLineQuantityChangesParams" ] = None, @@ -47,6 +48,7 @@ async def list_contract_pricing_line_quantity_changes_async( self, contract_id: str, pricing_line_id: str, + /, params: Optional[ "QuantityChangeListContractPricingLineQuantityChangesParams" ] = None, diff --git a/stripe/v2/billing/intents/_action_service.py b/stripe/v2/billing/intents/_action_service.py index b87fbc3d2..8febb992f 100644 --- a/stripe/v2/billing/intents/_action_service.py +++ b/stripe/v2/billing/intents/_action_service.py @@ -21,6 +21,7 @@ class ActionService(StripeService): def list( self, intent_id: str, + /, params: Optional["ActionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[IntentAction]": @@ -43,6 +44,7 @@ def list( async def list_async( self, intent_id: str, + /, params: Optional["ActionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[IntentAction]": @@ -66,6 +68,7 @@ def retrieve( self, intent_id: str, id: str, + /, params: Optional["ActionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "IntentAction": @@ -90,6 +93,7 @@ async def retrieve_async( self, intent_id: str, id: str, + /, params: Optional["ActionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "IntentAction": diff --git a/stripe/v2/billing/license_fees/_version_service.py b/stripe/v2/billing/license_fees/_version_service.py index bc63b0b8a..29fcd9104 100644 --- a/stripe/v2/billing/license_fees/_version_service.py +++ b/stripe/v2/billing/license_fees/_version_service.py @@ -21,6 +21,7 @@ class VersionService(StripeService): def list( self, license_fee_id: str, + /, params: Optional["VersionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[LicenseFeeVersion]": @@ -43,6 +44,7 @@ def list( async def list_async( self, license_fee_id: str, + /, params: Optional["VersionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[LicenseFeeVersion]": @@ -66,6 +68,7 @@ def retrieve( self, license_fee_id: str, id: str, + /, params: Optional["VersionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "LicenseFeeVersion": @@ -90,6 +93,7 @@ async def retrieve_async( self, license_fee_id: str, id: str, + /, params: Optional["VersionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "LicenseFeeVersion": diff --git a/stripe/v2/billing/pricing_plans/_component_service.py b/stripe/v2/billing/pricing_plans/_component_service.py index 9911d0e7e..cceda8ed6 100644 --- a/stripe/v2/billing/pricing_plans/_component_service.py +++ b/stripe/v2/billing/pricing_plans/_component_service.py @@ -31,6 +31,7 @@ class ComponentService(StripeService): def list( self, pricing_plan_id: str, + /, params: Optional["ComponentListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[PricingPlanComponent]": @@ -53,6 +54,7 @@ def list( async def list_async( self, pricing_plan_id: str, + /, params: Optional["ComponentListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[PricingPlanComponent]": @@ -75,6 +77,7 @@ async def list_async( def create( self, pricing_plan_id: str, + /, params: "ComponentCreateParams", options: Optional["RequestOptions"] = None, ) -> "PricingPlanComponent": @@ -97,6 +100,7 @@ def create( async def create_async( self, pricing_plan_id: str, + /, params: "ComponentCreateParams", options: Optional["RequestOptions"] = None, ) -> "PricingPlanComponent": @@ -120,6 +124,7 @@ def delete( self, pricing_plan_id: str, id: str, + /, params: Optional["ComponentDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DeletedObject": @@ -144,6 +149,7 @@ async def delete_async( self, pricing_plan_id: str, id: str, + /, params: Optional["ComponentDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DeletedObject": @@ -168,6 +174,7 @@ def retrieve( self, pricing_plan_id: str, id: str, + /, params: Optional["ComponentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PricingPlanComponent": @@ -192,6 +199,7 @@ async def retrieve_async( self, pricing_plan_id: str, id: str, + /, params: Optional["ComponentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PricingPlanComponent": @@ -216,6 +224,7 @@ def update( self, pricing_plan_id: str, id: str, + /, params: Optional["ComponentUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PricingPlanComponent": @@ -240,6 +249,7 @@ async def update_async( self, pricing_plan_id: str, id: str, + /, params: Optional["ComponentUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PricingPlanComponent": diff --git a/stripe/v2/billing/pricing_plans/_version_service.py b/stripe/v2/billing/pricing_plans/_version_service.py index ae6cc68c8..e99670ede 100644 --- a/stripe/v2/billing/pricing_plans/_version_service.py +++ b/stripe/v2/billing/pricing_plans/_version_service.py @@ -21,6 +21,7 @@ class VersionService(StripeService): def list( self, pricing_plan_id: str, + /, params: Optional["VersionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[PricingPlanVersion]": @@ -43,6 +44,7 @@ def list( async def list_async( self, pricing_plan_id: str, + /, params: Optional["VersionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[PricingPlanVersion]": @@ -66,6 +68,7 @@ def retrieve( self, pricing_plan_id: str, id: str, + /, params: Optional["VersionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PricingPlanVersion": @@ -90,6 +93,7 @@ async def retrieve_async( self, pricing_plan_id: str, id: str, + /, params: Optional["VersionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PricingPlanVersion": diff --git a/stripe/v2/billing/rate_cards/_custom_pricing_unit_overage_rate_service.py b/stripe/v2/billing/rate_cards/_custom_pricing_unit_overage_rate_service.py index e82e4ed62..ca14d7182 100644 --- a/stripe/v2/billing/rate_cards/_custom_pricing_unit_overage_rate_service.py +++ b/stripe/v2/billing/rate_cards/_custom_pricing_unit_overage_rate_service.py @@ -30,6 +30,7 @@ class CustomPricingUnitOverageRateService(StripeService): def list( self, rate_card_id: str, + /, params: Optional["CustomPricingUnitOverageRateListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[RateCardCustomPricingUnitOverageRate]": @@ -52,6 +53,7 @@ def list( async def list_async( self, rate_card_id: str, + /, params: Optional["CustomPricingUnitOverageRateListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[RateCardCustomPricingUnitOverageRate]": @@ -74,6 +76,7 @@ async def list_async( def create( self, rate_card_id: str, + /, params: "CustomPricingUnitOverageRateCreateParams", options: Optional["RequestOptions"] = None, ) -> "RateCardCustomPricingUnitOverageRate": @@ -96,6 +99,7 @@ def create( async def create_async( self, rate_card_id: str, + /, params: "CustomPricingUnitOverageRateCreateParams", options: Optional["RequestOptions"] = None, ) -> "RateCardCustomPricingUnitOverageRate": @@ -119,6 +123,7 @@ def delete( self, rate_card_id: str, id: str, + /, params: Optional["CustomPricingUnitOverageRateDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DeletedObject": @@ -143,6 +148,7 @@ async def delete_async( self, rate_card_id: str, id: str, + /, params: Optional["CustomPricingUnitOverageRateDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DeletedObject": @@ -167,6 +173,7 @@ def retrieve( self, rate_card_id: str, id: str, + /, params: Optional["CustomPricingUnitOverageRateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCardCustomPricingUnitOverageRate": @@ -191,6 +198,7 @@ async def retrieve_async( self, rate_card_id: str, id: str, + /, params: Optional["CustomPricingUnitOverageRateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCardCustomPricingUnitOverageRate": diff --git a/stripe/v2/billing/rate_cards/_rate_service.py b/stripe/v2/billing/rate_cards/_rate_service.py index 8ba462a6a..2e38d8133 100644 --- a/stripe/v2/billing/rate_cards/_rate_service.py +++ b/stripe/v2/billing/rate_cards/_rate_service.py @@ -29,6 +29,7 @@ class RateService(StripeService): def list( self, rate_card_id: str, + /, params: Optional["RateListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[RateCardRate]": @@ -51,6 +52,7 @@ def list( async def list_async( self, rate_card_id: str, + /, params: Optional["RateListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[RateCardRate]": @@ -73,6 +75,7 @@ async def list_async( def create( self, rate_card_id: str, + /, params: "RateCreateParams", options: Optional["RequestOptions"] = None, ) -> "RateCardRate": @@ -102,6 +105,7 @@ def create( async def create_async( self, rate_card_id: str, + /, params: "RateCreateParams", options: Optional["RequestOptions"] = None, ) -> "RateCardRate": @@ -132,6 +136,7 @@ def delete( self, rate_card_id: str, id: str, + /, params: Optional["RateDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DeletedObject": @@ -156,6 +161,7 @@ async def delete_async( self, rate_card_id: str, id: str, + /, params: Optional["RateDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DeletedObject": @@ -180,6 +186,7 @@ def retrieve( self, rate_card_id: str, id: str, + /, params: Optional["RateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCardRate": @@ -204,6 +211,7 @@ async def retrieve_async( self, rate_card_id: str, id: str, + /, params: Optional["RateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCardRate": diff --git a/stripe/v2/billing/rate_cards/_version_service.py b/stripe/v2/billing/rate_cards/_version_service.py index d096d4050..50fde03cd 100644 --- a/stripe/v2/billing/rate_cards/_version_service.py +++ b/stripe/v2/billing/rate_cards/_version_service.py @@ -21,6 +21,7 @@ class VersionService(StripeService): def list( self, rate_card_id: str, + /, params: Optional["VersionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[RateCardVersion]": @@ -43,6 +44,7 @@ def list( async def list_async( self, rate_card_id: str, + /, params: Optional["VersionListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[RateCardVersion]": @@ -66,6 +68,7 @@ def retrieve( self, rate_card_id: str, id: str, + /, params: Optional["VersionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCardVersion": @@ -90,6 +93,7 @@ async def retrieve_async( self, rate_card_id: str, id: str, + /, params: Optional["VersionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RateCardVersion": diff --git a/stripe/v2/commerce/product_catalog/_import_service.py b/stripe/v2/commerce/product_catalog/_import_service.py index cc5f28bcd..3e32a7f01 100644 --- a/stripe/v2/commerce/product_catalog/_import_service.py +++ b/stripe/v2/commerce/product_catalog/_import_service.py @@ -100,6 +100,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["ImportRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ProductCatalogImport": @@ -122,6 +123,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ImportRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ProductCatalogImport": diff --git a/stripe/v2/core/__init__.py b/stripe/v2/core/__init__.py index 0312233bc..43e59986f 100644 --- a/stripe/v2/core/__init__.py +++ b/stripe/v2/core/__init__.py @@ -6,6 +6,7 @@ from stripe.v2.core._event import ( EventNotification as EventNotification, RelatedObject as RelatedObject, + RelatedSingletonObject as RelatedSingletonObject, Reason as Reason, ReasonRequest as ReasonRequest, ) diff --git a/stripe/v2/core/_account_service.py b/stripe/v2/core/_account_service.py index c10dd2364..6efe00e36 100644 --- a/stripe/v2/core/_account_service.py +++ b/stripe/v2/core/_account_service.py @@ -160,6 +160,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["AccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -180,6 +181,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["AccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -200,6 +202,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["AccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -231,6 +234,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["AccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -262,6 +266,7 @@ async def update_async( def close( self, id: str, + /, params: Optional["AccountCloseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": @@ -282,6 +287,7 @@ def close( async def close_async( self, id: str, + /, params: Optional["AccountCloseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Account": diff --git a/stripe/v2/core/_account_token_service.py b/stripe/v2/core/_account_token_service.py index 1278bb729..33d82d2c2 100644 --- a/stripe/v2/core/_account_token_service.py +++ b/stripe/v2/core/_account_token_service.py @@ -89,6 +89,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["AccountTokenRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountToken": @@ -109,6 +110,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["AccountTokenRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountToken": diff --git a/stripe/v2/core/_approval_request_service.py b/stripe/v2/core/_approval_request_service.py index ecf0fb005..84d43e48c 100644 --- a/stripe/v2/core/_approval_request_service.py +++ b/stripe/v2/core/_approval_request_service.py @@ -67,6 +67,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["ApprovalRequestRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApprovalRequest": @@ -88,6 +89,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ApprovalRequestRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApprovalRequest": @@ -109,6 +111,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["ApprovalRequestUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApprovalRequest": @@ -130,6 +133,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["ApprovalRequestUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApprovalRequest": @@ -151,6 +155,7 @@ async def update_async( def cancel( self, id: str, + /, params: Optional["ApprovalRequestCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApprovalRequest": @@ -174,6 +179,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["ApprovalRequestCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApprovalRequest": diff --git a/stripe/v2/core/_batch_job_service.py b/stripe/v2/core/_batch_job_service.py index 4028e4d7f..7d0cd989f 100644 --- a/stripe/v2/core/_batch_job_service.py +++ b/stripe/v2/core/_batch_job_service.py @@ -61,6 +61,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["BatchJobRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BatchJob": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["BatchJobRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BatchJob": @@ -101,6 +103,7 @@ async def retrieve_async( def cancel( self, id: str, + /, params: Optional["BatchJobCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BatchJob": @@ -121,6 +124,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["BatchJobCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BatchJob": diff --git a/stripe/v2/core/_claimable_sandbox_service.py b/stripe/v2/core/_claimable_sandbox_service.py index 6c35cbe9d..c0ff1b99c 100644 --- a/stripe/v2/core/_claimable_sandbox_service.py +++ b/stripe/v2/core/_claimable_sandbox_service.py @@ -63,6 +63,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["ClaimableSandboxRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ClaimableSandbox": @@ -85,6 +86,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ClaimableSandboxRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ClaimableSandbox": @@ -107,6 +109,7 @@ async def retrieve_async( def renew_onboarding_link( self, id: str, + /, params: Optional["ClaimableSandboxRenewOnboardingLinkParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ClaimableSandbox": @@ -130,6 +133,7 @@ def renew_onboarding_link( async def renew_onboarding_link_async( self, id: str, + /, params: Optional["ClaimableSandboxRenewOnboardingLinkParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ClaimableSandbox": diff --git a/stripe/v2/core/_connection_session_service.py b/stripe/v2/core/_connection_session_service.py index 16ae65d57..bf68b07b1 100644 --- a/stripe/v2/core/_connection_session_service.py +++ b/stripe/v2/core/_connection_session_service.py @@ -58,6 +58,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["ConnectionSessionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ConnectionSession": @@ -78,6 +79,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ConnectionSessionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ConnectionSession": diff --git a/stripe/v2/core/_event.py b/stripe/v2/core/_event.py index 0c39a1990..6453dc0be 100644 --- a/stripe/v2/core/_event.py +++ b/stripe/v2/core/_event.py @@ -182,6 +182,18 @@ def __repr__(self) -> str: return f"" +class RelatedSingletonObject: + type: str + url: str + + def __init__(self, d) -> None: + self.type = d["type"] + self.url = d["url"] + + def __repr__(self) -> str: + return f"" + + class EventNotification: """ EventNotification represents the json that's delivered from an Event Destination. It's a basic struct-like object with a few convenience methods. Use `fetch_event()` to get the full event object. diff --git a/stripe/v2/core/_event_destination_service.py b/stripe/v2/core/_event_destination_service.py index a788a391d..7bac3937e 100644 --- a/stripe/v2/core/_event_destination_service.py +++ b/stripe/v2/core/_event_destination_service.py @@ -117,6 +117,7 @@ async def create_async( def delete( self, id: str, + /, params: Optional["EventDestinationDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DeletedObject": @@ -137,6 +138,7 @@ def delete( async def delete_async( self, id: str, + /, params: Optional["EventDestinationDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DeletedObject": @@ -157,6 +159,7 @@ async def delete_async( def retrieve( self, id: str, + /, params: Optional["EventDestinationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "EventDestination": @@ -177,6 +180,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["EventDestinationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "EventDestination": @@ -197,6 +201,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["EventDestinationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "EventDestination": @@ -217,6 +222,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["EventDestinationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "EventDestination": @@ -237,6 +243,7 @@ async def update_async( def disable( self, id: str, + /, params: Optional["EventDestinationDisableParams"] = None, options: Optional["RequestOptions"] = None, ) -> "EventDestination": @@ -259,6 +266,7 @@ def disable( async def disable_async( self, id: str, + /, params: Optional["EventDestinationDisableParams"] = None, options: Optional["RequestOptions"] = None, ) -> "EventDestination": @@ -281,6 +289,7 @@ async def disable_async( def enable( self, id: str, + /, params: Optional["EventDestinationEnableParams"] = None, options: Optional["RequestOptions"] = None, ) -> "EventDestination": @@ -303,6 +312,7 @@ def enable( async def enable_async( self, id: str, + /, params: Optional["EventDestinationEnableParams"] = None, options: Optional["RequestOptions"] = None, ) -> "EventDestination": @@ -325,6 +335,7 @@ async def enable_async( def ping( self, id: str, + /, params: Optional["EventDestinationPingParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Event": @@ -347,6 +358,7 @@ def ping( async def ping_async( self, id: str, + /, params: Optional["EventDestinationPingParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Event": diff --git a/stripe/v2/core/_event_service.py b/stripe/v2/core/_event_service.py index 7033683af..a33ba4f0a 100644 --- a/stripe/v2/core/_event_service.py +++ b/stripe/v2/core/_event_service.py @@ -57,6 +57,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["EventRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Event": @@ -78,6 +79,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["EventRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Event": diff --git a/stripe/v2/core/_fee_batch.py b/stripe/v2/core/_fee_batch.py index a1f464864..addcbe21b 100644 --- a/stripe/v2/core/_fee_batch.py +++ b/stripe/v2/core/_fee_batch.py @@ -17,13 +17,11 @@ class Adjustments(StripeObject): class TaxAdjustment(StripeObject): currency: str """ - A lowercase alpha3 currency code like "usd" - For the taxonomy label choice, see SECURE_FRAMEWORKS-2849. + A lowercase alpha3 currency code like "usd". """ value: str """ - In major units like "1.23" for 1.23 USD - For the taxonomy label choice, see SECURE_FRAMEWORKS-2849. + In major units like "1.23" for 1.23 USD. """ tax_adjustment: Optional[TaxAdjustment] @@ -35,13 +33,11 @@ class TaxAdjustment(StripeObject): class Amount(StripeObject): currency: str """ - A lowercase alpha3 currency code like "usd" - For the taxonomy label choice, see SECURE_FRAMEWORKS-2849. + A lowercase alpha3 currency code like "usd". """ value: str """ - In major units like "1.23" for 1.23 USD - For the taxonomy label choice, see SECURE_FRAMEWORKS-2849. + In major units like "1.23" for 1.23 USD. """ class CollectedBy(StripeObject): @@ -54,26 +50,22 @@ class CollectionRecord(StripeObject): class Amount(StripeObject): currency: str """ - A lowercase alpha3 currency code like "usd" - For the taxonomy label choice, see SECURE_FRAMEWORKS-2849. + A lowercase alpha3 currency code like "usd". """ value: str """ - In major units like "1.23" for 1.23 USD - For the taxonomy label choice, see SECURE_FRAMEWORKS-2849. + In major units like "1.23" for 1.23 USD. """ class Tax(StripeObject): class Amount(StripeObject): currency: str """ - A lowercase alpha3 currency code like "usd" - For the taxonomy label choice, see SECURE_FRAMEWORKS-2849. + A lowercase alpha3 currency code like "usd". """ value: str """ - In major units like "1.23" for 1.23 USD - For the taxonomy label choice, see SECURE_FRAMEWORKS-2849. + In major units like "1.23" for 1.23 USD. """ amount: Amount @@ -135,13 +127,11 @@ class Tax(StripeObject): class Amount(StripeObject): currency: str """ - A lowercase alpha3 currency code like "usd" - For the taxonomy label choice, see SECURE_FRAMEWORKS-2849. + A lowercase alpha3 currency code like "usd". """ value: str """ - In major units like "1.23" for 1.23 USD - For the taxonomy label choice, see SECURE_FRAMEWORKS-2849. + In major units like "1.23" for 1.23 USD. """ amount: Amount diff --git a/stripe/v2/core/_fee_batch_service.py b/stripe/v2/core/_fee_batch_service.py index 1ee40b2a9..c5e2af09c 100644 --- a/stripe/v2/core/_fee_batch_service.py +++ b/stripe/v2/core/_fee_batch_service.py @@ -57,6 +57,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["FeeBatchRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FeeBatch": @@ -77,6 +78,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["FeeBatchRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FeeBatch": diff --git a/stripe/v2/core/_fee_entry.py b/stripe/v2/core/_fee_entry.py index 860c3719c..80b2f5e38 100644 --- a/stripe/v2/core/_fee_entry.py +++ b/stripe/v2/core/_fee_entry.py @@ -15,13 +15,11 @@ class FeeEntry(StripeObject): class Amount(StripeObject): currency: str """ - A lowercase alpha3 currency code like "usd" - For the taxonomy label choice, see SECURE_FRAMEWORKS-2849. + A lowercase alpha3 currency code like "usd". """ value: str """ - In major units like "1.23" for 1.23 USD - For the taxonomy label choice, see SECURE_FRAMEWORKS-2849. + In major units like "1.23" for 1.23 USD. """ class ChargedBy(StripeObject): @@ -87,13 +85,11 @@ class Tax(StripeObject): class Amount(StripeObject): currency: str """ - A lowercase alpha3 currency code like "usd" - For the taxonomy label choice, see SECURE_FRAMEWORKS-2849. + A lowercase alpha3 currency code like "usd". """ value: str """ - In major units like "1.23" for 1.23 USD - For the taxonomy label choice, see SECURE_FRAMEWORKS-2849. + In major units like "1.23" for 1.23 USD. """ amount: Amount diff --git a/stripe/v2/core/_fee_entry_service.py b/stripe/v2/core/_fee_entry_service.py index faeba9bdc..a09b57b3e 100644 --- a/stripe/v2/core/_fee_entry_service.py +++ b/stripe/v2/core/_fee_entry_service.py @@ -57,6 +57,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["FeeEntryRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FeeEntry": @@ -77,6 +78,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["FeeEntryRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FeeEntry": diff --git a/stripe/v2/core/_vault_service.py b/stripe/v2/core/_vault_service.py index 5bb8b0cd8..a24e0c725 100644 --- a/stripe/v2/core/_vault_service.py +++ b/stripe/v2/core/_vault_service.py @@ -8,6 +8,7 @@ from stripe.v2.core.vault._gb_bank_account_service import ( GbBankAccountService, ) + from stripe.v2.core.vault._network_token_service import NetworkTokenService from stripe.v2.core.vault._us_bank_account_service import ( UsBankAccountService, ) @@ -17,6 +18,10 @@ "stripe.v2.core.vault._gb_bank_account_service", "GbBankAccountService", ], + "network_tokens": [ + "stripe.v2.core.vault._network_token_service", + "NetworkTokenService", + ], "us_bank_accounts": [ "stripe.v2.core.vault._us_bank_account_service", "UsBankAccountService", @@ -26,6 +31,7 @@ class VaultService(StripeService): gb_bank_accounts: "GbBankAccountService" + network_tokens: "NetworkTokenService" us_bank_accounts: "UsBankAccountService" def __init__(self, requestor): diff --git a/stripe/v2/core/accounts/_person_service.py b/stripe/v2/core/accounts/_person_service.py index 60bd385d1..c3c5d6c80 100644 --- a/stripe/v2/core/accounts/_person_service.py +++ b/stripe/v2/core/accounts/_person_service.py @@ -32,6 +32,7 @@ class PersonService(StripeService): def list( self, account_id: str, + /, params: Optional["PersonListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[AccountPerson]": @@ -54,6 +55,7 @@ def list( async def list_async( self, account_id: str, + /, params: Optional["PersonListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[AccountPerson]": @@ -76,6 +78,7 @@ async def list_async( def create( self, account_id: str, + /, params: Optional["PersonCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountPerson": @@ -101,6 +104,7 @@ def create( async def create_async( self, account_id: str, + /, params: Optional["PersonCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountPerson": @@ -127,6 +131,7 @@ def delete( self, account_id: str, id: str, + /, params: Optional["PersonDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DeletedObject": @@ -151,6 +156,7 @@ async def delete_async( self, account_id: str, id: str, + /, params: Optional["PersonDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DeletedObject": @@ -175,6 +181,7 @@ def retrieve( self, account_id: str, id: str, + /, params: Optional["PersonRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountPerson": @@ -199,6 +206,7 @@ async def retrieve_async( self, account_id: str, id: str, + /, params: Optional["PersonRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountPerson": @@ -223,6 +231,7 @@ def update( self, account_id: str, id: str, + /, params: Optional["PersonUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountPerson": @@ -250,6 +259,7 @@ async def update_async( self, account_id: str, id: str, + /, params: Optional["PersonUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountPerson": diff --git a/stripe/v2/core/accounts/_person_token_service.py b/stripe/v2/core/accounts/_person_token_service.py index a9f6ca4b2..0a40fb628 100644 --- a/stripe/v2/core/accounts/_person_token_service.py +++ b/stripe/v2/core/accounts/_person_token_service.py @@ -21,6 +21,7 @@ class PersonTokenService(StripeService): def create( self, account_id: str, + /, params: Optional["PersonTokenCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountPersonToken": @@ -47,6 +48,7 @@ def create( async def create_async( self, account_id: str, + /, params: Optional["PersonTokenCreateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountPersonToken": @@ -74,6 +76,7 @@ def retrieve( self, account_id: str, id: str, + /, params: Optional["PersonTokenRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountPersonToken": @@ -98,6 +101,7 @@ async def retrieve_async( self, account_id: str, id: str, + /, params: Optional["PersonTokenRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountPersonToken": diff --git a/stripe/v2/core/health/_alert_service.py b/stripe/v2/core/health/_alert_service.py index a21545aa1..5ee51b36f 100644 --- a/stripe/v2/core/health/_alert_service.py +++ b/stripe/v2/core/health/_alert_service.py @@ -87,6 +87,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["AlertRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Alert": @@ -107,6 +108,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["AlertRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Alert": diff --git a/stripe/v2/core/health/alerts/_history_service.py b/stripe/v2/core/health/alerts/_history_service.py index ecddb4703..a50df32bf 100644 --- a/stripe/v2/core/health/alerts/_history_service.py +++ b/stripe/v2/core/health/alerts/_history_service.py @@ -18,6 +18,7 @@ class HistoryService(StripeService): def list( self, id: str, + /, params: Optional["HistoryListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[AlertHistoryEntry]": @@ -40,6 +41,7 @@ def list( async def list_async( self, id: str, + /, params: Optional["HistoryListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[AlertHistoryEntry]": diff --git a/stripe/v2/core/vault/__init__.py b/stripe/v2/core/vault/__init__.py index 63de1389d..61f5bcea8 100644 --- a/stripe/v2/core/vault/__init__.py +++ b/stripe/v2/core/vault/__init__.py @@ -10,6 +10,12 @@ from stripe.v2.core.vault._gb_bank_account_service import ( GbBankAccountService as GbBankAccountService, ) + from stripe.v2.core.vault._network_token import ( + NetworkToken as NetworkToken, + ) + from stripe.v2.core.vault._network_token_service import ( + NetworkTokenService as NetworkTokenService, + ) from stripe.v2.core.vault._us_bank_account import ( UsBankAccount as UsBankAccount, ) @@ -24,6 +30,11 @@ "stripe.v2.core.vault._gb_bank_account_service", False, ), + "NetworkToken": ("stripe.v2.core.vault._network_token", False), + "NetworkTokenService": ( + "stripe.v2.core.vault._network_token_service", + False, + ), "UsBankAccount": ("stripe.v2.core.vault._us_bank_account", False), "UsBankAccountService": ( "stripe.v2.core.vault._us_bank_account_service", diff --git a/stripe/v2/core/vault/_gb_bank_account_service.py b/stripe/v2/core/vault/_gb_bank_account_service.py index 2ebaf2ff7..134e52ed5 100644 --- a/stripe/v2/core/vault/_gb_bank_account_service.py +++ b/stripe/v2/core/vault/_gb_bank_account_service.py @@ -109,6 +109,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["GbBankAccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GbBankAccount": @@ -131,6 +132,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["GbBankAccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GbBankAccount": @@ -153,6 +155,7 @@ async def retrieve_async( def acknowledge_confirmation_of_payee( self, id: str, + /, params: Optional[ "GbBankAccountAcknowledgeConfirmationOfPayeeParams" ] = None, @@ -180,6 +183,7 @@ def acknowledge_confirmation_of_payee( async def acknowledge_confirmation_of_payee_async( self, id: str, + /, params: Optional[ "GbBankAccountAcknowledgeConfirmationOfPayeeParams" ] = None, @@ -207,6 +211,7 @@ async def acknowledge_confirmation_of_payee_async( def archive( self, id: str, + /, params: Optional["GbBankAccountArchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GbBankAccount": @@ -230,6 +235,7 @@ def archive( async def archive_async( self, id: str, + /, params: Optional["GbBankAccountArchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "GbBankAccount": @@ -253,6 +259,7 @@ async def archive_async( def initiate_confirmation_of_payee( self, id: str, + /, params: Optional[ "GbBankAccountInitiateConfirmationOfPayeeParams" ] = None, @@ -280,6 +287,7 @@ def initiate_confirmation_of_payee( async def initiate_confirmation_of_payee_async( self, id: str, + /, params: Optional[ "GbBankAccountInitiateConfirmationOfPayeeParams" ] = None, diff --git a/stripe/v2/core/vault/_network_token.py b/stripe/v2/core/vault/_network_token.py new file mode 100644 index 000000000..3e3d828ef --- /dev/null +++ b/stripe/v2/core/vault/_network_token.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional +from typing_extensions import Literal + + +class NetworkToken(StripeObject): + """ + A NetworkToken object represents a network token provisioned for a card. + """ + + OBJECT_NAME: ClassVar[Literal["v2.core.vault.network_token"]] = ( + "v2.core.vault.network_token" + ) + + class Cryptogram(StripeObject): + eci: Optional[str] + """ + The electronic commerce indicator associated with the cryptogram. + """ + type: str + """ + The cryptogram type. + """ + value: str + """ + The cryptogram value. + """ + + created: str + """ + Created timestamp. + """ + cryptogram: Optional[Cryptogram] + """ + This field is unset in create and retrieve responses. It is populated only after a successful generate_cryptogram request. + """ + exp_month: Optional[str] + """ + The month the network token expires. + """ + exp_year: Optional[str] + """ + The year the network token expires. + """ + id: str + """ + ID of the NetworkToken object. + """ + livemode: bool + """ + Whether the object exists in live mode or in test mode. + """ + number: Optional[str] + """ + The network token number. + """ + object: Literal["v2.core.vault.network_token"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + status: Literal["active", "deactivated", "suspended"] + """ + Closed Enum. The status of the network token. + """ + _inner_class_types = {"cryptogram": Cryptogram} diff --git a/stripe/v2/core/vault/_network_token_service.py b/stripe/v2/core/vault/_network_token_service.py new file mode 100644 index 000000000..ae1e23c07 --- /dev/null +++ b/stripe/v2/core/vault/_network_token_service.py @@ -0,0 +1,196 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.core.vault._network_token_create_from_credential_params import ( + NetworkTokenCreateFromCredentialParams, + ) + from stripe.params.v2.core.vault._network_token_create_params import ( + NetworkTokenCreateParams, + ) + from stripe.params.v2.core.vault._network_token_generate_cryptogram_params import ( + NetworkTokenGenerateCryptogramParams, + ) + from stripe.params.v2.core.vault._network_token_retrieve_params import ( + NetworkTokenRetrieveParams, + ) + from stripe.v2.core.vault._network_token import NetworkToken + + +class NetworkTokenService(StripeService): + def create( + self, + params: "NetworkTokenCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "NetworkToken": + """ + Creates or returns a NetworkToken from raw card data for POST /v2/core/vault/network_tokens. + """ + return cast( + "NetworkToken", + self._request( + "post", + "/v2/core/vault/network_tokens", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "NetworkTokenCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "NetworkToken": + """ + Creates or returns a NetworkToken from raw card data for POST /v2/core/vault/network_tokens. + """ + return cast( + "NetworkToken", + await self._request_async( + "post", + "/v2/core/vault/network_tokens", + base_address="api", + params=params, + options=options, + ), + ) + + def create_from_credential( + self, + params: "NetworkTokenCreateFromCredentialParams", + options: Optional["RequestOptions"] = None, + ) -> "NetworkToken": + """ + Creates or returns a NetworkToken from an existing card reference for POST /v2/core/vault/network_tokens/create_from_credential. + """ + return cast( + "NetworkToken", + self._request( + "post", + "/v2/core/vault/network_tokens/create_from_credential", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_from_credential_async( + self, + params: "NetworkTokenCreateFromCredentialParams", + options: Optional["RequestOptions"] = None, + ) -> "NetworkToken": + """ + Creates or returns a NetworkToken from an existing card reference for POST /v2/core/vault/network_tokens/create_from_credential. + """ + return cast( + "NetworkToken", + await self._request_async( + "post", + "/v2/core/vault/network_tokens/create_from_credential", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["NetworkTokenRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "NetworkToken": + """ + Retrieves the persisted NetworkToken projection for GET /v2/core/vault/network_tokens/:id. + """ + return cast( + "NetworkToken", + self._request( + "get", + "/v2/core/vault/network_tokens/{id}".format( + id=sanitize_id(id) + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["NetworkTokenRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "NetworkToken": + """ + Retrieves the persisted NetworkToken projection for GET /v2/core/vault/network_tokens/:id. + """ + return cast( + "NetworkToken", + await self._request_async( + "get", + "/v2/core/vault/network_tokens/{id}".format( + id=sanitize_id(id) + ), + base_address="api", + params=params, + options=options, + ), + ) + + def generate_cryptogram( + self, + id: str, + /, + params: Optional["NetworkTokenGenerateCryptogramParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "NetworkToken": + """ + Generates a single-use cryptogram for POST /v2/core/vault/network_tokens/:id/generate_cryptogram. + Every successful call generates a new cryptogram, and retrying can generate another cryptogram. + The cryptogram is returned only in this response and is never persisted. + """ + return cast( + "NetworkToken", + self._request( + "post", + "/v2/core/vault/network_tokens/{id}/generate_cryptogram".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def generate_cryptogram_async( + self, + id: str, + /, + params: Optional["NetworkTokenGenerateCryptogramParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "NetworkToken": + """ + Generates a single-use cryptogram for POST /v2/core/vault/network_tokens/:id/generate_cryptogram. + Every successful call generates a new cryptogram, and retrying can generate another cryptogram. + The cryptogram is returned only in this response and is never persisted. + """ + return cast( + "NetworkToken", + await self._request_async( + "post", + "/v2/core/vault/network_tokens/{id}/generate_cryptogram".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/core/vault/_us_bank_account_service.py b/stripe/v2/core/vault/_us_bank_account_service.py index 3674515a6..d770bc3b7 100644 --- a/stripe/v2/core/vault/_us_bank_account_service.py +++ b/stripe/v2/core/vault/_us_bank_account_service.py @@ -112,6 +112,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["UsBankAccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "UsBankAccount": @@ -134,6 +135,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["UsBankAccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "UsBankAccount": @@ -156,6 +158,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["UsBankAccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "UsBankAccount": @@ -178,6 +181,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["UsBankAccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "UsBankAccount": @@ -200,6 +204,7 @@ async def update_async( def archive( self, id: str, + /, params: Optional["UsBankAccountArchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "UsBankAccount": @@ -224,6 +229,7 @@ def archive( async def archive_async( self, id: str, + /, params: Optional["UsBankAccountArchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "UsBankAccount": @@ -248,6 +254,7 @@ async def archive_async( def confirm_microdeposits( self, id: str, + /, params: Optional["UsBankAccountConfirmMicrodepositsParams"] = None, options: Optional["RequestOptions"] = None, ) -> "UsBankAccount": @@ -270,6 +277,7 @@ def confirm_microdeposits( async def confirm_microdeposits_async( self, id: str, + /, params: Optional["UsBankAccountConfirmMicrodepositsParams"] = None, options: Optional["RequestOptions"] = None, ) -> "UsBankAccount": @@ -292,6 +300,7 @@ async def confirm_microdeposits_async( def send_microdeposits( self, id: str, + /, params: Optional["UsBankAccountSendMicrodepositsParams"] = None, options: Optional["RequestOptions"] = None, ) -> "UsBankAccount": @@ -314,6 +323,7 @@ def send_microdeposits( async def send_microdeposits_async( self, id: str, + /, params: Optional["UsBankAccountSendMicrodepositsParams"] = None, options: Optional["RequestOptions"] = None, ) -> "UsBankAccount": diff --git a/stripe/v2/data/reporting/_query_run_service.py b/stripe/v2/data/reporting/_query_run_service.py index 99149658c..3e4a44b6e 100644 --- a/stripe/v2/data/reporting/_query_run_service.py +++ b/stripe/v2/data/reporting/_query_run_service.py @@ -58,6 +58,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["QueryRunRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "QueryRun": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["QueryRunRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "QueryRun": diff --git a/stripe/v2/extend/_workflow_run_service.py b/stripe/v2/extend/_workflow_run_service.py index d636ea261..1ae39405f 100644 --- a/stripe/v2/extend/_workflow_run_service.py +++ b/stripe/v2/extend/_workflow_run_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["WorkflowRunRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "WorkflowRun": @@ -79,6 +80,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["WorkflowRunRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "WorkflowRun": diff --git a/stripe/v2/extend/_workflow_service.py b/stripe/v2/extend/_workflow_service.py index e95c51466..6222fd3e0 100644 --- a/stripe/v2/extend/_workflow_service.py +++ b/stripe/v2/extend/_workflow_service.py @@ -63,6 +63,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["WorkflowRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Workflow": @@ -83,6 +84,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["WorkflowRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Workflow": @@ -103,6 +105,7 @@ async def retrieve_async( def invoke( self, id: str, + /, params: "WorkflowInvokeParams", options: Optional["RequestOptions"] = None, ) -> "WorkflowRun": @@ -123,6 +126,7 @@ def invoke( async def invoke_async( self, id: str, + /, params: "WorkflowInvokeParams", options: Optional["RequestOptions"] = None, ) -> "WorkflowRun": diff --git a/stripe/v2/iam/_activity_log_service.py b/stripe/v2/iam/_activity_log_service.py index c1bba92a3..0e2a2b3b7 100644 --- a/stripe/v2/iam/_activity_log_service.py +++ b/stripe/v2/iam/_activity_log_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["ActivityLogRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ActivityLog": @@ -79,6 +80,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ActivityLogRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ActivityLog": diff --git a/stripe/v2/iam/_api_key_service.py b/stripe/v2/iam/_api_key_service.py index 2eed092c6..afff60224 100644 --- a/stripe/v2/iam/_api_key_service.py +++ b/stripe/v2/iam/_api_key_service.py @@ -99,6 +99,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["ApiKeyRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApiKey": @@ -119,6 +120,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ApiKeyRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApiKey": @@ -139,6 +141,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["ApiKeyUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApiKey": @@ -159,6 +162,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["ApiKeyUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApiKey": @@ -179,6 +183,7 @@ async def update_async( def expire( self, id: str, + /, params: Optional["ApiKeyExpireParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApiKey": @@ -199,6 +204,7 @@ def expire( async def expire_async( self, id: str, + /, params: Optional["ApiKeyExpireParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApiKey": @@ -219,6 +225,7 @@ async def expire_async( def rotate( self, id: str, + /, params: Optional["ApiKeyRotateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApiKey": @@ -239,6 +246,7 @@ def rotate( async def rotate_async( self, id: str, + /, params: Optional["ApiKeyRotateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ApiKey": diff --git a/stripe/v2/money_management/_adjustment_service.py b/stripe/v2/money_management/_adjustment_service.py index fcaa012a8..73bacd817 100644 --- a/stripe/v2/money_management/_adjustment_service.py +++ b/stripe/v2/money_management/_adjustment_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["AdjustmentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Adjustment": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["AdjustmentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Adjustment": diff --git a/stripe/v2/money_management/_currency_conversion_service.py b/stripe/v2/money_management/_currency_conversion_service.py index 93ac94bda..7e40a749a 100644 --- a/stripe/v2/money_management/_currency_conversion_service.py +++ b/stripe/v2/money_management/_currency_conversion_service.py @@ -102,6 +102,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["CurrencyConversionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CurrencyConversion": @@ -124,6 +125,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["CurrencyConversionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "CurrencyConversion": diff --git a/stripe/v2/money_management/_debit_dispute_service.py b/stripe/v2/money_management/_debit_dispute_service.py index 43daebd8d..64bc378ac 100644 --- a/stripe/v2/money_management/_debit_dispute_service.py +++ b/stripe/v2/money_management/_debit_dispute_service.py @@ -100,6 +100,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["DebitDisputeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DebitDispute": @@ -122,6 +123,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["DebitDisputeRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DebitDispute": diff --git a/stripe/v2/money_management/_financial_account_service.py b/stripe/v2/money_management/_financial_account_service.py index 4a08662b8..67f443950 100644 --- a/stripe/v2/money_management/_financial_account_service.py +++ b/stripe/v2/money_management/_financial_account_service.py @@ -138,6 +138,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["FinancialAccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccount": @@ -160,6 +161,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["FinancialAccountRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccount": @@ -182,6 +184,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["FinancialAccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccount": @@ -204,6 +207,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["FinancialAccountUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccount": @@ -226,6 +230,7 @@ async def update_async( def close( self, id: str, + /, params: Optional["FinancialAccountCloseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccount": @@ -248,6 +253,7 @@ def close( async def close_async( self, id: str, + /, params: Optional["FinancialAccountCloseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccount": diff --git a/stripe/v2/money_management/_financial_address.py b/stripe/v2/money_management/_financial_address.py index f740eef14..2bab8f18f 100644 --- a/stripe/v2/money_management/_financial_address.py +++ b/stripe/v2/money_management/_financial_address.py @@ -7,153 +7,43 @@ class FinancialAddress(StripeObject): """ - A Financial Address contains information needed to transfer money to a Financial Account. A Financial Account can have more than one Financial Address. + A FinancialAddress contains information needed to transfer money to a Financial Account. A Financial Account can have more than one Financial Address. """ OBJECT_NAME: ClassVar[Literal["v2.money_management.financial_address"]] = ( "v2.money_management.financial_address" ) - class Credentials(StripeObject): - class CaBankAccount(StripeObject): - account_holder_name: str - """ - The account holder name to be used during bank transfers. - """ - account_number: Optional[str] - """ - The account number of the Canadian Bank Account. - """ - bank_name: str - """ - The name of the Bank. - """ - institution_number: str - """ - The institution number of the Canadian Bank Account. - """ - last4: str - """ - The last four digits of the Canadian Bank Account number. This will always be returned. - To view the full account number when retrieving or listing FinancialAddresses, use the `include` request parameter. - """ - transit_number: str - """ - The transit number of the Canadian Bank Account. - """ - - class CryptoWallet(StripeObject): - address: str - """ - The blockchain address of the crypto wallet. - """ - memo: Optional[str] - """ - Required if the network supports memos (e.g. Stellar). - """ - network: Union[ - Literal[ - "arbitrum", - "avalanche_c_chain", - "base", - "ethereum", - "optimism", - "polygon", - "solana", - "stellar", - "tempo", - ], - str, - ] - """ - The blockchain network of the crypto wallet. - """ - - class GbBankAccount(StripeObject): - account_holder_name: str - """ - The account holder name to be used during bank transference. - """ - account_number: Optional[str] - """ - The account number of the UK Bank Account. - """ - last4: str - """ - The last four digits of the UK Bank Account number. This will always be returned. - To view the full account number when retrieving or listing FinancialAddresses, use the `include` request parameter. - """ - sort_code: str - """ - The sort code of the UK Bank Account. - """ - - class MxBankAccount(StripeObject): - account_holder_name: str - """ - The account holder name to be used during bank transfers. - """ - clabe: str - """ - The CLABE (Clave Bancaria Estandarizada) of the Mexican Bank Account. - """ - - class SepaBankAccount(StripeObject): - account_holder_name: str - """ - The account holder name to be used during bank transfers. - """ - bank_name: str - """ - The name of the Bank. - """ - bic: str - """ - The BIC of the SEPA Bank Account. - """ - country: str - """ - The originating country of the SEPA Bank account. - """ - iban: str - """ - The IBAN of the SEPA Bank Account. - """ - last4: str - """ - The last four digits of the SEPA Bank Account number. This will always be returned. - To view the full account number when retrieving or listing FinancialAddresses, use the `include` request parameter. - """ - - class UsBankAccount(StripeObject): + class BankAccount(StripeObject): + class Aba(StripeObject): class AccountHolderAddress(StripeObject): city: str """ - The city of the address. + City. """ country: str """ - The country of the address. + Country. """ line1: str """ - The first line of the address. + Address line 1. """ line2: str """ - The second line of the address. + Address line 2. """ postal_code: str """ - The postal / zip code of the address. + Postal code. """ state: str """ - The state of the address. + State or province. """ town: str """ - The town of the address. + Town or suburb. """ account_holder_address: Optional[AccountHolderAddress] @@ -166,97 +56,144 @@ class AccountHolderAddress(StripeObject): """ account_number: Optional[str] """ - The account number of the US Bank Account. + The full account number. """ bank_name: Optional[str] """ - The name of the Bank. - """ - bic: Optional[str] - """ - The BIC of the bank or financial institution. + The name of the bank. """ last4: str """ - The last four digits of the US Bank Account number. This will always be returned. - To view the full account number when retrieving or listing FinancialAddresses, use the `include` request parameter. + The last four digits of the account number. """ routing_number: str """ - The routing number of the US Bank Account. + The ABA routing number. """ _inner_class_types = { "account_holder_address": AccountHolderAddress, } - ca_bank_account: Optional[CaBankAccount] - """ - The credentials of the Canadian Bank Account for the FinancialAddress. This contains unique banking details such as the account number, institution number, etc. of a Canadian bank account. - """ - crypto_wallet: Optional[CryptoWallet] + class Clabe(StripeObject): + account_holder_name: str + clabe: str + + class Cpa(StripeObject): + account_holder_name: str + account_number: Optional[str] + bank_name: str + institution_number: str + last4: str + transit_number: str + + class Iban(StripeObject): + account_holder_name: str + """ + The name of the account holder. + """ + bank_name: str + """ + The name of the bank. + """ + country: str + """ + The country of the bank account. + """ + iban: Optional[str] + """ + The full IBAN. + """ + last4: str + """ + The last four digits of the IBAN. + """ + + class SortCode(StripeObject): + account_holder_name: str + """ + The name of the account holder. + """ + account_number: Optional[str] + """ + The full account number. + """ + last4: str + """ + The last four digits of the account number. + """ + sort_code: str + """ + The sort code. + """ + + aba: Optional[Aba] """ - The credentials of the crypto wallet for the Financial Address. This contains unique details such as the blockchain network, wallet address, and memo of a crypto wallet. + ABA bank account details (US). """ - gb_bank_account: Optional[GbBankAccount] + clabe: Optional[Clabe] + country: Optional[str] """ - The credentials of the UK Bank Account for the FinancialAddress. This contains unique banking details such as the sort code, account number, etc. of a UK bank account. + The country of the bank account. """ - mx_bank_account: Optional[MxBankAccount] + cpa: Optional[Cpa] + currency: str """ - The credentials of the Mexican Bank Account for the FinancialAddress. This contains unique banking details such as the CLABE and account holder name of a Mexican bank account. + Open Enum. The currency of the bank account. """ - sepa_bank_account: Optional[SepaBankAccount] + iban: Optional[Iban] """ - The credentials of the SEPA Bank Account for the FinancialAddress. This contains unique banking details such as the IBAN, BIC, etc. of a SEPA bank account. + IBAN bank account details. """ - type: Union[ - Literal[ - "ca_bank_account", - "crypto_wallet", - "gb_bank_account", - "mx_bank_account", - "sepa_bank_account", - "us_bank_account", - ], - str, - ] + sort_code: Optional[SortCode] """ - Open Enum. The type of Credentials that are provisioned for the FinancialAddress. + Sort code bank account details (UK). """ - us_bank_account: Optional[UsBankAccount] + type: Union[Literal["aba", "clabe", "cpa", "iban", "sort_code"], str] """ - The credentials of the US Bank Account for the FinancialAddress. This contains unique banking details such as the routing number, account number, etc. of a US bank account. + Open Enum. The type of bank account details. """ _inner_class_types = { - "ca_bank_account": CaBankAccount, - "crypto_wallet": CryptoWallet, - "gb_bank_account": GbBankAccount, - "mx_bank_account": MxBankAccount, - "sepa_bank_account": SepaBankAccount, - "us_bank_account": UsBankAccount, + "aba": Aba, + "clabe": Clabe, + "cpa": Cpa, + "iban": Iban, + "sort_code": SortCode, } - created: str - """ - The creation timestamp of the FinancialAddress. - """ - credentials: Optional[Credentials] + class CryptoWallet(StripeObject): + address: str + memo: Optional[str] + network: Union[ + Literal[ + "arbitrum", + "avalanche_c_chain", + "base", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "tempo", + ], + str, + ] + + bank_account: Optional[BankAccount] """ - Object indicates the type of credentials that have been allocated and attached to the FinancialAddress. - It contains all necessary banking details with which to perform money movements with the FinancialAddress. - This field is only available for FinancialAddresses with an active status. + Bank account details for this FinancialAddress. """ - currency: str + created: str """ - Open Enum. The currency the FinancialAddress supports. + The creation timestamp of the FinancialAddress. """ + crypto_wallet: Optional[CryptoWallet] financial_account: str """ - A ID of the FinancialAccount this FinancialAddress corresponds to. + The ID of the FinancialAccount this FinancialAddress corresponds to. """ id: str """ - The ID of a FinancialAddress. + The ID of the FinancialAddress. """ livemode: bool """ @@ -267,11 +204,15 @@ class AccountHolderAddress(StripeObject): String representing the object's type. Objects of the same type share the same value of the object field. """ settlement_currency: Optional[str] + status: Literal["active", "archived", "failed", "pending"] """ - Open Enum. The currency the FinancialAddress settles into the FinancialAccount. + Closed Enum. The status of the FinancialAddress. """ - status: Literal["active", "archived", "failed", "pending"] + type: Union[Literal["bank_account", "crypto_wallet"], str] """ - Closed Enum. An enum representing the status of the FinancialAddress. This indicates whether or not the FinancialAddress can be used for any money movement flows. + Open Enum. The type of FinancialAddress. """ - _inner_class_types = {"credentials": Credentials} + _inner_class_types = { + "bank_account": BankAccount, + "crypto_wallet": CryptoWallet, + } diff --git a/stripe/v2/money_management/_financial_address_service.py b/stripe/v2/money_management/_financial_address_service.py index 649160957..846e7e413 100644 --- a/stripe/v2/money_management/_financial_address_service.py +++ b/stripe/v2/money_management/_financial_address_service.py @@ -27,7 +27,7 @@ def list( options: Optional["RequestOptions"] = None, ) -> "ListObject[FinancialAddress]": """ - List all FinancialAddresses for a FinancialAccount. + List all FinancialAddresses for a FinancialAccount (V2 shape). """ return cast( "ListObject[FinancialAddress]", @@ -46,7 +46,7 @@ async def list_async( options: Optional["RequestOptions"] = None, ) -> "ListObject[FinancialAddress]": """ - List all FinancialAddresses for a FinancialAccount. + List all FinancialAddresses for a FinancialAccount (V2 shape). """ return cast( "ListObject[FinancialAddress]", @@ -65,7 +65,7 @@ def create( options: Optional["RequestOptions"] = None, ) -> "FinancialAddress": """ - Create a new FinancialAddress for a FinancialAccount. + Create a new FinancialAddress for a FinancialAccount (V2 shape). """ return cast( "FinancialAddress", @@ -84,7 +84,7 @@ async def create_async( options: Optional["RequestOptions"] = None, ) -> "FinancialAddress": """ - Create a new FinancialAddress for a FinancialAccount. + Create a new FinancialAddress for a FinancialAccount (V2 shape). """ return cast( "FinancialAddress", @@ -100,11 +100,12 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["FinancialAddressRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAddress": """ - Retrieve a FinancialAddress. By default, the FinancialAddress will be returned in its unexpanded state, revealing only the last 4 digits of the account number. + Retrieve a FinancialAddress (V2 shape). """ return cast( "FinancialAddress", @@ -122,11 +123,12 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["FinancialAddressRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAddress": """ - Retrieve a FinancialAddress. By default, the FinancialAddress will be returned in its unexpanded state, revealing only the last 4 digits of the account number. + Retrieve a FinancialAddress (V2 shape). """ return cast( "FinancialAddress", diff --git a/stripe/v2/money_management/_inbound_transfer.py b/stripe/v2/money_management/_inbound_transfer.py index 43678a62e..1596cbf70 100644 --- a/stripe/v2/money_management/_inbound_transfer.py +++ b/stripe/v2/money_management/_inbound_transfer.py @@ -89,23 +89,23 @@ class BankDebitSucceeded(StripeObject): bank_debit_failed: Optional[BankDebitFailed] """ - The history entry for a failed InboundTransfer. + The InboundTransfer failed. See `failure_reason` for more details. """ bank_debit_processing: Optional[BankDebitProcessing] """ - The history entry for a processing InboundTransfer. + The InboundTransfer was submitted to the scheme for processing. The debit is still in progress and can later succeed or fail. """ bank_debit_queued: Optional[BankDebitQueued] """ - The history entry for a queued InboundTransfer. + The InboundTransfer was created and is waiting to be submitted to the scheme for processing. """ bank_debit_returned: Optional[BankDebitReturned] """ - The history entry for a returned InboundTransfer. + The InboundTransfer was returned. The original transaction has been reversed. """ bank_debit_succeeded: Optional[BankDebitSucceeded] """ - The history entry for a succeeded InboundTransfer. + The InboundTransfer succeeded. Funds might not yet be available; check the associated Transaction for availability. """ created: str """ diff --git a/stripe/v2/money_management/_inbound_transfer_service.py b/stripe/v2/money_management/_inbound_transfer_service.py index 2c76f1231..8f0f7b720 100644 --- a/stripe/v2/money_management/_inbound_transfer_service.py +++ b/stripe/v2/money_management/_inbound_transfer_service.py @@ -100,6 +100,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["InboundTransferRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": @@ -122,6 +123,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["InboundTransferRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "InboundTransfer": diff --git a/stripe/v2/money_management/_outbound_payment_quote_service.py b/stripe/v2/money_management/_outbound_payment_quote_service.py index 8a54acb33..3173ff434 100644 --- a/stripe/v2/money_management/_outbound_payment_quote_service.py +++ b/stripe/v2/money_management/_outbound_payment_quote_service.py @@ -60,6 +60,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["OutboundPaymentQuoteRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPaymentQuote": @@ -82,6 +83,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["OutboundPaymentQuoteRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPaymentQuote": diff --git a/stripe/v2/money_management/_outbound_payment_service.py b/stripe/v2/money_management/_outbound_payment_service.py index c26cf0169..bf850aed1 100644 --- a/stripe/v2/money_management/_outbound_payment_service.py +++ b/stripe/v2/money_management/_outbound_payment_service.py @@ -103,6 +103,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["OutboundPaymentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": @@ -125,6 +126,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["OutboundPaymentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": @@ -147,6 +149,7 @@ async def retrieve_async( def cancel( self, id: str, + /, params: Optional["OutboundPaymentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": @@ -169,6 +172,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["OutboundPaymentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundPayment": diff --git a/stripe/v2/money_management/_outbound_setup_intent_service.py b/stripe/v2/money_management/_outbound_setup_intent_service.py index 45564cd30..0cf5ac81a 100644 --- a/stripe/v2/money_management/_outbound_setup_intent_service.py +++ b/stripe/v2/money_management/_outbound_setup_intent_service.py @@ -108,6 +108,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["OutboundSetupIntentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundSetupIntent": @@ -130,6 +131,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["OutboundSetupIntentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundSetupIntent": @@ -152,6 +154,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["OutboundSetupIntentUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundSetupIntent": @@ -174,6 +177,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["OutboundSetupIntentUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundSetupIntent": @@ -196,6 +200,7 @@ async def update_async( def cancel( self, id: str, + /, params: Optional["OutboundSetupIntentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundSetupIntent": @@ -218,6 +223,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["OutboundSetupIntentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundSetupIntent": diff --git a/stripe/v2/money_management/_outbound_transfer_service.py b/stripe/v2/money_management/_outbound_transfer_service.py index fe0a702ff..e1215f4c1 100644 --- a/stripe/v2/money_management/_outbound_transfer_service.py +++ b/stripe/v2/money_management/_outbound_transfer_service.py @@ -103,6 +103,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["OutboundTransferRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": @@ -125,6 +126,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["OutboundTransferRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": @@ -147,6 +149,7 @@ async def retrieve_async( def cancel( self, id: str, + /, params: Optional["OutboundTransferCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": @@ -169,6 +172,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["OutboundTransferCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OutboundTransfer": diff --git a/stripe/v2/money_management/_payout_intent_service.py b/stripe/v2/money_management/_payout_intent_service.py index 16a61ca59..040405a36 100644 --- a/stripe/v2/money_management/_payout_intent_service.py +++ b/stripe/v2/money_management/_payout_intent_service.py @@ -112,6 +112,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["PayoutIntentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutIntent": @@ -134,6 +135,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["PayoutIntentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutIntent": @@ -156,6 +158,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["PayoutIntentUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutIntent": @@ -178,6 +181,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["PayoutIntentUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutIntent": @@ -200,6 +204,7 @@ async def update_async( def cancel( self, id: str, + /, params: Optional["PayoutIntentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutIntent": @@ -222,6 +227,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["PayoutIntentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutIntent": @@ -244,6 +250,7 @@ async def cancel_async( def confirm( self, id: str, + /, params: Optional["PayoutIntentConfirmParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutIntent": @@ -266,6 +273,7 @@ def confirm( async def confirm_async( self, id: str, + /, params: Optional["PayoutIntentConfirmParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutIntent": @@ -288,6 +296,7 @@ async def confirm_async( def fx_quote( self, id: str, + /, params: Optional["PayoutIntentFxQuoteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutIntent": @@ -310,6 +319,7 @@ def fx_quote( async def fx_quote_async( self, id: str, + /, params: Optional["PayoutIntentFxQuoteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutIntent": diff --git a/stripe/v2/money_management/_payout_method_service.py b/stripe/v2/money_management/_payout_method_service.py index b39a540e5..9fc31b429 100644 --- a/stripe/v2/money_management/_payout_method_service.py +++ b/stripe/v2/money_management/_payout_method_service.py @@ -68,6 +68,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["PayoutMethodRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutMethod": @@ -90,6 +91,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["PayoutMethodRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutMethod": @@ -112,6 +114,7 @@ async def retrieve_async( def archive( self, id: str, + /, params: Optional["PayoutMethodArchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutMethod": @@ -135,6 +138,7 @@ def archive( async def archive_async( self, id: str, + /, params: Optional["PayoutMethodArchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutMethod": @@ -158,6 +162,7 @@ async def archive_async( def disable( self, id: str, + /, params: Optional["PayoutMethodDisableParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutMethod": @@ -182,6 +187,7 @@ def disable( async def disable_async( self, id: str, + /, params: Optional["PayoutMethodDisableParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutMethod": @@ -206,6 +212,7 @@ async def disable_async( def unarchive( self, id: str, + /, params: Optional["PayoutMethodUnarchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutMethod": @@ -228,6 +235,7 @@ def unarchive( async def unarchive_async( self, id: str, + /, params: Optional["PayoutMethodUnarchiveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PayoutMethod": diff --git a/stripe/v2/money_management/_received_credit.py b/stripe/v2/money_management/_received_credit.py index f246d80eb..a07a7573b 100644 --- a/stripe/v2/money_management/_received_credit.py +++ b/stripe/v2/money_management/_received_credit.py @@ -132,6 +132,155 @@ class MxBankAccount(StripeObject): Open Enum. The money transmission network used to send funds for this ReceivedCredit. """ + class OriginatingBankAccount(StripeObject): + class Aba(StripeObject): + account_holder_name: Optional[str] + """ + The name of the account holder that sent the payment. + """ + bank_name: Optional[str] + """ + The bank name the transfer was received from. + """ + last4: Optional[str] + """ + The last 4 digits of the account number that originated the transfer. + """ + network: Union[Literal["ach", "rtp", "us_domestic_wire"], str] + """ + Open Enum. The money transmission network used to send funds for this ReceivedCredit. + """ + routing_number: Optional[str] + """ + The routing number of the account that originated the transfer. + """ + + class Clabe(StripeObject): + account_holder_name: Optional[str] + """ + The name of the account holder that sent the payment. + """ + bank_name: Optional[str] + """ + The bank name the transfer was received from. + """ + bic: Optional[str] + """ + The BIC/SWIFT code of the account that originated the transfer. + """ + last4: Optional[str] + """ + The last 4 digits of the account number that originated the transfer. + """ + network: Union[Literal["spei"], str] + """ + Open Enum. The money transmission network used to send funds for this ReceivedCredit. + """ + + class Cpa(StripeObject): + account_holder_name: Optional[str] + """ + The name of the account holder that sent the payment. + """ + bank_name: Optional[str] + """ + The bank name the transfer was received from. + """ + bic: Optional[str] + """ + The BIC/SWIFT code of the account that originated the transfer. + """ + last4: Optional[str] + """ + The last 4 digits of the account number that originated the transfer. + """ + network: Union[Literal["acss"], str] + """ + Open Enum. The money transmission network used to send funds for this ReceivedCredit. + """ + + class Iban(StripeObject): + account_holder_name: Optional[str] + """ + The account holder name of the bank account the transfer was received from. + """ + bank_name: Optional[str] + """ + The bank name the transfer was received from. + """ + bic: Optional[str] + """ + The BIC/SWIFT code of the account that originated the transfer. + """ + country: Optional[str] + """ + The origination country of the bank transfer. + """ + iban: Optional[str] + """ + The IBAN that originated the transfer. + """ + network: Union[Literal["sepa_credit_transfer"], str] + """ + Open Enum. The money transmission network used to send funds for this ReceivedCredit. + """ + + class SortCode(StripeObject): + account_holder_name: Optional[str] + """ + The account holder name of the bank account the transfer was received from. + """ + bank_name: Optional[str] + """ + The bank name the transfer was received from. + """ + last4: Optional[str] + """ + The last 4 digits of the account number that originated the transfer. + """ + network: Union[Literal["chaps", "fps"], str] + """ + Open Enum. The money transmission network used to send funds for this ReceivedCredit. + """ + sort_code: Optional[str] + """ + The sort code of the account that originated the transfer. + """ + + aba: Optional[Aba] + """ + Hash containing the transaction bank details. Present if `type` field value is `aba`. + """ + clabe: Optional[Clabe] + """ + Hash containing the transaction bank details. Present if `type` field value is `clabe`. + """ + cpa: Optional[Cpa] + """ + Hash containing the transaction bank details. Present if `type` field value is `cpa`. + """ + iban: Optional[Iban] + """ + Hash containing the transaction bank details. Present if `type` field value is `iban`. + """ + sort_code: Optional[SortCode] + """ + Hash containing the transaction bank details. Present if `type` field value is `sort_code`. + """ + type: Union[ + Literal["aba", "clabe", "cpa", "iban", "sort_code"], str + ] + """ + Open Enum. The type of bank transfer that originated this ReceivedCredit. + """ + _inner_class_types = { + "aba": Aba, + "clabe": Clabe, + "cpa": Cpa, + "iban": Iban, + "sort_code": SortCode, + } + class SepaBankAccount(StripeObject): account_holder_name: Optional[str] """ @@ -182,11 +331,11 @@ class UsBankAccount(StripeObject): ca_bank_account: Optional[CaBankAccount] """ - Hash containing the transaction bank details. Present if `origin_type` field value is `ca_bank_account`. + Deprecated. Use `originating_bank_account.cpa` instead. """ eu_bank_account: Optional[EuBankAccount] """ - Hash containing the transaction bank details. Present if `origin_type` field value is `eu_bank_account`. + Deprecated. Use `originating_bank_account.iban` instead. """ financial_address: str """ @@ -194,30 +343,19 @@ class UsBankAccount(StripeObject): """ gb_bank_account: Optional[GbBankAccount] """ - Hash containing the transaction bank details. Present if `origin_type` field value is `gb_bank_account`. + Deprecated. Use `originating_bank_account.sort_code` instead. """ mx_bank_account: Optional[MxBankAccount] """ - Hash containing the transaction bank details. Present if `origin_type` field value is `mx_bank_account`. + Deprecated. Use `originating_bank_account.clabe` instead. """ - origin_type: Union[ - Literal[ - "ca_bank_account", - "crypto_wallet", - "eu_bank_account", - "gb_bank_account", - "mx_bank_account", - "sepa_bank_account", - "us_bank_account", - ], - str, - ] + originating_bank_account: OriginatingBankAccount """ - Open Enum. Indicates the origin of source from which external funds originated from. + Hash containing the originating bank account details and type for this bank transfer. """ sepa_bank_account: Optional[SepaBankAccount] """ - Hash containing the transaction bank details. Present if `origin_type` field value is `sepa_bank_account`. + Deprecated. Use `originating_bank_account.iban` instead. """ statement_descriptor: Optional[str] """ @@ -225,13 +363,14 @@ class UsBankAccount(StripeObject): """ us_bank_account: Optional[UsBankAccount] """ - Hash containing the transaction bank details. Present if `origin_type` field value is `us_bank_account`. + Deprecated. Use `originating_bank_account.aba` instead. """ _inner_class_types = { "ca_bank_account": CaBankAccount, "eu_bank_account": EuBankAccount, "gb_bank_account": GbBankAccount, "mx_bank_account": MxBankAccount, + "originating_bank_account": OriginatingBankAccount, "sepa_bank_account": SepaBankAccount, "us_bank_account": UsBankAccount, } @@ -299,25 +438,14 @@ class CryptoWallet(StripeObject): """ Financial Address on which funds for ReceivedCredit were received. """ - origin_type: Union[ - Literal[ - "ca_bank_account", - "crypto_wallet", - "eu_bank_account", - "gb_bank_account", - "mx_bank_account", - "sepa_bank_account", - "us_bank_account", - ], - str, - ] - """ - Open Enum. Indicates the origin of source from which external funds originated from. - """ statement_descriptor: Optional[str] """ Freeform string set by originator of the external ReceivedCredit. """ + type: Union[Literal["crypto_wallet"], str] + """ + Open Enum. The type of crypto wallet transfer that originated this ReceivedCredit. + """ _inner_class_types = {"crypto_wallet": CryptoWallet} class StatusDetails(StripeObject): @@ -400,6 +528,10 @@ class From(StripeObject): """ The amount and currency of the ReceivedCredit. """ + amount_received: Amount + """ + The amount and currency of the ReceivedCredit that was received. + """ balance_transfer: Optional[BalanceTransfer] """ This object stores details about the originating Stripe transaction that resulted in the ReceivedCredit. Present if `type` field value is `balance_transfer`. diff --git a/stripe/v2/money_management/_received_credit_service.py b/stripe/v2/money_management/_received_credit_service.py index b3c8e1bca..3ecd4402b 100644 --- a/stripe/v2/money_management/_received_credit_service.py +++ b/stripe/v2/money_management/_received_credit_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["ReceivedCreditRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReceivedCredit": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ReceivedCreditRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReceivedCredit": diff --git a/stripe/v2/money_management/_received_debit_mandate_service.py b/stripe/v2/money_management/_received_debit_mandate_service.py index 982515d0d..1c1375356 100644 --- a/stripe/v2/money_management/_received_debit_mandate_service.py +++ b/stripe/v2/money_management/_received_debit_mandate_service.py @@ -64,6 +64,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["ReceivedDebitMandateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReceivedDebitMandate": @@ -86,6 +87,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ReceivedDebitMandateRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReceivedDebitMandate": @@ -108,6 +110,7 @@ async def retrieve_async( def cancel( self, id: str, + /, params: Optional["ReceivedDebitMandateCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReceivedDebitMandate": @@ -130,6 +133,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["ReceivedDebitMandateCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReceivedDebitMandate": diff --git a/stripe/v2/money_management/_received_debit_service.py b/stripe/v2/money_management/_received_debit_service.py index 15a73c603..9ea567a13 100644 --- a/stripe/v2/money_management/_received_debit_service.py +++ b/stripe/v2/money_management/_received_debit_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["ReceivedDebitRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReceivedDebit": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ReceivedDebitRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReceivedDebit": diff --git a/stripe/v2/money_management/_recipient_verification_service.py b/stripe/v2/money_management/_recipient_verification_service.py index a51207ba0..2ab2c6bd1 100644 --- a/stripe/v2/money_management/_recipient_verification_service.py +++ b/stripe/v2/money_management/_recipient_verification_service.py @@ -63,6 +63,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["RecipientVerificationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RecipientVerification": @@ -85,6 +86,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["RecipientVerificationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RecipientVerification": @@ -107,6 +109,7 @@ async def retrieve_async( def acknowledge( self, id: str, + /, params: Optional["RecipientVerificationAcknowledgeParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RecipientVerification": @@ -129,6 +132,7 @@ def acknowledge( async def acknowledge_async( self, id: str, + /, params: Optional["RecipientVerificationAcknowledgeParams"] = None, options: Optional["RequestOptions"] = None, ) -> "RecipientVerification": diff --git a/stripe/v2/money_management/_transaction_entry_service.py b/stripe/v2/money_management/_transaction_entry_service.py index 5222a8a21..f95b0e6ee 100644 --- a/stripe/v2/money_management/_transaction_entry_service.py +++ b/stripe/v2/money_management/_transaction_entry_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["TransactionEntryRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TransactionEntry": @@ -81,6 +82,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["TransactionEntryRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "TransactionEntry": diff --git a/stripe/v2/money_management/_transaction_service.py b/stripe/v2/money_management/_transaction_service.py index 06102b1df..30cf8a7a7 100644 --- a/stripe/v2/money_management/_transaction_service.py +++ b/stripe/v2/money_management/_transaction_service.py @@ -62,6 +62,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["TransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": @@ -84,6 +85,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["TransactionRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": @@ -106,6 +108,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["TransactionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": @@ -128,6 +131,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["TransactionUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Transaction": diff --git a/stripe/v2/money_management/financial_accounts/_statement_service.py b/stripe/v2/money_management/financial_accounts/_statement_service.py index 02ef705b1..c9e3d2f48 100644 --- a/stripe/v2/money_management/financial_accounts/_statement_service.py +++ b/stripe/v2/money_management/financial_accounts/_statement_service.py @@ -23,6 +23,7 @@ class StatementService(StripeService): def list( self, financial_account_id: str, + /, params: Optional["StatementListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[FinancialAccountStatement]": @@ -45,6 +46,7 @@ def list( async def list_async( self, financial_account_id: str, + /, params: Optional["StatementListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[FinancialAccountStatement]": @@ -68,6 +70,7 @@ def retrieve( self, financial_account_id: str, id: str, + /, params: Optional["StatementRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccountStatement": @@ -92,6 +95,7 @@ async def retrieve_async( self, financial_account_id: str, id: str, + /, params: Optional["StatementRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAccountStatement": diff --git a/stripe/v2/money_management/test_helpers/_financial_address_service.py b/stripe/v2/money_management/test_helpers/_financial_address_service.py index 81884ee1e..f5dbc9bea 100644 --- a/stripe/v2/money_management/test_helpers/_financial_address_service.py +++ b/stripe/v2/money_management/test_helpers/_financial_address_service.py @@ -19,6 +19,7 @@ class FinancialAddressService(StripeService): def debit( self, id: str, + /, params: "FinancialAddressDebitParams", options: Optional["RequestOptions"] = None, ) -> "FinancialAddressDebitSimulation": @@ -41,6 +42,7 @@ def debit( async def debit_async( self, id: str, + /, params: "FinancialAddressDebitParams", options: Optional["RequestOptions"] = None, ) -> "FinancialAddressDebitSimulation": diff --git a/stripe/v2/network/_business_profile_service.py b/stripe/v2/network/_business_profile_service.py index 817ed59ef..139b19458 100644 --- a/stripe/v2/network/_business_profile_service.py +++ b/stripe/v2/network/_business_profile_service.py @@ -58,6 +58,7 @@ async def me_async( def retrieve( self, id: str, + /, params: Optional["BusinessProfileRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BusinessProfile": @@ -80,6 +81,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["BusinessProfileRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "BusinessProfile": diff --git a/stripe/v2/orchestrated_commerce/_agreement_service.py b/stripe/v2/orchestrated_commerce/_agreement_service.py index f9d442497..eac175089 100644 --- a/stripe/v2/orchestrated_commerce/_agreement_service.py +++ b/stripe/v2/orchestrated_commerce/_agreement_service.py @@ -106,6 +106,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["AgreementRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Agreement": @@ -128,6 +129,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["AgreementRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Agreement": @@ -150,6 +152,7 @@ async def retrieve_async( def confirm( self, id: str, + /, params: Optional["AgreementConfirmParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Agreement": @@ -172,6 +175,7 @@ def confirm( async def confirm_async( self, id: str, + /, params: Optional["AgreementConfirmParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Agreement": @@ -194,6 +198,7 @@ async def confirm_async( def terminate( self, id: str, + /, params: Optional["AgreementTerminateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Agreement": @@ -216,6 +221,7 @@ def terminate( async def terminate_async( self, id: str, + /, params: Optional["AgreementTerminateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Agreement": diff --git a/stripe/v2/payments/_off_session_payment.py b/stripe/v2/payments/_off_session_payment.py index edf6e235b..8745e6e0f 100644 --- a/stripe/v2/payments/_off_session_payment.py +++ b/stripe/v2/payments/_off_session_payment.py @@ -134,6 +134,73 @@ class Capture(StripeObject): The method to use to capture the payment. """ + class LatestPaymentAttemptRecordDetails(StripeObject): + class FailureDetails(StripeObject): + code: Optional[str] + """ + Code for the failure. + """ + message: Optional[str] + """ + Message describing the failure. + """ + + class PaymentMethodDetails(StripeObject): + class Card(StripeObject): + authorization_code: Optional[str] + """ + Authorization code returned by the card network. + """ + decline_code: Optional[str] + """ + Stripe decline code for the latest payment attempt. + """ + network_advice_code: Optional[str] + """ + Advice code returned by the card network. + """ + network_decline_code: Optional[str] + """ + Decline code returned by the card network. + """ + + card: Optional[Card] + """ + Details about the card used for the latest payment attempt. + """ + _inner_class_types = {"card": Card} + + class ProcessorDetails(StripeObject): + class Stripe(StripeObject): + charge: Optional[str] + """ + ID of the Charge created for the latest payment attempt. + """ + + stripe: Optional[Stripe] + """ + Details about Stripe as the processor. + """ + _inner_class_types = {"stripe": Stripe} + + failure_details: Optional[FailureDetails] + """ + Details about the failure for the latest payment attempt. + """ + payment_method_details: Optional[PaymentMethodDetails] + """ + Details about the payment method for the latest payment attempt. + """ + processor_details: Optional[ProcessorDetails] + """ + Details about the processor for the latest payment attempt. + """ + _inner_class_types = { + "failure_details": FailureDetails, + "payment_method_details": PaymentMethodDetails, + "processor_details": ProcessorDetails, + } + class PaymentDetails(StripeObject): customer_reference: Optional[str] """ @@ -198,7 +265,7 @@ class TransferData(StripeObject): """ amount_requested: Amount """ - The "presentment amount" to be collected from the customer. + Amount intended to be collected by this payment. """ application: Optional[str] """ @@ -256,6 +323,12 @@ class TransferData(StripeObject): """ Payment attempt record for the latest attempt, if one exists. """ + latest_payment_attempt_record_details: Optional[ + LatestPaymentAttemptRecordDetails + ] + """ + Details from the latest Payment Attempt Record, if one exists. + """ livemode: bool """ Has the value true if the object exists in live mode or the value false if the object exists in test mode. @@ -340,6 +413,7 @@ class TransferData(StripeObject): _inner_class_types = { "amount_details": AmountDetails, "capture": Capture, + "latest_payment_attempt_record_details": LatestPaymentAttemptRecordDetails, "payment_details": PaymentDetails, "payments_orchestration": PaymentsOrchestration, "retry_details": RetryDetails, diff --git a/stripe/v2/payments/_off_session_payment_service.py b/stripe/v2/payments/_off_session_payment_service.py index 2e65218d7..cbec1a758 100644 --- a/stripe/v2/payments/_off_session_payment_service.py +++ b/stripe/v2/payments/_off_session_payment_service.py @@ -112,6 +112,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["OffSessionPaymentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OffSessionPayment": @@ -134,6 +135,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["OffSessionPaymentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OffSessionPayment": @@ -156,6 +158,7 @@ async def retrieve_async( def cancel( self, id: str, + /, params: Optional["OffSessionPaymentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OffSessionPayment": @@ -178,6 +181,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["OffSessionPaymentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OffSessionPayment": @@ -200,6 +204,7 @@ async def cancel_async( def capture( self, id: str, + /, params: Optional["OffSessionPaymentCaptureParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OffSessionPayment": @@ -222,6 +227,7 @@ def capture( async def capture_async( self, id: str, + /, params: Optional["OffSessionPaymentCaptureParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OffSessionPayment": @@ -244,6 +250,7 @@ async def capture_async( def pause( self, id: str, + /, params: Optional["OffSessionPaymentPauseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OffSessionPayment": @@ -266,6 +273,7 @@ def pause( async def pause_async( self, id: str, + /, params: Optional["OffSessionPaymentPauseParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OffSessionPayment": @@ -288,6 +296,7 @@ async def pause_async( def resume( self, id: str, + /, params: Optional["OffSessionPaymentResumeParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OffSessionPayment": @@ -310,6 +319,7 @@ def resume( async def resume_async( self, id: str, + /, params: Optional["OffSessionPaymentResumeParams"] = None, options: Optional["RequestOptions"] = None, ) -> "OffSessionPayment": diff --git a/stripe/v2/payments/_settlement_allocation_intent_service.py b/stripe/v2/payments/_settlement_allocation_intent_service.py index f18d9eaf9..5eeb5d366 100644 --- a/stripe/v2/payments/_settlement_allocation_intent_service.py +++ b/stripe/v2/payments/_settlement_allocation_intent_service.py @@ -143,6 +143,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["SettlementAllocationIntentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SettlementAllocationIntent": @@ -165,6 +166,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["SettlementAllocationIntentRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SettlementAllocationIntent": @@ -187,6 +189,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["SettlementAllocationIntentUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SettlementAllocationIntent": @@ -209,6 +212,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["SettlementAllocationIntentUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SettlementAllocationIntent": @@ -231,6 +235,7 @@ async def update_async( def cancel( self, id: str, + /, params: Optional["SettlementAllocationIntentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SettlementAllocationIntent": @@ -253,6 +258,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["SettlementAllocationIntentCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SettlementAllocationIntent": @@ -275,6 +281,7 @@ async def cancel_async( def submit( self, id: str, + /, params: Optional["SettlementAllocationIntentSubmitParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SettlementAllocationIntent": @@ -297,6 +304,7 @@ def submit( async def submit_async( self, id: str, + /, params: Optional["SettlementAllocationIntentSubmitParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SettlementAllocationIntent": diff --git a/stripe/v2/payments/settlement_allocation_intents/_split_service.py b/stripe/v2/payments/settlement_allocation_intents/_split_service.py index ec2ee3495..2aac1f1ce 100644 --- a/stripe/v2/payments/settlement_allocation_intents/_split_service.py +++ b/stripe/v2/payments/settlement_allocation_intents/_split_service.py @@ -29,6 +29,7 @@ class SplitService(StripeService): def list( self, settlement_allocation_intent_id: str, + /, params: Optional["SplitListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[SettlementAllocationIntentSplit]": @@ -53,6 +54,7 @@ def list( async def list_async( self, settlement_allocation_intent_id: str, + /, params: Optional["SplitListParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ListObject[SettlementAllocationIntentSplit]": @@ -77,6 +79,7 @@ async def list_async( def create( self, settlement_allocation_intent_id: str, + /, params: "SplitCreateParams", options: Optional["RequestOptions"] = None, ) -> "SettlementAllocationIntentSplit": @@ -101,6 +104,7 @@ def create( async def create_async( self, settlement_allocation_intent_id: str, + /, params: "SplitCreateParams", options: Optional["RequestOptions"] = None, ) -> "SettlementAllocationIntentSplit": @@ -126,6 +130,7 @@ def retrieve( self, settlement_allocation_intent_id: str, id: str, + /, params: Optional["SplitRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SettlementAllocationIntentSplit": @@ -152,6 +157,7 @@ async def retrieve_async( self, settlement_allocation_intent_id: str, id: str, + /, params: Optional["SplitRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SettlementAllocationIntentSplit": @@ -178,6 +184,7 @@ def cancel( self, settlement_allocation_intent_id: str, id: str, + /, params: Optional["SplitCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SettlementAllocationIntentSplit": @@ -204,6 +211,7 @@ async def cancel_async( self, settlement_allocation_intent_id: str, id: str, + /, params: Optional["SplitCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "SettlementAllocationIntentSplit": diff --git a/stripe/v2/reporting/_report_run_service.py b/stripe/v2/reporting/_report_run_service.py index 03e69e159..d61693980 100644 --- a/stripe/v2/reporting/_report_run_service.py +++ b/stripe/v2/reporting/_report_run_service.py @@ -64,6 +64,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["ReportRunRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReportRun": @@ -85,6 +86,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ReportRunRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ReportRun": diff --git a/stripe/v2/reporting/_report_service.py b/stripe/v2/reporting/_report_service.py index a88b75757..0d9a9dad9 100644 --- a/stripe/v2/reporting/_report_service.py +++ b/stripe/v2/reporting/_report_service.py @@ -17,6 +17,7 @@ class ReportService(StripeService): def retrieve( self, id: str, + /, params: Optional["ReportRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Report": @@ -39,6 +40,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ReportRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Report": diff --git a/stripe/v2/risk/_inquiry_service.py b/stripe/v2/risk/_inquiry_service.py index fe3b2c6d8..eca0e962d 100644 --- a/stripe/v2/risk/_inquiry_service.py +++ b/stripe/v2/risk/_inquiry_service.py @@ -60,6 +60,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["InquiryRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Inquiry": @@ -80,6 +81,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["InquiryRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Inquiry": @@ -100,6 +102,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["InquiryUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Inquiry": @@ -120,6 +123,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["InquiryUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "Inquiry": diff --git a/stripe/v2/signals/_account_activity.py b/stripe/v2/signals/_account_activity.py index 76e4df11e..6edeca2f1 100644 --- a/stripe/v2/signals/_account_activity.py +++ b/stripe/v2/signals/_account_activity.py @@ -80,6 +80,12 @@ class AccountRestricted(StripeObject): The reason the account or customer was restricted. """ + class AccountReviewed(StripeObject): + outcome: Union[Literal["trusted"], str] + """ + The outcome of the merchant review. + """ + class AccountSuspended(StripeObject): reason: Union[Literal["abuse", "other"], str] """ @@ -175,6 +181,11 @@ class RegistrationDecision(StripeObject): Details for the account restriction. Present only when type is account_restricted. The activity requires an existing account_details.account or account_details.customer; inline data is unsupported. """ + account_reviewed: Optional[AccountReviewed] + """ + Details for the account review. Present only when type is account_reviewed. The activity + requires an existing account_details.account or account_details.customer; inline data is unsupported. + """ account_suspended: Optional[AccountSuspended] """ Details for the account suspension. Present only when type is account_suspended. The activity @@ -223,6 +234,7 @@ class RegistrationDecision(StripeObject): type: Union[ Literal[ "account_restricted", + "account_reviewed", "account_suspended", "login_attempt", "login_decision", @@ -237,6 +249,7 @@ class RegistrationDecision(StripeObject): _inner_class_types = { "account_details": AccountDetails, "account_restricted": AccountRestricted, + "account_reviewed": AccountReviewed, "account_suspended": AccountSuspended, "login_attempt": LoginAttempt, "login_decision": LoginDecision, diff --git a/stripe/v2/signals/_account_activity_service.py b/stripe/v2/signals/_account_activity_service.py index 29bd3fe13..ee363854f 100644 --- a/stripe/v2/signals/_account_activity_service.py +++ b/stripe/v2/signals/_account_activity_service.py @@ -62,6 +62,7 @@ async def create_async( def delete( self, id: str, + /, params: Optional["AccountActivityDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DeletedObject": @@ -82,6 +83,7 @@ def delete( async def delete_async( self, id: str, + /, params: Optional["AccountActivityDeleteParams"] = None, options: Optional["RequestOptions"] = None, ) -> "DeletedObject": @@ -102,6 +104,7 @@ async def delete_async( def retrieve( self, id: str, + /, params: Optional["AccountActivityRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountActivity": @@ -122,6 +125,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["AccountActivityRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountActivity": diff --git a/stripe/v2/signals/_account_evaluation_service.py b/stripe/v2/signals/_account_evaluation_service.py index adbb41c8b..83ad3a5c8 100644 --- a/stripe/v2/signals/_account_evaluation_service.py +++ b/stripe/v2/signals/_account_evaluation_service.py @@ -58,6 +58,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["AccountEvaluationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountEvaluation": @@ -80,6 +81,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["AccountEvaluationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountEvaluation": diff --git a/stripe/v2/signals/_account_signal_service.py b/stripe/v2/signals/_account_signal_service.py index c453b115b..3a4bc2a8b 100644 --- a/stripe/v2/signals/_account_signal_service.py +++ b/stripe/v2/signals/_account_signal_service.py @@ -59,6 +59,7 @@ async def list_async( def retrieve( self, id: str, + /, params: Optional["AccountSignalRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountSignal": @@ -79,6 +80,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["AccountSignalRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "AccountSignal": diff --git a/stripe/v2/signals/_payment_retry_evaluation_service.py b/stripe/v2/signals/_payment_retry_evaluation_service.py index 8a9e196fc..5fa38812e 100644 --- a/stripe/v2/signals/_payment_retry_evaluation_service.py +++ b/stripe/v2/signals/_payment_retry_evaluation_service.py @@ -66,6 +66,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["PaymentRetryEvaluationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentRetryEvaluation": @@ -88,6 +89,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["PaymentRetryEvaluationRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentRetryEvaluation": @@ -110,6 +112,7 @@ async def retrieve_async( def update( self, id: str, + /, params: Optional["PaymentRetryEvaluationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentRetryEvaluation": @@ -132,6 +135,7 @@ def update( async def update_async( self, id: str, + /, params: Optional["PaymentRetryEvaluationUpdateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentRetryEvaluation": @@ -154,6 +158,7 @@ async def update_async( def cancel( self, id: str, + /, params: Optional["PaymentRetryEvaluationCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentRetryEvaluation": @@ -176,6 +181,7 @@ def cancel( async def cancel_async( self, id: str, + /, params: Optional["PaymentRetryEvaluationCancelParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentRetryEvaluation": diff --git a/stripe/v2/signals/_payment_retry_signal.py b/stripe/v2/signals/_payment_retry_signal.py index 87aad7138..3a43782e3 100644 --- a/stripe/v2/signals/_payment_retry_signal.py +++ b/stripe/v2/signals/_payment_retry_signal.py @@ -49,7 +49,7 @@ class Recommendation(StripeObject): """ The payment intent this signal relates to. """ - payment_record: str + payment_record: Optional[str] """ The payment record this signal relates to. """ diff --git a/stripe/v2/signals/_payment_retry_signal_service.py b/stripe/v2/signals/_payment_retry_signal_service.py index 80453ce5c..46cb01fa7 100644 --- a/stripe/v2/signals/_payment_retry_signal_service.py +++ b/stripe/v2/signals/_payment_retry_signal_service.py @@ -17,6 +17,7 @@ class PaymentRetrySignalService(StripeService): def retrieve( self, id: str, + /, params: Optional["PaymentRetrySignalRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentRetrySignal": @@ -39,6 +40,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["PaymentRetrySignalRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "PaymentRetrySignal": diff --git a/stripe/v2/tax/_manual_rule_service.py b/stripe/v2/tax/_manual_rule_service.py index 06124daa4..b19a4c7d6 100644 --- a/stripe/v2/tax/_manual_rule_service.py +++ b/stripe/v2/tax/_manual_rule_service.py @@ -121,6 +121,7 @@ async def create_async( def retrieve( self, id: str, + /, params: Optional["ManualRuleRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ManualRule": @@ -141,6 +142,7 @@ def retrieve( async def retrieve_async( self, id: str, + /, params: Optional["ManualRuleRetrieveParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ManualRule": @@ -161,6 +163,7 @@ async def retrieve_async( def update( self, id: str, + /, params: "ManualRuleUpdateParams", options: Optional["RequestOptions"] = None, ) -> "ManualRule": @@ -188,6 +191,7 @@ def update( async def update_async( self, id: str, + /, params: "ManualRuleUpdateParams", options: Optional["RequestOptions"] = None, ) -> "ManualRule": @@ -215,6 +219,7 @@ async def update_async( def deactivate( self, id: str, + /, params: Optional["ManualRuleDeactivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ManualRule": @@ -237,6 +242,7 @@ def deactivate( async def deactivate_async( self, id: str, + /, params: Optional["ManualRuleDeactivateParams"] = None, options: Optional["RequestOptions"] = None, ) -> "ManualRule": diff --git a/stripe/v2/test_helpers/_financial_address_service.py b/stripe/v2/test_helpers/_financial_address_service.py index a10633a89..ef013b005 100644 --- a/stripe/v2/test_helpers/_financial_address_service.py +++ b/stripe/v2/test_helpers/_financial_address_service.py @@ -25,6 +25,7 @@ class FinancialAddressService(StripeService): def credit( self, id: str, + /, params: "FinancialAddressCreditParams", options: Optional["RequestOptions"] = None, ) -> "FinancialAddressCreditSimulation": @@ -47,6 +48,7 @@ def credit( async def credit_async( self, id: str, + /, params: "FinancialAddressCreditParams", options: Optional["RequestOptions"] = None, ) -> "FinancialAddressCreditSimulation": @@ -69,6 +71,7 @@ async def credit_async( def generate_microdeposits( self, id: str, + /, params: Optional["FinancialAddressGenerateMicrodepositsParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAddressGeneratedMicrodeposits": @@ -91,6 +94,7 @@ def generate_microdeposits( async def generate_microdeposits_async( self, id: str, + /, params: Optional["FinancialAddressGenerateMicrodepositsParams"] = None, options: Optional["RequestOptions"] = None, ) -> "FinancialAddressGeneratedMicrodeposits": diff --git a/tests/test_exports.py b/tests/test_exports.py index 3aff0a530..e9c3a04cd 100644 --- a/tests/test_exports.py +++ b/tests/test_exports.py @@ -45,6 +45,16 @@ def test_can_import_webhook_members() -> None: ) +def test_can_import_event_notification_members() -> None: + from stripe.v2.core import ( + EventNotification, # pyright: ignore[reportUnusedImport] + Reason, # pyright: ignore[reportUnusedImport] + ReasonRequest, # pyright: ignore[reportUnusedImport] + RelatedObject, # pyright: ignore[reportUnusedImport] + RelatedSingletonObject, # pyright: ignore[reportUnusedImport] + ) + + def test_can_import_abstract() -> None: from stripe import ( APIResource, # pyright: ignore[reportUnusedImport] diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index fe788282d..d472e80b0 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -47248,6 +47248,96 @@ def test_v2_core_vault_gb_bank_account_post_4_service( is_json=True, ) + def test_v2_core_vault_network_token_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/network_tokens", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.network_tokens.create({"type": "card"}) + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/network_tokens", + query_string="", + api_base="https://api.stripe.com", + post_data='{"type":"card"}', + is_json=True, + ) + + def test_v2_core_vault_network_token_post_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/network_tokens/create_from_credential", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.network_tokens.create_from_credential( + { + "type": "card", + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/network_tokens/create_from_credential", + query_string="", + api_base="https://api.stripe.com", + post_data='{"type":"card"}', + is_json=True, + ) + + def test_v2_core_vault_network_token_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/core/vault/network_tokens/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.network_tokens.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/core/vault/network_tokens/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_core_vault_network_token_post_3_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/network_tokens/id_123/generate_cryptogram", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.network_tokens.generate_cryptogram("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/network_tokens/id_123/generate_cryptogram", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + def test_v2_core_vault_us_bank_account_get_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -48126,7 +48216,7 @@ def test_v2_money_management_financial_address_post_service( client.v2.money_management.financial_addresses.create( { "financial_account": "financial_account", - "type": "ca_bank_account", + "type": "bank_account", } ) http_client_mock.assert_requested( @@ -48134,7 +48224,7 @@ def test_v2_money_management_financial_address_post_service( path="/v2/money_management/financial_addresses", query_string="", api_base="https://api.stripe.com", - post_data='{"financial_account":"financial_account","type":"ca_bank_account"}', + post_data='{"financial_account":"financial_account","type":"bank_account"}', is_json=True, ) @@ -49944,17 +50034,13 @@ def test_v2_signals_account_activity_post_service( http_client=http_client_mock.get_mock_http_client(), ) - client.v2.signals.account_activity.create( - { - "type": "account_restricted", - } - ) + client.v2.signals.account_activity.create({"type": "login_attempt"}) http_client_mock.assert_requested( "post", path="/v2/signals/account_activity", query_string="", api_base="https://api.stripe.com", - post_data='{"type":"account_restricted"}', + post_data='{"type":"login_attempt"}', is_json=True, ) @@ -50570,7 +50656,7 @@ def test_blocked_by_stripe_error_service( ) -> None: http_client_mock.stub_request( "post", - "/v2/core/vault/us_bank_accounts", + "/v2/core/vault/network_tokens", rbody='{"error":{"type":"blocked_by_stripe","code":"blocked_payout_method"}}', rcode=400, ) @@ -50580,20 +50666,15 @@ def test_blocked_by_stripe_error_service( ) try: - client.v2.core.vault.us_bank_accounts.create( - { - "account_number": "account_number", - "currency": "usd", - } - ) + client.v2.core.vault.network_tokens.create({"type": "card"}) except _error.BlockedByStripeError: pass http_client_mock.assert_requested( "post", - path="/v2/core/vault/us_bank_accounts", + path="/v2/core/vault/network_tokens", query_string="", api_base="https://api.stripe.com", - post_data='{"account_number":"account_number","currency":"usd"}', + post_data='{"type":"card"}', is_json=True, ) @@ -50603,7 +50684,7 @@ def test_cannot_proceed_error_service( http_client_mock.stub_request( "post", "/v2/billing/contracts/id_123", - rbody='{"error":{"type":"cannot_proceed","code":"default_payout_method_cannot_be_archived"}}', + rbody='{"error":{"type":"cannot_proceed","code":"card_brand_not_supported"}}', rcode=400, ) client = StripeClient( @@ -50730,7 +50811,7 @@ def test_financial_account_not_open_error_service( client.v2.money_management.financial_addresses.create( { "financial_account": "financial_account", - "type": "ca_bank_account", + "type": "bank_account", } ) except _error.FinancialAccountNotOpenError: @@ -50740,7 +50821,7 @@ def test_financial_account_not_open_error_service( path="/v2/money_management/financial_addresses", query_string="", api_base="https://api.stripe.com", - post_data='{"financial_account":"financial_account","type":"ca_bank_account"}', + post_data='{"financial_account":"financial_account","type":"bank_account"}', is_json=True, ) @@ -50898,6 +50979,33 @@ def test_invalid_payout_method_error_service( is_json=True, ) + def test_merchant_not_gated_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/network_tokens", + rbody='{"error":{"type":"merchant_not_gated","code":"permission_denied"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.core.vault.network_tokens.create({"type": "card"}) + except _error.MerchantNotGatedError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/network_tokens", + query_string="", + api_base="https://api.stripe.com", + post_data='{"type":"card"}', + is_json=True, + ) + def test_non_zero_balance_error_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -50988,8 +51096,8 @@ def test_rate_limit_error_service( self, http_client_mock: HTTPClientMock ) -> None: http_client_mock.stub_request( - "get", - "/v2/core/accounts", + "delete", + "/v2/billing/contracts/id_123", rbody='{"error":{"type":"rate_limit","code":"account_rate_limit_exceeded"}}', rcode=400, ) @@ -50999,12 +51107,12 @@ def test_rate_limit_error_service( ) try: - client.v2.core.accounts.list() + client.v2.billing.contracts.delete("id_123") except _error.RateLimitError: pass http_client_mock.assert_requested( - "get", - path="/v2/core/accounts", + "delete", + path="/v2/billing/contracts/id_123", query_string="", api_base="https://api.stripe.com", ) diff --git a/tests/test_v2_event.py b/tests/test_v2_event.py index f2d545706..5a16cee35 100644 --- a/tests/test_v2_event.py +++ b/tests/test_v2_event.py @@ -16,7 +16,11 @@ V1BillingMeterErrorReportTriggeredEventNotification, V1BillingMeterErrorReportTriggeredEvent, ) -from stripe.v2.core._event import EventNotification, UnknownEventNotification +from stripe.v2.core._event import ( + EventNotification, + RelatedSingletonObject, + UnknownEventNotification, +) from stripe.events._event_classes import ALL_EVENT_NOTIFICATIONS from stripe._webhook import WebhookPayload, WebhookSignature from tests.test_webhook import DUMMY_WEBHOOK_SECRET @@ -200,6 +204,19 @@ def test_parses_unknown_event_notif(self, parse_event_notif: EventParser): assert type(event) is UnknownEventNotification assert event.related_object + def test_related_singleton_object_omits_id(self): + """ + events whose related object is a singleton get a `RelatedSingletonObject`, + which has no `id` at all (instead of a perpetually-`None` one) + """ + related_object = RelatedSingletonObject( + {"type": "balance", "url": "/v1/balance"} + ) + + assert related_object.type == "balance" + assert related_object.url == "/v1/balance" + assert not hasattr(related_object, "id") + def test_raise_on_v1_payload(self, parse_event_notif: EventParser): v1_payload = json.dumps( { diff --git a/tests/test_webhook.py b/tests/test_webhook.py index 9b1420a8d..08c9e20b7 100644 --- a/tests/test_webhook.py +++ b/tests/test_webhook.py @@ -274,6 +274,16 @@ def test_raise_on_v2_payload(self, stripe_mock_stripe_client): ) assert "parse_event_notification" in str(e.value) + @pytest.mark.parametrize("secret", [None, ""]) + def test_raise_on_missing_secret(self, stripe_mock_stripe_client, secret): + with pytest.raises( + SignatureVerificationError, + match="No webhook secret value was provided", + ): + stripe_mock_stripe_client.construct_event( + DUMMY_WEBHOOK_PAYLOAD, generate_header(), secret + ) + def test_construct_event_inherits_requestor(self, http_client_mock): http_client_mock.stub_request("delete", "/v1/terminal/readers/rdr_123")