chargebee 2.26.0 → 2.27.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.
Files changed (65) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/lib/chargebee.js +1 -1
  3. package/lib/resources/api_endpoints.js +8 -1
  4. package/package.json +1 -1
  5. package/types/core.d.ts +1 -0
  6. package/types/resources/Address.d.ts +235 -5
  7. package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
  8. package/types/resources/AttachedItem.d.ts +285 -13
  9. package/types/resources/Card.d.ts +375 -13
  10. package/types/resources/Comment.d.ts +160 -11
  11. package/types/resources/Contact.d.ts +54 -0
  12. package/types/resources/ContractTerm.d.ts +83 -0
  13. package/types/resources/Coupon.d.ts +628 -20
  14. package/types/resources/CouponCode.d.ts +46 -5
  15. package/types/resources/CouponSet.d.ts +194 -17
  16. package/types/resources/CreditNote.d.ts +1100 -44
  17. package/types/resources/CreditNoteEstimate.d.ts +75 -6
  18. package/types/resources/Customer.d.ts +1819 -73
  19. package/types/resources/DifferentialPrice.d.ts +246 -15
  20. package/types/resources/Discount.d.ts +107 -0
  21. package/types/resources/Download.d.ts +18 -0
  22. package/types/resources/EntitlementOverride.d.ts +101 -7
  23. package/types/resources/Estimate.d.ts +1021 -27
  24. package/types/resources/Event.d.ts +138 -8
  25. package/types/resources/Export.d.ts +622 -32
  26. package/types/resources/Feature.d.ts +287 -22
  27. package/types/resources/Gift.d.ts +296 -24
  28. package/types/resources/Hierarchy.d.ts +30 -0
  29. package/types/resources/HostedPage.d.ts +1046 -37
  30. package/types/resources/ImpactedItem.d.ts +41 -1
  31. package/types/resources/ImpactedSubscription.d.ts +36 -1
  32. package/types/resources/InAppSubscription.d.ts +369 -9
  33. package/types/resources/Invoice.d.ts +1942 -92
  34. package/types/resources/InvoiceEstimate.d.ts +75 -6
  35. package/types/resources/Item.d.ts +522 -16
  36. package/types/resources/ItemEntitlement.d.ts +162 -13
  37. package/types/resources/ItemFamily.d.ts +153 -15
  38. package/types/resources/ItemPrice.d.ts +951 -26
  39. package/types/resources/Media.d.ts +24 -0
  40. package/types/resources/NonSubscription.d.ts +46 -3
  41. package/types/resources/Order.d.ts +1172 -32
  42. package/types/resources/PaymentIntent.d.ts +293 -8
  43. package/types/resources/PaymentReferenceNumber.d.ts +24 -0
  44. package/types/resources/PaymentSource.d.ts +984 -55
  45. package/types/resources/PaymentVoucher.d.ts +252 -14
  46. package/types/resources/PortalSession.d.ts +154 -10
  47. package/types/resources/PromotionalCredit.d.ts +300 -16
  48. package/types/resources/Purchase.d.ts +206 -5
  49. package/types/resources/Quote.d.ts +1430 -62
  50. package/types/resources/QuoteLineGroup.d.ts +134 -5
  51. package/types/resources/QuotedCharge.d.ts +63 -5
  52. package/types/resources/QuotedSubscription.d.ts +192 -5
  53. package/types/resources/ResourceMigration.d.ts +68 -3
  54. package/types/resources/SiteMigrationDetail.d.ts +98 -5
  55. package/types/resources/Subscription.d.ts +2564 -137
  56. package/types/resources/SubscriptionEntitlement.d.ts +116 -8
  57. package/types/resources/SubscriptionEstimate.d.ts +36 -2
  58. package/types/resources/TaxWithheld.d.ts +32 -0
  59. package/types/resources/ThirdPartyPaymentMethod.d.ts +24 -0
  60. package/types/resources/TimeMachine.d.ts +82 -7
  61. package/types/resources/Token.d.ts +164 -7
  62. package/types/resources/Transaction.d.ts +567 -25
  63. package/types/resources/UnbilledCharge.d.ts +309 -14
  64. package/types/resources/Usage.d.ts +237 -13
  65. package/types/resources/VirtualBankAccount.d.ts +220 -17
@@ -1,376 +1,1744 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  declare module 'chargebee' {
3
3
  export interface Quote {
4
+
5
+ /**
6
+ * @description The quote number. Acts as a identifier for quote and typically generated sequentially.
7
+
8
+ */
9
+
4
10
  id:string;
11
+
12
+ /**
13
+ * @description The quote name will be used as the pdf name of the quote.
14
+
15
+ */
16
+
5
17
  name?:string;
18
+
19
+ /**
20
+ * @description Purchase Order Number
21
+
22
+ */
23
+
6
24
  po_number?:string;
25
+
26
+ /**
27
+ * @description The identifier of the customer this quote belongs to.
28
+
29
+ */
30
+
7
31
  customer_id:string;
32
+
33
+ /**
34
+ * @description The identifier of the subscription this quote belongs to.
35
+
36
+ */
37
+
8
38
  subscription_id?:string;
39
+
40
+ /**
41
+ * @description The identifier of the invoice generated while converting this quote.
42
+
43
+ */
44
+
9
45
  invoice_id?:string;
46
+
47
+ /**
48
+ * @description Current status of this quote. \* open - Open \* closed - Closed \* declined - Declined. \* invoiced - Invoiced \* accepted - Accepted.
49
+
50
+ */
51
+
10
52
  status:'declined' | 'invoiced' | 'accepted' | 'closed' | 'open';
53
+
54
+ /**
55
+ * @description Operation Type \* onetime_invoice - onetime_invoice \* change_subscription - change_subscription \* create_subscription_for_customer - create_subscription_for_customer
56
+
57
+ */
58
+
11
59
  operation_type:'onetime_invoice' | 'change_subscription' | 'create_subscription_for_customer';
60
+
61
+ /**
62
+ * @description VAT/ Tax registration number of the customer. [Learn more](https://www.chargebee.com/docs/tax.html#capture-tax-registration-number)
63
+
64
+ */
65
+
12
66
  vat_number?:string;
67
+
68
+ /**
69
+ * @description The price type of the quote. \* tax_inclusive - All amounts in the document are inclusive of tax. \* tax_exclusive - All amounts in the document are exclusive of tax.
70
+
71
+ */
72
+
13
73
  price_type:PriceType;
74
+
75
+ /**
76
+ * @description Quote will be valid till this date. After this date quote will be marked as closed.
77
+
78
+ */
79
+
14
80
  valid_till:number;
81
+
82
+ /**
83
+ * @description Creation date of the quote. Typically this is the date on which quote is generated.
84
+
85
+ */
86
+
15
87
  date:number;
88
+
89
+ /**
90
+ * @description Total contract value. Applicable when multi billing cycle quote is enabled.
91
+
92
+ */
93
+
16
94
  total_payable?:number;
95
+
96
+ /**
97
+ * @description Charge on acceptance. Applicable when multi billing cycle quote is enabled.
98
+
99
+ */
100
+
17
101
  charge_on_acceptance?:number;
102
+
103
+ /**
104
+ * @description Subtotal (in cents) of the first quote line group.
105
+
106
+ */
107
+
18
108
  sub_total:number;
109
+
110
+ /**
111
+ * @description Total (in cents) of the first quote line group.
112
+
113
+ */
114
+
19
115
  total?:number;
116
+
117
+ /**
118
+ * @description Credits applied (in cents) for the first quote line group.
119
+
120
+ */
121
+
20
122
  credits_applied?:number;
123
+
124
+ /**
125
+ * @description Existing outstanding payments (in cents) if any, applied to the first quote line group.
126
+
127
+ */
128
+
21
129
  amount_paid?:number;
130
+
131
+ /**
132
+ * @description Amount due (in cents) for the first quote line group.
133
+
134
+ */
135
+
22
136
  amount_due?:number;
137
+
138
+ /**
139
+ * @description Version of the quote.
140
+
141
+ */
142
+
23
143
  version?:number;
144
+
145
+ /**
146
+ * @description Version number of this resource. The &#x60;resource_version&#x60; is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
147
+
148
+ */
149
+
24
150
  resource_version?:number;
151
+
152
+ /**
153
+ * @description Timestamp indicating when this quote was last updated.
154
+
155
+ */
156
+
25
157
  updated_at?:number;
158
+
159
+ /**
160
+ * @description An overridden value for the first two characters of the [full VAT
161
+ number](https://en.wikipedia.org/wiki/VAT_identification_number). Only applicable specifically for customers with [billing_address](customers#customer_billing_address) &#x60;country&#x60; as &#x60;XI&#x60; (which is **United Kingdom - Northern Ireland** ).
162
+
163
+ When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
164
+ enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address) &#x60;country&#x60; as &#x60;XI&#x60;. That&#x27;s the code for **United Kingdom - Northern
165
+ Ireland** . The first two characters of the VAT number in such a case is &#x60;XI&#x60; by default. However, if the VAT number was registered in UK, the value should be &#x60;GB&#x60;. Set &#x60;vat_number_prefix&#x60; to &#x60;GB&#x60; for such cases.
166
+
167
+ */
168
+
26
169
  vat_number_prefix?:string;
170
+
171
+ /**
172
+ * @description Specifies the customer&#x27;s category for the Goods and Services Tax (GST). This field is returned only if you&#x27;ve configured GST for the India region.
173
+
174
+ */
175
+
27
176
  tax_category?:string;
177
+
178
+ /**
179
+ * @description The currency code (ISO 4217 format) of the quote.
180
+
181
+ */
182
+
28
183
  currency_code:string;
184
+
185
+ /**
186
+ * @description List of notes associated with this quotes.
187
+
188
+ */
189
+
29
190
  notes?:any[];
191
+
192
+ /**
193
+ * @description Specifies the contract term&#x27;s start date.
194
+
195
+ */
196
+
30
197
  contract_term_start?:number;
198
+
199
+ /**
200
+ * @description Specifies the contract term&#x27;s end date. It indicates when the action set in &#x60;action_at_term_end&#x60; gets triggered.
201
+
202
+ */
203
+
31
204
  contract_term_end?:number;
205
+
206
+ /**
207
+ * @description Specifies the charge to be applied for terminating the contract term.
208
+
209
+ */
210
+
32
211
  contract_term_termination_fee?:number;
212
+
213
+ /**
214
+ * @description The unique ID of the [business entity](/docs/api/advanced-features?prod_cat_ver&#x3D;2#mbe) of this quote.
215
+
216
+ */
217
+
33
218
  business_entity_id:string;
219
+
220
+ /**
221
+ * @description The list of line items for this quote.
222
+
223
+ */
224
+
34
225
  line_items?:Quote.LineItem[];
226
+
227
+ /**
228
+ * @description The list of all deductions applied to the quote.
229
+
230
+ */
231
+
35
232
  discounts?:Quote.Discount[];
233
+
234
+ /**
235
+ * @description The list of deductions applied for each line item of this quote.
236
+
237
+ */
238
+
36
239
  line_item_discounts?:Quote.LineItemDiscount[];
240
+
241
+ /**
242
+ * @description The list of taxes applicable for this quote.
243
+
244
+ */
245
+
37
246
  taxes?:Quote.Tax[];
247
+
248
+ /**
249
+ * @description The list of taxes applied on the line items of this quote.
250
+
251
+ */
252
+
38
253
  line_item_taxes?:Quote.LineItemTax[];
254
+
255
+ /**
256
+ * @description The list of tiers applicable for the various line items in this quote.
257
+
258
+ */
259
+
39
260
  line_item_tiers?:Quote.LineItemTier[];
261
+
262
+ /**
263
+ * @description Shipping address for the quote.
264
+
265
+ */
266
+
40
267
  shipping_address?:Quote.ShippingAddress;
268
+
269
+ /**
270
+ * @description Billing address for the quote.
271
+
272
+ */
273
+
41
274
  billing_address?:Quote.BillingAddress;
42
275
  }
43
276
  export namespace Quote {
44
- export class QuoteResource {
277
+ export class QuoteResource {
278
+ /**
279
+ * @description Create a quote for new subscription line items of a customer.
280
+
281
+ */
282
+
45
283
  create_sub_items_for_customer_quote(customer_id:string, input?:CreateSubItemsForCustomerQuoteInputParam):ChargebeeRequest<CreateSubItemsForCustomerQuoteResponse>;
284
+
285
+ /**
286
+ * @description Retrieves the quotes identified by the &#x27;number&#x27; specified in the url.
287
+
288
+ */
289
+
46
290
  retrieve(quote_id:string):ChargebeeRequest<RetrieveResponse>;
291
+
292
+ /**
293
+ * @description Changes the quote produced for creating a new subscription items
294
+
295
+ */
296
+
47
297
  edit_create_sub_customer_quote_for_items(quote_id:string, input?:EditCreateSubCustomerQuoteForItemsInputParam):ChargebeeRequest<EditCreateSubCustomerQuoteForItemsResponse>;
298
+
299
+ /**
300
+ * @description Updates the status of the quote. Status can be updated to Accepted, Declined, and Closed.
301
+
302
+ */
303
+
48
304
  update_status(quote_id:string, input:UpdateStatusInputParam):ChargebeeRequest<UpdateStatusResponse>;
305
+
306
+ /**
307
+ * @description Create a quote for updating subscription line items.
308
+
309
+ */
310
+
49
311
  update_subscription_quote_for_items(input?:UpdateSubscriptionQuoteForItemsInputParam):ChargebeeRequest<UpdateSubscriptionQuoteForItemsResponse>;
312
+
313
+ /**
314
+ * @description This API retrieves all the quote line groups and lineitems for a quote.
315
+
316
+ */
317
+
50
318
  quote_line_groups_for_quote(quote_id:string, input?:QuoteLineGroupsForQuoteInputParam):ChargebeeRequest<QuoteLineGroupsForQuoteResponse>;
319
+
320
+ /**
321
+ * @description Can be used to extend the expiry date of a quote.
322
+
323
+ */
324
+
51
325
  extend_expiry_date(quote_id:string, input:ExtendExpiryDateInputParam):ChargebeeRequest<ExtendExpiryDateResponse>;
326
+
327
+ /**
328
+ * @description Changes the quote produced for adding one-time charges and charge items.
329
+
330
+ */
331
+
52
332
  edit_for_charge_items_and_charges(quote_id:string, input?:EditForChargeItemsAndChargesInputParam):ChargebeeRequest<EditForChargeItemsAndChargesResponse>;
333
+
334
+ /**
335
+ * @description Changes the quote produced for updating the subscription items.
336
+
337
+ */
338
+
53
339
  edit_update_subscription_quote_for_items(quote_id:string, input?:EditUpdateSubscriptionQuoteForItemsInputParam):ChargebeeRequest<EditUpdateSubscriptionQuoteForItemsResponse>;
340
+
341
+ /**
342
+ * @description List all quotes.
343
+
344
+ */
345
+
54
346
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
347
+
348
+ /**
349
+ * @description Retrieves the quote as a PDF. The returned URL is secure, allows download and expires in 60 minutes.
350
+
351
+ */
352
+
55
353
  pdf(quote_id:string, input?:PdfInputParam):ChargebeeRequest<PdfResponse>;
354
+
355
+ /**
356
+ * @description This API is to convert a quote to an invoice.
357
+
358
+ */
359
+
56
360
  convert(quote_id:string, input?:ConvertInputParam):ChargebeeRequest<ConvertResponse>;
361
+
362
+ /**
363
+ * @description Creates a quote using charge-items and one-time charges.
364
+
365
+ */
366
+
57
367
  create_for_charge_items_and_charges(input:CreateForChargeItemsAndChargesInputParam):ChargebeeRequest<CreateForChargeItemsAndChargesResponse>;
368
+
369
+ /**
370
+ * @description Delete a quote using this API.
371
+
372
+ */
373
+
58
374
  delete(quote_id:string, input?:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
59
375
  }
60
- export interface CreateSubItemsForCustomerQuoteResponse {
61
- quote:Quote;
62
- quoted_subscription?:QuotedSubscription;
376
+ export interface CreateSubItemsForCustomerQuoteResponse {
377
+ quote:Quote;
378
+
379
+ quoted_subscription?:QuotedSubscription;
63
380
  }
64
381
  export interface CreateSubItemsForCustomerQuoteInputParam {
382
+
383
+ /**
384
+ * @description The quote name will be used as the pdf name of the quote.
385
+
386
+ */
387
+
65
388
  name?:string;
389
+
390
+ /**
391
+ * @description Notes specific to this quote that you want customers to see on the quote PDF.
392
+
393
+ */
394
+
66
395
  notes?:string;
396
+
397
+ /**
398
+ * @description Quotes will be vaild till this date. After this quote will be marked as closed.
399
+
400
+ */
401
+
67
402
  expires_at?:number;
403
+
404
+ /**
405
+ * @description The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver&#x3D;2#item_price_billing_cycles) is used.
406
+
407
+ */
408
+
68
409
  billing_cycles?:number;
410
+
411
+ /**
412
+ * @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver&#x3D;2) that are to be removed from the subscription.
413
+
414
+ */
415
+
69
416
  mandatory_items_to_remove?:string[];
417
+
418
+ /**
419
+ * @description The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).
420
+
421
+ */
422
+
70
423
  terms_to_charge?:number;
424
+
425
+ /**
426
+ * @description Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..
427
+
428
+ */
429
+
71
430
  billing_alignment_mode?:BillingAlignmentMode;
431
+
432
+ /**
433
+ * @description Identifier of the coupon as a List. Coupon Codes can also be passed.
434
+
435
+ */
436
+
72
437
  coupon_ids?:string[];
438
+
439
+ /**
440
+ * @description Parameters for subscription
441
+
442
+ */
443
+
73
444
  subscription?:{contract_term_billing_cycle_on_renewal?:number,id?:string,po_number?:string,start_date?:number,trial_end?:number};
445
+
446
+ /**
447
+ * @description Parameters for shipping_address
448
+
449
+ */
450
+
74
451
  shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
452
+
453
+ /**
454
+ * @description Parameters for contract_term
455
+
456
+ */
457
+
75
458
  contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
459
+
460
+ /**
461
+ * @description Parameters for subscription_items
462
+
463
+ */
464
+
76
465
  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}[];
466
+
467
+ /**
468
+ * @description Parameters for discounts
469
+
470
+ */
471
+
77
472
  discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
473
+
474
+ /**
475
+ * @description Parameters for item_tiers
476
+
477
+ */
478
+
78
479
  item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
79
480
  }
80
- export interface RetrieveResponse {
81
- quote:Quote;
82
- quoted_subscription?:QuotedSubscription;
83
- quoted_charge?:QuotedCharge;
481
+ export interface RetrieveResponse {
482
+ quote:Quote;
483
+
484
+ quoted_subscription?:QuotedSubscription;
485
+
486
+ quoted_charge?:QuotedCharge;
84
487
  }
85
488
 
86
- export interface EditCreateSubCustomerQuoteForItemsResponse {
87
- quote:Quote;
88
- quoted_subscription?:QuotedSubscription;
489
+ export interface EditCreateSubCustomerQuoteForItemsResponse {
490
+ quote:Quote;
491
+
492
+ quoted_subscription?:QuotedSubscription;
89
493
  }
90
494
  export interface EditCreateSubCustomerQuoteForItemsInputParam {
495
+
496
+ /**
497
+ * @description Notes specific to this quote that you want customers to see on the quote PDF.
498
+
499
+ */
500
+
91
501
  notes?:string;
502
+
503
+ /**
504
+ * @description Quotes will be vaild till this date. After this quote will be marked as closed.
505
+
506
+ */
507
+
92
508
  expires_at?:number;
509
+
510
+ /**
511
+ * @description The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver&#x3D;2#item_price_billing_cycles) is used.
512
+
513
+ */
514
+
93
515
  billing_cycles?:number;
516
+
517
+ /**
518
+ * @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver&#x3D;2) that are to be removed from the subscription.
519
+
520
+ */
521
+
94
522
  mandatory_items_to_remove?:string[];
523
+
524
+ /**
525
+ * @description The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).
526
+
527
+ */
528
+
95
529
  terms_to_charge?:number;
530
+
531
+ /**
532
+ * @description Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..
533
+
534
+ */
535
+
96
536
  billing_alignment_mode?:BillingAlignmentMode;
537
+
538
+ /**
539
+ * @description Identifier of the coupon as a List. Coupon Codes can also be passed.
540
+
541
+ */
542
+
97
543
  coupon_ids?:string[];
544
+
545
+ /**
546
+ * @description Parameters for subscription
547
+
548
+ */
549
+
98
550
  subscription?:{contract_term_billing_cycle_on_renewal?:number,id?:string,start_date?:number,trial_end?:number};
551
+
552
+ /**
553
+ * @description Parameters for shipping_address
554
+
555
+ */
556
+
99
557
  shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
558
+
559
+ /**
560
+ * @description Parameters for contract_term
561
+
562
+ */
563
+
100
564
  contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
565
+
566
+ /**
567
+ * @description Parameters for subscription_items
568
+
569
+ */
570
+
101
571
  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}[];
572
+
573
+ /**
574
+ * @description Parameters for discounts
575
+
576
+ */
577
+
102
578
  discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
579
+
580
+ /**
581
+ * @description Parameters for item_tiers
582
+
583
+ */
584
+
103
585
  item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
104
586
  }
105
- export interface UpdateStatusResponse {
106
- quote:Quote;
107
- quoted_subscription?:QuotedSubscription;
108
- quoted_charge?:QuotedCharge;
587
+ export interface UpdateStatusResponse {
588
+ quote:Quote;
589
+
590
+ quoted_subscription?:QuotedSubscription;
591
+
592
+ quoted_charge?:QuotedCharge;
109
593
  }
110
594
  export interface UpdateStatusInputParam {
595
+
596
+ /**
597
+ * @description Status to update for the quote. \* accepted - Accepted. \* closed - Closed \* declined - Declined.
598
+
599
+ */
600
+
111
601
  status:'declined' | 'accepted' | 'closed';
602
+
603
+ /**
604
+ * @description An internal [comment](./comments) to be added for this operation, to the quote. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Quote PDF](./quotes#retrieve_quote_as_pdf).
605
+
606
+ */
607
+
112
608
  comment?:string;
113
609
  }
114
- export interface UpdateSubscriptionQuoteForItemsResponse {
115
- quote:Quote;
116
- quoted_subscription?:QuotedSubscription;
610
+ export interface UpdateSubscriptionQuoteForItemsResponse {
611
+ quote:Quote;
612
+
613
+ quoted_subscription?:QuotedSubscription;
117
614
  }
118
615
  export interface UpdateSubscriptionQuoteForItemsInputParam {
616
+
617
+ /**
618
+ * @description The quote name will be used as the pdf name of the quote.
619
+
620
+ */
621
+
119
622
  name?:string;
623
+
624
+ /**
625
+ * @description Notes specific to this quote that you want customers to see on the quote PDF.
626
+
627
+ */
628
+
120
629
  notes?:string;
630
+
631
+ /**
632
+ * @description Quotes will be vaild till this date. After this quote will be marked as closed.
633
+
634
+ */
635
+
121
636
  expires_at?:number;
637
+
638
+ /**
639
+ * @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver&#x3D;2) that are to be removed from the subscription.
640
+
641
+ */
642
+
122
643
  mandatory_items_to_remove?:string[];
644
+
645
+ /**
646
+ * @description If &#x60;true&#x60; then the existing &#x60;subscription_items&#x60; list for the subscription is replaced by the one provided. If &#x60;false&#x60; then the provided &#x60;subscription_items&#x60; list gets added to the existing list.
647
+
648
+ */
649
+
123
650
  replace_items_list?:boolean;
651
+
652
+ /**
653
+ * @description Billing cycles set for plan-item price is used by default.
654
+
655
+ */
656
+
124
657
  billing_cycles?:number;
658
+
659
+ /**
660
+ * @description The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). If a new term is started for the subscription due to this API call, then &#x60;terms_to_charge&#x60; is inclusive of this new term. See description for the &#x60;force_term_reset&#x60; parameter to learn more about when a subscription term is reset.
661
+
662
+ */
663
+
125
664
  terms_to_charge?:number;
665
+
666
+ /**
667
+ * @description If the subscription &#x60;status&#x60; is &#x60;cancelled&#x60; and it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.
668
+ **Note:** It is recommended not to pass this parameter along with &#x60;changed_scheduled_at&#x60;. &#x60;reactivate_from&#x60; can be backdated (set to a value in the past). Use backdating when the subscription has been reactivated already but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:
669
+
670
+ * Backdating must be enabled for subscription reactivation operations.
671
+ * 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.
672
+ * The date is on or after the last date/time any of the product catalog items of the subscription were changed.
673
+ * 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 plan in the subscription is 2 months and today is 14th April, &#x60;changes_scheduled_at&#x60; cannot be earlier than 14th February.
674
+ .
675
+
676
+ */
677
+
126
678
  reactivate_from?:number;
679
+
680
+ /**
681
+ * @description Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) chosen for the site for calendar billing. Only applicable when using calendar billing. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal.
682
+
683
+ */
684
+
127
685
  billing_alignment_mode?:BillingAlignmentMode;
686
+
687
+ /**
688
+ * @description Identifier of the coupon as a List. Coupon Codes can also be passed.
689
+
690
+ */
691
+
128
692
  coupon_ids?:string[];
693
+
694
+ /**
695
+ * @description Should be true if the existing coupons should be replaced with the ones that are being passed.
696
+
697
+ */
698
+
129
699
  replace_coupon_list?:boolean;
700
+
701
+ /**
702
+ * @description 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 carried out at the end of the current billing cycle of the subscription. \* specific_date - The change is carried out as of the date specified under &#x60;changes_scheduled_at&#x60;. \* immediately - The change is carried out immediately.
703
+
704
+ */
705
+
130
706
  change_option?:ChangeOption;
707
+
708
+ /**
709
+ * @description When &#x60;change_option&#x60; is set to &#x60;specific_date&#x60;, then set the date/time at which the subscription change is to happen or has happened. &#x60;changes_scheduled_at&#x60; can be set to a value in the past. This is called backdating the subscription change and is performed when the subscription change has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:
710
+
711
+ * Backdating must be enabled for subscription change operations.
712
+ * Only the following changes can be backdated:
713
+ * Changes in the recurring items or their prices.
714
+ * Addition of non-recurring items.
715
+ * Subscription &#x60;status&#x60; is &#x60;active&#x60;, &#x60;cancelled&#x60;, or &#x60;non_renewing&#x60;.
716
+ * 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.
717
+ * The date is on or after &#x60;current_term_start&#x60;.
718
+ * The date is on or after the last date/time any of the following changes were made:
719
+ * Changes in the recurring items or their prices.
720
+ * Addition of non-recurring items.
721
+ * 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.
722
+ .
723
+
724
+ */
725
+
131
726
  changes_scheduled_at?:number;
727
+
728
+ /**
729
+ * @description Applicable for &#x27;Active&#x27; \&amp; &#x27;Non Renewing&#x27; states alone. Generally, subscription&#x27;s term will be reset (i.e current term is ended and a new term starts immediately) when a new plan having different billing frequency is specified in the input. For all the other cases, the subscription&#x27;s term will remain intact. Now for this later scenario, if you want to force a term reset you can specify this param as &#x27;true&#x27;.
730
+ **Note**: Specifying this value as &#x27;false&#x27; has no impact on the default behaviour.
731
+
732
+ */
733
+
132
734
  force_term_reset?:boolean;
735
+
736
+ /**
737
+ * @description Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data.
738
+
739
+ */
740
+
133
741
  reactivate?:boolean;
742
+
743
+ /**
744
+ * @description Parameters for subscription
745
+
746
+ */
747
+
134
748
  subscription?:{auto_collection?:AutoCollection,contract_term_billing_cycle_on_renewal?:number,id:string,offline_payment_method?:OfflinePaymentMethod,start_date?:number,trial_end?:number};
749
+
750
+ /**
751
+ * @description Parameters for billing_address
752
+
753
+ */
754
+
135
755
  billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
756
+
757
+ /**
758
+ * @description Parameters for shipping_address
759
+
760
+ */
761
+
136
762
  shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
763
+
764
+ /**
765
+ * @description Parameters for customer
766
+
767
+ */
768
+
137
769
  customer?:{registered_for_gst?:boolean,vat_number?:string,vat_number_prefix?:string};
770
+
771
+ /**
772
+ * @description Parameters for contract_term
773
+
774
+ */
775
+
138
776
  contract_term?:{action_at_term_end?:'cancel' | 'renew_once' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
777
+
778
+ /**
779
+ * @description Parameters for subscription_items
780
+
781
+ */
782
+
139
783
  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}[];
784
+
785
+ /**
786
+ * @description Parameters for discounts
787
+
788
+ */
789
+
140
790
  discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
791
+
792
+ /**
793
+ * @description Parameters for item_tiers
794
+
795
+ */
796
+
141
797
  item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
142
798
  }
143
- export interface QuoteLineGroupsForQuoteResponse {
144
- list:{quote_line_group:QuoteLineGroup}[];
145
- next_offset?:string;
799
+ export interface QuoteLineGroupsForQuoteResponse {
800
+ /**
801
+ * @description This API retrieves all the quote line groups and lineitems for a quote.
802
+
803
+ */
804
+
805
+ list:{quote_line_group:QuoteLineGroup}[];
806
+
807
+ /**
808
+ * @description This API retrieves all the quote line groups and lineitems for a quote.
809
+
810
+ */
811
+
812
+ next_offset?:string;
146
813
  }
147
814
  export interface QuoteLineGroupsForQuoteInputParam {
148
- [key : string]: any;
815
+ [key : string]: any;
816
+ /**
817
+ * @description The number of resources to be returned.
818
+
819
+ */
820
+
149
821
  limit?:number;
822
+
823
+ /**
824
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \&#x60;offset\&#x60; to the value of \&#x60;next_offset\&#x60; obtained in the previous iteration of the API call.
825
+
826
+ */
827
+
150
828
  offset?:string;
151
829
  }
152
- export interface ExtendExpiryDateResponse {
153
- quote:Quote;
154
- quoted_subscription?:QuotedSubscription;
155
- quoted_charge?:QuotedCharge;
830
+ export interface ExtendExpiryDateResponse {
831
+ quote:Quote;
832
+
833
+ quoted_subscription?:QuotedSubscription;
834
+
835
+ quoted_charge?:QuotedCharge;
156
836
  }
157
837
  export interface ExtendExpiryDateInputParam {
838
+
839
+ /**
840
+ * @description Quote will be valid till this date. After this date quote will be marked as closed.
841
+
842
+ */
843
+
158
844
  valid_till:number;
159
845
  }
160
- export interface EditForChargeItemsAndChargesResponse {
161
- quote:Quote;
162
- quoted_charge?:QuotedCharge;
846
+ export interface EditForChargeItemsAndChargesResponse {
847
+ quote:Quote;
848
+
849
+ quoted_charge?:QuotedCharge;
163
850
  }
164
851
  export interface EditForChargeItemsAndChargesInputParam {
852
+
853
+ /**
854
+ * @description Purchase Order Number for this quote.
855
+
856
+ */
857
+
165
858
  po_number?:string;
859
+
860
+ /**
861
+ * @description Notes specific to this quote that you want customers to see on the quote PDF.
862
+
863
+ */
864
+
166
865
  notes?:string;
866
+
867
+ /**
868
+ * @description Quotes will be vaild till this date. After this quote will be marked as closed.
869
+
870
+ */
871
+
167
872
  expires_at?:number;
873
+
874
+ /**
875
+ * @description The currency code (ISO 4217 format) of the quote.
876
+
877
+ */
878
+
168
879
  currency_code?:string;
880
+
881
+ /**
882
+ * @description The &#x27;One Time&#x27; coupon to be applied.
883
+
884
+ */
885
+
169
886
  coupon?:string;
887
+
888
+ /**
889
+ * @description List of Coupons to be added.
890
+
891
+ */
892
+
170
893
  coupon_ids?:string[];
894
+
895
+ /**
896
+ * @description Parameters for shipping_address
897
+
898
+ */
899
+
171
900
  shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
901
+
902
+ /**
903
+ * @description Parameters for item_prices
904
+
905
+ */
906
+
172
907
  item_prices?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
908
+
909
+ /**
910
+ * @description Parameters for item_tiers
911
+
912
+ */
913
+
173
914
  item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
915
+
916
+ /**
917
+ * @description Parameters for charges
918
+
919
+ */
920
+
174
921
  charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_transaction_type?:number,description?:string,service_period?:number}[];
922
+
923
+ /**
924
+ * @description Parameters for discounts
925
+
926
+ */
927
+
175
928
  discounts?:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
176
929
  }
177
- export interface EditUpdateSubscriptionQuoteForItemsResponse {
178
- quote:Quote;
179
- quoted_subscription?:QuotedSubscription;
930
+ export interface EditUpdateSubscriptionQuoteForItemsResponse {
931
+ quote:Quote;
932
+
933
+ quoted_subscription?:QuotedSubscription;
180
934
  }
181
935
  export interface EditUpdateSubscriptionQuoteForItemsInputParam {
936
+
937
+ /**
938
+ * @description Notes specific to this quote that you want customers to see on the quote PDF.
939
+
940
+ */
941
+
182
942
  notes?:string;
943
+
944
+ /**
945
+ * @description Quotes will be vaild till this date. After this quote will be marked as closed.
946
+
947
+ */
948
+
183
949
  expires_at?:number;
950
+
951
+ /**
952
+ * @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver&#x3D;2) that are to be removed from the subscription.
953
+
954
+ */
955
+
184
956
  mandatory_items_to_remove?:string[];
957
+
958
+ /**
959
+ * @description If &#x60;true&#x60; then the existing &#x60;subscription_items&#x60; list for the subscription is replaced by the one provided. If &#x60;false&#x60; then the provided &#x60;subscription_items&#x60; list gets added to the existing list.
960
+
961
+ */
962
+
185
963
  replace_items_list?:boolean;
964
+
965
+ /**
966
+ * @description Billing cycles set for plan-item price is used by default.
967
+
968
+ */
969
+
186
970
  billing_cycles?:number;
971
+
972
+ /**
973
+ * @description The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). If a new term is started for the subscription due to this API call, then &#x60;terms_to_charge&#x60; is inclusive of this new term. See description for the &#x60;force_term_reset&#x60; parameter to learn more about when a subscription term is reset.
974
+
975
+ */
976
+
187
977
  terms_to_charge?:number;
978
+
979
+ /**
980
+ * @description If the subscription &#x60;status&#x60; is &#x60;cancelled&#x60; and it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.
981
+ **Note:** It is recommended not to pass this parameter along with &#x60;changed_scheduled_at&#x60;. &#x60;reactivate_from&#x60; can be backdated (set to a value in the past). Use backdating when the subscription has been reactivated already but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:
982
+
983
+ * Backdating must be enabled for subscription reactivation operations.
984
+ * 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.
985
+ * The date is on or after the last date/time any of the product catalog items of the subscription were changed.
986
+ * 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 plan in the subscription is 2 months and today is 14th April, &#x60;changes_scheduled_at&#x60; cannot be earlier than 14th February.
987
+ .
988
+
989
+ */
990
+
188
991
  reactivate_from?:number;
992
+
993
+ /**
994
+ * @description Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) chosen for the site for calendar billing. Only applicable when using calendar billing. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal.
995
+
996
+ */
997
+
189
998
  billing_alignment_mode?:BillingAlignmentMode;
999
+
1000
+ /**
1001
+ * @description Identifier of the coupon as a List. Coupon Codes can also be passed.
1002
+
1003
+ */
1004
+
190
1005
  coupon_ids?:string[];
1006
+
1007
+ /**
1008
+ * @description Should be true if the existing coupons should be replaced with the ones that are being passed.
1009
+
1010
+ */
1011
+
191
1012
  replace_coupon_list?:boolean;
1013
+
1014
+ /**
1015
+ * @description 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 carried out at the end of the current billing cycle of the subscription. \* specific_date - The change is carried out as of the date specified under &#x60;changes_scheduled_at&#x60;. \* immediately - The change is carried out immediately.
1016
+
1017
+ */
1018
+
192
1019
  change_option?:ChangeOption;
1020
+
1021
+ /**
1022
+ * @description When &#x60;change_option&#x60; is set to &#x60;specific_date&#x60;, then set the date/time at which the subscription change is to happen or has happened. &#x60;changes_scheduled_at&#x60; can be set to a value in the past. This is called backdating the subscription change and is performed when the subscription change has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:
1023
+
1024
+ * Backdating must be enabled for subscription change operations.
1025
+ * Only the following changes can be backdated:
1026
+ * Changes in the recurring items or their prices.
1027
+ * Addition of non-recurring items.
1028
+ * Subscription &#x60;status&#x60; is &#x60;active&#x60;, &#x60;cancelled&#x60;, or &#x60;non_renewing&#x60;.
1029
+ * 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.
1030
+ * The date is on or after &#x60;current_term_start&#x60;.
1031
+ * The date is on or after the last date/time any of the following changes were made:
1032
+ * Changes in the recurring items or their prices.
1033
+ * Addition of non-recurring items.
1034
+ * 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.
1035
+ .
1036
+
1037
+ */
1038
+
193
1039
  changes_scheduled_at?:number;
1040
+
1041
+ /**
1042
+ * @description Applicable for &#x27;Active&#x27; \&amp; &#x27;Non Renewing&#x27; states alone. Generally, subscription&#x27;s term will be reset (i.e current term is ended and a new term starts immediately) when a new plan having different billing frequency is specified in the input. For all the other cases, the subscription&#x27;s term will remain intact. Now for this later scenario, if you want to force a term reset you can specify this param as &#x27;true&#x27;.
1043
+ **Note**: Specifying this value as &#x27;false&#x27; has no impact on the default behaviour.
1044
+
1045
+ */
1046
+
194
1047
  force_term_reset?:boolean;
1048
+
1049
+ /**
1050
+ * @description Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data.
1051
+
1052
+ */
1053
+
195
1054
  reactivate?:boolean;
1055
+
1056
+ /**
1057
+ * @description Parameters for subscription
1058
+
1059
+ */
1060
+
196
1061
  subscription?:{auto_collection?:AutoCollection,contract_term_billing_cycle_on_renewal?:number,offline_payment_method?:OfflinePaymentMethod,start_date?:number,trial_end?:number};
1062
+
1063
+ /**
1064
+ * @description Parameters for billing_address
1065
+
1066
+ */
1067
+
197
1068
  billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
1069
+
1070
+ /**
1071
+ * @description Parameters for shipping_address
1072
+
1073
+ */
1074
+
198
1075
  shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
1076
+
1077
+ /**
1078
+ * @description Parameters for customer
1079
+
1080
+ */
1081
+
199
1082
  customer?:{registered_for_gst?:boolean,vat_number?:string,vat_number_prefix?:string};
1083
+
1084
+ /**
1085
+ * @description Parameters for contract_term
1086
+
1087
+ */
1088
+
200
1089
  contract_term?:{action_at_term_end?:'cancel' | 'renew_once' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
1090
+
1091
+ /**
1092
+ * @description Parameters for subscription_items
1093
+
1094
+ */
1095
+
201
1096
  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}[];
1097
+
1098
+ /**
1099
+ * @description Parameters for discounts
1100
+
1101
+ */
1102
+
202
1103
  discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
1104
+
1105
+ /**
1106
+ * @description Parameters for item_tiers
1107
+
1108
+ */
1109
+
203
1110
  item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
204
1111
  }
205
- export interface ListResponse {
206
- list:{quote:Quote,quoted_subscription?:QuotedSubscription}[];
207
- next_offset?:string;
1112
+ export interface ListResponse {
1113
+ /**
1114
+ * @description List all quotes.
1115
+
1116
+ */
1117
+
1118
+ list:{quote:Quote,quoted_subscription?:QuotedSubscription}[];
1119
+
1120
+ /**
1121
+ * @description List all quotes.
1122
+
1123
+ */
1124
+
1125
+ next_offset?:string;
208
1126
  }
209
1127
  export interface ListInputParam {
210
- [key : string]: any;
1128
+ [key : string]: any;
1129
+ /**
1130
+ * @description The number of resources to be returned.
1131
+
1132
+ */
1133
+
211
1134
  limit?:number;
1135
+
1136
+ /**
1137
+ * @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \&#x60;offset\&#x60; to the value of \&#x60;next_offset\&#x60; obtained in the previous iteration of the API call.
1138
+
1139
+ */
1140
+
212
1141
  offset?:string;
1142
+
1143
+ /**
1144
+ * @description Indicates whether to include deleted objects in the list. The deleted objects have the attribute \&#x60;deleted\&#x60; as \&#x60;true\&#x60;.
1145
+
1146
+ */
1147
+
213
1148
  include_deleted?:boolean;
1149
+
1150
+ /**
1151
+ * @description The quote number. Acts as a identifier for quote and typically generated sequentially.
1152
+
1153
+ */
1154
+
214
1155
  id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
1156
+
1157
+ /**
1158
+ * @description The identifier of the customer this quote belongs to.
1159
+
1160
+ */
1161
+
215
1162
  customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
1163
+
1164
+ /**
1165
+ * @description To filter based on subscription_id.
1166
+ NOTE: Not to be used if *consolidated invoicing* feature is enabled.
1167
+
1168
+ */
1169
+
216
1170
  subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
1171
+
1172
+ /**
1173
+ * @description Current status of this quote.
1174
+
1175
+ */
1176
+
217
1177
  status?:{in?:string,is?:'declined' | 'invoiced' | 'accepted' | 'closed' | 'open',is_not?:'declined' | 'invoiced' | 'accepted' | 'closed' | 'open',not_in?:string};
1178
+
1179
+ /**
1180
+ * @description Creation date of the quote. Typically this is the date on which quote is generated.
1181
+
1182
+ */
1183
+
218
1184
  date?:{after?:string,before?:string,between?:string,on?:string};
1185
+
1186
+ /**
1187
+ * @description To filter based on updated at. This attribute will be present only if the resource has been updated after 2016-09-28.
1188
+
1189
+ */
1190
+
219
1191
  updated_at?:{after?:string,before?:string,between?:string,on?:string};
1192
+
1193
+ /**
1194
+ * @description List all quotes.
1195
+
1196
+ */
1197
+
220
1198
  sort_by?:{asc?:'date',desc?:'date'};
221
1199
  }
222
- export interface PdfResponse {
223
- download:Download;
1200
+ export interface PdfResponse {
1201
+ download:Download;
224
1202
  }
225
1203
  export interface PdfInputParam {
1204
+
1205
+ /**
1206
+ * @description When true, the quote PDF has summary of all charges on the quote. When false, the quote PDF has a detailed view of charges grouped by charge event. This parameter does not affect one-time quotes.
1207
+
1208
+ */
1209
+
226
1210
  consolidated_view?:boolean;
1211
+
1212
+ /**
1213
+ * @description Determines the pdf should be rendered as inline or attachment in the browser. \* attachment - PDF is rendered as attachment in the browser \* inline - PDF is rendered as inline in the browser
1214
+
1215
+ */
1216
+
227
1217
  disposition_type?:DispositionType;
228
1218
  }
229
- export interface ConvertResponse {
230
- quote:Quote;
231
- quoted_subscription?:QuotedSubscription;
232
- quoted_charge?:QuotedCharge;
233
- customer:Customer;
234
- subscription?:Subscription;
235
- invoice?:Invoice;
236
- credit_note?:CreditNote;
237
- unbilled_charges?:UnbilledCharge[];
1219
+ export interface ConvertResponse {
1220
+ quote:Quote;
1221
+
1222
+ quoted_subscription?:QuotedSubscription;
1223
+
1224
+ quoted_charge?:QuotedCharge;
1225
+
1226
+ customer:Customer;
1227
+
1228
+ subscription?:Subscription;
1229
+
1230
+ invoice?:Invoice;
1231
+
1232
+ credit_note?:CreditNote;
1233
+
1234
+ unbilled_charges?:UnbilledCharge[];
238
1235
  }
239
1236
  export interface ConvertInputParam {
1237
+
1238
+ /**
1239
+ * @description The document date displayed on the invoice PDF. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. When not provided, the value is the same as current date. Moreover, if the invoice is created as &#x60;pending&#x60;, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. &#x60;taxes&#x60; and &#x60;line_item_taxes&#x60; are computed based on the tax configuration as of &#x60;invoice_date&#x60;. When passing this parameter, the following prerequisites must be met:
1240
+
1241
+ * &#x60;invoice_date&#x60; must be in the past.
1242
+ * &#x60;invoice_date&#x60; is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.
1243
+ * The date is not earlier than &#x60;quoted_subscription.start_date&#x60; or &#x60;quoted_subscription.changes_scheduled_at&#x60; (whichever is applicable).
1244
+ * &#x60;invoice_immediately&#x60; must be &#x60;true&#x60;.
1245
+ .
1246
+
1247
+ */
1248
+
240
1249
  invoice_date?:number;
1250
+
1251
+ /**
1252
+ * @description This attribute is set to &#x60;true&#x60; automatically for the subscription when it has one or more &#x60;metered&#x60; items. However, when there are no &#x60;metered&#x60; items, you can pass this parameter as &#x60;true&#x60; to force all invoices (except the first) to be created as &#x60;pending&#x60;. This is useful in the following scenarios:
1253
+
1254
+ * When you manage metered billing at your end by calculating usage-based charges yourself and add them to the subscription as [one-time charges](https://www.chargebee.com/docs/2.0/charges.html).
1255
+ * When your workflow involves inspecting all charges before you close invoices.
1256
+
1257
+ **Note:**
1258
+
1259
+ * You must enable [Metered Billing](https://www.chargebee.com/docs/2.0/metered_billing.html) for this parameter to be acceptable.
1260
+ * To create the first invoice also as &#x60;pending&#x60;, pass &#x60;first_invoice_pending&#x60; as &#x60;true&#x60;.
1261
+ .
1262
+
1263
+ */
1264
+
241
1265
  create_pending_invoices?:boolean;
1266
+
1267
+ /**
1268
+ * @description Non-metered items are billed at the beginning of a billing cycle while metered items are billed at the end. Consequently, the first invoice of the subscription contains only the non-metered items.
1269
+
1270
+ By passing this parameter as &#x60;true&#x60;, you create the first invoice as &#x60;pending&#x60; allowing you to add the previous term&#x27;s metered charges to it before closing. This is useful when the subscription is moved to Chargebee from a different billing system. As applicable to all &#x60;pending&#x60; invoices, this invoice is also [closed automatically](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) or via an [API call](/docs/api/invoices?prod_cat_ver&#x3D;2#close_a_pending_invoice).
1271
+ **Note:**
1272
+
1273
+ This parameter is passed only when there are metered items in the subscription or when &#x60;create_pending_invoices&#x60; is &#x60;true&#x60;.
1274
+ .
1275
+
1276
+ */
1277
+
242
1278
  first_invoice_pending?:boolean;
1279
+
1280
+ /**
1281
+ * @description Parameters for subscription
1282
+
1283
+ */
1284
+
243
1285
  subscription?:{auto_close_invoices?:boolean,auto_collection?:AutoCollection,id?:string,po_number?:string};
244
1286
  }
245
- export interface CreateForChargeItemsAndChargesResponse {
246
- quote:Quote;
247
- quoted_charge?:QuotedCharge;
1287
+ export interface CreateForChargeItemsAndChargesResponse {
1288
+ quote:Quote;
1289
+
1290
+ quoted_charge?:QuotedCharge;
248
1291
  }
249
1292
  export interface CreateForChargeItemsAndChargesInputParam {
1293
+
1294
+ /**
1295
+ * @description The quote name will be used as the pdf name of the quote.
1296
+
1297
+ */
1298
+
250
1299
  name?:string;
1300
+
1301
+ /**
1302
+ * @description Identifier of the customer for which the quote needs to be created.
1303
+
1304
+ */
1305
+
251
1306
  customer_id:string;
1307
+
1308
+ /**
1309
+ * @description Purchase Order Number for this quote.
1310
+
1311
+ */
1312
+
252
1313
  po_number?:string;
1314
+
1315
+ /**
1316
+ * @description Notes specific to this quote that you want customers to see on the quote PDF.
1317
+
1318
+ */
1319
+
253
1320
  notes?:string;
1321
+
1322
+ /**
1323
+ * @description Quotes will be vaild till this date. After this quote will be marked as closed.
1324
+
1325
+ */
1326
+
254
1327
  expires_at?:number;
1328
+
1329
+ /**
1330
+ * @description The currency code (ISO 4217 format) of the quote.
1331
+
1332
+ */
1333
+
255
1334
  currency_code?:string;
1335
+
1336
+ /**
1337
+ * @description The &#x27;One Time&#x27; coupon to be applied.
1338
+
1339
+ */
1340
+
256
1341
  coupon?:string;
1342
+
1343
+ /**
1344
+ * @description List of Coupons to be added.
1345
+
1346
+ */
1347
+
257
1348
  coupon_ids?:string[];
1349
+
1350
+ /**
1351
+ * @description Parameters for shipping_address
1352
+
1353
+ */
1354
+
258
1355
  shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
1356
+
1357
+ /**
1358
+ * @description Parameters for item_prices
1359
+
1360
+ */
1361
+
259
1362
  item_prices?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
1363
+
1364
+ /**
1365
+ * @description Parameters for item_tiers
1366
+
1367
+ */
1368
+
260
1369
  item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
1370
+
1371
+ /**
1372
+ * @description Parameters for charges
1373
+
1374
+ */
1375
+
261
1376
  charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_transaction_type?:number,description?:string,service_period?:number}[];
1377
+
1378
+ /**
1379
+ * @description Parameters for discounts
1380
+
1381
+ */
1382
+
262
1383
  discounts?:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
263
1384
  }
264
- export interface DeleteResponse {
265
- quote:Quote;
266
- quoted_subscription?:QuotedSubscription;
267
- quoted_charge?:QuotedCharge;
1385
+ export interface DeleteResponse {
1386
+ quote:Quote;
1387
+
1388
+ quoted_subscription?:QuotedSubscription;
1389
+
1390
+ quoted_charge?:QuotedCharge;
268
1391
  }
269
1392
  export interface DeleteInputParam {
1393
+
1394
+ /**
1395
+ * @description Reason for deleting quote. This comment will be added to the subscription entity if the quote belongs to a subscription or added to the customer entity if the quote is associated only with a customer.
1396
+
1397
+ */
1398
+
270
1399
  comment?:string;
271
1400
  }
272
- export interface LineItem {
1401
+ export interface LineItem {
273
1402
  id?:string;
1403
+
274
1404
  subscription_id?:string;
1405
+
275
1406
  date_from?:number;
1407
+
276
1408
  date_to?:number;
1409
+
277
1410
  unit_amount?:number;
1411
+
278
1412
  quantity?:number;
1413
+
279
1414
  amount?:number;
1415
+
280
1416
  pricing_model?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep';
1417
+
281
1418
  is_taxed?:boolean;
1419
+
282
1420
  tax_amount?:number;
1421
+
283
1422
  tax_rate?:number;
1423
+
284
1424
  unit_amount_in_decimal?:string;
1425
+
285
1426
  quantity_in_decimal?:string;
1427
+
286
1428
  amount_in_decimal?:string;
1429
+
287
1430
  discount_amount?:number;
1431
+
288
1432
  item_level_discount_amount?:number;
1433
+
289
1434
  reference_line_item_id?:string;
1435
+
290
1436
  description?:string;
1437
+
291
1438
  entity_description?:string;
1439
+
292
1440
  entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
1441
+
293
1442
  tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
1443
+
294
1444
  entity_id?:string;
1445
+
295
1446
  customer_id?:string;
296
1447
  }
297
- export interface Discount {
1448
+ export interface Discount {
298
1449
  amount?:number;
1450
+
299
1451
  description?:string;
1452
+
300
1453
  line_item_id?:string;
1454
+
301
1455
  entity_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
1456
+
302
1457
  discount_type?:'fixed_amount' | 'percentage';
1458
+
303
1459
  entity_id?:string;
1460
+
304
1461
  coupon_set_code?:string;
305
1462
  }
306
- export interface LineItemDiscount {
1463
+ export interface LineItemDiscount {
307
1464
  line_item_id?:string;
1465
+
308
1466
  discount_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
1467
+
309
1468
  coupon_id?:string;
1469
+
310
1470
  entity_id?:string;
1471
+
311
1472
  discount_amount?:number;
312
1473
  }
313
- export interface Tax {
1474
+ export interface Tax {
314
1475
  name?:string;
1476
+
315
1477
  amount?:number;
1478
+
316
1479
  description?:string;
317
1480
  }
318
- export interface LineItemTax {
1481
+ export interface LineItemTax {
319
1482
  line_item_id?:string;
1483
+
320
1484
  tax_name?:string;
1485
+
321
1486
  tax_rate?:number;
1487
+
322
1488
  is_partial_tax_applied?:boolean;
1489
+
323
1490
  is_non_compliance_tax?:boolean;
1491
+
324
1492
  taxable_amount?:number;
1493
+
325
1494
  tax_amount?:number;
1495
+
326
1496
  tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
1497
+
327
1498
  tax_juris_name?:string;
1499
+
328
1500
  tax_juris_code?:string;
1501
+
329
1502
  tax_amount_in_local_currency?:number;
1503
+
330
1504
  local_currency_code?:string;
331
1505
  }
332
- export interface LineItemTier {
1506
+ export interface LineItemTier {
333
1507
  line_item_id?:string;
1508
+
334
1509
  starting_unit?:number;
1510
+
335
1511
  ending_unit?:number;
1512
+
336
1513
  quantity_used?:number;
1514
+
337
1515
  unit_amount?:number;
1516
+
338
1517
  starting_unit_in_decimal?:string;
1518
+
339
1519
  ending_unit_in_decimal?:string;
1520
+
340
1521
  quantity_used_in_decimal?:string;
1522
+
341
1523
  unit_amount_in_decimal?:string;
342
1524
  }
343
- export interface ShippingAddress {
1525
+ export interface ShippingAddress {
1526
+ /**
1527
+ * @description The first name of the contact.
1528
+
1529
+ */
1530
+
344
1531
  first_name?:string;
1532
+
1533
+ /**
1534
+ * @description The last name of the contact.
1535
+
1536
+ */
1537
+
345
1538
  last_name?:string;
1539
+
1540
+ /**
1541
+ * @description The email address.
1542
+
1543
+ */
1544
+
346
1545
  email?:string;
1546
+
1547
+ /**
1548
+ * @description The company name.
1549
+
1550
+ */
1551
+
347
1552
  company?:string;
1553
+
1554
+ /**
1555
+ * @description The phone number.
1556
+
1557
+ */
1558
+
348
1559
  phone?:string;
1560
+
1561
+ /**
1562
+ * @description Address line 1
1563
+
1564
+ */
1565
+
349
1566
  line1?:string;
1567
+
1568
+ /**
1569
+ * @description Address line 2
1570
+
1571
+ */
1572
+
350
1573
  line2?:string;
1574
+
1575
+ /**
1576
+ * @description Address line 3
1577
+
1578
+ */
1579
+
351
1580
  line3?:string;
1581
+
1582
+ /**
1583
+ * @description The name of the city.
1584
+
1585
+ */
1586
+
352
1587
  city?:string;
1588
+
1589
+ /**
1590
+ * @description The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set &#x60;state_code&#x60; as &#x60;AZ&#x60; (not &#x60;US-AZ&#x60;). For Tamil Nadu (India), set as &#x60;TN&#x60; (not &#x60;IN-TN&#x60;). For British Columbia (Canada), set as &#x60;BC&#x60; (not &#x60;CA-BC&#x60;).
1591
+
1592
+ */
1593
+
353
1594
  state_code?:string;
1595
+
1596
+ /**
1597
+ * @description The state/province name.
1598
+
1599
+ */
1600
+
354
1601
  state?:string;
1602
+
1603
+ /**
1604
+ * @description The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).
1605
+
1606
+ **Note** : If you enter an invalid country code, the system will return an error.
1607
+
1608
+ **Brexit**
1609
+
1610
+
1611
+ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then &#x60;XI&#x60; (the code for **United Kingdom -- Northern Ireland**) is available as an option.
1612
+
1613
+ */
1614
+
355
1615
  country?:string;
1616
+
1617
+ /**
1618
+ * @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
1619
+
1620
+ */
1621
+
356
1622
  zip?:string;
1623
+
1624
+ /**
1625
+ * @description The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully.
1626
+
1627
+ */
1628
+
357
1629
  validation_status?:ValidationStatus;
1630
+
1631
+ /**
1632
+ * @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.
1633
+
1634
+ */
1635
+
358
1636
  index?:number;
359
1637
  }
360
- export interface BillingAddress {
1638
+ export interface BillingAddress {
1639
+ /**
1640
+ * @description The first name of the billing contact.
1641
+
1642
+ */
1643
+
361
1644
  first_name?:string;
1645
+
1646
+ /**
1647
+ * @description The last name of the billing contact.
1648
+
1649
+ */
1650
+
362
1651
  last_name?:string;
1652
+
1653
+ /**
1654
+ * @description The email address.
1655
+
1656
+ */
1657
+
363
1658
  email?:string;
1659
+
1660
+ /**
1661
+ * @description The company name.
1662
+
1663
+ */
1664
+
364
1665
  company?:string;
1666
+
1667
+ /**
1668
+ * @description The phone number.
1669
+
1670
+ */
1671
+
365
1672
  phone?:string;
1673
+
1674
+ /**
1675
+ * @description Address line 1
1676
+
1677
+ */
1678
+
366
1679
  line1?:string;
1680
+
1681
+ /**
1682
+ * @description Address line 2
1683
+
1684
+ */
1685
+
367
1686
  line2?:string;
1687
+
1688
+ /**
1689
+ * @description Address line 3
1690
+
1691
+ */
1692
+
368
1693
  line3?:string;
1694
+
1695
+ /**
1696
+ * @description The name of the city.
1697
+
1698
+ */
1699
+
369
1700
  city?:string;
1701
+
1702
+ /**
1703
+ * @description The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set &#x60;state_code&#x60; as &#x60;AZ&#x60; (not &#x60;US-AZ&#x60;). For Tamil Nadu (India), set as &#x60;TN&#x60; (not &#x60;IN-TN&#x60;). For British Columbia (Canada), set as &#x60;BC&#x60; (not &#x60;CA-BC&#x60;).
1704
+
1705
+ */
1706
+
370
1707
  state_code?:string;
1708
+
1709
+ /**
1710
+ * @description State or Province
1711
+
1712
+ */
1713
+
371
1714
  state?:string;
1715
+
1716
+ /**
1717
+ * @description The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).
1718
+
1719
+ **Note** : If you enter an invalid country code, the system will return an error.
1720
+
1721
+ **Brexit**
1722
+
1723
+
1724
+ If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then &#x60;XI&#x60; (the code for **United Kingdom -- Northern Ireland**) is available as an option.
1725
+
1726
+ */
1727
+
372
1728
  country?:string;
1729
+
1730
+ /**
1731
+ * @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
1732
+
1733
+ */
1734
+
373
1735
  zip?:string;
1736
+
1737
+ /**
1738
+ * @description The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated.
1739
+
1740
+ */
1741
+
374
1742
  validation_status?:ValidationStatus;
375
1743
  }
376
1744
  }