Skip to content

Commit

Permalink
Update generated code for v1314
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Oct 18, 2024
1 parent 8762690 commit a02b803
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1313
v1314
67 changes: 66 additions & 1 deletion stripe/billing_portal/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
]
Expand All @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -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
"""
Expand Down Expand Up @@ -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]
Expand All @@ -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
"""
Expand Down
46 changes: 46 additions & 0 deletions stripe/billing_portal/_configuration_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
"""
Expand Down Expand Up @@ -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]
Expand All @@ -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
"""
Expand Down

0 comments on commit a02b803

Please sign in to comment.