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
@@ -96,63 +96,103 @@ declare module 'chargebee' {
96
96
  export namespace DifferentialPrice {
97
97
  export class DifferentialPriceResource {
98
98
  /**
99
- * @description Delete a differential price using a `differential_price_id` and `item_price_id`.
99
+ * @description Create a differential price for addon item price, addon item price with tiered pricing, or charge item price.
100
100
 
101
101
  */
102
102
 
103
- delete(differential_price_id:string, input:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
103
+ create(item_price_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
104
104
 
105
105
  /**
106
- * @description Create a differential price for addon item price, addon item price with tiered pricing, or charge item price.
106
+ * @description Retrieve a differential price using a &#x60;differential_price_id&#x60; and &#x60;item_price_id&#x60;.
107
107
 
108
108
  */
109
109
 
110
- create(item_price_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
110
+ retrieve(differential_price_id:string, input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
111
111
 
112
112
  /**
113
- * @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
113
+ * @description Update a differential price using a &#x60;differential_price_id&#x60; and &#x60;item_price_id&#x60;.
114
114
 
115
115
  */
116
116
 
117
- list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
117
+ update(differential_price_id:string, input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
118
118
 
119
119
  /**
120
- * @description Retrieve a differential price using a &#x60;differential_price_id&#x60; and &#x60;item_price_id&#x60;.
120
+ * @description Delete a differential price using a &#x60;differential_price_id&#x60; and &#x60;item_price_id&#x60;.
121
121
 
122
122
  */
123
123
 
124
- retrieve(differential_price_id:string, input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
124
+ delete(differential_price_id:string, input:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
125
125
 
126
126
  /**
127
- * @description Update a differential price using a &#x60;differential_price_id&#x60; and &#x60;item_price_id&#x60;.
127
+ * @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
128
128
 
129
129
  */
130
130
 
131
- update(differential_price_id:string, input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
131
+ list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
132
132
  }
133
- export interface DeleteResponse {
133
+ export interface CreateResponse {
134
134
  differential_price:DifferentialPrice;
135
135
  }
136
- export interface DeleteInputParam {
136
+ export interface CreateInputParam {
137
137
 
138
138
  /**
139
- * @description The id of the item price (&#x60;addon&#x60; or &#x60;charge&#x60;) whose price should change according to the plan-item it is applied to.
139
+ * @description The id of the plan-item, in relation to which, the differential pricing for the addon or charge is defined. For example, this would be the id of the *Standard* or *Enterprise* plans-items mentioned in the [examples above](./differential_prices?prod_cat_ver&#x3D;2).
140
140
 
141
141
  */
142
142
 
143
+ parent_item_id:string;
144
+
145
+ /**
146
+ * @description The differential price. If the pricing model of the &#x60;item_price_id&#x60; is &#x60;tiered&#x60;, &#x60;volume&#x60;, or &#x60;stairstep&#x60;, pass &#x60;tiers&#x60; instead of this.
147
+
148
+ */
149
+
150
+ price?:number;
151
+
152
+ /**
153
+ * @description The price of the item when the pricing_model is &#x60;flat_fee&#x60;. When the pricing model is &#x60;per_unit&#x60;, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in decimal and in major units of the currency. Also, this is only applicable when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
154
+
155
+ */
156
+
157
+ price_in_decimal?:string;
158
+
159
+ /**
160
+ * @description Parameters for parent_periods
161
+
162
+ */
163
+
164
+ parent_periods?:{period?:any[],period_unit:'week' | 'month' | 'year' | 'day'}[];
165
+
166
+ /**
167
+ * @description Parameters for tiers
168
+
169
+ */
170
+
171
+ tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
172
+ }
173
+ export interface RetrieveResponse {
174
+ differential_price:DifferentialPrice;
175
+ }
176
+ export interface RetrieveInputParam {
177
+
178
+ /**
179
+ * @description Retrieve a differential price using a &#x60;differential_price_id&#x60; and &#x60;item_price_id&#x60;.
180
+
181
+ */
182
+
143
183
  item_price_id:string;
144
184
  }
145
- export interface CreateResponse {
185
+ export interface UpdateResponse {
146
186
  differential_price:DifferentialPrice;
147
187
  }
148
- export interface CreateInputParam {
188
+ export interface UpdateInputParam {
149
189
 
150
190
  /**
151
- * @description The id of the plan-item, in relation to which, the differential pricing for the addon or charge is defined. For example, this would be the id of the *Standard* or *Enterprise* plans-items mentioned in the [examples above](./differential_prices?prod_cat_ver&#x3D;2).
191
+ * @description The id of the item price (&#x60;addon&#x60; or &#x60;charge&#x60;) whose price should change according to the plan-item it is applied to.
152
192
 
153
193
  */
154
194
 
155
- parent_item_id:string;
195
+ item_price_id:string;
156
196
 
157
197
  /**
158
198
  * @description The differential price. If the pricing model of the &#x60;item_price_id&#x60; is &#x60;tiered&#x60;, &#x60;volume&#x60;, or &#x60;stairstep&#x60;, pass &#x60;tiers&#x60; instead of this.
@@ -182,6 +222,18 @@ declare module 'chargebee' {
182
222
 
183
223
  tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
184
224
  }
225
+ export interface DeleteResponse {
226
+ differential_price:DifferentialPrice;
227
+ }
228
+ export interface DeleteInputParam {
229
+
230
+ /**
231
+ * @description The id of the item price (&#x60;addon&#x60; or &#x60;charge&#x60;) whose price should change according to the plan-item it is applied to.
232
+
233
+ */
234
+
235
+ item_price_id:string;
236
+ }
185
237
  export interface ListResponse {
186
238
  /**
187
239
  * @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
@@ -200,105 +252,68 @@ declare module 'chargebee' {
200
252
  export interface ListInputParam {
201
253
  [key : string]: any;
202
254
  /**
203
- * @description The number of resources to be returned.
255
+ * @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
204
256
 
205
257
  */
206
258
 
207
259
  limit?:number;
208
260
 
209
261
  /**
210
- * @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.
262
+ * @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
211
263
 
212
264
  */
213
265
 
214
266
  offset?:string;
215
267
 
216
268
  /**
217
- * @description The id of the item price (&#x60;addon&#x60; or &#x60;charge&#x60;) whose price should change according to the plan-item it is applied to.
269
+ * @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
218
270
 
219
271
  */
220
272
 
221
273
  item_price_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
222
274
 
223
275
  /**
224
- * @description Item Id of Addon / Charge item price for which differential pricing is applied to
276
+ * @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
225
277
 
226
278
  */
227
279
 
228
280
  item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
229
281
 
230
282
  /**
231
- * @description A unique and immutable id for the differential price. It is auto-generated when the differential price is created.
283
+ * @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
232
284
 
233
285
  */
234
286
 
235
287
  id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
236
288
 
237
289
  /**
238
- * @description The id of the plan-item, in relation to which, the differential pricing for the addon or charge is defined. For example, this would be the id of the *Standard* or *Enterprise* plans-items mentioned in the [examples above](./differential_prices?prod_cat_ver&#x3D;2).
290
+ * @description Returns a list of differential prices satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
239
291
 
240
292
  */
241
293
 
242
294
  parent_item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
243
295
  }
244
- export interface RetrieveResponse {
245
- differential_price:DifferentialPrice;
246
- }
247
- export interface RetrieveInputParam {
248
-
249
- /**
250
- * @description Retrieve a differential price using a &#x60;differential_price_id&#x60; and &#x60;item_price_id&#x60;.
251
-
252
- */
253
-
254
- item_price_id:string;
255
- }
256
- export interface UpdateResponse {
257
- differential_price:DifferentialPrice;
258
- }
259
- export interface UpdateInputParam {
260
-
261
- /**
262
- * @description The id of the item price (&#x60;addon&#x60; or &#x60;charge&#x60;) whose price should change according to the plan-item it is applied to.
296
+ export interface Tier {
297
+ /**
298
+ * @description The lower limit of a range of units for the tier
263
299
 
264
- */
300
+ */
265
301
 
266
- item_price_id:string;
302
+ starting_unit:number;
267
303
 
268
- /**
269
- * @description The differential price. If the pricing model of the &#x60;item_price_id&#x60; is &#x60;tiered&#x60;, &#x60;volume&#x60;, or &#x60;stairstep&#x60;, pass &#x60;tiers&#x60; instead of this.
304
+ /**
305
+ * @description The upper limit of a range of units for the tier
270
306
 
271
- */
307
+ */
272
308
 
273
- price?:number;
274
-
275
- /**
276
- * @description The price of the item when the pricing_model is &#x60;flat_fee&#x60;. When the pricing model is &#x60;per_unit&#x60;, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in decimal and in major units of the currency. Also, this is only applicable when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
277
-
278
- */
279
-
280
- price_in_decimal?:string;
281
-
282
- /**
283
- * @description Parameters for parent_periods
284
-
285
- */
286
-
287
- parent_periods?:{period?:any[],period_unit:'week' | 'month' | 'year' | 'day'}[];
309
+ ending_unit?:number;
288
310
 
289
- /**
290
- * @description Parameters for tiers
311
+ /**
312
+ * @description The per-unit price for the tier when the &#x60;pricing_model&#x60; is &#x60;tiered&#x60; or &#x60;volume&#x60;; the total cost for the item price when the &#x60;pricing_model&#x60; is &#x60;stairstep&#x60;. The value is in the [minor unit of the currency](https://apidocs.chargebee.com/docs/api#handling_currency_units).
291
313
 
292
- */
293
-
294
- tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
295
- }
296
- export interface Tier {
297
- starting_unit?:number;
314
+ */
298
315
 
299
- ending_unit?:number;
300
-
301
- price?:number;
316
+ price:number;
302
317
 
303
318
  starting_unit_in_decimal?:string;
304
319
 
@@ -307,7 +322,17 @@ declare module 'chargebee' {
307
322
  price_in_decimal?:string;
308
323
  }
309
324
  export interface ParentPeriod {
310
- period_unit?:'week' | 'month' | 'year' | 'day';
325
+ /**
326
+ * @description The unit of time for &#x60;period&#x60;. \* month - A period of 1 calendar month. \* day - A period of 24 hours. \* week - A period of 7 days. \* year - A period of 1 calendar year.
327
+
328
+ */
329
+
330
+ period_unit:'week' | 'month' | 'year' | 'day';
331
+
332
+ /**
333
+ * @description The billing period of the plan in &#x60;period_unit&#x60;s. For example, a 6 month plan has &#x60;period&#x60; as 6 and &#x60;period_unit&#x60; as &#x60;month&#x60;.
334
+
335
+ */
311
336
 
312
337
  period?:any[];
313
338
  }
@@ -76,14 +76,38 @@ declare module 'chargebee' {
76
76
  }
77
77
  export namespace EntitlementOverride {
78
78
  export class EntitlementOverrideResource {
79
+ /**
80
+ * @description Upserts or removes a set of &#x60;entitlement_overrides&#x60; for a &#x60;subscription&#x60; depending on the &#x60;action&#x60; specified. The API returns the upserted or deleted &#x60;entitlement_overrides&#x60; after successfully completing the operation. The operation returns an error when the first &#x60;entitlement_override&#x60; fails to be processed. Either all the &#x60;entitlement_overrides&#x60; provided in the request are processed or none.
81
+
82
+ */
83
+
84
+ add_entitlement_override_for_subscription(subscription_id:string, input?:AddEntitlementOverrideForSubscriptionInputParam):ChargebeeRequest<AddEntitlementOverrideForSubscriptionResponse>;
85
+
79
86
  /**
80
87
  * @description Retrieve the list of entitlement overrides for a subscription.
81
88
 
82
89
  */
83
90
 
84
91
  list_entitlement_override_for_subscription(subscription_id:string, input?:ListEntitlementOverrideForSubscriptionInputParam):ChargebeeRequest<ListEntitlementOverrideForSubscriptionResponse>;
92
+ }
93
+ export interface AddEntitlementOverrideForSubscriptionResponse {
94
+ entitlement_override:EntitlementOverride;
95
+ }
96
+ export interface AddEntitlementOverrideForSubscriptionInputParam {
85
97
 
86
- add_entitlement_override_for_subscription(subscription_id:string, input?:AddEntitlementOverrideForSubscriptionInputParam):ChargebeeRequest<AddEntitlementOverrideForSubscriptionResponse>;
98
+ /**
99
+ * @description The specific action to be performed for each &#x60;entitlement_override&#x60; specified. . \* remove - Deletes the &#x60;entitlement_override&#x60; for the &#x60;feature_id&#x60; and &#x60;item_id&#x60; combination, if it exists. \* upsert - If the &#x60;entitlement_override&#x60; already exists for the &#x60;feature_id&#x60; and &#x60;{subscription_id}&#x60; combination, the &#x60;value&#x60; of the &#x60;entitlement_override&#x60; is updated. If it doesn&#x27;t exist, a new &#x60;entitlement_override&#x60; is created.
100
+
101
+ */
102
+
103
+ action?:Action;
104
+
105
+ /**
106
+ * @description Parameters for entitlement_overrides
107
+
108
+ */
109
+
110
+ entitlement_overrides?:{expires_at?:number,feature_id:string,value?:string}[];
87
111
  }
88
112
  export interface ListEntitlementOverrideForSubscriptionResponse {
89
113
  /**
@@ -103,28 +127,19 @@ declare module 'chargebee' {
103
127
  export interface ListEntitlementOverrideForSubscriptionInputParam {
104
128
  [key : string]: any;
105
129
  /**
106
- * @description The number of resources to be returned.
130
+ * @description Retrieve the list of entitlement overrides for a subscription.
107
131
 
108
132
  */
109
133
 
110
134
  limit?:number;
111
135
 
112
136
  /**
113
- * @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.
137
+ * @description Retrieve the list of entitlement overrides for a subscription.
114
138
 
115
139
  */
116
140
 
117
141
  offset?:string;
118
142
  }
119
- export interface AddEntitlementOverrideForSubscriptionResponse {
120
- entitlement_override:EntitlementOverride;
121
- }
122
- export interface AddEntitlementOverrideForSubscriptionInputParam {
123
-
124
- action?:Action;
125
-
126
- entitlement_overrides?:{expires_at?:number,feature_id:string,value?:string}[];
127
- }
128
143
 
129
144
  }
130
145
  }