@@ -35,7 +35,7 @@ enum SubscriptionEditTimingEnum {
3535@ friendlyName ("BillingSubscriptionEditTiming" )
3636union SubscriptionEditTiming {
3737 Enum : SubscriptionEditTimingEnum ,
38- Custom : DateTime ,
38+ Custom : Shared . DateTime ,
3939}
4040
4141/**
@@ -49,54 +49,64 @@ model SubscriptionCreate {
4949 >>;
5050
5151 /**
52- * The ID of the customer to create the subscription for.
53- *
54- * Either customer ID or customer key must be provided.
55- * If both are provided, the ID will be used.
52+ * The customer to create the subscription for.
5653 */
57- @ visibility (Lifecycle .Create )
58- @ summary ("Customer ID" )
59- customer_id ? : Shared .ULID ;
60-
61- /**
62- * The key of the customer to create the subscription for.
63- *
64- * Either customer ID or customer key must be provided.
65- * If both are provided, the ID will be used.
66- */
67- @ visibility (Lifecycle .Create )
68- @ summary ("Customer Key" )
69- customer_key ? : Shared .ExternalResourceKey ;
70-
71- /**
72- * The plan ID of the subscription.
73- * Set if subscription is created from a plan.
74- *
75- * ID or Key of the plan is required if creating a subscription from a plan.
76- * If both are provided, the ID will be used.
77- */
78- @ visibility (Lifecycle .Create )
79- @ summary ("Plan ID" )
80- plan_id ? : Shared .ULID ;
81-
82- /**
83- * The plan Key of the subscription, if any.
84- * Set if subscription is created from a plan.
85- *
86- * ID or Key of the plan is required if creating a subscription from a plan.
87- * If both are provided, the ID will be used.
88- */
89- @ visibility (Lifecycle .Create )
90- @ summary ("Plan Key" )
91- plan_key ? : Shared .ResourceKey ;
54+ customer : {
55+ /**
56+ * The ID of the customer to create the subscription for.
57+ *
58+ * Either customer ID or customer key must be provided.
59+ * If both are provided, the ID will be used.
60+ */
61+ @ visibility (Lifecycle .Create )
62+ @ summary ("Customer ID" )
63+ id ? : Shared .ULID ;
64+
65+ /**
66+ * The key of the customer to create the subscription for.
67+ *
68+ * Either customer ID or customer key must be provided.
69+ * If both are provided, the ID will be used.
70+ */
71+ @ visibility (Lifecycle .Create )
72+ @ summary ("Customer Key" )
73+ key ? : Shared .ExternalResourceKey ;
74+ };
9275
9376 /**
94- * The plan version of the subscription, if any.
95- * If not provided, the latest version of the plan will be used.
77+ * The plan reference of the subscription.
9678 */
97- @ visibility (Lifecycle .Create )
98- @ summary ("Plan Version" )
99- plan_version ? : integer ;
79+ plan : {
80+ /**
81+ * The plan ID of the subscription.
82+ * Set if subscription is created from a plan.
83+ *
84+ * ID or Key of the plan is required if creating a subscription from a plan.
85+ * If both are provided, the ID will be used.
86+ */
87+ @ visibility (Lifecycle .Create )
88+ @ summary ("Plan ID" )
89+ id ? : Shared .ULID ;
90+
91+ /**
92+ * The plan Key of the subscription, if any.
93+ * Set if subscription is created from a plan.
94+ *
95+ * ID or Key of the plan is required if creating a subscription from a plan.
96+ * If both are provided, the ID will be used.
97+ */
98+ @ visibility (Lifecycle .Create )
99+ @ summary ("Plan Key" )
100+ key ? : Shared .ResourceKey ;
101+
102+ /**
103+ * The plan version of the subscription, if any.
104+ * If not provided, the latest version of the plan will be used.
105+ */
106+ @ visibility (Lifecycle .Create )
107+ @ summary ("Plan Version" )
108+ version ? : integer ;
109+ };
100110
101111 /**
102112 * The billing anchor of the subscription.
0 commit comments