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 #1161

Merged
merged 10 commits into from
Dec 14, 2023
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v704
v715
3 changes: 0 additions & 3 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ class CreateParamsComponentsPayouts(TypedDict):
features: NotRequired[
"AccountSession.CreateParamsComponentsPayoutsFeatures"
]
"""
The list of features enabled in the embedded component.
"""

class CreateParamsComponentsPayoutsFeatures(TypedDict):
pass
Expand Down
8 changes: 4 additions & 4 deletions stripe/_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2224,7 +2224,7 @@ class UpcomingParams(RequestOptions):
"""
subscription_cancel_at: NotRequired["Literal['']|int"]
"""
Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`.
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.
"""
subscription_cancel_at_period_end: NotRequired["bool"]
"""
Expand Down Expand Up @@ -2260,7 +2260,7 @@ class UpcomingParams(RequestOptions):
"""
subscription_start_date: NotRequired["int"]
"""
Date a subscription is intended to start (can be future or past)
Date a subscription is intended to start (can be future or past).
"""
subscription_trial_end: NotRequired["Literal['now']|int"]
"""
Expand Down Expand Up @@ -2737,7 +2737,7 @@ class UpcomingLinesParams(RequestOptions):
"""
subscription_cancel_at: NotRequired["Literal['']|int"]
"""
Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`.
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.
"""
subscription_cancel_at_period_end: NotRequired["bool"]
"""
Expand Down Expand Up @@ -2773,7 +2773,7 @@ class UpcomingLinesParams(RequestOptions):
"""
subscription_start_date: NotRequired["int"]
"""
Date a subscription is intended to start (can be future or past)
Date a subscription is intended to start (can be future or past).
"""
subscription_trial_end: NotRequired["Literal['now']|int"]
"""
Expand Down
6 changes: 6 additions & 0 deletions stripe/_payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3679,6 +3679,9 @@ class CreateParams(RequestOptions):
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).
"""
confirmation_method: NotRequired["Literal['automatic', 'manual']"]
"""
Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.
"""
currency: str
"""
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
Expand Down Expand Up @@ -7496,6 +7499,9 @@ class SearchParams(RequestOptions):
Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled.
"""
confirmation_method: Literal["automatic", "manual"]
"""
Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.
"""
created: int
"""
Time at which the object was created. Measured in seconds since the Unix epoch.
Expand Down
63 changes: 63 additions & 0 deletions stripe/_payment_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ class AutomaticTax(StripeObject):
"""

class ConsentCollection(StripeObject):
class PaymentMethodReuseAgreement(StripeObject):
position: Literal["auto", "hidden"]
"""
Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.

When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
"""

payment_method_reuse_agreement: Optional[PaymentMethodReuseAgreement]
"""
Settings related to the payment method reuse text shown in the Checkout UI.
"""
promotions: Optional[Literal["auto", "none"]]
"""
If set to `auto`, enables the collection of customer consent for promotional communications.
Expand All @@ -81,6 +93,9 @@ class ConsentCollection(StripeObject):
"""
If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service.
"""
_inner_class_types = {
"payment_method_reuse_agreement": PaymentMethodReuseAgreement,
}

class CustomField(StripeObject):
class Dropdown(StripeObject):
Expand Down Expand Up @@ -154,6 +169,12 @@ class Text(StripeObject):
}

class CustomText(StripeObject):
class AfterSubmit(StripeObject):
message: str
"""
Text may be up to 1200 characters in length.
"""

class ShippingAddress(StripeObject):
message: str
"""
Expand All @@ -172,6 +193,10 @@ class TermsOfServiceAcceptance(StripeObject):
Text may be up to 1200 characters in length.
"""

after_submit: Optional[AfterSubmit]
"""
Custom text that should be displayed after the payment confirmation button.
"""
shipping_address: Optional[ShippingAddress]
"""
Custom text that should be displayed alongside shipping address collection.
Expand All @@ -185,6 +210,7 @@ class TermsOfServiceAcceptance(StripeObject):
Custom text that should be displayed in place of the default terms of service agreement text.
"""
_inner_class_types = {
"after_submit": AfterSubmit,
"shipping_address": ShippingAddress,
"submit": Submit,
"terms_of_service_acceptance": TermsOfServiceAcceptance,
Expand Down Expand Up @@ -1202,6 +1228,12 @@ class CreateParamsInvoiceCreationInvoiceDataCustomField(TypedDict):
"""

class CreateParamsCustomText(TypedDict):
after_submit: NotRequired[
"Literal['']|PaymentLink.CreateParamsCustomTextAfterSubmit"
]
"""
Custom text that should be displayed after the payment confirmation button.
"""
shipping_address: NotRequired[
"Literal['']|PaymentLink.CreateParamsCustomTextShippingAddress"
]
Expand Down Expand Up @@ -1239,6 +1271,12 @@ class CreateParamsCustomTextShippingAddress(TypedDict):
Text may be up to 1200 characters in length.
"""

class CreateParamsCustomTextAfterSubmit(TypedDict):
message: str
"""
Text may be up to 1200 characters in length.
"""

class CreateParamsCustomField(TypedDict):
dropdown: NotRequired["PaymentLink.CreateParamsCustomFieldDropdown"]
"""
Expand Down Expand Up @@ -1316,6 +1354,12 @@ class CreateParamsCustomFieldDropdownOption(TypedDict):
"""

class CreateParamsConsentCollection(TypedDict):
payment_method_reuse_agreement: NotRequired[
"PaymentLink.CreateParamsConsentCollectionPaymentMethodReuseAgreement"
]
"""
Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method.
"""
promotions: NotRequired["Literal['auto', 'none']"]
"""
If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
Expand All @@ -1328,6 +1372,13 @@ class CreateParamsConsentCollection(TypedDict):
There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
"""

class CreateParamsConsentCollectionPaymentMethodReuseAgreement(TypedDict):
position: Literal["auto", "hidden"]
"""
Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
"""

class CreateParamsAutomaticTax(TypedDict):
enabled: bool
"""
Expand Down Expand Up @@ -1900,6 +1951,12 @@ class ModifyParamsInvoiceCreationInvoiceDataCustomField(TypedDict):
"""

class ModifyParamsCustomText(TypedDict):
after_submit: NotRequired[
"Literal['']|PaymentLink.ModifyParamsCustomTextAfterSubmit"
]
"""
Custom text that should be displayed after the payment confirmation button.
"""
shipping_address: NotRequired[
"Literal['']|PaymentLink.ModifyParamsCustomTextShippingAddress"
]
Expand Down Expand Up @@ -1937,6 +1994,12 @@ class ModifyParamsCustomTextShippingAddress(TypedDict):
Text may be up to 1200 characters in length.
"""

class ModifyParamsCustomTextAfterSubmit(TypedDict):
message: str
"""
Text may be up to 1200 characters in length.
"""

class ModifyParamsCustomField(TypedDict):
dropdown: NotRequired["PaymentLink.ModifyParamsCustomFieldDropdown"]
"""
Expand Down
Loading