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,78 +1,370 @@
1
1
  ///<reference path='./../core.d.ts'/>
2
2
  declare module 'chargebee' {
3
3
  export interface AttachedItem {
4
+
5
+ /**
6
+ * @description The unique id for the attached item. Set to a random, immutable value automatically when the attached item is created.
7
+
8
+ */
9
+
4
10
  id:string;
11
+
12
+ /**
13
+ * @description The id of the plan-item to which the item is attached.
14
+
15
+ */
16
+
5
17
  parent_item_id:string;
18
+
19
+ /**
20
+ * @description The id of the item being attached.
21
+
22
+ */
23
+
6
24
  item_id:string;
25
+
26
+ /**
27
+ * @description The type of attachment for the addon. Only applicable for addon-items. \* recommended - The addon is recommended to go with the plan-item when using [Checkout](https://www.chargebee.com/docs/2.0/configure-inapp.html#fundamental-settings_recommending-addons-in-checkout) or [Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). \* optional - The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a &#x60;quantity&#x60; and &#x60;billing_cycles&#x60; for the addon, for when it is applied to subscriptions with the plan. \* mandatory - The addon is attached automatically to the subscription for the plan-item unless [explicitly removed](./subscriptions?prod_cat_ver&#x3D;2) via API.
28
+
29
+ */
30
+
7
31
  type:'optional' | 'mandatory' | 'recommended';
32
+
33
+ /**
34
+ * @description The item state. \* active - New subscriptions can be created with the item. \* deleted - No subscriptions allowed for the item. \* archived - No new subscriptions allowed for the item.
35
+
36
+ */
37
+
8
38
  status?:'archived' | 'deleted' | 'active';
39
+
40
+ /**
41
+ * @description The default quantity of the addon to be attached when the quantity is not specified while [creating](subscriptions?prod_cat_ver&#x3D;2#create_subscription_for_items)/[updating](subscriptions?prod_cat_ver&#x3D;2#update_subscription_for_items) the subscription.
42
+
43
+ */
44
+
9
45
  quantity?:number;
46
+
47
+ /**
48
+ * @description The decimal representation of the quantity of the addon. Returned for quantity-based addons when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
49
+
50
+ */
51
+
10
52
  quantity_in_decimal?:string;
53
+
54
+ /**
55
+ * @description The number of subscription billing cycles for which this item is attached when applied to a subscription. Applicable only for items of type addon. Requires [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html) to be enabled for the site.
56
+ The value set explicitly for &#x60;billing_cycles&#x60; while [applying the addon to a subscription](./subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items) takes precedence over this attribute. This attribute, in turn, has a higher precedence than [the value set for the addon-item price](./item_prices?prod_cat_ver&#x3D;2).
57
+
58
+ */
59
+
11
60
  billing_cycles?:number;
61
+
62
+ /**
63
+ * @description Indicates when the item is charged. This attribute only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver&#x3D;2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_creation - the time of creation of the subscription. \* subscription_trial_start - the time when the trial period of the subscription begins. \* on_demand - Item can be charged on demand \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an &#x60;active&#x60; or &#x60;non-renewing&#x60; state. Also includes reactivations of canceled subscriptions.
64
+
65
+ */
66
+
12
67
  charge_on_event:ChargeOnEvent;
68
+
69
+ /**
70
+ * @description Indicates if the charge-item is to be charged only once or each time the &#x60;charge_on_event&#x60; occurs. This attribute only applies to charge-items.
71
+
72
+ */
73
+
13
74
  charge_once:boolean;
75
+
76
+ /**
77
+ * @description The time at which this attached item was created.
78
+
79
+ */
80
+
14
81
  created_at:number;
82
+
83
+ /**
84
+ * @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.
85
+
86
+ */
87
+
15
88
  resource_version?:number;
89
+
90
+ /**
91
+ * @description The time at which this attached item was last updated.
92
+
93
+ */
94
+
16
95
  updated_at?:number;
96
+
97
+ /**
98
+ * @description The subscription channel this object originated from and is maintained in. \* web - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI. \* app_store - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed. \* play_store - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed.
99
+
100
+ */
101
+
17
102
  channel?:Channel;
18
103
  }
19
104
  export namespace AttachedItem {
20
- export class AttachedItemResource {
105
+ export class AttachedItemResource {
106
+ /**
107
+ * @description Retrieves details of an attached addon or a charge item.
108
+
109
+ */
110
+
21
111
  retrieve(attached_item_id:string, input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
112
+
113
+ /**
114
+ * @description Updates an attached addon or a charge item for a plan.
115
+
116
+ */
117
+
22
118
  update(attached_item_id:string, input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
119
+
120
+ /**
121
+ * @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
122
+
123
+ */
124
+
23
125
  list(item_id:string, input?:ListInputParam):ChargebeeRequest<ListResponse>;
126
+
127
+ /**
128
+ * @description Creates an attached addon or a charge item for a plan.
129
+
130
+ */
131
+
24
132
  create(item_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
133
+
134
+ /**
135
+ * @description Deletes an attached addon or a charge item.
136
+
137
+ */
138
+
25
139
  delete(attached_item_id:string, input:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
26
140
  }
27
- export interface RetrieveResponse {
28
- attached_item:AttachedItem;
141
+ export interface RetrieveResponse {
142
+ /**
143
+ * @description Retrieves details of an attached addon or a charge item.
144
+
145
+ */
146
+
147
+ attached_item:AttachedItem;
29
148
  }
30
149
  export interface RetrieveInputParam {
150
+
151
+ /**
152
+ * @description Retrieves details of an attached addon or a charge item.
153
+
154
+ */
155
+
31
156
  parent_item_id:string;
32
157
  }
33
- export interface UpdateResponse {
34
- attached_item:AttachedItem;
158
+ export interface UpdateResponse {
159
+ /**
160
+ * @description Updates an attached addon or a charge item for a plan.
161
+
162
+ */
163
+
164
+ attached_item:AttachedItem;
35
165
  }
36
166
  export interface UpdateInputParam {
167
+
168
+ /**
169
+ * @description The id of the parent item in the attachment relationship.
170
+
171
+ */
172
+
37
173
  parent_item_id:string;
174
+
175
+ /**
176
+ * @description The type of attachment for the addon. Only applicable for addon-items and is a required parameter as well for addon-items. \* recommended - The addon is recommended to go with the plan-item when using [Checkout](https://www.chargebee.com/docs/2.0/configure-inapp.html#fundamental-settings_recommending-addons-in-checkout) or [Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). \* optional - The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a &#x60;quantity&#x60; and &#x60;billing_cycles&#x60; for the addon, for when it is applied to subscriptions with the plan. \* mandatory - The addon is attached automatically to the subscription for the plan-item unless [explicitly removed](./subscriptions?prod_cat_ver&#x3D;2) via API.
177
+
178
+ */
179
+
38
180
  type?:'optional' | 'mandatory' | 'recommended';
181
+
182
+ /**
183
+ * @description The number of subscription billing cycles for which this item is attached when applied to a subscription. Applicable only for items of type addon. Requires [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html) to be enabled for the site.
184
+
185
+ The value set explicitly for &#x60;billing_cycles&#x60; while [applying the addon to a subscription](./subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items) takes precedence over this parameter. This parameter, in turn, has a higher precedence than [the value set for the addon-item price](./item_prices?prod_cat_ver&#x3D;2).
186
+
187
+ */
188
+
39
189
  billing_cycles?:number;
190
+
191
+ /**
192
+ * @description The default quantity of the addon to be attached when the quantity is not specified while [creating](subscriptions?prod_cat_ver&#x3D;2#create_subscription_for_items)/[updating](subscriptions?prod_cat_ver&#x3D;2#update_subscription_for_items) the subscription.
193
+
194
+ */
195
+
40
196
  quantity?:number;
197
+
198
+ /**
199
+ * @description The decimal representation of the quantity of the addon. Returned for quantity-based addons when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
200
+
201
+ */
202
+
41
203
  quantity_in_decimal?:string;
204
+
205
+ /**
206
+ * @description Indicates when the item is charged. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver&#x3D;2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_creation - the time of creation of the subscription. \* subscription_trial_start - the time when the trial period of the subscription begins. \* on_demand - Item can be charged on demand \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an &#x60;active&#x60; or &#x60;non-renewing&#x60; state. Also includes reactivations of canceled subscriptions.
207
+
208
+ */
209
+
42
210
  charge_on_event?:ChargeOnEvent;
211
+
212
+ /**
213
+ * @description Indicates if the charge-item is to be charged only once or each time the &#x60;charge_on_event&#x60; occurs. This parameter only applies to charge-items.
214
+
215
+ */
216
+
43
217
  charge_once?:boolean;
44
218
  }
45
- export interface ListResponse {
46
- list:{attached_item:AttachedItem}[];
47
- next_offset?:string;
219
+ export interface ListResponse {
220
+ /**
221
+ * @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
222
+
223
+ */
224
+
225
+ list:{attached_item:AttachedItem}[];
226
+
227
+ /**
228
+ * @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
229
+
230
+ */
231
+
232
+ next_offset?:string;
48
233
  }
49
234
  export interface ListInputParam {
50
- [key : string]: any;
235
+ [key : string]: any;
236
+ /**
237
+ * @description The number of resources to be returned.
238
+
239
+ */
240
+
51
241
  limit?:number;
242
+
243
+ /**
244
+ * @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.
245
+
246
+ */
247
+
52
248
  offset?:string;
249
+
250
+ /**
251
+ * @description Filter attached items based on their id.
252
+
253
+ */
254
+
53
255
  id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
256
+
257
+ /**
258
+ * @description Filter attached items based on the &#x60;item_id&#x60; of the item being attached.
259
+
260
+ */
261
+
54
262
  item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
263
+
264
+ /**
265
+ * @description Filter attached items based on the &#x60;type&#x60; of attached item. Possible values are : &#x60;recommended&#x60;, &#x60;mandatory&#x60;, &#x60;optional&#x60;.
266
+
267
+ */
268
+
55
269
  type?:{in?:string,is?:'optional' | 'mandatory' | 'recommended',is_not?:'optional' | 'mandatory' | 'recommended',not_in?:string};
270
+
271
+ /**
272
+ * @description To filter based on the type of of the attached item. Possible values are : &#x60;addon&#x60;, &#x60;charge&#x60;.
273
+
274
+ */
275
+
56
276
  item_type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string};
277
+
278
+ /**
279
+ * @description Indicates when the item is charged. This attribute only applies to charge-items.
280
+
281
+ */
282
+
57
283
  charge_on_event?:{in?:string,is?:'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation' | 'on_demand',is_not?:'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation' | 'on_demand',not_in?:string};
284
+
285
+ /**
286
+ * @description Filter attached items based on when the attached items were last updated.
287
+
288
+ */
289
+
58
290
  updated_at?:{after?:string,before?:string,between?:string,on?:string};
59
291
  }
60
- export interface CreateResponse {
61
- attached_item:AttachedItem;
292
+ export interface CreateResponse {
293
+ /**
294
+ * @description Creates an attached addon or a charge item for a plan.
295
+
296
+ */
297
+
298
+ attached_item:AttachedItem;
62
299
  }
63
300
  export interface CreateInputParam {
301
+
302
+ /**
303
+ * @description The id of the addon or charge that is being attached to the plan-item.
304
+
305
+ */
306
+
64
307
  item_id:string;
308
+
309
+ /**
310
+ * @description The type of attachment for the addon. Only applicable for addon-items and is a required parameter as well for addon-items. \* recommended - The addon is recommended to go with the plan-item when using [Checkout](https://www.chargebee.com/docs/2.0/configure-inapp.html#fundamental-settings_recommending-addons-in-checkout) or [Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). \* optional - The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a &#x60;quantity&#x60; and &#x60;billing_cycles&#x60; for the addon, for when it is applied to subscriptions with the plan. \* mandatory - The addon is attached automatically to the subscription for the plan-item unless [explicitly removed](./subscriptions?prod_cat_ver&#x3D;2) via API.
311
+
312
+ */
313
+
65
314
  type?:'optional' | 'mandatory' | 'recommended';
315
+
316
+ /**
317
+ * @description The number of subscription billing cycles for which this item is attached when applied to a subscription. Applicable only for items of type addon. Requires [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html) to be enabled for the site.
318
+
319
+ The value set explicitly for &#x60;billing_cycles&#x60; while [applying the addon to a subscription](./subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items) takes precedence over this parameter. This parameter, in turn, has a higher precedence than [the value set for the addon-item price](./item_prices?prod_cat_ver&#x3D;2).
320
+
321
+ */
322
+
66
323
  billing_cycles?:number;
324
+
325
+ /**
326
+ * @description The default quantity of the addon to be attached when the quantity is not specified while [creating](subscriptions?prod_cat_ver&#x3D;2#create_subscription_for_items)/[updating](subscriptions?prod_cat_ver&#x3D;2#update_subscription_for_items) the subscription.
327
+
328
+ */
329
+
67
330
  quantity?:number;
331
+
332
+ /**
333
+ * @description The decimal representation of the quantity of the addon. Returned for quantity-based addons when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
334
+
335
+ */
336
+
68
337
  quantity_in_decimal?:string;
338
+
339
+ /**
340
+ * @description Indicates when the item is charged. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver&#x3D;2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_creation - the time of creation of the subscription. \* subscription_trial_start - the time when the trial period of the subscription begins. \* on_demand - Item can be charged on demand \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an &#x60;active&#x60; or &#x60;non-renewing&#x60; state. Also includes reactivations of canceled subscriptions.
341
+
342
+ */
343
+
69
344
  charge_on_event?:ChargeOnEvent;
345
+
346
+ /**
347
+ * @description Indicates if the charge-item is to be charged only once or each time the &#x60;charge_on_event&#x60; occurs. This parameter only applies to charge-items.
348
+
349
+ */
350
+
70
351
  charge_once?:boolean;
71
352
  }
72
- export interface DeleteResponse {
73
- attached_item:AttachedItem;
353
+ export interface DeleteResponse {
354
+ /**
355
+ * @description Deletes an attached addon or a charge item.
356
+
357
+ */
358
+
359
+ attached_item:AttachedItem;
74
360
  }
75
361
  export interface DeleteInputParam {
362
+
363
+ /**
364
+ * @description The id of the addon or charge that is being attached to the plan-item.
365
+
366
+ */
367
+
76
368
  parent_item_id:string;
77
369
  }
78
370