From a02b80355821712706f705dd3175baf657189ccd Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 17:04:19 +0000 Subject: [PATCH] Update generated code for v1314 --- OPENAPI_VERSION | 2 +- stripe/billing_portal/_configuration.py | 67 ++++++++++++++++++- .../billing_portal/_configuration_service.py | 46 +++++++++++++ 3 files changed, 113 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8bf3e5d6e..622f80766 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1313 \ No newline at end of file +v1314 \ No newline at end of file diff --git a/stripe/billing_portal/_configuration.py b/stripe/billing_portal/_configuration.py index e337a3d6b..f42349e68 100644 --- a/stripe/billing_portal/_configuration.py +++ b/stripe/billing_portal/_configuration.py @@ -125,6 +125,21 @@ class Product(StripeObject): The product ID. """ + class ScheduleAtPeriodEnd(StripeObject): + class Condition(StripeObject): + type: Literal[ + "decreasing_item_amount", "shortening_interval" + ] + """ + The type of condition. + """ + + conditions: List[Condition] + """ + List of conditions. When any condition is true, an update will be scheduled at the end of the current period. + """ + _inner_class_types = {"conditions": Condition} + default_allowed_updates: List[ Literal["price", "promotion_code", "quantity"] ] @@ -145,7 +160,11 @@ class Product(StripeObject): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation. """ - _inner_class_types = {"products": Product} + schedule_at_period_end: Optional[ScheduleAtPeriodEnd] + _inner_class_types = { + "products": Product, + "schedule_at_period_end": ScheduleAtPeriodEnd, + } customer_update: CustomerUpdate invoice_history: InvoiceHistory @@ -339,6 +358,12 @@ class CreateParamsFeaturesSubscriptionUpdate(TypedDict): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. """ + schedule_at_period_end: NotRequired[ + "Configuration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): prices: List[str] @@ -350,6 +375,24 @@ class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): The product id. """ + class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): + conditions: NotRequired[ + List[ + "Configuration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition" + ] + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, + ): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + class CreateParamsLoginPage(TypedDict): enabled: bool """ @@ -541,6 +584,12 @@ class ModifyParamsFeaturesSubscriptionUpdate(TypedDict): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. """ + schedule_at_period_end: NotRequired[ + "Configuration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ class ModifyParamsFeaturesSubscriptionUpdateProduct(TypedDict): prices: List[str] @@ -552,6 +601,22 @@ class ModifyParamsFeaturesSubscriptionUpdateProduct(TypedDict): The product id. """ + class ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): + conditions: NotRequired[ + "Literal['']|List[Configuration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition]" + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + class ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, + ): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + class ModifyParamsLoginPage(TypedDict): enabled: bool """ diff --git a/stripe/billing_portal/_configuration_service.py b/stripe/billing_portal/_configuration_service.py index 8d6ce86dc..ae3a1e47c 100644 --- a/stripe/billing_portal/_configuration_service.py +++ b/stripe/billing_portal/_configuration_service.py @@ -177,6 +177,12 @@ class CreateParamsFeaturesSubscriptionUpdate(TypedDict): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. """ + schedule_at_period_end: NotRequired[ + "ConfigurationService.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): prices: List[str] @@ -188,6 +194,24 @@ class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): The product id. """ + class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): + conditions: NotRequired[ + List[ + "ConfigurationService.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition" + ] + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, + ): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + class CreateParamsLoginPage(TypedDict): enabled: bool """ @@ -385,6 +409,12 @@ class UpdateParamsFeaturesSubscriptionUpdate(TypedDict): """ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. """ + schedule_at_period_end: NotRequired[ + "ConfigurationService.UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ class UpdateParamsFeaturesSubscriptionUpdateProduct(TypedDict): prices: List[str] @@ -396,6 +426,22 @@ class UpdateParamsFeaturesSubscriptionUpdateProduct(TypedDict): The product id. """ + class UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): + conditions: NotRequired[ + "Literal['']|List[ConfigurationService.UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition]" + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + class UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, + ): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + class UpdateParamsLoginPage(TypedDict): enabled: bool """