1616from .shared .plan_phase_amount_discount_adjustment import PlanPhaseAmountDiscountAdjustment
1717from .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
2121Adjustment : TypeAlias = Annotated [
2222 Union [
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+
3346class 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-
8989class 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