Skip to content

Commit 9081c9b

Browse files
feat(api): api update
1 parent 5e5cc16 commit 9081c9b

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-947253d9be505473c1c2cb0193d2602fa6b017e221f482be3f4f374c6156b350.yml
3-
openapi_spec_hash: 1b40d1a85b4b846a1c14634fbbc65da3
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-4ad3b44ca7f484243d8706b6aa7f4498fc5bf2b37fadf3da0a06d657e482c08f.yml
3+
openapi_spec_hash: 9ead1a2aae36be1086c627c3636064ea
44
config_hash: e6db17547fe854b1c240407cf4c6dc9e

src/orb/types/plan.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from .shared.plan_phase_amount_discount_adjustment import PlanPhaseAmountDiscountAdjustment
1717
from .shared.plan_phase_percentage_discount_adjustment import PlanPhasePercentageDiscountAdjustment
1818

19-
__all__ = ["Plan", "Adjustment", "PlanPhase", "Product", "TrialConfig", "BasePlan"]
19+
__all__ = ["Plan", "Adjustment", "BasePlan", "PlanPhase", "Product", "TrialConfig"]
2020

2121
Adjustment: TypeAlias = Annotated[
2222
Union[
@@ -30,6 +30,19 @@
3030
]
3131

3232

33+
class BasePlan(BaseModel):
34+
id: Optional[str] = None
35+
36+
external_plan_id: Optional[str] = None
37+
"""
38+
An optional user-defined ID for this plan resource, used throughout the system
39+
as an alias for this Plan. Use this field to identify a plan by an existing
40+
identifier in your system.
41+
"""
42+
43+
name: Optional[str] = None
44+
45+
3346
class PlanPhase(BaseModel):
3447
id: str
3548

@@ -73,19 +86,6 @@ class TrialConfig(BaseModel):
7386
trial_period_unit: Literal["days"]
7487

7588

76-
class BasePlan(BaseModel):
77-
id: Optional[str] = None
78-
79-
external_plan_id: Optional[str] = None
80-
"""
81-
An optional user-defined ID for this plan resource, used throughout the system
82-
as an alias for this Plan. Use this field to identify a plan by an existing
83-
identifier in your system.
84-
"""
85-
86-
name: Optional[str] = None
87-
88-
8989
class Plan(BaseModel):
9090
id: str
9191

@@ -95,6 +95,14 @@ class Plan(BaseModel):
9595
If the plan has phases, this includes adjustments across all phases of the plan.
9696
"""
9797

98+
base_plan: Optional[BasePlan] = None
99+
100+
base_plan_id: Optional[str] = None
101+
"""
102+
The parent plan id if the given plan was created by overriding one or more of
103+
the parent's prices
104+
"""
105+
98106
created_at: datetime
99107

100108
currency: str
@@ -168,11 +176,3 @@ class Plan(BaseModel):
168176
trial_config: TrialConfig
169177

170178
version: int
171-
172-
base_plan: Optional[BasePlan] = None
173-
174-
base_plan_id: Optional[str] = None
175-
"""
176-
The parent plan id if the given plan was created by overriding one or more of
177-
the parent's prices
178-
"""

0 commit comments

Comments
 (0)