Skip to content

Commit

Permalink
Update generated code for v1105
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Jun 28, 2024
1 parent 61b6c61 commit 0e27dfe
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1104
v1105
42 changes: 21 additions & 21 deletions stripe/_customer_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

class CustomerSession(CreateableAPIResource["CustomerSession"]):
"""
A customer session allows you to grant client access to Stripe's frontend SDKs (like StripeJs)
control over a customer.
A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access
control over a Customer.
"""

OBJECT_NAME: ClassVar[Literal["customer_session"]] = "customer_session"
Expand All @@ -36,28 +36,28 @@ class PaymentElement(StripeObject):
class Features(StripeObject):
payment_method_remove: Literal["disabled", "enabled"]
"""
Controls whether the Payment Element displays the option to remove a saved payment method."
Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
"""
payment_method_save: Literal["disabled", "enabled"]
"""
Controls whether the Payment Element displays a checkbox offering to save a new payment method.
Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
"""
payment_method_update: Literal["disabled", "enabled"]
"""
Controls whether the Payment Element displays the option to update a saved payment method.
Controls whether the Payment Element displays the option to update a saved payment method. This parameter defaults to `disabled`.
"""

enabled: bool
"""
Whether the payment element is enabled.
Whether the Payment Element is enabled.
"""
features: Optional[Features]
"""
This hash defines whether the payment element supports certain features.
This hash defines whether the Payment Element supports certain features.
"""
_inner_class_types = {"features": Features}

Expand All @@ -73,7 +73,7 @@ class PricingTable(StripeObject):
"""
payment_element: Optional[PaymentElement]
"""
This hash contains whether the payment element is enabled and the features it supports.
This hash contains whether the Payment Element is enabled and the features it supports.
"""
pricing_table: PricingTable
"""
Expand All @@ -92,7 +92,7 @@ class CreateParams(RequestOptions):
"""
customer: str
"""
The ID of an existing customer for which to create the customer session.
The ID of an existing customer for which to create the Customer Session.
"""
expand: NotRequired[List[str]]
"""
Expand All @@ -110,7 +110,7 @@ class CreateParamsComponents(TypedDict):
"CustomerSession.CreateParamsComponentsPaymentElement"
]
"""
Configuration for the payment element.
Configuration for the Payment Element.
"""
pricing_table: NotRequired[
"CustomerSession.CreateParamsComponentsPricingTable"
Expand All @@ -128,31 +128,31 @@ class CreateParamsComponentsBuyButton(TypedDict):
class CreateParamsComponentsPaymentElement(TypedDict):
enabled: bool
"""
Whether the payment element is enabled.
Whether the Payment Element is enabled.
"""
features: NotRequired[
"CustomerSession.CreateParamsComponentsPaymentElementFeatures"
]
"""
This hash defines whether the payment element supports certain features.
This hash defines whether the Payment Element supports certain features.
"""

class CreateParamsComponentsPaymentElementFeatures(TypedDict):
payment_method_remove: NotRequired[Literal["disabled", "enabled"]]
"""
Controls whether the Payment Element displays the option to remove a saved payment method."
Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
"""
payment_method_save: NotRequired[Literal["disabled", "enabled"]]
"""
Controls whether the Payment Element displays a checkbox offering to save a new payment method.
Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
"""
payment_method_update: NotRequired[Literal["disabled", "enabled"]]
"""
Controls whether the Payment Element displays the option to update a saved payment method.
Controls whether the Payment Element displays the option to update a saved payment method. This parameter defaults to `disabled`.
"""

class CreateParamsComponentsPricingTable(TypedDict):
Expand All @@ -163,25 +163,25 @@ class CreateParamsComponentsPricingTable(TypedDict):

client_secret: str
"""
The client secret of this customer session. Used on the client to set up secure access to the given `customer`.
The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`.
The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.
"""
components: Optional[Components]
"""
Configuration for the components supported by this customer session.
Configuration for the components supported by this Customer Session.
"""
created: int
"""
Time at which the object was created. Measured in seconds since the Unix epoch.
"""
customer: ExpandableField["Customer"]
"""
The customer the customer session was created for.
The Customer the Customer Session was created for.
"""
expires_at: int
"""
The timestamp at which this customer session will expire.
The timestamp at which this Customer Session will expire.
"""
livemode: bool
"""
Expand All @@ -197,7 +197,7 @@ def create(
cls, **params: Unpack["CustomerSession.CreateParams"]
) -> "CustomerSession":
"""
Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
"""
return cast(
"CustomerSession",
Expand All @@ -213,7 +213,7 @@ async def create_async(
cls, **params: Unpack["CustomerSession.CreateParams"]
) -> "CustomerSession":
"""
Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
"""
return cast(
"CustomerSession",
Expand Down
18 changes: 9 additions & 9 deletions stripe/_customer_session_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CreateParams(TypedDict):
"""
customer: str
"""
The ID of an existing customer for which to create the customer session.
The ID of an existing customer for which to create the Customer Session.
"""
expand: NotRequired[List[str]]
"""
Expand All @@ -33,7 +33,7 @@ class CreateParamsComponents(TypedDict):
"CustomerSessionService.CreateParamsComponentsPaymentElement"
]
"""
Configuration for the payment element.
Configuration for the Payment Element.
"""
pricing_table: NotRequired[
"CustomerSessionService.CreateParamsComponentsPricingTable"
Expand All @@ -51,31 +51,31 @@ class CreateParamsComponentsBuyButton(TypedDict):
class CreateParamsComponentsPaymentElement(TypedDict):
enabled: bool
"""
Whether the payment element is enabled.
Whether the Payment Element is enabled.
"""
features: NotRequired[
"CustomerSessionService.CreateParamsComponentsPaymentElementFeatures"
]
"""
This hash defines whether the payment element supports certain features.
This hash defines whether the Payment Element supports certain features.
"""

class CreateParamsComponentsPaymentElementFeatures(TypedDict):
payment_method_remove: NotRequired[Literal["disabled", "enabled"]]
"""
Controls whether the Payment Element displays the option to remove a saved payment method."
Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
"""
payment_method_save: NotRequired[Literal["disabled", "enabled"]]
"""
Controls whether the Payment Element displays a checkbox offering to save a new payment method.
Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
"""
payment_method_update: NotRequired[Literal["disabled", "enabled"]]
"""
Controls whether the Payment Element displays the option to update a saved payment method.
Controls whether the Payment Element displays the option to update a saved payment method. This parameter defaults to `disabled`.
"""

class CreateParamsComponentsPricingTable(TypedDict):
Expand All @@ -90,7 +90,7 @@ def create(
options: RequestOptions = {},
) -> CustomerSession:
"""
Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
"""
return cast(
CustomerSession,
Expand All @@ -110,7 +110,7 @@ async def create_async(
options: RequestOptions = {},
) -> CustomerSession:
"""
Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
"""
return cast(
CustomerSession,
Expand Down

0 comments on commit 0e27dfe

Please sign in to comment.