chargebee 2.42.0 → 2.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,498 +1,173 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface QuotedSubscription {
4
5
 
5
- /**
6
- * @description A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
7
6
 
8
- */
9
-
10
7
  id:string;
11
-
12
- /**
13
- * @description Applicable only when &#x60;operation_type&#x60; of the quote is &#x60;create_subscription_for_customer&#x60;. For subscriptions in the &#x60;future&#x60; &#x60;status&#x60;, this is the date/time when the subscription is set to start. The quote can be converted on a date/time after this date. This is called backdating the subscription creation. Backdating is performed when the subscription has already been provisioned but the conversion action has been delayed. Backdating is allowed only when the following prerequisites are met:
14
8
 
15
- * Backdating is enabled for subscription creation operations.
16
- * The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed.
17
- * The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the subscription&#x27;s plan is 2 months and today is 14th April, the &#x60;start_date&#x60; cannot be earlier than 14th February.
9
+ plan_id:string;
10
+
11
+ plan_quantity:number;
12
+
13
+ plan_unit_price?:number;
14
+
15
+ setup_fee?:number;
16
+
17
+ billing_period?:number;
18
+
19
+ billing_period_unit?:'day' | 'week' | 'month' | 'year';
18
20
 
19
- */
20
-
21
21
  start_date?:number;
22
-
23
- /**
24
- * @description End of the trial period for the subscription. Presence of this value for &#x27;future&#x27; subscription implies the subscription will go into &#x27;in_trial&#x27; state when it starts.
25
22
 
26
- */
27
-
28
23
  trial_end?:number;
29
-
30
- /**
31
- * @description * When the subscription is not on a contract term: this value is the number of billing cycles remaining after the current cycle, at the end of which, the subscription cancels.
32
- * When the subscription is on a [contract term](contract_terms): this value is the number of billing cycles remaining in the contract term after the current billing cycle.
33
24
 
34
- */
35
-
36
25
  remaining_billing_cycles?:number;
37
-
38
- /**
39
- * @description Purchase order number for this subscription.
40
26
 
41
- */
42
-
43
27
  po_number?:string;
44
-
45
- /**
46
- * @description The decimal representation of the quantity of the plan purchased. Returned for quantity-based plans when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
47
28
 
48
- */
49
-
29
+ auto_collection?:AutoCollection;
30
+
50
31
  plan_quantity_in_decimal?:string;
51
-
52
- /**
53
- * @description The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
54
32
 
55
- */
56
-
57
33
  plan_unit_price_in_decimal?:string;
58
-
59
- /**
60
- * @description Applicable only when &#x60;operation_type&#x60; of the quote is &#x60;change_subscription&#x60;. When &#x60;change_option&#x60; is set to &#x60;specific_date&#x60;, then this is the date/time at which the subscription change is scheduled to occur. The quote can be converted on a date/time after this date. This is called backdating the subscription change and performed when the subscription change has already been provisioned but the conversion action has been delayed. Backdating is allowed only when the following prerequisites are met:
61
-
62
- * Backdating must be enabled for subscription change operations.
63
- * Only the following changes can be backdated:
64
- * Changes in the recurring items or their prices.
65
- * Addition of non-recurring items.
66
- * Subscription &#x60;status&#x60; is &#x60;active&#x60;, &#x60;cancelled&#x60;, or &#x60;non_renewing&#x60;.
67
- * The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.
68
- * The date is on or after &#x60;current_term_start&#x60;.
69
- * The date is on or after the last date/time any of the following changes were made:
70
- * Changes in the recurring items or their prices.
71
- * Addition of non-recurring items.
72
- * The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the subscription&#x27;s plan is 2 months and today is 14th April, &#x60;changes_scheduled_at&#x60; cannot be earlier than 14th February.
73
34
 
74
- */
75
-
76
35
  changes_scheduled_at?:number;
77
-
78
- /**
79
- * @description Applicable only when &#x60;operation_type&#x60; of the quote is &#x60;change_subscription&#x60;. When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out. \* end_of_term - The change is scheduled to be carried out at the end of the billing cycle of the subscription. \* specific_date - The change is carried out as of &#x60;changes_scheduled_at&#x60;. \* immediately - The change is carried out immediately upon quote conversion.
80
36
 
81
- */
82
-
83
- change_option?:'end_of_term' | 'immediately' | 'specific_date';
84
-
85
- /**
86
- * @description Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as &#x60;billing_cycles&#x60; or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms).
37
+ change_option?:'end_of_term' | 'specific_date' | 'immediately';
87
38
 
88
- */
89
-
90
39
  contract_term_billing_cycle_on_renewal?:number;
91
-
92
- /**
93
- * @description List of coupons for this subscription
94
40
 
95
- */
96
-
97
- coupons?:QuotedSubscription.Coupon[];
98
-
99
- /**
100
- * @description List of discounts for this quoted subscription.
41
+ addons?:QuotedSubscription.Addon[];
101
42
 
102
- */
103
-
104
- discounts?:QuotedSubscription.Discount[];
105
-
106
- /**
107
- * @description Details of individual [item prices](/docs/api/item_prices?prod_cat_ver&#x3D;2) that are part of this subscription
43
+ event_based_addons?:QuotedSubscription.EventBasedAddon[];
44
+
45
+ coupons?:QuotedSubscription.Coupon[];
108
46
 
109
- */
110
-
111
47
  subscription_items?:QuotedSubscription.SubscriptionItem[];
112
-
113
- /**
114
- * @description List of item tier.
115
48
 
116
- */
117
-
118
49
  item_tiers?:QuotedSubscription.ItemTier[];
119
-
120
- /**
121
- * @description The details of the contract term to be created when this quote is invoiced.
122
50
 
123
- */
124
-
125
51
  quoted_contract_term?:QuotedSubscription.QuotedContractTerm;
52
+
126
53
  }
127
54
  export namespace QuotedSubscription {
128
55
 
129
56
 
130
- export interface Coupon {
131
- /**
132
- * @description Used to uniquely identify the coupon
133
-
134
- */
135
-
136
- coupon_id:string;
137
- }
138
- export interface Discount {
139
- /**
140
- * @description An immutable unique id for the discount. It is always auto-generated.
141
-
142
- */
143
-
57
+ export interface Addon {
144
58
  id:string;
145
59
 
146
- /**
147
- * @description The name of the discount as it should appear on customer-facing pages and documents such as [invoices](/docs/api/invoices?prod_cat_ver&#x3D;2) and [hosted pages](/docs/api/hosted_pages?prod_cat_ver&#x3D;2). This is auto-generated based on the &#x60;type&#x60;, &#x60;amount&#x60;, and &#x60;currency_code&#x60; of the discount. For example, it can be &#x60;10% off&#x60; or &#x60;10$ off&#x60;.
148
-
149
- */
150
-
151
- invoice_name?:string;
152
-
153
- /**
154
- * @description The type of discount. Possible value are: \* fixed_amount - The specified amount will be given as discount. \* percentage - The specified percentage will be given as discount.
155
-
156
- */
157
-
158
- type:'fixed_amount' | 'percentage';
159
-
160
- /**
161
- * @description The percentage of the original amount that should be deducted from it. Only applicable when &#x60;discount.type&#x60; is percentage.
162
-
163
- */
164
-
165
- percentage?:number;
60
+ quantity?:number;
166
61
 
167
- /**
168
- * @description The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver&#x3D;2#currencies) depends on the kind of currency. This is only applicable when &#x60;discount.type&#x60; is &#x60;fixed_amount&#x60;.
169
-
170
- */
62
+ unit_price?:number;
171
63
 
172
64
  amount?:number;
173
65
 
174
- /**
175
- * @description The currency code ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)) of the discount. This is only applicable when &#x60;discount.type&#x60; is &#x60;fixed_amount&#x60;.
176
-
177
- */
178
-
179
- currency_code?:string;
180
-
181
- /**
182
- * @description Specifies the time duration for which this discount is attached to the subscription. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver&#x3D;2#update_subscription_for_items_discounts_operation_type). \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once** . It is removed after that from the subscription. \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by &#x60;period&#x60; and &#x60;period_unit&#x60;.
183
-
184
- */
185
-
186
- duration_type:'limited_period' | 'one_time' | 'forever';
187
-
188
- /**
189
- * @description The duration of time for which the discount is attached to the subscription, in &#x60;period_units&#x60;. Applicable only when &#x60;duration_type&#x60; is &#x60;limited_period&#x60;.
190
-
191
- */
192
-
193
- period?:number;
194
-
195
- /**
196
- * @description The unit of time for &#x60;period&#x60;. Applicable only when &#x60;duration_type&#x60; is &#x60;limited_period&#x60;. \* day - A period of 24 hours. \* year - A period of 1 calendar year. \* week - A period of 7 days. \* month - A period of 1 calendar month.
197
-
198
- */
199
-
200
- period_unit?:'week' | 'month' | 'year' | 'day';
201
-
202
- /**
203
- * @description The discount is included in MRR calculations for your site. This attribute is only applicable when &#x60;duration_type&#x60; is &#x60;one_time&#x60; and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned &#x60;false&#x60;.
204
-
205
- */
206
-
207
- included_in_mrr:boolean;
66
+ trial_end?:number;
208
67
 
209
- /**
210
- * @description The amount on the invoice to which the discount is applied. \* invoice_amount - The discount is applied to the invoice &#x60;sub_total&#x60;. \* specific_item_price - The discount is applied to the &#x60;invoice.line_item.amount&#x60; that corresponds to the item price specified by &#x60;item_price_id&#x60;.
211
-
212
- */
68
+ remaining_billing_cycles?:number;
213
69
 
214
- apply_on:'specific_item_price' | 'invoice_amount';
70
+ quantity_in_decimal?:string;
215
71
 
216
- /**
217
- * @description The [id of the item price](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when &#x60;apply_on&#x60; &#x3D; &#x60;specific_item_price&#x60;.
218
-
219
- */
72
+ unit_price_in_decimal?:string;
220
73
 
221
- item_price_id?:string;
74
+ amount_in_decimal?:string;
222
75
 
223
- /**
224
- * @description Timestamp indicating when this discount is created.
225
-
226
- */
76
+ proration_type?:'full_term' | 'partial_term' | 'none';
77
+ }
78
+ export interface EventBasedAddon {
79
+ id:string;
227
80
 
228
- created_at:number;
81
+ quantity:number;
229
82
 
230
- /**
231
- * @description Specifies till when the limited period discount is applicable. This attribute will be sent in the response only for &#x60;limited_period&#x60; duration type discount.
232
-
233
- */
83
+ unit_price:number;
234
84
 
235
- apply_till?:number;
85
+ service_period_in_days?:number;
236
86
 
237
- /**
238
- * @description Specifies the number of times the discount has been applied.
239
-
240
- */
87
+ on_event:'subscription_creation' | 'subscription_trial_start' | 'plan_activation' | 'subscription_activation' | 'contract_termination';
241
88
 
242
- applied_count?:number;
89
+ charge_once:boolean;
243
90
 
244
- /**
245
- * @description Used to uniquely identify the coupon in your website/application and to integrate with Chargebee.
246
- **Note:**
247
-
248
-
249
- When the coupon ID contains a special character; for example: &#x60;#&#x60;, the API returns an error.
250
- Make sure that you [encode](https://www.urlencoder.org/) the coupon ID in the path parameter before making an API call.
251
-
252
- */
91
+ quantity_in_decimal?:string;
253
92
 
93
+ unit_price_in_decimal?:string;
94
+ }
95
+ export interface Coupon {
254
96
  coupon_id:string;
255
-
256
- /**
257
- * @description The index number of the subscription to which the item price is added. Provide a unique number between &#x60;0&#x60; and &#x60;4&#x60; (inclusive) for each subscription that is to be created.
258
-
259
- */
260
-
261
- index:number;
262
97
  }
263
98
  export interface SubscriptionItem {
264
- /**
265
- * @description The unique identifier of the item price.
266
-
267
- */
268
-
269
99
  item_price_id:string;
270
100
 
271
- /**
272
- * @description The type of item. There must be one and only one item of type &#x60;plan&#x60; in this list. \* plan - Plan \* addon - Addon \* charge - Charge
273
-
274
- */
275
-
276
- item_type:'charge' | 'addon' | 'plan';
277
-
278
- /**
279
- * @description The quantity of the item purchased
280
-
281
- */
101
+ item_type:'plan' | 'addon' | 'charge';
282
102
 
283
103
  quantity?:number;
284
104
 
285
- /**
286
- * @description The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
287
-
288
- */
289
-
290
105
  quantity_in_decimal?:string;
291
106
 
292
- /**
293
- * @description The price/per unit price of the item. When not provided, [the value set](/docs/api/item_prices?prod_cat_ver&#x3D;2#item_price_attributes) for the item price is used. This is only applicable when the &#x60;pricing_model&#x60; of the item price is &#x60;flat_fee&#x60; or &#x60;per_unit&#x60;. Also, it is only allowed when [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site. The value depends on the type of currency. If &#x60;changes_scheduled_at&#x60; is in the past and a &#x60;unit_price&#x60; is not passed, then the item price&#x27;s current unit price is considered even if the item price did not exist on the date as of when the change is scheduled.
294
-
295
- */
107
+ metered_quantity?:string;
296
108
 
297
- unit_price?:number;
109
+ last_calculated_at?:number;
298
110
 
299
- /**
300
- * @description The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
301
-
302
- */
111
+ unit_price?:number;
303
112
 
304
113
  unit_price_in_decimal?:string;
305
114
 
306
- /**
307
- * @description The total amount for the item as determined from &#x60;unit_price&#x60;, &#x60;free_quantity&#x60;, &#x60;quantity&#x60; and &#x60;item_tiers&#x60; as applicable. The value depends on the [type of currency](./#handling_currency_units).
308
-
309
- */
310
-
311
115
  amount?:number;
312
116
 
313
- /**
314
- * @description The decimal representation of the total amount for the item, in major units of the currency. Always returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
315
-
316
- */
317
-
318
117
  amount_in_decimal?:string;
319
118
 
320
- /**
321
- * @description The &#x60;free_quantity&#x60; of the plan-item as [specified](./item_prices?prod_cat_ver&#x3D;2) for the item price.
322
-
323
- */
119
+ billing_period?:number;
324
120
 
325
- free_quantity?:number;
121
+ billing_period_unit?:'day' | 'week' | 'month' | 'year';
326
122
 
327
- /**
328
- * @description The &#x60;free_quantity_in_decimal&#x60; as set for the item price. Returned for quantity-based item prices when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
329
-
330
- */
123
+ free_quantity?:number;
331
124
 
332
125
  free_quantity_in_decimal?:string;
333
126
 
334
- /**
335
- * @description The date/time when the trial period of the item ends. Applies to plan-items and----when [enabled](https://www.chargebee.com/docs/2.0/addons-trial.html)----addon-items as well.
336
-
337
- */
338
-
339
127
  trial_end?:number;
340
128
 
341
- /**
342
- * @description For the plan-item price:
343
- the value determines the number of billing cycles the subscription runs before canceling automatically. If not provided, then [the value set](./item_prices?prod_cat_ver&#x3D;2#item_price_attributes) for the plan-item price is used.
344
-
345
- For addon-item prices:
346
- If [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html) are enabled then this is the number of subscription billing cycles for which the addon is included. If not provided, then [the value set under attached addons](./attached_items?prod_cat_ver&#x3D;2#attached_item_attributes) is used. Further, if that value is not provided, then [the value set for the addon-item price](./item_prices?prod_cat_ver&#x3D;2#item_price_attributes) is used.
347
-
348
- */
349
-
350
129
  billing_cycles?:number;
351
130
 
352
- /**
353
- * @description The service period of the item in days from the day of charge.
354
-
355
- */
356
-
357
131
  service_period_days?:number;
358
132
 
359
- /**
360
- * @description When &#x60;charge_on_option&#x60; option is set to &#x60;on_event&#x60;, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items. \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an &#x60;active&#x60; or &#x60;non-renewing&#x60; state. Also includes reactivations of canceled subscriptions. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver&#x3D;2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_trial_start - the time when the trial period of the subscription begins. \* subscription_creation - the time of creation of the subscription.
361
-
362
- */
363
-
364
- charge_on_event?:'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation';
365
-
366
- /**
367
- * @description Indicates if the charge-item is to be charged only once or each time the &#x60;charge_on_event&#x60; occurs. This parameter only applies to charge-items.
368
-
369
- */
133
+ charge_on_event?:'subscription_creation' | 'subscription_trial_start' | 'plan_activation' | 'subscription_activation' | 'contract_termination';
370
134
 
371
135
  charge_once?:boolean;
372
136
 
373
- /**
374
- * @description Indicates when the charge-item is to be charged. This parameter only applies to charge-items. \* on_event - The item is charged at the occurrence of the event specified as &#x60;charge_on_event&#x60;. \* immediately - The item is charged immediately on being added to the subscription.
375
-
376
- */
377
-
378
- charge_on_option?:'on_event' | 'immediately';
137
+ charge_on_option?:'immediately' | 'on_event';
379
138
 
380
- /**
381
- * @description null
382
-
383
- */
384
-
385
- proration_type?:'partial_term' | 'full_term' | 'none';
386
-
387
- billing_period?:number;
139
+ proration_type?:'full_term' | 'partial_term' | 'none';
388
140
 
389
- billing_period_unit?:'day' | 'week' | 'month' | 'year';
141
+ usage_accumulation_reset_frequency?:'never' | 'subscription_billing_frequency';
390
142
  }
391
143
  export interface ItemTier {
392
- /**
393
- * @description The id of the item price to which this tier belongs.
394
-
395
- */
396
-
397
144
  item_price_id:string;
398
145
 
399
- /**
400
- * @description The lowest value in the quantity tier.
401
-
402
- */
403
-
404
146
  starting_unit:number;
405
147
 
406
- /**
407
- * @description The highest value in the quantity tier.
408
-
409
- */
410
-
411
148
  ending_unit?:number;
412
149
 
413
- /**
414
- * @description The per-unit price for the tier when the &#x60;pricing_model&#x60; is &#x60;tiered&#x60; or &#x60;volume&#x60;. The total cost for the item price when the &#x60;pricing_model&#x60; is &#x60;stairstep&#x60;. The value is in the minor unit of the currency.
415
-
416
- */
417
-
418
150
  price:number;
419
151
 
420
- /**
421
- * @description The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as &#x60;ending_unit_in_decimal&#x60; of the next lower tier. Returned only when the pricing_model is &#x60;tiered&#x60;, &#x60;volume&#x60; or &#x60;stairstep&#x60; and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
422
-
423
- */
424
-
425
152
  starting_unit_in_decimal?:string;
426
153
 
427
- /**
428
- * @description The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the &#x60;starting_unit_in_decimal&#x60; of the next higher tier. Returned only when the pricing_model is &#x60;tiered&#x60;, &#x60;volume&#x60; or &#x60;stairstep&#x60; and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
429
-
430
- */
431
-
432
154
  ending_unit_in_decimal?:string;
433
155
 
434
- /**
435
- * @description The decimal representation of the per-unit price for the tier when the &#x60;pricing_model&#x60; is &#x60;tiered&#x60; or &#x60;volume&#x60;. When the &#x60;pricing_model&#x60; is &#x60;stairstep&#x60;, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
436
-
437
- */
438
-
439
156
  price_in_decimal?:string;
440
157
 
441
- /**
442
- * @description The index number of the subscription to which the item price is added. Provide a unique number between &#x60;0&#x60; and &#x60;4&#x60; (inclusive) for each subscription that is to be created.
443
-
444
- */
445
-
446
158
  index:number;
447
159
  }
448
160
  export interface QuotedContractTerm {
449
- /**
450
- * @description The start date of the contract term
451
-
452
- */
453
-
454
161
  contract_start:number;
455
162
 
456
- /**
457
- * @description The end date of the contract term
458
-
459
- */
460
-
461
163
  contract_end:number;
462
164
 
463
- /**
464
- * @description The number of billing cycles of the subscription that the contract term is for.
465
-
466
- */
467
-
468
165
  billing_cycle:number;
469
166
 
470
- /**
471
- * @description Action to be taken when the contract term completes. \* renew -
472
- * Contract term completes and a new contract term is started for the number of billing cycles specified in [&#x60;contract_billing_cycle_on_renewal&#x60;](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal).
473
- * The &#x60;action_at_term_end&#x60; for the new contract term is set to &#x60;renew&#x60;.
474
- \* renew_once - Used when you want to renew the contract term just once. Does the following:
475
- * Contract term completes and a new contract term is started for the number of billing cycles specified in [&#x60;contract_billing_cycle_on_renewal&#x60;](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal).
476
- * The &#x60;action_at_term_end&#x60; for the new contract term is set to &#x60;cancel&#x60;.
477
- \* cancel - Contract term completes and subscription is canceled. \* evergreen - Contract term completes and the subscription renews.
478
-
479
-
480
- */
481
-
482
- action_at_term_end:'cancel' | 'renew_once' | 'renew' | 'evergreen';
483
-
484
- /**
485
- * @description The sum of the [totals](invoices#invoice_total) of all the invoices raised as part of the contract term. For &#x60;active&#x60; contract terms, this is a predicted value. The value depends on the [type of currency](./#handling_currency_units). If the subscription was [imported](#import_a_subscription) with the contract term, then this value includes the value passed for &#x60;total_amount_raised&#x60;.
486
-
487
- */
167
+ action_at_term_end:'renew' | 'evergreen' | 'cancel' | 'renew_once';
488
168
 
489
169
  total_contract_value:number;
490
170
 
491
- /**
492
- * @description The number of days before [&#x60;contract_end&#x60;](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure
493
-
494
- */
495
-
496
171
  cancellation_cutoff_period?:number;
497
172
  }
498
173
  }
@@ -1664,7 +1664,7 @@ Creates a new subscription for an existing customer in Chargebee. Any available
1664
1664
 
1665
1665
  */
1666
1666
 
1667
- subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
1667
+ subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string,usage_accumulation_reset_frequency?:UsageAccumulationResetFrequency}[];
1668
1668
 
1669
1669
  /**
1670
1670
  * @description Parameters for discounts
@@ -2738,7 +2738,7 @@ Updates the specified subscription by setting the parameters passed. Any paramet
2738
2738
 
2739
2739
  */
2740
2740
 
2741
- subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,proration_type?:ProrationType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
2741
+ subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,proration_type?:ProrationType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string,usage_accumulation_reset_frequency?:UsageAccumulationResetFrequency}[];
2742
2742
 
2743
2743
  /**
2744
2744
  * @description Parameters for discounts
@@ -3847,6 +3847,8 @@ If [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle
3847
3847
  billing_period?:number;
3848
3848
 
3849
3849
  billing_period_unit?:'day' | 'week' | 'month' | 'year';
3850
+
3851
+ usage_accumulation_reset_frequency?:'never' | 'subscription_billing_frequency';
3850
3852
  }
3851
3853
  export interface ItemTier {
3852
3854
  /**