chargebee 2.25.3 → 2.26.1
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 +35 -0
- package/README.md +55 -49
- package/lib/chargebee.js +1 -1
- package/package.json +1 -1
- package/types/core.d.ts +1 -0
- package/types/resources/Address.d.ts +245 -5
- package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
- package/types/resources/AttachedItem.d.ts +305 -13
- package/types/resources/Card.d.ts +485 -13
- package/types/resources/Comment.d.ts +177 -11
- package/types/resources/Contact.d.ts +54 -0
- package/types/resources/ContractTerm.d.ts +83 -0
- package/types/resources/Coupon.d.ts +665 -20
- package/types/resources/CouponCode.d.ts +56 -5
- package/types/resources/CouponSet.d.ts +224 -17
- package/types/resources/CreditNote.d.ts +1202 -44
- package/types/resources/CreditNoteEstimate.d.ts +75 -6
- package/types/resources/Customer.d.ts +2132 -73
- package/types/resources/DifferentialPrice.d.ts +266 -15
- package/types/resources/Discount.d.ts +107 -0
- package/types/resources/Download.d.ts +18 -0
- package/types/resources/EntitlementOverride.d.ts +101 -7
- package/types/resources/Estimate.d.ts +1181 -27
- package/types/resources/Event.d.ts +145 -8
- package/types/resources/Export.d.ts +703 -32
- package/types/resources/Feature.d.ts +356 -22
- package/types/resources/Gift.d.ts +351 -24
- package/types/resources/Hierarchy.d.ts +30 -0
- package/types/resources/HostedPage.d.ts +1212 -37
- package/types/resources/ImpactedItem.d.ts +41 -1
- package/types/resources/ImpactedSubscription.d.ts +36 -1
- package/types/resources/InAppSubscription.d.ts +636 -9
- package/types/resources/Invoice.d.ts +2293 -93
- package/types/resources/InvoiceEstimate.d.ts +75 -6
- package/types/resources/Item.d.ts +542 -16
- package/types/resources/ItemEntitlement.d.ts +172 -13
- package/types/resources/ItemFamily.d.ts +173 -15
- package/types/resources/ItemPrice.d.ts +971 -26
- package/types/resources/Media.d.ts +24 -0
- package/types/resources/NonSubscription.d.ts +51 -3
- package/types/resources/Order.d.ts +1224 -32
- package/types/resources/PaymentIntent.d.ts +318 -8
- package/types/resources/PaymentReferenceNumber.d.ts +24 -0
- package/types/resources/PaymentSource.d.ts +1259 -55
- package/types/resources/PaymentVoucher.d.ts +262 -14
- package/types/resources/PortalSession.d.ts +187 -10
- package/types/resources/PromotionalCredit.d.ts +351 -16
- package/types/resources/Purchase.d.ts +274 -5
- package/types/resources/Quote.d.ts +1595 -62
- package/types/resources/QuoteLineGroup.d.ts +134 -5
- package/types/resources/QuotedCharge.d.ts +63 -5
- package/types/resources/QuotedSubscription.d.ts +192 -5
- package/types/resources/ResourceMigration.d.ts +73 -3
- package/types/resources/SiteMigrationDetail.d.ts +98 -5
- package/types/resources/Subscription.d.ts +3462 -137
- package/types/resources/SubscriptionEntitlement.d.ts +116 -8
- package/types/resources/SubscriptionEstimate.d.ts +36 -2
- package/types/resources/TaxWithheld.d.ts +32 -0
- package/types/resources/ThirdPartyPaymentMethod.d.ts +24 -0
- package/types/resources/TimeMachine.d.ts +99 -7
- package/types/resources/Token.d.ts +179 -7
- package/types/resources/Transaction.d.ts +597 -25
- package/types/resources/UnbilledCharge.d.ts +355 -14
- package/types/resources/Usage.d.ts +259 -13
- package/types/resources/VirtualBankAccount.d.ts +255 -17
|
@@ -1,376 +1,1909 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface Quote {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description The quote number. Acts as a identifier for quote and typically generated sequentially.
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
4
10
|
id:string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description The quote name will be used as the pdf name of the quote.
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
|
|
5
17
|
name?:string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description Purchase Order Number
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
|
|
6
24
|
po_number?:string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @description The identifier of the customer this quote belongs to.
|
|
28
|
+
|
|
29
|
+
*/
|
|
30
|
+
|
|
7
31
|
customer_id:string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @description The identifier of the subscription this quote belongs to.
|
|
35
|
+
|
|
36
|
+
*/
|
|
37
|
+
|
|
8
38
|
subscription_id?:string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @description The identifier of the invoice generated while converting this quote.
|
|
42
|
+
|
|
43
|
+
*/
|
|
44
|
+
|
|
9
45
|
invoice_id?:string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @description Current status of this quote. \* open - Open \* closed - Closed \* declined - Declined. \* invoiced - Invoiced \* accepted - Accepted.
|
|
49
|
+
|
|
50
|
+
*/
|
|
51
|
+
|
|
10
52
|
status:'declined' | 'invoiced' | 'accepted' | 'closed' | 'open';
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @description Operation Type \* onetime_invoice - onetime_invoice \* change_subscription - change_subscription \* create_subscription_for_customer - create_subscription_for_customer
|
|
56
|
+
|
|
57
|
+
*/
|
|
58
|
+
|
|
11
59
|
operation_type:'onetime_invoice' | 'change_subscription' | 'create_subscription_for_customer';
|
|
60
|
+
|
|
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
|
+
*/
|
|
65
|
+
|
|
12
66
|
vat_number?:string;
|
|
67
|
+
|
|
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
|
+
|
|
13
73
|
price_type:PriceType;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @description Quote will be valid till this date. After this date quote will be marked as closed.
|
|
77
|
+
|
|
78
|
+
*/
|
|
79
|
+
|
|
14
80
|
valid_till:number;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @description Creation date of the quote. Typically this is the date on which quote is generated.
|
|
84
|
+
|
|
85
|
+
*/
|
|
86
|
+
|
|
15
87
|
date:number;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @description Total contract value. Applicable when multi billing cycle quote is enabled.
|
|
91
|
+
|
|
92
|
+
*/
|
|
93
|
+
|
|
16
94
|
total_payable?:number;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @description Charge on acceptance. Applicable when multi billing cycle quote is enabled.
|
|
98
|
+
|
|
99
|
+
*/
|
|
100
|
+
|
|
17
101
|
charge_on_acceptance?:number;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @description Subtotal (in cents) of the first quote line group.
|
|
105
|
+
|
|
106
|
+
*/
|
|
107
|
+
|
|
18
108
|
sub_total:number;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @description Total (in cents) of the first quote line group.
|
|
112
|
+
|
|
113
|
+
*/
|
|
114
|
+
|
|
19
115
|
total?:number;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @description Credits applied (in cents) for the first quote line group.
|
|
119
|
+
|
|
120
|
+
*/
|
|
121
|
+
|
|
20
122
|
credits_applied?:number;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @description Existing outstanding payments (in cents) if any, applied to the first quote line group.
|
|
126
|
+
|
|
127
|
+
*/
|
|
128
|
+
|
|
21
129
|
amount_paid?:number;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @description Amount due (in cents) for the first quote line group.
|
|
133
|
+
|
|
134
|
+
*/
|
|
135
|
+
|
|
22
136
|
amount_due?:number;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @description Version of the quote.
|
|
140
|
+
|
|
141
|
+
*/
|
|
142
|
+
|
|
23
143
|
version?:number;
|
|
144
|
+
|
|
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
|
+
|
|
24
150
|
resource_version?:number;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @description Timestamp indicating when this quote was last updated.
|
|
154
|
+
|
|
155
|
+
*/
|
|
156
|
+
|
|
25
157
|
updated_at?:number;
|
|
158
|
+
|
|
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
|
+
|
|
26
169
|
vat_number_prefix?:string;
|
|
170
|
+
|
|
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
|
+
|
|
27
176
|
tax_category?:string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* @description The currency code (ISO 4217 format) of the quote.
|
|
180
|
+
|
|
181
|
+
*/
|
|
182
|
+
|
|
28
183
|
currency_code:string;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* @description List of notes associated with this quotes.
|
|
187
|
+
|
|
188
|
+
*/
|
|
189
|
+
|
|
29
190
|
notes?:any[];
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @description Specifies the contract term's start date.
|
|
194
|
+
|
|
195
|
+
*/
|
|
196
|
+
|
|
30
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
|
+
|
|
31
204
|
contract_term_end?:number;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @description Specifies the charge to be applied for terminating the contract term.
|
|
208
|
+
|
|
209
|
+
*/
|
|
210
|
+
|
|
32
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
|
+
|
|
33
218
|
business_entity_id:string;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @description The list of line items for this quote.
|
|
222
|
+
|
|
223
|
+
*/
|
|
224
|
+
|
|
34
225
|
line_items?:Quote.LineItem[];
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* @description The list of all deductions applied to the quote.
|
|
229
|
+
|
|
230
|
+
*/
|
|
231
|
+
|
|
35
232
|
discounts?:Quote.Discount[];
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* @description The list of deductions applied for each line item of this quote.
|
|
236
|
+
|
|
237
|
+
*/
|
|
238
|
+
|
|
36
239
|
line_item_discounts?:Quote.LineItemDiscount[];
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* @description The list of taxes applicable for this quote.
|
|
243
|
+
|
|
244
|
+
*/
|
|
245
|
+
|
|
37
246
|
taxes?:Quote.Tax[];
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @description The list of taxes applied on the line items of this quote.
|
|
250
|
+
|
|
251
|
+
*/
|
|
252
|
+
|
|
38
253
|
line_item_taxes?:Quote.LineItemTax[];
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* @description The list of tiers applicable for the various line items in this quote.
|
|
257
|
+
|
|
258
|
+
*/
|
|
259
|
+
|
|
39
260
|
line_item_tiers?:Quote.LineItemTier[];
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* @description Shipping address for the quote.
|
|
264
|
+
|
|
265
|
+
*/
|
|
266
|
+
|
|
40
267
|
shipping_address?:Quote.ShippingAddress;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @description Billing address for the quote.
|
|
271
|
+
|
|
272
|
+
*/
|
|
273
|
+
|
|
41
274
|
billing_address?:Quote.BillingAddress;
|
|
42
275
|
}
|
|
43
276
|
export namespace Quote {
|
|
44
|
-
export class QuoteResource {
|
|
277
|
+
export class QuoteResource {
|
|
278
|
+
/**
|
|
279
|
+
* @description Create a quote for new subscription line items of a customer.
|
|
280
|
+
|
|
281
|
+
*/
|
|
282
|
+
|
|
45
283
|
create_sub_items_for_customer_quote(customer_id:string, input?:CreateSubItemsForCustomerQuoteInputParam):ChargebeeRequest<CreateSubItemsForCustomerQuoteResponse>;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* @description Retrieves the quotes identified by the 'number' specified in the url.
|
|
287
|
+
|
|
288
|
+
*/
|
|
289
|
+
|
|
46
290
|
retrieve(quote_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* @description Changes the quote produced for creating a new subscription items
|
|
294
|
+
|
|
295
|
+
*/
|
|
296
|
+
|
|
47
297
|
edit_create_sub_customer_quote_for_items(quote_id:string, input?:EditCreateSubCustomerQuoteForItemsInputParam):ChargebeeRequest<EditCreateSubCustomerQuoteForItemsResponse>;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* @description Updates the status of the quote. Status can be updated to Accepted, Declined, and Closed.
|
|
301
|
+
|
|
302
|
+
*/
|
|
303
|
+
|
|
48
304
|
update_status(quote_id:string, input:UpdateStatusInputParam):ChargebeeRequest<UpdateStatusResponse>;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* @description Create a quote for updating subscription line items.
|
|
308
|
+
|
|
309
|
+
*/
|
|
310
|
+
|
|
49
311
|
update_subscription_quote_for_items(input?:UpdateSubscriptionQuoteForItemsInputParam):ChargebeeRequest<UpdateSubscriptionQuoteForItemsResponse>;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* @description This API retrieves all the quote line groups and lineitems for a quote.
|
|
315
|
+
|
|
316
|
+
*/
|
|
317
|
+
|
|
50
318
|
quote_line_groups_for_quote(quote_id:string, input?:QuoteLineGroupsForQuoteInputParam):ChargebeeRequest<QuoteLineGroupsForQuoteResponse>;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* @description Can be used to extend the expiry date of a quote.
|
|
322
|
+
|
|
323
|
+
*/
|
|
324
|
+
|
|
51
325
|
extend_expiry_date(quote_id:string, input:ExtendExpiryDateInputParam):ChargebeeRequest<ExtendExpiryDateResponse>;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* @description Changes the quote produced for adding one-time charges and charge items.
|
|
329
|
+
|
|
330
|
+
*/
|
|
331
|
+
|
|
52
332
|
edit_for_charge_items_and_charges(quote_id:string, input?:EditForChargeItemsAndChargesInputParam):ChargebeeRequest<EditForChargeItemsAndChargesResponse>;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* @description Changes the quote produced for updating the subscription items.
|
|
336
|
+
|
|
337
|
+
*/
|
|
338
|
+
|
|
53
339
|
edit_update_subscription_quote_for_items(quote_id:string, input?:EditUpdateSubscriptionQuoteForItemsInputParam):ChargebeeRequest<EditUpdateSubscriptionQuoteForItemsResponse>;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* @description List all quotes.
|
|
343
|
+
|
|
344
|
+
*/
|
|
345
|
+
|
|
54
346
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* @description Retrieves the quote as a PDF. The returned URL is secure, allows download and expires in 60 minutes.
|
|
350
|
+
|
|
351
|
+
*/
|
|
352
|
+
|
|
55
353
|
pdf(quote_id:string, input?:PdfInputParam):ChargebeeRequest<PdfResponse>;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* @description This API is to convert a quote to an invoice.
|
|
357
|
+
|
|
358
|
+
*/
|
|
359
|
+
|
|
56
360
|
convert(quote_id:string, input?:ConvertInputParam):ChargebeeRequest<ConvertResponse>;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* @description Creates a quote using charge-items and one-time charges.
|
|
364
|
+
|
|
365
|
+
*/
|
|
366
|
+
|
|
57
367
|
create_for_charge_items_and_charges(input:CreateForChargeItemsAndChargesInputParam):ChargebeeRequest<CreateForChargeItemsAndChargesResponse>;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* @description Delete a quote using this API.
|
|
371
|
+
|
|
372
|
+
*/
|
|
373
|
+
|
|
58
374
|
delete(quote_id:string, input?:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
|
|
59
375
|
}
|
|
60
|
-
export interface CreateSubItemsForCustomerQuoteResponse {
|
|
61
|
-
|
|
62
|
-
|
|
376
|
+
export interface CreateSubItemsForCustomerQuoteResponse {
|
|
377
|
+
/**
|
|
378
|
+
* @description Create a quote for new subscription line items of a customer.
|
|
379
|
+
|
|
380
|
+
*/
|
|
381
|
+
|
|
382
|
+
quote:Quote;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* @description Create a quote for new subscription line items of a customer.
|
|
386
|
+
|
|
387
|
+
*/
|
|
388
|
+
|
|
389
|
+
quoted_subscription?:QuotedSubscription;
|
|
63
390
|
}
|
|
64
391
|
export interface CreateSubItemsForCustomerQuoteInputParam {
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* @description The quote name will be used as the pdf name of the quote.
|
|
395
|
+
|
|
396
|
+
*/
|
|
397
|
+
|
|
65
398
|
name?:string;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* @description Notes specific to this quote that you want customers to see on the quote PDF.
|
|
402
|
+
|
|
403
|
+
*/
|
|
404
|
+
|
|
66
405
|
notes?:string;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* @description Quotes will be vaild till this date. After this quote will be marked as closed.
|
|
409
|
+
|
|
410
|
+
*/
|
|
411
|
+
|
|
67
412
|
expires_at?:number;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* @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.
|
|
416
|
+
|
|
417
|
+
*/
|
|
418
|
+
|
|
68
419
|
billing_cycles?:number;
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription.
|
|
423
|
+
|
|
424
|
+
*/
|
|
425
|
+
|
|
69
426
|
mandatory_items_to_remove?:string[];
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* @description The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).
|
|
430
|
+
|
|
431
|
+
*/
|
|
432
|
+
|
|
70
433
|
terms_to_charge?:number;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* @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..
|
|
437
|
+
|
|
438
|
+
*/
|
|
439
|
+
|
|
71
440
|
billing_alignment_mode?:BillingAlignmentMode;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* @description Identifier of the coupon as a List. Coupon Codes can also be passed.
|
|
444
|
+
|
|
445
|
+
*/
|
|
446
|
+
|
|
72
447
|
coupon_ids?:string[];
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* @description Parameters for subscription
|
|
451
|
+
|
|
452
|
+
*/
|
|
453
|
+
|
|
73
454
|
subscription?:{contract_term_billing_cycle_on_renewal?:number,id?:string,po_number?:string,start_date?:number,trial_end?:number};
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* @description Parameters for shipping_address
|
|
458
|
+
|
|
459
|
+
*/
|
|
460
|
+
|
|
74
461
|
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};
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* @description Parameters for contract_term
|
|
465
|
+
|
|
466
|
+
*/
|
|
467
|
+
|
|
75
468
|
contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* @description Parameters for subscription_items
|
|
472
|
+
|
|
473
|
+
*/
|
|
474
|
+
|
|
76
475
|
subscription_items?:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* @description Parameters for discounts
|
|
479
|
+
|
|
480
|
+
*/
|
|
481
|
+
|
|
77
482
|
discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* @description Parameters for item_tiers
|
|
486
|
+
|
|
487
|
+
*/
|
|
488
|
+
|
|
78
489
|
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}[];
|
|
79
490
|
}
|
|
80
|
-
export interface RetrieveResponse {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
491
|
+
export interface RetrieveResponse {
|
|
492
|
+
/**
|
|
493
|
+
* @description Retrieves the quotes identified by the 'number' specified in the url.
|
|
494
|
+
|
|
495
|
+
*/
|
|
496
|
+
|
|
497
|
+
quote:Quote;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* @description Retrieves the quotes identified by the 'number' specified in the url.
|
|
501
|
+
|
|
502
|
+
*/
|
|
503
|
+
|
|
504
|
+
quoted_subscription?:QuotedSubscription;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* @description Retrieves the quotes identified by the 'number' specified in the url.
|
|
508
|
+
|
|
509
|
+
*/
|
|
510
|
+
|
|
511
|
+
quoted_charge?:QuotedCharge;
|
|
84
512
|
}
|
|
85
513
|
|
|
86
|
-
export interface EditCreateSubCustomerQuoteForItemsResponse {
|
|
87
|
-
|
|
88
|
-
|
|
514
|
+
export interface EditCreateSubCustomerQuoteForItemsResponse {
|
|
515
|
+
/**
|
|
516
|
+
* @description Changes the quote produced for creating a new subscription items
|
|
517
|
+
|
|
518
|
+
*/
|
|
519
|
+
|
|
520
|
+
quote:Quote;
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* @description Changes the quote produced for creating a new subscription items
|
|
524
|
+
|
|
525
|
+
*/
|
|
526
|
+
|
|
527
|
+
quoted_subscription?:QuotedSubscription;
|
|
89
528
|
}
|
|
90
529
|
export interface EditCreateSubCustomerQuoteForItemsInputParam {
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* @description Notes specific to this quote that you want customers to see on the quote PDF.
|
|
533
|
+
|
|
534
|
+
*/
|
|
535
|
+
|
|
91
536
|
notes?:string;
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* @description Quotes will be vaild till this date. After this quote will be marked as closed.
|
|
540
|
+
|
|
541
|
+
*/
|
|
542
|
+
|
|
92
543
|
expires_at?:number;
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* @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.
|
|
547
|
+
|
|
548
|
+
*/
|
|
549
|
+
|
|
93
550
|
billing_cycles?:number;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription.
|
|
554
|
+
|
|
555
|
+
*/
|
|
556
|
+
|
|
94
557
|
mandatory_items_to_remove?:string[];
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* @description The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).
|
|
561
|
+
|
|
562
|
+
*/
|
|
563
|
+
|
|
95
564
|
terms_to_charge?:number;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* @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..
|
|
568
|
+
|
|
569
|
+
*/
|
|
570
|
+
|
|
96
571
|
billing_alignment_mode?:BillingAlignmentMode;
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* @description Identifier of the coupon as a List. Coupon Codes can also be passed.
|
|
575
|
+
|
|
576
|
+
*/
|
|
577
|
+
|
|
97
578
|
coupon_ids?:string[];
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* @description Parameters for subscription
|
|
582
|
+
|
|
583
|
+
*/
|
|
584
|
+
|
|
98
585
|
subscription?:{contract_term_billing_cycle_on_renewal?:number,id?:string,start_date?:number,trial_end?:number};
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* @description Parameters for shipping_address
|
|
589
|
+
|
|
590
|
+
*/
|
|
591
|
+
|
|
99
592
|
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};
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* @description Parameters for contract_term
|
|
596
|
+
|
|
597
|
+
*/
|
|
598
|
+
|
|
100
599
|
contract_term?:{action_at_term_end?:'cancel' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* @description Parameters for subscription_items
|
|
603
|
+
|
|
604
|
+
*/
|
|
605
|
+
|
|
101
606
|
subscription_items?:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* @description Parameters for discounts
|
|
610
|
+
|
|
611
|
+
*/
|
|
612
|
+
|
|
102
613
|
discounts?:{amount?:number,apply_on:ApplyOn,duration_type:DurationType,included_in_mrr?:boolean,item_price_id?:string,percentage?:number,period?:number,period_unit?:PeriodUnit}[];
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* @description Parameters for item_tiers
|
|
617
|
+
|
|
618
|
+
*/
|
|
619
|
+
|
|
103
620
|
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}[];
|
|
104
621
|
}
|
|
105
|
-
export interface UpdateStatusResponse {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
622
|
+
export interface UpdateStatusResponse {
|
|
623
|
+
/**
|
|
624
|
+
* @description Updates the status of the quote. Status can be updated to Accepted, Declined, and Closed.
|
|
625
|
+
|
|
626
|
+
*/
|
|
627
|
+
|
|
628
|
+
quote:Quote;
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* @description Updates the status of the quote. Status can be updated to Accepted, Declined, and Closed.
|
|
632
|
+
|
|
633
|
+
*/
|
|
634
|
+
|
|
635
|
+
quoted_subscription?:QuotedSubscription;
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* @description Updates the status of the quote. Status can be updated to Accepted, Declined, and Closed.
|
|
639
|
+
|
|
640
|
+
*/
|
|
641
|
+
|
|
642
|
+
quoted_charge?:QuotedCharge;
|
|
109
643
|
}
|
|
110
644
|
export interface UpdateStatusInputParam {
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* @description Status to update for the quote. \* accepted - Accepted. \* closed - Closed \* declined - Declined.
|
|
648
|
+
|
|
649
|
+
*/
|
|
650
|
+
|
|
111
651
|
status:'declined' | 'accepted' | 'closed';
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* @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).
|
|
655
|
+
|
|
656
|
+
*/
|
|
657
|
+
|
|
112
658
|
comment?:string;
|
|
113
659
|
}
|
|
114
|
-
export interface UpdateSubscriptionQuoteForItemsResponse {
|
|
115
|
-
|
|
116
|
-
|
|
660
|
+
export interface UpdateSubscriptionQuoteForItemsResponse {
|
|
661
|
+
/**
|
|
662
|
+
* @description Create a quote for updating subscription line items.
|
|
663
|
+
|
|
664
|
+
*/
|
|
665
|
+
|
|
666
|
+
quote:Quote;
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* @description Create a quote for updating subscription line items.
|
|
670
|
+
|
|
671
|
+
*/
|
|
672
|
+
|
|
673
|
+
quoted_subscription?:QuotedSubscription;
|
|
117
674
|
}
|
|
118
675
|
export interface UpdateSubscriptionQuoteForItemsInputParam {
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* @description The quote name will be used as the pdf name of the quote.
|
|
679
|
+
|
|
680
|
+
*/
|
|
681
|
+
|
|
119
682
|
name?:string;
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* @description Notes specific to this quote that you want customers to see on the quote PDF.
|
|
686
|
+
|
|
687
|
+
*/
|
|
688
|
+
|
|
120
689
|
notes?:string;
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* @description Quotes will be vaild till this date. After this quote will be marked as closed.
|
|
693
|
+
|
|
694
|
+
*/
|
|
695
|
+
|
|
121
696
|
expires_at?:number;
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription.
|
|
700
|
+
|
|
701
|
+
*/
|
|
702
|
+
|
|
122
703
|
mandatory_items_to_remove?:string[];
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* @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.
|
|
707
|
+
|
|
708
|
+
*/
|
|
709
|
+
|
|
123
710
|
replace_items_list?:boolean;
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* @description Billing cycles set for plan-item price is used by default.
|
|
714
|
+
|
|
715
|
+
*/
|
|
716
|
+
|
|
124
717
|
billing_cycles?:number;
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* @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.
|
|
721
|
+
|
|
722
|
+
*/
|
|
723
|
+
|
|
125
724
|
terms_to_charge?:number;
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* @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.
|
|
728
|
+
**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:
|
|
729
|
+
|
|
730
|
+
* Backdating must be enabled for subscription reactivation operations.
|
|
731
|
+
* 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.
|
|
732
|
+
* The date is on or after the last date/time any of the product catalog items of the subscription were changed.
|
|
733
|
+
* 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.
|
|
734
|
+
.
|
|
735
|
+
|
|
736
|
+
*/
|
|
737
|
+
|
|
126
738
|
reactivate_from?:number;
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* @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.
|
|
742
|
+
|
|
743
|
+
*/
|
|
744
|
+
|
|
127
745
|
billing_alignment_mode?:BillingAlignmentMode;
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* @description Identifier of the coupon as a List. Coupon Codes can also be passed.
|
|
749
|
+
|
|
750
|
+
*/
|
|
751
|
+
|
|
128
752
|
coupon_ids?:string[];
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* @description Should be true if the existing coupons should be replaced with the ones that are being passed.
|
|
756
|
+
|
|
757
|
+
*/
|
|
758
|
+
|
|
129
759
|
replace_coupon_list?:boolean;
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* @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.
|
|
763
|
+
|
|
764
|
+
*/
|
|
765
|
+
|
|
130
766
|
change_option?:ChangeOption;
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* @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:
|
|
770
|
+
|
|
771
|
+
* Backdating must be enabled for subscription change operations.
|
|
772
|
+
* Only the following changes can be backdated:
|
|
773
|
+
* Changes in the recurring items or their prices.
|
|
774
|
+
* Addition of non-recurring items.
|
|
775
|
+
* Subscription `status` is `active`, `cancelled`, or `non_renewing`.
|
|
776
|
+
* 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.
|
|
777
|
+
* The date is on or after `current_term_start`.
|
|
778
|
+
* The date is on or after the last date/time any of the following changes were made:
|
|
779
|
+
* Changes in the recurring items or their prices.
|
|
780
|
+
* Addition of non-recurring items.
|
|
781
|
+
* 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.
|
|
782
|
+
.
|
|
783
|
+
|
|
784
|
+
*/
|
|
785
|
+
|
|
131
786
|
changes_scheduled_at?:number;
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* @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'.
|
|
790
|
+
**Note**: Specifying this value as 'false' has no impact on the default behaviour.
|
|
791
|
+
|
|
792
|
+
*/
|
|
793
|
+
|
|
132
794
|
force_term_reset?:boolean;
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* @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.
|
|
798
|
+
|
|
799
|
+
*/
|
|
800
|
+
|
|
133
801
|
reactivate?:boolean;
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* @description Parameters for subscription
|
|
805
|
+
|
|
806
|
+
*/
|
|
807
|
+
|
|
134
808
|
subscription?:{auto_collection?:AutoCollection,contract_term_billing_cycle_on_renewal?:number,id:string,offline_payment_method?:OfflinePaymentMethod,start_date?:number,trial_end?:number};
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* @description Parameters for billing_address
|
|
812
|
+
|
|
813
|
+
*/
|
|
814
|
+
|
|
135
815
|
billing_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};
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* @description Parameters for shipping_address
|
|
819
|
+
|
|
820
|
+
*/
|
|
821
|
+
|
|
136
822
|
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};
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* @description Parameters for customer
|
|
826
|
+
|
|
827
|
+
*/
|
|
828
|
+
|
|
137
829
|
customer?:{registered_for_gst?:boolean,vat_number?:string,vat_number_prefix?:string};
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* @description Parameters for contract_term
|
|
833
|
+
|
|
834
|
+
*/
|
|
835
|
+
|
|
138
836
|
contract_term?:{action_at_term_end?:'cancel' | 'renew_once' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* @description Parameters for subscription_items
|
|
840
|
+
|
|
841
|
+
*/
|
|
842
|
+
|
|
139
843
|
subscription_items?:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* @description Parameters for discounts
|
|
847
|
+
|
|
848
|
+
*/
|
|
849
|
+
|
|
140
850
|
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}[];
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* @description Parameters for item_tiers
|
|
854
|
+
|
|
855
|
+
*/
|
|
856
|
+
|
|
141
857
|
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}[];
|
|
142
858
|
}
|
|
143
|
-
export interface QuoteLineGroupsForQuoteResponse {
|
|
144
|
-
|
|
145
|
-
|
|
859
|
+
export interface QuoteLineGroupsForQuoteResponse {
|
|
860
|
+
/**
|
|
861
|
+
* @description This API retrieves all the quote line groups and lineitems for a quote.
|
|
862
|
+
|
|
863
|
+
*/
|
|
864
|
+
|
|
865
|
+
list:{quote_line_group:QuoteLineGroup}[];
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* @description This API retrieves all the quote line groups and lineitems for a quote.
|
|
869
|
+
|
|
870
|
+
*/
|
|
871
|
+
|
|
872
|
+
next_offset?:string;
|
|
146
873
|
}
|
|
147
874
|
export interface QuoteLineGroupsForQuoteInputParam {
|
|
148
|
-
[key : string]: any;
|
|
875
|
+
[key : string]: any;
|
|
876
|
+
/**
|
|
877
|
+
* @description The number of resources to be returned.
|
|
878
|
+
|
|
879
|
+
*/
|
|
880
|
+
|
|
149
881
|
limit?:number;
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* @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.
|
|
885
|
+
|
|
886
|
+
*/
|
|
887
|
+
|
|
150
888
|
offset?:string;
|
|
151
889
|
}
|
|
152
|
-
export interface ExtendExpiryDateResponse {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
890
|
+
export interface ExtendExpiryDateResponse {
|
|
891
|
+
/**
|
|
892
|
+
* @description Can be used to extend the expiry date of a quote.
|
|
893
|
+
|
|
894
|
+
*/
|
|
895
|
+
|
|
896
|
+
quote:Quote;
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* @description Can be used to extend the expiry date of a quote.
|
|
900
|
+
|
|
901
|
+
*/
|
|
902
|
+
|
|
903
|
+
quoted_subscription?:QuotedSubscription;
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* @description Can be used to extend the expiry date of a quote.
|
|
907
|
+
|
|
908
|
+
*/
|
|
909
|
+
|
|
910
|
+
quoted_charge?:QuotedCharge;
|
|
156
911
|
}
|
|
157
912
|
export interface ExtendExpiryDateInputParam {
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* @description Quote will be valid till this date. After this date quote will be marked as closed.
|
|
916
|
+
|
|
917
|
+
*/
|
|
918
|
+
|
|
158
919
|
valid_till:number;
|
|
159
920
|
}
|
|
160
|
-
export interface EditForChargeItemsAndChargesResponse {
|
|
161
|
-
|
|
162
|
-
|
|
921
|
+
export interface EditForChargeItemsAndChargesResponse {
|
|
922
|
+
/**
|
|
923
|
+
* @description Changes the quote produced for adding one-time charges and charge items.
|
|
924
|
+
|
|
925
|
+
*/
|
|
926
|
+
|
|
927
|
+
quote:Quote;
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* @description Changes the quote produced for adding one-time charges and charge items.
|
|
931
|
+
|
|
932
|
+
*/
|
|
933
|
+
|
|
934
|
+
quoted_charge?:QuotedCharge;
|
|
163
935
|
}
|
|
164
936
|
export interface EditForChargeItemsAndChargesInputParam {
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* @description Purchase Order Number for this quote.
|
|
940
|
+
|
|
941
|
+
*/
|
|
942
|
+
|
|
165
943
|
po_number?:string;
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* @description Notes specific to this quote that you want customers to see on the quote PDF.
|
|
947
|
+
|
|
948
|
+
*/
|
|
949
|
+
|
|
166
950
|
notes?:string;
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* @description Quotes will be vaild till this date. After this quote will be marked as closed.
|
|
954
|
+
|
|
955
|
+
*/
|
|
956
|
+
|
|
167
957
|
expires_at?:number;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* @description The currency code (ISO 4217 format) of the quote.
|
|
961
|
+
|
|
962
|
+
*/
|
|
963
|
+
|
|
168
964
|
currency_code?:string;
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* @description The 'One Time' coupon to be applied.
|
|
968
|
+
|
|
969
|
+
*/
|
|
970
|
+
|
|
169
971
|
coupon?:string;
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* @description List of Coupons to be added.
|
|
975
|
+
|
|
976
|
+
*/
|
|
977
|
+
|
|
170
978
|
coupon_ids?:string[];
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* @description Parameters for shipping_address
|
|
982
|
+
|
|
983
|
+
*/
|
|
984
|
+
|
|
171
985
|
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};
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* @description Parameters for item_prices
|
|
989
|
+
|
|
990
|
+
*/
|
|
991
|
+
|
|
172
992
|
item_prices?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* @description Parameters for item_tiers
|
|
996
|
+
|
|
997
|
+
*/
|
|
998
|
+
|
|
173
999
|
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}[];
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* @description Parameters for charges
|
|
1003
|
+
|
|
1004
|
+
*/
|
|
1005
|
+
|
|
174
1006
|
charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_transaction_type?:number,description?:string,service_period?:number}[];
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* @description Parameters for discounts
|
|
1010
|
+
|
|
1011
|
+
*/
|
|
1012
|
+
|
|
175
1013
|
discounts?:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
|
|
176
1014
|
}
|
|
177
|
-
export interface EditUpdateSubscriptionQuoteForItemsResponse {
|
|
178
|
-
|
|
179
|
-
|
|
1015
|
+
export interface EditUpdateSubscriptionQuoteForItemsResponse {
|
|
1016
|
+
/**
|
|
1017
|
+
* @description Changes the quote produced for updating the subscription items.
|
|
1018
|
+
|
|
1019
|
+
*/
|
|
1020
|
+
|
|
1021
|
+
quote:Quote;
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* @description Changes the quote produced for updating the subscription items.
|
|
1025
|
+
|
|
1026
|
+
*/
|
|
1027
|
+
|
|
1028
|
+
quoted_subscription?:QuotedSubscription;
|
|
180
1029
|
}
|
|
181
1030
|
export interface EditUpdateSubscriptionQuoteForItemsInputParam {
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* @description Notes specific to this quote that you want customers to see on the quote PDF.
|
|
1034
|
+
|
|
1035
|
+
*/
|
|
1036
|
+
|
|
182
1037
|
notes?:string;
|
|
1038
|
+
|
|
1039
|
+
/**
|
|
1040
|
+
* @description Quotes will be vaild till this date. After this quote will be marked as closed.
|
|
1041
|
+
|
|
1042
|
+
*/
|
|
1043
|
+
|
|
183
1044
|
expires_at?:number;
|
|
1045
|
+
|
|
1046
|
+
/**
|
|
1047
|
+
* @description Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription.
|
|
1048
|
+
|
|
1049
|
+
*/
|
|
1050
|
+
|
|
184
1051
|
mandatory_items_to_remove?:string[];
|
|
1052
|
+
|
|
1053
|
+
/**
|
|
1054
|
+
* @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.
|
|
1055
|
+
|
|
1056
|
+
*/
|
|
1057
|
+
|
|
185
1058
|
replace_items_list?:boolean;
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* @description Billing cycles set for plan-item price is used by default.
|
|
1062
|
+
|
|
1063
|
+
*/
|
|
1064
|
+
|
|
186
1065
|
billing_cycles?:number;
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* @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.
|
|
1069
|
+
|
|
1070
|
+
*/
|
|
1071
|
+
|
|
187
1072
|
terms_to_charge?:number;
|
|
1073
|
+
|
|
1074
|
+
/**
|
|
1075
|
+
* @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.
|
|
1076
|
+
**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:
|
|
1077
|
+
|
|
1078
|
+
* Backdating must be enabled for subscription reactivation operations.
|
|
1079
|
+
* 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.
|
|
1080
|
+
* The date is on or after the last date/time any of the product catalog items of the subscription were changed.
|
|
1081
|
+
* 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.
|
|
1082
|
+
.
|
|
1083
|
+
|
|
1084
|
+
*/
|
|
1085
|
+
|
|
188
1086
|
reactivate_from?:number;
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* @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.
|
|
1090
|
+
|
|
1091
|
+
*/
|
|
1092
|
+
|
|
189
1093
|
billing_alignment_mode?:BillingAlignmentMode;
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* @description Identifier of the coupon as a List. Coupon Codes can also be passed.
|
|
1097
|
+
|
|
1098
|
+
*/
|
|
1099
|
+
|
|
190
1100
|
coupon_ids?:string[];
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* @description Should be true if the existing coupons should be replaced with the ones that are being passed.
|
|
1104
|
+
|
|
1105
|
+
*/
|
|
1106
|
+
|
|
191
1107
|
replace_coupon_list?:boolean;
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* @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.
|
|
1111
|
+
|
|
1112
|
+
*/
|
|
1113
|
+
|
|
192
1114
|
change_option?:ChangeOption;
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* @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:
|
|
1118
|
+
|
|
1119
|
+
* Backdating must be enabled for subscription change operations.
|
|
1120
|
+
* Only the following changes can be backdated:
|
|
1121
|
+
* Changes in the recurring items or their prices.
|
|
1122
|
+
* Addition of non-recurring items.
|
|
1123
|
+
* Subscription `status` is `active`, `cancelled`, or `non_renewing`.
|
|
1124
|
+
* 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.
|
|
1125
|
+
* The date is on or after `current_term_start`.
|
|
1126
|
+
* The date is on or after the last date/time any of the following changes were made:
|
|
1127
|
+
* Changes in the recurring items or their prices.
|
|
1128
|
+
* Addition of non-recurring items.
|
|
1129
|
+
* 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.
|
|
1130
|
+
.
|
|
1131
|
+
|
|
1132
|
+
*/
|
|
1133
|
+
|
|
193
1134
|
changes_scheduled_at?:number;
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* @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'.
|
|
1138
|
+
**Note**: Specifying this value as 'false' has no impact on the default behaviour.
|
|
1139
|
+
|
|
1140
|
+
*/
|
|
1141
|
+
|
|
194
1142
|
force_term_reset?:boolean;
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* @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.
|
|
1146
|
+
|
|
1147
|
+
*/
|
|
1148
|
+
|
|
195
1149
|
reactivate?:boolean;
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* @description Parameters for subscription
|
|
1153
|
+
|
|
1154
|
+
*/
|
|
1155
|
+
|
|
196
1156
|
subscription?:{auto_collection?:AutoCollection,contract_term_billing_cycle_on_renewal?:number,offline_payment_method?:OfflinePaymentMethod,start_date?:number,trial_end?:number};
|
|
1157
|
+
|
|
1158
|
+
/**
|
|
1159
|
+
* @description Parameters for billing_address
|
|
1160
|
+
|
|
1161
|
+
*/
|
|
1162
|
+
|
|
197
1163
|
billing_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};
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* @description Parameters for shipping_address
|
|
1167
|
+
|
|
1168
|
+
*/
|
|
1169
|
+
|
|
198
1170
|
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};
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* @description Parameters for customer
|
|
1174
|
+
|
|
1175
|
+
*/
|
|
1176
|
+
|
|
199
1177
|
customer?:{registered_for_gst?:boolean,vat_number?:string,vat_number_prefix?:string};
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* @description Parameters for contract_term
|
|
1181
|
+
|
|
1182
|
+
*/
|
|
1183
|
+
|
|
200
1184
|
contract_term?:{action_at_term_end?:'cancel' | 'renew_once' | 'renew' | 'evergreen',cancellation_cutoff_period?:number};
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* @description Parameters for subscription_items
|
|
1188
|
+
|
|
1189
|
+
*/
|
|
1190
|
+
|
|
201
1191
|
subscription_items?:{billing_cycles?:number,charge_on_event?:ChargeOnEvent,charge_on_option?:ChargeOnOption,charge_once?:boolean,item_price_id:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,trial_end?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
1192
|
+
|
|
1193
|
+
/**
|
|
1194
|
+
* @description Parameters for discounts
|
|
1195
|
+
|
|
1196
|
+
*/
|
|
1197
|
+
|
|
202
1198
|
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}[];
|
|
1199
|
+
|
|
1200
|
+
/**
|
|
1201
|
+
* @description Parameters for item_tiers
|
|
1202
|
+
|
|
1203
|
+
*/
|
|
1204
|
+
|
|
203
1205
|
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}[];
|
|
204
1206
|
}
|
|
205
|
-
export interface ListResponse {
|
|
206
|
-
|
|
207
|
-
|
|
1207
|
+
export interface ListResponse {
|
|
1208
|
+
/**
|
|
1209
|
+
* @description List all quotes.
|
|
1210
|
+
|
|
1211
|
+
*/
|
|
1212
|
+
|
|
1213
|
+
list:{quote:Quote,quoted_subscription?:QuotedSubscription}[];
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* @description List all quotes.
|
|
1217
|
+
|
|
1218
|
+
*/
|
|
1219
|
+
|
|
1220
|
+
next_offset?:string;
|
|
208
1221
|
}
|
|
209
1222
|
export interface ListInputParam {
|
|
210
|
-
[key : string]: any;
|
|
1223
|
+
[key : string]: any;
|
|
1224
|
+
/**
|
|
1225
|
+
* @description The number of resources to be returned.
|
|
1226
|
+
|
|
1227
|
+
*/
|
|
1228
|
+
|
|
211
1229
|
limit?:number;
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* @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.
|
|
1233
|
+
|
|
1234
|
+
*/
|
|
1235
|
+
|
|
212
1236
|
offset?:string;
|
|
1237
|
+
|
|
1238
|
+
/**
|
|
1239
|
+
* @description Indicates whether to include deleted objects in the list. The deleted objects have the attribute \`deleted\` as \`true\`.
|
|
1240
|
+
|
|
1241
|
+
*/
|
|
1242
|
+
|
|
213
1243
|
include_deleted?:boolean;
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* @description The quote number. Acts as a identifier for quote and typically generated sequentially.
|
|
1247
|
+
|
|
1248
|
+
*/
|
|
1249
|
+
|
|
214
1250
|
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* @description The identifier of the customer this quote belongs to.
|
|
1254
|
+
|
|
1255
|
+
*/
|
|
1256
|
+
|
|
215
1257
|
customer_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
* @description To filter based on subscription_id.
|
|
1261
|
+
NOTE: Not to be used if *consolidated invoicing* feature is enabled.
|
|
1262
|
+
|
|
1263
|
+
*/
|
|
1264
|
+
|
|
216
1265
|
subscription_id?:{in?:string,is?:string,is_not?:string,is_present?:'true' | 'false',not_in?:string,starts_with?:string};
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* @description Current status of this quote.
|
|
1269
|
+
|
|
1270
|
+
*/
|
|
1271
|
+
|
|
217
1272
|
status?:{in?:string,is?:'declined' | 'invoiced' | 'accepted' | 'closed' | 'open',is_not?:'declined' | 'invoiced' | 'accepted' | 'closed' | 'open',not_in?:string};
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* @description Creation date of the quote. Typically this is the date on which quote is generated.
|
|
1276
|
+
|
|
1277
|
+
*/
|
|
1278
|
+
|
|
218
1279
|
date?:{after?:string,before?:string,between?:string,on?:string};
|
|
1280
|
+
|
|
1281
|
+
/**
|
|
1282
|
+
* @description To filter based on updated at. This attribute will be present only if the resource has been updated after 2016-09-28.
|
|
1283
|
+
|
|
1284
|
+
*/
|
|
1285
|
+
|
|
219
1286
|
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
* @description List all quotes.
|
|
1290
|
+
|
|
1291
|
+
*/
|
|
1292
|
+
|
|
220
1293
|
sort_by?:{asc?:'date',desc?:'date'};
|
|
221
1294
|
}
|
|
222
|
-
export interface PdfResponse {
|
|
223
|
-
|
|
1295
|
+
export interface PdfResponse {
|
|
1296
|
+
/**
|
|
1297
|
+
* @description Retrieves the quote as a PDF. The returned URL is secure, allows download and expires in 60 minutes.
|
|
1298
|
+
|
|
1299
|
+
*/
|
|
1300
|
+
|
|
1301
|
+
download:Download;
|
|
224
1302
|
}
|
|
225
1303
|
export interface PdfInputParam {
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* @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.
|
|
1307
|
+
|
|
1308
|
+
*/
|
|
1309
|
+
|
|
226
1310
|
consolidated_view?:boolean;
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* @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
|
|
1314
|
+
|
|
1315
|
+
*/
|
|
1316
|
+
|
|
227
1317
|
disposition_type?:DispositionType;
|
|
228
1318
|
}
|
|
229
|
-
export interface ConvertResponse {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
1319
|
+
export interface ConvertResponse {
|
|
1320
|
+
/**
|
|
1321
|
+
* @description This API is to convert a quote to an invoice.
|
|
1322
|
+
|
|
1323
|
+
*/
|
|
1324
|
+
|
|
1325
|
+
quote:Quote;
|
|
1326
|
+
|
|
1327
|
+
/**
|
|
1328
|
+
* @description This API is to convert a quote to an invoice.
|
|
1329
|
+
|
|
1330
|
+
*/
|
|
1331
|
+
|
|
1332
|
+
quoted_subscription?:QuotedSubscription;
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* @description This API is to convert a quote to an invoice.
|
|
1336
|
+
|
|
1337
|
+
*/
|
|
1338
|
+
|
|
1339
|
+
quoted_charge?:QuotedCharge;
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* @description This API is to convert a quote to an invoice.
|
|
1343
|
+
|
|
1344
|
+
*/
|
|
1345
|
+
|
|
1346
|
+
customer:Customer;
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* @description This API is to convert a quote to an invoice.
|
|
1350
|
+
|
|
1351
|
+
*/
|
|
1352
|
+
|
|
1353
|
+
subscription?:Subscription;
|
|
1354
|
+
|
|
1355
|
+
/**
|
|
1356
|
+
* @description This API is to convert a quote to an invoice.
|
|
1357
|
+
|
|
1358
|
+
*/
|
|
1359
|
+
|
|
1360
|
+
invoice?:Invoice;
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* @description This API is to convert a quote to an invoice.
|
|
1364
|
+
|
|
1365
|
+
*/
|
|
1366
|
+
|
|
1367
|
+
credit_note?:CreditNote;
|
|
1368
|
+
|
|
1369
|
+
/**
|
|
1370
|
+
* @description This API is to convert a quote to an invoice.
|
|
1371
|
+
|
|
1372
|
+
*/
|
|
1373
|
+
|
|
1374
|
+
unbilled_charges?:UnbilledCharge[];
|
|
238
1375
|
}
|
|
239
1376
|
export interface ConvertInputParam {
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* @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:
|
|
1380
|
+
|
|
1381
|
+
* `invoice_date` must be in the past.
|
|
1382
|
+
* `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.
|
|
1383
|
+
* The date is not earlier than `quoted_subscription.start_date` or `quoted_subscription.changes_scheduled_at` (whichever is applicable).
|
|
1384
|
+
* `invoice_immediately` must be `true`.
|
|
1385
|
+
.
|
|
1386
|
+
|
|
1387
|
+
*/
|
|
1388
|
+
|
|
240
1389
|
invoice_date?:number;
|
|
1390
|
+
|
|
1391
|
+
/**
|
|
1392
|
+
* @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:
|
|
1393
|
+
|
|
1394
|
+
* 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).
|
|
1395
|
+
* When your workflow involves inspecting all charges before you close invoices.
|
|
1396
|
+
|
|
1397
|
+
**Note:**
|
|
1398
|
+
|
|
1399
|
+
* You must enable [Metered Billing](https://www.chargebee.com/docs/2.0/metered_billing.html) for this parameter to be acceptable.
|
|
1400
|
+
* To create the first invoice also as `pending`, pass `first_invoice_pending` as `true`.
|
|
1401
|
+
.
|
|
1402
|
+
|
|
1403
|
+
*/
|
|
1404
|
+
|
|
241
1405
|
create_pending_invoices?:boolean;
|
|
1406
|
+
|
|
1407
|
+
/**
|
|
1408
|
+
* @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.
|
|
1409
|
+
|
|
1410
|
+
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).
|
|
1411
|
+
**Note:**
|
|
1412
|
+
|
|
1413
|
+
This parameter is passed only when there are metered items in the subscription or when `create_pending_invoices` is `true`.
|
|
1414
|
+
.
|
|
1415
|
+
|
|
1416
|
+
*/
|
|
1417
|
+
|
|
242
1418
|
first_invoice_pending?:boolean;
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
* @description Parameters for subscription
|
|
1422
|
+
|
|
1423
|
+
*/
|
|
1424
|
+
|
|
243
1425
|
subscription?:{auto_close_invoices?:boolean,auto_collection?:AutoCollection,id?:string,po_number?:string};
|
|
244
1426
|
}
|
|
245
|
-
export interface CreateForChargeItemsAndChargesResponse {
|
|
246
|
-
|
|
247
|
-
|
|
1427
|
+
export interface CreateForChargeItemsAndChargesResponse {
|
|
1428
|
+
/**
|
|
1429
|
+
* @description Creates a quote using charge-items and one-time charges.
|
|
1430
|
+
|
|
1431
|
+
*/
|
|
1432
|
+
|
|
1433
|
+
quote:Quote;
|
|
1434
|
+
|
|
1435
|
+
/**
|
|
1436
|
+
* @description Creates a quote using charge-items and one-time charges.
|
|
1437
|
+
|
|
1438
|
+
*/
|
|
1439
|
+
|
|
1440
|
+
quoted_charge?:QuotedCharge;
|
|
248
1441
|
}
|
|
249
1442
|
export interface CreateForChargeItemsAndChargesInputParam {
|
|
1443
|
+
|
|
1444
|
+
/**
|
|
1445
|
+
* @description The quote name will be used as the pdf name of the quote.
|
|
1446
|
+
|
|
1447
|
+
*/
|
|
1448
|
+
|
|
250
1449
|
name?:string;
|
|
1450
|
+
|
|
1451
|
+
/**
|
|
1452
|
+
* @description Identifier of the customer for which the quote needs to be created.
|
|
1453
|
+
|
|
1454
|
+
*/
|
|
1455
|
+
|
|
251
1456
|
customer_id:string;
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* @description Purchase Order Number for this quote.
|
|
1460
|
+
|
|
1461
|
+
*/
|
|
1462
|
+
|
|
252
1463
|
po_number?:string;
|
|
1464
|
+
|
|
1465
|
+
/**
|
|
1466
|
+
* @description Notes specific to this quote that you want customers to see on the quote PDF.
|
|
1467
|
+
|
|
1468
|
+
*/
|
|
1469
|
+
|
|
253
1470
|
notes?:string;
|
|
1471
|
+
|
|
1472
|
+
/**
|
|
1473
|
+
* @description Quotes will be vaild till this date. After this quote will be marked as closed.
|
|
1474
|
+
|
|
1475
|
+
*/
|
|
1476
|
+
|
|
254
1477
|
expires_at?:number;
|
|
1478
|
+
|
|
1479
|
+
/**
|
|
1480
|
+
* @description The currency code (ISO 4217 format) of the quote.
|
|
1481
|
+
|
|
1482
|
+
*/
|
|
1483
|
+
|
|
255
1484
|
currency_code?:string;
|
|
1485
|
+
|
|
1486
|
+
/**
|
|
1487
|
+
* @description The 'One Time' coupon to be applied.
|
|
1488
|
+
|
|
1489
|
+
*/
|
|
1490
|
+
|
|
256
1491
|
coupon?:string;
|
|
1492
|
+
|
|
1493
|
+
/**
|
|
1494
|
+
* @description List of Coupons to be added.
|
|
1495
|
+
|
|
1496
|
+
*/
|
|
1497
|
+
|
|
257
1498
|
coupon_ids?:string[];
|
|
1499
|
+
|
|
1500
|
+
/**
|
|
1501
|
+
* @description Parameters for shipping_address
|
|
1502
|
+
|
|
1503
|
+
*/
|
|
1504
|
+
|
|
258
1505
|
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};
|
|
1506
|
+
|
|
1507
|
+
/**
|
|
1508
|
+
* @description Parameters for item_prices
|
|
1509
|
+
|
|
1510
|
+
*/
|
|
1511
|
+
|
|
259
1512
|
item_prices?:{item_price_id?:string,quantity?:number,quantity_in_decimal?:string,service_period_days?:number,unit_price?:number,unit_price_in_decimal?:string}[];
|
|
1513
|
+
|
|
1514
|
+
/**
|
|
1515
|
+
* @description Parameters for item_tiers
|
|
1516
|
+
|
|
1517
|
+
*/
|
|
1518
|
+
|
|
260
1519
|
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}[];
|
|
1520
|
+
|
|
1521
|
+
/**
|
|
1522
|
+
* @description Parameters for charges
|
|
1523
|
+
|
|
1524
|
+
*/
|
|
1525
|
+
|
|
261
1526
|
charges?:{amount?:number,amount_in_decimal?:string,avalara_sale_type?:AvalaraSaleType,avalara_service_type?:number,avalara_transaction_type?:number,description?:string,service_period?:number}[];
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
* @description Parameters for discounts
|
|
1530
|
+
|
|
1531
|
+
*/
|
|
1532
|
+
|
|
262
1533
|
discounts?:{amount?:number,apply_on:ApplyOn,item_price_id?:string,percentage?:number}[];
|
|
263
1534
|
}
|
|
264
|
-
export interface DeleteResponse {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
1535
|
+
export interface DeleteResponse {
|
|
1536
|
+
/**
|
|
1537
|
+
* @description Delete a quote using this API.
|
|
1538
|
+
|
|
1539
|
+
*/
|
|
1540
|
+
|
|
1541
|
+
quote:Quote;
|
|
1542
|
+
|
|
1543
|
+
/**
|
|
1544
|
+
* @description Delete a quote using this API.
|
|
1545
|
+
|
|
1546
|
+
*/
|
|
1547
|
+
|
|
1548
|
+
quoted_subscription?:QuotedSubscription;
|
|
1549
|
+
|
|
1550
|
+
/**
|
|
1551
|
+
* @description Delete a quote using this API.
|
|
1552
|
+
|
|
1553
|
+
*/
|
|
1554
|
+
|
|
1555
|
+
quoted_charge?:QuotedCharge;
|
|
268
1556
|
}
|
|
269
1557
|
export interface DeleteInputParam {
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* @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.
|
|
1561
|
+
|
|
1562
|
+
*/
|
|
1563
|
+
|
|
270
1564
|
comment?:string;
|
|
271
1565
|
}
|
|
272
|
-
export interface LineItem {
|
|
1566
|
+
export interface LineItem {
|
|
273
1567
|
id?:string;
|
|
1568
|
+
|
|
274
1569
|
subscription_id?:string;
|
|
1570
|
+
|
|
275
1571
|
date_from?:number;
|
|
1572
|
+
|
|
276
1573
|
date_to?:number;
|
|
1574
|
+
|
|
277
1575
|
unit_amount?:number;
|
|
1576
|
+
|
|
278
1577
|
quantity?:number;
|
|
1578
|
+
|
|
279
1579
|
amount?:number;
|
|
1580
|
+
|
|
280
1581
|
pricing_model?:'volume' | 'per_unit' | 'tiered' | 'flat_fee' | 'stairstep';
|
|
1582
|
+
|
|
281
1583
|
is_taxed?:boolean;
|
|
1584
|
+
|
|
282
1585
|
tax_amount?:number;
|
|
1586
|
+
|
|
283
1587
|
tax_rate?:number;
|
|
1588
|
+
|
|
284
1589
|
unit_amount_in_decimal?:string;
|
|
1590
|
+
|
|
285
1591
|
quantity_in_decimal?:string;
|
|
1592
|
+
|
|
286
1593
|
amount_in_decimal?:string;
|
|
1594
|
+
|
|
287
1595
|
discount_amount?:number;
|
|
1596
|
+
|
|
288
1597
|
item_level_discount_amount?:number;
|
|
1598
|
+
|
|
289
1599
|
reference_line_item_id?:string;
|
|
1600
|
+
|
|
290
1601
|
description?:string;
|
|
1602
|
+
|
|
291
1603
|
entity_description?:string;
|
|
1604
|
+
|
|
292
1605
|
entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
|
|
1606
|
+
|
|
293
1607
|
tax_exempt_reason?:'high_value_physical_goods' | 'tax_not_configured' | 'reverse_charge' | 'zero_rated' | 'customer_exempt' | 'region_non_taxable' | 'zero_value_item' | 'export' | 'product_exempt';
|
|
1608
|
+
|
|
294
1609
|
entity_id?:string;
|
|
1610
|
+
|
|
295
1611
|
customer_id?:string;
|
|
296
1612
|
}
|
|
297
|
-
export interface Discount {
|
|
1613
|
+
export interface Discount {
|
|
298
1614
|
amount?:number;
|
|
1615
|
+
|
|
299
1616
|
description?:string;
|
|
1617
|
+
|
|
300
1618
|
line_item_id?:string;
|
|
1619
|
+
|
|
301
1620
|
entity_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
1621
|
+
|
|
302
1622
|
discount_type?:'fixed_amount' | 'percentage';
|
|
1623
|
+
|
|
303
1624
|
entity_id?:string;
|
|
1625
|
+
|
|
304
1626
|
coupon_set_code?:string;
|
|
305
1627
|
}
|
|
306
|
-
export interface LineItemDiscount {
|
|
1628
|
+
export interface LineItemDiscount {
|
|
307
1629
|
line_item_id?:string;
|
|
1630
|
+
|
|
308
1631
|
discount_type?:'item_level_coupon' | 'promotional_credits' | 'item_level_discount' | 'prorated_credits' | 'document_level_discount' | 'document_level_coupon';
|
|
1632
|
+
|
|
309
1633
|
coupon_id?:string;
|
|
1634
|
+
|
|
310
1635
|
entity_id?:string;
|
|
1636
|
+
|
|
311
1637
|
discount_amount?:number;
|
|
312
1638
|
}
|
|
313
|
-
export interface Tax {
|
|
1639
|
+
export interface Tax {
|
|
314
1640
|
name?:string;
|
|
1641
|
+
|
|
315
1642
|
amount?:number;
|
|
1643
|
+
|
|
316
1644
|
description?:string;
|
|
317
1645
|
}
|
|
318
|
-
export interface LineItemTax {
|
|
1646
|
+
export interface LineItemTax {
|
|
319
1647
|
line_item_id?:string;
|
|
1648
|
+
|
|
320
1649
|
tax_name?:string;
|
|
1650
|
+
|
|
321
1651
|
tax_rate?:number;
|
|
1652
|
+
|
|
322
1653
|
is_partial_tax_applied?:boolean;
|
|
1654
|
+
|
|
323
1655
|
is_non_compliance_tax?:boolean;
|
|
1656
|
+
|
|
324
1657
|
taxable_amount?:number;
|
|
1658
|
+
|
|
325
1659
|
tax_amount?:number;
|
|
1660
|
+
|
|
326
1661
|
tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
|
|
1662
|
+
|
|
327
1663
|
tax_juris_name?:string;
|
|
1664
|
+
|
|
328
1665
|
tax_juris_code?:string;
|
|
1666
|
+
|
|
329
1667
|
tax_amount_in_local_currency?:number;
|
|
1668
|
+
|
|
330
1669
|
local_currency_code?:string;
|
|
331
1670
|
}
|
|
332
|
-
export interface LineItemTier {
|
|
1671
|
+
export interface LineItemTier {
|
|
333
1672
|
line_item_id?:string;
|
|
1673
|
+
|
|
334
1674
|
starting_unit?:number;
|
|
1675
|
+
|
|
335
1676
|
ending_unit?:number;
|
|
1677
|
+
|
|
336
1678
|
quantity_used?:number;
|
|
1679
|
+
|
|
337
1680
|
unit_amount?:number;
|
|
1681
|
+
|
|
338
1682
|
starting_unit_in_decimal?:string;
|
|
1683
|
+
|
|
339
1684
|
ending_unit_in_decimal?:string;
|
|
1685
|
+
|
|
340
1686
|
quantity_used_in_decimal?:string;
|
|
1687
|
+
|
|
341
1688
|
unit_amount_in_decimal?:string;
|
|
342
1689
|
}
|
|
343
|
-
export interface ShippingAddress {
|
|
1690
|
+
export interface ShippingAddress {
|
|
1691
|
+
/**
|
|
1692
|
+
* @description The first name of the contact.
|
|
1693
|
+
|
|
1694
|
+
*/
|
|
1695
|
+
|
|
344
1696
|
first_name?:string;
|
|
1697
|
+
|
|
1698
|
+
/**
|
|
1699
|
+
* @description The last name of the contact.
|
|
1700
|
+
|
|
1701
|
+
*/
|
|
1702
|
+
|
|
345
1703
|
last_name?:string;
|
|
1704
|
+
|
|
1705
|
+
/**
|
|
1706
|
+
* @description The email address.
|
|
1707
|
+
|
|
1708
|
+
*/
|
|
1709
|
+
|
|
346
1710
|
email?:string;
|
|
1711
|
+
|
|
1712
|
+
/**
|
|
1713
|
+
* @description The company name.
|
|
1714
|
+
|
|
1715
|
+
*/
|
|
1716
|
+
|
|
347
1717
|
company?:string;
|
|
1718
|
+
|
|
1719
|
+
/**
|
|
1720
|
+
* @description The phone number.
|
|
1721
|
+
|
|
1722
|
+
*/
|
|
1723
|
+
|
|
348
1724
|
phone?:string;
|
|
1725
|
+
|
|
1726
|
+
/**
|
|
1727
|
+
* @description Address line 1
|
|
1728
|
+
|
|
1729
|
+
*/
|
|
1730
|
+
|
|
349
1731
|
line1?:string;
|
|
1732
|
+
|
|
1733
|
+
/**
|
|
1734
|
+
* @description Address line 2
|
|
1735
|
+
|
|
1736
|
+
*/
|
|
1737
|
+
|
|
350
1738
|
line2?:string;
|
|
1739
|
+
|
|
1740
|
+
/**
|
|
1741
|
+
* @description Address line 3
|
|
1742
|
+
|
|
1743
|
+
*/
|
|
1744
|
+
|
|
351
1745
|
line3?:string;
|
|
1746
|
+
|
|
1747
|
+
/**
|
|
1748
|
+
* @description The name of the city.
|
|
1749
|
+
|
|
1750
|
+
*/
|
|
1751
|
+
|
|
352
1752
|
city?:string;
|
|
1753
|
+
|
|
1754
|
+
/**
|
|
1755
|
+
* @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`).
|
|
1756
|
+
|
|
1757
|
+
*/
|
|
1758
|
+
|
|
353
1759
|
state_code?:string;
|
|
1760
|
+
|
|
1761
|
+
/**
|
|
1762
|
+
* @description The state/province name.
|
|
1763
|
+
|
|
1764
|
+
*/
|
|
1765
|
+
|
|
354
1766
|
state?:string;
|
|
1767
|
+
|
|
1768
|
+
/**
|
|
1769
|
+
* @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).
|
|
1770
|
+
|
|
1771
|
+
**Note** : If you enter an invalid country code, the system will return an error.
|
|
1772
|
+
|
|
1773
|
+
**Brexit**
|
|
1774
|
+
|
|
1775
|
+
|
|
1776
|
+
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.
|
|
1777
|
+
|
|
1778
|
+
*/
|
|
1779
|
+
|
|
355
1780
|
country?:string;
|
|
1781
|
+
|
|
1782
|
+
/**
|
|
1783
|
+
* @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
|
|
1784
|
+
|
|
1785
|
+
*/
|
|
1786
|
+
|
|
356
1787
|
zip?:string;
|
|
1788
|
+
|
|
1789
|
+
/**
|
|
1790
|
+
* @description The address verification status. \* 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. \* valid - Address was validated successfully.
|
|
1791
|
+
|
|
1792
|
+
*/
|
|
1793
|
+
|
|
357
1794
|
validation_status?:ValidationStatus;
|
|
1795
|
+
|
|
1796
|
+
/**
|
|
1797
|
+
* @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.
|
|
1798
|
+
|
|
1799
|
+
*/
|
|
1800
|
+
|
|
358
1801
|
index?:number;
|
|
359
1802
|
}
|
|
360
|
-
export interface BillingAddress {
|
|
1803
|
+
export interface BillingAddress {
|
|
1804
|
+
/**
|
|
1805
|
+
* @description The first name of the billing contact.
|
|
1806
|
+
|
|
1807
|
+
*/
|
|
1808
|
+
|
|
361
1809
|
first_name?:string;
|
|
1810
|
+
|
|
1811
|
+
/**
|
|
1812
|
+
* @description The last name of the billing contact.
|
|
1813
|
+
|
|
1814
|
+
*/
|
|
1815
|
+
|
|
362
1816
|
last_name?:string;
|
|
1817
|
+
|
|
1818
|
+
/**
|
|
1819
|
+
* @description The email address.
|
|
1820
|
+
|
|
1821
|
+
*/
|
|
1822
|
+
|
|
363
1823
|
email?:string;
|
|
1824
|
+
|
|
1825
|
+
/**
|
|
1826
|
+
* @description The company name.
|
|
1827
|
+
|
|
1828
|
+
*/
|
|
1829
|
+
|
|
364
1830
|
company?:string;
|
|
1831
|
+
|
|
1832
|
+
/**
|
|
1833
|
+
* @description The phone number.
|
|
1834
|
+
|
|
1835
|
+
*/
|
|
1836
|
+
|
|
365
1837
|
phone?:string;
|
|
1838
|
+
|
|
1839
|
+
/**
|
|
1840
|
+
* @description Address line 1
|
|
1841
|
+
|
|
1842
|
+
*/
|
|
1843
|
+
|
|
366
1844
|
line1?:string;
|
|
1845
|
+
|
|
1846
|
+
/**
|
|
1847
|
+
* @description Address line 2
|
|
1848
|
+
|
|
1849
|
+
*/
|
|
1850
|
+
|
|
367
1851
|
line2?:string;
|
|
1852
|
+
|
|
1853
|
+
/**
|
|
1854
|
+
* @description Address line 3
|
|
1855
|
+
|
|
1856
|
+
*/
|
|
1857
|
+
|
|
368
1858
|
line3?:string;
|
|
1859
|
+
|
|
1860
|
+
/**
|
|
1861
|
+
* @description The name of the city.
|
|
1862
|
+
|
|
1863
|
+
*/
|
|
1864
|
+
|
|
369
1865
|
city?:string;
|
|
1866
|
+
|
|
1867
|
+
/**
|
|
1868
|
+
* @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`).
|
|
1869
|
+
|
|
1870
|
+
*/
|
|
1871
|
+
|
|
370
1872
|
state_code?:string;
|
|
1873
|
+
|
|
1874
|
+
/**
|
|
1875
|
+
* @description State or Province
|
|
1876
|
+
|
|
1877
|
+
*/
|
|
1878
|
+
|
|
371
1879
|
state?:string;
|
|
1880
|
+
|
|
1881
|
+
/**
|
|
1882
|
+
* @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).
|
|
1883
|
+
|
|
1884
|
+
**Note** : If you enter an invalid country code, the system will return an error.
|
|
1885
|
+
|
|
1886
|
+
**Brexit**
|
|
1887
|
+
|
|
1888
|
+
|
|
1889
|
+
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.
|
|
1890
|
+
|
|
1891
|
+
*/
|
|
1892
|
+
|
|
372
1893
|
country?:string;
|
|
1894
|
+
|
|
1895
|
+
/**
|
|
1896
|
+
* @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
|
|
1897
|
+
|
|
1898
|
+
*/
|
|
1899
|
+
|
|
373
1900
|
zip?:string;
|
|
1901
|
+
|
|
1902
|
+
/**
|
|
1903
|
+
* @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.
|
|
1904
|
+
|
|
1905
|
+
*/
|
|
1906
|
+
|
|
374
1907
|
validation_status?:ValidationStatus;
|
|
375
1908
|
}
|
|
376
1909
|
}
|