chargebee 2.35.0 → 2.36.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/CHANGELOG.md +59 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +18 -17
- package/package.json +1 -1
- package/types/index.d.ts +4 -2
- package/types/resources/BusinessEntity.d.ts +83 -0
- package/types/resources/BusinessEntityTransfer.d.ts +21 -0
- package/types/resources/CreditNote.d.ts +7 -0
- package/types/resources/Customer.d.ts +164 -1630
- package/types/resources/Estimate.d.ts +187 -1159
- package/types/resources/Invoice.d.ts +9 -0
- package/types/resources/ItemPrice.d.ts +3 -0
- package/types/resources/Quote.d.ts +289 -1399
- package/types/resources/Subscription.d.ts +2 -0
- package/types/resources/UnbilledCharge.d.ts +28 -275
- package/.github/workflows/greeting.yml +0 -47
|
@@ -2,375 +2,122 @@
|
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface Quote {
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* @description The quote number. Acts as a identifier for quote and typically generated sequentially.
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
5
|
id:string;
|
|
11
6
|
|
|
12
|
-
/**
|
|
13
|
-
* @description The quote name will be used as the pdf name of the quote.
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
7
|
name?:string;
|
|
18
8
|
|
|
19
|
-
/**
|
|
20
|
-
* @description Purchase Order Number
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
9
|
po_number?:string;
|
|
25
10
|
|
|
26
|
-
/**
|
|
27
|
-
* @description The identifier of the customer this quote belongs to.
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
11
|
customer_id:string;
|
|
32
12
|
|
|
33
|
-
/**
|
|
34
|
-
* @description The identifier of the subscription this quote belongs to.
|
|
35
|
-
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
13
|
subscription_id?:string;
|
|
39
14
|
|
|
40
|
-
/**
|
|
41
|
-
* @description The identifier of the invoice generated while converting this quote.
|
|
42
|
-
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
15
|
invoice_id?:string;
|
|
46
16
|
|
|
47
|
-
|
|
48
|
-
* @description Current status of this quote. \* open - Open \* invoiced - Invoiced \* accepted - Accepted. \* closed - Closed \* declined - Declined.
|
|
49
|
-
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
|
-
status:'declined' | 'invoiced' | 'accepted' | 'closed' | 'open';
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @description Operation Type \* onetime_invoice - onetime_invoice \* create_subscription_for_customer - create_subscription_for_customer \* change_subscription - change_subscription
|
|
56
|
-
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
operation_type:'onetime_invoice' | 'change_subscription' | 'create_subscription_for_customer';
|
|
17
|
+
status:'open' | 'accepted' | 'declined' | 'invoiced' | 'closed';
|
|
60
18
|
|
|
61
|
-
|
|
62
|
-
* @description VAT/ Tax registration number of the customer. [Learn more](https://www.chargebee.com/docs/tax.html#capture-tax-registration-number)
|
|
63
|
-
|
|
64
|
-
*/
|
|
19
|
+
operation_type:'create_subscription_for_customer' | 'change_subscription' | 'onetime_invoice';
|
|
65
20
|
|
|
66
21
|
vat_number?:string;
|
|
67
22
|
|
|
68
|
-
/**
|
|
69
|
-
* @description The price type of the quote. \* tax_inclusive - All amounts in the document are inclusive of tax. \* tax_exclusive - All amounts in the document are exclusive of tax.
|
|
70
|
-
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
23
|
price_type:PriceType;
|
|
74
24
|
|
|
75
|
-
/**
|
|
76
|
-
* @description Quote will be valid till this date. After this date quote will be marked as closed.
|
|
77
|
-
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
25
|
valid_till:number;
|
|
81
26
|
|
|
82
|
-
/**
|
|
83
|
-
* @description Creation date of the quote. Typically this is the date on which quote is generated.
|
|
84
|
-
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
27
|
date:number;
|
|
88
28
|
|
|
89
|
-
/**
|
|
90
|
-
* @description Total contract value. Applicable when multi billing cycle quote is enabled.
|
|
91
|
-
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
29
|
total_payable?:number;
|
|
95
30
|
|
|
96
|
-
/**
|
|
97
|
-
* @description Charge on acceptance. Applicable when multi billing cycle quote is enabled.
|
|
98
|
-
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
31
|
charge_on_acceptance?:number;
|
|
102
32
|
|
|
103
|
-
/**
|
|
104
|
-
* @description Subtotal (in cents) of the first quote line group.
|
|
105
|
-
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
33
|
sub_total:number;
|
|
109
34
|
|
|
110
|
-
/**
|
|
111
|
-
* @description Total (in cents) of the first quote line group.
|
|
112
|
-
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
35
|
total?:number;
|
|
116
36
|
|
|
117
|
-
/**
|
|
118
|
-
* @description Credits applied (in cents) for the first quote line group.
|
|
119
|
-
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
37
|
credits_applied?:number;
|
|
123
38
|
|
|
124
|
-
/**
|
|
125
|
-
* @description Existing outstanding payments (in cents) if any, applied to the first quote line group.
|
|
126
|
-
|
|
127
|
-
*/
|
|
128
|
-
|
|
129
39
|
amount_paid?:number;
|
|
130
40
|
|
|
131
|
-
/**
|
|
132
|
-
* @description Amount due (in cents) for the first quote line group.
|
|
133
|
-
|
|
134
|
-
*/
|
|
135
|
-
|
|
136
41
|
amount_due?:number;
|
|
137
42
|
|
|
138
|
-
/**
|
|
139
|
-
* @description Version of the quote.
|
|
140
|
-
|
|
141
|
-
*/
|
|
142
|
-
|
|
143
43
|
version?:number;
|
|
144
44
|
|
|
145
|
-
/**
|
|
146
|
-
* @description Version number of this resource. The `resource_version` is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
|
|
147
|
-
|
|
148
|
-
*/
|
|
149
|
-
|
|
150
45
|
resource_version?:number;
|
|
151
46
|
|
|
152
|
-
/**
|
|
153
|
-
* @description Timestamp indicating when this quote was last updated.
|
|
154
|
-
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
47
|
updated_at?:number;
|
|
158
48
|
|
|
159
|
-
/**
|
|
160
|
-
* @description An overridden value for the first two characters of the [full VAT
|
|
161
|
-
number](https://en.wikipedia.org/wiki/VAT_identification_number). Only applicable specifically for customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ).
|
|
162
|
-
|
|
163
|
-
When you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually
|
|
164
|
-
enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address) `country` as `XI`. That's the code for **United Kingdom - Northern
|
|
165
|
-
Ireland** . The first two characters of the VAT number in such a case is `XI` by default. However, if the VAT number was registered in UK, the value should be `GB`. Set `vat_number_prefix` to `GB` for such cases.
|
|
166
|
-
|
|
167
|
-
*/
|
|
168
|
-
|
|
169
49
|
vat_number_prefix?:string;
|
|
170
50
|
|
|
171
|
-
/**
|
|
172
|
-
* @description Specifies the customer's category for the Goods and Services Tax (GST). This field is returned only if you've configured GST for the India region.
|
|
173
|
-
|
|
174
|
-
*/
|
|
175
|
-
|
|
176
|
-
tax_category?:string;
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* @description The currency code (ISO 4217 format) of the quote.
|
|
180
|
-
|
|
181
|
-
*/
|
|
182
|
-
|
|
183
|
-
currency_code:string;
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* @description List of notes associated with this quotes.
|
|
187
|
-
|
|
188
|
-
*/
|
|
189
|
-
|
|
190
|
-
notes?:any[];
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* @description Specifies the contract term's start date.
|
|
194
|
-
|
|
195
|
-
*/
|
|
196
|
-
|
|
197
|
-
contract_term_start?:number;
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* @description Specifies the contract term's end date. It indicates when the action set in `action_at_term_end` gets triggered.
|
|
201
|
-
|
|
202
|
-
*/
|
|
203
|
-
|
|
204
|
-
contract_term_end?:number;
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* @description Specifies the charge to be applied for terminating the contract term.
|
|
208
|
-
|
|
209
|
-
*/
|
|
210
|
-
|
|
211
|
-
contract_term_termination_fee?:number;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* @description The unique ID of the [business entity](/docs/api/advanced-features?prod_cat_ver=2#mbe) of this quote.
|
|
215
|
-
|
|
216
|
-
*/
|
|
217
|
-
|
|
218
|
-
business_entity_id:string;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* @description The list of line items for this quote.
|
|
222
|
-
|
|
223
|
-
*/
|
|
224
|
-
|
|
225
51
|
line_items?:Quote.LineItem[];
|
|
226
52
|
|
|
227
|
-
/**
|
|
228
|
-
* @description The list of all deductions applied to the quote.
|
|
229
|
-
|
|
230
|
-
*/
|
|
231
|
-
|
|
232
53
|
discounts?:Quote.Discount[];
|
|
233
54
|
|
|
234
|
-
/**
|
|
235
|
-
* @description The list of deductions applied for each line item of this quote.
|
|
236
|
-
|
|
237
|
-
*/
|
|
238
|
-
|
|
239
55
|
line_item_discounts?:Quote.LineItemDiscount[];
|
|
240
56
|
|
|
241
|
-
/**
|
|
242
|
-
* @description The list of taxes applicable for this quote.
|
|
243
|
-
|
|
244
|
-
*/
|
|
245
|
-
|
|
246
57
|
taxes?:Quote.Tax[];
|
|
247
58
|
|
|
248
|
-
/**
|
|
249
|
-
* @description The list of taxes applied on the line items of this quote.
|
|
250
|
-
|
|
251
|
-
*/
|
|
252
|
-
|
|
253
59
|
line_item_taxes?:Quote.LineItemTax[];
|
|
254
60
|
|
|
255
|
-
/**
|
|
256
|
-
* @description The list of tiers applicable for the various line items in this quote.
|
|
257
|
-
|
|
258
|
-
*/
|
|
259
|
-
|
|
260
61
|
line_item_tiers?:Quote.LineItemTier[];
|
|
261
62
|
|
|
262
|
-
|
|
263
|
-
* @description Shipping address for the quote.
|
|
264
|
-
|
|
265
|
-
*/
|
|
63
|
+
tax_category?:string;
|
|
266
64
|
|
|
267
|
-
|
|
65
|
+
currency_code:string;
|
|
268
66
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
*/
|
|
67
|
+
notes?:any[];
|
|
68
|
+
|
|
69
|
+
shipping_address?:Quote.ShippingAddress;
|
|
273
70
|
|
|
274
71
|
billing_address?:Quote.BillingAddress;
|
|
72
|
+
|
|
73
|
+
contract_term_start?:number;
|
|
74
|
+
|
|
75
|
+
contract_term_end?:number;
|
|
76
|
+
|
|
77
|
+
contract_term_termination_fee?:number;
|
|
78
|
+
|
|
79
|
+
business_entity_id:string;
|
|
275
80
|
}
|
|
276
81
|
export namespace Quote {
|
|
277
82
|
export class QuoteResource {
|
|
278
|
-
/**
|
|
279
|
-
* @description Retrieves the quotes identified by the 'number' specified in the url.
|
|
280
|
-
|
|
281
|
-
*/
|
|
282
|
-
|
|
283
83
|
retrieve(quote_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
284
84
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
85
|
+
create_sub_for_customer_quote(customer_id:string, input:CreateSubForCustomerQuoteInputParam):ChargebeeRequest<CreateSubForCustomerQuoteResponse>;
|
|
86
|
+
|
|
87
|
+
edit_create_sub_for_customer_quote(quote_id:string, input:EditCreateSubForCustomerQuoteInputParam):ChargebeeRequest<EditCreateSubForCustomerQuoteResponse>;
|
|
88
|
+
|
|
89
|
+
update_subscription_quote(input:UpdateSubscriptionQuoteInputParam):ChargebeeRequest<UpdateSubscriptionQuoteResponse>;
|
|
90
|
+
|
|
91
|
+
edit_update_subscription_quote(quote_id:string, input?:EditUpdateSubscriptionQuoteInputParam):ChargebeeRequest<EditUpdateSubscriptionQuoteResponse>;
|
|
92
|
+
|
|
93
|
+
create_for_onetime_charges(input:CreateForOnetimeChargesInputParam):ChargebeeRequest<CreateForOnetimeChargesResponse>;
|
|
94
|
+
|
|
95
|
+
edit_one_time_quote(quote_id:string, input?:EditOneTimeQuoteInputParam):ChargebeeRequest<EditOneTimeQuoteResponse>;
|
|
96
|
+
|
|
290
97
|
create_sub_items_for_customer_quote(customer_id:string, input:CreateSubItemsForCustomerQuoteInputParam):ChargebeeRequest<CreateSubItemsForCustomerQuoteResponse>;
|
|
291
98
|
|
|
292
|
-
/**
|
|
293
|
-
* @description Changes the quote produced for creating a new subscription items
|
|
294
|
-
|
|
295
|
-
*/
|
|
296
|
-
|
|
297
99
|
edit_create_sub_customer_quote_for_items(quote_id:string, input:EditCreateSubCustomerQuoteForItemsInputParam):ChargebeeRequest<EditCreateSubCustomerQuoteForItemsResponse>;
|
|
298
100
|
|
|
299
|
-
/**
|
|
300
|
-
* @description Create a quote for updating subscription line items.
|
|
301
|
-
|
|
302
|
-
*/
|
|
303
|
-
|
|
304
101
|
update_subscription_quote_for_items(input:UpdateSubscriptionQuoteForItemsInputParam):ChargebeeRequest<UpdateSubscriptionQuoteForItemsResponse>;
|
|
305
102
|
|
|
306
|
-
/**
|
|
307
|
-
* @description Changes the quote produced for updating the subscription items.
|
|
308
|
-
|
|
309
|
-
*/
|
|
310
|
-
|
|
311
103
|
edit_update_subscription_quote_for_items(quote_id:string, input:EditUpdateSubscriptionQuoteForItemsInputParam):ChargebeeRequest<EditUpdateSubscriptionQuoteForItemsResponse>;
|
|
312
104
|
|
|
313
|
-
/**
|
|
314
|
-
* @description Creates a quote using charge-items and one-time charges.
|
|
315
|
-
|
|
316
|
-
*/
|
|
317
|
-
|
|
318
105
|
create_for_charge_items_and_charges(input:CreateForChargeItemsAndChargesInputParam):ChargebeeRequest<CreateForChargeItemsAndChargesResponse>;
|
|
319
106
|
|
|
320
|
-
/**
|
|
321
|
-
* @description Changes the quote produced for adding one-time charges and charge items.
|
|
322
|
-
|
|
323
|
-
*/
|
|
324
|
-
|
|
325
107
|
edit_for_charge_items_and_charges(quote_id:string, input:EditForChargeItemsAndChargesInputParam):ChargebeeRequest<EditForChargeItemsAndChargesResponse>;
|
|
326
108
|
|
|
327
|
-
/**
|
|
328
|
-
* @description List all quotes.
|
|
329
|
-
|
|
330
|
-
*/
|
|
331
|
-
|
|
332
109
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
333
110
|
|
|
334
|
-
/**
|
|
335
|
-
* @description This API retrieves all the quote line groups and lineitems for a quote.
|
|
336
|
-
|
|
337
|
-
*/
|
|
338
|
-
|
|
339
111
|
quote_line_groups_for_quote(quote_id:string, input?:QuoteLineGroupsForQuoteInputParam):ChargebeeRequest<QuoteLineGroupsForQuoteResponse>;
|
|
340
112
|
|
|
341
|
-
/**
|
|
342
|
-
* @description This API is to convert a quote to an invoice.
|
|
343
|
-
|
|
344
|
-
*/
|
|
345
|
-
|
|
346
113
|
convert(quote_id:string, input?:ConvertInputParam):ChargebeeRequest<ConvertResponse>;
|
|
347
114
|
|
|
348
|
-
/**
|
|
349
|
-
* @description Updates the status of the quote. Status can be updated to Accepted, Declined, and Closed.
|
|
350
|
-
|
|
351
|
-
*/
|
|
352
|
-
|
|
353
115
|
update_status(quote_id:string, input:UpdateStatusInputParam):ChargebeeRequest<UpdateStatusResponse>;
|
|
354
116
|
|
|
355
|
-
/**
|
|
356
|
-
* @description Can be used to extend the expiry date of a quote.
|
|
357
|
-
|
|
358
|
-
*/
|
|
359
|
-
|
|
360
117
|
extend_expiry_date(quote_id:string, input:ExtendExpiryDateInputParam):ChargebeeRequest<ExtendExpiryDateResponse>;
|
|
361
118
|
|
|
362
|
-
/**
|
|
363
|
-
* @description Delete a quote using this API.
|
|
364
|
-
|
|
365
|
-
*/
|
|
366
|
-
|
|
367
119
|
delete(quote_id:string, input?:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
|
|
368
120
|
|
|
369
|
-
/**
|
|
370
|
-
* @description Retrieves the quote as a PDF. The returned URL is secure, allows download and expires in 60 minutes.
|
|
371
|
-
|
|
372
|
-
*/
|
|
373
|
-
|
|
374
121
|
pdf(quote_id:string, input?:PdfInputParam):ChargebeeRequest<PdfResponse>;
|
|
375
122
|
}
|
|
376
123
|
export interface RetrieveResponse {
|
|
@@ -381,875 +128,555 @@ Ireland** . The first two characters of the VAT number in such a case is `X
|
|
|
381
128
|
quoted_charge?:QuotedCharge;
|
|
382
129
|
}
|
|
383
130
|
|
|
384
|
-
export interface
|
|
131
|
+
export interface CreateSubForCustomerQuoteResponse {
|
|
385
132
|
quote:Quote;
|
|
386
133
|
|
|
387
134
|
quoted_subscription?:QuotedSubscription;
|
|
388
135
|
}
|
|
389
|
-
export interface
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* @description The quote name will be used as the pdf name of the quote.
|
|
393
|
-
|
|
394
|
-
*/
|
|
136
|
+
export interface CreateSubForCustomerQuoteInputParam {
|
|
395
137
|
|
|
396
|
-
|
|
138
|
+
subscription:null.null;
|
|
397
139
|
|
|
398
|
-
|
|
399
|
-
* @description Notes specific to this quote that you want customers to see on the quote PDF.
|
|
400
|
-
|
|
401
|
-
*/
|
|
140
|
+
shipping_address?:null.null;
|
|
402
141
|
|
|
403
|
-
|
|
142
|
+
contract_term?:null.null;
|
|
404
143
|
|
|
405
|
-
|
|
406
|
-
* @description Quotes will be vaild till this date. After this quote will be marked as closed.
|
|
407
|
-
|
|
408
|
-
*/
|
|
144
|
+
addons?:{billing_cycles?:number,id?:string,quantity?:number,quantity_in_decimal?:string,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
409
145
|
|
|
410
|
-
|
|
146
|
+
event_based_addons?:{charge_on?:ChargeOn,charge_once?:boolean,id?:string,on_event?:OnEvent,quantity?:number,quantity_in_decimal?:string,service_period_in_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
411
147
|
|
|
412
|
-
|
|
413
|
-
* @description The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver=2#item_price_billing_cycles) is used.
|
|
414
|
-
|
|
415
|
-
*/
|
|
148
|
+
name?:string;
|
|
416
149
|
|
|
417
|
-
|
|
150
|
+
notes?:string;
|
|
418
151
|
|
|
419
|
-
|
|
420
|
-
* @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription.
|
|
421
|
-
|
|
422
|
-
*/
|
|
152
|
+
expires_at?:number;
|
|
423
153
|
|
|
424
|
-
|
|
154
|
+
billing_cycles?:number;
|
|
425
155
|
|
|
426
|
-
|
|
427
|
-
* @description The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).
|
|
428
|
-
|
|
429
|
-
*/
|
|
156
|
+
mandatory_addons_to_remove?:string[];
|
|
430
157
|
|
|
431
158
|
terms_to_charge?:number;
|
|
432
159
|
|
|
433
|
-
/**
|
|
434
|
-
* @description Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..
|
|
435
|
-
|
|
436
|
-
*/
|
|
437
|
-
|
|
438
160
|
billing_alignment_mode?:BillingAlignmentMode;
|
|
439
161
|
|
|
440
|
-
/**
|
|
441
|
-
* @description Identifier of the coupon as a List. Coupon Codes can also be passed.
|
|
442
|
-
|
|
443
|
-
*/
|
|
444
|
-
|
|
445
162
|
coupon_ids?:string[];
|
|
163
|
+
}
|
|
164
|
+
export interface EditCreateSubForCustomerQuoteResponse {
|
|
165
|
+
quote:Quote;
|
|
446
166
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
*/
|
|
167
|
+
quoted_subscription?:QuotedSubscription;
|
|
168
|
+
}
|
|
169
|
+
export interface EditCreateSubForCustomerQuoteInputParam {
|
|
451
170
|
|
|
452
|
-
subscription
|
|
171
|
+
subscription:null.null;
|
|
453
172
|
|
|
454
|
-
|
|
455
|
-
* @description Parameters for shipping_address
|
|
456
|
-
|
|
457
|
-
*/
|
|
173
|
+
shipping_address?:null.null;
|
|
458
174
|
|
|
459
|
-
|
|
175
|
+
contract_term?:null.null;
|
|
460
176
|
|
|
461
|
-
|
|
462
|
-
* @description Parameters for contract_term
|
|
463
|
-
|
|
464
|
-
*/
|
|
177
|
+
addons?:{billing_cycles?:number,id?:string,quantity?:number,quantity_in_decimal?:string,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
465
178
|
|
|
466
|
-
|
|
179
|
+
event_based_addons?:{charge_on?:ChargeOn,charge_once?:boolean,id?:string,on_event?:OnEvent,quantity?:number,quantity_in_decimal?:string,service_period_in_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
467
180
|
|
|
468
|
-
|
|
469
|
-
* @description Parameters for subscription_items
|
|
470
|
-
|
|
471
|
-
*/
|
|
181
|
+
notes?:string;
|
|
472
182
|
|
|
473
|
-
|
|
183
|
+
expires_at?:number;
|
|
474
184
|
|
|
475
|
-
|
|
476
|
-
* @description Parameters for discounts
|
|
477
|
-
|
|
478
|
-
*/
|
|
185
|
+
billing_cycles?:number;
|
|
479
186
|
|
|
480
|
-
|
|
187
|
+
mandatory_addons_to_remove?:string[];
|
|
481
188
|
|
|
482
|
-
|
|
483
|
-
* @description Parameters for item_tiers
|
|
484
|
-
|
|
485
|
-
*/
|
|
189
|
+
terms_to_charge?:number;
|
|
486
190
|
|
|
487
|
-
|
|
191
|
+
billing_alignment_mode?:BillingAlignmentMode;
|
|
192
|
+
|
|
193
|
+
coupon_ids?:string[];
|
|
488
194
|
}
|
|
489
|
-
export interface
|
|
195
|
+
export interface UpdateSubscriptionQuoteResponse {
|
|
490
196
|
quote:Quote;
|
|
491
197
|
|
|
492
198
|
quoted_subscription?:QuotedSubscription;
|
|
493
199
|
}
|
|
494
|
-
export interface
|
|
200
|
+
export interface UpdateSubscriptionQuoteInputParam {
|
|
495
201
|
|
|
496
|
-
|
|
497
|
-
* @description Notes specific to this quote that you want customers to see on the quote PDF.
|
|
498
|
-
|
|
499
|
-
*/
|
|
202
|
+
subscription:null.null;
|
|
500
203
|
|
|
501
|
-
|
|
204
|
+
billing_address?:null.null;
|
|
502
205
|
|
|
503
|
-
|
|
504
|
-
* @description Quotes will be vaild till this date. After this quote will be marked as closed.
|
|
505
|
-
|
|
506
|
-
*/
|
|
206
|
+
shipping_address?:null.null;
|
|
507
207
|
|
|
508
|
-
|
|
208
|
+
customer?:null.null;
|
|
509
209
|
|
|
510
|
-
|
|
511
|
-
* @description The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver=2#item_price_billing_cycles) is used.
|
|
512
|
-
|
|
513
|
-
*/
|
|
210
|
+
contract_term?:null.null;
|
|
514
211
|
|
|
515
|
-
billing_cycles?:number;
|
|
212
|
+
addons?:{billing_cycles?:number,id?:string,quantity?:number,quantity_in_decimal?:string,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
516
213
|
|
|
517
|
-
|
|
518
|
-
* @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription.
|
|
519
|
-
|
|
520
|
-
*/
|
|
214
|
+
name?:string;
|
|
521
215
|
|
|
522
|
-
|
|
216
|
+
notes?:string;
|
|
523
217
|
|
|
524
|
-
|
|
525
|
-
* @description The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).
|
|
526
|
-
|
|
527
|
-
*/
|
|
218
|
+
expires_at?:number;
|
|
528
219
|
|
|
529
|
-
|
|
220
|
+
event_based_addons?:{charge_on?:ChargeOn,charge_once?:boolean,id?:string,on_event?:OnEvent,quantity?:number,quantity_in_decimal?:string,service_period_in_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
530
221
|
|
|
531
|
-
|
|
532
|
-
* @description Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..
|
|
533
|
-
|
|
534
|
-
*/
|
|
222
|
+
replace_addon_list?:boolean;
|
|
535
223
|
|
|
536
|
-
|
|
224
|
+
mandatory_addons_to_remove?:string[];
|
|
537
225
|
|
|
538
|
-
|
|
539
|
-
* @description Identifier of the coupon as a List. Coupon Codes can also be passed.
|
|
540
|
-
|
|
541
|
-
*/
|
|
226
|
+
billing_cycles?:number;
|
|
542
227
|
|
|
543
|
-
|
|
228
|
+
terms_to_charge?:number;
|
|
544
229
|
|
|
545
|
-
|
|
546
|
-
* @description Parameters for subscription
|
|
547
|
-
|
|
548
|
-
*/
|
|
549
|
-
|
|
550
|
-
subscription?:{contract_term_billing_cycle_on_renewal?:number,id?:string,po_number?:string,start_date?:number,trial_end?:number};
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* @description Parameters for shipping_address
|
|
554
|
-
|
|
555
|
-
*/
|
|
556
|
-
|
|
557
|
-
shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
558
|
-
|
|
559
|
-
/**
|
|
560
|
-
* @description Parameters for contract_term
|
|
561
|
-
|
|
562
|
-
*/
|
|
230
|
+
reactivate_from?:number;
|
|
563
231
|
|
|
564
|
-
|
|
232
|
+
billing_alignment_mode?:BillingAlignmentMode;
|
|
565
233
|
|
|
566
|
-
|
|
567
|
-
* @description Parameters for subscription_items
|
|
568
|
-
|
|
569
|
-
*/
|
|
234
|
+
coupon_ids?:string[];
|
|
570
235
|
|
|
571
|
-
|
|
236
|
+
replace_coupon_list?:boolean;
|
|
572
237
|
|
|
573
|
-
|
|
574
|
-
* @description Parameters for discounts
|
|
575
|
-
|
|
576
|
-
*/
|
|
238
|
+
change_option?:ChangeOption;
|
|
577
239
|
|
|
578
|
-
|
|
240
|
+
changes_scheduled_at?:number;
|
|
579
241
|
|
|
580
|
-
|
|
581
|
-
* @description Parameters for item_tiers
|
|
582
|
-
|
|
583
|
-
*/
|
|
242
|
+
force_term_reset?:boolean;
|
|
584
243
|
|
|
585
|
-
|
|
244
|
+
reactivate?:boolean;
|
|
586
245
|
}
|
|
587
|
-
export interface
|
|
246
|
+
export interface EditUpdateSubscriptionQuoteResponse {
|
|
588
247
|
quote:Quote;
|
|
589
248
|
|
|
590
249
|
quoted_subscription?:QuotedSubscription;
|
|
591
250
|
}
|
|
592
|
-
export interface
|
|
251
|
+
export interface EditUpdateSubscriptionQuoteInputParam {
|
|
593
252
|
|
|
594
|
-
|
|
595
|
-
* @description The quote name will be used as the pdf name of the quote.
|
|
596
|
-
|
|
597
|
-
*/
|
|
253
|
+
subscription?:null.null;
|
|
598
254
|
|
|
599
|
-
|
|
255
|
+
billing_address?:null.null;
|
|
600
256
|
|
|
601
|
-
|
|
602
|
-
* @description Notes specific to this quote that you want customers to see on the quote PDF.
|
|
603
|
-
|
|
604
|
-
*/
|
|
257
|
+
shipping_address?:null.null;
|
|
605
258
|
|
|
606
|
-
|
|
259
|
+
customer?:null.null;
|
|
607
260
|
|
|
608
|
-
|
|
609
|
-
* @description Quotes will be vaild till this date. After this quote will be marked as closed.
|
|
610
|
-
|
|
611
|
-
*/
|
|
261
|
+
contract_term?:null.null;
|
|
612
262
|
|
|
613
|
-
|
|
263
|
+
addons?:{billing_cycles?:number,id?:string,quantity?:number,quantity_in_decimal?:string,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
614
264
|
|
|
615
|
-
|
|
616
|
-
* @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription.
|
|
617
|
-
|
|
618
|
-
*/
|
|
265
|
+
notes?:string;
|
|
619
266
|
|
|
620
|
-
|
|
267
|
+
expires_at?:number;
|
|
621
268
|
|
|
622
|
-
|
|
623
|
-
* @description If `true` then the existing `subscription_items` list for the subscription is replaced by the one provided. If `false` then the provided `subscription_items` list gets added to the existing list.
|
|
624
|
-
|
|
625
|
-
*/
|
|
269
|
+
event_based_addons?:{charge_on?:ChargeOn,charge_once?:boolean,id?:string,on_event?:OnEvent,quantity?:number,quantity_in_decimal?:string,service_period_in_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
626
270
|
|
|
627
|
-
|
|
271
|
+
replace_addon_list?:boolean;
|
|
628
272
|
|
|
629
|
-
|
|
630
|
-
* @description Billing cycles set for plan-item price is used by default.
|
|
631
|
-
|
|
632
|
-
*/
|
|
273
|
+
mandatory_addons_to_remove?:string[];
|
|
633
274
|
|
|
634
275
|
billing_cycles?:number;
|
|
635
276
|
|
|
636
|
-
/**
|
|
637
|
-
* @description The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). If a new term is started for the subscription due to this API call, then `terms_to_charge` is inclusive of this new term. See description for the `force_term_reset` parameter to learn more about when a subscription term is reset.
|
|
638
|
-
|
|
639
|
-
*/
|
|
640
|
-
|
|
641
277
|
terms_to_charge?:number;
|
|
642
278
|
|
|
643
|
-
/**
|
|
644
|
-
* @description If the subscription `status` is `cancelled` and it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.
|
|
645
|
-
**Note:** It is recommended not to pass this parameter along with `changed_scheduled_at`. `reactivate_from` can be backdated (set to a value in the past). Use backdating when the subscription has been reactivated already but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:
|
|
646
|
-
|
|
647
|
-
* Backdating must be enabled for subscription reactivation operations.
|
|
648
|
-
* The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.
|
|
649
|
-
* The date is on or after the last date/time any of the product catalog items of the subscription were changed.
|
|
650
|
-
* The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February.
|
|
651
|
-
.
|
|
652
|
-
|
|
653
|
-
*/
|
|
654
|
-
|
|
655
279
|
reactivate_from?:number;
|
|
656
280
|
|
|
657
|
-
/**
|
|
658
|
-
* @description Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) chosen for the site for calendar billing. Only applicable when using calendar billing. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal.
|
|
659
|
-
|
|
660
|
-
*/
|
|
661
|
-
|
|
662
281
|
billing_alignment_mode?:BillingAlignmentMode;
|
|
663
282
|
|
|
664
|
-
/**
|
|
665
|
-
* @description Identifier of the coupon as a List. Coupon Codes can also be passed.
|
|
666
|
-
|
|
667
|
-
*/
|
|
668
|
-
|
|
669
283
|
coupon_ids?:string[];
|
|
670
284
|
|
|
671
|
-
/**
|
|
672
|
-
* @description Should be true if the existing coupons should be replaced with the ones that are being passed.
|
|
673
|
-
|
|
674
|
-
*/
|
|
675
|
-
|
|
676
285
|
replace_coupon_list?:boolean;
|
|
677
286
|
|
|
678
|
-
/**
|
|
679
|
-
* @description When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out. \* end_of_term - The change is carried out at the end of the current billing cycle of the subscription. \* specific_date - The change is carried out as of the date specified under `changes_scheduled_at`. \* immediately - The change is carried out immediately.
|
|
680
|
-
|
|
681
|
-
*/
|
|
682
|
-
|
|
683
287
|
change_option?:ChangeOption;
|
|
684
288
|
|
|
685
|
-
/**
|
|
686
|
-
* @description When `change_option` is set to `specific_date`, then set the date/time at which the subscription change is to happen or has happened. `changes_scheduled_at` can be set to a value in the past. This is called backdating the subscription change and is performed when the subscription change has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:
|
|
687
|
-
|
|
688
|
-
* Backdating must be enabled for subscription change operations.
|
|
689
|
-
* Only the following changes can be backdated:
|
|
690
|
-
* Changes in the recurring items or their prices.
|
|
691
|
-
* Addition of non-recurring items.
|
|
692
|
-
* Subscription `status` is `active`, `cancelled`, or `non_renewing`.
|
|
693
|
-
* The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.
|
|
694
|
-
* The date is on or after `current_term_start`.
|
|
695
|
-
* The date is on or after the last date/time any of the following changes were made:
|
|
696
|
-
* Changes in the recurring items or their prices.
|
|
697
|
-
* Addition of non-recurring items.
|
|
698
|
-
* The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the subscription's plan is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February.
|
|
699
|
-
.
|
|
700
|
-
|
|
701
|
-
*/
|
|
702
|
-
|
|
703
289
|
changes_scheduled_at?:number;
|
|
704
290
|
|
|
705
|
-
/**
|
|
706
|
-
* @description Applicable for 'Active' \& 'Non Renewing' states alone. Generally, subscription's term will be reset (i.e current term is ended and a new term starts immediately) when a new plan having different billing frequency is specified in the input. For all the other cases, the subscription's term will remain intact. Now for this later scenario, if you want to force a term reset you can specify this param as 'true'.
|
|
707
|
-
**Note**: Specifying this value as 'false' has no impact on the default behaviour.
|
|
708
|
-
|
|
709
|
-
*/
|
|
710
|
-
|
|
711
291
|
force_term_reset?:boolean;
|
|
712
292
|
|
|
713
|
-
/**
|
|
714
|
-
* @description Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data.
|
|
715
|
-
|
|
716
|
-
*/
|
|
717
|
-
|
|
718
293
|
reactivate?:boolean;
|
|
294
|
+
}
|
|
295
|
+
export interface CreateForOnetimeChargesResponse {
|
|
296
|
+
quote:Quote;
|
|
719
297
|
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
*/
|
|
298
|
+
quoted_charge?:QuotedCharge;
|
|
299
|
+
}
|
|
300
|
+
export interface CreateForOnetimeChargesInputParam {
|
|
724
301
|
|
|
725
|
-
|
|
302
|
+
shipping_address?:null.null;
|
|
726
303
|
|
|
727
|
-
|
|
728
|
-
* @description Parameters for billing_address
|
|
729
|
-
|
|
730
|
-
*/
|
|
304
|
+
addons?:{id?:string,quantity?:number,quantity_in_decimal?:string,service_period?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
731
305
|
|
|
732
|
-
|
|
306
|
+
charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_transaction_type?:number,description?:string,service_period?:number}[];
|
|
733
307
|
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
*/
|
|
308
|
+
tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
|
|
309
|
+
|
|
310
|
+
name?:string;
|
|
738
311
|
|
|
739
|
-
|
|
312
|
+
customer_id:string;
|
|
740
313
|
|
|
741
|
-
|
|
742
|
-
* @description Parameters for customer
|
|
743
|
-
|
|
744
|
-
*/
|
|
314
|
+
po_number?:string;
|
|
745
315
|
|
|
746
|
-
|
|
316
|
+
notes?:string;
|
|
747
317
|
|
|
748
|
-
|
|
749
|
-
* @description Parameters for contract_term
|
|
750
|
-
|
|
751
|
-
*/
|
|
318
|
+
expires_at?:number;
|
|
752
319
|
|
|
753
|
-
|
|
320
|
+
currency_code?:string;
|
|
754
321
|
|
|
755
|
-
|
|
756
|
-
* @description Parameters for subscription_items
|
|
757
|
-
|
|
758
|
-
*/
|
|
322
|
+
coupon?:string;
|
|
759
323
|
|
|
760
|
-
|
|
324
|
+
coupon_ids?:string[];
|
|
325
|
+
}
|
|
326
|
+
export interface EditOneTimeQuoteResponse {
|
|
327
|
+
quote:Quote;
|
|
761
328
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
*/
|
|
329
|
+
quoted_charge?:QuotedCharge;
|
|
330
|
+
}
|
|
331
|
+
export interface EditOneTimeQuoteInputParam {
|
|
766
332
|
|
|
767
|
-
|
|
333
|
+
shipping_address?:null.null;
|
|
768
334
|
|
|
769
|
-
|
|
770
|
-
* @description Parameters for item_tiers
|
|
771
|
-
|
|
772
|
-
*/
|
|
335
|
+
addons?:{id?:string,quantity?:number,quantity_in_decimal?:string,service_period?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
773
336
|
|
|
774
|
-
|
|
337
|
+
charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_transaction_type?:number,description?:string,service_period?:number}[];
|
|
338
|
+
|
|
339
|
+
tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
|
|
340
|
+
|
|
341
|
+
po_number?:string;
|
|
342
|
+
|
|
343
|
+
notes?:string;
|
|
344
|
+
|
|
345
|
+
expires_at?:number;
|
|
346
|
+
|
|
347
|
+
currency_code?:string;
|
|
348
|
+
|
|
349
|
+
coupon?:string;
|
|
350
|
+
|
|
351
|
+
coupon_ids?:string[];
|
|
775
352
|
}
|
|
776
|
-
export interface
|
|
353
|
+
export interface CreateSubItemsForCustomerQuoteResponse {
|
|
777
354
|
quote:Quote;
|
|
778
355
|
|
|
779
356
|
quoted_subscription?:QuotedSubscription;
|
|
780
357
|
}
|
|
781
|
-
export interface
|
|
358
|
+
export interface CreateSubItemsForCustomerQuoteInputParam {
|
|
782
359
|
|
|
783
|
-
|
|
784
|
-
* @description Notes specific to this quote that you want customers to see on the quote PDF.
|
|
785
|
-
|
|
786
|
-
*/
|
|
360
|
+
subscription?:null.null;
|
|
787
361
|
|
|
788
|
-
|
|
362
|
+
shipping_address?:null.null;
|
|
789
363
|
|
|
790
|
-
|
|
791
|
-
* @description Quotes will be vaild till this date. After this quote will be marked as closed.
|
|
792
|
-
|
|
793
|
-
*/
|
|
364
|
+
contract_term?:null.null;
|
|
794
365
|
|
|
795
|
-
|
|
366
|
+
subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
796
367
|
|
|
797
|
-
|
|
798
|
-
* @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription.
|
|
799
|
-
|
|
800
|
-
*/
|
|
368
|
+
discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
801
369
|
|
|
802
|
-
|
|
370
|
+
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}[];
|
|
803
371
|
|
|
804
|
-
|
|
805
|
-
* @description If `true` then the existing `subscription_items` list for the subscription is replaced by the one provided. If `false` then the provided `subscription_items` list gets added to the existing list.
|
|
806
|
-
|
|
807
|
-
*/
|
|
372
|
+
name?:string;
|
|
808
373
|
|
|
809
|
-
|
|
374
|
+
notes?:string;
|
|
810
375
|
|
|
811
|
-
|
|
812
|
-
* @description Billing cycles set for plan-item price is used by default.
|
|
813
|
-
|
|
814
|
-
*/
|
|
376
|
+
expires_at?:number;
|
|
815
377
|
|
|
816
378
|
billing_cycles?:number;
|
|
817
379
|
|
|
818
|
-
|
|
819
|
-
* @description The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). If a new term is started for the subscription due to this API call, then `terms_to_charge` is inclusive of this new term. See description for the `force_term_reset` parameter to learn more about when a subscription term is reset.
|
|
820
|
-
|
|
821
|
-
*/
|
|
380
|
+
mandatory_items_to_remove?:string[];
|
|
822
381
|
|
|
823
382
|
terms_to_charge?:number;
|
|
824
383
|
|
|
825
|
-
|
|
826
|
-
* @description If the subscription `status` is `cancelled` and it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.
|
|
827
|
-
**Note:** It is recommended not to pass this parameter along with `changed_scheduled_at`. `reactivate_from` can be backdated (set to a value in the past). Use backdating when the subscription has been reactivated already but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:
|
|
828
|
-
|
|
829
|
-
* Backdating must be enabled for subscription reactivation operations.
|
|
830
|
-
* The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.
|
|
831
|
-
* The date is on or after the last date/time any of the product catalog items of the subscription were changed.
|
|
832
|
-
* The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February.
|
|
833
|
-
.
|
|
834
|
-
|
|
835
|
-
*/
|
|
384
|
+
billing_alignment_mode?:BillingAlignmentMode;
|
|
836
385
|
|
|
837
|
-
|
|
386
|
+
coupon_ids?:string[];
|
|
387
|
+
}
|
|
388
|
+
export interface EditCreateSubCustomerQuoteForItemsResponse {
|
|
389
|
+
quote:Quote;
|
|
838
390
|
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
*/
|
|
391
|
+
quoted_subscription?:QuotedSubscription;
|
|
392
|
+
}
|
|
393
|
+
export interface EditCreateSubCustomerQuoteForItemsInputParam {
|
|
843
394
|
|
|
844
|
-
|
|
395
|
+
subscription?:null.null;
|
|
845
396
|
|
|
846
|
-
|
|
847
|
-
* @description Identifier of the coupon as a List. Coupon Codes can also be passed.
|
|
848
|
-
|
|
849
|
-
*/
|
|
397
|
+
shipping_address?:null.null;
|
|
850
398
|
|
|
851
|
-
|
|
399
|
+
contract_term?:null.null;
|
|
852
400
|
|
|
853
|
-
|
|
854
|
-
* @description Should be true if the existing coupons should be replaced with the ones that are being passed.
|
|
855
|
-
|
|
856
|
-
*/
|
|
401
|
+
subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
857
402
|
|
|
858
|
-
|
|
403
|
+
discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
859
404
|
|
|
860
|
-
|
|
861
|
-
* @description When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out. \* end_of_term - The change is carried out at the end of the current billing cycle of the subscription. \* specific_date - The change is carried out as of the date specified under `changes_scheduled_at`. \* immediately - The change is carried out immediately.
|
|
862
|
-
|
|
863
|
-
*/
|
|
405
|
+
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}[];
|
|
864
406
|
|
|
865
|
-
|
|
407
|
+
notes?:string;
|
|
866
408
|
|
|
867
|
-
|
|
868
|
-
* @description When `change_option` is set to `specific_date`, then set the date/time at which the subscription change is to happen or has happened. `changes_scheduled_at` can be set to a value in the past. This is called backdating the subscription change and is performed when the subscription change has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:
|
|
869
|
-
|
|
870
|
-
* Backdating must be enabled for subscription change operations.
|
|
871
|
-
* Only the following changes can be backdated:
|
|
872
|
-
* Changes in the recurring items or their prices.
|
|
873
|
-
* Addition of non-recurring items.
|
|
874
|
-
* Subscription `status` is `active`, `cancelled`, or `non_renewing`.
|
|
875
|
-
* The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.
|
|
876
|
-
* The date is on or after `current_term_start`.
|
|
877
|
-
* The date is on or after the last date/time any of the following changes were made:
|
|
878
|
-
* Changes in the recurring items or their prices.
|
|
879
|
-
* Addition of non-recurring items.
|
|
880
|
-
* The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the subscription's plan is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February.
|
|
881
|
-
.
|
|
882
|
-
|
|
883
|
-
*/
|
|
409
|
+
expires_at?:number;
|
|
884
410
|
|
|
885
|
-
|
|
411
|
+
billing_cycles?:number;
|
|
886
412
|
|
|
887
|
-
|
|
888
|
-
* @description Applicable for 'Active' \& 'Non Renewing' states alone. Generally, subscription's term will be reset (i.e current term is ended and a new term starts immediately) when a new plan having different billing frequency is specified in the input. For all the other cases, the subscription's term will remain intact. Now for this later scenario, if you want to force a term reset you can specify this param as 'true'.
|
|
889
|
-
**Note**: Specifying this value as 'false' has no impact on the default behaviour.
|
|
890
|
-
|
|
891
|
-
*/
|
|
413
|
+
mandatory_items_to_remove?:string[];
|
|
892
414
|
|
|
893
|
-
|
|
415
|
+
terms_to_charge?:number;
|
|
894
416
|
|
|
895
|
-
|
|
896
|
-
* @description Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data.
|
|
897
|
-
|
|
898
|
-
*/
|
|
417
|
+
billing_alignment_mode?:BillingAlignmentMode;
|
|
899
418
|
|
|
900
|
-
|
|
419
|
+
coupon_ids?:string[];
|
|
420
|
+
}
|
|
421
|
+
export interface UpdateSubscriptionQuoteForItemsResponse {
|
|
422
|
+
quote:Quote;
|
|
901
423
|
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
*/
|
|
424
|
+
quoted_subscription?:QuotedSubscription;
|
|
425
|
+
}
|
|
426
|
+
export interface UpdateSubscriptionQuoteForItemsInputParam {
|
|
906
427
|
|
|
907
|
-
subscription
|
|
428
|
+
subscription:null.null;
|
|
908
429
|
|
|
909
|
-
|
|
910
|
-
* @description Parameters for billing_address
|
|
911
|
-
|
|
912
|
-
*/
|
|
430
|
+
billing_address?:null.null;
|
|
913
431
|
|
|
914
|
-
|
|
432
|
+
shipping_address?:null.null;
|
|
915
433
|
|
|
916
|
-
|
|
917
|
-
* @description Parameters for shipping_address
|
|
918
|
-
|
|
919
|
-
*/
|
|
434
|
+
customer?:null.null;
|
|
920
435
|
|
|
921
|
-
|
|
436
|
+
contract_term?:null.null;
|
|
922
437
|
|
|
923
|
-
|
|
924
|
-
* @description Parameters for customer
|
|
925
|
-
|
|
926
|
-
*/
|
|
438
|
+
subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
927
439
|
|
|
928
|
-
|
|
440
|
+
discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
929
441
|
|
|
930
|
-
|
|
931
|
-
* @description Parameters for contract_term
|
|
932
|
-
|
|
933
|
-
*/
|
|
442
|
+
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}[];
|
|
934
443
|
|
|
935
|
-
|
|
444
|
+
name?:string;
|
|
936
445
|
|
|
937
|
-
|
|
938
|
-
* @description Parameters for subscription_items
|
|
939
|
-
|
|
940
|
-
*/
|
|
446
|
+
notes?:string;
|
|
941
447
|
|
|
942
|
-
|
|
448
|
+
expires_at?:number;
|
|
943
449
|
|
|
944
|
-
|
|
945
|
-
* @description Parameters for discounts
|
|
946
|
-
|
|
947
|
-
*/
|
|
450
|
+
mandatory_items_to_remove?:string[];
|
|
948
451
|
|
|
949
|
-
|
|
452
|
+
replace_items_list?:boolean;
|
|
950
453
|
|
|
951
|
-
|
|
952
|
-
* @description Parameters for item_tiers
|
|
953
|
-
|
|
954
|
-
*/
|
|
454
|
+
billing_cycles?:number;
|
|
955
455
|
|
|
956
|
-
|
|
456
|
+
terms_to_charge?:number;
|
|
457
|
+
|
|
458
|
+
reactivate_from?:number;
|
|
459
|
+
|
|
460
|
+
billing_alignment_mode?:BillingAlignmentMode;
|
|
461
|
+
|
|
462
|
+
coupon_ids?:string[];
|
|
463
|
+
|
|
464
|
+
replace_coupon_list?:boolean;
|
|
465
|
+
|
|
466
|
+
change_option?:ChangeOption;
|
|
467
|
+
|
|
468
|
+
changes_scheduled_at?:number;
|
|
469
|
+
|
|
470
|
+
force_term_reset?:boolean;
|
|
471
|
+
|
|
472
|
+
reactivate?:boolean;
|
|
957
473
|
}
|
|
958
|
-
export interface
|
|
474
|
+
export interface EditUpdateSubscriptionQuoteForItemsResponse {
|
|
959
475
|
quote:Quote;
|
|
960
476
|
|
|
961
|
-
|
|
477
|
+
quoted_subscription?:QuotedSubscription;
|
|
962
478
|
}
|
|
963
|
-
export interface
|
|
479
|
+
export interface EditUpdateSubscriptionQuoteForItemsInputParam {
|
|
964
480
|
|
|
965
|
-
|
|
966
|
-
* @description The quote name will be used as the pdf name of the quote.
|
|
967
|
-
|
|
968
|
-
*/
|
|
481
|
+
subscription?:null.null;
|
|
969
482
|
|
|
970
|
-
|
|
483
|
+
billing_address?:null.null;
|
|
971
484
|
|
|
972
|
-
|
|
973
|
-
* @description Identifier of the customer for which the quote needs to be created.
|
|
974
|
-
|
|
975
|
-
*/
|
|
485
|
+
shipping_address?:null.null;
|
|
976
486
|
|
|
977
|
-
|
|
487
|
+
customer?:null.null;
|
|
978
488
|
|
|
979
|
-
|
|
980
|
-
* @description Purchase Order Number for this quote.
|
|
981
|
-
|
|
982
|
-
*/
|
|
489
|
+
contract_term?:null.null;
|
|
983
490
|
|
|
984
|
-
|
|
491
|
+
subscription_items:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,item_type?:ItemType,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
985
492
|
|
|
986
|
-
|
|
987
|
-
* @description Notes specific to this quote that you want customers to see on the quote PDF.
|
|
988
|
-
|
|
989
|
-
*/
|
|
493
|
+
discounts:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,id?:string,included_in_mrr?:boolean,item_price_id?:string,operation_type:OperationType,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
990
494
|
|
|
991
|
-
|
|
495
|
+
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}[];
|
|
992
496
|
|
|
993
|
-
|
|
994
|
-
* @description Quotes will be vaild till this date. After this quote will be marked as closed.
|
|
995
|
-
|
|
996
|
-
*/
|
|
497
|
+
notes?:string;
|
|
997
498
|
|
|
998
499
|
expires_at?:number;
|
|
999
500
|
|
|
1000
|
-
|
|
1001
|
-
* @description The currency code (ISO 4217 format) of the quote.
|
|
1002
|
-
|
|
1003
|
-
*/
|
|
501
|
+
mandatory_items_to_remove?:string[];
|
|
1004
502
|
|
|
1005
|
-
|
|
503
|
+
replace_items_list?:boolean;
|
|
1006
504
|
|
|
1007
|
-
|
|
1008
|
-
* @description The 'One Time' coupon to be applied.
|
|
1009
|
-
|
|
1010
|
-
*/
|
|
505
|
+
billing_cycles?:number;
|
|
1011
506
|
|
|
1012
|
-
|
|
507
|
+
terms_to_charge?:number;
|
|
1013
508
|
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
*/
|
|
509
|
+
reactivate_from?:number;
|
|
510
|
+
|
|
511
|
+
billing_alignment_mode?:BillingAlignmentMode;
|
|
1018
512
|
|
|
1019
513
|
coupon_ids?:string[];
|
|
1020
514
|
|
|
1021
|
-
|
|
1022
|
-
* @description Parameters for shipping_address
|
|
1023
|
-
|
|
1024
|
-
*/
|
|
515
|
+
replace_coupon_list?:boolean;
|
|
1025
516
|
|
|
1026
|
-
|
|
517
|
+
change_option?:ChangeOption;
|
|
1027
518
|
|
|
1028
|
-
|
|
1029
|
-
* @description Parameters for item_prices
|
|
1030
|
-
|
|
1031
|
-
*/
|
|
519
|
+
changes_scheduled_at?:number;
|
|
1032
520
|
|
|
1033
|
-
|
|
521
|
+
force_term_reset?:boolean;
|
|
1034
522
|
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
523
|
+
reactivate?:boolean;
|
|
524
|
+
}
|
|
525
|
+
export interface CreateForChargeItemsAndChargesResponse {
|
|
526
|
+
quote:Quote;
|
|
1039
527
|
|
|
1040
|
-
|
|
528
|
+
quoted_charge?:QuotedCharge;
|
|
529
|
+
}
|
|
530
|
+
export interface CreateForChargeItemsAndChargesInputParam {
|
|
1041
531
|
|
|
1042
|
-
|
|
1043
|
-
* @description Parameters for charges
|
|
1044
|
-
|
|
1045
|
-
*/
|
|
532
|
+
shipping_address?:null.null;
|
|
1046
533
|
|
|
1047
|
-
|
|
534
|
+
item_prices?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
1048
535
|
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
*/
|
|
536
|
+
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}[];
|
|
537
|
+
|
|
538
|
+
charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_transaction_type?:number,description?:string,service_period?:number}[];
|
|
1053
539
|
|
|
1054
540
|
discounts:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
|
|
1055
|
-
}
|
|
1056
|
-
export interface EditForChargeItemsAndChargesResponse {
|
|
1057
|
-
quote:Quote;
|
|
1058
541
|
|
|
1059
|
-
|
|
1060
|
-
}
|
|
1061
|
-
export interface EditForChargeItemsAndChargesInputParam {
|
|
542
|
+
tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
|
|
1062
543
|
|
|
1063
|
-
|
|
1064
|
-
* @description Purchase Order Number for this quote.
|
|
1065
|
-
|
|
1066
|
-
*/
|
|
544
|
+
name?:string;
|
|
1067
545
|
|
|
1068
|
-
|
|
546
|
+
customer_id:string;
|
|
1069
547
|
|
|
1070
|
-
|
|
1071
|
-
* @description Notes specific to this quote that you want customers to see on the quote PDF.
|
|
1072
|
-
|
|
1073
|
-
*/
|
|
548
|
+
po_number?:string;
|
|
1074
549
|
|
|
1075
550
|
notes?:string;
|
|
1076
551
|
|
|
1077
|
-
/**
|
|
1078
|
-
* @description Quotes will be vaild till this date. After this quote will be marked as closed.
|
|
1079
|
-
|
|
1080
|
-
*/
|
|
1081
|
-
|
|
1082
552
|
expires_at?:number;
|
|
1083
553
|
|
|
1084
|
-
/**
|
|
1085
|
-
* @description The currency code (ISO 4217 format) of the quote.
|
|
1086
|
-
|
|
1087
|
-
*/
|
|
1088
|
-
|
|
1089
554
|
currency_code?:string;
|
|
1090
555
|
|
|
1091
|
-
/**
|
|
1092
|
-
* @description The 'One Time' coupon to be applied.
|
|
1093
|
-
|
|
1094
|
-
*/
|
|
1095
|
-
|
|
1096
556
|
coupon?:string;
|
|
1097
557
|
|
|
1098
|
-
/**
|
|
1099
|
-
* @description List of Coupons to be added.
|
|
1100
|
-
|
|
1101
|
-
*/
|
|
1102
|
-
|
|
1103
558
|
coupon_ids?:string[];
|
|
559
|
+
}
|
|
560
|
+
export interface EditForChargeItemsAndChargesResponse {
|
|
561
|
+
quote:Quote;
|
|
1104
562
|
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
*/
|
|
563
|
+
quoted_charge?:QuotedCharge;
|
|
564
|
+
}
|
|
565
|
+
export interface EditForChargeItemsAndChargesInputParam {
|
|
1109
566
|
|
|
1110
|
-
shipping_address?:
|
|
1111
|
-
|
|
1112
|
-
/**
|
|
1113
|
-
* @description Parameters for item_prices
|
|
1114
|
-
|
|
1115
|
-
*/
|
|
567
|
+
shipping_address?:null.null;
|
|
1116
568
|
|
|
1117
569
|
item_prices?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
1118
570
|
|
|
1119
|
-
/**
|
|
1120
|
-
* @description Parameters for item_tiers
|
|
1121
|
-
|
|
1122
|
-
*/
|
|
1123
|
-
|
|
1124
571
|
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}[];
|
|
1125
572
|
|
|
1126
|
-
/**
|
|
1127
|
-
* @description Parameters for charges
|
|
1128
|
-
|
|
1129
|
-
*/
|
|
1130
|
-
|
|
1131
573
|
charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_transaction_type?:number,description?:string,service_period?:number}[];
|
|
1132
574
|
|
|
1133
|
-
/**
|
|
1134
|
-
* @description Parameters for discounts
|
|
1135
|
-
|
|
1136
|
-
*/
|
|
1137
|
-
|
|
1138
575
|
discounts:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
|
|
576
|
+
|
|
577
|
+
tax_providers_fields?:{field_id?:string,field_value?:string,provider_name?:string}[];
|
|
578
|
+
|
|
579
|
+
po_number?:string;
|
|
580
|
+
|
|
581
|
+
notes?:string;
|
|
582
|
+
|
|
583
|
+
expires_at?:number;
|
|
584
|
+
|
|
585
|
+
currency_code?:string;
|
|
586
|
+
|
|
587
|
+
coupon?:string;
|
|
588
|
+
|
|
589
|
+
coupon_ids?:string[];
|
|
1139
590
|
}
|
|
1140
591
|
export interface ListResponse {
|
|
1141
|
-
/**
|
|
1142
|
-
* @description List all quotes.
|
|
1143
|
-
|
|
1144
|
-
*/
|
|
1145
|
-
|
|
1146
592
|
list:{quote:Quote,quoted_subscription?:QuotedSubscription}[];
|
|
1147
593
|
|
|
1148
|
-
/**
|
|
1149
|
-
* @description List all quotes.
|
|
1150
|
-
|
|
1151
|
-
*/
|
|
1152
|
-
|
|
1153
594
|
next_offset?:string;
|
|
1154
595
|
}
|
|
1155
596
|
export interface ListInputParam {
|
|
1156
597
|
[key : string]: any;
|
|
1157
598
|
/**
|
|
1158
|
-
* @description
|
|
599
|
+
* @description The number of resources to be returned.
|
|
1159
600
|
|
|
1160
601
|
*/
|
|
1161
602
|
|
|
1162
603
|
limit?:number;
|
|
1163
604
|
|
|
1164
605
|
/**
|
|
1165
|
-
* @description
|
|
606
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
1166
607
|
|
|
1167
608
|
*/
|
|
1168
609
|
|
|
1169
610
|
offset?:string;
|
|
1170
611
|
|
|
1171
612
|
/**
|
|
1172
|
-
* @description
|
|
613
|
+
* @description Indicates whether to include deleted objects in the list. The deleted objects have the attribute \`deleted\` as \`true\`.
|
|
1173
614
|
|
|
1174
615
|
*/
|
|
1175
616
|
|
|
1176
617
|
include_deleted?:boolean;
|
|
1177
618
|
|
|
1178
619
|
/**
|
|
1179
|
-
* @description
|
|
620
|
+
* @description The quote number. Acts as a identifier for quote and typically generated sequentially.
|
|
1180
621
|
|
|
1181
622
|
*/
|
|
1182
623
|
|
|
1183
624
|
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
1184
625
|
|
|
1185
626
|
/**
|
|
1186
|
-
* @description
|
|
627
|
+
* @description The identifier of the customer this quote belongs to.
|
|
1187
628
|
|
|
1188
629
|
*/
|
|
1189
630
|
|
|
1190
631
|
customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
1191
632
|
|
|
1192
633
|
/**
|
|
1193
|
-
* @description
|
|
634
|
+
* @description To filter based on subscription_id.
|
|
635
|
+
NOTE: Not to be used if *consolidated invoicing* feature is enabled.
|
|
1194
636
|
|
|
1195
637
|
*/
|
|
1196
638
|
|
|
1197
639
|
subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
1198
640
|
|
|
1199
641
|
/**
|
|
1200
|
-
* @description
|
|
642
|
+
* @description Current status of this quote.
|
|
1201
643
|
|
|
1202
644
|
*/
|
|
1203
645
|
|
|
1204
|
-
status?:{in?:string,is?:'
|
|
646
|
+
status?:{in?:string,is?:'open' | 'accepted' | 'declined' | 'invoiced' | 'closed',is_not?:'open' | 'accepted' | 'declined' | 'invoiced' | 'closed',not_in?:string};
|
|
1205
647
|
|
|
1206
648
|
/**
|
|
1207
|
-
* @description
|
|
649
|
+
* @description Creation date of the quote. Typically this is the date on which quote is generated.
|
|
1208
650
|
|
|
1209
651
|
*/
|
|
1210
652
|
|
|
1211
653
|
date?:{after?:string,before?:string,between?:string,on?:string};
|
|
1212
654
|
|
|
1213
655
|
/**
|
|
1214
|
-
* @description
|
|
656
|
+
* @description To filter based on updated at. This attribute will be present only if the resource has been updated after 2016-09-28.
|
|
1215
657
|
|
|
1216
658
|
*/
|
|
1217
659
|
|
|
1218
660
|
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
1219
661
|
|
|
1220
|
-
/**
|
|
1221
|
-
* @description List all quotes.
|
|
1222
|
-
|
|
1223
|
-
*/
|
|
1224
|
-
|
|
1225
662
|
sort_by?:{asc?:'date',desc?:'date'};
|
|
1226
663
|
}
|
|
1227
664
|
export interface QuoteLineGroupsForQuoteResponse {
|
|
1228
|
-
/**
|
|
1229
|
-
* @description This API retrieves all the quote line groups and lineitems for a quote.
|
|
1230
|
-
|
|
1231
|
-
*/
|
|
1232
|
-
|
|
1233
665
|
list:{quote_line_group:QuoteLineGroup}[];
|
|
1234
666
|
|
|
1235
|
-
/**
|
|
1236
|
-
* @description This API retrieves all the quote line groups and lineitems for a quote.
|
|
1237
|
-
|
|
1238
|
-
*/
|
|
1239
|
-
|
|
1240
667
|
next_offset?:string;
|
|
1241
668
|
}
|
|
1242
669
|
export interface QuoteLineGroupsForQuoteInputParam {
|
|
1243
670
|
[key : string]: any;
|
|
1244
671
|
/**
|
|
1245
|
-
* @description
|
|
672
|
+
* @description The number of resources to be returned.
|
|
1246
673
|
|
|
1247
674
|
*/
|
|
1248
675
|
|
|
1249
676
|
limit?:number;
|
|
1250
677
|
|
|
1251
678
|
/**
|
|
1252
|
-
* @description
|
|
679
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
1253
680
|
|
|
1254
681
|
*/
|
|
1255
682
|
|
|
@@ -1274,54 +701,13 @@ Ireland** . The first two characters of the VAT number in such a case is `X
|
|
|
1274
701
|
}
|
|
1275
702
|
export interface ConvertInputParam {
|
|
1276
703
|
|
|
1277
|
-
|
|
1278
|
-
* @description The document date displayed on the invoice PDF. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. When not provided, the value is the same as current date. Moreover, if the invoice is created as `pending`, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. `taxes` and `line_item_taxes` are computed based on the tax configuration as of `invoice_date`. When passing this parameter, the following prerequisites must be met:
|
|
1279
|
-
|
|
1280
|
-
* `invoice_date` must be in the past.
|
|
1281
|
-
* `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.
|
|
1282
|
-
* The date is not earlier than `quoted_subscription.start_date` or `quoted_subscription.changes_scheduled_at` (whichever is applicable).
|
|
1283
|
-
* `invoice_immediately` must be `true`.
|
|
1284
|
-
.
|
|
1285
|
-
|
|
1286
|
-
*/
|
|
704
|
+
subscription?:null.null;
|
|
1287
705
|
|
|
1288
706
|
invoice_date?:number;
|
|
1289
707
|
|
|
1290
|
-
/**
|
|
1291
|
-
* @description This attribute is set to `true` automatically for the subscription when it has one or more `metered` items. However, when there are no `metered` items, you can pass this parameter as `true` to force all invoices (except the first) to be created as `pending`. This is useful in the following scenarios:
|
|
1292
|
-
|
|
1293
|
-
* When you manage metered billing at your end by calculating usage-based charges yourself and add them to the subscription as [one-time charges](https://www.chargebee.com/docs/2.0/charges.html).
|
|
1294
|
-
* When your workflow involves inspecting all charges before you close invoices.
|
|
1295
|
-
|
|
1296
|
-
**Note:**
|
|
1297
|
-
|
|
1298
|
-
* You must enable [Metered Billing](https://www.chargebee.com/docs/2.0/metered_billing.html) for this parameter to be acceptable.
|
|
1299
|
-
* To create the first invoice also as `pending`, pass `first_invoice_pending` as `true`.
|
|
1300
|
-
.
|
|
1301
|
-
|
|
1302
|
-
*/
|
|
1303
|
-
|
|
1304
708
|
create_pending_invoices?:boolean;
|
|
1305
709
|
|
|
1306
|
-
/**
|
|
1307
|
-
* @description Non-metered items are billed at the beginning of a billing cycle while metered items are billed at the end. Consequently, the first invoice of the subscription contains only the non-metered items.
|
|
1308
|
-
|
|
1309
|
-
By passing this parameter as `true`, you create the first invoice as `pending` allowing you to add the previous term's metered charges to it before closing. This is useful when the subscription is moved to Chargebee from a different billing system. As applicable to all `pending` invoices, this invoice is also [closed automatically](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) or via an [API call](/docs/api/invoices?prod_cat_ver=2#close_a_pending_invoice).
|
|
1310
|
-
**Note:**
|
|
1311
|
-
|
|
1312
|
-
This parameter is passed only when there are metered items in the subscription or when `create_pending_invoices` is `true`.
|
|
1313
|
-
.
|
|
1314
|
-
|
|
1315
|
-
*/
|
|
1316
|
-
|
|
1317
710
|
first_invoice_pending?:boolean;
|
|
1318
|
-
|
|
1319
|
-
/**
|
|
1320
|
-
* @description Parameters for subscription
|
|
1321
|
-
|
|
1322
|
-
*/
|
|
1323
|
-
|
|
1324
|
-
subscription?:{auto_close_invoices?:boolean,auto_collection?:AutoCollection,id?:string,po_number?:string};
|
|
1325
711
|
}
|
|
1326
712
|
export interface UpdateStatusResponse {
|
|
1327
713
|
quote:Quote;
|
|
@@ -1332,17 +718,7 @@ This parameter is passed only when there are metered items in the subscription o
|
|
|
1332
718
|
}
|
|
1333
719
|
export interface UpdateStatusInputParam {
|
|
1334
720
|
|
|
1335
|
-
|
|
1336
|
-
* @description Status to update for the quote. \* accepted - Accepted. \* closed - Closed \* declined - Declined.
|
|
1337
|
-
|
|
1338
|
-
*/
|
|
1339
|
-
|
|
1340
|
-
status:'declined' | 'accepted' | 'closed';
|
|
1341
|
-
|
|
1342
|
-
/**
|
|
1343
|
-
* @description An internal [comment](./comments) to be added for this operation, to the quote. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Quote PDF](./quotes#retrieve_quote_as_pdf).
|
|
1344
|
-
|
|
1345
|
-
*/
|
|
721
|
+
status:'accepted' | 'declined' | 'closed';
|
|
1346
722
|
|
|
1347
723
|
comment?:string;
|
|
1348
724
|
}
|
|
@@ -1355,11 +731,6 @@ This parameter is passed only when there are metered items in the subscription o
|
|
|
1355
731
|
}
|
|
1356
732
|
export interface ExtendExpiryDateInputParam {
|
|
1357
733
|
|
|
1358
|
-
/**
|
|
1359
|
-
* @description Quote will be valid till this date. After this date quote will be marked as closed.
|
|
1360
|
-
|
|
1361
|
-
*/
|
|
1362
|
-
|
|
1363
734
|
valid_till:number;
|
|
1364
735
|
}
|
|
1365
736
|
export interface DeleteResponse {
|
|
@@ -1371,11 +742,6 @@ This parameter is passed only when there are metered items in the subscription o
|
|
|
1371
742
|
}
|
|
1372
743
|
export interface DeleteInputParam {
|
|
1373
744
|
|
|
1374
|
-
/**
|
|
1375
|
-
* @description Reason for deleting quote. This comment will be added to the subscription entity if the quote belongs to a subscription or added to the customer entity if the quote is associated only with a customer.
|
|
1376
|
-
|
|
1377
|
-
*/
|
|
1378
|
-
|
|
1379
745
|
comment?:string;
|
|
1380
746
|
}
|
|
1381
747
|
export interface PdfResponse {
|
|
@@ -1383,672 +749,196 @@ This parameter is passed only when there are metered items in the subscription o
|
|
|
1383
749
|
}
|
|
1384
750
|
export interface PdfInputParam {
|
|
1385
751
|
|
|
1386
|
-
/**
|
|
1387
|
-
* @description When true, the quote PDF has summary of all charges on the quote. When false, the quote PDF has a detailed view of charges grouped by charge event. This parameter does not affect one-time quotes.
|
|
1388
|
-
|
|
1389
|
-
*/
|
|
1390
|
-
|
|
1391
752
|
consolidated_view?:boolean;
|
|
1392
753
|
|
|
1393
|
-
/**
|
|
1394
|
-
* @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
|
|
1395
|
-
|
|
1396
|
-
*/
|
|
1397
|
-
|
|
1398
754
|
disposition_type?:DispositionType;
|
|
1399
755
|
}
|
|
1400
756
|
export interface LineItem {
|
|
1401
|
-
/**
|
|
1402
|
-
* @description Uniquely identifies a line_item
|
|
1403
|
-
|
|
1404
|
-
*/
|
|
1405
|
-
|
|
1406
757
|
id?:string;
|
|
1407
758
|
|
|
1408
|
-
/**
|
|
1409
|
-
* @description A unique identifier for the subscription this line item belongs to.
|
|
1410
|
-
|
|
1411
|
-
*/
|
|
1412
|
-
|
|
1413
759
|
subscription_id?:string;
|
|
1414
760
|
|
|
1415
|
-
/**
|
|
1416
|
-
* @description Start date of this line item.
|
|
1417
|
-
|
|
1418
|
-
*/
|
|
1419
|
-
|
|
1420
761
|
date_from:number;
|
|
1421
762
|
|
|
1422
|
-
/**
|
|
1423
|
-
* @description End date of this line item.
|
|
1424
|
-
|
|
1425
|
-
*/
|
|
1426
|
-
|
|
1427
763
|
date_to:number;
|
|
1428
764
|
|
|
1429
|
-
/**
|
|
1430
|
-
* @description Unit amount of the line item.
|
|
1431
|
-
|
|
1432
|
-
*/
|
|
1433
|
-
|
|
1434
765
|
unit_amount:number;
|
|
1435
766
|
|
|
1436
|
-
/**
|
|
1437
|
-
* @description [Quantity of the recurring item](/docs/api/invoices?prod_cat_ver=2#invoice_line_items_quantity) which is represented by this line item. For `metered` line items, this value is updated from [usages](/docs/api/usages) once when the invoice is generated as `pending` and finally when the invoice is [closed](/docs/api/invoices#close_a_pending_invoice).
|
|
1438
|
-
|
|
1439
|
-
*/
|
|
1440
|
-
|
|
1441
767
|
quantity?:number;
|
|
1442
768
|
|
|
1443
|
-
/**
|
|
1444
|
-
* @description Total amount of this line item. Typically equals to unit amount x quantity
|
|
1445
|
-
|
|
1446
|
-
*/
|
|
1447
|
-
|
|
1448
769
|
amount?:number;
|
|
1449
770
|
|
|
1450
|
-
|
|
1451
|
-
* @description The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models) for this item price. \* stairstep - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in. \* flat_fee - A fixed price that is not quantity-based. \* tiered - The per unit price is based on the tier that the total quantity falls in. \* per_unit - A fixed price per unit quantity. \* volume - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.
|
|
1452
|
-
|
|
1453
|
-
*/
|
|
1454
|
-
|
|
1455
|
-
pricing_model?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep';
|
|
1456
|
-
|
|
1457
|
-
/**
|
|
1458
|
-
* @description Specifies whether this line item is taxed or not
|
|
1459
|
-
|
|
1460
|
-
*/
|
|
771
|
+
pricing_model?:'flat_fee' | 'per_unit' | 'tiered' | 'volume' | 'stairstep';
|
|
1461
772
|
|
|
1462
773
|
is_taxed:boolean;
|
|
1463
774
|
|
|
1464
|
-
/**
|
|
1465
|
-
* @description The tax amount charged for this item
|
|
1466
|
-
|
|
1467
|
-
*/
|
|
1468
|
-
|
|
1469
775
|
tax_amount?:number;
|
|
1470
776
|
|
|
1471
|
-
/**
|
|
1472
|
-
* @description Rate of tax used to calculate tax for this lineitem
|
|
1473
|
-
|
|
1474
|
-
*/
|
|
1475
|
-
|
|
1476
777
|
tax_rate?:number;
|
|
1477
778
|
|
|
1478
|
-
/**
|
|
1479
|
-
* @description The decimal representation of the unit amount of the `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.
|
|
1480
|
-
|
|
1481
|
-
*/
|
|
1482
|
-
|
|
1483
779
|
unit_amount_in_decimal?:string;
|
|
1484
780
|
|
|
1485
|
-
/**
|
|
1486
|
-
* @description The decimal representation of the quantity of this line_item. Returned when the `line_item` is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
|
|
1487
|
-
|
|
1488
|
-
*/
|
|
1489
|
-
|
|
1490
781
|
quantity_in_decimal?:string;
|
|
1491
782
|
|
|
1492
|
-
/**
|
|
1493
|
-
* @description The decimal representation of the amount for the `line_item`, in major units of the currency. Typically equals to `unit_amount_in_decimal` x `quantity_in_decimal`. Returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled.
|
|
1494
|
-
|
|
1495
|
-
*/
|
|
1496
|
-
|
|
1497
783
|
amount_in_decimal?:string;
|
|
1498
784
|
|
|
1499
|
-
/**
|
|
1500
|
-
* @description Total discounts for this line
|
|
1501
|
-
|
|
1502
|
-
*/
|
|
1503
|
-
|
|
1504
785
|
discount_amount?:number;
|
|
1505
786
|
|
|
1506
|
-
/**
|
|
1507
|
-
* @description Line Item-level discounts for this line.
|
|
1508
|
-
|
|
1509
|
-
*/
|
|
1510
|
-
|
|
1511
787
|
item_level_discount_amount?:number;
|
|
1512
788
|
|
|
1513
|
-
|
|
1514
|
-
* @description Invoice Reference Line Item ID
|
|
1515
|
-
|
|
1516
|
-
*/
|
|
789
|
+
usage_percentage?:string;
|
|
1517
790
|
|
|
1518
791
|
reference_line_item_id?:string;
|
|
1519
792
|
|
|
1520
|
-
/**
|
|
1521
|
-
* @description Detailed description about this line item.
|
|
1522
|
-
|
|
1523
|
-
*/
|
|
1524
|
-
|
|
1525
793
|
description:string;
|
|
1526
794
|
|
|
1527
|
-
/**
|
|
1528
|
-
* @description Detailed description about this item.
|
|
1529
|
-
|
|
1530
|
-
*/
|
|
1531
|
-
|
|
1532
795
|
entity_description?:string;
|
|
1533
796
|
|
|
1534
|
-
|
|
1535
|
-
* @description Specifies the modelled entity this line item is based on. \* addon - Indicates that this lineitem is based on 'Addon' entity. The 'entity_id' attribute specifies the [addon](/docs/api/addons#addon_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 \* plan_item_price - Indicates that this line item is based on plan Item Price \* addon_item_price - Indicates that this line item is based on addon Item Price \* charge_item_price - Indicates that this line item is based on charge 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 \* 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
|
|
1536
|
-
|
|
1537
|
-
*/
|
|
1538
|
-
|
|
1539
|
-
entity_type:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
|
|
1540
|
-
|
|
1541
|
-
/**
|
|
1542
|
-
* @description The reason due to which the line item price/amount is exempted from tax. \* zero_value_item - If the total invoice value/amount is equal to zero. E.g., If the total order value is $10 and a $10 coupon has been applied against that order, the total order value becomes $0. Hence the invoice value also becomes $0. \* reverse_charge - If the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU only \* tax_not_configured - If tax is not enabled for the site \* high_value_physical_goods - If physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be applied \* customer_exempt - If the Customer is marked as Tax exempt \* region_non_taxable - If the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdiction \* product_exempt - If the Plan or Addon is marked as Tax exempt \* zero_rated - If the rate of tax is 0% and no Sales/ GST tax is collectable for that line item \* export - You are not registered for tax in the customer's region. This is also the reason code when both `billing_address` and `shipping_address` have not been provided for the customer and subscription respectively
|
|
1543
|
-
|
|
1544
|
-
*/
|
|
1545
|
-
|
|
1546
|
-
tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'tax_not_configured_external_provider' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
|
|
797
|
+
entity_type:'plan_setup' | 'plan' | 'addon' | 'adhoc' | 'plan_item_price' | 'addon_item_price' | 'charge_item_price';
|
|
1547
798
|
|
|
1548
|
-
|
|
1549
|
-
* @description The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type
|
|
1550
|
-
|
|
1551
|
-
*/
|
|
799
|
+
tax_exempt_reason?:'tax_not_configured' | 'region_non_taxable' | 'export' | 'customer_exempt' | 'product_exempt' | 'zero_rated' | 'reverse_charge' | 'high_value_physical_goods' | 'zero_value_item' | 'tax_not_configured_external_provider';
|
|
1552
800
|
|
|
1553
801
|
entity_id?:string;
|
|
1554
802
|
|
|
1555
|
-
/**
|
|
1556
|
-
* @description A unique identifier for the customer this line item belongs to
|
|
1557
|
-
|
|
1558
|
-
*/
|
|
1559
|
-
|
|
1560
803
|
customer_id?:string;
|
|
1561
804
|
}
|
|
1562
805
|
export interface Discount {
|
|
1563
|
-
/**
|
|
1564
|
-
* @description The amount deducted. The format of this value depends on the [kind of currency](/docs/api?prod_cat_ver=2#currencies).
|
|
1565
|
-
|
|
1566
|
-
*/
|
|
1567
|
-
|
|
1568
806
|
amount:number;
|
|
1569
807
|
|
|
1570
|
-
/**
|
|
1571
|
-
* @description Description for this deduction.
|
|
1572
|
-
|
|
1573
|
-
*/
|
|
1574
|
-
|
|
1575
808
|
description?:string;
|
|
1576
809
|
|
|
1577
|
-
|
|
1578
|
-
* @description The unique id of the line item that this deduction is for. Is required when `discounts[entity_type]` is `item_level_coupon` or `document_level_coupon`.
|
|
1579
|
-
|
|
1580
|
-
*/
|
|
1581
|
-
|
|
1582
|
-
line_item_id?:string;
|
|
1583
|
-
|
|
1584
|
-
/**
|
|
1585
|
-
* @description The type of deduction and the amount to which it is applied. \* prorated_credits - The deduction is due to a legacy adjustment credit applied to the invoice. The `entity_id` is `null` in this case. The legacy credits feature is superseded by [adjustment_credit_notes](/docs/api/invoices?prod_cat_ver=2#invoice_adjustment_credit_notes). \* item_level_coupon - The deduction is due to a coupon applied to line item. The coupon `id` is passed as `entity_id`. \* item_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver=2) applied to a line item of the invoice. The discount `id` is available as the `entity_id`. \* document_level_coupon - The deduction is due to a coupon applied to the invoice `sub_total`. The coupon id is passed as `entity_id`. \* promotional_credits - The deduction is due to a [promotional credit](/docs/api/promotional_credits?prod_cat_ver=2) applied to the invoice. \* document_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver=2) applied to the invoice `sub_total`. The discount `id` is available as the `entity_id`.
|
|
1586
|
-
|
|
1587
|
-
*/
|
|
1588
|
-
|
|
1589
|
-
entity_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
1590
|
-
|
|
1591
|
-
/**
|
|
1592
|
-
* @description The type of discount that is applied to the line item. Relevant only when `discounts[entity_type]` is one of `item_level_discount` , `item_level_coupon`, `document_level_discount`, or `document_level_coupon` \* percentage - when percentage is applied as discount \* fixed_amount - when amount is applied as discount
|
|
1593
|
-
|
|
1594
|
-
*/
|
|
1595
|
-
|
|
1596
|
-
discount_type?:'fixed_amount' | 'percentage';
|
|
1597
|
-
|
|
1598
|
-
/**
|
|
1599
|
-
* @description When the deduction is due to a `coupon` or a [discount](discounts), then this is the `id` of the coupon or discount.
|
|
1600
|
-
|
|
1601
|
-
*/
|
|
810
|
+
entity_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
|
|
1602
811
|
|
|
1603
812
|
entity_id?:string;
|
|
1604
813
|
|
|
1605
|
-
/**
|
|
1606
|
-
* @description The [coupon code](/docs/api/coupon_codes#coupon_code_code), if applicable, used to provide the discount. The [coupon.id](/docs/api/coupons#coupon_id) is available in `entity_id`.
|
|
1607
|
-
|
|
1608
|
-
*/
|
|
1609
|
-
|
|
1610
814
|
coupon_set_code?:string;
|
|
1611
815
|
}
|
|
1612
816
|
export interface LineItemDiscount {
|
|
1613
|
-
/**
|
|
1614
|
-
* @description The unique id of the line item that this deduction is for.
|
|
1615
|
-
|
|
1616
|
-
*/
|
|
1617
|
-
|
|
1618
817
|
line_item_id:string;
|
|
1619
818
|
|
|
1620
|
-
|
|
1621
|
-
* @description The type of deduction and the amount to which it is applied. \* prorated_credits - The deduction is due to a legacy adjustment credit applied to the invoice. The `entity_id` is `null` in this case. The legacy credits feature is superseded by [adjustment_credit_notes](/docs/api/invoices?prod_cat_ver=2#invoice_adjustment_credit_notes). \* document_level_coupon - The deduction is due to a coupon applied to the invoice `sub_total`. The coupon `id` is available as `entity_id`. \* promotional_credits - The deduction is due to a [promotional credit](/docs/api/promotional_credits) applied to the invoice. The `entity_id` is `null` in this case. \* item_level_coupon - The deduction is due to a coupon applied to a line item of the invoice. The coupon `id` is available as `entity_id`. \* document_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver=2) applied to the invoice `sub_total`. The discount `id` is available as the `entity_id`. \* item_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver=2) applied to a line item of the invoice. The discount `id` is available as the `entity_id`.
|
|
1622
|
-
|
|
1623
|
-
*/
|
|
1624
|
-
|
|
1625
|
-
discount_type:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
819
|
+
discount_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
|
|
1626
820
|
|
|
1627
821
|
coupon_id?:string;
|
|
1628
822
|
|
|
1629
|
-
/**
|
|
1630
|
-
* @description When the deduction is due to a `coupon` or a [discount](discounts), then this is the `id` of the coupon or discount.
|
|
1631
|
-
|
|
1632
|
-
*/
|
|
1633
|
-
|
|
1634
823
|
entity_id?:string;
|
|
1635
824
|
|
|
1636
|
-
/**
|
|
1637
|
-
* @description The amount deducted. The format of this value depends on the [kind of currency](/docs/api#currencies).
|
|
1638
|
-
|
|
1639
|
-
*/
|
|
1640
|
-
|
|
1641
825
|
discount_amount:number;
|
|
1642
826
|
}
|
|
1643
827
|
export interface Tax {
|
|
1644
|
-
/**
|
|
1645
|
-
* @description The name of the tax applied. E.g. GST.
|
|
1646
|
-
|
|
1647
|
-
*/
|
|
1648
|
-
|
|
1649
828
|
name:string;
|
|
1650
829
|
|
|
1651
|
-
/**
|
|
1652
|
-
* @description The tax amount.
|
|
1653
|
-
|
|
1654
|
-
*/
|
|
1655
|
-
|
|
1656
830
|
amount:number;
|
|
1657
831
|
|
|
1658
|
-
/**
|
|
1659
|
-
* @description Description of the tax item.
|
|
1660
|
-
|
|
1661
|
-
*/
|
|
1662
|
-
|
|
1663
832
|
description?:string;
|
|
1664
833
|
}
|
|
1665
834
|
export interface LineItemTax {
|
|
1666
|
-
/**
|
|
1667
|
-
* @description The unique reference id of the line item for which the tax is applicable
|
|
1668
|
-
|
|
1669
|
-
*/
|
|
1670
|
-
|
|
1671
835
|
line_item_id?:string;
|
|
1672
836
|
|
|
1673
|
-
/**
|
|
1674
|
-
* @description The name of the tax applied
|
|
1675
|
-
|
|
1676
|
-
*/
|
|
1677
|
-
|
|
1678
837
|
tax_name:string;
|
|
1679
838
|
|
|
1680
|
-
/**
|
|
1681
|
-
* @description The rate of tax used to calculate tax amount
|
|
1682
|
-
|
|
1683
|
-
*/
|
|
1684
|
-
|
|
1685
839
|
tax_rate:number;
|
|
1686
840
|
|
|
1687
|
-
/**
|
|
1688
|
-
* @description Indicates the service period end of the tax rate for the line item.
|
|
1689
|
-
|
|
1690
|
-
*/
|
|
1691
|
-
|
|
1692
841
|
date_to?:number;
|
|
1693
842
|
|
|
1694
|
-
/**
|
|
1695
|
-
* @description Indicates the service period start of the tax rate for the line item.
|
|
1696
|
-
|
|
1697
|
-
*/
|
|
1698
|
-
|
|
1699
843
|
date_from?:number;
|
|
1700
844
|
|
|
1701
|
-
/**
|
|
1702
|
-
* @description Indicates the prorated line item amount in cents.
|
|
1703
|
-
|
|
1704
|
-
*/
|
|
1705
|
-
|
|
1706
845
|
prorated_taxable_amount?:number;
|
|
1707
846
|
|
|
1708
|
-
/**
|
|
1709
|
-
* @description Indicates if tax is applied only on a portion of the line item amount.
|
|
1710
|
-
|
|
1711
|
-
*/
|
|
1712
|
-
|
|
1713
847
|
is_partial_tax_applied?:boolean;
|
|
1714
848
|
|
|
1715
|
-
/**
|
|
1716
|
-
* @description Indicates the non-compliance tax that should not be reported to the jurisdiction.
|
|
1717
|
-
|
|
1718
|
-
*/
|
|
1719
|
-
|
|
1720
849
|
is_non_compliance_tax?:boolean;
|
|
1721
850
|
|
|
1722
|
-
/**
|
|
1723
|
-
* @description Indicates the actual portion of the line item amount that is taxable.
|
|
1724
|
-
|
|
1725
|
-
*/
|
|
1726
|
-
|
|
1727
851
|
taxable_amount:number;
|
|
1728
852
|
|
|
1729
|
-
/**
|
|
1730
|
-
* @description The tax amount
|
|
1731
|
-
|
|
1732
|
-
*/
|
|
1733
|
-
|
|
1734
853
|
tax_amount:number;
|
|
1735
854
|
|
|
1736
|
-
|
|
1737
|
-
* @description The type of tax jurisdiction \* federal - The tax jurisdiction is a federal \* state - The tax jurisdiction is a state \* county - The tax jurisdiction is a county \* country - The tax jurisdiction is a country \* city - The tax jurisdiction is a city \* special - Special tax jurisdiction. \* unincorporated - Combined tax of state and county. \* other - Jurisdictions other than the ones listed above.
|
|
1738
|
-
|
|
1739
|
-
*/
|
|
1740
|
-
|
|
1741
|
-
tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
|
|
1742
|
-
|
|
1743
|
-
/**
|
|
1744
|
-
* @description The name of the tax jurisdiction
|
|
1745
|
-
|
|
1746
|
-
*/
|
|
855
|
+
tax_juris_type?:'country' | 'federal' | 'state' | 'county' | 'city' | 'special' | 'unincorporated' | 'other';
|
|
1747
856
|
|
|
1748
857
|
tax_juris_name?:string;
|
|
1749
858
|
|
|
1750
|
-
/**
|
|
1751
|
-
* @description The tax jurisdiction code
|
|
1752
|
-
|
|
1753
|
-
*/
|
|
1754
|
-
|
|
1755
859
|
tax_juris_code?:string;
|
|
1756
860
|
|
|
1757
|
-
/**
|
|
1758
|
-
* @description Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.
|
|
1759
|
-
|
|
1760
|
-
*/
|
|
1761
|
-
|
|
1762
861
|
tax_amount_in_local_currency?:number;
|
|
1763
862
|
|
|
1764
|
-
/**
|
|
1765
|
-
* @description The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.
|
|
1766
|
-
|
|
1767
|
-
*/
|
|
1768
|
-
|
|
1769
863
|
local_currency_code?:string;
|
|
1770
864
|
}
|
|
1771
865
|
export interface LineItemTier {
|
|
1772
|
-
/**
|
|
1773
|
-
* @description Uniquely identifies a line_item
|
|
1774
|
-
|
|
1775
|
-
*/
|
|
1776
|
-
|
|
1777
866
|
line_item_id?:string;
|
|
1778
867
|
|
|
1779
|
-
/**
|
|
1780
|
-
* @description The lower limit of a range of units for the tier
|
|
1781
|
-
|
|
1782
|
-
*/
|
|
1783
|
-
|
|
1784
868
|
starting_unit:number;
|
|
1785
869
|
|
|
1786
|
-
/**
|
|
1787
|
-
* @description The upper limit of a range of units for the tier
|
|
1788
|
-
|
|
1789
|
-
*/
|
|
1790
|
-
|
|
1791
870
|
ending_unit?:number;
|
|
1792
871
|
|
|
1793
|
-
/**
|
|
1794
|
-
* @description The number of units purchased in a range.
|
|
1795
|
-
|
|
1796
|
-
*/
|
|
1797
|
-
|
|
1798
872
|
quantity_used:number;
|
|
1799
873
|
|
|
1800
|
-
/**
|
|
1801
|
-
* @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.
|
|
1802
|
-
|
|
1803
|
-
*/
|
|
1804
|
-
|
|
1805
874
|
unit_amount:number;
|
|
1806
875
|
|
|
1807
|
-
/**
|
|
1808
|
-
* @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.
|
|
1809
|
-
|
|
1810
|
-
*/
|
|
1811
|
-
|
|
1812
876
|
starting_unit_in_decimal?:string;
|
|
1813
877
|
|
|
1814
|
-
/**
|
|
1815
|
-
* @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.
|
|
1816
|
-
|
|
1817
|
-
*/
|
|
1818
|
-
|
|
1819
878
|
ending_unit_in_decimal?:string;
|
|
1820
879
|
|
|
1821
|
-
/**
|
|
1822
|
-
* @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.
|
|
1823
|
-
|
|
1824
|
-
*/
|
|
1825
|
-
|
|
1826
880
|
quantity_used_in_decimal?:string;
|
|
1827
881
|
|
|
1828
|
-
/**
|
|
1829
|
-
* @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.
|
|
1830
|
-
|
|
1831
|
-
*/
|
|
1832
|
-
|
|
1833
882
|
unit_amount_in_decimal?:string;
|
|
1834
883
|
}
|
|
1835
884
|
export interface ShippingAddress {
|
|
1836
|
-
/**
|
|
1837
|
-
* @description The first name of the contact.
|
|
1838
|
-
|
|
1839
|
-
*/
|
|
1840
|
-
|
|
1841
885
|
first_name?:string;
|
|
1842
886
|
|
|
1843
|
-
/**
|
|
1844
|
-
* @description The last name of the contact.
|
|
1845
|
-
|
|
1846
|
-
*/
|
|
1847
|
-
|
|
1848
887
|
last_name?:string;
|
|
1849
888
|
|
|
1850
|
-
/**
|
|
1851
|
-
* @description The email address.
|
|
1852
|
-
|
|
1853
|
-
*/
|
|
1854
|
-
|
|
1855
889
|
email?:string;
|
|
1856
890
|
|
|
1857
|
-
/**
|
|
1858
|
-
* @description The company name.
|
|
1859
|
-
|
|
1860
|
-
*/
|
|
1861
|
-
|
|
1862
891
|
company?:string;
|
|
1863
892
|
|
|
1864
|
-
/**
|
|
1865
|
-
* @description The phone number.
|
|
1866
|
-
|
|
1867
|
-
*/
|
|
1868
|
-
|
|
1869
893
|
phone?:string;
|
|
1870
894
|
|
|
1871
|
-
/**
|
|
1872
|
-
* @description Address line 1
|
|
1873
|
-
|
|
1874
|
-
*/
|
|
1875
|
-
|
|
1876
895
|
line1?:string;
|
|
1877
896
|
|
|
1878
|
-
/**
|
|
1879
|
-
* @description Address line 2
|
|
1880
|
-
|
|
1881
|
-
*/
|
|
1882
|
-
|
|
1883
897
|
line2?:string;
|
|
1884
898
|
|
|
1885
|
-
/**
|
|
1886
|
-
* @description Address line 3
|
|
1887
|
-
|
|
1888
|
-
*/
|
|
1889
|
-
|
|
1890
899
|
line3?:string;
|
|
1891
900
|
|
|
1892
|
-
/**
|
|
1893
|
-
* @description The name of the city.
|
|
1894
|
-
|
|
1895
|
-
*/
|
|
1896
|
-
|
|
1897
901
|
city?:string;
|
|
1898
902
|
|
|
1899
|
-
/**
|
|
1900
|
-
* @description The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`).
|
|
1901
|
-
|
|
1902
|
-
*/
|
|
1903
|
-
|
|
1904
903
|
state_code?:string;
|
|
1905
904
|
|
|
1906
|
-
/**
|
|
1907
|
-
* @description The state/province name.
|
|
1908
|
-
|
|
1909
|
-
*/
|
|
1910
|
-
|
|
1911
905
|
state?:string;
|
|
1912
906
|
|
|
1913
|
-
/**
|
|
1914
|
-
* @description The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).
|
|
1915
|
-
|
|
1916
|
-
**Note** : If you enter an invalid country code, the system will return an error.
|
|
1917
|
-
|
|
1918
|
-
**Brexit**
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom -- Northern Ireland**) is available as an option.
|
|
1922
|
-
|
|
1923
|
-
*/
|
|
1924
|
-
|
|
1925
907
|
country?:string;
|
|
1926
908
|
|
|
1927
|
-
/**
|
|
1928
|
-
* @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
|
|
1929
|
-
|
|
1930
|
-
*/
|
|
1931
|
-
|
|
1932
909
|
zip?:string;
|
|
1933
910
|
|
|
1934
|
-
/**
|
|
1935
|
-
* @description The address verification status. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid.
|
|
1936
|
-
|
|
1937
|
-
*/
|
|
1938
|
-
|
|
1939
911
|
validation_status?:ValidationStatus;
|
|
1940
912
|
|
|
1941
|
-
/**
|
|
1942
|
-
* @description The index number of the subscription to which the item price is added. Provide a unique number between `0` and `4` (inclusive) for each subscription that is to be created.
|
|
1943
|
-
|
|
1944
|
-
*/
|
|
1945
|
-
|
|
1946
913
|
index:number;
|
|
1947
914
|
}
|
|
1948
915
|
export interface BillingAddress {
|
|
1949
|
-
/**
|
|
1950
|
-
* @description The first name of the billing contact.
|
|
1951
|
-
|
|
1952
|
-
*/
|
|
1953
|
-
|
|
1954
916
|
first_name?:string;
|
|
1955
917
|
|
|
1956
|
-
/**
|
|
1957
|
-
* @description The last name of the billing contact.
|
|
1958
|
-
|
|
1959
|
-
*/
|
|
1960
|
-
|
|
1961
918
|
last_name?:string;
|
|
1962
919
|
|
|
1963
|
-
/**
|
|
1964
|
-
* @description The email address.
|
|
1965
|
-
|
|
1966
|
-
*/
|
|
1967
|
-
|
|
1968
920
|
email?:string;
|
|
1969
921
|
|
|
1970
|
-
/**
|
|
1971
|
-
* @description The company name.
|
|
1972
|
-
|
|
1973
|
-
*/
|
|
1974
|
-
|
|
1975
922
|
company?:string;
|
|
1976
923
|
|
|
1977
|
-
/**
|
|
1978
|
-
* @description The phone number.
|
|
1979
|
-
|
|
1980
|
-
*/
|
|
1981
|
-
|
|
1982
924
|
phone?:string;
|
|
1983
925
|
|
|
1984
|
-
/**
|
|
1985
|
-
* @description Address line 1
|
|
1986
|
-
|
|
1987
|
-
*/
|
|
1988
|
-
|
|
1989
926
|
line1?:string;
|
|
1990
927
|
|
|
1991
|
-
/**
|
|
1992
|
-
* @description Address line 2
|
|
1993
|
-
|
|
1994
|
-
*/
|
|
1995
|
-
|
|
1996
928
|
line2?:string;
|
|
1997
929
|
|
|
1998
|
-
/**
|
|
1999
|
-
* @description Address line 3
|
|
2000
|
-
|
|
2001
|
-
*/
|
|
2002
|
-
|
|
2003
930
|
line3?:string;
|
|
2004
931
|
|
|
2005
|
-
/**
|
|
2006
|
-
* @description The name of the city.
|
|
2007
|
-
|
|
2008
|
-
*/
|
|
2009
|
-
|
|
2010
932
|
city?:string;
|
|
2011
933
|
|
|
2012
|
-
/**
|
|
2013
|
-
* @description The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`).
|
|
2014
|
-
|
|
2015
|
-
*/
|
|
2016
|
-
|
|
2017
934
|
state_code?:string;
|
|
2018
935
|
|
|
2019
|
-
/**
|
|
2020
|
-
* @description State or Province
|
|
2021
|
-
|
|
2022
|
-
*/
|
|
2023
|
-
|
|
2024
936
|
state?:string;
|
|
2025
937
|
|
|
2026
|
-
/**
|
|
2027
|
-
* @description The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).
|
|
2028
|
-
|
|
2029
|
-
**Note** : If you enter an invalid country code, the system will return an error.
|
|
2030
|
-
|
|
2031
|
-
**Brexit**
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom -- Northern Ireland**) is available as an option.
|
|
2035
|
-
|
|
2036
|
-
*/
|
|
2037
|
-
|
|
2038
938
|
country?:string;
|
|
2039
939
|
|
|
2040
|
-
/**
|
|
2041
|
-
* @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
|
|
2042
|
-
|
|
2043
|
-
*/
|
|
2044
|
-
|
|
2045
940
|
zip?:string;
|
|
2046
941
|
|
|
2047
|
-
/**
|
|
2048
|
-
* @description The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated.
|
|
2049
|
-
|
|
2050
|
-
*/
|
|
2051
|
-
|
|
2052
942
|
validation_status?:ValidationStatus;
|
|
2053
943
|
}
|
|
2054
944
|
}
|