chargebee 2.28.0 → 2.30.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 (54) 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 +59 -0
  7. package/SECURITY.md +8 -0
  8. package/lib/chargebee.js +1 -1
  9. package/lib/resources/api_endpoints.js +0 -14
  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/PaymentReferenceNumber.d.ts +1 -1
  35. package/types/resources/PaymentVoucher.d.ts +74 -59
  36. package/types/resources/PortalSession.d.ts +45 -20
  37. package/types/resources/PromotionalCredit.d.ts +68 -68
  38. package/types/resources/Purchase.d.ts +3 -3
  39. package/types/resources/Quote.d.ts +655 -366
  40. package/types/resources/QuoteLineGroup.d.ts +245 -0
  41. package/types/resources/QuotedCharge.d.ts +170 -0
  42. package/types/resources/QuotedSubscription.d.ts +219 -0
  43. package/types/resources/SiteMigrationDetail.d.ts +7 -7
  44. package/types/resources/Subscription.d.ts +1219 -932
  45. package/types/resources/SubscriptionEntitlement.d.ts +33 -12
  46. package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -1
  47. package/types/resources/TimeMachine.d.ts +15 -15
  48. package/types/resources/Token.d.ts +0 -116
  49. package/types/resources/Transaction.d.ts +229 -112
  50. package/types/resources/UnbilledCharge.d.ts +112 -67
  51. package/types/resources/Usage.d.ts +46 -47
  52. package/types/resources/VirtualBankAccount.d.ts +66 -66
  53. package/types/resources/Media.d.ts +0 -33
  54. package/types/resources/NonSubscription.d.ts +0 -65
@@ -45,7 +45,7 @@ declare module 'chargebee' {
45
45
  unit_amount?:number;
46
46
 
47
47
  /**
48
- * @description The pricing scheme for this line item. \* tiered - The per unit price is based on the tier that the total quantity falls in. \* volume - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers. \* per_unit - A fixed price per unit quantity. \* flat_fee - A fixed price that is not quantity-based. \* stairstep - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.
48
+ * @description The pricing scheme for this line item. \* tiered - The per unit price is based on the tier that the total quantity falls in. \* per_unit - A fixed price per unit quantity. \* flat_fee - A fixed price that is not quantity-based. \* volume - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers. \* stairstep - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.
49
49
 
50
50
  */
51
51
 
@@ -87,7 +87,7 @@ declare module 'chargebee' {
87
87
  description?:string;
88
88
 
89
89
  /**
90
- * @description Specifies the modelled entity this line item is based on. \* plan_setup - Indicates that this lineitem is based on 'Plan Setup' charge. The 'entity_id' attribute specifies the [plan](/docs/api/plans#plan_attributes) id \* charge_item_price - Indicates that this line item is based on charge Item Price \* plan - Indicates that this lineitem is based on 'Plan' entity. The 'entity_id' attribute specifies the [plan](/docs/api/plans#plan_attributes) id \* addon_item_price - Indicates that this line item is based on addon Item Price \* plan_item_price - Indicates that this line item is based on plan Item Price \* adhoc - Indicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case \* addon - Indicates that this lineitem is based on 'Addon' entity. The 'entity_id' attribute specifies the [addon](/docs/api/addons#addon_attributes) id
90
+ * @description Specifies the modelled entity this line item is based on. \* plan_setup - Indicates that this lineitem is based on 'Plan Setup' charge. The 'entity_id' attribute specifies the [plan](/docs/api/plans#plan_attributes) id \* plan - Indicates that this lineitem is based on 'Plan' entity. The 'entity_id' attribute specifies the [plan](/docs/api/plans#plan_attributes) id \* addon_item_price - Indicates that this line item is based on addon Item Price \* plan_item_price - Indicates that this line item is based on plan Item Price \* adhoc - Indicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case \* addon - Indicates that this lineitem is based on 'Addon' entity. The 'entity_id' attribute specifies the [addon](/docs/api/addons#addon_attributes) id \* charge_item_price - Indicates that this line item is based on charge Item Price
91
91
 
92
92
  */
93
93
 
@@ -142,6 +142,11 @@ declare module 'chargebee' {
142
142
 
143
143
  updated_at:number;
144
144
 
145
+ /**
146
+ * @description The value of this parameter will be true if it is a recurring unbilled charge for a future term.
147
+
148
+ */
149
+
145
150
  is_advance_charge?:boolean;
146
151
 
147
152
  /**
@@ -161,30 +166,11 @@ declare module 'chargebee' {
161
166
  export namespace UnbilledCharge {
162
167
  export class UnbilledChargeResource {
163
168
  /**
164
- * @description Use this API to delete an unbilled charge by specifying the id of the charge.
165
-
166
- */
167
-
168
- delete(unbilled_charge_id:string):ChargebeeRequest<DeleteResponse>;
169
-
170
- /**
171
- * @description This is similar to the &quot;Create an invoice for unbilled charges&quot; API but no invoice will be created, only an estimate for this operation is created.
172
-
173
- In the estimate response,
174
-
175
- * **estimate.invoice_estimates** is an array of **estimate.invoice_estimate**. This has the details of the invoices that will be generated now.
176
-
177
- **Note:**
178
-
179
- * This API when invoked does not perform the actual operation. It just generates an estimate.
180
- * Both *subscription_id* and *customer_id* parameters should not be given at the same time.
181
-
182
-
183
-
169
+ * @description This endpoint creates unbilled charges for a subscription.
184
170
 
185
171
  */
186
172
 
187
- invoice_now_estimate(input?:InvoiceNowEstimateInputParam):ChargebeeRequest<InvoiceNowEstimateResponse>;
173
+ create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
188
174
 
189
175
  /**
190
176
  * @description Use this API to bill the [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html). Available Credits and Excess Payments will automatically be applied while creating the invoice.
@@ -207,6 +193,13 @@ If consolidated invoicing is enabled and the parameter &#x27;customer_id&#x27; i
207
193
 
208
194
  invoice_unbilled_charges(input?:InvoiceUnbilledChargesInputParam):ChargebeeRequest<InvoiceUnbilledChargesResponse>;
209
195
 
196
+ /**
197
+ * @description Use this API to delete an unbilled charge by specifying the id of the charge.
198
+
199
+ */
200
+
201
+ delete(unbilled_charge_id:string):ChargebeeRequest<DeleteResponse>;
202
+
210
203
  /**
211
204
  * @description This endpoint lists all the unbilled charges.
212
205
 
@@ -215,34 +208,63 @@ If consolidated invoicing is enabled and the parameter &#x27;customer_id&#x27; i
215
208
  list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
216
209
 
217
210
  /**
218
- * @description This endpoint creates unbilled charges for a subscription.
211
+ * @description This is similar to the &quot;Create an invoice for unbilled charges&quot; API but no invoice will be created, only an estimate for this operation is created.
212
+
213
+ In the estimate response,
214
+
215
+ * **estimate.invoice_estimates** is an array of **estimate.invoice_estimate**. This has the details of the invoices that will be generated now.
216
+
217
+ **Note:**
218
+
219
+ * This API when invoked does not perform the actual operation. It just generates an estimate.
220
+ * Both *subscription_id* and *customer_id* parameters should not be given at the same time.
221
+
222
+
223
+
219
224
 
220
225
  */
221
226
 
222
- create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
223
- }
224
- export interface DeleteResponse {
225
- unbilled_charge:UnbilledCharge;
227
+ invoice_now_estimate(input?:InvoiceNowEstimateInputParam):ChargebeeRequest<InvoiceNowEstimateResponse>;
226
228
  }
227
-
228
- export interface InvoiceNowEstimateResponse {
229
- estimate:Estimate;
229
+ export interface CreateResponse {
230
+ unbilled_charges:UnbilledCharge[];
230
231
  }
231
- export interface InvoiceNowEstimateInputParam {
232
+ export interface CreateInputParam {
232
233
 
233
234
  /**
234
- * @description Identifier of the subscription for which this estimate needs to be created. Should be given if &#x27;customer_id&#x27; is not specified.
235
+ * @description Identifier of the subscription for which this unbilled charges needs to be created.
235
236
 
236
237
  */
237
238
 
238
- subscription_id?:string;
239
+ subscription_id:string;
239
240
 
240
241
  /**
241
- * @description Identifier of the customer for whom this estimate is created. Is given if &#x27;subscription_id&#x27; is not specified. Applicable only if the &#x27;Consolidated Invoicing&#x27; is enabled. If &#x27;Consolidated Invoicing&#x27; is not enabled, an invoice will be generated for every subscription.
242
+ * @description The currency code (ISO 4217 format) of the unbilled_charge.
242
243
 
243
244
  */
244
245
 
245
- customer_id?:string;
246
+ currency_code?:string;
247
+
248
+ /**
249
+ * @description Parameters for item_prices
250
+
251
+ */
252
+
253
+ item_prices?:{date_from?:number,date_to?:number,item_price_id?:string,quantity?:number,quantity_in_decimal?:string,unit_price?:number,unit_price_in_decimal?:string}[];
254
+
255
+ /**
256
+ * @description Parameters for item_tiers
257
+
258
+ */
259
+
260
+ item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
261
+
262
+ /**
263
+ * @description Parameters for charges
264
+
265
+ */
266
+
267
+ charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_tax_code?:string,avalara_transaction_type?:number,date_from?:number,date_to?:number,description?:string,hsn_code?:string,tax_profile_id?:string,taxable?:boolean,taxjar_product_code?:string}[];
246
268
  }
247
269
  export interface InvoiceUnbilledChargesResponse {
248
270
  invoices:Invoice[];
@@ -263,6 +285,10 @@ If consolidated invoicing is enabled and the parameter &#x27;customer_id&#x27; i
263
285
 
264
286
  customer_id?:string;
265
287
  }
288
+ export interface DeleteResponse {
289
+ unbilled_charge:UnbilledCharge;
290
+ }
291
+
266
292
  export interface ListResponse {
267
293
  /**
268
294
  * @description This endpoint lists all the unbilled charges.
@@ -281,21 +307,21 @@ If consolidated invoicing is enabled and the parameter &#x27;customer_id&#x27; i
281
307
  export interface ListInputParam {
282
308
  [key : string]: any;
283
309
  /**
284
- * @description The number of resources to be returned.
310
+ * @description This endpoint lists all the unbilled charges.
285
311
 
286
312
  */
287
313
 
288
314
  limit?:number;
289
315
 
290
316
  /**
291
- * @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.
317
+ * @description This endpoint lists all the unbilled charges.
292
318
 
293
319
  */
294
320
 
295
321
  offset?:string;
296
322
 
297
323
  /**
298
- * @description Indicates whether to include deleted objects in the list. The deleted objects have the attribute \&#x60;deleted\&#x60; as \&#x60;true\&#x60;.
324
+ * @description This endpoint lists all the unbilled charges.
299
325
 
300
326
  */
301
327
 
@@ -309,74 +335,93 @@ If consolidated invoicing is enabled and the parameter &#x27;customer_id&#x27; i
309
335
  is_voided?:boolean;
310
336
 
311
337
  /**
312
- * @description A unique identifier for the subscription this charge belongs to.
338
+ * @description This endpoint lists all the unbilled charges.
313
339
 
314
340
  */
315
341
 
316
342
  subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
317
343
 
318
344
  /**
319
- * @description A unique identifier for the customer being charged.
345
+ * @description This endpoint lists all the unbilled charges.
320
346
 
321
347
  */
322
348
 
323
349
  customer_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
324
350
  }
325
- export interface CreateResponse {
326
- unbilled_charges:UnbilledCharge[];
351
+ export interface InvoiceNowEstimateResponse {
352
+ estimate:Estimate;
327
353
  }
328
- export interface CreateInputParam {
354
+ export interface InvoiceNowEstimateInputParam {
329
355
 
330
356
  /**
331
- * @description Identifier of the subscription for which this unbilled charges needs to be created.
357
+ * @description Identifier of the subscription for which this estimate needs to be created. Should be given if &#x27;customer_id&#x27; is not specified.
332
358
 
333
359
  */
334
360
 
335
- subscription_id:string;
361
+ subscription_id?:string;
336
362
 
337
363
  /**
338
- * @description The currency code (ISO 4217 format) of the unbilled_charge.
364
+ * @description Identifier of the customer for whom this estimate is created. Is given if &#x27;subscription_id&#x27; is not specified. Applicable only if the &#x27;Consolidated Invoicing&#x27; is enabled. If &#x27;Consolidated Invoicing&#x27; is not enabled, an invoice will be generated for every subscription.
339
365
 
340
366
  */
341
367
 
342
- currency_code?:string;
343
-
344
- /**
345
- * @description Parameters for item_prices
368
+ customer_id?:string;
369
+ }
370
+ export interface LineItemTier {
371
+ /**
372
+ * @description The lower limit of a range of units for the tier
346
373
 
347
- */
374
+ */
348
375
 
349
- item_prices?:{date_from?:number,date_to?:number,item_price_id?:string,quantity?:number,quantity_in_decimal?:string,unit_price?:number,unit_price_in_decimal?:string}[];
376
+ starting_unit:number;
350
377
 
351
- /**
352
- * @description Parameters for item_tiers
378
+ /**
379
+ * @description The upper limit of a range of units for the tier
353
380
 
354
- */
381
+ */
355
382
 
356
- item_tiers?:{ending_unit?:number,ending_unit_in_decimal?:string,item_price_id?:string,price?:number,price_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string}[];
383
+ ending_unit?:number;
357
384
 
358
- /**
359
- * @description Parameters for charges
385
+ /**
386
+ * @description The number of units purchased in a range.
360
387
 
361
- */
388
+ */
362
389
 
363
- charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_tax_code?:string,avalara_transaction_type?:number,date_from?:number,date_to?:number,description?:string,hsn_code?:string,tax_profile_id?:string,taxable?:boolean,taxjar_product_code?:string}[];
364
- }
365
- export interface LineItemTier {
366
- starting_unit?:number;
390
+ quantity_used:number;
367
391
 
368
- ending_unit?:number;
392
+ /**
393
+ * @description The price of the tier if the charge model is a &#x60;stairtstep&#x60; pricing , or the price of each unit in the tier if the charge model is &#x60;tiered&#x60;/&#x60;volume&#x60; pricing.
394
+
395
+ */
369
396
 
370
- quantity_used?:number;
397
+ unit_amount:number;
371
398
 
372
- unit_amount?:number;
399
+ /**
400
+ * @description The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as &#x60;ending_unit_in_decimal&#x60; of the next lower tier. Returned only when the &#x60;line_items.pricing_model&#x60; is &#x60;tiered&#x60;, &#x60;volume&#x60; or &#x60;stairstep&#x60; and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
401
+
402
+ */
373
403
 
374
404
  starting_unit_in_decimal?:string;
375
405
 
406
+ /**
407
+ * @description The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the &#x60;starting_unit_in_decimal&#x60; of the next higher tier. Returned only when the &#x60;line_items.pricing_model&#x60; is &#x60;tiered&#x60;, &#x60;volume&#x60; or stairstep and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
408
+
409
+ */
410
+
376
411
  ending_unit_in_decimal?:string;
377
412
 
413
+ /**
414
+ * @description The decimal representation of the quantity purchased from this tier. Returned when the &#x60;line_item&#x60; is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
415
+
416
+ */
417
+
378
418
  quantity_used_in_decimal?:string;
379
419
 
420
+ /**
421
+ * @description The decimal representation of the per-unit price for the tier when the &#x60;pricing_model&#x60; is &#x60;tiered&#x60; or &#x60;volume&#x60;. When the &#x60;pricing_model&#x60; is &#x60;stairstep&#x60;, it is the decimal representation of the total price for &#x60;line_item&#x60;. The value is in major units of the currency. Returned when the &#x60;line_item&#x60; is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
422
+
423
+ */
424
+
380
425
  unit_amount_in_decimal?:string;
381
426
  }
382
427
  }
@@ -90,11 +90,13 @@ declare module 'chargebee' {
90
90
  export namespace Usage {
91
91
  export class UsageResource {
92
92
  /**
93
- * @description Retrieves usages record for an invoice in PDF file format.
93
+ * @description Creates a usage record for an item price in a subscription. The item price must belong to a [metered](/docs/api/items?prod_cat_ver&#x3D;2#item_metered) item.
94
+ **Max Usages**
95
+ The maximum number of usages that can be recorded for the entire lifetime of a subscription is 5000. [Contact Support](https://chargebee.freshdesk.com/support/home) if you want this limit to be increased for your site.
94
96
 
95
97
  */
96
98
 
97
- pdf(input?:PdfInputParam):ChargebeeRequest<PdfResponse>;
99
+ create(subscription_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
98
100
 
99
101
  /**
100
102
  * @description Retrieves a usage record of a specific subscription.
@@ -103,15 +105,6 @@ declare module 'chargebee' {
103
105
 
104
106
  retrieve(subscription_id:string, input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
105
107
 
106
- /**
107
- * @description Creates a usage record for an item price in a subscription. The item price must belong to a [metered](/docs/api/items?prod_cat_ver&#x3D;2#item_metered) item.
108
- **Max Usages**
109
- The maximum number of usages that can be recorded for the entire lifetime of a subscription is 5000. [Contact Support](https://chargebee.freshdesk.com/support/home) if you want this limit to be increased for your site.
110
-
111
- */
112
-
113
- create(subscription_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
114
-
115
108
  /**
116
109
  * @description Deletes a usage record. This operation cannot be invoked for a usage record that has been [invoiced](usages?prod_cat_ver&#x3D;2#invoicing_usages).
117
110
 
@@ -125,37 +118,13 @@ The maximum number of usages that can be recorded for the entire lifetime of a s
125
118
  */
126
119
 
127
120
  list(input:ListInputParam):ChargebeeRequest<ListResponse>;
128
- }
129
- export interface PdfResponse {
130
- download:Download;
131
- }
132
- export interface PdfInputParam {
133
-
134
- /**
135
- * @description Determines the pdf should be rendered as inline or attachment in the browser. \* attachment - PDF is rendered as attachment in the browser \* inline - PDF is rendered as inline in the browser
136
-
137
- */
138
-
139
- disposition_type?:DispositionType;
140
-
141
- /**
142
- * @description Parameters for invoice
143
-
144
- */
145
-
146
- invoice?:{id:string};
147
- }
148
- export interface RetrieveResponse {
149
- usage:Usage;
150
- }
151
- export interface RetrieveInputParam {
152
121
 
153
122
  /**
154
- * @description Retrieves a usage record of a specific subscription.
123
+ * @description Retrieves usages record for an invoice in PDF file format.
155
124
 
156
125
  */
157
-
158
- id:string;
126
+
127
+ pdf(input?:PdfInputParam):ChargebeeRequest<PdfResponse>;
159
128
  }
160
129
  export interface CreateResponse {
161
130
  usage:Usage;
@@ -198,6 +167,18 @@ The maximum number of usages that can be recorded for the entire lifetime of a s
198
167
 
199
168
  note?:string;
200
169
  }
170
+ export interface RetrieveResponse {
171
+ usage:Usage;
172
+ }
173
+ export interface RetrieveInputParam {
174
+
175
+ /**
176
+ * @description Retrieves a usage record of a specific subscription.
177
+
178
+ */
179
+
180
+ id:string;
181
+ }
201
182
  export interface DeleteResponse {
202
183
  usage:Usage;
203
184
  }
@@ -228,57 +209,56 @@ The maximum number of usages that can be recorded for the entire lifetime of a s
228
209
  export interface ListInputParam {
229
210
  [key : string]: any;
230
211
  /**
231
- * @description The number of resources to be returned.
212
+ * @description Retrieves the list of usages.
232
213
 
233
214
  */
234
215
 
235
216
  limit?:number;
236
217
 
237
218
  /**
238
- * @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.
219
+ * @description Retrieves the list of usages.
239
220
 
240
221
  */
241
222
 
242
223
  offset?:string;
243
224
 
244
225
  /**
245
- * @description A unique and immutable id for the usage. If not provided, it is autogenerated.
226
+ * @description Retrieves the list of usages.
246
227
 
247
228
  */
248
229
 
249
230
  id?:{is?:string,is_not?:string,starts_with?:string};
250
231
 
251
232
  /**
252
- * @description The id of the [subscription](/docs/api/subscriptions?prod_cat_ver&#x3D;2) to which this usage record belongs.
233
+ * @description Retrieves the list of usages.
253
234
 
254
235
  */
255
236
 
256
237
  subscription_id:{is?:string,is_not?:string,starts_with?:string};
257
238
 
258
239
  /**
259
- * @description The time at which this usage occurred. Chargebee bills only those usages whose &#x60;usage_date&#x60; falls within a time when the subscription &#x60;status&#x60; was &#x60;active&#x60; or &#x60;non_renewing&#x60;. However, the remaining usage records are still stored and are [retrievable](/docs/api/usages?prod_cat_ver&#x3D;2#retrieve_a_usage).
260
- **Note:** If &#x60;usage_date&#x60; corresponds to a time already invoiced, then it is stored but never invoiced unless the [invoice is regenerated](/docs/api/subscriptions?prod_cat_ver&#x3D;2#regenerate_an_invoice).
240
+ * @description Retrieves the list of usages.
261
241
 
262
242
  */
263
243
 
264
244
  usage_date?:{after?:string,before?:string,between?:string,on?:string};
265
245
 
266
246
  /**
267
- * @description The id of the [item price](/docs/api/item_prices?prod_cat_ver&#x3D;2) to which this usage belongs. The item price must be a part of the subscription or should have been part of it historically.
247
+ * @description Retrieves the list of usages.
268
248
 
269
249
  */
270
250
 
271
251
  item_price_id?:{is?:string,is_not?:string,starts_with?:string};
272
252
 
273
253
  /**
274
- * @description When the usage has been invoiced, this is the &#x60;id&#x60; of the [invoice](/docs/api/invoices?prod_cat_ver&#x3D;2). This is cleared when the invoice is &#x60;voided&#x60; or deleted.
254
+ * @description Retrieves the list of usages.
275
255
 
276
256
  */
277
257
 
278
258
  invoice_id?:{is?:string,is_not?:string,is_present?:'true' | 'false',starts_with?:string};
279
259
 
280
260
  /**
281
- * @description The source from which the usage record was created.
261
+ * @description Retrieves the list of usages.
282
262
 
283
263
  */
284
264
 
@@ -291,6 +271,25 @@ The maximum number of usages that can be recorded for the entire lifetime of a s
291
271
 
292
272
  sort_by?:{asc?:'usage_date',desc?:'usage_date'};
293
273
  }
274
+ export interface PdfResponse {
275
+ download:Download;
276
+ }
277
+ export interface PdfInputParam {
278
+
279
+ /**
280
+ * @description Determines the pdf should be rendered as inline or attachment in the browser. \* attachment - PDF is rendered as attachment in the browser \* inline - PDF is rendered as inline in the browser
281
+
282
+ */
283
+
284
+ disposition_type?:DispositionType;
285
+
286
+ /**
287
+ * @description Parameters for invoice
288
+
289
+ */
290
+
291
+ invoice?:{id:string};
292
+ }
294
293
 
295
294
  }
296
295
  }