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
@@ -2,117 +2,623 @@
2
2
  declare module 'chargebee' {
3
3
  export interface Item {
4
4
  [key : string] : any;
5
+ /**
6
+ * @description The identifier for the item. It is unique and immutable.
7
+
8
+ */
9
+
5
10
  id:string;
11
+
12
+ /**
13
+ * @description A unique display name for the item. This is visible only in Chargebee and not to customers.
14
+
15
+ */
16
+
6
17
  name:string;
18
+
19
+ /**
20
+ * @description A unique display name for the item.
21
+
22
+ */
23
+
7
24
  external_name?:string;
25
+
26
+ /**
27
+ * @description Description of the item. This is visible only in Chargebee and not to customers.
28
+
29
+ */
30
+
8
31
  description?:string;
32
+
33
+ /**
34
+ * @description The status of the item. \* archived - The item is no longer active and no new item prices can be created \* active - The item can be used to create new item prices. \* deleted - Indicates that the item has been [deleted](./items?prod_cat_ver=2#delete_an_item). The `id` and `name` can be reused. Deleted items can be retrieved using [List items](./items?prod_cat_ver=2#list_items).
35
+
36
+ */
37
+
9
38
  status?:'archived' | 'deleted' | 'active';
39
+
40
+ /**
41
+ * @description The version number of this resource. For every change made to the resource, `resource_version` is updated with a new timestamp in milliseconds.
42
+
43
+ */
44
+
10
45
  resource_version?:number;
46
+
47
+ /**
48
+ * @description Timestamp indicating when the item was last updated.
49
+
50
+ */
51
+
11
52
  updated_at?:number;
53
+
54
+ /**
55
+ * @description The `id` of the [Item family](./item_families?prod_cat_ver=2) that the item belongs to. Is mandatory when [Product Families](https://www.chargebee.com/docs/2.0/product-families.html) have been enabled.
56
+
57
+ */
58
+
12
59
  item_family_id?:string;
60
+
61
+ /**
62
+ * @description The type of the item. \* plan - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription. \* charge - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer [directly](./invoices?prod_cat_ver=2#create_invoice_for_a_charge-item) without being applied to a subscription. \* addon - A recurring component that can be added to a subscription in addition to its plan.
63
+
64
+ */
65
+
13
66
  type:'charge' | 'addon' | 'plan';
67
+
68
+ /**
69
+ * @description Indicates that the item is a physical product. If Orders are enabled in Chargebee, subscriptions created for this item will have orders associated with them.
70
+
71
+ */
72
+
14
73
  is_shippable?:boolean;
74
+
75
+ /**
76
+ * @description Specifies if gift subscriptions can be created for this item.
77
+
78
+ */
79
+
15
80
  is_giftable:boolean;
81
+
82
+ /**
83
+ * @description If `enabled_for_checkout`, then the URL to be redirected to once the checkout is complete. This attribute is only available for plan-items.
84
+
85
+ */
86
+
16
87
  redirect_url?:string;
88
+
89
+ /**
90
+ * @description Allow the plan to subscribed to via Checkout. Applies only for plan-items.
91
+ **Note:** Only the in-app version of Checkout is supported for Product Catalog v2.
92
+
93
+ */
94
+
17
95
  enabled_for_checkout:boolean;
96
+
97
+ /**
98
+ * @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).
99
+
100
+ */
101
+
18
102
  enabled_in_portal:boolean;
103
+
104
+ /**
105
+ * @description The item is included in MRR calculations for your site. This attribute is only applicable for items of `type = charge` and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude charge-items from MRR calculations, this value is always returned `false`.
106
+
107
+ */
108
+
19
109
  included_in_mrr?:boolean;
110
+
111
+ /**
112
+ * @description Indicates which addon-items and charge-items can be applied to the item. Only meant for plan-items. Other details of attaching items such as whether to attach as a mandatory item or to attach on a certain event, can be specified using the [Create](./attached_items?prod_cat_ver=2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver=2#update_an_attached_item) API. \* all - all addon-items and charge-items are applicable to this plan-item. \* restricted - only the addon-items or charge-items provided in `applicable_items` can be applied to this plan-item.
113
+
114
+ */
115
+
20
116
  item_applicability:'all' | 'restricted';
117
+
118
+ /**
119
+ * @description The URL to redirect to once the gift has been claimed by the receiver.
120
+
121
+ */
122
+
21
123
  gift_claim_redirect_url?:string;
124
+
125
+ /**
126
+ * @description The unit of measure for a quantity-based item. This is displayed on the Chargebee UI and on customer facing documents/pages. The latter includes [hosted pages](./hosted_pages?prod_cat_ver=2), [invoices](./invoices?prod_cat_ver=2) and [quotes](./quotes?prod_cat_ver=2#). Examples follow:
127
+
128
+ * "user" for a cloud-collaboration platform.
129
+ * "GB" for a data service.
130
+ * "issue" for a magazine.
131
+
132
+ **Note:** `unit` is only exposed via the API to quantity-based addons; it is however NOT exposed to quantity-based plans.
133
+
134
+ */
135
+
22
136
  unit?:string;
137
+
138
+ /**
139
+ * @description Specifies whether the item undergoes metered billing. When `true`, the quantity is calculated from [usage records](/docs/api/usages?prod_cat_ver=2). When `false`, the `quantity` is as determined while adding an item price to the subscription. Applicable only for items of `type` `plan` or `addon` and when [Metered Billing](https://www.chargebee.com/docs/2.0/metered_billing.html) is enabled. The value of this attribute cannot be changed.
140
+
141
+ */
142
+
23
143
  metered:boolean;
144
+
145
+ /**
146
+ * @description How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is `metered`. This value overrides the one [set at the site level](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing). \* sum_of_usages - the net quantity is the sum of the `quantity` of all usages for the current term. \* last_usage - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) with `usage_date` within the relevant billing period, the `quantity` of the usage record with the most recent `usage_date` is taken as the net quantity consumed. \* max_usage - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) with `usage_date` within the relevant billing period, the `quantity` of the usage record with the maximum value is taken as the net quantity consumed.
147
+
148
+ */
149
+
24
150
  usage_calculation?:'max_usage' | 'sum_of_usages' | 'last_usage';
151
+
152
+ /**
153
+ * @description Timestamp indicating when this item was archived.
154
+
155
+ */
156
+
25
157
  archived_at?:number;
158
+
159
+ /**
160
+ * @description The subscription channel this object originated from and is maintained in. \* 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. \* web - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI. \* 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.
161
+
162
+ In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.
163
+
164
+ */
165
+
26
166
  channel?:Channel;
167
+
168
+ /**
169
+ * @description A set of key-value pairs stored as additional information for the item. [Learn more](./#meta_data).
170
+
171
+ */
172
+
27
173
  metadata?:object;
174
+
175
+ /**
176
+ * @description The list of addons and charges that are allowed to be applied to the plan. This attribute is applicable only for plan-items and that too when `item_applicability` is `restricted`.
177
+
178
+ Other details of attaching items can be specified using the [Create](./attached_items?prod_cat_ver=2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver=2#update_an_attached_item) API.
179
+
180
+ */
181
+
28
182
  applicable_items?:Item.ApplicableItem[];
29
183
  }
30
184
  export namespace Item {
31
- export class ItemResource {
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
+
32
191
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
192
+
193
+ /**
194
+ * @description Creates a new item.
195
+
196
+ */
197
+
33
198
  create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
199
+
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
+
34
205
  delete(item_id:string):ChargebeeRequest<DeleteResponse>;
206
+
207
+ /**
208
+ * @description Retrieve an item resource.
209
+
210
+ */
211
+
35
212
  retrieve(item_id:string):ChargebeeRequest<RetrieveResponse>;
213
+
214
+ /**
215
+ * @description Updates an item with the changes specified. Unspecified item parameters are not modified.
216
+
217
+ */
218
+
36
219
  update(item_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
37
220
  }
38
- export interface ListResponse {
39
- list:{item:Item}[];
40
- next_offset?:string;
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
+
229
+ /**
230
+ * @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
+
232
+ */
233
+
234
+ next_offset?:string;
41
235
  }
42
236
  export interface ListInputParam {
43
- [key : string]: any;
237
+ [key : string]: any;
238
+ /**
239
+ * @description The number of resources to be returned.
240
+
241
+ */
242
+
44
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
+
45
250
  offset?:string;
251
+
252
+ /**
253
+ * @description Filter items based on item id.
254
+
255
+ */
256
+
46
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
+
47
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
+
48
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
+
49
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
+
50
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
+
51
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
+
52
299
  is_giftable?:{is?:'true' | 'false'};
300
+
301
+ /**
302
+ * @description Filter items based on when the items were last updated.
303
+
304
+ */
305
+
53
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
+
54
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
+
55
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
+
56
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
+
57
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
+
58
342
  channel?:{in?:string,is?:'app_store' | 'web' | 'play_store',is_not?:'app_store' | 'web' | 'play_store',not_in?:string};
343
+
344
+ /**
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.
346
+
347
+ */
348
+
59
349
  sort_by?:{asc?:'updated_at' | 'name' | 'id',desc?:'updated_at' | 'name' | 'id'};
60
350
  }
61
- export interface CreateResponse {
62
- item:Item;
351
+ export interface CreateResponse {
352
+ item:Item;
63
353
  }
64
354
  export interface CreateInputParam {
65
- [key : string] : any;
355
+ [key : string] : any;
356
+ /**
357
+ * @description The identifier for the item. Must be unique and is immutable once set.
358
+
359
+ */
360
+
66
361
  id:string;
362
+
363
+ /**
364
+ * @description A unique display name for the item. Must be unique. This is visible only in Chargebee and not to customers.
365
+
366
+ */
367
+
67
368
  name:string;
369
+
370
+ /**
371
+ * @description The type of the item. \* plan - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription. \* charge - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer [directly](./invoices?prod_cat_ver&#x3D;2#create_invoice_for_a_charge-item) without being applied to a subscription. \* addon - A recurring component that can be added to a subscription in addition to its plan.
372
+
373
+ */
374
+
68
375
  type:'charge' | 'addon' | 'plan';
376
+
377
+ /**
378
+ * @description Description of the item. This is visible only in Chargebee and not to customers.
379
+
380
+ */
381
+
69
382
  description?:string;
383
+
384
+ /**
385
+ * @description The &#x60;id&#x60; of the [Item family](./item_families?prod_cat_ver&#x3D;2) that the item belongs to. Is mandatory when [Product Families](https://www.chargebee.com/docs/2.0/product-families.html) have been enabled.
386
+
387
+ */
388
+
70
389
  item_family_id:string;
390
+
391
+ /**
392
+ * @description Specifies if gift subscriptions can be created for this item.
393
+
394
+ */
395
+
71
396
  is_giftable?:boolean;
397
+
398
+ /**
399
+ * @description Indicates that the item is a physical product. If Orders are enabled in Chargebee, subscriptions created for this item will have orders associated with them.
400
+
401
+ */
402
+
72
403
  is_shippable?:boolean;
404
+
405
+ /**
406
+ * @description A unique display name for the item.
407
+
408
+ */
409
+
73
410
  external_name?:string;
411
+
412
+ /**
413
+ * @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). Only the in-app version of the Portal is supported for Product Catalog v2.
414
+
415
+ */
416
+
74
417
  enabled_in_portal?:boolean;
418
+
419
+ /**
420
+ * @description If &#x60;enabled_for_checkout&#x60;, then the URL to be redirected to once the checkout is complete. This attribute is only available for plan-items.
421
+
422
+ */
423
+
75
424
  redirect_url?:string;
425
+
426
+ /**
427
+ * @description Allow the plan to subscribed to via Checkout. Applies only for plan-items.
428
+ **Note:** Only the in-app version of Checkout is supported for Product Catalog v2.
429
+
430
+ */
431
+
76
432
  enabled_for_checkout?:boolean;
433
+
434
+ /**
435
+ * @description Indicates which addon-items and charge-items can be applied to the item. Only possible for plan-items. Other details of attaching items such as whether to attach as a mandatory item or to attach on a certain event, can be specified using the [Create](./attached_items?prod_cat_ver&#x3D;2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver&#x3D;2#update_an_attached_item) API. \* all - all addon-items and charge-items are applicable to this plan-item. \* restricted - only the addon-items or charge-items provided in &#x60;applicable_items&#x60; can be applied to this plan-item.
436
+
437
+ */
438
+
77
439
  item_applicability?:'all' | 'restricted';
440
+
441
+ /**
442
+ * @description The list of ids of addon-items and charge-items that can be applied to the plan-item. This parameter can be provided only for plan-items and that too when item_applicability is restricted. Other details of attaching items can be specified using the [Create](./attached_items?prod_cat_ver&#x3D;2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver&#x3D;2#update_an_attached_item) API.
443
+
444
+ */
445
+
78
446
  applicable_items?:string[];
447
+
448
+ /**
449
+ * @description The unit of measure for a quantity-based item. This is displayed on the Chargebee UI and on customer facing documents/pages. The latter includes [hosted pages](./hosted_pages?prod_cat_ver&#x3D;2), [invoices](./invoices?prod_cat_ver&#x3D;2) and [quotes](./quotes?prod_cat_ver&#x3D;2#). Examples follow:
450
+
451
+ * &quot;user&quot; for a cloud-collaboration platform.
452
+ * &quot;GB&quot; for a data service.
453
+ * &quot;issue&quot; for a magazine.
454
+
455
+ **Note:** &#x60;unit&#x60; is only exposed via the API to quantity-based addons; it is however NOT exposed to quantity-based plans. .
456
+
457
+ */
458
+
79
459
  unit?:string;
460
+
461
+ /**
462
+ * @description The URL to redirect to once the gift has been claimed by the receiver.
463
+
464
+ */
465
+
80
466
  gift_claim_redirect_url?:string;
467
+
468
+ /**
469
+ * @description The item is included in MRR calculations for your site. This attribute is only applicable for items of &#x60;type &#x3D; charge&#x60; and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude charge-items from MRR calculations, this value is always returned &#x60;false&#x60;.
470
+
471
+ */
472
+
81
473
  included_in_mrr?:boolean;
474
+
475
+ /**
476
+ * @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.
477
+
478
+ */
479
+
82
480
  metered?:boolean;
481
+
482
+ /**
483
+ * @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). . \* sum_of_usages - the net quantity is the sum of the &#x60;quantity&#x60; of all usages for the current term. \* last_usage - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items_item_price_id) with &#x60;usage_date&#x60; within the relevant billing period, the &#x60;quantity&#x60; of the usage record with the most recent &#x60;usage_date&#x60; is taken as the net quantity consumed. \* max_usage - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_subscription_items_item_price_id) with &#x60;usage_date&#x60; within the relevant billing period, the &#x60;quantity&#x60; of the usage record with the maximum value is taken as the net quantity consumed.
484
+
485
+ */
486
+
83
487
  usage_calculation?:'max_usage' | 'sum_of_usages' | 'last_usage';
488
+
489
+ /**
490
+ * @description A set of key-value pairs stored as additional information for the item. [Learn more](./#meta_data).
491
+
492
+ */
493
+
84
494
  metadata?:object;
85
495
  }
86
- export interface DeleteResponse {
87
- item:Item;
496
+ export interface DeleteResponse {
497
+ item:Item;
88
498
  }
89
499
 
90
- export interface RetrieveResponse {
91
- item:Item;
500
+ export interface RetrieveResponse {
501
+ item:Item;
92
502
  }
93
503
 
94
- export interface UpdateResponse {
95
- item:Item;
504
+ export interface UpdateResponse {
505
+ item:Item;
96
506
  }
97
507
  export interface UpdateInputParam {
98
- [key : string] : any;
508
+ [key : string] : any;
509
+ /**
510
+ * @description The display name for the item. Must be unique. This is visible only in Chargebee and not to customers.
511
+
512
+ */
513
+
99
514
  name?:string;
515
+
516
+ /**
517
+ * @description Description of the item. This is visible only in Chargebee and not to customers.
518
+
519
+ */
520
+
100
521
  description?:string;
522
+
523
+ /**
524
+ * @description Indicates that the item is a physical product. If Orders are enabled in Chargebee, subscriptions created for this item will have orders associated with them.
525
+
526
+ */
527
+
101
528
  is_shippable?:boolean;
529
+
530
+ /**
531
+ * @description A unique display name for the item.
532
+
533
+ */
534
+
102
535
  external_name?:string;
536
+
537
+ /**
538
+ * @description The &#x60;id&#x60; of the [Item family](./item_families?prod_cat_ver&#x3D;2) that the item belongs to. Is mandatory when [Product Families](https://www.chargebee.com/docs/2.0/product-families.html) have been enabled.
539
+
540
+ */
541
+
103
542
  item_family_id?:string;
543
+
544
+ /**
545
+ * @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).
546
+
547
+ */
548
+
104
549
  enabled_in_portal?:boolean;
550
+
551
+ /**
552
+ * @description If &#x60;enabled_for_checkout&#x60;, then the URL to be redirected to once the checkout is complete. This parameter is only meant for plan-items.
553
+
554
+ */
555
+
105
556
  redirect_url?:string;
557
+
558
+ /**
559
+ * @description Allow the plan to subscribed to via Checkout. Applies only for plan-items.
560
+ **Note:** Only the in-app version of Checkout is supported for Product Catalog v2.
561
+
562
+ */
563
+
106
564
  enabled_for_checkout?:boolean;
565
+
566
+ /**
567
+ * @description Indicates which addon-items and charge-items can be applied to the item. Only possible for plan-items. Other details of attaching items such as whether to attach as a mandatory item or to attach on a certain event, can be specified using the [Create](./attached_items?prod_cat_ver&#x3D;2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver&#x3D;2#update_an_attached_item) API. \* all - all addon-items and charge-items are applicable to this plan-item. \* restricted - only the addon-items or charge-items provided in &#x60;applicable_items&#x60; can be applied to this plan-item.
568
+
569
+ */
570
+
107
571
  item_applicability?:'all' | 'restricted';
572
+
573
+ /**
574
+ * @description The list of ids of addon-items and charge-items that can be applied to the plan-item. This parameter can be provided only for plan-items and that too when item_applicability is restricted. Other details of attaching items can be specified using the [Create](./attached_items?prod_cat_ver&#x3D;2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver&#x3D;2#update_an_attached_item) API.
575
+
576
+ */
577
+
108
578
  applicable_items?:string[];
579
+
580
+ /**
581
+ * @description The unit of measure for a quantity-based item. This is displayed on the Chargebee UI and on customer facing documents/pages. The latter includes [hosted pages](./hosted_pages?prod_cat_ver&#x3D;2), [invoices](./invoices?prod_cat_ver&#x3D;2) and [quotes](./quotes?prod_cat_ver&#x3D;2#). Examples follow:
582
+
583
+ * &quot;user&quot; for a cloud-collaboration platform.
584
+ * &quot;GB&quot; for a data service.
585
+ * &quot;issue&quot; for a magazine.
586
+
587
+ **Note:** &#x60;unit&#x60; is only exposed via the API to quantity-based addons; it is however NOT exposed to quantity-based plans. .
588
+
589
+ */
590
+
109
591
  unit?:string;
592
+
593
+ /**
594
+ * @description The URL to redirect to once the gift has been claimed by the receiver.
595
+
596
+ */
597
+
110
598
  gift_claim_redirect_url?:string;
599
+
600
+ /**
601
+ * @description A set of key-value pairs stored as additional information for the item. [Learn more](./#meta_data).
602
+
603
+ */
604
+
111
605
  metadata?:object;
606
+
607
+ /**
608
+ * @description The item is included in MRR calculations for your site. This attribute is only applicable for items of &#x60;type &#x3D; charge&#x60; and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude charge-items from MRR calculations, this value is always returned &#x60;false&#x60;.
609
+
610
+ */
611
+
112
612
  included_in_mrr?:boolean;
613
+
614
+ /**
615
+ * @description The status of the item. \* active - The item can be used to create new item prices. \* deleted - Indicates that the item has been [deleted](./items?prod_cat_ver&#x3D;2#delete_an_item). The &#x60;id&#x60; and &#x60;name&#x60; can be reused. Deleted items can be retrieved using [List items](./items?prod_cat_ver&#x3D;2#list_items). \* archived - The item is no longer active and no new item prices can be created
616
+
617
+ */
618
+
113
619
  status?:'archived' | 'active';
114
620
  }
115
- export interface ApplicableItem {
621
+ export interface ApplicableItem {
116
622
  id?:string;
117
623
  }
118
624
  }