Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #1267

Merged
merged 11 commits into from
Mar 7, 2024
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v857
v869
31 changes: 31 additions & 0 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ class Features(StripeObject):
features: Features
_inner_class_types = {"features": Features}

class Documents(StripeObject):
class Features(StripeObject):
pass

enabled: bool
"""
Whether the embedded component is enabled.
"""
features: Features
_inner_class_types = {"features": Features}

class PaymentDetails(StripeObject):
class Features(StripeObject):
capture_payments: bool
Expand Down Expand Up @@ -99,11 +110,13 @@ class Features(StripeObject):
_inner_class_types = {"features": Features}

account_onboarding: AccountOnboarding
documents: Documents
payment_details: PaymentDetails
payments: Payments
payouts: Payouts
_inner_class_types = {
"account_onboarding": AccountOnboarding,
"documents": Documents,
"payment_details": PaymentDetails,
"payments": Payments,
"payouts": Payouts,
Expand All @@ -130,6 +143,9 @@ class CreateParamsComponents(TypedDict):
"""
Configuration for the account onboarding embedded component.
"""
documents: NotRequired[
"AccountSession.CreateParamsComponentsDocuments"
]
payment_details: NotRequired[
"AccountSession.CreateParamsComponentsPaymentDetails"
]
Expand Down Expand Up @@ -160,6 +176,21 @@ class CreateParamsComponentsAccountOnboarding(TypedDict):
class CreateParamsComponentsAccountOnboardingFeatures(TypedDict):
pass

class CreateParamsComponentsDocuments(TypedDict):
enabled: bool
"""
Whether the embedded component is enabled.
"""
features: NotRequired[
"AccountSession.CreateParamsComponentsDocumentsFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsDocumentsFeatures(TypedDict):
pass

class CreateParamsComponentsPaymentDetails(TypedDict):
enabled: bool
"""
Expand Down
18 changes: 18 additions & 0 deletions stripe/_account_session_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class CreateParamsComponents(TypedDict):
"""
Configuration for the account onboarding embedded component.
"""
documents: NotRequired[
"AccountSessionService.CreateParamsComponentsDocuments"
]
payment_details: NotRequired[
"AccountSessionService.CreateParamsComponentsPaymentDetails"
]
Expand Down Expand Up @@ -63,6 +66,21 @@ class CreateParamsComponentsAccountOnboarding(TypedDict):
class CreateParamsComponentsAccountOnboardingFeatures(TypedDict):
pass

class CreateParamsComponentsDocuments(TypedDict):
enabled: bool
"""
Whether the embedded component is enabled.
"""
features: NotRequired[
"AccountSessionService.CreateParamsComponentsDocumentsFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsDocumentsFeatures(TypedDict):
pass

class CreateParamsComponentsPaymentDetails(TypedDict):
enabled: bool
"""
Expand Down
22 changes: 22 additions & 0 deletions stripe/_credit_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ class ListLinesParams(RequestOptions):
"""

class ListParams(RequestOptions):
created: NotRequired["CreditNote.ListParamsCreated|int"]
"""
Only return credit notes that were created during the given date interval.
"""
customer: NotRequired["str"]
"""
Only return credit notes for the customer specified by this customer ID.
Expand All @@ -314,6 +318,24 @@ class ListParams(RequestOptions):
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
"""

class ListParamsCreated(TypedDict):
gt: NotRequired["int"]
"""
Minimum value to filter by (exclusive)
"""
gte: NotRequired["int"]
"""
Minimum value to filter by (inclusive)
"""
lt: NotRequired["int"]
"""
Maximum value to filter by (exclusive)
"""
lte: NotRequired["int"]
"""
Maximum value to filter by (inclusive)
"""

class ModifyParams(RequestOptions):
expand: NotRequired["List[str]"]
"""
Expand Down
22 changes: 22 additions & 0 deletions stripe/_credit_note_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ class CreateParamsShippingCost(TypedDict):
"""

class ListParams(TypedDict):
created: NotRequired["CreditNoteService.ListParamsCreated|int"]
"""
Only return credit notes that were created during the given date interval.
"""
customer: NotRequired["str"]
"""
Only return credit notes for the customer specified by this customer ID.
Expand All @@ -163,6 +167,24 @@ class ListParams(TypedDict):
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
"""

class ListParamsCreated(TypedDict):
gt: NotRequired["int"]
"""
Minimum value to filter by (exclusive)
"""
gte: NotRequired["int"]
"""
Minimum value to filter by (inclusive)
"""
lt: NotRequired["int"]
"""
Maximum value to filter by (exclusive)
"""
lte: NotRequired["int"]
"""
Maximum value to filter by (inclusive)
"""

class PreviewParams(TypedDict):
amount: NotRequired["int"]
"""
Expand Down
29 changes: 28 additions & 1 deletion stripe/_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,9 @@ class EuBankTransfer(StripeObject):
class Konbini(StripeObject):
pass

class SepaDebit(StripeObject):
pass

class UsBankAccount(StripeObject):
class FinancialConnections(StripeObject):
permissions: Optional[
Expand Down Expand Up @@ -675,6 +678,10 @@ class FinancialConnections(StripeObject):
"""
If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
"""
sepa_debit: Optional[SepaDebit]
"""
If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
"""
us_bank_account: Optional[UsBankAccount]
"""
If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
Expand All @@ -685,6 +692,7 @@ class FinancialConnections(StripeObject):
"card": Card,
"customer_balance": CustomerBalance,
"konbini": Konbini,
"sepa_debit": SepaDebit,
"us_bank_account": UsBankAccount,
}

Expand Down Expand Up @@ -884,7 +892,8 @@ class StatusTransitions(StripeObject):
class SubscriptionDetails(StripeObject):
metadata: Optional[Dict[str, str]]
"""
Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will reflect the metadata of the subscription at the time of invoice creation. *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization.
*Note: This attribute is populated only for invoices created on or after June 29, 2023.*
"""

class ThresholdReason(StripeObject):
Expand Down Expand Up @@ -1217,6 +1226,12 @@ class CreateParamsPaymentSettingsPaymentMethodOptions(TypedDict):
"""
If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
"""
sepa_debit: NotRequired[
"Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit"
]
"""
If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
"""
us_bank_account: NotRequired[
"Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount"
]
Expand Down Expand Up @@ -1339,6 +1354,9 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer
class CreateParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict):
pass

class CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict):
pass

class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount(
TypedDict,
):
Expand Down Expand Up @@ -1884,6 +1902,12 @@ class ModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict):
"""
If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
"""
sepa_debit: NotRequired[
"Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit"
]
"""
If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
"""
us_bank_account: NotRequired[
"Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount"
]
Expand Down Expand Up @@ -2006,6 +2030,9 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer
class ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict):
pass

class ModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict):
pass

class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount(
TypedDict,
):
Expand Down
18 changes: 18 additions & 0 deletions stripe/_invoice_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ class CreateParamsPaymentSettingsPaymentMethodOptions(TypedDict):
"""
If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
"""
sepa_debit: NotRequired[
"Literal['']|InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit"
]
"""
If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
"""
us_bank_account: NotRequired[
"Literal['']|InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount"
]
Expand Down Expand Up @@ -395,6 +401,9 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer
class CreateParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict):
pass

class CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict):
pass

class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount(
TypedDict,
):
Expand Down Expand Up @@ -1552,6 +1561,12 @@ class UpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict):
"""
If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
"""
sepa_debit: NotRequired[
"Literal['']|InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit"
]
"""
If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
"""
us_bank_account: NotRequired[
"Literal['']|InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount"
]
Expand Down Expand Up @@ -1674,6 +1689,9 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer
class UpdateParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict):
pass

class UpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict):
pass

class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount(
TypedDict,
):
Expand Down
2 changes: 1 addition & 1 deletion stripe/_payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3777,7 +3777,7 @@ class CreateParams(RequestOptions):
"""
confirm: NotRequired["bool"]
"""
Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm).
Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm).
"""
confirmation_method: NotRequired["Literal['automatic', 'manual']"]
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_payment_intent_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,7 @@ class CreateParams(TypedDict):
"""
confirm: NotRequired["bool"]
"""
Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm).
Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm).
"""
confirmation_method: NotRequired["Literal['automatic', 'manual']"]
"""
Expand Down
3 changes: 3 additions & 0 deletions stripe/_payout.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ class CreateParams(RequestOptions):

class ListParams(RequestOptions):
arrival_date: NotRequired["Payout.ListParamsArrivalDate|int"]
"""
Only return payouts that are expected to arrive during the given date interval.
"""
created: NotRequired["Payout.ListParamsCreated|int"]
"""
Only return payouts that were created during the given date interval.
Expand Down
3 changes: 3 additions & 0 deletions stripe/_payout_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ class CreateParams(TypedDict):

class ListParams(TypedDict):
arrival_date: NotRequired["PayoutService.ListParamsArrivalDate|int"]
"""
Only return payouts that are expected to arrive during the given date interval.
"""
created: NotRequired["PayoutService.ListParamsCreated|int"]
"""
Only return payouts that were created during the given date interval.
Expand Down
10 changes: 10 additions & 0 deletions stripe/checkout/_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,10 @@ class Installments(StripeObject):
"""

installments: Optional[Installments]
request_three_d_secure: Literal["any", "automatic", "challenge"]
"""
We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
"""
setup_future_usage: Optional[
Literal["none", "off_session", "on_session"]
]
Expand Down Expand Up @@ -2513,6 +2517,12 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict):
"""
Installment options for card payments
"""
request_three_d_secure: NotRequired[
"Literal['any', 'automatic', 'challenge']"
]
"""
We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
"""
setup_future_usage: NotRequired["Literal['off_session', 'on_session']"]
"""
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Expand Down
6 changes: 6 additions & 0 deletions stripe/checkout/_session_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,12 @@ class CreateParamsPaymentMethodOptionsCard(TypedDict):
"""
Installment options for card payments
"""
request_three_d_secure: NotRequired[
"Literal['any', 'automatic', 'challenge']"
]
"""
We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
"""
setup_future_usage: NotRequired["Literal['off_session', 'on_session']"]
"""
Indicates that you intend to make future payments with this PaymentIntent's payment method.
Expand Down
2 changes: 1 addition & 1 deletion stripe/test_helpers/treasury/_received_credit_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CreateParams(TypedDict):
"""
network: Literal["ach", "us_domestic_wire"]
"""
The rails used for the object.
Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
"""

class CreateParamsInitiatingPaymentMethodDetails(TypedDict):
Expand Down
2 changes: 1 addition & 1 deletion stripe/test_helpers/treasury/_received_debit_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CreateParams(TypedDict):
"""
network: Literal["ach"]
"""
The rails used for the object.
Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
"""

class CreateParamsInitiatingPaymentMethodDetails(TypedDict):
Expand Down
Loading
Loading