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.
- package/.github/ISSUE_TEMPLATE/bug_report.yml +81 -0
- package/.github/ISSUE_TEMPLATE/config.yml +6 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +34 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +8 -0
- package/.github/workflows/greeting.yml +47 -0
- package/CHANGELOG.md +59 -0
- package/SECURITY.md +8 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +0 -14
- package/package.json +1 -1
- package/types/core.d.ts +4 -4
- package/types/resources/AttachedItem.d.ts +88 -88
- package/types/resources/Card.d.ts +68 -68
- package/types/resources/Comment.d.ts +50 -44
- package/types/resources/Coupon.d.ts +242 -207
- package/types/resources/CouponSet.d.ts +72 -68
- package/types/resources/CreditNote.d.ts +612 -236
- package/types/resources/Customer.d.ts +655 -513
- package/types/resources/DifferentialPrice.d.ts +99 -74
- package/types/resources/EntitlementOverride.d.ts +27 -12
- package/types/resources/Estimate.d.ts +450 -450
- package/types/resources/Event.d.ts +30 -12
- package/types/resources/Export.d.ts +200 -200
- package/types/resources/Feature.d.ts +66 -35
- package/types/resources/Gift.d.ts +54 -44
- package/types/resources/HostedPage.d.ts +381 -381
- package/types/resources/InAppSubscription.d.ts +94 -90
- package/types/resources/Invoice.d.ts +1242 -660
- package/types/resources/Item.d.ts +148 -142
- package/types/resources/ItemEntitlement.d.ts +36 -36
- package/types/resources/ItemFamily.d.ts +45 -45
- package/types/resources/ItemPrice.d.ts +317 -273
- package/types/resources/PaymentIntent.d.ts +60 -60
- package/types/resources/PaymentReferenceNumber.d.ts +1 -1
- package/types/resources/PaymentVoucher.d.ts +74 -59
- package/types/resources/PortalSession.d.ts +45 -20
- package/types/resources/PromotionalCredit.d.ts +68 -68
- package/types/resources/Purchase.d.ts +3 -3
- package/types/resources/Quote.d.ts +655 -366
- package/types/resources/QuoteLineGroup.d.ts +245 -0
- package/types/resources/QuotedCharge.d.ts +170 -0
- package/types/resources/QuotedSubscription.d.ts +219 -0
- package/types/resources/SiteMigrationDetail.d.ts +7 -7
- package/types/resources/Subscription.d.ts +1219 -932
- package/types/resources/SubscriptionEntitlement.d.ts +33 -12
- package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -1
- package/types/resources/TimeMachine.d.ts +15 -15
- package/types/resources/Token.d.ts +0 -116
- package/types/resources/Transaction.d.ts +229 -112
- package/types/resources/UnbilledCharge.d.ts +112 -67
- package/types/resources/Usage.d.ts +46 -47
- package/types/resources/VirtualBankAccount.d.ts +66 -66
- package/types/resources/Media.d.ts +0 -33
- 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. \*
|
|
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 \*
|
|
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
|
|
165
|
-
|
|
166
|
-
*/
|
|
167
|
-
|
|
168
|
-
delete(unbilled_charge_id:string):ChargebeeRequest<DeleteResponse>;
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* @description This is similar to the "Create an invoice for unbilled charges" 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
|
-
|
|
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 'customer_id' 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 'customer_id' i
|
|
|
215
208
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
216
209
|
|
|
217
210
|
/**
|
|
218
|
-
* @description This
|
|
211
|
+
* @description This is similar to the "Create an invoice for unbilled charges" 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
|
-
|
|
223
|
-
}
|
|
224
|
-
export interface DeleteResponse {
|
|
225
|
-
unbilled_charge:UnbilledCharge;
|
|
227
|
+
invoice_now_estimate(input?:InvoiceNowEstimateInputParam):ChargebeeRequest<InvoiceNowEstimateResponse>;
|
|
226
228
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
estimate:Estimate;
|
|
229
|
+
export interface CreateResponse {
|
|
230
|
+
unbilled_charges:UnbilledCharge[];
|
|
230
231
|
}
|
|
231
|
-
export interface
|
|
232
|
+
export interface CreateInputParam {
|
|
232
233
|
|
|
233
234
|
/**
|
|
234
|
-
* @description Identifier of the subscription for which this
|
|
235
|
+
* @description Identifier of the subscription for which this unbilled charges needs to be created.
|
|
235
236
|
|
|
236
237
|
*/
|
|
237
238
|
|
|
238
|
-
subscription_id
|
|
239
|
+
subscription_id:string;
|
|
239
240
|
|
|
240
241
|
/**
|
|
241
|
-
* @description
|
|
242
|
+
* @description The currency code (ISO 4217 format) of the unbilled_charge.
|
|
242
243
|
|
|
243
244
|
*/
|
|
244
245
|
|
|
245
|
-
|
|
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 'customer_id' 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 'customer_id' i
|
|
|
281
307
|
export interface ListInputParam {
|
|
282
308
|
[key : string]: any;
|
|
283
309
|
/**
|
|
284
|
-
* @description
|
|
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
|
|
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
|
|
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 'customer_id' i
|
|
|
309
335
|
is_voided?:boolean;
|
|
310
336
|
|
|
311
337
|
/**
|
|
312
|
-
* @description
|
|
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
|
|
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
|
|
326
|
-
|
|
351
|
+
export interface InvoiceNowEstimateResponse {
|
|
352
|
+
estimate:Estimate;
|
|
327
353
|
}
|
|
328
|
-
export interface
|
|
354
|
+
export interface InvoiceNowEstimateInputParam {
|
|
329
355
|
|
|
330
356
|
/**
|
|
331
|
-
* @description Identifier of the subscription for which this
|
|
357
|
+
* @description Identifier of the subscription for which this estimate needs to be created. Should be given if 'customer_id' is not specified.
|
|
332
358
|
|
|
333
359
|
*/
|
|
334
360
|
|
|
335
|
-
subscription_id
|
|
361
|
+
subscription_id?:string;
|
|
336
362
|
|
|
337
363
|
/**
|
|
338
|
-
* @description
|
|
364
|
+
* @description Identifier of the customer for whom this estimate is created. Is given if 'subscription_id' is not specified. Applicable only if the 'Consolidated Invoicing' is enabled. If 'Consolidated Invoicing' is not enabled, an invoice will be generated for every subscription.
|
|
339
365
|
|
|
340
366
|
*/
|
|
341
367
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
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
|
-
|
|
376
|
+
starting_unit:number;
|
|
350
377
|
|
|
351
|
-
|
|
352
|
-
|
|
378
|
+
/**
|
|
379
|
+
* @description The upper limit of a range of units for the tier
|
|
353
380
|
|
|
354
|
-
|
|
381
|
+
*/
|
|
355
382
|
|
|
356
|
-
|
|
383
|
+
ending_unit?:number;
|
|
357
384
|
|
|
358
|
-
|
|
359
|
-
|
|
385
|
+
/**
|
|
386
|
+
* @description The number of units purchased in a range.
|
|
360
387
|
|
|
361
|
-
|
|
388
|
+
*/
|
|
362
389
|
|
|
363
|
-
|
|
364
|
-
}
|
|
365
|
-
export interface LineItemTier {
|
|
366
|
-
starting_unit?:number;
|
|
390
|
+
quantity_used:number;
|
|
367
391
|
|
|
368
|
-
|
|
392
|
+
/**
|
|
393
|
+
* @description The price of the tier if the charge model is a `stairtstep` pricing , or the price of each unit in the tier if the charge model is `tiered`/`volume` pricing.
|
|
394
|
+
|
|
395
|
+
*/
|
|
369
396
|
|
|
370
|
-
|
|
397
|
+
unit_amount:number;
|
|
371
398
|
|
|
372
|
-
|
|
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 `ending_unit_in_decimal` of the next lower tier. Returned only when the `line_items.pricing_model` is `tiered`, `volume` or `stairstep` 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 `starting_unit_in_decimal` of the next higher tier. Returned only when the `line_items.pricing_model` is `tiered`, `volume` 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 `line_item` 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 `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for `line_item`. The value is in major units of the currency. Returned when the `line_item` 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
|
|
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=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
|
-
|
|
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=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=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
|
|
123
|
+
* @description Retrieves usages record for an invoice in PDF file format.
|
|
155
124
|
|
|
156
125
|
*/
|
|
157
|
-
|
|
158
|
-
|
|
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
|
|
212
|
+
* @description Retrieves the list of usages.
|
|
232
213
|
|
|
233
214
|
*/
|
|
234
215
|
|
|
235
216
|
limit?:number;
|
|
236
217
|
|
|
237
218
|
/**
|
|
238
|
-
* @description
|
|
219
|
+
* @description Retrieves the list of usages.
|
|
239
220
|
|
|
240
221
|
*/
|
|
241
222
|
|
|
242
223
|
offset?:string;
|
|
243
224
|
|
|
244
225
|
/**
|
|
245
|
-
* @description
|
|
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
|
|
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
|
|
260
|
-
**Note:** If `usage_date` corresponds to a time already invoiced, then it is stored but never invoiced unless the [invoice is regenerated](/docs/api/subscriptions?prod_cat_ver=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
|
|
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
|
|
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
|
|
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
|
}
|