summaryrefslogtreecommitdiff
diff options
authorStripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>2024-02-16 00:41:26 +0000
committerStripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>2024-02-16 00:41:26 +0000
commit5af1392356bed4ab441e0bd7b82b900a4d08f827 (patch)
treecf55ca9c17da3e0054ab36b890fa3b5c8ea07b9f
parent73eb15af40a43b38a29d11e2c2236a7f750ea6cb (diff)
parent3e2a1e3006bc9f3d43e8724c1b6486fbaae45c49 (diff)
Merge upstream and update generated code for v830
-rw-r--r--CHANGELOG.md12
-rw-r--r--OPENAPI_VERSION2
-rw-r--r--stripe/_account.py16
-rw-r--r--stripe/_account_service.py24
-rw-r--r--stripe/_charge.py5
-rw-r--r--stripe/_confirmation_token.py6
-rw-r--r--stripe/_customer.py2
-rw-r--r--stripe/_customer_payment_method_service.py2
-rw-r--r--stripe/_payment_intent.py24
-rw-r--r--stripe/_payment_intent_service.py30
-rw-r--r--stripe/_payment_method.py17
-rw-r--r--stripe/_payment_method_service.py11
-rw-r--r--stripe/_setup_intent.py24
-rw-r--r--stripe/_setup_intent_service.py30
-rw-r--r--stripe/checkout/_session.py2
-rw-r--r--stripe/checkout/_session_service.py2
16 files changed, 200 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9f8a2b7a..102c88ef 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,17 @@
# Changelog
+## 8.3.0 - 2024-02-15
+* [#1230](https://github.com/stripe/stripe-python/pull/1230) Update generated code
+ * Add support for `networks` on `Card`, `PaymentMethod.CreateParamsCard`, `PaymentMethod.ModifyParamsCard`, and `Token.CreateParamsCard`
+ * Add support for new value `no_voec` on enums `Checkout.Session.CustomerDetails.TaxId.type`, `Invoice.CustomerTaxId.type`, `Tax.Calculation.CustomerDetails.TaxId.type`, `Tax.Transaction.CustomerDetails.TaxId.type`, and `TaxId.type`
+ * Add support for new value `no_voec` on enums `Customer.CreateParams.tax_id_data[].type`, `Invoice.UpcomingLinesParams.customer_details.tax_ids[].type`, `Invoice.UpcomingParams.customer_details.tax_ids[].type`, and `Tax.Calculation.CreateParams.customer_details.tax_ids[].type`
+ * Add support for new value `financial_connections.account.refreshed_ownership` on enum `Event.type`
+ * Add support for `display_brand` on `PaymentMethod.card`
+ * Add support for new value `financial_connections.account.refreshed_ownership` on enums `WebhookEndpoint.CreateParams.enabled_events[]` and `WebhookEndpoint.UpdateParams.enabled_events[]`
+* [#1237](https://github.com/stripe/stripe-python/pull/1237) Remove broken child methods
+ * Bugfix: remove support for `CreditNoteLineItem.list`, `CustomerCashBalanceTransaction.list`, and `CustomerCashBalanceTransaction.retrieve`. These methods were included in the library unintentionally and never functioned.
+* [#1232](https://github.com/stripe/stripe-python/pull/1232) Improve types in _http_client.py
+
## 8.3.0b1 - 2024-02-08
* [#1226](https://github.com/stripe/stripe-python/pull/1226) Update generated code for beta
* Add support for `payment_method_options` on `ConfirmationToken`
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 5433dd90..8b139119 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v829 \ No newline at end of file
+v830 \ No newline at end of file
diff --git a/stripe/_account.py b/stripe/_account.py
index fbfc5b62..21221801 100644
--- a/stripe/_account.py
+++ b/stripe/_account.py
@@ -319,6 +319,10 @@ class Account(
"""
The status of the banking capability, or whether the account can have bank accounts.
"""
+ twint_payments: Optional[Literal["active", "inactive", "pending"]]
+ """
+ The status of the Twint capability of the account, or whether the account can directly process Twint charges.
+ """
us_bank_account_ach_payments: Optional[
Literal["active", "inactive", "pending"]
]
@@ -1610,6 +1614,12 @@ class Account(
"""
The treasury capability.
"""
+ twint_payments: NotRequired[
+ "Account.CreateParamsCapabilitiesTwintPayments"
+ ]
+ """
+ The twint_payments capability.
+ """
us_bank_account_ach_payments: NotRequired[
"Account.CreateParamsCapabilitiesUsBankAccountAchPayments"
]
@@ -1851,6 +1861,12 @@ class Account(
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""
+ class CreateParamsCapabilitiesTwintPayments(TypedDict):
+ requested: NotRequired["bool"]
+ """
+ Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ """
+
class CreateParamsCapabilitiesUsBankAccountAchPayments(TypedDict):
requested: NotRequired["bool"]
"""
diff --git a/stripe/_account_service.py b/stripe/_account_service.py
index 807d9d96..6b612929 100644
--- a/stripe/_account_service.py
+++ b/stripe/_account_service.py
@@ -459,6 +459,12 @@ class AccountService(StripeService):
"""
The treasury capability.
"""
+ twint_payments: NotRequired[
+ "AccountService.CreateParamsCapabilitiesTwintPayments"
+ ]
+ """
+ The twint_payments capability.
+ """
us_bank_account_ach_payments: NotRequired[
"AccountService.CreateParamsCapabilitiesUsBankAccountAchPayments"
]
@@ -700,6 +706,12 @@ class AccountService(StripeService):
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""
+ class CreateParamsCapabilitiesTwintPayments(TypedDict):
+ requested: NotRequired["bool"]
+ """
+ Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ """
+
class CreateParamsCapabilitiesUsBankAccountAchPayments(TypedDict):
requested: NotRequired["bool"]
"""
@@ -2051,6 +2063,12 @@ class AccountService(StripeService):
"""
The treasury capability.
"""
+ twint_payments: NotRequired[
+ "AccountService.UpdateParamsCapabilitiesTwintPayments"
+ ]
+ """
+ The twint_payments capability.
+ """
us_bank_account_ach_payments: NotRequired[
"AccountService.UpdateParamsCapabilitiesUsBankAccountAchPayments"
]
@@ -2292,6 +2310,12 @@ class AccountService(StripeService):
Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
"""
+ class UpdateParamsCapabilitiesTwintPayments(TypedDict):
+ requested: NotRequired["bool"]
+ """
+ Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
+ """
+
class UpdateParamsCapabilitiesUsBankAccountAchPayments(TypedDict):
requested: NotRequired["bool"]
"""
diff --git a/stripe/_charge.py b/stripe/_charge.py
index 9b65b39c..2fbc75c2 100644
--- a/stripe/_charge.py
+++ b/stripe/_charge.py
@@ -1587,6 +1587,9 @@ class Charge(
The last four digits of the Swish account phone number
"""
+ class Twint(StripeObject):
+ pass
+
class UsBankAccount(StripeObject):
account_holder_type: Optional[Literal["company", "individual"]]
"""
@@ -1667,6 +1670,7 @@ class Charge(
sofort: Optional[Sofort]
stripe_account: Optional[StripeAccount]
swish: Optional[Swish]
+ twint: Optional[Twint]
type: str
"""
The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`.
@@ -1716,6 +1720,7 @@ class Charge(
"sofort": Sofort,
"stripe_account": StripeAccount,
"swish": Swish,
+ "twint": Twint,
"us_bank_account": UsBankAccount,
"wechat": Wechat,
"wechat_pay": WechatPay,
diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py
index a34c4a20..053f1518 100644
--- a/stripe/_confirmation_token.py
+++ b/stripe/_confirmation_token.py
@@ -935,6 +935,9 @@ class ConfirmationToken(APIResource["ConfirmationToken"]):
class Swish(StripeObject):
pass
+ class Twint(StripeObject):
+ pass
+
class UsBankAccount(StripeObject):
class Networks(StripeObject):
preferred: Optional[str]
@@ -1069,6 +1072,7 @@ class ConfirmationToken(APIResource["ConfirmationToken"]):
sepa_debit: Optional[SepaDebit]
sofort: Optional[Sofort]
swish: Optional[Swish]
+ twint: Optional[Twint]
type: Literal[
"acss_debit",
"affirm",
@@ -1103,6 +1107,7 @@ class ConfirmationToken(APIResource["ConfirmationToken"]):
"sepa_debit",
"sofort",
"swish",
+ "twint",
"us_bank_account",
"wechat_pay",
"zip",
@@ -1148,6 +1153,7 @@ class ConfirmationToken(APIResource["ConfirmationToken"]):
"sepa_debit": SepaDebit,
"sofort": Sofort,
"swish": Swish,
+ "twint": Twint,
"us_bank_account": UsBankAccount,
"wechat_pay": WechatPay,
"zip": Zip,
diff --git a/stripe/_customer.py b/stripe/_customer.py
index 2a778345..65478a99 100644
--- a/stripe/_customer.py
+++ b/stripe/_customer.py
@@ -831,7 +831,7 @@ class Customer(
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
"""
type: NotRequired[
- "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay', 'zip']"
+ "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']"
]
"""
An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
diff --git a/stripe/_customer_payment_method_service.py b/stripe/_customer_payment_method_service.py
index b9e4888e..588256d7 100644
--- a/stripe/_customer_payment_method_service.py
+++ b/stripe/_customer_payment_method_service.py
@@ -28,7 +28,7 @@ class CustomerPaymentMethodService(StripeService):
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
"""
type: NotRequired[
- "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay', 'zip']"
+ "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']"
]
"""
An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py
index 4ddacacc..bb5cbb21 100644
--- a/stripe/_payment_intent.py
+++ b/stripe/_payment_intent.py
@@ -3947,6 +3947,10 @@ class PaymentIntent(
"""
If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
"""
+ twint: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataTwint"]
+ """
+ If this is a Twint PaymentMethod, this hash contains details about the Twint payment method.
+ """
type: Literal[
"acss_debit",
"affirm",
@@ -3978,6 +3982,7 @@ class PaymentIntent(
"sepa_debit",
"sofort",
"swish",
+ "twint",
"us_bank_account",
"wechat_pay",
"zip",
@@ -4256,6 +4261,9 @@ class PaymentIntent(
class ConfirmParamsPaymentMethodDataSwish(TypedDict):
pass
+ class ConfirmParamsPaymentMethodDataTwint(TypedDict):
+ pass
+
class ConfirmParamsPaymentMethodDataUsBankAccount(TypedDict):
account_holder_type: NotRequired["Literal['company', 'individual']"]
"""
@@ -6675,6 +6683,10 @@ class PaymentIntent(
"""
If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
"""
+ twint: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataTwint"]
+ """
+ If this is a Twint PaymentMethod, this hash contains details about the Twint payment method.
+ """
type: Literal[
"acss_debit",
"affirm",
@@ -6706,6 +6718,7 @@ class PaymentIntent(
"sepa_debit",
"sofort",
"swish",
+ "twint",
"us_bank_account",
"wechat_pay",
"zip",
@@ -6984,6 +6997,9 @@ class PaymentIntent(
class CreateParamsPaymentMethodDataSwish(TypedDict):
pass
+ class CreateParamsPaymentMethodDataTwint(TypedDict):
+ pass
+
class CreateParamsPaymentMethodDataUsBankAccount(TypedDict):
account_holder_type: NotRequired["Literal['company', 'individual']"]
"""
@@ -9425,6 +9441,10 @@ class PaymentIntent(
"""
If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
"""
+ twint: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataTwint"]
+ """
+ If this is a Twint PaymentMethod, this hash contains details about the Twint payment method.
+ """
type: Literal[
"acss_debit",
"affirm",
@@ -9456,6 +9476,7 @@ class PaymentIntent(
"sepa_debit",
"sofort",
"swish",
+ "twint",
"us_bank_account",
"wechat_pay",
"zip",
@@ -9734,6 +9755,9 @@ class PaymentIntent(
class ModifyParamsPaymentMethodDataSwish(TypedDict):
pass
+ class ModifyParamsPaymentMethodDataTwint(TypedDict):
+ pass
+
class ModifyParamsPaymentMethodDataUsBankAccount(TypedDict):
account_holder_type: NotRequired["Literal['company', 'individual']"]
"""
diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py
index 69ad2946..4a47964b 100644
--- a/stripe/_payment_intent_service.py
+++ b/stripe/_payment_intent_service.py
@@ -1717,6 +1717,12 @@ class PaymentIntentService(StripeService):
"""
If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
"""
+ twint: NotRequired[
+ "PaymentIntentService.ConfirmParamsPaymentMethodDataTwint"
+ ]
+ """
+ If this is a Twint PaymentMethod, this hash contains details about the Twint payment method.
+ """
type: Literal[
"acss_debit",
"affirm",
@@ -1748,6 +1754,7 @@ class PaymentIntentService(StripeService):
"sepa_debit",
"sofort",
"swish",
+ "twint",
"us_bank_account",
"wechat_pay",
"zip",
@@ -2028,6 +2035,9 @@ class PaymentIntentService(StripeService):
class ConfirmParamsPaymentMethodDataSwish(TypedDict):
pass
+ class ConfirmParamsPaymentMethodDataTwint(TypedDict):
+ pass
+
class ConfirmParamsPaymentMethodDataUsBankAccount(TypedDict):
account_holder_type: NotRequired["Literal['company', 'individual']"]
"""
@@ -4477,6 +4487,12 @@ class PaymentIntentService(StripeService):
"""
If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
"""
+ twint: NotRequired[
+ "PaymentIntentService.CreateParamsPaymentMethodDataTwint"
+ ]
+ """
+ If this is a Twint PaymentMethod, this hash contains details about the Twint payment method.
+ """
type: Literal[
"acss_debit",
"affirm",
@@ -4508,6 +4524,7 @@ class PaymentIntentService(StripeService):
"sepa_debit",
"sofort",
"swish",
+ "twint",
"us_bank_account",
"wechat_pay",
"zip",
@@ -4788,6 +4805,9 @@ class PaymentIntentService(StripeService):
class CreateParamsPaymentMethodDataSwish(TypedDict):
pass
+ class CreateParamsPaymentMethodDataTwint(TypedDict):
+ pass
+
class CreateParamsPaymentMethodDataUsBankAccount(TypedDict):
account_holder_type: NotRequired["Literal['company', 'individual']"]
"""
@@ -7289,6 +7309,12 @@ class PaymentIntentService(StripeService):
"""
If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
"""
+ twint: NotRequired[
+ "PaymentIntentService.UpdateParamsPaymentMethodDataTwint"
+ ]
+ """
+ If this is a Twint PaymentMethod, this hash contains details about the Twint payment method.
+ """
type: Literal[
"acss_debit",
"affirm",
@@ -7320,6 +7346,7 @@ class PaymentIntentService(StripeService):
"sepa_debit",
"sofort",
"swish",
+ "twint",
"us_bank_account",
"wechat_pay",
"zip",
@@ -7600,6 +7627,9 @@ class PaymentIntentService(StripeService):
class UpdateParamsPaymentMethodDataSwish(TypedDict):
pass
+ class UpdateParamsPaymentMethodDataTwint(TypedDict):
+ pass
+
class UpdateParamsPaymentMethodDataUsBankAccount(TypedDict):
account_holder_type: NotRequired["Literal['company', 'individual']"]
"""
diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py
index e71fd34e..9823fca4 100644
--- a/stripe/_payment_method.py
+++ b/stripe/_payment_method.py
@@ -913,6 +913,9 @@ class PaymentMethod(
class Swish(StripeObject):
pass
+ class Twint(StripeObject):
+ pass
+
class UsBankAccount(StripeObject):
class Networks(StripeObject):
preferred: Optional[str]
@@ -1184,8 +1187,12 @@ class PaymentMethod(
"""
If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
"""
+ twint: NotRequired["PaymentMethod.CreateParamsTwint"]
+ """
+ If this is a Twint PaymentMethod, this hash contains details about the Twint payment method.
+ """
type: NotRequired[
- "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay', 'zip']"
+ "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']"
]
"""
The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
@@ -1489,6 +1496,9 @@ class PaymentMethod(
class CreateParamsSwish(TypedDict):
pass
+ class CreateParamsTwint(TypedDict):
+ pass
+
class CreateParamsUsBankAccount(TypedDict):
account_holder_type: NotRequired["Literal['company', 'individual']"]
"""
@@ -1545,7 +1555,7 @@ class PaymentMethod(
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
"""
type: NotRequired[
- "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay', 'zip']"
+ "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']"
]
"""
An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
@@ -1746,6 +1756,7 @@ class PaymentMethod(
sepa_debit: Optional[SepaDebit]
sofort: Optional[Sofort]
swish: Optional[Swish]
+ twint: Optional[Twint]
type: Literal[
"acss_debit",
"affirm",
@@ -1780,6 +1791,7 @@ class PaymentMethod(
"sepa_debit",
"sofort",
"swish",
+ "twint",
"us_bank_account",
"wechat_pay",
"zip",
@@ -2285,6 +2297,7 @@ class PaymentMethod(
"sepa_debit": SepaDebit,
"sofort": Sofort,
"swish": Swish,
+ "twint": Twint,
"us_bank_account": UsBankAccount,
"wechat_pay": WechatPay,
"zip": Zip,
diff --git a/stripe/_payment_method_service.py b/stripe/_payment_method_service.py
index b93481aa..1cbebcb4 100644
--- a/stripe/_payment_method_service.py
+++ b/stripe/_payment_method_service.py
@@ -185,8 +185,12 @@ class PaymentMethodService(StripeService):
"""
If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
"""
+ twint: NotRequired["PaymentMethodService.CreateParamsTwint"]
+ """
+ If this is a Twint PaymentMethod, this hash contains details about the Twint payment method.
+ """
type: NotRequired[
- "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay', 'zip']"
+ "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']"
]
"""
The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
@@ -492,6 +496,9 @@ class PaymentMethodService(StripeService):
class CreateParamsSwish(TypedDict):
pass
+ class CreateParamsTwint(TypedDict):
+ pass
+
class CreateParamsUsBankAccount(TypedDict):
account_holder_type: NotRequired["Literal['company', 'individual']"]
"""
@@ -548,7 +555,7 @@ class PaymentMethodService(StripeService):
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
"""
type: NotRequired[
- "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay', 'zip']"
+ "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']"
]
"""
An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py
index 31639dd1..c75330e9 100644
--- a/stripe/_setup_intent.py
+++ b/stripe/_setup_intent.py
@@ -957,6 +957,10 @@ class SetupIntent(
"""
If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
"""
+ twint: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataTwint"]
+ """
+ If this is a Twint PaymentMethod, this hash contains details about the Twint payment method.
+ """
type: Literal[
"acss_debit",
"affirm",
@@ -988,6 +992,7 @@ class SetupIntent(
"sepa_debit",
"sofort",
"swish",
+ "twint",
"us_bank_account",
"wechat_pay",
"zip",
@@ -1264,6 +1269,9 @@ class SetupIntent(
class ConfirmParamsPaymentMethodDataSwish(TypedDict):
pass
+ class ConfirmParamsPaymentMethodDataTwint(TypedDict):
+ pass
+
class ConfirmParamsPaymentMethodDataUsBankAccount(TypedDict):
account_holder_type: NotRequired["Literal['company', 'individual']"]
"""
@@ -1992,6 +2000,10 @@ class SetupIntent(
"""
If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
"""
+ twint: NotRequired["SetupIntent.CreateParamsPaymentMethodDataTwint"]
+ """
+ If this is a Twint PaymentMethod, this hash contains details about the Twint payment method.
+ """
type: Literal[
"acss_debit",
"affirm",
@@ -2023,6 +2035,7 @@ class SetupIntent(
"sepa_debit",
"sofort",
"swish",
+ "twint",
"us_bank_account",
"wechat_pay",
"zip",
@@ -2299,6 +2312,9 @@ class SetupIntent(
class CreateParamsPaymentMethodDataSwish(TypedDict):
pass
+ class CreateParamsPaymentMethodDataTwint(TypedDict):
+ pass
+
class CreateParamsPaymentMethodDataUsBankAccount(TypedDict):
account_holder_type: NotRequired["Literal['company', 'individual']"]
"""
@@ -2994,6 +3010,10 @@ class SetupIntent(
"""
If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
"""
+ twint: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataTwint"]
+ """
+ If this is a Twint PaymentMethod, this hash contains details about the Twint payment method.
+ """
type: Literal[
"acss_debit",
"affirm",
@@ -3025,6 +3045,7 @@ class SetupIntent(
"sepa_debit",
"sofort",
"swish",
+ "twint",
"us_bank_account",
"wechat_pay",
"zip",
@@ -3301,6 +3322,9 @@ class SetupIntent(
class ModifyParamsPaymentMethodDataSwish(TypedDict):
pass
+ class ModifyParamsPaymentMethodDataTwint(TypedDict):
+ pass
+
class ModifyParamsPaymentMethodDataUsBankAccount(TypedDict):
account_holder_type: NotRequired["Literal['company', 'individual']"]
"""
diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py
index 86ce581b..59fff9a3 100644
--- a/stripe/_setup_intent_service.py
+++ b/stripe/_setup_intent_service.py
@@ -310,6 +310,12 @@ class SetupIntentService(StripeService):
"""
If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
"""
+ twint: NotRequired[
+ "SetupIntentService.ConfirmParamsPaymentMethodDataTwint"
+ ]
+ """
+ If this is a Twint PaymentMethod, this hash contains details about the Twint payment method.
+ """
type: Literal[
"acss_debit",
"affirm",
@@ -341,6 +347,7 @@ class SetupIntentService(StripeService):
"sepa_debit",
"sofort",
"swish",
+ "twint",
"us_bank_account",
"wechat_pay",
"zip",
@@ -621,6 +628,9 @@ class SetupIntentService(StripeService):
class ConfirmParamsPaymentMethodDataSwish(TypedDict):
pass
+ class ConfirmParamsPaymentMethodDataTwint(TypedDict):
+ pass
+
class ConfirmParamsPaymentMethodDataUsBankAccount(TypedDict):
account_holder_type: NotRequired["Literal['company', 'individual']"]
"""
@@ -1379,6 +1389,12 @@ class SetupIntentService(StripeService):
"""
If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
"""
+ twint: NotRequired[
+ "SetupIntentService.CreateParamsPaymentMethodDataTwint"
+ ]
+ """
+ If this is a Twint PaymentMethod, this hash contains details about the Twint payment method.
+ """
type: Literal[
"acss_debit",
"affirm",
@@ -1410,6 +1426,7 @@ class SetupIntentService(StripeService):
"sepa_debit",
"sofort",
"swish",
+ "twint",
"us_bank_account",
"wechat_pay",
"zip",
@@ -1688,6 +1705,9 @@ class SetupIntentService(StripeService):
class CreateParamsPaymentMethodDataSwish(TypedDict):
pass
+ class CreateParamsPaymentMethodDataTwint(TypedDict):
+ pass
+
class CreateParamsPaymentMethodDataUsBankAccount(TypedDict):
account_holder_type: NotRequired["Literal['company', 'individual']"]
"""
@@ -2425,6 +2445,12 @@ class SetupIntentService(StripeService):
"""
If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
"""
+ twint: NotRequired[
+ "SetupIntentService.UpdateParamsPaymentMethodDataTwint"
+ ]
+ """
+ If this is a Twint PaymentMethod, this hash contains details about the Twint payment method.
+ """
type: Literal[
"acss_debit",
"affirm",
@@ -2456,6 +2482,7 @@ class SetupIntentService(StripeService):
"sepa_debit",
"sofort",
"swish",
+ "twint",
"us_bank_account",
"wechat_pay",
"zip",
@@ -2734,6 +2761,9 @@ class SetupIntentService(StripeService):
class UpdateParamsPaymentMethodDataSwish(TypedDict):
pass
+ class UpdateParamsPaymentMethodDataTwint(TypedDict):
+ pass
+
class UpdateParamsPaymentMethodDataUsBankAccount(TypedDict):
account_holder_type: NotRequired["Literal['company', 'individual']"]
"""
diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py
index 8d219f74..0d03c1b6 100644
--- a/stripe/checkout/_session.py
+++ b/stripe/checkout/_session.py
@@ -1634,7 +1634,7 @@ class Session(
Payment-method-specific configuration.
"""
payment_method_types: NotRequired[
- "List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay', 'zip']]"
+ "List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]"
]
"""
A list of the types of payment methods (e.g., `card`) this Checkout Session can accept.
diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py
index 9473145d..2d6ab909 100644
--- a/stripe/checkout/_session_service.py
+++ b/stripe/checkout/_session_service.py
@@ -172,7 +172,7 @@ class SessionService(StripeService):
Payment-method-specific configuration.
"""
payment_method_types: NotRequired[
- "List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay', 'zip']]"
+ "List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'oxxo', 'p24', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]"
]
"""
A list of the types of payment methods (e.g., `card`) this Checkout Session can accept.