chargebee 2.48.0 → 2.49.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,393 +1,128 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
2
3
  declare module 'chargebee' {
3
4
  export interface QuoteLineGroup {
4
5
 
5
- /**
6
- * @description Version of the quote line group.
7
6
 
8
- */
9
-
10
7
  version?:number;
11
-
12
- /**
13
- * @description Uniquely identifies a quote line group.
14
8
 
15
- */
16
-
17
9
  id?:string;
18
-
19
- /**
20
- * @description Subtotal in cents.
21
10
 
22
- */
23
-
24
11
  sub_total:number;
25
-
26
- /**
27
- * @description Total in cents.
28
12
 
29
- */
30
-
31
13
  total?:number;
32
-
33
- /**
34
- * @description Credits (in cents) applied to this quote line group.
35
14
 
36
- */
37
-
38
15
  credits_applied?:number;
39
-
40
- /**
41
- * @description Existing outstanding payments (in cents) if any, applied to this quote line group.
42
16
 
43
- */
44
-
45
17
  amount_paid?:number;
46
-
47
- /**
48
- * @description Amount due in cents
49
18
 
50
- */
51
-
52
19
  amount_due?:number;
53
-
54
- /**
55
- * @description Describes the time in the subscription lifecycle when the charge is to occur. \* subscription_creation - Subscription Creation \* trial_start - Trial Start \* subscription_renewal - Subscription Renewal \* subscription_change - Subscription Change \* subscription_cancel - Subscription Cancel \* immediate - Immediate
56
20
 
57
- */
58
-
59
- charge_event?:'subscription_cancel' | 'immediate' | 'subscription_creation' | 'trial_start' | 'subscription_renewal' | 'subscription_change';
60
-
61
- /**
62
- * @description The serial number of the billing cycle of which the quote line group is a part.
21
+ charge_event?:'immediate' | 'subscription_creation' | 'trial_start' | 'subscription_change' | 'subscription_renewal' | 'subscription_cancel';
63
22
 
64
- */
65
-
66
23
  billing_cycle_number?:number;
67
-
68
- /**
69
- * @description The list of items in this quote line group.
70
24
 
71
- */
72
-
73
25
  line_items?:QuoteLineGroup.LineItem[];
74
-
75
- /**
76
- * @description The list of discounts applied to this quote line group.
77
26
 
78
- */
79
-
80
27
  discounts?:QuoteLineGroup.Discount[];
81
-
82
- /**
83
- * @description The list of discount(s) applied for line items in this quote line group.
84
28
 
85
- */
86
-
87
29
  line_item_discounts?:QuoteLineGroup.LineItemDiscount[];
88
-
89
- /**
90
- * @description The list of taxes applied to this quote line group.
91
30
 
92
- */
93
-
94
31
  taxes?:QuoteLineGroup.Tax[];
95
-
96
- /**
97
- * @description The list of taxes applied on line items in this quote line group.
98
32
 
99
- */
100
-
101
33
  line_item_taxes?:QuoteLineGroup.LineItemTax[];
34
+
102
35
  }
103
36
  export namespace QuoteLineGroup {
104
37
 
105
38
 
106
39
  export interface LineItem {
107
- /**
108
- * @description Uniquely identifies a line_item
109
-
110
- */
111
-
112
40
  id?:string;
113
41
 
114
- /**
115
- * @description A unique identifier for the subscription this line item belongs to.
116
-
117
- */
118
-
119
42
  subscription_id?:string;
120
43
 
121
- /**
122
- * @description Start date of this line item.
123
-
124
- */
125
-
126
44
  date_from:number;
127
45
 
128
- /**
129
- * @description End date of this line item.
130
-
131
- */
132
-
133
46
  date_to:number;
134
47
 
135
- /**
136
- * @description Unit amount of the line item.
137
-
138
- */
139
-
140
48
  unit_amount:number;
141
49
 
142
- /**
143
- * @description [Quantity of the recurring item](/docs/api/invoices?prod_cat_ver&#x3D;2#invoice_line_items_quantity) which is represented by this line item. For &#x60;metered&#x60; line items, this value is updated from [usages](/docs/api/usages) once when the invoice is generated as &#x60;pending&#x60; and finally when the invoice is [closed](/docs/api/invoices#close_a_pending_invoice).
144
-
145
- */
146
-
147
50
  quantity?:number;
148
51
 
149
- /**
150
- * @description Total amount of this line item. Typically equals to unit amount x quantity
151
-
152
- */
153
-
154
52
  amount?:number;
155
53
 
156
- /**
157
- * @description The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models) for this item price. \* per_unit - A fixed price per unit quantity. \* stairstep - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in. \* flat_fee - A fixed price that is not quantity-based. \* tiered - The per unit price is based on the tier that the total quantity falls in. \* volume - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.
158
-
159
- */
160
-
161
- pricing_model?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep';
162
-
163
- /**
164
- * @description Specifies whether this line item is taxed or not
165
-
166
- */
54
+ pricing_model?:'flat_fee' | 'per_unit' | 'tiered' | 'volume' | 'stairstep';
167
55
 
168
56
  is_taxed:boolean;
169
57
 
170
- /**
171
- * @description The tax amount charged for this item
172
-
173
- */
174
-
175
58
  tax_amount?:number;
176
59
 
177
- /**
178
- * @description Rate of tax used to calculate tax for this lineitem
179
-
180
- */
181
-
182
60
  tax_rate?:number;
183
61
 
184
- /**
185
- * @description The decimal representation of the unit amount of the &#x60;line_item&#x60;. The value is in major units of the currency. Returned when the &#x60;line_item&#x60; is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
186
-
187
- */
188
-
189
62
  unit_amount_in_decimal?:string;
190
63
 
191
- /**
192
- * @description The decimal representation of the quantity of this line_item. Returned when the &#x60;line_item&#x60; is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
193
-
194
- */
195
-
196
64
  quantity_in_decimal?:string;
197
65
 
198
- /**
199
- * @description The decimal representation of the amount for the &#x60;line_item&#x60;, in major units of the currency. Typically equals to &#x60;unit_amount_in_decimal&#x60; x &#x60;quantity_in_decimal&#x60;. Returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
200
-
201
- */
202
-
203
66
  amount_in_decimal?:string;
204
67
 
205
- /**
206
- * @description Total discounts for this line
207
-
208
- */
209
-
210
68
  discount_amount?:number;
211
69
 
212
- /**
213
- * @description Line Item-level discounts for this line.
214
-
215
- */
216
-
217
70
  item_level_discount_amount?:number;
218
71
 
219
- /**
220
- * @description Invoice Reference Line Item ID
221
-
222
- */
72
+ metered?:boolean;
223
73
 
224
- reference_line_item_id?:string;
74
+ percentage?:string;
225
75
 
226
- /**
227
- * @description Detailed description about this line item.
228
-
229
- */
76
+ reference_line_item_id?:string;
230
77
 
231
78
  description:string;
232
79
 
233
- /**
234
- * @description Detailed description about this item.
235
-
236
- */
237
-
238
80
  entity_description?:string;
239
81
 
240
- /**
241
- * @description Specifies the modelled entity this line item is based on. \* addon - Indicates that this lineitem is based on &#x27;Addon&#x27; entity. The &#x27;entity_id&#x27; attribute specifies the [addon](/docs/api/addons#addon_attributes) id \* plan_item_price - Indicates that this line item is based on plan Item Price \* addon_item_price - Indicates that this line item is based on addon Item Price \* charge_item_price - Indicates that this line item is based on charge Item Price \* adhoc - Indicates that this lineitem is not modelled. i.e created adhoc. So the &#x27;entity_id&#x27; attribute will be null in this case \* plan_setup - Indicates that this lineitem is based on &#x27;Plan Setup&#x27; charge. The &#x27;entity_id&#x27; attribute specifies the [plan](/docs/api/plans#plan_attributes) id \* plan - Indicates that this lineitem is based on &#x27;Plan&#x27; entity. The &#x27;entity_id&#x27; attribute specifies the [plan](/docs/api/plans#plan_attributes) id
242
-
243
- */
244
-
245
- entity_type:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
82
+ entity_type:'adhoc' | 'plan_item_price' | 'addon_item_price' | 'charge_item_price' | 'plan_setup' | 'plan' | 'addon';
246
83
 
247
- /**
248
- * @description The reason due to which the line item price/amount is exempted from tax. \* reverse_charge - If the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU only \* tax_not_configured - If tax is not enabled for the site \* high_value_physical_goods - If physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be applied \* product_exempt - If the Plan or Addon is marked as Tax exempt \* zero_rated - If the rate of tax is 0% and no Sales/ GST tax is collectable for that line item \* customer_exempt - If the Customer is marked as Tax exempt \* region_non_taxable - If the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdiction \* export - You are not registered for tax in the customer&#x27;s region. This is also the reason code when both &#x60;billing_address&#x60; and &#x60;shipping_address&#x60; have not been provided for the customer and subscription respectively
249
-
250
- */
251
-
252
- tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'tax_not_configured_external_provider' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
253
-
254
- /**
255
- * @description The identifier of the modelled entity this line item is based on. Will be null for &#x27;adhoc&#x27; entity type
256
-
257
- */
84
+ tax_exempt_reason?:'tax_not_configured' | 'region_non_taxable' | 'export' | 'customer_exempt' | 'product_exempt' | 'zero_rated' | 'reverse_charge' | 'high_value_physical_goods' | 'zero_value_item' | 'tax_not_configured_external_provider';
258
85
 
259
86
  entity_id?:string;
260
87
 
261
- /**
262
- * @description A unique identifier for the customer this line item belongs to
263
-
264
- */
265
-
266
88
  customer_id?:string;
267
89
  }
268
90
  export interface Discount {
269
- /**
270
- * @description The amount deducted. The format of this value depends on the [kind of currency](/docs/api?prod_cat_ver&#x3D;2#currencies).
271
-
272
- */
273
-
274
91
  amount:number;
275
92
 
276
- /**
277
- * @description Description for this deduction.
278
-
279
- */
280
-
281
93
  description?:string;
282
94
 
283
- /**
284
- * @description The unique id of the line item that this deduction is for. Is required when &#x60;discounts[entity_type]&#x60; is &#x60;item_level_coupon&#x60; or &#x60;document_level_coupon&#x60;.
285
-
286
- */
287
-
288
- line_item_id?:string;
289
-
290
- /**
291
- * @description The type of deduction and the amount to which it is applied. \* document_level_coupon - The deduction is due to a coupon applied to the invoice &#x60;sub_total&#x60;. The coupon id is passed as &#x60;entity_id&#x60;. \* prorated_credits - The deduction is due to a legacy adjustment credit applied to the invoice. The &#x60;entity_id&#x60; is &#x60;null&#x60; in this case. The legacy credits feature is superseded by [adjustment_credit_notes](/docs/api/invoices?prod_cat_ver&#x3D;2#invoice_adjustment_credit_notes). \* item_level_coupon - The deduction is due to a coupon applied to line item. The coupon &#x60;id&#x60; is passed as &#x60;entity_id&#x60;. \* item_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver&#x3D;2) applied to a line item of the invoice. The discount &#x60;id&#x60; is available as the &#x60;entity_id&#x60;. \* promotional_credits - The deduction is due to a [promotional credit](/docs/api/promotional_credits?prod_cat_ver&#x3D;2) applied to the invoice. \* document_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver&#x3D;2) applied to the invoice &#x60;sub_total&#x60;. The discount &#x60;id&#x60; is available as the &#x60;entity_id&#x60;.
292
-
293
- */
294
-
295
- entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
296
-
297
- /**
298
- * @description The type of discount that is applied to the line item. Relevant only when &#x60;discounts[entity_type]&#x60; is one of &#x60;item_level_discount&#x60; , &#x60;item_level_coupon&#x60;, &#x60;document_level_discount&#x60;, or &#x60;document_level_coupon&#x60; \* percentage - when percentage is applied as discount \* fixed_amount - when amount is applied as discount
299
-
300
- */
95
+ entity_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
301
96
 
302
97
  discount_type?:'fixed_amount' | 'percentage';
303
98
 
304
- /**
305
- * @description When the deduction is due to a &#x60;coupon&#x60; or a [discount](discounts), then this is the &#x60;id&#x60; of the coupon or discount.
306
-
307
- */
308
-
309
99
  entity_id?:string;
310
100
 
311
- /**
312
- * @description The [coupon code](/docs/api/coupon_codes#coupon_code_code), if applicable, used to provide the discount. The [coupon.id](/docs/api/coupons#coupon_id) is available in &#x60;entity_id&#x60;.
313
-
314
- */
315
-
316
101
  coupon_set_code?:string;
317
102
  }
318
103
  export interface LineItemDiscount {
319
- /**
320
- * @description The unique id of the line item that this deduction is for.
321
-
322
- */
323
-
324
104
  line_item_id:string;
325
105
 
326
- /**
327
- * @description The type of deduction and the amount to which it is applied. \* item_level_coupon - The deduction is due to a coupon applied to a line item of the invoice. The coupon &#x60;id&#x60; is available as &#x60;entity_id&#x60;. \* prorated_credits - The deduction is due to a legacy adjustment credit applied to the invoice. The &#x60;entity_id&#x60; is &#x60;null&#x60; in this case. The legacy credits feature is superseded by [adjustment_credit_notes](/docs/api/invoices?prod_cat_ver&#x3D;2#invoice_adjustment_credit_notes). \* document_level_coupon - The deduction is due to a coupon applied to the invoice &#x60;sub_total&#x60;. The coupon &#x60;id&#x60; is available as &#x60;entity_id&#x60;. \* document_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver&#x3D;2) applied to the invoice &#x60;sub_total&#x60;. The discount &#x60;id&#x60; is available as the &#x60;entity_id&#x60;. \* item_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver&#x3D;2) applied to a line item of the invoice. The discount &#x60;id&#x60; is available as the &#x60;entity_id&#x60;. \* promotional_credits - The deduction is due to a [promotional credit](/docs/api/promotional_credits) applied to the invoice. The &#x60;entity_id&#x60; is &#x60;null&#x60; in this case.
328
-
329
- */
330
-
331
- discount_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
106
+ discount_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
332
107
 
333
108
  coupon_id?:string;
334
109
 
335
- /**
336
- * @description When the deduction is due to a &#x60;coupon&#x60; or a [discount](discounts), then this is the &#x60;id&#x60; of the coupon or discount.
337
-
338
- */
339
-
340
110
  entity_id?:string;
341
111
 
342
- /**
343
- * @description The amount deducted. The format of this value depends on the [kind of currency](/docs/api#currencies).
344
-
345
- */
346
-
347
112
  discount_amount:number;
348
113
  }
349
114
  export interface Tax {
350
- /**
351
- * @description The name of the tax applied. E.g. GST.
352
-
353
- */
354
-
355
115
  name:string;
356
116
 
357
- /**
358
- * @description The tax amount.
359
-
360
- */
361
-
362
117
  amount:number;
363
118
 
364
- /**
365
- * @description Description of the tax item.
366
-
367
- */
368
-
369
119
  description?:string;
370
120
  }
371
121
  export interface LineItemTax {
372
- /**
373
- * @description The unique reference id of the line item for which the tax is applicable
374
-
375
- */
376
-
377
122
  line_item_id?:string;
378
123
 
379
- /**
380
- * @description The name of the tax applied
381
-
382
- */
383
-
384
124
  tax_name:string;
385
125
 
386
- /**
387
- * @description The rate of tax used to calculate tax amount
388
-
389
- */
390
-
391
126
  tax_rate:number;
392
127
 
393
128
  date_to?:number;
@@ -396,67 +131,22 @@ declare module 'chargebee' {
396
131
 
397
132
  prorated_taxable_amount?:number;
398
133
 
399
- /**
400
- * @description Indicates if tax is applied only on a portion of the line item amount.
401
-
402
- */
403
-
404
134
  is_partial_tax_applied?:boolean;
405
135
 
406
- /**
407
- * @description Indicates the non-compliance tax that should not be reported to the jurisdiction.
408
-
409
- */
410
-
411
136
  is_non_compliance_tax?:boolean;
412
137
 
413
- /**
414
- * @description Indicates the actual portion of the line item amount that is taxable.
415
-
416
- */
417
-
418
138
  taxable_amount:number;
419
139
 
420
- /**
421
- * @description The tax amount
422
-
423
- */
424
-
425
140
  tax_amount:number;
426
141
 
427
- /**
428
- * @description The type of tax jurisdiction \* unincorporated - Combined tax of state and county. \* federal - The tax jurisdiction is a federal \* state - The tax jurisdiction is a state \* county - The tax jurisdiction is a county \* country - The tax jurisdiction is a country \* city - The tax jurisdiction is a city \* other - Jurisdictions other than the ones listed above. \* special - Special tax jurisdiction.
429
-
430
- */
431
-
432
- tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
433
-
434
- /**
435
- * @description The name of the tax jurisdiction
436
-
437
- */
142
+ tax_juris_type?:'country' | 'federal' | 'state' | 'county' | 'city' | 'special' | 'unincorporated' | 'other';
438
143
 
439
144
  tax_juris_name?:string;
440
145
 
441
- /**
442
- * @description The tax jurisdiction code
443
-
444
- */
445
-
446
146
  tax_juris_code?:string;
447
147
 
448
- /**
449
- * @description Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.
450
-
451
- */
452
-
453
148
  tax_amount_in_local_currency?:number;
454
149
 
455
- /**
456
- * @description The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.
457
-
458
- */
459
-
460
150
  local_currency_code?:string;
461
151
  }
462
152
  }