chargebee 2.28.0 → 2.29.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 (51) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.yml +81 -0
  2. package/.github/ISSUE_TEMPLATE/config.yml +6 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.yml +34 -0
  4. package/.github/PULL_REQUEST_TEMPLATE.md +8 -0
  5. package/.github/workflows/greeting.yml +47 -0
  6. package/CHANGELOG.md +47 -0
  7. package/SECURITY.md +8 -0
  8. package/lib/chargebee.js +1 -1
  9. package/lib/resources/api_endpoints.js +0 -7
  10. package/package.json +1 -1
  11. package/types/core.d.ts +4 -4
  12. package/types/resources/AttachedItem.d.ts +88 -88
  13. package/types/resources/Card.d.ts +68 -68
  14. package/types/resources/Comment.d.ts +50 -44
  15. package/types/resources/Coupon.d.ts +242 -207
  16. package/types/resources/CouponSet.d.ts +72 -68
  17. package/types/resources/CreditNote.d.ts +612 -236
  18. package/types/resources/Customer.d.ts +655 -513
  19. package/types/resources/DifferentialPrice.d.ts +99 -74
  20. package/types/resources/EntitlementOverride.d.ts +27 -12
  21. package/types/resources/Estimate.d.ts +450 -450
  22. package/types/resources/Event.d.ts +30 -12
  23. package/types/resources/Export.d.ts +200 -200
  24. package/types/resources/Feature.d.ts +66 -35
  25. package/types/resources/Gift.d.ts +54 -44
  26. package/types/resources/HostedPage.d.ts +381 -381
  27. package/types/resources/InAppSubscription.d.ts +94 -90
  28. package/types/resources/Invoice.d.ts +1242 -660
  29. package/types/resources/Item.d.ts +148 -142
  30. package/types/resources/ItemEntitlement.d.ts +36 -36
  31. package/types/resources/ItemFamily.d.ts +45 -45
  32. package/types/resources/ItemPrice.d.ts +317 -273
  33. package/types/resources/PaymentIntent.d.ts +60 -60
  34. package/types/resources/PaymentVoucher.d.ts +74 -59
  35. package/types/resources/PortalSession.d.ts +45 -20
  36. package/types/resources/PromotionalCredit.d.ts +68 -68
  37. package/types/resources/Purchase.d.ts +3 -3
  38. package/types/resources/Quote.d.ts +652 -363
  39. package/types/resources/QuoteLineGroup.d.ts +245 -0
  40. package/types/resources/QuotedCharge.d.ts +170 -0
  41. package/types/resources/QuotedSubscription.d.ts +219 -0
  42. package/types/resources/SiteMigrationDetail.d.ts +7 -7
  43. package/types/resources/Subscription.d.ts +1219 -932
  44. package/types/resources/SubscriptionEntitlement.d.ts +33 -12
  45. package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -1
  46. package/types/resources/TimeMachine.d.ts +15 -15
  47. package/types/resources/Token.d.ts +23 -23
  48. package/types/resources/Transaction.d.ts +229 -112
  49. package/types/resources/UnbilledCharge.d.ts +112 -67
  50. package/types/resources/Usage.d.ts +46 -47
  51. package/types/resources/VirtualBankAccount.d.ts +66 -66
@@ -166,7 +166,7 @@ In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](m
166
166
  channel?:Channel;
167
167
 
168
168
  /**
169
- * @description A set of key-value pairs stored as additional information for the item. [Learn more](./#meta_data).
169
+ * @description A collection of key-value pairs that provides extra information about the item. [Learn more](advanced-features#metadata).
170
170
 
171
171
  */
172
172
 
@@ -183,13 +183,6 @@ Other details of attaching items can be specified using the [Create](./attached_
183
183
  }
184
184
  export namespace Item {
185
185
  export class ItemResource {
186
- /**
187
- * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
188
-
189
- */
190
-
191
- list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
192
-
193
186
  /**
194
187
  * @description Creates a new item.
195
188
 
@@ -197,13 +190,6 @@ Other details of attaching items can be specified using the [Create](./attached_
197
190
 
198
191
  create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
199
192
 
200
- /**
201
- * @description Deletes an item, marking its &#x60;status&#x60; as deleted. This is not allowed if there are &#x60;active&#x60; or &#x60;archived&#x60; item prices under the item. Once deleted, the id and name of the item can be reused.
202
-
203
- */
204
-
205
- delete(item_id:string):ChargebeeRequest<DeleteResponse>;
206
-
207
193
  /**
208
194
  * @description Retrieve an item resource.
209
195
 
@@ -217,136 +203,20 @@ Other details of attaching items can be specified using the [Create](./attached_
217
203
  */
218
204
 
219
205
  update(item_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
220
- }
221
- export interface ListResponse {
222
- /**
223
- * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
224
-
225
- */
226
-
227
- list:{item:Item}[];
228
206
 
229
207
  /**
230
208
  * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
231
209
 
232
210
  */
233
-
234
- next_offset?:string;
235
- }
236
- export interface ListInputParam {
237
- [key : string]: any;
238
- /**
239
- * @description The number of resources to be returned.
240
-
241
- */
242
-
243
- limit?:number;
244
-
245
- /**
246
- * @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.
247
-
248
- */
249
-
250
- offset?:string;
251
-
252
- /**
253
- * @description Filter items based on item id.
254
-
255
- */
256
-
257
- id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
258
-
259
- /**
260
- * @description Filter items based on &#x60;item_family_id&#x60;.
261
-
262
- */
263
-
264
- item_family_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
265
-
266
- /**
267
- * @description Filter items based on item &#x60;type&#x60;.
268
-
269
- */
270
-
271
- type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string};
272
-
273
- /**
274
- * @description Filter items based on item &#x60;name&#x60;.
275
-
276
- */
277
-
278
- name?:{is?:string,is_not?:string,starts_with?:string};
279
-
280
- /**
281
- * @description Filter items based on &#x60;item_applicability&#x60;.
282
-
283
- */
284
-
285
- item_applicability?:{in?:string,is?:'all' | 'restricted',is_not?:'all' | 'restricted',not_in?:string};
286
-
287
- /**
288
- * @description Filter items based on item &#x60;status&#x60;.
289
-
290
- */
291
-
292
- status?:{in?:string,is?:'archived' | 'deleted' | 'active',is_not?:'archived' | 'deleted' | 'active',not_in?:string};
293
-
294
- /**
295
- * @description Specifies if gift subscriptions can be created for this item.
296
-
297
- */
298
-
299
- is_giftable?:{is?:'true' | 'false'};
300
-
301
- /**
302
- * @description Filter items based on when the items were last updated.
303
-
304
- */
305
-
306
- updated_at?:{after?:string,before?:string,between?:string,on?:string};
307
-
308
- /**
309
- * @description Allow the plan to subscribed to via Checkout. Applies only for plan-items.
310
- **Note:** Only the in-app version of Checkout is supported for Product Catalog v2.
311
-
312
- */
313
-
314
- enabled_for_checkout?:{is?:'true' | 'false'};
315
-
316
- /**
317
- * @description Allow customers to change their subscription to this plan via the [Self-Serve Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html). Applies only for plan-items. This requires the Portal configuration to [allow changing subscriptions](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription).
318
-
319
- */
320
-
321
- enabled_in_portal?:{is?:'true' | 'false'};
322
-
323
- /**
324
- * @description Specifies whether the item undergoes metered billing. When &#x60;true&#x60;, the quantity is calculated from [usage records](/docs/api/usages?prod_cat_ver&#x3D;2). When &#x60;false&#x60;, the &#x60;quantity&#x60; is as determined while adding an item price to the subscription. Applicable only for items of &#x60;type&#x60; &#x60;plan&#x60; or &#x60;addon&#x60; and when [Metered Billing](https://www.chargebee.com/docs/2.0/metered_billing.html) is enabled. The value of this attribute cannot be changed.
325
-
326
- */
327
-
328
- metered?:{is?:'true' | 'false'};
329
-
330
- /**
331
- * @description How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is &#x60;metered&#x60;. This value overrides the one [set at the site level](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing).
332
-
333
- */
334
-
335
- usage_calculation?:{in?:string,is?:'max_usage' | 'sum_of_usages' | 'last_usage',is_not?:'max_usage' | 'sum_of_usages' | 'last_usage',not_in?:string};
336
-
337
- /**
338
- * @description The subscription channel this object originated from and is maintained in.
339
-
340
- */
341
-
342
- channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string};
211
+
212
+ list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
343
213
 
344
214
  /**
345
- * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
215
+ * @description Deletes an item, marking its &#x60;status&#x60; as deleted. This is not allowed if there are &#x60;active&#x60; or &#x60;archived&#x60; item prices under the item. Once deleted, the id and name of the item can be reused.
346
216
 
347
217
  */
348
-
349
- sort_by?:{asc?:'updated_at' | 'name' | 'id',desc?:'updated_at' | 'name' | 'id'};
218
+
219
+ delete(item_id:string):ChargebeeRequest<DeleteResponse>;
350
220
  }
351
221
  export interface CreateResponse {
352
222
  item:Item;
@@ -487,16 +357,14 @@ Other details of attaching items can be specified using the [Create](./attached_
487
357
  usage_calculation?:'max_usage' | 'sum_of_usages' | 'last_usage';
488
358
 
489
359
  /**
490
- * @description A set of key-value pairs stored as additional information for the item. [Learn more](./#meta_data).
360
+ * @description A collection of key-value pairs that provides extra information about the item.
361
+ **Note:** There&#x27;s a character limit of 65,535.
362
+ [Learn more](advanced-features#metadata).
491
363
 
492
364
  */
493
365
 
494
366
  metadata?:object;
495
367
  }
496
- export interface DeleteResponse {
497
- item:Item;
498
- }
499
-
500
368
  export interface RetrieveResponse {
501
369
  item:Item;
502
370
  }
@@ -598,7 +466,7 @@ Other details of attaching items can be specified using the [Create](./attached_
598
466
  gift_claim_redirect_url?:string;
599
467
 
600
468
  /**
601
- * @description A set of key-value pairs stored as additional information for the item. [Learn more](./#meta_data).
469
+ * @description A collection of key-value pairs that provides extra information about the item. [Learn more](advanced-features#metadata).
602
470
 
603
471
  */
604
472
 
@@ -618,7 +486,145 @@ Other details of attaching items can be specified using the [Create](./attached_
618
486
 
619
487
  status?:'archived' | 'active';
620
488
  }
489
+ export interface ListResponse {
490
+ /**
491
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
492
+
493
+ */
494
+
495
+ list:{item:Item}[];
496
+
497
+ /**
498
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
499
+
500
+ */
501
+
502
+ next_offset?:string;
503
+ }
504
+ export interface ListInputParam {
505
+ [key : string]: any;
506
+ /**
507
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
508
+
509
+ */
510
+
511
+ limit?:number;
512
+
513
+ /**
514
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
515
+
516
+ */
517
+
518
+ offset?:string;
519
+
520
+ /**
521
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
522
+
523
+ */
524
+
525
+ id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
526
+
527
+ /**
528
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
529
+
530
+ */
531
+
532
+ item_family_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
533
+
534
+ /**
535
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
536
+
537
+ */
538
+
539
+ type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string};
540
+
541
+ /**
542
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
543
+
544
+ */
545
+
546
+ name?:{is?:string,is_not?:string,starts_with?:string};
547
+
548
+ /**
549
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
550
+
551
+ */
552
+
553
+ item_applicability?:{in?:string,is?:'all' | 'restricted',is_not?:'all' | 'restricted',not_in?:string};
554
+
555
+ /**
556
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
557
+
558
+ */
559
+
560
+ status?:{in?:string,is?:'archived' | 'deleted' | 'active',is_not?:'archived' | 'deleted' | 'active',not_in?:string};
561
+
562
+ /**
563
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
564
+
565
+ */
566
+
567
+ is_giftable?:{is?:'true' | 'false'};
568
+
569
+ /**
570
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
571
+
572
+ */
573
+
574
+ updated_at?:{after?:string,before?:string,between?:string,on?:string};
575
+
576
+ /**
577
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
578
+
579
+ */
580
+
581
+ enabled_for_checkout?:{is?:'true' | 'false'};
582
+
583
+ /**
584
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
585
+
586
+ */
587
+
588
+ enabled_in_portal?:{is?:'true' | 'false'};
589
+
590
+ /**
591
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
592
+
593
+ */
594
+
595
+ metered?:{is?:'true' | 'false'};
596
+
597
+ /**
598
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
599
+
600
+ */
601
+
602
+ usage_calculation?:{in?:string,is?:'max_usage' | 'sum_of_usages' | 'last_usage',is_not?:'max_usage' | 'sum_of_usages' | 'last_usage',not_in?:string};
603
+
604
+ /**
605
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
606
+
607
+ */
608
+
609
+ channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string};
610
+
611
+ /**
612
+ * @description Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
613
+
614
+ */
615
+
616
+ sort_by?:{asc?:'updated_at' | 'name' | 'id',desc?:'updated_at' | 'name' | 'id'};
617
+ }
618
+ export interface DeleteResponse {
619
+ item:Item;
620
+ }
621
+
621
622
  export interface ApplicableItem {
623
+ /**
624
+ * @description Id of the addon-item or plan-item that can be applied to the plan-item.
625
+
626
+ */
627
+
622
628
  id?:string;
623
629
  }
624
630
  }
@@ -70,25 +70,25 @@ declare module 'chargebee' {
70
70
  export namespace ItemEntitlement {
71
71
  export class ItemEntitlementResource {
72
72
  /**
73
- * @description Retrieves a list of all the &#x60;item_entitlement&#x60;s for the &#x60;feature&#x60; specified.
73
+ * @description Retrieves a list of all the &#x60;item_entitlements&#x60; for the &#x60;item&#x60; specified.
74
74
 
75
75
  */
76
76
 
77
- item_entitlements_for_feature(feature_id:string, input?:ItemEntitlementsForFeatureInputParam):ChargebeeRequest<ItemEntitlementsForFeatureResponse>;
77
+ item_entitlements_for_item(item_id:string, input?:ItemEntitlementsForItemInputParam):ChargebeeRequest<ItemEntitlementsForItemResponse>;
78
78
 
79
79
  /**
80
- * @description Upserts or removes a set of &#x60;item_entitlement&#x60;s for an &#x60;feature&#x60; depending on the &#x60;action&#x60; specified. The API returns the upserted or deleted &#x60;item_entitlements&#x60; after successfully completing the operation. The operation returns an error when the first &#x60;item_entitlement&#x60; fails to be processed. Either all the &#x60;item_entitlement&#x60;s provided in the request are processed or none.
80
+ * @description Retrieves a list of all the &#x60;item_entitlement&#x60;s for the &#x60;feature&#x60; specified.
81
81
 
82
82
  */
83
83
 
84
- add_item_entitlements(feature_id:string, input:AddItemEntitlementsInputParam):ChargebeeRequest<AddItemEntitlementsResponse>;
84
+ item_entitlements_for_feature(feature_id:string, input?:ItemEntitlementsForFeatureInputParam):ChargebeeRequest<ItemEntitlementsForFeatureResponse>;
85
85
 
86
86
  /**
87
- * @description Retrieves a list of all the &#x60;item_entitlements&#x60; for the &#x60;item&#x60; specified.
87
+ * @description Upserts or removes a set of &#x60;item_entitlement&#x60;s for an &#x60;feature&#x60; depending on the &#x60;action&#x60; specified. The API returns the upserted or deleted &#x60;item_entitlements&#x60; after successfully completing the operation. The operation returns an error when the first &#x60;item_entitlement&#x60; fails to be processed. Either all the &#x60;item_entitlement&#x60;s provided in the request are processed or none.
88
88
 
89
89
  */
90
90
 
91
- item_entitlements_for_item(item_id:string, input?:ItemEntitlementsForItemInputParam):ChargebeeRequest<ItemEntitlementsForItemResponse>;
91
+ add_item_entitlements(feature_id:string, input:AddItemEntitlementsInputParam):ChargebeeRequest<AddItemEntitlementsResponse>;
92
92
 
93
93
  /**
94
94
  * @description Upserts or removes a set of &#x60;item_entitlements&#x60; for an [item](items?prod_cat_ver&#x3D;2) depending on the &#x60;action&#x60; specified. The API returns the upserted or deleted &#x60;item_entitlements&#x60; after successfully completing the operation. The operation returns an error when the first &#x60;item_entitlement&#x60; fails to be processed. Either all the &#x60;item_entitlement&#x60;s provided in the request are processed or none.
@@ -97,86 +97,86 @@ declare module 'chargebee' {
97
97
 
98
98
  upsert_or_remove_item_entitlements_for_item(item_id:string, input:UpsertOrRemoveItemEntitlementsForItemInputParam):ChargebeeRequest<UpsertOrRemoveItemEntitlementsForItemResponse>;
99
99
  }
100
- export interface ItemEntitlementsForFeatureResponse {
100
+ export interface ItemEntitlementsForItemResponse {
101
101
  /**
102
- * @description Retrieves a list of all the &#x60;item_entitlement&#x60;s for the &#x60;feature&#x60; specified.
102
+ * @description Retrieves a list of all the &#x60;item_entitlements&#x60; for the &#x60;item&#x60; specified.
103
103
 
104
104
  */
105
105
 
106
106
  list:{item_entitlement:ItemEntitlement}[];
107
107
 
108
108
  /**
109
- * @description Retrieves a list of all the &#x60;item_entitlement&#x60;s for the &#x60;feature&#x60; specified.
109
+ * @description Retrieves a list of all the &#x60;item_entitlements&#x60; for the &#x60;item&#x60; specified.
110
110
 
111
111
  */
112
112
 
113
113
  next_offset?:string;
114
114
  }
115
- export interface ItemEntitlementsForFeatureInputParam {
115
+ export interface ItemEntitlementsForItemInputParam {
116
116
  [key : string]: any;
117
117
  /**
118
- * @description The number of resources to be returned.
118
+ * @description Retrieves a list of all the &#x60;item_entitlements&#x60; for the &#x60;item&#x60; specified.
119
119
 
120
120
  */
121
121
 
122
122
  limit?:number;
123
123
 
124
124
  /**
125
- * @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.
125
+ * @description Retrieves a list of all the &#x60;item_entitlements&#x60; for the &#x60;item&#x60; specified.
126
126
 
127
127
  */
128
128
 
129
129
  offset?:string;
130
130
  }
131
- export interface AddItemEntitlementsResponse {
132
- item_entitlement:ItemEntitlement;
133
- }
134
- export interface AddItemEntitlementsInputParam {
135
-
131
+ export interface ItemEntitlementsForFeatureResponse {
136
132
  /**
137
- * @description The specific action to be performed for each &#x60;item_entitlement&#x60; specified. \* remove - Deletes the &#x60;item_entitlement&#x60; for the &#x60;feature_id&#x60; and &#x60;item_id&#x60; combination, if it exists. \* upsert - If the &#x60;item_entitlement&#x60; already exists for the &#x60;feature_id&#x60; and &#x60;item_id&#x60; combination, the &#x60;value&#x60; of the &#x60;item_entitlement&#x60; is updated. If it doesn&#x27;t exist, a new &#x60;item_entitelment&#x60; is created.
133
+ * @description Retrieves a list of all the &#x60;item_entitlement&#x60;s for the &#x60;feature&#x60; specified.
138
134
 
139
135
  */
140
136
 
141
- action:Action;
137
+ list:{item_entitlement:ItemEntitlement}[];
142
138
 
143
139
  /**
144
- * @description Parameters for item_entitlements
140
+ * @description Retrieves a list of all the &#x60;item_entitlement&#x60;s for the &#x60;feature&#x60; specified.
145
141
 
146
142
  */
147
143
 
148
- item_entitlements?:{item_id:string,item_type?:'item' | 'charge' | 'addon' | 'subscription' | 'plan',value?:string}[];
144
+ next_offset?:string;
149
145
  }
150
- export interface ItemEntitlementsForItemResponse {
146
+ export interface ItemEntitlementsForFeatureInputParam {
147
+ [key : string]: any;
151
148
  /**
152
- * @description Retrieves a list of all the &#x60;item_entitlements&#x60; for the &#x60;item&#x60; specified.
149
+ * @description Retrieves a list of all the &#x60;item_entitlement&#x60;s for the &#x60;feature&#x60; specified.
153
150
 
154
151
  */
155
-
156
- list:{item_entitlement:ItemEntitlement}[];
152
+
153
+ limit?:number;
157
154
 
158
155
  /**
159
- * @description Retrieves a list of all the &#x60;item_entitlements&#x60; for the &#x60;item&#x60; specified.
156
+ * @description Retrieves a list of all the &#x60;item_entitlement&#x60;s for the &#x60;feature&#x60; specified.
160
157
 
161
158
  */
162
-
163
- next_offset?:string;
159
+
160
+ offset?:string;
164
161
  }
165
- export interface ItemEntitlementsForItemInputParam {
166
- [key : string]: any;
162
+ export interface AddItemEntitlementsResponse {
163
+ item_entitlement:ItemEntitlement;
164
+ }
165
+ export interface AddItemEntitlementsInputParam {
166
+
167
167
  /**
168
- * @description The number of resources to be returned.
168
+ * @description The specific action to be performed for each &#x60;item_entitlement&#x60; specified. \* remove - Deletes the &#x60;item_entitlement&#x60; for the &#x60;feature_id&#x60; and &#x60;item_id&#x60; combination, if it exists. \* upsert - If the &#x60;item_entitlement&#x60; already exists for the &#x60;feature_id&#x60; and &#x60;item_id&#x60; combination, the &#x60;value&#x60; of the &#x60;item_entitlement&#x60; is updated. If it doesn&#x27;t exist, a new &#x60;item_entitelment&#x60; is created.
169
169
 
170
170
  */
171
-
172
- limit?:number;
171
+
172
+ action:Action;
173
173
 
174
174
  /**
175
- * @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.
175
+ * @description Parameters for item_entitlements
176
176
 
177
177
  */
178
-
179
- offset?:string;
178
+
179
+ item_entitlements?:{item_id:string,item_type?:'item' | 'charge' | 'addon' | 'subscription' | 'plan',value?:string}[];
180
180
  }
181
181
  export interface UpsertOrRemoveItemEntitlementsForItemResponse {
182
182
  item_entitlement:ItemEntitlement;
@@ -54,11 +54,18 @@ declare module 'chargebee' {
54
54
  export namespace ItemFamily {
55
55
  export class ItemFamilyResource {
56
56
  /**
57
- * @description Deletes an item family, marking its &#x60;status&#x60; as &#x60;deleted&#x60;. This is not allowed if there are &#x60;active&#x60; items under the item family. Once deleted, the &#x60;id&#x60; and &#x60;name&#x60; of the item family can be reused to create a new item family.
57
+ * @description This endpoint creates an item family for your product line or service.
58
58
 
59
59
  */
60
60
 
61
- delete(item_family_id:string):ChargebeeRequest<DeleteResponse>;
61
+ create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
62
+
63
+ /**
64
+ * @description This endpoint retrieves an item family based on the item family id.
65
+
66
+ */
67
+
68
+ retrieve(item_family_id:string):ChargebeeRequest<RetrieveResponse>;
62
69
 
63
70
  /**
64
71
  * @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
@@ -68,27 +75,46 @@ declare module 'chargebee' {
68
75
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
69
76
 
70
77
  /**
71
- * @description This endpoint creates an item family for your product line or service.
78
+ * @description This endpoint updates the name and/or description of the item family.
72
79
 
73
80
  */
74
81
 
75
- create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
82
+ update(item_family_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
76
83
 
77
84
  /**
78
- * @description This endpoint retrieves an item family based on the item family id.
85
+ * @description Deletes an item family, marking its &#x60;status&#x60; as &#x60;deleted&#x60;. This is not allowed if there are &#x60;active&#x60; items under the item family. Once deleted, the &#x60;id&#x60; and &#x60;name&#x60; of the item family can be reused to create a new item family.
79
86
 
80
87
  */
81
88
 
82
- retrieve(item_family_id:string):ChargebeeRequest<RetrieveResponse>;
89
+ delete(item_family_id:string):ChargebeeRequest<DeleteResponse>;
90
+ }
91
+ export interface CreateResponse {
92
+ item_family:ItemFamily;
93
+ }
94
+ export interface CreateInputParam {
95
+ [key : string] : any;
96
+ /**
97
+ * @description The identifier for the item family. Must be unique and is immutable.
98
+
99
+ */
100
+
101
+ id:string;
83
102
 
84
103
  /**
85
- * @description This endpoint updates the name and/or description of the item family.
104
+ * @description The display name for the item family. Must be unique. This is visible only in Chargebee and not to customers.
86
105
 
87
106
  */
88
-
89
- update(item_family_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
107
+
108
+ name:string;
109
+
110
+ /**
111
+ * @description Description of the item family. This is visible only in Chargebee and not to customers.
112
+
113
+ */
114
+
115
+ description?:string;
90
116
  }
91
- export interface DeleteResponse {
117
+ export interface RetrieveResponse {
92
118
  item_family:ItemFamily;
93
119
  }
94
120
 
@@ -110,70 +136,40 @@ declare module 'chargebee' {
110
136
  export interface ListInputParam {
111
137
  [key : string]: any;
112
138
  /**
113
- * @description The number of resources to be returned.
139
+ * @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
114
140
 
115
141
  */
116
142
 
117
143
  limit?:number;
118
144
 
119
145
  /**
120
- * @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.
146
+ * @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
121
147
 
122
148
  */
123
149
 
124
150
  offset?:string;
125
151
 
126
152
  /**
127
- * @description The identifier for the item family. It is unique and immutable.
153
+ * @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
128
154
 
129
155
  */
130
156
 
131
157
  id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
132
158
 
133
159
  /**
134
- * @description A unique display name for the item family. This is visible only in Chargebee and not to customers.
160
+ * @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
135
161
 
136
162
  */
137
163
 
138
164
  name?:{is?:string,is_not?:string,starts_with?:string};
139
165
 
140
166
  /**
141
- * @description When the item family was last updated.
167
+ * @description Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
142
168
 
143
169
  */
144
170
 
145
171
  updated_at?:{after?:string,before?:string,between?:string,on?:string};
146
172
  }
147
- export interface CreateResponse {
148
- item_family:ItemFamily;
149
- }
150
- export interface CreateInputParam {
151
- [key : string] : any;
152
- /**
153
- * @description The identifier for the item family. Must be unique and is immutable.
154
-
155
- */
156
-
157
- id:string;
158
-
159
- /**
160
- * @description The display name for the item family. Must be unique. This is visible only in Chargebee and not to customers.
161
-
162
- */
163
-
164
- name:string;
165
-
166
- /**
167
- * @description Description of the item family. This is visible only in Chargebee and not to customers.
168
-
169
- */
170
-
171
- description?:string;
172
- }
173
- export interface RetrieveResponse {
174
- item_family:ItemFamily;
175
- }
176
-
177
173
  export interface UpdateResponse {
178
174
  item_family:ItemFamily;
179
175
  }
@@ -193,6 +189,10 @@ declare module 'chargebee' {
193
189
 
194
190
  description?:string;
195
191
  }
192
+ export interface DeleteResponse {
193
+ item_family:ItemFamily;
194
+ }
195
+
196
196
 
197
197
  }
198
198
  }