summaryrefslogtreecommitdiff
diff options
authorstripe-openapi[bot] <105521251+stripe-openapi[bot]@users.noreply.github.com>2025-04-01 15:00:44 +0000
committerGitHub <noreply@github.com>2025-04-01 15:00:44 +0000
commit4d905c71eb12bb3a5251555ee2722386954dd9d6 (patch)
tree4c60f2d2862a6847592bbd7882e48da58390e776
parent171d620f7575c638bc9af23ec9ea330e231e6f8f (diff)
parent12fdede5df40d1bd8bdd8300a15444f67c78dccc (diff)
Merge pull request #1477 from stripe/latest-codegen-beta
Update generated code for beta
-rw-r--r--.github/workflows/ci.yml7
-rw-r--r--OPENAPI_VERSION2
-rw-r--r--deps/dev-requirements.txt3
-rw-r--r--stripe/_account.py18
-rw-r--r--stripe/_account_service.py24
-rw-r--r--stripe/_coupon.py8
-rw-r--r--stripe/_coupon_service.py6
-rw-r--r--stripe/_customer_session.py2
-rw-r--r--stripe/_customer_session_service.py2
-rw-r--r--stripe/_event.py8
-rw-r--r--stripe/_invoice.py11
-rw-r--r--stripe/_invoice_item.py5
-rw-r--r--stripe/_invoice_item_service.py6
-rw-r--r--stripe/_invoice_line_item.py3
-rw-r--r--stripe/_invoice_service.py2
-rw-r--r--stripe/_payment_method.py2
-rw-r--r--stripe/_payment_method_service.py6
-rw-r--r--stripe/_quote_preview_invoice.py9
-rw-r--r--stripe/_subscription.py6
-rw-r--r--stripe/_subscription_service.py10
-rw-r--r--stripe/_webhook_endpoint.py16
-rw-r--r--stripe/_webhook_endpoint_service.py16
-rw-r--r--stripe/billing/_credit_balance_summary.py2
-rw-r--r--stripe/billing/_credit_balance_summary_service.py2
-rw-r--r--stripe/billing/_credit_balance_transaction.py2
-rw-r--r--stripe/billing/_credit_balance_transaction_service.py6
-rw-r--r--stripe/billing/_credit_grant.py2
-rw-r--r--stripe/billing/_credit_grant_service.py2
-rw-r--r--stripe/billing_portal/_session.py2
-rw-r--r--stripe/billing_portal/_session_service.py6
-rw-r--r--stripe/checkout/_session.py22
-rw-r--r--stripe/checkout/_session_service.py8
-rw-r--r--stripe/events/__init__.py33
-rw-r--r--stripe/events/_event_classes.py44
-rw-r--r--stripe/events/_v2_core_account_configuration_customer_capability_status_updated_event.py55
-rw-r--r--stripe/events/_v2_core_account_configuration_customer_updated_event.py9
-rw-r--r--stripe/events/_v2_core_account_configuration_merchant_capability_status_updated_event.py100
-rw-r--r--stripe/events/_v2_core_account_configuration_merchant_updated_event.py9
-rw-r--r--stripe/events/_v2_core_account_configuration_recipient_capability_status_updated_event.py65
-rw-r--r--stripe/events/_v2_core_account_configuration_recipient_updated_event.py9
-rw-r--r--stripe/events/_v2_core_account_identity_updated_event.py9
-rw-r--r--stripe/events/_v2_core_account_person_created_event.py83
-rw-r--r--stripe/events/_v2_core_account_person_deleted_event.py83
-rw-r--r--stripe/events/_v2_core_account_person_updated_event.py83
-rw-r--r--stripe/events/_v2_core_account_requirements_updated_event.py9
-rw-r--r--stripe/terminal/_reader.py22
-rw-r--r--stripe/terminal/_reader_service.py6
-rw-r--r--stripe/v2/_money_management_service.py6
-rw-r--r--stripe/v2/core/_account.py134
-rw-r--r--stripe/v2/core/_account_service.py8
-rw-r--r--stripe/v2/money_management/__init__.py4
-rw-r--r--stripe/v2/money_management/_outbound_payment_quote_service.py (renamed from stripe/v2/money_management/outbound_payments/_quote_service.py)20
-rw-r--r--stripe/v2/money_management/_outbound_payment_service.py7
-rw-r--r--stripe/v2/money_management/outbound_payments/__init__.py5
-rw-r--r--tests/test_generated_examples.py8
55 files changed, 888 insertions, 149 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 66b649c1..8d1d847d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -71,12 +71,15 @@ jobs:
# Specific ubuntu version to support python 3.6 testing
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 for details
# move to ubuntu-latest when we drop 3.6
- runs-on: ubuntu-20.04
+
+ #### TODO (helenye): **REVERT THIS BACK WHEN THE 20.04 BROWNOUT IS OVER**
+ #### https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
+ runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python_version:
- - "3.6"
+ # - "3.6"
- "3.7"
- "3.8"
- "3.9"
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 0161892c..6b6014df 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v1629 \ No newline at end of file
+v1641 \ No newline at end of file
diff --git a/deps/dev-requirements.txt b/deps/dev-requirements.txt
index 7cc5b237..3bca687e 100644
--- a/deps/dev-requirements.txt
+++ b/deps/dev-requirements.txt
@@ -11,4 +11,5 @@ mypy == 1.7.0
# formatting
ruff == 0.9.6
# linting
-flake8
+# flake8 7.2.0 bumped to pyflakes 3.3.0, which adds a new lint error around global usage which will need to be manually fixed
+flake8==7.1.2
diff --git a/stripe/_account.py b/stripe/_account.py
index 08fd4089..ffb78c15 100644
--- a/stripe/_account.py
+++ b/stripe/_account.py
@@ -338,6 +338,12 @@ class Account(
"""
The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments.
"""
+ nz_bank_account_becs_debit_payments: Optional[
+ Literal["active", "inactive", "pending"]
+ ]
+ """
+ The status of the New Zealand BECS Direct Debit payments capability of the account, or whether the account can directly process New Zealand BECS Direct Debit charges.
+ """
oxxo_payments: Optional[Literal["active", "inactive", "pending"]]
"""
The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges.
@@ -1972,6 +1978,12 @@ class Account(
"""
The naver_pay_payments capability.
"""
+ nz_bank_account_becs_debit_payments: NotRequired[
+ "Account.CreateParamsCapabilitiesNzBankAccountBecsDebitPayments"
+ ]
+ """
+ The nz_bank_account_becs_debit_payments capability.
+ """
oxxo_payments: NotRequired[
"Account.CreateParamsCapabilitiesOxxoPayments"
]
@@ -2389,6 +2401,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 CreateParamsCapabilitiesNzBankAccountBecsDebitPayments(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 CreateParamsCapabilitiesOxxoPayments(TypedDict):
requested: NotRequired[bool]
"""
diff --git a/stripe/_account_service.py b/stripe/_account_service.py
index d23419d1..12286724 100644
--- a/stripe/_account_service.py
+++ b/stripe/_account_service.py
@@ -486,6 +486,12 @@ class AccountService(StripeService):
"""
The naver_pay_payments capability.
"""
+ nz_bank_account_becs_debit_payments: NotRequired[
+ "AccountService.CreateParamsCapabilitiesNzBankAccountBecsDebitPayments"
+ ]
+ """
+ The nz_bank_account_becs_debit_payments capability.
+ """
oxxo_payments: NotRequired[
"AccountService.CreateParamsCapabilitiesOxxoPayments"
]
@@ -907,6 +913,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 CreateParamsCapabilitiesNzBankAccountBecsDebitPayments(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 CreateParamsCapabilitiesOxxoPayments(TypedDict):
requested: NotRequired[bool]
"""
@@ -2608,6 +2620,12 @@ class AccountService(StripeService):
"""
The naver_pay_payments capability.
"""
+ nz_bank_account_becs_debit_payments: NotRequired[
+ "AccountService.UpdateParamsCapabilitiesNzBankAccountBecsDebitPayments"
+ ]
+ """
+ The nz_bank_account_becs_debit_payments capability.
+ """
oxxo_payments: NotRequired[
"AccountService.UpdateParamsCapabilitiesOxxoPayments"
]
@@ -3029,6 +3047,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 UpdateParamsCapabilitiesNzBankAccountBecsDebitPayments(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 UpdateParamsCapabilitiesOxxoPayments(TypedDict):
requested: NotRequired[bool]
"""
diff --git a/stripe/_coupon.py b/stripe/_coupon.py
index dc27b26e..125282fa 100644
--- a/stripe/_coupon.py
+++ b/stripe/_coupon.py
@@ -57,10 +57,14 @@ class Coupon(
"""
Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
"""
- duration: NotRequired[Literal["forever", "once"]]
+ duration: NotRequired[Literal["forever", "once", "repeating"]]
"""
Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.
"""
+ duration_in_months: NotRequired[int]
+ """
+ Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect.
+ """
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
@@ -194,7 +198,7 @@ class Coupon(
"""
Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
"""
- duration: Literal["forever", "once"]
+ duration: Literal["forever", "once", "repeating"]
"""
One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.
"""
diff --git a/stripe/_coupon_service.py b/stripe/_coupon_service.py
index 8374de6e..665088b2 100644
--- a/stripe/_coupon_service.py
+++ b/stripe/_coupon_service.py
@@ -29,10 +29,14 @@ class CouponService(StripeService):
"""
Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
"""
- duration: NotRequired[Literal["forever", "once"]]
+ duration: NotRequired[Literal["forever", "once", "repeating"]]
"""
Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.
"""
+ duration_in_months: NotRequired[int]
+ """
+ Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect.
+ """
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
diff --git a/stripe/_customer_session.py b/stripe/_customer_session.py
index 3bb0f060..353396ed 100644
--- a/stripe/_customer_session.py
+++ b/stripe/_customer_session.py
@@ -114,7 +114,7 @@ class CustomerSession(CreateableAPIResource["CustomerSession"]):
"""
Configuration for each component. Exactly 1 component must be enabled.
"""
- customer: str
+ customer: NotRequired[str]
"""
The ID of an existing customer for which to create the Customer Session.
"""
diff --git a/stripe/_customer_session_service.py b/stripe/_customer_session_service.py
index 97d5880c..2b4c96f3 100644
--- a/stripe/_customer_session_service.py
+++ b/stripe/_customer_session_service.py
@@ -13,7 +13,7 @@ class CustomerSessionService(StripeService):
"""
Configuration for each component. Exactly 1 component must be enabled.
"""
- customer: str
+ customer: NotRequired[str]
"""
The ID of an existing customer for which to create the Customer Session.
"""
diff --git a/stripe/_event.py b/stripe/_event.py
index f47f4a73..f368a6bb 100644
--- a/stripe/_event.py
+++ b/stripe/_event.py
@@ -480,6 +480,14 @@ class Event(ListableAPIResource["Event"]):
"treasury.received_credit.failed",
"treasury.received_credit.succeeded",
"treasury.received_debit.created",
+ "billing.credit_balance_transaction.created",
+ "billing.credit_grant.created",
+ "billing.credit_grant.updated",
+ "billing.meter.created",
+ "billing.meter.deactivated",
+ "billing.meter.reactivated",
+ "billing.meter.updated",
+ "balance_settings.updated",
]
"""
Description of the event (for example, `invoice.created` or `charge.refunded`).
diff --git a/stripe/_invoice.py b/stripe/_invoice.py
index 0ccb29f8..ede19d76 100644
--- a/stripe/_invoice.py
+++ b/stripe/_invoice.py
@@ -697,7 +697,9 @@ class Invoice(
class SubscriptionDetails(StripeObject):
class PauseCollection(StripeObject):
- behavior: Optional[str]
+ behavior: Optional[
+ Literal["keep_as_draft", "mark_uncollectible", "void"]
+ ]
"""
The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
"""
@@ -715,7 +717,7 @@ class Invoice(
"""
If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
"""
- subscription: str
+ subscription: ExpandableField["Subscription"]
"""
The subscription that generated this invoice
"""
@@ -3936,7 +3938,7 @@ class Invoice(
"""
For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
"""
- cancel_at: NotRequired["Literal['']|int|Literal['min_period_end']"]
+ cancel_at: NotRequired["Literal['']|int"]
"""
A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
"""
@@ -5565,6 +5567,9 @@ class Invoice(
The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
"""
parent: Optional[Parent]
+ """
+ The parent that generated this invoice
+ """
payment_settings: PaymentSettings
payments: Optional[ListObject["InvoicePayment"]]
"""
diff --git a/stripe/_invoice_item.py b/stripe/_invoice_item.py
index 7f3d5cb8..b92849da 100644
--- a/stripe/_invoice_item.py
+++ b/stripe/_invoice_item.py
@@ -111,7 +111,7 @@ class InvoiceItem(
"""
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
"""
- customer: str
+ customer: NotRequired[str]
"""
The ID of the customer who will be billed when this invoice item is billed.
"""
@@ -548,6 +548,9 @@ class InvoiceItem(
String representing the object's type. Objects of the same type share the same value.
"""
parent: Optional[Parent]
+ """
+ The parent that generated this invoice
+ """
period: Period
pricing: Optional[Pricing]
"""
diff --git a/stripe/_invoice_item_service.py b/stripe/_invoice_item_service.py
index 5d3d813c..0a420c95 100644
--- a/stripe/_invoice_item_service.py
+++ b/stripe/_invoice_item_service.py
@@ -19,7 +19,7 @@ class InvoiceItemService(StripeService):
"""
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
"""
- customer: str
+ customer: NotRequired[str]
"""
The ID of the customer who will be billed when this invoice item is billed.
"""
@@ -571,7 +571,7 @@ class InvoiceItemService(StripeService):
def create(
self,
- params: "InvoiceItemService.CreateParams",
+ params: "InvoiceItemService.CreateParams" = {},
options: RequestOptions = {},
) -> InvoiceItem:
"""
@@ -590,7 +590,7 @@ class InvoiceItemService(StripeService):
async def create_async(
self,
- params: "InvoiceItemService.CreateParams",
+ params: "InvoiceItemService.CreateParams" = {},
options: RequestOptions = {},
) -> InvoiceItem:
"""
diff --git a/stripe/_invoice_line_item.py b/stripe/_invoice_line_item.py
index 2ae109d0..a762f33f 100644
--- a/stripe/_invoice_line_item.py
+++ b/stripe/_invoice_line_item.py
@@ -581,6 +581,9 @@ class InvoiceLineItem(UpdateableAPIResource["InvoiceLineItem"]):
String representing the object's type. Objects of the same type share the same value.
"""
parent: Optional[Parent]
+ """
+ The parent that generated this invoice
+ """
period: Period
pretax_credit_amounts: Optional[List[PretaxCreditAmount]]
"""
diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py
index 91832355..ee7314b1 100644
--- a/stripe/_invoice_service.py
+++ b/stripe/_invoice_service.py
@@ -2739,7 +2739,7 @@ class InvoiceService(StripeService):
"""
For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
"""
- cancel_at: NotRequired["Literal['']|int|Literal['min_period_end']"]
+ cancel_at: NotRequired["Literal['']|int"]
"""
A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
"""
diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py
index bb2fc161..da41c167 100644
--- a/stripe/_payment_method.py
+++ b/stripe/_payment_method.py
@@ -1407,7 +1407,7 @@ class PaymentMethod(
pass
class AttachParams(RequestOptions):
- customer: str
+ customer: NotRequired[str]
"""
The ID of the customer to which to attach the PaymentMethod.
"""
diff --git a/stripe/_payment_method_service.py b/stripe/_payment_method_service.py
index d2aae902..b4394377 100644
--- a/stripe/_payment_method_service.py
+++ b/stripe/_payment_method_service.py
@@ -11,7 +11,7 @@ from typing_extensions import Literal, NotRequired, TypedDict
class PaymentMethodService(StripeService):
class AttachParams(TypedDict):
- customer: str
+ customer: NotRequired[str]
"""
The ID of the customer to which to attach the PaymentMethod.
"""
@@ -1271,7 +1271,7 @@ class PaymentMethodService(StripeService):
def attach(
self,
payment_method: str,
- params: "PaymentMethodService.AttachParams",
+ params: "PaymentMethodService.AttachParams" = {},
options: RequestOptions = {},
) -> PaymentMethod:
"""
@@ -1305,7 +1305,7 @@ class PaymentMethodService(StripeService):
async def attach_async(
self,
payment_method: str,
- params: "PaymentMethodService.AttachParams",
+ params: "PaymentMethodService.AttachParams" = {},
options: RequestOptions = {},
) -> PaymentMethod:
"""
diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py
index 48c012f1..c9ee04ea 100644
--- a/stripe/_quote_preview_invoice.py
+++ b/stripe/_quote_preview_invoice.py
@@ -680,7 +680,9 @@ class QuotePreviewInvoice(StripeObject):
class SubscriptionDetails(StripeObject):
class PauseCollection(StripeObject):
- behavior: Optional[str]
+ behavior: Optional[
+ Literal["keep_as_draft", "mark_uncollectible", "void"]
+ ]
"""
The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
"""
@@ -698,7 +700,7 @@ class QuotePreviewInvoice(StripeObject):
"""
If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
"""
- subscription: str
+ subscription: ExpandableField["Subscription"]
"""
The subscription that generated this invoice
"""
@@ -1434,6 +1436,9 @@ class QuotePreviewInvoice(StripeObject):
The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
"""
parent: Optional[Parent]
+ """
+ The parent that generated this invoice
+ """
payment_settings: PaymentSettings
payments: Optional[ListObject["InvoicePayment"]]
"""
diff --git a/stripe/_subscription.py b/stripe/_subscription.py
index c9427588..4d727140 100644
--- a/stripe/_subscription.py
+++ b/stripe/_subscription.py
@@ -589,7 +589,7 @@ class Subscription(
"""
Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC.
"""
- cancel_at: NotRequired["int|Literal['min_period_end']"]
+ cancel_at: NotRequired[int]
"""
A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
"""
@@ -607,7 +607,7 @@ class Subscription(
"""
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
"""
- customer: str
+ customer: NotRequired[str]
"""
The identifier of the customer to subscribe.
"""
@@ -1524,7 +1524,7 @@ class Subscription(
"""
Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
"""
- cancel_at: NotRequired["Literal['']|int|Literal['min_period_end']"]
+ cancel_at: NotRequired["Literal['']|int"]
"""
A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
"""
diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py
index 214a9192..a24f750b 100644
--- a/stripe/_subscription_service.py
+++ b/stripe/_subscription_service.py
@@ -75,7 +75,7 @@ class SubscriptionService(StripeService):
"""
Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC.
"""
- cancel_at: NotRequired["int|Literal['min_period_end']"]
+ cancel_at: NotRequired[int]
"""
A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
"""
@@ -93,7 +93,7 @@ class SubscriptionService(StripeService):
"""
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
"""
- customer: str
+ customer: NotRequired[str]
"""
The identifier of the customer to subscribe.
"""
@@ -1068,7 +1068,7 @@ class SubscriptionService(StripeService):
"""
Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
"""
- cancel_at: NotRequired["Literal['']|int|Literal['min_period_end']"]
+ cancel_at: NotRequired["Literal['']|int"]
"""
A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
"""
@@ -2130,7 +2130,7 @@ class SubscriptionService(StripeService):
def create(
self,
- params: "SubscriptionService.CreateParams",
+ params: "SubscriptionService.CreateParams" = {},
options: RequestOptions = {},
) -> Subscription:
"""
@@ -2155,7 +2155,7 @@ class SubscriptionService(StripeService):
async def create_async(
self,
- params: "SubscriptionService.CreateParams",
+ params: "SubscriptionService.CreateParams" = {},
options: RequestOptions = {},
) -> Subscription:
"""
diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py
index c507ac86..e6331287 100644
--- a/stripe/_webhook_endpoint.py
+++ b/stripe/_webhook_endpoint.py
@@ -432,6 +432,14 @@ class WebhookEndpoint(
"treasury.received_credit.failed",
"treasury.received_credit.succeeded",
"treasury.received_debit.created",
+ "billing.credit_balance_transaction.created",
+ "billing.credit_grant.created",
+ "billing.credit_grant.updated",
+ "billing.meter.created",
+ "billing.meter.deactivated",
+ "billing.meter.reactivated",
+ "billing.meter.updated",
+ "balance_settings.updated",
]
]
"""
@@ -758,6 +766,14 @@ class WebhookEndpoint(
"treasury.received_credit.failed",
"treasury.received_credit.succeeded",
"treasury.received_debit.created",
+ "billing.credit_balance_transaction.created",
+ "billing.credit_grant.created",
+ "billing.credit_grant.updated",
+ "billing.meter.created",
+ "billing.meter.deactivated",
+ "billing.meter.reactivated",
+ "billing.meter.updated",
+ "balance_settings.updated",
]
]
]
diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py
index bd15a719..8149b0e9 100644
--- a/stripe/_webhook_endpoint_service.py
+++ b/stripe/_webhook_endpoint_service.py
@@ -413,6 +413,14 @@ class WebhookEndpointService(StripeService):
"treasury.received_credit.failed",
"treasury.received_credit.succeeded",
"treasury.received_debit.created",
+ "billing.credit_balance_transaction.created",
+ "billing.credit_grant.created",
+ "billing.credit_grant.updated",
+ "billing.meter.created",
+ "billing.meter.deactivated",
+ "billing.meter.reactivated",
+ "billing.meter.updated",
+ "balance_settings.updated",
]
]
"""
@@ -745,6 +753,14 @@ class WebhookEndpointService(StripeService):
"treasury.received_credit.failed",
"treasury.received_credit.succeeded",
"treasury.received_debit.created",
+ "billing.credit_balance_transaction.created",
+ "billing.credit_grant.created",
+ "billing.credit_grant.updated",
+ "billing.meter.created",
+ "billing.meter.deactivated",
+ "billing.meter.reactivated",
+ "billing.meter.updated",
+ "balance_settings.updated",
]
]
]
diff --git a/stripe/billing/_credit_balance_summary.py b/stripe/billing/_credit_balance_summary.py
index 89005160..488c4340 100644
--- a/stripe/billing/_credit_balance_summary.py
+++ b/stripe/billing/_credit_balance_summary.py
@@ -77,7 +77,7 @@ class CreditBalanceSummary(SingletonAPIResource["CreditBalanceSummary"]):
}
class RetrieveParams(RequestOptions):
- customer: str
+ customer: NotRequired[str]
"""
The customer for which to fetch credit balance summary.
"""
diff --git a/stripe/billing/_credit_balance_summary_service.py b/stripe/billing/_credit_balance_summary_service.py
index df5a3daf..ed0c29fd 100644
--- a/stripe/billing/_credit_balance_summary_service.py
+++ b/stripe/billing/_credit_balance_summary_service.py
@@ -9,7 +9,7 @@ from typing_extensions import Literal, NotRequired, TypedDict
class CreditBalanceSummaryService(StripeService):
class RetrieveParams(TypedDict):
- customer: str
+ customer: NotRequired[str]
"""
The customer for which to fetch credit balance summary.
"""
diff --git a/stripe/billing/_credit_balance_transaction.py b/stripe/billing/_credit_balance_transaction.py
index a5841cd0..2e381d9a 100644
--- a/stripe/billing/_credit_balance_transaction.py
+++ b/stripe/billing/_credit_balance_transaction.py
@@ -124,7 +124,7 @@ class CreditBalanceTransaction(
"""
The credit grant for which to fetch credit balance transactions.
"""
- customer: str
+ customer: NotRequired[str]
"""
The customer for which to fetch credit balance transactions.
"""
diff --git a/stripe/billing/_credit_balance_transaction_service.py b/stripe/billing/_credit_balance_transaction_service.py
index 8f69cdf1..88b6b5c7 100644
--- a/stripe/billing/_credit_balance_transaction_service.py
+++ b/stripe/billing/_credit_balance_transaction_service.py
@@ -15,7 +15,7 @@ class CreditBalanceTransactionService(StripeService):
"""
The credit grant for which to fetch credit balance transactions.
"""
- customer: str
+ customer: NotRequired[str]
"""
The customer for which to fetch credit balance transactions.
"""
@@ -48,7 +48,7 @@ class CreditBalanceTransactionService(StripeService):
def list(
self,
- params: "CreditBalanceTransactionService.ListParams",
+ params: "CreditBalanceTransactionService.ListParams" = {},
options: RequestOptions = {},
) -> ListObject[CreditBalanceTransaction]:
"""
@@ -67,7 +67,7 @@ class CreditBalanceTransactionService(StripeService):
async def list_async(
self,
- params: "CreditBalanceTransactionService.ListParams",
+ params: "CreditBalanceTransactionService.ListParams" = {},
options: RequestOptions = {},
) -> ListObject[CreditBalanceTransaction]:
"""
diff --git a/stripe/billing/_credit_grant.py b/stripe/billing/_credit_grant.py
index 5cf6af3c..ea5aa83a 100644
--- a/stripe/billing/_credit_grant.py
+++ b/stripe/billing/_credit_grant.py
@@ -92,7 +92,7 @@ class CreditGrant(
"""
The category of this credit grant.
"""
- customer: str
+ customer: NotRequired[str]
"""
ID of the customer to receive the billing credits.
"""
diff --git a/stripe/billing/_credit_grant_service.py b/stripe/billing/_credit_grant_service.py
index 81fcea9a..2b3617ad 100644
--- a/stripe/billing/_credit_grant_service.py
+++ b/stripe/billing/_credit_grant_service.py
@@ -25,7 +25,7 @@ class CreditGrantService(StripeService):
"""
The category of this credit grant.
"""
- customer: str
+ customer: NotRequired[str]
"""
ID of the customer to receive the billing credits.
"""
diff --git a/stripe/billing_portal/_session.py b/stripe/billing_portal/_session.py
index 8edfba6a..629ec45c 100644
--- a/stripe/billing_portal/_session.py
+++ b/stripe/billing_portal/_session.py
@@ -177,7 +177,7 @@ class Session(CreateableAPIResource["Session"]):
"""
The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.
"""
- customer: str
+ customer: NotRequired[str]
"""
The ID of an existing customer.
"""
diff --git a/stripe/billing_portal/_session_service.py b/stripe/billing_portal/_session_service.py
index 803ae2ed..21ce06da 100644
--- a/stripe/billing_portal/_session_service.py
+++ b/stripe/billing_portal/_session_service.py
@@ -13,7 +13,7 @@ class SessionService(StripeService):
"""
The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.
"""
- customer: str
+ customer: NotRequired[str]
"""
The ID of an existing customer.
"""
@@ -239,7 +239,7 @@ class SessionService(StripeService):
def create(
self,
- params: "SessionService.CreateParams",
+ params: "SessionService.CreateParams" = {},
options: RequestOptions = {},
) -> Session:
"""
@@ -258,7 +258,7 @@ class SessionService(StripeService):
async def create_async(
self,
- params: "SessionService.CreateParams",
+ params: "SessionService.CreateParams" = {},
options: RequestOptions = {},
) -> Session:
"""
diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py
index 65e6bc52..23abeb5b 100644
--- a/stripe/checkout/_session.py
+++ b/stripe/checkout/_session.py
@@ -1651,6 +1651,14 @@ class Session(
"""
Permissions for updating the Checkout Session.
"""
+ update_line_items: Optional[Literal["client_only", "server_only"]]
+ """
+ Determines which entity is allowed to update the line items.
+
+ Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items.
+
+ When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API.
+ """
update_shipping_details: Optional[
Literal["client_only", "server_only"]
]
@@ -4129,6 +4137,14 @@ class Session(
"""
Permissions for updating the Checkout Session.
"""
+ update_line_items: NotRequired[Literal["client_only", "server_only"]]
+ """
+ Determines which entity is allowed to update the line items.
+
+ Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items.
+
+ When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API.
+ """
update_shipping_details: NotRequired[
Literal["client_only", "server_only"]
]
@@ -5071,10 +5087,6 @@ class Session(
"""
Information about the customer collected within the Checkout Session.
"""
- collected_information: Optional[CollectedInformation]
- """
- Information about the customer collected within the Checkout Session.
- """
consent: Optional[Consent]
"""
Results of `consent_collection` for this session.
@@ -5093,7 +5105,7 @@ class Session(
"""
currency_conversion: Optional[CurrencyConversion]
"""
- Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions
+ Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions created before 2025-03-31.
"""
custom_fields: List[CustomField]
"""
diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py
index 9df79f6f..d743707d 100644
--- a/stripe/checkout/_session_service.py
+++ b/stripe/checkout/_session_service.py
@@ -2106,6 +2106,14 @@ class SessionService(StripeService):
"""
Permissions for updating the Checkout Session.
"""
+ update_line_items: NotRequired[Literal["client_only", "server_only"]]
+ """
+ Determines which entity is allowed to update the line items.
+
+ Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items.
+
+ When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API.
+ """
update_shipping_details: NotRequired[
Literal["client_only", "server_only"]
]
diff --git a/stripe/events/__init__.py b/stripe/events/__init__.py
index ba0f3dc4..3b43ecbf 100644
--- a/stripe/events/__init__.py
+++ b/stripe/events/__init__.py
@@ -6,9 +6,42 @@ from stripe.events._v1_billing_meter_error_report_triggered_event import (
from stripe.events._v1_billing_meter_no_meter_found_event import (
V1BillingMeterNoMeterFoundEvent as V1BillingMeterNoMeterFoundEvent,
)
+from stripe.events._v2_core_account_configuration_customer_capability_status_updated_event import (
+ V2CoreAccountConfigurationCustomerCapabilityStatusUpdatedEvent as V2CoreAccountConfigurationCustomerCapabilityStatusUpdatedEvent,
+)
+from stripe.events._v2_core_account_configuration_customer_updated_event import (
+ V2CoreAccountConfigurationCustomerUpdatedEvent as V2CoreAccountConfigurationCustomerUpdatedEvent,
+)
+from stripe.events._v2_core_account_configuration_merchant_capability_status_updated_event import (
+ V2CoreAccountConfigurationMerchantCapabilityStatusUpdatedEvent as V2CoreAccountConfigurationMerchantCapabilityStatusUpdatedEvent,
+)
+from stripe.events._v2_core_account_configuration_merchant_updated_event import (
+ V2CoreAccountConfigurationMerchantUpdatedEvent as V2CoreAccountConfigurationMerchantUpdatedEvent,
+)
+from stripe.events._v2_core_account_configuration_recipient_capability_status_updated_event import (
+ V2CoreAccountConfigurationRecipientCapabilityStatusUpdatedEvent as V2CoreAccountConfigurationRecipientCapabilityStatusUpdatedEvent,
+)
+from stripe.events._v2_core_account_configuration_recipient_updated_event import (
+ V2CoreAccountConfigurationRecipientUpdatedEvent as V2CoreAccountConfigurationRecipientUpdatedEvent,
+)
+from stripe.events._v2_core_account_identity_updated_event import (
+ V2CoreAccountIdentityUpdatedEvent as V2CoreAccountIdentityUpdatedEvent,
+)
from stripe.events._v2_core_account_link_completed_event import (
V2CoreAccountLinkCompletedEvent as V2CoreAccountLinkCompletedEvent,
)
+from stripe.events._v2_core_account_person_created_event import (
+ V2CoreAccountPersonCreatedEvent as V2CoreAccountPersonCreatedEvent,
+)
+from stripe.events._v2_core_account_person_deleted_event import (
+ V2CoreAccountPersonDeletedEvent as V2CoreAccountPersonDeletedEvent,
+)
+from stripe.events._v2_core_account_person_updated_event import (
+ V2CoreAccountPersonUpdatedEvent as V2CoreAccountPersonUpdatedEvent,
+)
+from stripe.events._v2_core_account_requirements_updated_event import (
+ V2CoreAccountRequirementsUpdatedEvent as V2CoreAccountRequirementsUpdatedEvent,
+)
from stripe.events._v2_money_management_financial_account_created_event import (
V2MoneyManagementFinancialAccountCreatedEvent as V2MoneyManagementFinancialAccountCreatedEvent,
)
diff --git a/stripe/events/_event_classes.py b/stripe/events/_event_classes.py
index 2790f44b..d50ebc26 100644
--- a/stripe/events/_event_classes.py
+++ b/stripe/events/_event_classes.py
@@ -1,8 +1,41 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
+from stripe.events._v2_core_account_requirements_updated_event import (
+ V2CoreAccountRequirementsUpdatedEvent,
+)
from stripe.events._v2_core_account_link_completed_event import (
V2CoreAccountLinkCompletedEvent,
)
+from stripe.events._v2_core_account_configuration_customer_capability_status_updated_event import (
+ V2CoreAccountConfigurationCustomerCapabilityStatusUpdatedEvent,
+)
+from stripe.events._v2_core_account_configuration_customer_updated_event import (
+ V2CoreAccountConfigurationCustomerUpdatedEvent,
+)
+from stripe.events._v2_core_account_identity_updated_event import (
+ V2CoreAccountIdentityUpdatedEvent,
+)
+from stripe.events._v2_core_account_person_created_event import (
+ V2CoreAccountPersonCreatedEvent,
+)
+from stripe.events._v2_core_account_person_deleted_event import (
+ V2CoreAccountPersonDeletedEvent,
+)
+from stripe.events._v2_core_account_person_updated_event import (
+ V2CoreAccountPersonUpdatedEvent,
+)
+from stripe.events._v2_core_account_configuration_merchant_capability_status_updated_event import (
+ V2CoreAccountConfigurationMerchantCapabilityStatusUpdatedEvent,
+)
+from stripe.events._v2_core_account_configuration_merchant_updated_event import (
+ V2CoreAccountConfigurationMerchantUpdatedEvent,
+)
+from stripe.events._v2_core_account_configuration_recipient_capability_status_updated_event import (
+ V2CoreAccountConfigurationRecipientCapabilityStatusUpdatedEvent,
+)
+from stripe.events._v2_core_account_configuration_recipient_updated_event import (
+ V2CoreAccountConfigurationRecipientUpdatedEvent,
+)
from stripe.events._v1_billing_meter_error_report_triggered_event import (
V1BillingMeterErrorReportTriggeredEvent,
)
@@ -98,7 +131,18 @@ from stripe.events._v2_money_management_received_debit_updated_event import (
THIN_EVENT_CLASSES = {
V1BillingMeterErrorReportTriggeredEvent.LOOKUP_TYPE: V1BillingMeterErrorReportTriggeredEvent,
V1BillingMeterNoMeterFoundEvent.LOOKUP_TYPE: V1BillingMeterNoMeterFoundEvent,
+ V2CoreAccountConfigurationCustomerCapabilityStatusUpdatedEvent.LOOKUP_TYPE: V2CoreAccountConfigurationCustomerCapabilityStatusUpdatedEvent,
+ V2CoreAccountConfigurationCustomerUpdatedEvent.LOOKUP_TYPE: V2CoreAccountConfigurationCustomerUpdatedEvent,
+ V2CoreAccountConfigurationMerchantCapabilityStatusUpdatedEvent.LOOKUP_TYPE: V2CoreAccountConfigurationMerchantCapabilityStatusUpdatedEvent,
+ V2CoreAccountConfigurationMerchantUpdatedEvent.LOOKUP_TYPE: V2CoreAccountConfigurationMerchantUpdatedEvent,
+ V2CoreAccountConfigurationRecipientCapabilityStatusUpdatedEvent.LOOKUP_TYPE: V2CoreAccountConfigurationRecipientCapabilityStatusUpdatedEvent,
+ V2CoreAccountConfigurationRecipientUpdatedEvent.LOOKUP_TYPE: V2CoreAccountConfigurationRecipientUpdatedEvent,
+ V2CoreAccountIdentityUpdatedEvent.LOOKUP_TYPE: V2CoreAccountIdentityUpdatedEvent,
V2CoreAccountLinkCompletedEvent.LOOKUP_TYPE: V2CoreAccountLinkCompletedEvent,
+ V2CoreAccountPersonCreatedEvent.LOOKUP_TYPE: V2CoreAccountPersonCreatedEvent,
+ V2CoreAccountPersonDeletedEvent.LOOKUP_TYPE: V2CoreAccountPersonDeletedEvent,
+ V2CoreAccountPersonUpdatedEvent.LOOKUP_TYPE: V2CoreAccountPersonUpdatedEvent,
+ V2CoreAccountRequirementsUpdatedEvent.LOOKUP_TYPE: V2CoreAccountRequirementsUpdatedEvent,
V2MoneyManagementFinancialAccountCreatedEvent.LOOKUP_TYPE: V2MoneyManagementFinancialAccountCreatedEvent,
V2MoneyManagementFinancialAddressActivatedEvent.LOOKUP_TYPE: V2MoneyManagementFinancialAddressActivatedEvent,
V2MoneyManagementFinancialAddressFailedEvent.LOOKUP_TYPE: V2MoneyManagementFinancialAddressFailedEvent,
diff --git a/stripe/events/_v2_core_account_configuration_customer_capability_status_updated_event.py b/stripe/events/_v2_core_account_configuration_customer_capability_status_updated_event.py
new file mode 100644
index 00000000..331575c0
--- /dev/null
+++ b/stripe/events/_v2_core_account_configuration_customer_capability_status_updated_event.py
@@ -0,0 +1,55 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._api_mode import ApiMode
+from stripe._api_requestor import _APIRequestor
+from stripe._stripe_object import StripeObject
+from stripe._stripe_response import StripeResponse
+from stripe.v2._event import Event
+from typing import Any, Dict, Optional
+from typing_extensions import Literal
+
+
+class V2CoreAccountConfigurationCustomerCapabilityStatusUpdatedEvent(Event):
+ LOOKUP_TYPE = (
+ "v2.core.account[configuration.customer].capability_status_updated"
+ )
+ type: Literal[
+ "v2.core.account[configuration.customer].capability_status_updated"
+ ]
+
+ class V2CoreAccountConfigurationCustomerCapabilityStatusUpdatedEventData(
+ StripeObject,
+ ):
+ updated_capability: Literal["automatic_indirect_tax"]
+ """
+ Open Enum. The capability which had its status updated.
+ """
+
+ data: V2CoreAccountConfigurationCustomerCapabilityStatusUpdatedEventData
+ """
+ Data for the v2.core.account[configuration.customer].capability_status_updated event
+ """
+
+ @classmethod
+ def _construct_from(
+ cls,
+ *,
+ values: Dict[str, Any],
+ last_response: Optional[StripeResponse] = None,
+ requestor: "_APIRequestor",
+ api_mode: ApiMode,
+ ) -> "V2CoreAccountConfigurationCustomerCapabilityStatusUpdatedEvent":
+ evt = super()._construct_from(
+ values=values,
+ last_response=last_response,
+ requestor=requestor,
+ api_mode=api_mode,
+ )
+ if hasattr(evt, "data"):
+ evt.data = V2CoreAccountConfigurationCustomerCapabilityStatusUpdatedEvent.V2CoreAccountConfigurationCustomerCapabilityStatusUpdatedEventData._construct_from(
+ values=evt.data,
+ last_response=last_response,
+ requestor=requestor,
+ api_mode=api_mode,
+ )
+ return evt
diff --git a/stripe/events/_v2_core_account_configuration_customer_updated_event.py b/stripe/events/_v2_core_account_configuration_customer_updated_event.py
new file mode 100644
index 00000000..8a61ea36
--- /dev/null
+++ b/stripe/events/_v2_core_account_configuration_customer_updated_event.py
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe.v2._event import Event
+from typing_extensions import Literal
+
+
+class V2CoreAccountConfigurationCustomerUpdatedEvent(Event):
+ LOOKUP_TYPE = "v2.core.account[configuration.customer].updated"
+ type: Literal["v2.core.account[configuration.customer].updated"]
diff --git a/stripe/events/_v2_core_account_configuration_merchant_capability_status_updated_event.py b/stripe/events/_v2_core_account_configuration_merchant_capability_status_updated_event.py
new file mode 100644
index 00000000..765bc47c
--- /dev/null
+++ b/stripe/events/_v2_core_account_configuration_merchant_capability_status_updated_event.py
@@ -0,0 +1,100 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._api_mode import ApiMode
+from stripe._api_requestor import _APIRequestor
+from stripe._stripe_object import StripeObject
+from stripe._stripe_response import StripeResponse
+from stripe.v2._event import Event
+from typing import Any, Dict, Optional
+from typing_extensions import Literal
+
+
+class V2CoreAccountConfigurationMerchantCapabilityStatusUpdatedEvent(Event):
+ LOOKUP_TYPE = (
+ "v2.core.account[configuration.merchant].capability_status_updated"
+ )
+ type: Literal[
+ "v2.core.account[configuration.merchant].capability_status_updated"
+ ]
+
+ class V2CoreAccountConfigurationMerchantCapabilityStatusUpdatedEventData(
+ StripeObject,
+ ):
+ updated_capability: Literal[
+ "ach_debit_payments",
+ "acss_debit_payments",
+ "affirm_payments",
+ "afterpay_clearpay_payments",
+ "alma_payments",
+ "amazon_pay_payments",
+ "au_becs_debit_payments",
+ "bacs_debit_payments",
+ "bancontact_payments",
+ "blik_payments",
+ "boleto_payments",
+ "card_payments",
+ "cartes_bancaires_payments",
+ "cashapp_payments",
+ "eps_payments",
+ "fpx_payments",
+ "gb_bank_transfer_payments",
+ "grabpay_payments",
+ "ideal_payments",
+ "jcb_payments",
+ "jp_bank_transfer_payments",
+ "kakao_pay_payments",
+ "klarna_payments",
+ "konbini_payments",
+ "kr_card_payments",
+ "link_payments",
+ "mobilepay_payments",
+ "multibanco_payments",
+ "mx_bank_transfer_payments",
+ "naver_pay_payments",
+ "oxxo_payments",
+ "p24_payments",
+ "payco_payments",
+ "paynow_payments",
+ "pay_by_bank_payments",
+ "promptpay_payments",
+ "revolut_pay_payments",
+ "samsung_pay_payments",
+ "sepa_bank_transfer_payments",
+ "sepa_debit_payments",
+ "swish_payments",
+ "twint_payments",
+ "us_bank_transfer_payments",
+ "zip_payments",
+ ]
+ """
+ Open Enum. The capability which had its status updated.
+ """
+
+ data: V2CoreAccountConfigurationMerchantCapabilityStatusUpdatedEventData
+ """
+ Data for the v2.core.account[configuration.merchant].capability_status_updated event
+ """
+
+ @classmethod
+ def _construct_from(
+ cls,
+ *,
+ values: Dict[str, Any],
+ last_response: Optional[StripeResponse] = None,
+ requestor: "_APIRequestor",
+ api_mode: ApiMode,
+ ) -> "V2CoreAccountConfigurationMerchantCapabilityStatusUpdatedEvent":
+ evt = super()._construct_from(
+ values=values,
+ last_response=last_response,
+ requestor=requestor,
+ api_mode=api_mode,
+ )
+ if hasattr(evt, "data"):
+ evt.data = V2CoreAccountConfigurationMerchantCapabilityStatusUpdatedEvent.V2CoreAccountConfigurationMerchantCapabilityStatusUpdatedEventData._construct_from(
+ values=evt.data,
+ last_response=last_response,
+ requestor=requestor,
+ api_mode=api_mode,
+ )
+ return evt
diff --git a/stripe/events/_v2_core_account_configuration_merchant_updated_event.py b/stripe/events/_v2_core_account_configuration_merchant_updated_event.py
new file mode 100644
index 00000000..f223d3c2
--- /dev/null
+++ b/stripe/events/_v2_core_account_configuration_merchant_updated_event.py
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe.v2._event import Event
+from typing_extensions import Literal
+
+
+class V2CoreAccountConfigurationMerchantUpdatedEvent(Event):
+ LOOKUP_TYPE = "v2.core.account[configuration.merchant].updated"
+ type: Literal["v2.core.account[configuration.merchant].updated"]
diff --git a/stripe/events/_v2_core_account_configuration_recipient_capability_status_updated_event.py b/stripe/events/_v2_core_account_configuration_recipient_capability_status_updated_event.py
new file mode 100644
index 00000000..ecd6a68d
--- /dev/null
+++ b/stripe/events/_v2_core_account_configuration_recipient_capability_status_updated_event.py
@@ -0,0 +1,65 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._api_mode import ApiMode
+from stripe._api_requestor import _APIRequestor
+from stripe._stripe_object import StripeObject
+from stripe._stripe_response import StripeResponse
+from stripe.v2._event import Event
+from typing import Any, Dict, Optional
+from typing_extensions import Literal
+
+
+class V2CoreAccountConfigurationRecipientCapabilityStatusUpdatedEvent(Event):
+ LOOKUP_TYPE = (
+ "v2.core.account[configuration.recipient].capability_status_updated"
+ )
+ type: Literal[
+ "v2.core.account[configuration.recipient].capability_status_updated"
+ ]
+
+ class V2CoreAccountConfigurationRecipientCapabilityStatusUpdatedEventData(
+ StripeObject,
+ ):
+ updated_capability: Literal[
+ "bank_accounts.local",
+ "bank_accounts.local_uk",
+ "bank_accounts.wire",
+ "bank_accounts.wire_uk",
+ "cards",
+ "cards_uk",
+ "crypto_wallets_v2",
+ "stripe_balance.stripe_transfers",
+ "stripe.transfers",
+ ]
+ """
+ Open Enum. The capability which had its status updated.
+ """
+
+ data: V2CoreAccountConfigurationRecipientCapabilityStatusUpdatedEventData
+ """
+ Data for the v2.core.account[configuration.recipient].capability_status_updated event
+ """
+
+ @classmethod
+ def _construct_from(
+ cls,
+ *,
+ values: Dict[str, Any],
+ last_response: Optional[StripeResponse] = None,
+ requestor: "_APIRequestor",
+ api_mode: ApiMode,
+ ) -> "V2CoreAccountConfigurationRecipientCapabilityStatusUpdatedEvent":
+ evt = super()._construct_from(
+ values=values,
+ last_response=last_response,
+ requestor=requestor,
+ api_mode=api_mode,
+ )
+ if hasattr(evt, "data"):
+ evt.data = V2CoreAccountConfigurationRecipientCapabilityStatusUpdatedEvent.V2CoreAccountConfigurationRecipientCapabilityStatusUpdatedEventData._construct_from(
+ values=evt.data,
+ last_response=last_response,
+ requestor=requestor,
+ api_mode=api_mode,
+ )
+ return evt
diff --git a/stripe/events/_v2_core_account_configuration_recipient_updated_event.py b/stripe/events/_v2_core_account_configuration_recipient_updated_event.py
new file mode 100644
index 00000000..102238a4
--- /dev/null
+++ b/stripe/events/_v2_core_account_configuration_recipient_updated_event.py
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe.v2._event import Event
+from typing_extensions import Literal
+
+
+class V2CoreAccountConfigurationRecipientUpdatedEvent(Event):
+ LOOKUP_TYPE = "v2.core.account[configuration.recipient].updated"
+ type: Literal["v2.core.account[configuration.recipient].updated"]
diff --git a/stripe/events/_v2_core_account_identity_updated_event.py b/stripe/events/_v2_core_account_identity_updated_event.py
new file mode 100644
index 00000000..a8d1205f
--- /dev/null
+++ b/stripe/events/_v2_core_account_identity_updated_event.py
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe.v2._event import Event
+from typing_extensions import Literal
+
+
+class V2CoreAccountIdentityUpdatedEvent(Event):
+ LOOKUP_TYPE = "v2.core.account[identity].updated"
+ type: Literal["v2.core.account[identity].updated"]
diff --git a/stripe/events/_v2_core_account_person_created_event.py b/stripe/events/_v2_core_account_person_created_event.py
new file mode 100644
index 00000000..9a11d0ac
--- /dev/null
+++ b/stripe/events/_v2_core_account_person_created_event.py
@@ -0,0 +1,83 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._api_mode import ApiMode
+from stripe._api_requestor import _APIRequestor
+from stripe._stripe_object import StripeObject
+from stripe._stripe_response import StripeResponse
+from stripe.v2._event import Event
+from stripe.v2.core._person import Person
+from typing import Any, Dict, Optional, cast
+from typing_extensions import Literal
+
+
+class V2CoreAccountPersonCreatedEvent(Event):
+ LOOKUP_TYPE = "v2.core.account_person.created"
+ type: Literal["v2.core.account_person.created"]
+
+ class V2CoreAccountPersonCreatedEventData(StripeObject):
+ account_id: str
+ """
+ The ID of the v2 account.
+ """
+
+ data: V2CoreAccountPersonCreatedEventData
+ """
+ Data for the v2.core.account_person.created event
+ """
+
+ @classmethod
+ def _construct_from(
+ cls,
+ *,
+ values: Dict[str, Any],
+ last_response: Optional[StripeResponse] = None,
+ requestor: "_APIRequestor",
+ api_mode: ApiMode,
+ ) -> "V2CoreAccountPersonCreatedEvent":
+ evt = super()._construct_from(
+ values=values,
+ last_response=last_response,
+ requestor=requestor,
+ api_mode=api_mode,
+ )
+ if hasattr(evt, "data"):
+ evt.data = V2CoreAccountPersonCreatedEvent.V2CoreAccountPersonCreatedEventData._construct_from(
+ values=evt.data,
+ last_response=last_response,
+ requestor=requestor,
+ api_mode=api_mode,
+ )
+ return evt
+
+ class RelatedObject(StripeObject):
+ id: str
+ """
+ Unique identifier for the object relevant to the event.
+ """
+ type: str
+ """
+ Type of the object relevant to the event.
+ """
+ url: str
+ """
+ URL to retrieve the resource.
+ """
+
+ related_object: RelatedObject
+ """
+ Object containing the reference to API resource relevant to the event
+ """
+
+ def fetch_related_object(self) -> Person:
+ """
+ Retrieves the related object from the API. Makes an API request on every call.
+ """
+ return cast(
+ Person,
+ self._requestor.request(
+ "get",
+ self.related_object.url,
+ base_address="api",
+ options={"stripe_account": self.context},
+ ),
+ )
diff --git a/stripe/events/_v2_core_account_person_deleted_event.py b/stripe/events/_v2_core_account_person_deleted_event.py
new file mode 100644
index 00000000..dc9edcc9
--- /dev/null
+++ b/stripe/events/_v2_core_account_person_deleted_event.py
@@ -0,0 +1,83 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._api_mode import ApiMode
+from stripe._api_requestor import _APIRequestor
+from stripe._stripe_object import StripeObject
+from stripe._stripe_response import StripeResponse
+from stripe.v2._event import Event
+from stripe.v2.core._person import Person
+from typing import Any, Dict, Optional, cast
+from typing_extensions import Literal
+
+
+class V2CoreAccountPersonDeletedEvent(Event):
+ LOOKUP_TYPE = "v2.core.account_person.deleted"
+ type: Literal["v2.core.account_person.deleted"]
+
+ class V2CoreAccountPersonDeletedEventData(StripeObject):
+ account_id: str
+ """
+ The ID of the v2 account.
+ """
+
+ data: V2CoreAccountPersonDeletedEventData
+ """
+ Data for the v2.core.account_person.deleted event
+ """
+
+ @classmethod
+ def _construct_from(
+ cls,
+ *,
+ values: Dict[str, Any],
+ last_response: Optional[StripeResponse] = None,
+ requestor: "_APIRequestor",
+ api_mode: ApiMode,
+ ) -> "V2CoreAccountPersonDeletedEvent":
+ evt = super()._construct_from(
+ values=values,
+ last_response=last_response,
+ requestor=requestor,
+ api_mode=api_mode,
+ )
+ if hasattr(evt, "data"):
+ evt.data = V2CoreAccountPersonDeletedEvent.V2CoreAccountPersonDeletedEventData._construct_from(
+ values=evt.data,
+ last_response=last_response,
+ requestor=requestor,
+ api_mode=api_mode,
+ )
+ return evt
+
+ class RelatedObject(StripeObject):
+ id: str
+ """
+ Unique identifier for the object relevant to the event.
+ """
+ type: str
+ """
+ Type of the object relevant to the event.
+ """
+ url: str
+ """
+ URL to retrieve the resource.
+ """
+
+ related_object: RelatedObject
+ """
+ Object containing the reference to API resource relevant to the event
+ """
+
+ def fetch_related_object(self) -> Person:
+ """
+ Retrieves the related object from the API. Makes an API request on every call.
+ """
+ return cast(
+ Person,
+ self._requestor.request(
+ "get",
+ self.related_object.url,
+ base_address="api",
+ options={"stripe_account": self.context},
+ ),
+ )
diff --git a/stripe/events/_v2_core_account_person_updated_event.py b/stripe/events/_v2_core_account_person_updated_event.py
new file mode 100644
index 00000000..4f698144
--- /dev/null
+++ b/stripe/events/_v2_core_account_person_updated_event.py
@@ -0,0 +1,83 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._api_mode import ApiMode
+from stripe._api_requestor import _APIRequestor
+from stripe._stripe_object import StripeObject
+from stripe._stripe_response import StripeResponse
+from stripe.v2._event import Event
+from stripe.v2.core._person import Person
+from typing import Any, Dict, Optional, cast
+from typing_extensions import Literal
+
+
+class V2CoreAccountPersonUpdatedEvent(Event):
+ LOOKUP_TYPE = "v2.core.account_person.updated"
+ type: Literal["v2.core.account_person.updated"]
+
+ class V2CoreAccountPersonUpdatedEventData(StripeObject):
+ account_id: str
+ """
+ The ID of the v2 account.
+ """
+
+ data: V2CoreAccountPersonUpdatedEventData
+ """
+ Data for the v2.core.account_person.updated event
+ """
+
+ @classmethod
+ def _construct_from(
+ cls,
+ *,
+ values: Dict[str, Any],
+ last_response: Optional[StripeResponse] = None,
+ requestor: "_APIRequestor",
+ api_mode: ApiMode,
+ ) -> "V2CoreAccountPersonUpdatedEvent":
+ evt = super()._construct_from(
+ values=values,
+ last_response=last_response,
+ requestor=requestor,
+ api_mode=api_mode,
+ )
+ if hasattr(evt, "data"):
+ evt.data = V2CoreAccountPersonUpdatedEvent.V2CoreAccountPersonUpdatedEventData._construct_from(
+ values=evt.data,
+ last_response=last_response,
+ requestor=requestor,
+ api_mode=api_mode,
+ )
+ return evt
+
+ class RelatedObject(StripeObject):
+ id: str
+ """
+ Unique identifier for the object relevant to the event.
+ """
+ type: str
+ """
+ Type of the object relevant to the event.
+ """
+ url: str
+ """
+ URL to retrieve the resource.
+ """
+
+ related_object: RelatedObject
+ """
+ Object containing the reference to API resource relevant to the event
+ """
+
+ def fetch_related_object(self) -> Person:
+ """
+ Retrieves the related object from the API. Makes an API request on every call.
+ """
+ return cast(
+ Person,
+ self._requestor.request(
+ "get",
+ self.related_object.url,
+ base_address="api",
+ options={"stripe_account": self.context},
+ ),
+ )
diff --git a/stripe/events/_v2_core_account_requirements_updated_event.py b/stripe/events/_v2_core_account_requirements_updated_event.py
new file mode 100644
index 00000000..1bba7da0
--- /dev/null
+++ b/stripe/events/_v2_core_account_requirements_updated_event.py
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe.v2._event import Event
+from typing_extensions import Literal
+
+
+class V2CoreAccountRequirementsUpdatedEvent(Event):
+ LOOKUP_TYPE = "v2.core.account[requirements].updated"
+ type: Literal["v2.core.account[requirements].updated"]
diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py
index 027d2ab0..e24459dd 100644
--- a/stripe/terminal/_reader.py
+++ b/stripe/terminal/_reader.py
@@ -84,22 +84,30 @@ class Reader(
class Selection(StripeObject):
class Choice(StripeObject):
+ id: Optional[str]
+ """
+ The id to be selected
+ """
style: Optional[Literal["primary", "secondary"]]
"""
The button style for the choice
"""
- value: str
+ text: str
"""
- A value to be selected
+ The text to be selected
"""
choices: List[Choice]
"""
List of possible choices to be selected
"""
- value: Optional[str]
+ id: Optional[str]
+ """
+ The id of the selected choice
"""
- The value of the selected choice
+ text: Optional[str]
+ """
+ The text of the selected choice
"""
_inner_class_types = {"choices": Choice}
@@ -542,11 +550,15 @@ class Reader(
"""
class CollectInputsParamsInputSelectionChoice(TypedDict):
+ id: str
+ """
+ The unique identifier for this choice
+ """
style: NotRequired[Literal["primary", "secondary"]]
"""
The style of the button which will be shown for this choice
"""
- value: str
+ text: str
"""
The text which will be shown on the button for this choice
"""
diff --git a/stripe/terminal/_reader_service.py b/stripe/terminal/_reader_service.py
index 16bb62d7..e6deb7f8 100644
--- a/stripe/terminal/_reader_service.py
+++ b/stripe/terminal/_reader_service.py
@@ -83,11 +83,15 @@ class ReaderService(StripeService):
"""
class CollectInputsParamsInputSelectionChoice(TypedDict):
+ id: str
+ """
+ The unique identifier for this choice
+ """
style: NotRequired[Literal["primary", "secondary"]]
"""
The style of the button which will be shown for this choice
"""
- value: str
+ text: str
"""
The text which will be shown on the button for this choice
"""
diff --git a/stripe/v2/_money_management_service.py b/stripe/v2/_money_management_service.py
index f733ef43..dab5aa20 100644
--- a/stripe/v2/_money_management_service.py
+++ b/stripe/v2/_money_management_service.py
@@ -11,6 +11,9 @@ from stripe.v2.money_management._financial_address_service import (
from stripe.v2.money_management._inbound_transfer_service import (
InboundTransferService,
)
+from stripe.v2.money_management._outbound_payment_quote_service import (
+ OutboundPaymentQuoteService,
+)
from stripe.v2.money_management._outbound_payment_service import (
OutboundPaymentService,
)
@@ -46,6 +49,9 @@ class MoneyManagementService(StripeService):
self.financial_addresses = FinancialAddressService(self._requestor)
self.inbound_transfers = InboundTransferService(self._requestor)
self.outbound_payments = OutboundPaymentService(self._requestor)
+ self.outbound_payment_quotes = OutboundPaymentQuoteService(
+ self._requestor,
+ )
self.outbound_transfers = OutboundTransferService(self._requestor)
self.outbound_setup_intents = OutboundSetupIntentService(
self._requestor,
diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py
index 2e5d1f19..5c8f683b 100644
--- a/stripe/v2/core/_account.py
+++ b/stripe/v2/core/_account.py
@@ -3129,69 +3129,71 @@ class Account(StripeObject):
}
class DefaultOutboundDestination(StripeObject):
- type: Optional[
- Literal[
- "at_bank_account",
- "au_bank_account",
- "ba_bank_account",
- "be_bank_account",
- "bg_bank_account",
- "bj_bank_account",
- "bs_bank_account",
- "card",
- "ca_bank_account",
- "ch_bank_account",
- "ci_bank_account",
- "cy_bank_account",
- "cz_bank_account",
- "de_bank_account",
- "dk_bank_account",
- "ec_bank_account",
- "ee_bank_account",
- "es_bank_account",
- "et_bank_account",
- "fi_bank_account",
- "fr_bank_account",
- "gb_bank_account",
- "gr_bank_account",
- "hr_bank_account",
- "hu_bank_account",
- "id_bank_account",
- "ie_bank_account",
- "il_bank_account",
- "in_bank_account",
- "is_bank_account",
- "it_bank_account",
- "ke_bank_account",
- "li_bank_account",
- "lt_bank_account",
- "lu_bank_account",
- "lv_bank_account",
- "mn_bank_account",
- "mt_bank_account",
- "mu_bank_account",
- "mx_bank_account",
- "na_bank_account",
- "nl_bank_account",
- "no_bank_account",
- "nz_bank_account",
- "pa_bank_account",
- "ph_bank_account",
- "pl_bank_account",
- "pt_bank_account",
- "ro_bank_account",
- "rs_bank_account",
- "se_bank_account",
- "sg_bank_account",
- "si_bank_account",
- "sk_bank_account",
- "sn_bank_account",
- "sv_bank_account",
- "tn_bank_account",
- "tr_bank_account",
- "us_bank_account",
- "za_bank_account",
- ]
+ id: str
+ """
+ The payout method ID of the default outbound destination.
+ """
+ type: Literal[
+ "at_bank_account",
+ "au_bank_account",
+ "ba_bank_account",
+ "be_bank_account",
+ "bg_bank_account",
+ "bj_bank_account",
+ "bs_bank_account",
+ "card",
+ "ca_bank_account",
+ "ch_bank_account",
+ "ci_bank_account",
+ "cy_bank_account",
+ "cz_bank_account",
+ "de_bank_account",
+ "dk_bank_account",
+ "ec_bank_account",
+ "ee_bank_account",
+ "es_bank_account",
+ "et_bank_account",
+ "fi_bank_account",
+ "fr_bank_account",
+ "gb_bank_account",
+ "gr_bank_account",
+ "hr_bank_account",
+ "hu_bank_account",
+ "id_bank_account",
+ "ie_bank_account",
+ "il_bank_account",
+ "in_bank_account",
+ "is_bank_account",
+ "it_bank_account",
+ "ke_bank_account",
+ "li_bank_account",
+ "lt_bank_account",
+ "lu_bank_account",
+ "lv_bank_account",
+ "mn_bank_account",
+ "mt_bank_account",
+ "mu_bank_account",
+ "mx_bank_account",
+ "na_bank_account",
+ "nl_bank_account",
+ "no_bank_account",
+ "nz_bank_account",
+ "pa_bank_account",
+ "ph_bank_account",
+ "pl_bank_account",
+ "pt_bank_account",
+ "ro_bank_account",
+ "rs_bank_account",
+ "se_bank_account",
+ "sg_bank_account",
+ "si_bank_account",
+ "sk_bank_account",
+ "sn_bank_account",
+ "sv_bank_account",
+ "tn_bank_account",
+ "tr_bank_account",
+ "us_bank_account",
+ "za_bank_account",
]
"""
Closed Enum. The payout method type of the default outbound destination.
@@ -3216,7 +3218,7 @@ class Account(StripeObject):
"""
merchant: Optional[Merchant]
"""
- The Merchant Configuration allows the Account to make charges.
+ The Merchant configuration allows the Account to act as a connected account and collect payments facilitated by a Connect platform. You can add this configuration to your connected accounts only if you've completed onboarding as a Connect platform.
"""
recipient: Optional[Recipient]
"""
@@ -7156,7 +7158,7 @@ class Account(StripeObject):
minimum_deadline: Optional[MinimumDeadline]
"""
- An aggregate soonest point when the account will be impacted by not providing requirements.
+ The soonest date and time a requirement on the Account will become `past due`. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: `2022-09-18T13:22:18.123Z`.
"""
_inner_class_types = {"minimum_deadline": MinimumDeadline}
@@ -7184,7 +7186,7 @@ class Account(StripeObject):
"""
contact_email: Optional[str]
"""
- The default contact email address for the Account.
+ The default contact email address for the Account. Required when configuring the account as a merchant or recipient.
"""
created: str
"""
diff --git a/stripe/v2/core/_account_service.py b/stripe/v2/core/_account_service.py
index a065f005..0f7bbeb3 100644
--- a/stripe/v2/core/_account_service.py
+++ b/stripe/v2/core/_account_service.py
@@ -31,7 +31,7 @@ class AccountService(StripeService):
"""
contact_email: NotRequired[str]
"""
- The default contact email address for the Account.
+ The default contact email address for the Account. Required when configuring the account as a merchant or recipient.
"""
dashboard: NotRequired[Literal["express", "full", "none"]]
"""
@@ -80,7 +80,7 @@ class AccountService(StripeService):
"AccountService.CreateParamsConfigurationMerchant"
]
"""
- The Merchant Configuration allows the Account to make charges.
+ The Merchant configuration allows the Account to act as a connected account and collect payments facilitated by a Connect platform. You can add this configuration to your connected accounts only if you've completed onboarding as a Connect platform.
"""
recipient: NotRequired[
"AccountService.CreateParamsConfigurationRecipient"
@@ -5257,7 +5257,7 @@ class AccountService(StripeService):
"""
contact_email: NotRequired[str]
"""
- The default contact email address for the Account.
+ The default contact email address for the Account. Required when configuring the account as a merchant or recipient.
"""
dashboard: NotRequired[Literal["express", "full", "none"]]
"""
@@ -5306,7 +5306,7 @@ class AccountService(StripeService):
"AccountService.UpdateParamsConfigurationMerchant"
]
"""
- The Merchant Configuration allows the Account to make charges.
+ The Merchant configuration allows the Account to act as a connected account and collect payments facilitated by a Connect platform. You can add this configuration to your connected accounts only if you've completed onboarding as a Connect platform.
"""
recipient: NotRequired[
"AccountService.UpdateParamsConfigurationRecipient"
diff --git a/stripe/v2/money_management/__init__.py b/stripe/v2/money_management/__init__.py
index 743017ec..c8dc37f3 100644
--- a/stripe/v2/money_management/__init__.py
+++ b/stripe/v2/money_management/__init__.py
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
-from stripe.v2.money_management import outbound_payments as outbound_payments
from stripe.v2.money_management._adjustment import Adjustment as Adjustment
from stripe.v2.money_management._adjustment_service import (
AdjustmentService as AdjustmentService,
@@ -29,6 +28,9 @@ from stripe.v2.money_management._outbound_payment import (
from stripe.v2.money_management._outbound_payment_quote import (
OutboundPaymentQuote as OutboundPaymentQuote,
)
+from stripe.v2.money_management._outbound_payment_quote_service import (
+ OutboundPaymentQuoteService as OutboundPaymentQuoteService,
+)
from stripe.v2.money_management._outbound_payment_service import (
OutboundPaymentService as OutboundPaymentService,
)
diff --git a/stripe/v2/money_management/outbound_payments/_quote_service.py b/stripe/v2/money_management/_outbound_payment_quote_service.py
index 14951352..3598c6f4 100644
--- a/stripe/v2/money_management/outbound_payments/_quote_service.py
+++ b/stripe/v2/money_management/_outbound_payment_quote_service.py
@@ -10,10 +10,10 @@ from typing import cast
from typing_extensions import Literal, NotRequired, TypedDict
-class QuoteService(StripeService):
+class OutboundPaymentQuoteService(StripeService):
_CreateParamsBase = TypedDict(
"CreateParams",
- {"from": "QuoteService.CreateParamsFrom"},
+ {"from": "OutboundPaymentQuoteService.CreateParamsFrom"},
)
class CreateParams(_CreateParamsBase):
@@ -22,12 +22,12 @@ class QuoteService(StripeService):
The "presentment amount" to be sent to the recipient.
"""
delivery_options: NotRequired[
- "QuoteService.CreateParamsDeliveryOptions"
+ "OutboundPaymentQuoteService.CreateParamsDeliveryOptions"
]
"""
Method to be used to send the OutboundPayment.
"""
- to: "QuoteService.CreateParamsTo"
+ to: "OutboundPaymentQuoteService.CreateParamsTo"
"""
Request details about the recipient of an OutboundPaymentQuote.
"""
@@ -69,7 +69,9 @@ class QuoteService(StripeService):
"""
def create(
- self, params: "QuoteService.CreateParams", options: RequestOptions = {}
+ self,
+ params: "OutboundPaymentQuoteService.CreateParams",
+ options: RequestOptions = {},
) -> OutboundPaymentQuote:
"""
Creates an OutboundPaymentQuote usable in an OutboundPayment.
@@ -78,7 +80,7 @@ class QuoteService(StripeService):
OutboundPaymentQuote,
self._request(
"post",
- "/v2/money_management/outbound_payments/quotes",
+ "/v2/money_management/outbound_payment_quotes",
base_address="api",
params=params,
options=options,
@@ -86,7 +88,9 @@ class QuoteService(StripeService):
)
async def create_async(
- self, params: "QuoteService.CreateParams", options: RequestOptions = {}
+ self,
+ params: "OutboundPaymentQuoteService.CreateParams",
+ options: RequestOptions = {},
) -> OutboundPaymentQuote:
"""
Creates an OutboundPaymentQuote usable in an OutboundPayment.
@@ -95,7 +99,7 @@ class QuoteService(StripeService):
OutboundPaymentQuote,
await self._request_async(
"post",
- "/v2/money_management/outbound_payments/quotes",
+ "/v2/money_management/outbound_payment_quotes",
base_address="api",
params=params,
options=options,
diff --git a/stripe/v2/money_management/_outbound_payment_service.py b/stripe/v2/money_management/_outbound_payment_service.py
index e5937ded..4b4d4f5e 100644
--- a/stripe/v2/money_management/_outbound_payment_service.py
+++ b/stripe/v2/money_management/_outbound_payment_service.py
@@ -6,18 +6,11 @@ from stripe._util import sanitize_id
from stripe.v2._amount import AmountParam
from stripe.v2._list_object import ListObject
from stripe.v2.money_management._outbound_payment import OutboundPayment
-from stripe.v2.money_management.outbound_payments._quote_service import (
- QuoteService,
-)
from typing import Dict, List, cast
from typing_extensions import Literal, NotRequired, TypedDict
class OutboundPaymentService(StripeService):
- def __init__(self, requestor):
- super().__init__(requestor)
- self.quotes = QuoteService(self._requestor)
-
class CancelParams(TypedDict):
pass
diff --git a/stripe/v2/money_management/outbound_payments/__init__.py b/stripe/v2/money_management/outbound_payments/__init__.py
deleted file mode 100644
index a19c3ca6..00000000
--- a/stripe/v2/money_management/outbound_payments/__init__.py
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- coding: utf-8 -*-
-# File generated from our OpenAPI spec
-from stripe.v2.money_management.outbound_payments._quote_service import (
- QuoteService as QuoteService,
-)
diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py
index a529a90f..2e04d0cb 100644
--- a/tests/test_generated_examples.py
+++ b/tests/test_generated_examples.py
@@ -34125,19 +34125,19 @@ class TestGeneratedExamples(object):
api_base="https://api.stripe.com",
)
- def test_v2_money_management_outbound_payments_quote_post_service(
+ def test_v2_money_management_outbound_payment_quote_post_service(
self, http_client_mock: HTTPClientMock
) -> None:
http_client_mock.stub_request(
"post",
- "/v2/money_management/outbound_payments/quotes",
+ "/v2/money_management/outbound_payment_quotes",
)
client = StripeClient(
"sk_test_123",
http_client=http_client_mock.get_mock_http_client(),
)
- client.v2.money_management.outbound_payments.quotes.create(
+ client.v2.money_management.outbound_payment_quotes.create(
{
"amount": {"currency": "USD", "value": 96},
"from": {
@@ -34153,7 +34153,7 @@ class TestGeneratedExamples(object):
)
http_client_mock.assert_requested(
"post",
- path="/v2/money_management/outbound_payments/quotes",
+ path="/v2/money_management/outbound_payment_quotes",
query_string="",
api_base="https://api.stripe.com",
post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"currency","financial_account":"financial_account"},"to":{"currency":"currency","payout_method":"payout_method","recipient":"recipient"}}',