chargebee 2.26.0 → 2.26.1

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 (64) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/lib/chargebee.js +1 -1
  3. package/package.json +1 -1
  4. package/types/core.d.ts +1 -0
  5. package/types/resources/Address.d.ts +245 -5
  6. package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
  7. package/types/resources/AttachedItem.d.ts +305 -13
  8. package/types/resources/Card.d.ts +485 -13
  9. package/types/resources/Comment.d.ts +177 -11
  10. package/types/resources/Contact.d.ts +54 -0
  11. package/types/resources/ContractTerm.d.ts +83 -0
  12. package/types/resources/Coupon.d.ts +665 -20
  13. package/types/resources/CouponCode.d.ts +56 -5
  14. package/types/resources/CouponSet.d.ts +224 -17
  15. package/types/resources/CreditNote.d.ts +1202 -44
  16. package/types/resources/CreditNoteEstimate.d.ts +75 -6
  17. package/types/resources/Customer.d.ts +2132 -73
  18. package/types/resources/DifferentialPrice.d.ts +266 -15
  19. package/types/resources/Discount.d.ts +107 -0
  20. package/types/resources/Download.d.ts +18 -0
  21. package/types/resources/EntitlementOverride.d.ts +101 -7
  22. package/types/resources/Estimate.d.ts +1181 -27
  23. package/types/resources/Event.d.ts +145 -8
  24. package/types/resources/Export.d.ts +703 -32
  25. package/types/resources/Feature.d.ts +356 -22
  26. package/types/resources/Gift.d.ts +351 -24
  27. package/types/resources/Hierarchy.d.ts +30 -0
  28. package/types/resources/HostedPage.d.ts +1212 -37
  29. package/types/resources/ImpactedItem.d.ts +41 -1
  30. package/types/resources/ImpactedSubscription.d.ts +36 -1
  31. package/types/resources/InAppSubscription.d.ts +636 -9
  32. package/types/resources/Invoice.d.ts +2293 -93
  33. package/types/resources/InvoiceEstimate.d.ts +75 -6
  34. package/types/resources/Item.d.ts +542 -16
  35. package/types/resources/ItemEntitlement.d.ts +172 -13
  36. package/types/resources/ItemFamily.d.ts +173 -15
  37. package/types/resources/ItemPrice.d.ts +971 -26
  38. package/types/resources/Media.d.ts +24 -0
  39. package/types/resources/NonSubscription.d.ts +51 -3
  40. package/types/resources/Order.d.ts +1224 -32
  41. package/types/resources/PaymentIntent.d.ts +318 -8
  42. package/types/resources/PaymentReferenceNumber.d.ts +24 -0
  43. package/types/resources/PaymentSource.d.ts +1259 -55
  44. package/types/resources/PaymentVoucher.d.ts +262 -14
  45. package/types/resources/PortalSession.d.ts +187 -10
  46. package/types/resources/PromotionalCredit.d.ts +351 -16
  47. package/types/resources/Purchase.d.ts +274 -5
  48. package/types/resources/Quote.d.ts +1595 -62
  49. package/types/resources/QuoteLineGroup.d.ts +134 -5
  50. package/types/resources/QuotedCharge.d.ts +63 -5
  51. package/types/resources/QuotedSubscription.d.ts +192 -5
  52. package/types/resources/ResourceMigration.d.ts +73 -3
  53. package/types/resources/SiteMigrationDetail.d.ts +98 -5
  54. package/types/resources/Subscription.d.ts +3462 -137
  55. package/types/resources/SubscriptionEntitlement.d.ts +116 -8
  56. package/types/resources/SubscriptionEstimate.d.ts +36 -2
  57. package/types/resources/TaxWithheld.d.ts +32 -0
  58. package/types/resources/ThirdPartyPaymentMethod.d.ts +24 -0
  59. package/types/resources/TimeMachine.d.ts +99 -7
  60. package/types/resources/Token.d.ts +179 -7
  61. package/types/resources/Transaction.d.ts +597 -25
  62. package/types/resources/UnbilledCharge.d.ts +355 -14
  63. package/types/resources/Usage.d.ts +259 -13
  64. package/types/resources/VirtualBankAccount.d.ts +255 -17
@@ -1,87 +1,428 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  declare module 'chargebee' {
3
3
  export interface UnbilledCharge {
4
+
5
+ /**
6
+ * @description Uniquely identifies an unbilled charge.
7
+
8
+ */
9
+
4
10
  id?:string;
11
+
12
+ /**
13
+ * @description A unique identifier for the customer being charged.
14
+
15
+ */
16
+
5
17
  customer_id?:string;
18
+
19
+ /**
20
+ * @description A unique identifier for the subscription this charge belongs to.
21
+
22
+ */
23
+
6
24
  subscription_id?:string;
25
+
26
+ /**
27
+ * @description Start date of this charge.
28
+
29
+ */
30
+
7
31
  date_from?:number;
32
+
33
+ /**
34
+ * @description End date of this charge.
35
+
36
+ */
37
+
8
38
  date_to?:number;
39
+
40
+ /**
41
+ * @description Unit amount of the charge item.
42
+
43
+ */
44
+
9
45
  unit_amount?:number;
46
+
47
+ /**
48
+ * @description The pricing scheme for this line item. \* 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. \* per_unit - A fixed price per unit quantity. \* flat_fee - A fixed price that is not quantity-based. \* stairstep - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.
49
+
50
+ */
51
+
10
52
  pricing_model?:PricingModel;
53
+
54
+ /**
55
+ * @description Quantity of the item which is represented by this charge.
56
+
57
+ */
58
+
11
59
  quantity?:number;
60
+
61
+ /**
62
+ * @description Total amount of this charge. Typically equals to unit amount x quantity.
63
+
64
+ */
65
+
12
66
  amount?:number;
67
+
68
+ /**
69
+ * @description The currency code (ISO 4217 format) for the charge.
70
+
71
+ */
72
+
13
73
  currency_code:string;
74
+
75
+ /**
76
+ * @description Total discounts for this charge.
77
+
78
+ */
79
+
14
80
  discount_amount?:number;
81
+
82
+ /**
83
+ * @description Detailed description about this charge.
84
+
85
+ */
86
+
15
87
  description?:string;
88
+
89
+ /**
90
+ * @description Specifies the modelled entity this line item is based on. \* 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 \* charge_item_price - Indicates that this line item is based on charge Item Price \* 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 \* addon_item_price - Indicates that this line item is based on addon Item Price \* plan_item_price - Indicates that this line item is based on plan 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 \* 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
91
+
92
+ */
93
+
16
94
  entity_type:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
95
+
96
+ /**
97
+ * @description The identifier of the modelled entity this charge is based on. Will be null for &#x27;adhoc&#x27; entity type.
98
+
99
+ */
100
+
17
101
  entity_id?:string;
102
+
103
+ /**
104
+ * @description Will be true if the charge has been voided. Usually the unbilled charge will be voided and revised to different charges(s) during proration.
105
+
106
+ */
107
+
18
108
  is_voided:boolean;
109
+
110
+ /**
111
+ * @description Timestamp indicating the date and time this charge got voided.
112
+
113
+ */
114
+
19
115
  voided_at?:number;
116
+
117
+ /**
118
+ * @description The decimal representation of the unit amount for the entity. The value is in major units of the currency. Returned when the entity is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
119
+
120
+ */
121
+
20
122
  unit_amount_in_decimal?:string;
123
+
124
+ /**
125
+ * @description The decimal representation of the quantity of this entity. Returned when the entity is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
126
+
127
+ */
128
+
21
129
  quantity_in_decimal?:string;
130
+
131
+ /**
132
+ * @description The decimal representation of the amount for the charge, 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.
133
+
134
+ */
135
+
22
136
  amount_in_decimal?:string;
137
+
138
+ /**
139
+ * @description Timestamp indicating when the unbilled charge was last updated
140
+
141
+ */
142
+
23
143
  updated_at:number;
144
+
24
145
  is_advance_charge?:boolean;
146
+
147
+ /**
148
+ * @description Indicates that this resource has been deleted.
149
+
150
+ */
151
+
25
152
  deleted:boolean;
153
+
154
+ /**
155
+ * @description The list of tiers applicable for this line item
156
+
157
+ */
158
+
26
159
  tiers?:UnbilledCharge.LineItemTier[];
27
160
  }
28
161
  export namespace UnbilledCharge {
29
- export class UnbilledChargeResource {
162
+ export class UnbilledChargeResource {
163
+ /**
164
+ * @description Use this API to delete an unbilled charge by specifying the id of the charge.
165
+
166
+ */
167
+
30
168
  delete(unbilled_charge_id:string):ChargebeeRequest<DeleteResponse>;
169
+
170
+ /**
171
+ * @description This is similar to the &quot;Create an invoice for unbilled charges&quot; API but no invoice will be created, only an estimate for this operation is created.
172
+
173
+ In the estimate response,
174
+
175
+ * **estimate.invoice_estimates** is an array of **estimate.invoice_estimate**. This has the details of the invoices that will be generated now.
176
+
177
+ **Note:**
178
+
179
+ * This API when invoked does not perform the actual operation. It just generates an estimate.
180
+ * Both *subscription_id* and *customer_id* parameters should not be given at the same time.
181
+
182
+
183
+
184
+
185
+ */
186
+
31
187
  invoice_now_estimate(input?:InvoiceNowEstimateInputParam):ChargebeeRequest<InvoiceNowEstimateResponse>;
188
+
189
+ /**
190
+ * @description Use this API to bill the [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html). Available Credits and Excess Payments will automatically be applied while creating the invoice.
191
+
192
+ If the *Auto Collection* is turned on for the particular customer, the invoice will be created in payment_due state and the payment collection will be scheduled immediately.
193
+
194
+ During invoice creation, the PO number for the line items will be filled from the subscription&#x27;s current PO number, if available.
195
+
196
+ If no recurring item is present in the created invoice, the invoice will be marked as recurring&#x3D;false.
197
+
198
+ If consolidated invoicing is enabled and the parameter &#x27;customer_id&#x27; is passed, multiple invoices can be created based on the following factors.
199
+
200
+ * Currency
201
+ * PO number if &#x27;Group by PO number&#x27; is enabled
202
+ * Shipping address
203
+ * Auto Collection
204
+ * Payment method
205
+
206
+ */
207
+
32
208
  invoice_unbilled_charges(input?:InvoiceUnbilledChargesInputParam):ChargebeeRequest<InvoiceUnbilledChargesResponse>;
209
+
210
+ /**
211
+ * @description This endpoint lists all the unbilled charges.
212
+
213
+ */
214
+
33
215
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
216
+
217
+ /**
218
+ * @description This endpoint creates unbilled charges for a subscription.
219
+
220
+ */
221
+
34
222
  create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
35
223
  }
36
- export interface DeleteResponse {
37
- unbilled_charge:UnbilledCharge;
224
+ export interface DeleteResponse {
225
+ /**
226
+ * @description Use this API to delete an unbilled charge by specifying the id of the charge.
227
+
228
+ */
229
+
230
+ unbilled_charge:UnbilledCharge;
38
231
  }
39
232
 
40
- export interface InvoiceNowEstimateResponse {
41
- estimate:Estimate;
233
+ export interface InvoiceNowEstimateResponse {
234
+ /**
235
+ * @description This is similar to the &quot;Create an invoice for unbilled charges&quot; API but no invoice will be created, only an estimate for this operation is created.
236
+
237
+ In the estimate response,
238
+
239
+ * **estimate.invoice_estimates** is an array of **estimate.invoice_estimate**. This has the details of the invoices that will be generated now.
240
+
241
+ **Note:**
242
+
243
+ * This API when invoked does not perform the actual operation. It just generates an estimate.
244
+ * Both *subscription_id* and *customer_id* parameters should not be given at the same time.
245
+
246
+
247
+
248
+
249
+ */
250
+
251
+ estimate:Estimate;
42
252
  }
43
253
  export interface InvoiceNowEstimateInputParam {
254
+
255
+ /**
256
+ * @description Identifier of the subscription for which this estimate needs to be created. Should be given if &#x27;customer_id&#x27; is not specified.
257
+
258
+ */
259
+
44
260
  subscription_id?:string;
261
+
262
+ /**
263
+ * @description Identifier of the customer for whom this estimate is created. Is given if &#x27;subscription_id&#x27; is not specified. Applicable only if the &#x27;Consolidated Invoicing&#x27; is enabled. If &#x27;Consolidated Invoicing&#x27; is not enabled, an invoice will be generated for every subscription.
264
+
265
+ */
266
+
45
267
  customer_id?:string;
46
268
  }
47
- export interface InvoiceUnbilledChargesResponse {
48
- invoices:Invoice[];
269
+ export interface InvoiceUnbilledChargesResponse {
270
+ /**
271
+ * @description Use this API to bill the [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html). Available Credits and Excess Payments will automatically be applied while creating the invoice.
272
+
273
+ If the *Auto Collection* is turned on for the particular customer, the invoice will be created in payment_due state and the payment collection will be scheduled immediately.
274
+
275
+ During invoice creation, the PO number for the line items will be filled from the subscription&#x27;s current PO number, if available.
276
+
277
+ If no recurring item is present in the created invoice, the invoice will be marked as recurring&#x3D;false.
278
+
279
+ If consolidated invoicing is enabled and the parameter &#x27;customer_id&#x27; is passed, multiple invoices can be created based on the following factors.
280
+
281
+ * Currency
282
+ * PO number if &#x27;Group by PO number&#x27; is enabled
283
+ * Shipping address
284
+ * Auto Collection
285
+ * Payment method
286
+
287
+ */
288
+
289
+ invoices:Invoice[];
49
290
  }
50
291
  export interface InvoiceUnbilledChargesInputParam {
292
+
293
+ /**
294
+ * @description Identifier of the subscription for which this invoice needs to be created. Should be specified if &#x27;customer_id&#x27; is not specified.
295
+
296
+ */
297
+
51
298
  subscription_id?:string;
299
+
300
+ /**
301
+ * @description Identifier of the customer for whom this invoice needs to be created. Should be specified if &#x27;subscription_id&#x27; is not specified. Applicable only if the consolidated invoicing is enabled. .
302
+
303
+ */
304
+
52
305
  customer_id?:string;
53
306
  }
54
- export interface ListResponse {
55
- list:{unbilled_charge:UnbilledCharge}[];
56
- next_offset?:string;
307
+ export interface ListResponse {
308
+ /**
309
+ * @description This endpoint lists all the unbilled charges.
310
+
311
+ */
312
+
313
+ list:{unbilled_charge:UnbilledCharge}[];
314
+
315
+ /**
316
+ * @description This endpoint lists all the unbilled charges.
317
+
318
+ */
319
+
320
+ next_offset?:string;
57
321
  }
58
322
  export interface ListInputParam {
59
- [key : string]: any;
323
+ [key : string]: any;
324
+ /**
325
+ * @description The number of resources to be returned.
326
+
327
+ */
328
+
60
329
  limit?:number;
330
+
331
+ /**
332
+ * @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.
333
+
334
+ */
335
+
61
336
  offset?:string;
337
+
338
+ /**
339
+ * @description Indicates whether to include deleted objects in the list. The deleted objects have the attribute \&#x60;deleted\&#x60; as \&#x60;true\&#x60;.
340
+
341
+ */
342
+
62
343
  include_deleted?:boolean;
344
+
345
+ /**
346
+ * @description This endpoint lists all the unbilled charges.
347
+
348
+ */
349
+
63
350
  is_voided?:boolean;
351
+
352
+ /**
353
+ * @description A unique identifier for the subscription this charge belongs to.
354
+
355
+ */
356
+
64
357
  subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
358
+
359
+ /**
360
+ * @description A unique identifier for the customer being charged.
361
+
362
+ */
363
+
65
364
  customer_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
66
365
  }
67
- export interface CreateResponse {
68
- unbilled_charges:UnbilledCharge[];
366
+ export interface CreateResponse {
367
+ /**
368
+ * @description This endpoint creates unbilled charges for a subscription.
369
+
370
+ */
371
+
372
+ unbilled_charges:UnbilledCharge[];
69
373
  }
70
374
  export interface CreateInputParam {
375
+
376
+ /**
377
+ * @description Identifier of the subscription for which this unbilled charges needs to be created.
378
+
379
+ */
380
+
71
381
  subscription_id:string;
382
+
383
+ /**
384
+ * @description The currency code (ISO 4217 format) of the unbilled_charge.
385
+
386
+ */
387
+
72
388
  currency_code?:string;
389
+
390
+ /**
391
+ * @description Parameters for item_prices
392
+
393
+ */
394
+
73
395
  item_prices?:{date_from?:number,date_to?:number,item_price_id?:string,quantity?:number,quantity_in_decimal?:string,unit_price?:number,unit_price_in_decimal?:string}[];
396
+
397
+ /**
398
+ * @description Parameters for item_tiers
399
+
400
+ */
401
+
74
402
  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}[];
403
+
404
+ /**
405
+ * @description Parameters for charges
406
+
407
+ */
408
+
75
409
  charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_tax_code?:string,avalara_transaction_type?:number,date_from?:number,date_to?:number,description?:string,hsn_code?:string,tax_profile_id?:string,taxable?:boolean,taxjar_product_code?:string}[];
76
410
  }
77
- export interface LineItemTier {
411
+ export interface LineItemTier {
78
412
  starting_unit?:number;
413
+
79
414
  ending_unit?:number;
415
+
80
416
  quantity_used?:number;
417
+
81
418
  unit_amount?:number;
419
+
82
420
  starting_unit_in_decimal?:string;
421
+
83
422
  ending_unit_in_decimal?:string;
423
+
84
424
  quantity_used_in_decimal?:string;
425
+
85
426
  unit_amount_in_decimal?:string;
86
427
  }
87
428
  }