chargebee 2.46.0 → 2.47.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 +41 -0
- package/lib/chargebee.js +48 -25
- package/lib/resources/api_endpoints.js +2146 -407
- package/package.json +1 -1
- package/types/core.d.ts +2 -2
- package/types/index.d.ts +4 -0
- package/types/resources/AttachedItem.d.ts +20 -205
- package/types/resources/Coupon.d.ts +2 -0
- package/types/resources/CreditNote.d.ts +119 -1216
- package/types/resources/DifferentialPrice.d.ts +20 -200
- package/types/resources/Invoice.d.ts +344 -2219
- package/types/resources/InvoiceEstimate.d.ts +9 -0
- package/types/resources/Item.d.ts +2 -0
- package/types/resources/ItemFamily.d.ts +2 -0
- package/types/resources/ItemPrice.d.ts +2 -0
- package/types/resources/Order.d.ts +184 -1073
- package/types/resources/PriceVariant.d.ts +24 -163
- package/types/resources/Rule.d.ts +38 -0
- package/types/resources/Subscription.d.ts +2 -0
- package/types/resources/UsageEvent.d.ts +46 -0
|
@@ -1,1131 +1,474 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface Order {
|
|
4
5
|
|
|
5
|
-
/**
|
|
6
|
-
* @description Uniquely identifies the order. It is the api identifier for the order
|
|
7
6
|
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
7
|
id:string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description The order's serial number
|
|
14
8
|
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
9
|
document_number?:string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description The invoice number which acts as an identifier for invoice and is generated sequentially.
|
|
21
10
|
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
11
|
invoice_id?:string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description The subscription for which the order is created
|
|
28
12
|
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
13
|
subscription_id?:string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description The customer for which the order is created
|
|
35
14
|
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
15
|
customer_id?:string;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description The status of this order. \* complete - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system \* partially_delivered - The order has been partially delivered to the customer. \* voided - Order has been voided. Applicable only if you are using Chargebee's legacy order management system \* on_hold - The order is paused from being processed. \* awaiting_shipment - The order has been picked up by an integration system, and synced to a shipping management platform \* shipped - The order has moved from order management system to a shipping system. \* queued - Order is yet to be processed by any system, these are scheduled orders created by Chargebee \* new - Order has been created. Applicable only if you are using Chargebee's legacy order management system. \* returned - The order has been returned after delivery. \* delivered - The order has been delivered to the customer. \* cancelled - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system \* processing - Order is being processed. Applicable only if you are using Chargebee's legacy order management system
|
|
42
16
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
status?:'new' | 'partially_delivered' | 'queued' | 'delivered' | 'on_hold' | 'shipped' | 'processing' | 'cancelled' | 'voided' | 'complete' | 'awaiting_shipment' | 'returned';
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description Cancellation reason \* payment_declined - Payment declined. \* shipping_cut_off_passed - The invoice has been paid late and Chargebee cancel's the first order for the invoice. \* product_not_available - Product not available. \* alternative_found - Alternative found. \* others - Other reason \* order_resent - Order resent \* product_unsatisfactory - Product unsatisfactory. \* delivery_date_missed - Delivery date missed. \* fraudulent_transaction - Fraudulent transaction. \* invoice_voided - The invoice for which the order was createed has been voided. \* subscription_cancelled - The subsctiption for which the order was created has been cancelled. \* invoice_written_off - The invoice has been completely written off. Orders are generated by Chargebee in cancelled state. \* product_not_required - Product not required. \* third_party_cancellation - Third party cancellation.
|
|
17
|
+
status?:'new' | 'processing' | 'complete' | 'cancelled' | 'voided' | 'queued' | 'awaiting_shipment' | 'on_hold' | 'delivered' | 'shipped' | 'partially_delivered' | 'returned';
|
|
49
18
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
cancellation_reason?:'delivery_date_missed' | 'subscription_cancelled' | 'product_unsatisfactory' | 'fraudulent_transaction' | 'third_party_cancellation' | 'order_resent' | 'payment_declined' | 'product_not_required' | 'invoice_voided' | 'invoice_written_off' | 'product_not_available' | 'shipping_cut_off_passed' | 'others' | 'alternative_found';
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @description The payment status of the order \* paid - PAID \* not_paid - NOT_PAID
|
|
19
|
+
cancellation_reason?:'shipping_cut_off_passed' | 'product_unsatisfactory' | 'third_party_cancellation' | 'product_not_required' | 'delivery_date_missed' | 'alternative_found' | 'invoice_written_off' | 'invoice_voided' | 'fraudulent_transaction' | 'payment_declined' | 'subscription_cancelled' | 'product_not_available' | 'others' | 'order_resent';
|
|
56
20
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
payment_status?:'paid' | 'not_paid';
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @description Order type \* manual - The order has been created by the the user using Chargebee's legacy order management system. \* system_generated - The order has been created by Chargebee automatically based on the preferences set by the user.
|
|
21
|
+
payment_status?:'not_paid' | 'paid';
|
|
63
22
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
order_type?:'system_generated' | 'manual';
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @description The price type of the order \* tax_inclusive - All amounts in the document are inclusive of tax. \* tax_exclusive - All amounts in the document are exclusive of tax.
|
|
23
|
+
order_type?:'manual' | 'system_generated';
|
|
70
24
|
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
25
|
price_type:PriceType;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @description Reference id can be used to map the orders in the shipping/order management application to the orders in ChargeBee. The reference_id generally is same as the order id in the third party application.
|
|
77
26
|
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
27
|
reference_id?:string;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @description The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;
|
|
84
28
|
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
29
|
fulfillment_status?:string;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* @description The date on which the order will start getting processed.
|
|
91
30
|
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
31
|
order_date?:number;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @description This is the date on which the order will be delivered to the customer.
|
|
98
32
|
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
33
|
shipping_date?:number;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @description The custom note for the order.
|
|
105
34
|
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
35
|
note?:string;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @description The tracking id of the order.
|
|
112
36
|
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
37
|
tracking_id?:string;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* @description The tracking url of the order.
|
|
119
38
|
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
39
|
tracking_url?:string;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* @description Unique id to identify a group of orders.
|
|
126
40
|
|
|
127
|
-
*/
|
|
128
|
-
|
|
129
41
|
batch_id?:string;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* @description The source (or the user) from where the order has been created.
|
|
133
42
|
|
|
134
|
-
*/
|
|
135
|
-
|
|
136
43
|
created_by?:string;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* @description Shipment carrier
|
|
140
44
|
|
|
141
|
-
*/
|
|
142
|
-
|
|
143
45
|
shipment_carrier?:string;
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* @description The total round off taken from the invoice level
|
|
147
46
|
|
|
148
|
-
*/
|
|
149
|
-
|
|
150
47
|
invoice_round_off_amount?:number;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* @description The total tax for the order.
|
|
154
48
|
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
49
|
tax?:number;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* @description Total amount paid for the order.
|
|
161
50
|
|
|
162
|
-
*/
|
|
163
|
-
|
|
164
51
|
amount_paid?:number;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* @description Total amount adjusted for the order.
|
|
168
52
|
|
|
169
|
-
*/
|
|
170
|
-
|
|
171
53
|
amount_adjusted?:number;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* @description The total amount issued as credits on behalf of this order.
|
|
175
54
|
|
|
176
|
-
*/
|
|
177
|
-
|
|
178
55
|
refundable_credits_issued?:number;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* @description The total amount that can be issued as credits for this order.
|
|
182
56
|
|
|
183
|
-
*/
|
|
184
|
-
|
|
185
57
|
refundable_credits?:number;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* @description Rounding adjustment
|
|
189
58
|
|
|
190
|
-
*/
|
|
191
|
-
|
|
192
59
|
rounding_adjustement?:number;
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* @description The timestamp indicating the date \& time the order's invoice got paid.
|
|
196
60
|
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
61
|
paid_on?:number;
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* @description The time after which an order becomes unservicable
|
|
203
62
|
|
|
204
|
-
*/
|
|
205
|
-
|
|
206
63
|
shipping_cut_off_date?:number;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* @description The time at which the order was created
|
|
210
64
|
|
|
211
|
-
*/
|
|
212
|
-
|
|
213
65
|
created_at:number;
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* @description The time at which the order status was last updated.
|
|
217
66
|
|
|
218
|
-
*/
|
|
219
|
-
|
|
220
67
|
status_update_at?:number;
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* @description The time at which the order was delivered
|
|
224
68
|
|
|
225
|
-
*/
|
|
226
|
-
|
|
227
69
|
delivered_at?:number;
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* @description The time at which the order was shipped.
|
|
231
70
|
|
|
232
|
-
*/
|
|
233
|
-
|
|
234
71
|
shipped_at?:number;
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* @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.
|
|
238
72
|
|
|
239
|
-
*/
|
|
240
|
-
|
|
241
73
|
resource_version?:number;
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* @description The order's last modified time.
|
|
245
74
|
|
|
246
|
-
*/
|
|
247
|
-
|
|
248
75
|
updated_at?:number;
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* @description The time at which the order was cancelled.
|
|
252
76
|
|
|
253
|
-
*/
|
|
254
|
-
|
|
255
77
|
cancelled_at?:number;
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* @description Resent status of the order. \* fully_resent - Order is Fully resent \* partially_resent - Order is Partially resent
|
|
259
78
|
|
|
260
|
-
*/
|
|
261
|
-
|
|
262
79
|
resent_status?:'fully_resent' | 'partially_resent';
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* @description Show if the order is resent order or not.
|
|
266
80
|
|
|
267
|
-
*/
|
|
268
|
-
|
|
269
81
|
is_resent:boolean;
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* @description Refers to the original order id of the resent order.
|
|
273
82
|
|
|
274
|
-
*/
|
|
275
|
-
|
|
276
83
|
original_order_id?:string;
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* @description Total discount given for the order.
|
|
280
84
|
|
|
281
|
-
|
|
282
|
-
|
|
85
|
+
order_line_items?:Order.OrderLineItem[];
|
|
86
|
+
|
|
87
|
+
shipping_address?:Order.ShippingAddress;
|
|
88
|
+
|
|
89
|
+
billing_address?:Order.BillingAddress;
|
|
90
|
+
|
|
283
91
|
discount?:number;
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* @description The order's sub-total
|
|
287
92
|
|
|
288
|
-
*/
|
|
289
|
-
|
|
290
93
|
sub_total?:number;
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* @description Total amount charged for the order.
|
|
294
94
|
|
|
295
|
-
*/
|
|
296
|
-
|
|
297
95
|
total?:number;
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* @description Indicates that this resource has been deleted.
|
|
301
96
|
|
|
302
|
-
|
|
303
|
-
|
|
97
|
+
line_item_taxes?:Order.LineItemTax[];
|
|
98
|
+
|
|
99
|
+
line_item_discounts?:Order.LineItemDiscount[];
|
|
100
|
+
|
|
101
|
+
linked_credit_notes?:Order.LinkedCreditNote[];
|
|
102
|
+
|
|
304
103
|
deleted:boolean;
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* @description The currency code (ISO 4217 format) for the invoice
|
|
308
104
|
|
|
309
|
-
*/
|
|
310
|
-
|
|
311
105
|
currency_code?:string;
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* @description Boolean indicating whether this order is gifted or not.
|
|
315
106
|
|
|
316
|
-
*/
|
|
317
|
-
|
|
318
107
|
is_gifted?:boolean;
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* @description The gift message added by the gifter during purchase
|
|
322
108
|
|
|
323
|
-
*/
|
|
324
|
-
|
|
325
109
|
gift_note?:string;
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* @description The gift_id if the order is a gift order
|
|
329
110
|
|
|
330
|
-
*/
|
|
331
|
-
|
|
332
111
|
gift_id?:string;
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* @description Reason code for resending the order. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Orders \> Order Resend**. Must be passed if set as mandatory in the app. The codes are case-sensitive
|
|
336
112
|
|
|
337
|
-
*/
|
|
338
|
-
|
|
339
113
|
resend_reason?:string;
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* @description The unique ID of the [business entity](/docs/api/advanced-features?prod_cat_ver=2#mbe) of this subscription. This is always the same as the [business entity](/docs/api/subscriptions?prod_cat_ver=2#subscription_customer_id) of the customer.
|
|
343
|
-
|
|
344
|
-
*/
|
|
345
|
-
|
|
346
|
-
business_entity_id?:string;
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* @description The list of line items for this order.
|
|
350
|
-
|
|
351
|
-
*/
|
|
352
|
-
|
|
353
|
-
order_line_items?:Order.OrderLineItem[];
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* @description Shipping address for the order.
|
|
357
|
-
|
|
358
|
-
*/
|
|
359
|
-
|
|
360
|
-
shipping_address?:Order.ShippingAddress;
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* @description Billing address for the order.
|
|
364
|
-
|
|
365
|
-
*/
|
|
366
|
-
|
|
367
|
-
billing_address?:Order.BillingAddress;
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* @description The list of taxes applied on the order line items.
|
|
371
|
-
|
|
372
|
-
*/
|
|
373
|
-
|
|
374
|
-
line_item_taxes?:Order.LineItemTax[];
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* @description The list of discounts applied for the order
|
|
378
114
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
line_item_discounts?:Order.LineItemDiscount[];
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* @description The credit notes linked to the order
|
|
115
|
+
resent_orders?:Order.ResentOrder[];
|
|
385
116
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
linked_credit_notes?:Order.OrderLineItemLinkedCredit[];
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* @description The list of resent orders applied on the order.
|
|
117
|
+
business_entity_id?:string;
|
|
392
118
|
|
|
393
|
-
*/
|
|
394
|
-
|
|
395
|
-
resent_orders?:Order.ResentOrder[];
|
|
396
119
|
}
|
|
397
120
|
export namespace Order {
|
|
398
121
|
export class OrderResource {
|
|
399
|
-
/**
|
|
400
|
-
* @description This API is used to retrieve a list of all the available orders.
|
|
401
|
-
|
|
402
|
-
*/
|
|
403
|
-
|
|
404
|
-
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* @description #### Deprecated
|
|
408
|
-
|
|
409
|
-
Chargebee no longer supports this endpoint, see [here](https://www.chargebee.com/docs/1.0/manual_orders_deprecate.html) for more information. Contact [Support](https://chargebee.freshdesk.com/support/home/) for additional assistance or if you have concerns about this update.
|
|
410
|
-
|
|
411
|
-
*/
|
|
412
|
-
|
|
413
122
|
create(input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
414
123
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
*/
|
|
419
|
-
|
|
124
|
+
update(order_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
125
|
+
|
|
420
126
|
import_order(input:ImportOrderInputParam):ChargebeeRequest<ImportOrderResponse>;
|
|
421
127
|
|
|
422
|
-
/**
|
|
423
|
-
* @description Assigns order number to the order based on the settings, if not already assigned
|
|
424
|
-
|
|
425
|
-
*/
|
|
426
|
-
|
|
427
128
|
assign_order_number(order_id:string):ChargebeeRequest<AssignOrderNumberResponse>;
|
|
428
129
|
|
|
429
|
-
|
|
430
|
-
* @description Resend an existing order. This will help in resending an existing order in full or partial. Upto 5 resend operations are allowed per . When resent fully, the original order is canceled.
|
|
431
|
-
|
|
432
|
-
*/
|
|
433
|
-
|
|
434
|
-
resend(order_id:string, input?:ResendInputParam):ChargebeeRequest<ResendResponse>;
|
|
130
|
+
cancel(order_id:string, input:CancelInputParam):ChargebeeRequest<CancelResponse>;
|
|
435
131
|
|
|
436
|
-
|
|
437
|
-
* @description This API is used to re-open a cancelled order
|
|
438
|
-
|
|
439
|
-
*/
|
|
440
|
-
|
|
441
|
-
reopen(order_id:string, input?:ReopenInputParam):ChargebeeRequest<ReopenResponse>;
|
|
132
|
+
create_refundable_credit_note(order_id:string, input:CreateRefundableCreditNoteInputParam):ChargebeeRequest<CreateRefundableCreditNoteResponse>;
|
|
442
133
|
|
|
443
|
-
|
|
444
|
-
* @description Cancel order and create a refundable credit note for the order
|
|
445
|
-
|
|
446
|
-
*/
|
|
447
|
-
|
|
448
|
-
cancel(order_id:string, input:CancelInputParam):ChargebeeRequest<CancelResponse>;
|
|
134
|
+
reopen(order_id:string, input?:ReopenInputParam):ChargebeeRequest<ReopenResponse>;
|
|
449
135
|
|
|
450
|
-
/**
|
|
451
|
-
* @description Retrieves an order corresponding to the order id passed.
|
|
452
|
-
|
|
453
|
-
*/
|
|
454
|
-
|
|
455
136
|
retrieve(order_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
456
137
|
|
|
457
|
-
/**
|
|
458
|
-
* @description Updates an order. If the status of an order is changed while updating the order, the status_update_at attribute is set with the current time.
|
|
459
|
-
|
|
460
|
-
*/
|
|
461
|
-
|
|
462
|
-
update(order_id:string, input?:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
463
|
-
|
|
464
|
-
/**
|
|
465
|
-
* @description Deletes only [Imported Order](#import_an_order) .Delete does not happen if the order was refunded. It goes through if order refund was initiated and is in "refund_due" state.
|
|
466
|
-
|
|
467
|
-
*/
|
|
468
|
-
|
|
469
138
|
delete(order_id:string):ChargebeeRequest<DeleteResponse>;
|
|
470
139
|
|
|
471
|
-
|
|
472
|
-
* @description This API is used to create a refundable credit note for the order
|
|
473
|
-
|
|
474
|
-
*/
|
|
475
|
-
|
|
476
|
-
create_refundable_credit_note(order_id:string, input?:CreateRefundableCreditNoteInputParam):ChargebeeRequest<CreateRefundableCreditNoteResponse>;
|
|
477
|
-
}
|
|
478
|
-
export interface ListResponse {
|
|
479
|
-
/**
|
|
480
|
-
* @description This API is used to retrieve a list of all the available orders.
|
|
481
|
-
|
|
482
|
-
*/
|
|
483
|
-
|
|
484
|
-
list:{order:Order}[];
|
|
140
|
+
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
485
141
|
|
|
486
|
-
|
|
487
|
-
* @description This API is used to retrieve a list of all the available orders.
|
|
488
|
-
|
|
489
|
-
*/
|
|
142
|
+
orders_for_invoice(invoice_id:string, input?:OrdersForInvoiceInputParam):ChargebeeRequest<OrdersForInvoiceResponse>;
|
|
490
143
|
|
|
491
|
-
|
|
144
|
+
resend(order_id:string, input?:ResendInputParam):ChargebeeRequest<ResendResponse>;
|
|
492
145
|
}
|
|
493
|
-
export interface
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
*/
|
|
499
|
-
|
|
500
|
-
limit?:number;
|
|
146
|
+
export interface CreateResponse {
|
|
147
|
+
order:Order;
|
|
148
|
+
}
|
|
149
|
+
export interface CreateInputParam {
|
|
501
150
|
|
|
502
|
-
|
|
503
|
-
* @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.
|
|
504
|
-
|
|
505
|
-
*/
|
|
506
|
-
|
|
507
|
-
offset?:string;
|
|
151
|
+
id?:string;
|
|
508
152
|
|
|
509
|
-
|
|
510
|
-
* @description Indicates whether to include deleted objects in the list. The deleted objects have the attribute \`deleted\` as \`true\`.
|
|
511
|
-
|
|
512
|
-
*/
|
|
513
|
-
|
|
514
|
-
include_deleted?:boolean;
|
|
153
|
+
invoice_id:string;
|
|
515
154
|
|
|
516
|
-
|
|
517
|
-
* @description This API is used to retrieve a list of all the available orders.
|
|
518
|
-
|
|
519
|
-
*/
|
|
520
|
-
|
|
521
|
-
exclude_deleted_credit_notes?:boolean;
|
|
155
|
+
status?:'new' | 'processing' | 'complete' | 'cancelled' | 'voided';
|
|
522
156
|
|
|
523
|
-
|
|
524
|
-
* @description Uniquely identifies the order. It is the api identifier for the order
|
|
525
|
-
|
|
526
|
-
*/
|
|
527
|
-
|
|
528
|
-
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
157
|
+
reference_id?:string;
|
|
529
158
|
|
|
530
|
-
|
|
531
|
-
* @description The invoice number which acts as an identifier for invoice and is generated sequentially.
|
|
532
|
-
|
|
533
|
-
*/
|
|
534
|
-
|
|
535
|
-
invoice_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
159
|
+
fulfillment_status?:string;
|
|
536
160
|
|
|
537
|
-
|
|
538
|
-
* @description The subscription for which the order is created
|
|
539
|
-
|
|
540
|
-
*/
|
|
541
|
-
|
|
542
|
-
subscription_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
161
|
+
note?:string;
|
|
543
162
|
|
|
544
|
-
|
|
545
|
-
* @description The status of this order.
|
|
546
|
-
|
|
547
|
-
*/
|
|
548
|
-
|
|
549
|
-
status?:{in?:string,is?:'new' | 'partially_delivered' | 'queued' | 'delivered' | 'on_hold' | 'shipped' | 'processing' | 'cancelled' | 'voided' | 'complete' | 'awaiting_shipment' | 'returned',is_not?:'new' | 'partially_delivered' | 'queued' | 'delivered' | 'on_hold' | 'shipped' | 'processing' | 'cancelled' | 'voided' | 'complete' | 'awaiting_shipment' | 'returned',not_in?:string};
|
|
163
|
+
tracking_id?:string;
|
|
550
164
|
|
|
551
|
-
|
|
552
|
-
* @description This is the date on which the order will be delivered to the customer.
|
|
553
|
-
|
|
554
|
-
*/
|
|
555
|
-
|
|
556
|
-
shipping_date?:{after?:string,before?:string,between?:string,on?:string};
|
|
557
|
-
|
|
558
|
-
/**
|
|
559
|
-
* @description The time at which the order was shipped.
|
|
560
|
-
|
|
561
|
-
*/
|
|
562
|
-
|
|
563
|
-
shipped_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
564
|
-
|
|
565
|
-
/**
|
|
566
|
-
* @description Order type
|
|
567
|
-
|
|
568
|
-
*/
|
|
569
|
-
|
|
570
|
-
order_type?:{in?:string,is?:'system_generated' | 'manual',is_not?:'system_generated' | 'manual',not_in?:string};
|
|
571
|
-
|
|
572
|
-
/**
|
|
573
|
-
* @description The date on which the order will start getting processed.
|
|
574
|
-
|
|
575
|
-
*/
|
|
576
|
-
|
|
577
|
-
order_date?:{after?:string,before?:string,between?:string,on?:string};
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* @description The timestamp indicating the date \& time the order's invoice got paid.
|
|
581
|
-
|
|
582
|
-
*/
|
|
583
|
-
|
|
584
|
-
paid_on?:{after?:string,before?:string,between?:string,on?:string};
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* @description To filter based on updated at .
|
|
588
|
-
|
|
589
|
-
*/
|
|
590
|
-
|
|
591
|
-
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* @description The time at which the order was created
|
|
595
|
-
|
|
596
|
-
*/
|
|
597
|
-
|
|
598
|
-
created_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
599
|
-
|
|
600
|
-
/**
|
|
601
|
-
* @description Resent order status.
|
|
602
|
-
|
|
603
|
-
*/
|
|
604
|
-
|
|
605
|
-
resent_status?:{in?:string,is?:'fully_resent' | 'partially_resent',is_not?:'fully_resent' | 'partially_resent',not_in?:string};
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* @description Order is resent order or not.
|
|
609
|
-
|
|
610
|
-
*/
|
|
611
|
-
|
|
612
|
-
is_resent?:{is?:'true' | 'false'};
|
|
613
|
-
|
|
614
|
-
/**
|
|
615
|
-
* @description If resent order what is the parent order id.
|
|
616
|
-
|
|
617
|
-
*/
|
|
618
|
-
|
|
619
|
-
original_order_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
165
|
+
tracking_url?:string;
|
|
620
166
|
|
|
621
|
-
|
|
622
|
-
* @description This API is used to retrieve a list of all the available orders.
|
|
623
|
-
|
|
624
|
-
*/
|
|
625
|
-
|
|
626
|
-
sort_by?:{asc?:'updated_at' | 'created_at',desc?:'updated_at' | 'created_at'};
|
|
167
|
+
batch_id?:string;
|
|
627
168
|
}
|
|
628
|
-
export interface
|
|
169
|
+
export interface UpdateResponse {
|
|
629
170
|
order:Order;
|
|
630
171
|
}
|
|
631
|
-
export interface
|
|
632
|
-
|
|
633
|
-
/**
|
|
634
|
-
* @description Uniquely identifies the order. If not given, this will be auto-generated.
|
|
635
|
-
|
|
636
|
-
*/
|
|
172
|
+
export interface UpdateInputParam {
|
|
637
173
|
|
|
638
|
-
|
|
174
|
+
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};
|
|
639
175
|
|
|
640
|
-
|
|
641
|
-
* @description The invoice number which acts as an identifier for invoice and is generated sequentially.
|
|
642
|
-
|
|
643
|
-
*/
|
|
176
|
+
order_line_items?:{id?:string,sku?:string,status?:'queued' | 'awaiting_shipment' | 'on_hold' | 'delivered' | 'shipped' | 'partially_delivered' | 'returned' | 'cancelled'}[];
|
|
644
177
|
|
|
645
|
-
|
|
178
|
+
reference_id?:string;
|
|
646
179
|
|
|
647
|
-
|
|
648
|
-
* @description The order status. \* cancelled - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system \* new - Order has been created. Applicable only if you are using Chargebee's legacy order management system. \* voided - Order has been voided. Applicable only if you are using Chargebee's legacy order management system \* complete - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system \* processing - Order is being processed. Applicable only if you are using Chargebee's legacy order management system
|
|
649
|
-
|
|
650
|
-
*/
|
|
180
|
+
batch_id?:string;
|
|
651
181
|
|
|
652
|
-
|
|
182
|
+
note?:string;
|
|
653
183
|
|
|
654
|
-
|
|
655
|
-
* @description Reference id can be used to map the orders in the shipping/order management application to the orders in ChargeBee. The reference_id generally is same as the order id in the third party application.
|
|
656
|
-
|
|
657
|
-
*/
|
|
184
|
+
shipping_date?:number;
|
|
658
185
|
|
|
659
|
-
|
|
186
|
+
order_date?:number;
|
|
660
187
|
|
|
661
|
-
|
|
662
|
-
* @description The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;.
|
|
663
|
-
|
|
664
|
-
*/
|
|
188
|
+
cancelled_at?:number;
|
|
665
189
|
|
|
666
|
-
|
|
190
|
+
cancellation_reason?:'shipping_cut_off_passed' | 'product_unsatisfactory' | 'third_party_cancellation' | 'product_not_required' | 'delivery_date_missed' | 'alternative_found' | 'invoice_written_off' | 'invoice_voided' | 'fraudulent_transaction' | 'payment_declined' | 'subscription_cancelled' | 'product_not_available' | 'others' | 'order_resent';
|
|
667
191
|
|
|
668
|
-
|
|
669
|
-
* @description The custom note for the order.
|
|
670
|
-
|
|
671
|
-
*/
|
|
192
|
+
shipped_at?:number;
|
|
672
193
|
|
|
673
|
-
|
|
194
|
+
delivered_at?:number;
|
|
674
195
|
|
|
675
|
-
|
|
676
|
-
* @description The tracking id of the order.
|
|
677
|
-
|
|
678
|
-
*/
|
|
196
|
+
tracking_url?:string;
|
|
679
197
|
|
|
680
198
|
tracking_id?:string;
|
|
681
199
|
|
|
682
|
-
|
|
683
|
-
* @description The tracking url of the order.
|
|
684
|
-
|
|
685
|
-
*/
|
|
686
|
-
|
|
687
|
-
tracking_url?:string;
|
|
200
|
+
shipment_carrier?:string;
|
|
688
201
|
|
|
689
|
-
|
|
690
|
-
* @description Unique id to identify a group of orders.
|
|
691
|
-
|
|
692
|
-
*/
|
|
202
|
+
fulfillment_status?:string;
|
|
693
203
|
|
|
694
|
-
|
|
204
|
+
status?:'new' | 'processing' | 'complete' | 'cancelled' | 'voided' | 'queued' | 'awaiting_shipment' | 'on_hold' | 'delivered' | 'shipped' | 'partially_delivered' | 'returned';
|
|
695
205
|
}
|
|
696
206
|
export interface ImportOrderResponse {
|
|
697
207
|
order:Order;
|
|
698
208
|
}
|
|
699
209
|
export interface ImportOrderInputParam {
|
|
700
210
|
|
|
701
|
-
|
|
702
|
-
* @description Uniquely identifies the order. It is the api identifier for the order.
|
|
703
|
-
|
|
704
|
-
*Order id will always be assigned incrementally from the last generated Order ID.
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
If Orders imported has an Order ID which is a string, Chargebee will just validate if the Order ID is unique
|
|
708
|
-
|
|
709
|
-
Recommendation: For orders being imported, set the same prefix and the serial number that is used for the Document number, which will make this into a string. This will ensure that imported orders don't conflict with orders created by Chargebee. Chargebee will ensure there aren't orders with duplicate Order IDs.*.
|
|
710
|
-
|
|
711
|
-
*/
|
|
211
|
+
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};
|
|
712
212
|
|
|
713
|
-
|
|
213
|
+
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};
|
|
714
214
|
|
|
715
|
-
|
|
716
|
-
* @description The order's serial number.
|
|
717
|
-
|
|
718
|
-
*Document number passed cannot be greater than the series mentioned in the configuration. For instance, if you have set Document number series in Order Configurations with a Prefix as 'ORDER' and Starting number as '1000', orders up to the sequence number 'ORDER999' can be imported into Chargebee*
|
|
719
|
-
|
|
720
|
-
*Recommendation: Set a different prefix at the Order Configuration, than the ones that are imported. If your Order Configuration has a Prefix of 'NEW', with Starting number as '1', i.e. 'NEW1', then, set Prefix for imported orders to be as 'OLD', with Starting number as '1', i.e, 'OLD1'*.
|
|
721
|
-
|
|
722
|
-
*/
|
|
215
|
+
id?:string;
|
|
723
216
|
|
|
724
217
|
document_number?:string;
|
|
725
218
|
|
|
726
|
-
/**
|
|
727
|
-
* @description The invoice number which acts as an identifier for invoice and is generated sequentially.
|
|
728
|
-
|
|
729
|
-
*/
|
|
730
|
-
|
|
731
219
|
invoice_id:string;
|
|
732
220
|
|
|
733
|
-
|
|
734
|
-
* @description The status of this order. \* voided - Order has been voided. Applicable only if you are using Chargebee's legacy order management system \* complete - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system \* shipped - The order has moved from order management system to a shipping system. \* processing - Order is being processed. Applicable only if you are using Chargebee's legacy order management system \* queued - Order is yet to be processed by any system, these are scheduled orders created by Chargebee \* on_hold - The order is paused from being processed. \* new - Order has been created. Applicable only if you are using Chargebee's legacy order management system. \* returned - The order has been returned after delivery. \* delivered - The order has been delivered to the customer. \* awaiting_shipment - The order has been picked up by an integration system, and synced to a shipping management platform \* cancelled - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system \* partially_delivered - The order has been partially delivered to the customer.
|
|
735
|
-
|
|
736
|
-
*/
|
|
737
|
-
|
|
738
|
-
status:'shipped' | 'partially_delivered' | 'queued' | 'cancelled' | 'delivered' | 'on_hold' | 'awaiting_shipment' | 'returned';
|
|
739
|
-
|
|
740
|
-
/**
|
|
741
|
-
* @description The subscription for which the order is created.
|
|
742
|
-
|
|
743
|
-
*/
|
|
221
|
+
status:'cancelled' | 'queued' | 'awaiting_shipment' | 'on_hold' | 'delivered' | 'shipped' | 'partially_delivered' | 'returned';
|
|
744
222
|
|
|
745
223
|
subscription_id?:string;
|
|
746
224
|
|
|
747
|
-
/**
|
|
748
|
-
* @description The customer for which the order is created.
|
|
749
|
-
|
|
750
|
-
*/
|
|
751
|
-
|
|
752
225
|
customer_id?:string;
|
|
753
226
|
|
|
754
|
-
/**
|
|
755
|
-
* @description The time at which the order was created.
|
|
756
|
-
|
|
757
|
-
*/
|
|
758
|
-
|
|
759
227
|
created_at:number;
|
|
760
228
|
|
|
761
|
-
/**
|
|
762
|
-
* @description The date on which the order will start getting processed.
|
|
763
|
-
|
|
764
|
-
*/
|
|
765
|
-
|
|
766
229
|
order_date:number;
|
|
767
230
|
|
|
768
|
-
/**
|
|
769
|
-
* @description This is the date on which the order has to be shipped to the customer.
|
|
770
|
-
|
|
771
|
-
*/
|
|
772
|
-
|
|
773
231
|
shipping_date:number;
|
|
774
232
|
|
|
775
|
-
/**
|
|
776
|
-
* @description Reference id can be used to map the orders in the shipping/order management application to the orders in ChargeBee. The reference_id generally is the same as the order id in the third party application.
|
|
777
|
-
|
|
778
|
-
*Recommendation:
|
|
779
|
-
|
|
780
|
-
If this order is in any of these statuses, awaiting_shipment, on_hold, delivered, shipped, partially_delivered, returned, and has already been processed, through a 3rd party system, and you have a reference id of the entity in the 3rd party tool, pass in the entity id to this field. If not, set the same prefix and the serial number that is used for the Document number, which will make this into a string.*
|
|
781
|
-
|
|
782
|
-
*If this order hasn't been processed and is in 'queued' status, do not pass any value to this field. Chargebee, when it syncs your Orders through the fulfilment integrations such as Shipstation or Shopify, would auto assign the reference id from the connected system.*.
|
|
783
|
-
|
|
784
|
-
*/
|
|
785
|
-
|
|
786
233
|
reference_id?:string;
|
|
787
234
|
|
|
788
|
-
/**
|
|
789
|
-
* @description The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;.
|
|
790
|
-
|
|
791
|
-
*If this order is in any of these statuses, awaiting_shipment, on_hold, delivered, shipped, partially_delivered, returned, and has already been processed, through a 3rd party system, and you have a corresponding status from the 3rd party tool, pass in the status to this field.
|
|
792
|
-
|
|
793
|
-
If this order hasn't been processed and is in 'queued' status, do not pass any value to this field. Chargebee, when it syncs your Orders through the fulfilment integrations such as Shipstation or Shopify, would auto assign the fulfilment status from the connected system.*.
|
|
794
|
-
|
|
795
|
-
*/
|
|
796
|
-
|
|
797
235
|
fulfillment_status?:string;
|
|
798
236
|
|
|
799
|
-
/**
|
|
800
|
-
* @description The custom note for the order.
|
|
801
|
-
|
|
802
|
-
*/
|
|
803
|
-
|
|
804
237
|
note?:string;
|
|
805
238
|
|
|
806
|
-
/**
|
|
807
|
-
* @description The tracking id of the order.
|
|
808
|
-
|
|
809
|
-
*/
|
|
810
|
-
|
|
811
239
|
tracking_id?:string;
|
|
812
240
|
|
|
813
|
-
/**
|
|
814
|
-
* @description The tracking url of the order.
|
|
815
|
-
|
|
816
|
-
*/
|
|
817
|
-
|
|
818
241
|
tracking_url?:string;
|
|
819
242
|
|
|
820
|
-
/**
|
|
821
|
-
* @description Unique id to identify a group of orders.
|
|
822
|
-
|
|
823
|
-
*/
|
|
824
|
-
|
|
825
243
|
batch_id?:string;
|
|
826
244
|
|
|
827
|
-
/**
|
|
828
|
-
* @description Shipment carrier.
|
|
829
|
-
|
|
830
|
-
*/
|
|
831
|
-
|
|
832
245
|
shipment_carrier?:string;
|
|
833
246
|
|
|
834
|
-
/**
|
|
835
|
-
* @description The time after which an order becomes unservicable.
|
|
836
|
-
|
|
837
|
-
*/
|
|
838
|
-
|
|
839
247
|
shipping_cut_off_date?:number;
|
|
840
248
|
|
|
841
|
-
/**
|
|
842
|
-
* @description The time at which the order was delivered.
|
|
843
|
-
|
|
844
|
-
*/
|
|
845
|
-
|
|
846
249
|
delivered_at?:number;
|
|
847
250
|
|
|
848
|
-
/**
|
|
849
|
-
* @description The time at which the order was shipped.
|
|
850
|
-
|
|
851
|
-
*/
|
|
852
|
-
|
|
853
251
|
shipped_at?:number;
|
|
854
252
|
|
|
855
|
-
/**
|
|
856
|
-
* @description The time at which the order was cancelled.
|
|
857
|
-
|
|
858
|
-
*/
|
|
859
|
-
|
|
860
253
|
cancelled_at?:number;
|
|
861
254
|
|
|
862
|
-
|
|
863
|
-
* @description Cancellation reason. \* shipping_cut_off_passed - The invoice has been paid late and Chargebee cancel's the first order for the invoice. \* invoice_voided - The invoice for which the order was createed has been voided. \* alternative_found - Alternative found. \* others - Other reason \* order_resent - Order resent \* product_unsatisfactory - Product unsatisfactory. \* delivery_date_missed - Delivery date missed. \* subscription_cancelled - The subsctiption for which the order was created has been cancelled. \* fraudulent_transaction - Fraudulent transaction. \* invoice_written_off - The invoice has been completely written off. Orders are generated by Chargebee in cancelled state. \* product_not_required - Product not required. \* payment_declined - Payment declined. \* product_not_available - Product not available. \* third_party_cancellation - Third party cancellation.
|
|
864
|
-
|
|
865
|
-
*/
|
|
866
|
-
|
|
867
|
-
cancellation_reason?:'delivery_date_missed' | 'subscription_cancelled' | 'product_unsatisfactory' | 'fraudulent_transaction' | 'third_party_cancellation' | 'order_resent' | 'payment_declined' | 'product_not_required' | 'invoice_voided' | 'invoice_written_off' | 'product_not_available' | 'shipping_cut_off_passed' | 'others' | 'alternative_found';
|
|
868
|
-
|
|
869
|
-
/**
|
|
870
|
-
* @description If there are any credits that were issued at the order level, you can make use of the field, refundable_credits_issued. This will lead to Chargebee creating a Refundable Credit note against the order. When the next invoice is raised against the customer, this credit note will be utilised.
|
|
871
|
-
|
|
872
|
-
*/
|
|
255
|
+
cancellation_reason?:'shipping_cut_off_passed' | 'product_unsatisfactory' | 'third_party_cancellation' | 'product_not_required' | 'delivery_date_missed' | 'alternative_found' | 'invoice_written_off' | 'invoice_voided' | 'fraudulent_transaction' | 'payment_declined' | 'subscription_cancelled' | 'product_not_available' | 'others' | 'order_resent';
|
|
873
256
|
|
|
874
257
|
refundable_credits_issued?:number;
|
|
875
|
-
|
|
876
|
-
/**
|
|
877
|
-
* @description Parameters for shipping_address
|
|
878
|
-
|
|
879
|
-
*/
|
|
880
|
-
|
|
881
|
-
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};
|
|
882
|
-
|
|
883
|
-
/**
|
|
884
|
-
* @description Parameters for billing_address
|
|
885
|
-
|
|
886
|
-
*/
|
|
887
|
-
|
|
888
|
-
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};
|
|
889
258
|
}
|
|
890
259
|
export interface AssignOrderNumberResponse {
|
|
891
260
|
order:Order;
|
|
892
261
|
}
|
|
893
262
|
|
|
894
|
-
export interface ResendResponse {
|
|
895
|
-
order:Order;
|
|
896
|
-
}
|
|
897
|
-
export interface ResendInputParam {
|
|
898
|
-
|
|
899
|
-
/**
|
|
900
|
-
* @description The date on which the order should be shipped to the customer.
|
|
901
|
-
|
|
902
|
-
*/
|
|
903
|
-
|
|
904
|
-
shipping_date?:number;
|
|
905
|
-
|
|
906
|
-
/**
|
|
907
|
-
* @description Reason code for resending the order. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Orders \> Order Resend**. Must be passed if set as mandatory in the app. The codes are case-sensitive.
|
|
908
|
-
|
|
909
|
-
*/
|
|
910
|
-
|
|
911
|
-
resend_reason?:string;
|
|
912
|
-
|
|
913
|
-
/**
|
|
914
|
-
* @description Parameters for order_line_items
|
|
915
|
-
|
|
916
|
-
*/
|
|
917
|
-
|
|
918
|
-
order_line_items?:{fulfillment_quantity?:number,id?:string}[];
|
|
919
|
-
}
|
|
920
|
-
export interface ReopenResponse {
|
|
921
|
-
order:Order;
|
|
922
|
-
}
|
|
923
|
-
export interface ReopenInputParam {
|
|
924
|
-
|
|
925
|
-
/**
|
|
926
|
-
* @description Flag to void credit notes created for cancellation if they are unused.
|
|
927
|
-
|
|
928
|
-
*/
|
|
929
|
-
|
|
930
|
-
void_cancellation_credit_notes?:boolean;
|
|
931
|
-
}
|
|
932
263
|
export interface CancelResponse {
|
|
933
|
-
order:Order;
|
|
934
|
-
}
|
|
935
|
-
export interface CancelInputParam {
|
|
936
|
-
|
|
937
|
-
/**
|
|
938
|
-
* @description Cancellation reason. \* shipping_cut_off_passed - The invoice has been paid late and Chargebee cancel's the first order for the invoice. \* alternative_found - Alternative found. \* others - Other reason \* product_unsatisfactory - Product unsatisfactory. \* product_not_required - Product not required. \* delivery_date_missed - Delivery date missed. \* invoice_voided - The invoice for which the order was createed has been voided. \* payment_declined - Payment declined. \* product_not_available - Product not available. \* subscription_cancelled - The subsctiption for which the order was created has been cancelled. \* third_party_cancellation - Third party cancellation. \* fraudulent_transaction - Fraudulent transaction. \* order_resent - Order resent \* invoice_written_off - The invoice has been completely written off. Orders are generated by Chargebee in cancelled state.
|
|
939
|
-
|
|
940
|
-
*/
|
|
264
|
+
order:Order;
|
|
265
|
+
}
|
|
266
|
+
export interface CancelInputParam {
|
|
941
267
|
|
|
942
|
-
|
|
268
|
+
credit_note?:{total?:number};
|
|
943
269
|
|
|
944
|
-
|
|
945
|
-
* @description The Customer Notes to be filled in the Credit Notes created to capture this refund detail.
|
|
946
|
-
|
|
947
|
-
*/
|
|
270
|
+
cancellation_reason:'shipping_cut_off_passed' | 'product_unsatisfactory' | 'third_party_cancellation' | 'product_not_required' | 'delivery_date_missed' | 'alternative_found' | 'invoice_written_off' | 'invoice_voided' | 'fraudulent_transaction' | 'payment_declined' | 'subscription_cancelled' | 'product_not_available' | 'others' | 'order_resent';
|
|
948
271
|
|
|
949
272
|
customer_notes?:string;
|
|
950
273
|
|
|
951
|
-
/**
|
|
952
|
-
* @description Comment, if any, on the refund.
|
|
953
|
-
|
|
954
|
-
*/
|
|
955
|
-
|
|
956
274
|
comment?:string;
|
|
957
275
|
|
|
958
|
-
/**
|
|
959
|
-
* @description The time at which the order was cancelled.
|
|
960
|
-
|
|
961
|
-
*/
|
|
962
|
-
|
|
963
276
|
cancelled_at?:number;
|
|
277
|
+
}
|
|
278
|
+
export interface CreateRefundableCreditNoteResponse {
|
|
279
|
+
order:Order;
|
|
280
|
+
}
|
|
281
|
+
export interface CreateRefundableCreditNoteInputParam {
|
|
964
282
|
|
|
965
|
-
|
|
966
|
-
* @description Parameters for credit_note
|
|
967
|
-
|
|
968
|
-
*/
|
|
283
|
+
credit_note:{reason_code:'write_off' | 'subscription_change' | 'subscription_cancellation' | 'subscription_pause' | 'chargeback' | 'product_unsatisfactory' | 'service_unsatisfactory' | 'order_change' | 'order_cancellation' | 'waiver' | 'other' | 'fraudulent',total:number};
|
|
969
284
|
|
|
970
|
-
|
|
285
|
+
customer_notes?:string;
|
|
286
|
+
|
|
287
|
+
comment?:string;
|
|
288
|
+
}
|
|
289
|
+
export interface ReopenResponse {
|
|
290
|
+
order:Order;
|
|
291
|
+
}
|
|
292
|
+
export interface ReopenInputParam {
|
|
293
|
+
|
|
294
|
+
void_cancellation_credit_notes?:boolean;
|
|
971
295
|
}
|
|
972
296
|
export interface RetrieveResponse {
|
|
973
297
|
order:Order;
|
|
974
298
|
}
|
|
975
299
|
|
|
976
|
-
export interface
|
|
300
|
+
export interface DeleteResponse {
|
|
977
301
|
order:Order;
|
|
978
302
|
}
|
|
979
|
-
|
|
303
|
+
|
|
304
|
+
export interface ListResponse {
|
|
305
|
+
list:{order:Order}[];
|
|
980
306
|
|
|
307
|
+
next_offset?:string;
|
|
308
|
+
}
|
|
309
|
+
export interface ListInputParam {
|
|
310
|
+
[key : string]: any;
|
|
981
311
|
/**
|
|
982
|
-
* @description
|
|
312
|
+
* @description The number of resources to be returned.
|
|
983
313
|
|
|
984
314
|
*/
|
|
985
|
-
|
|
986
|
-
|
|
315
|
+
|
|
316
|
+
limit?:number;
|
|
987
317
|
|
|
988
318
|
/**
|
|
989
|
-
* @description
|
|
319
|
+
* @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.
|
|
990
320
|
|
|
991
321
|
*/
|
|
992
|
-
|
|
993
|
-
|
|
322
|
+
|
|
323
|
+
offset?:string;
|
|
994
324
|
|
|
995
325
|
/**
|
|
996
|
-
* @description The
|
|
326
|
+
* @description Indicates whether to include deleted objects in the list. The deleted objects have the attribute \`deleted\` as \`true\`.
|
|
997
327
|
|
|
998
328
|
*/
|
|
329
|
+
|
|
330
|
+
include_deleted?:boolean;
|
|
999
331
|
|
|
1000
|
-
|
|
332
|
+
exclude_deleted_credit_notes?:boolean;
|
|
1001
333
|
|
|
1002
334
|
/**
|
|
1003
|
-
* @description
|
|
335
|
+
* @description Uniquely identifies the order. It is the api identifier for the order
|
|
1004
336
|
|
|
1005
337
|
*/
|
|
1006
|
-
|
|
1007
|
-
|
|
338
|
+
|
|
339
|
+
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
1008
340
|
|
|
1009
341
|
/**
|
|
1010
|
-
* @description The
|
|
342
|
+
* @description The invoice number which acts as an identifier for invoice and is generated sequentially.
|
|
1011
343
|
|
|
1012
344
|
*/
|
|
1013
|
-
|
|
1014
|
-
|
|
345
|
+
|
|
346
|
+
invoice_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
1015
347
|
|
|
1016
348
|
/**
|
|
1017
|
-
* @description The
|
|
349
|
+
* @description The subscription for which the order is created
|
|
1018
350
|
|
|
1019
351
|
*/
|
|
1020
|
-
|
|
1021
|
-
|
|
352
|
+
|
|
353
|
+
subscription_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
1022
354
|
|
|
1023
355
|
/**
|
|
1024
|
-
* @description
|
|
356
|
+
* @description The status of this order.
|
|
1025
357
|
|
|
1026
358
|
*/
|
|
359
|
+
|
|
360
|
+
status?:{in?:string,is?:'new' | 'processing' | 'complete' | 'cancelled' | 'voided' | 'queued' | 'awaiting_shipment' | 'on_hold' | 'delivered' | 'shipped' | 'partially_delivered' | 'returned',is_not?:'new' | 'processing' | 'complete' | 'cancelled' | 'voided' | 'queued' | 'awaiting_shipment' | 'on_hold' | 'delivered' | 'shipped' | 'partially_delivered' | 'returned',not_in?:string};
|
|
1027
361
|
|
|
1028
|
-
|
|
362
|
+
/**
|
|
363
|
+
* @description This is the date on which the order will be delivered to the customer.
|
|
364
|
+
|
|
365
|
+
*/
|
|
366
|
+
|
|
367
|
+
shipping_date?:{after?:string,before?:string,between?:string,on?:string};
|
|
1029
368
|
|
|
1030
369
|
/**
|
|
1031
370
|
* @description The time at which the order was shipped.
|
|
1032
371
|
|
|
1033
372
|
*/
|
|
1034
|
-
|
|
1035
|
-
shipped_at?:
|
|
373
|
+
|
|
374
|
+
shipped_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
1036
375
|
|
|
1037
376
|
/**
|
|
1038
|
-
* @description
|
|
377
|
+
* @description Order type
|
|
1039
378
|
|
|
1040
379
|
*/
|
|
1041
|
-
|
|
1042
|
-
|
|
380
|
+
|
|
381
|
+
order_type?:{in?:string,is?:'manual' | 'system_generated',is_not?:'manual' | 'system_generated',not_in?:string};
|
|
1043
382
|
|
|
1044
383
|
/**
|
|
1045
|
-
* @description The
|
|
384
|
+
* @description The date on which the order will start getting processed.
|
|
1046
385
|
|
|
1047
386
|
*/
|
|
1048
|
-
|
|
1049
|
-
|
|
387
|
+
|
|
388
|
+
order_date?:{after?:string,before?:string,between?:string,on?:string};
|
|
1050
389
|
|
|
1051
390
|
/**
|
|
1052
|
-
* @description The
|
|
391
|
+
* @description The timestamp indicating the date \& time the order's invoice got paid.
|
|
1053
392
|
|
|
1054
393
|
*/
|
|
1055
|
-
|
|
1056
|
-
|
|
394
|
+
|
|
395
|
+
paid_on?:{after?:string,before?:string,between?:string,on?:string};
|
|
1057
396
|
|
|
1058
397
|
/**
|
|
1059
|
-
* @description
|
|
398
|
+
* @description To filter based on updated at .
|
|
1060
399
|
|
|
1061
400
|
*/
|
|
1062
|
-
|
|
1063
|
-
|
|
401
|
+
|
|
402
|
+
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
1064
403
|
|
|
1065
404
|
/**
|
|
1066
|
-
* @description The
|
|
405
|
+
* @description The time at which the order was created
|
|
1067
406
|
|
|
1068
407
|
*/
|
|
1069
|
-
|
|
1070
|
-
|
|
408
|
+
|
|
409
|
+
created_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
1071
410
|
|
|
1072
411
|
/**
|
|
1073
|
-
* @description
|
|
412
|
+
* @description Resent order status.
|
|
1074
413
|
|
|
1075
414
|
*/
|
|
1076
|
-
|
|
1077
|
-
|
|
415
|
+
|
|
416
|
+
resent_status?:{in?:string,is?:'fully_resent' | 'partially_resent',is_not?:'fully_resent' | 'partially_resent',not_in?:string};
|
|
1078
417
|
|
|
1079
418
|
/**
|
|
1080
|
-
* @description
|
|
419
|
+
* @description Order is resent order or not.
|
|
1081
420
|
|
|
1082
421
|
*/
|
|
1083
|
-
|
|
1084
|
-
|
|
422
|
+
|
|
423
|
+
is_resent?:{is?:'true' | 'false'};
|
|
1085
424
|
|
|
1086
425
|
/**
|
|
1087
|
-
* @description
|
|
426
|
+
* @description If resent order what is the parent order id.
|
|
1088
427
|
|
|
1089
428
|
*/
|
|
429
|
+
|
|
430
|
+
original_order_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
1090
431
|
|
|
1091
|
-
|
|
1092
|
-
}
|
|
1093
|
-
export interface DeleteResponse {
|
|
1094
|
-
order:Order;
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
export interface CreateRefundableCreditNoteResponse {
|
|
1098
|
-
order:Order;
|
|
432
|
+
sort_by?:{asc?:'created_at' | 'updated_at',desc?:'created_at' | 'updated_at'};
|
|
1099
433
|
}
|
|
1100
|
-
export interface
|
|
434
|
+
export interface OrdersForInvoiceResponse {
|
|
435
|
+
list:{order:Order}[];
|
|
1101
436
|
|
|
437
|
+
next_offset?:string;
|
|
438
|
+
}
|
|
439
|
+
export interface OrdersForInvoiceInputParam {
|
|
440
|
+
[key : string]: any;
|
|
1102
441
|
/**
|
|
1103
|
-
* @description The
|
|
442
|
+
* @description The number of resources to be returned.
|
|
1104
443
|
|
|
1105
444
|
*/
|
|
1106
|
-
|
|
1107
|
-
|
|
445
|
+
|
|
446
|
+
limit?:number;
|
|
1108
447
|
|
|
1109
448
|
/**
|
|
1110
|
-
* @description
|
|
449
|
+
* @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.
|
|
1111
450
|
|
|
1112
451
|
*/
|
|
452
|
+
|
|
453
|
+
offset?:string;
|
|
454
|
+
}
|
|
455
|
+
export interface ResendResponse {
|
|
456
|
+
order:Order;
|
|
457
|
+
}
|
|
458
|
+
export interface ResendInputParam {
|
|
1113
459
|
|
|
1114
|
-
|
|
460
|
+
order_line_items?:{fulfillment_quantity?:number,id?:string}[];
|
|
1115
461
|
|
|
1116
|
-
|
|
1117
|
-
* @description Parameters for credit_note
|
|
1118
|
-
|
|
1119
|
-
*/
|
|
462
|
+
shipping_date?:number;
|
|
1120
463
|
|
|
1121
|
-
|
|
464
|
+
resend_reason?:string;
|
|
1122
465
|
}
|
|
1123
466
|
export interface OrderLineItem {
|
|
1124
|
-
id
|
|
467
|
+
id:string;
|
|
1125
468
|
|
|
1126
|
-
invoice_id
|
|
469
|
+
invoice_id:string;
|
|
1127
470
|
|
|
1128
|
-
invoice_line_item_id
|
|
471
|
+
invoice_line_item_id:string;
|
|
1129
472
|
|
|
1130
473
|
unit_price?:number;
|
|
1131
474
|
|
|
@@ -1147,13 +490,13 @@ If this order hasn't been processed and is in 'queued' status, do
|
|
|
1147
490
|
|
|
1148
491
|
refundable_credits?:number;
|
|
1149
492
|
|
|
1150
|
-
is_shippable
|
|
493
|
+
is_shippable:boolean;
|
|
1151
494
|
|
|
1152
495
|
sku?:string;
|
|
1153
496
|
|
|
1154
|
-
status?:'
|
|
497
|
+
status?:'queued' | 'awaiting_shipment' | 'on_hold' | 'delivered' | 'shipped' | 'partially_delivered' | 'returned' | 'cancelled';
|
|
1155
498
|
|
|
1156
|
-
entity_type
|
|
499
|
+
entity_type:'adhoc' | 'plan_item_price' | 'addon_item_price' | 'charge_item_price' | 'plan_setup' | 'plan' | 'addon';
|
|
1157
500
|
|
|
1158
501
|
item_level_discount_amount?:number;
|
|
1159
502
|
|
|
@@ -1162,354 +505,122 @@ If this order hasn't been processed and is in 'queued' status, do
|
|
|
1162
505
|
entity_id?:string;
|
|
1163
506
|
}
|
|
1164
507
|
export interface ShippingAddress {
|
|
1165
|
-
/**
|
|
1166
|
-
* @description The first name of the contact.
|
|
1167
|
-
|
|
1168
|
-
*/
|
|
1169
|
-
|
|
1170
508
|
first_name?:string;
|
|
1171
509
|
|
|
1172
|
-
/**
|
|
1173
|
-
* @description The last name of the contact.
|
|
1174
|
-
|
|
1175
|
-
*/
|
|
1176
|
-
|
|
1177
510
|
last_name?:string;
|
|
1178
511
|
|
|
1179
|
-
/**
|
|
1180
|
-
* @description The email address.
|
|
1181
|
-
|
|
1182
|
-
*/
|
|
1183
|
-
|
|
1184
512
|
email?:string;
|
|
1185
513
|
|
|
1186
|
-
/**
|
|
1187
|
-
* @description The company name.
|
|
1188
|
-
|
|
1189
|
-
*/
|
|
1190
|
-
|
|
1191
514
|
company?:string;
|
|
1192
515
|
|
|
1193
|
-
/**
|
|
1194
|
-
* @description The phone number.
|
|
1195
|
-
|
|
1196
|
-
*/
|
|
1197
|
-
|
|
1198
516
|
phone?:string;
|
|
1199
517
|
|
|
1200
|
-
/**
|
|
1201
|
-
* @description Address line 1
|
|
1202
|
-
|
|
1203
|
-
*/
|
|
1204
|
-
|
|
1205
518
|
line1?:string;
|
|
1206
519
|
|
|
1207
|
-
/**
|
|
1208
|
-
* @description Address line 2
|
|
1209
|
-
|
|
1210
|
-
*/
|
|
1211
|
-
|
|
1212
520
|
line2?:string;
|
|
1213
521
|
|
|
1214
|
-
/**
|
|
1215
|
-
* @description Address line 3
|
|
1216
|
-
|
|
1217
|
-
*/
|
|
1218
|
-
|
|
1219
522
|
line3?:string;
|
|
1220
523
|
|
|
1221
|
-
/**
|
|
1222
|
-
* @description The name of the city.
|
|
1223
|
-
|
|
1224
|
-
*/
|
|
1225
|
-
|
|
1226
524
|
city?:string;
|
|
1227
525
|
|
|
1228
|
-
/**
|
|
1229
|
-
* @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`).
|
|
1230
|
-
|
|
1231
|
-
*/
|
|
1232
|
-
|
|
1233
526
|
state_code?:string;
|
|
1234
527
|
|
|
1235
|
-
/**
|
|
1236
|
-
* @description The state/province name.
|
|
1237
|
-
|
|
1238
|
-
*/
|
|
1239
|
-
|
|
1240
528
|
state?:string;
|
|
1241
529
|
|
|
1242
|
-
/**
|
|
1243
|
-
* @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).
|
|
1244
|
-
|
|
1245
|
-
**Note** : If you enter an invalid country code, the system will return an error.
|
|
1246
|
-
|
|
1247
|
-
**Brexit**
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
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.
|
|
1251
|
-
|
|
1252
|
-
*/
|
|
1253
|
-
|
|
1254
530
|
country?:string;
|
|
1255
531
|
|
|
1256
|
-
/**
|
|
1257
|
-
* @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
|
|
1258
|
-
|
|
1259
|
-
*/
|
|
1260
|
-
|
|
1261
532
|
zip?:string;
|
|
1262
533
|
|
|
1263
|
-
/**
|
|
1264
|
-
* @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.
|
|
1265
|
-
|
|
1266
|
-
*/
|
|
1267
|
-
|
|
1268
534
|
validation_status?:ValidationStatus;
|
|
1269
535
|
|
|
1270
|
-
|
|
1271
|
-
* @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.
|
|
1272
|
-
|
|
1273
|
-
*/
|
|
1274
|
-
|
|
1275
|
-
index?:number;
|
|
536
|
+
index:number;
|
|
1276
537
|
}
|
|
1277
538
|
export interface BillingAddress {
|
|
1278
|
-
/**
|
|
1279
|
-
* @description The first name of the billing contact.
|
|
1280
|
-
|
|
1281
|
-
*/
|
|
1282
|
-
|
|
1283
539
|
first_name?:string;
|
|
1284
540
|
|
|
1285
|
-
/**
|
|
1286
|
-
* @description The last name of the billing contact.
|
|
1287
|
-
|
|
1288
|
-
*/
|
|
1289
|
-
|
|
1290
541
|
last_name?:string;
|
|
1291
542
|
|
|
1292
|
-
/**
|
|
1293
|
-
* @description The email address.
|
|
1294
|
-
|
|
1295
|
-
*/
|
|
1296
|
-
|
|
1297
543
|
email?:string;
|
|
1298
544
|
|
|
1299
|
-
/**
|
|
1300
|
-
* @description The company name.
|
|
1301
|
-
|
|
1302
|
-
*/
|
|
1303
|
-
|
|
1304
545
|
company?:string;
|
|
1305
546
|
|
|
1306
|
-
/**
|
|
1307
|
-
* @description The phone number.
|
|
1308
|
-
|
|
1309
|
-
*/
|
|
1310
|
-
|
|
1311
547
|
phone?:string;
|
|
1312
548
|
|
|
1313
|
-
/**
|
|
1314
|
-
* @description Address line 1
|
|
1315
|
-
|
|
1316
|
-
*/
|
|
1317
|
-
|
|
1318
549
|
line1?:string;
|
|
1319
550
|
|
|
1320
|
-
/**
|
|
1321
|
-
* @description Address line 2
|
|
1322
|
-
|
|
1323
|
-
*/
|
|
1324
|
-
|
|
1325
551
|
line2?:string;
|
|
1326
552
|
|
|
1327
|
-
/**
|
|
1328
|
-
* @description Address line 3
|
|
1329
|
-
|
|
1330
|
-
*/
|
|
1331
|
-
|
|
1332
553
|
line3?:string;
|
|
1333
554
|
|
|
1334
|
-
/**
|
|
1335
|
-
* @description The name of the city.
|
|
1336
|
-
|
|
1337
|
-
*/
|
|
1338
|
-
|
|
1339
555
|
city?:string;
|
|
1340
556
|
|
|
1341
|
-
/**
|
|
1342
|
-
* @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`).
|
|
1343
|
-
|
|
1344
|
-
*/
|
|
1345
|
-
|
|
1346
557
|
state_code?:string;
|
|
1347
558
|
|
|
1348
|
-
/**
|
|
1349
|
-
* @description State or Province
|
|
1350
|
-
|
|
1351
|
-
*/
|
|
1352
|
-
|
|
1353
559
|
state?:string;
|
|
1354
560
|
|
|
1355
|
-
/**
|
|
1356
|
-
* @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).
|
|
1357
|
-
|
|
1358
|
-
**Note** : If you enter an invalid country code, the system will return an error.
|
|
1359
|
-
|
|
1360
|
-
**Brexit**
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
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.
|
|
1364
|
-
|
|
1365
|
-
*/
|
|
1366
|
-
|
|
1367
561
|
country?:string;
|
|
1368
562
|
|
|
1369
|
-
/**
|
|
1370
|
-
* @description Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address).
|
|
1371
|
-
|
|
1372
|
-
*/
|
|
1373
|
-
|
|
1374
563
|
zip?:string;
|
|
1375
564
|
|
|
1376
|
-
/**
|
|
1377
|
-
* @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.
|
|
1378
|
-
|
|
1379
|
-
*/
|
|
1380
|
-
|
|
1381
565
|
validation_status?:ValidationStatus;
|
|
1382
566
|
}
|
|
1383
567
|
export interface LineItemTax {
|
|
1384
|
-
/**
|
|
1385
|
-
* @description The unique reference id of the line item for which the tax is applicable
|
|
1386
|
-
|
|
1387
|
-
*/
|
|
1388
|
-
|
|
1389
568
|
line_item_id?:string;
|
|
1390
569
|
|
|
1391
|
-
/**
|
|
1392
|
-
* @description The name of the tax applied
|
|
1393
|
-
|
|
1394
|
-
*/
|
|
1395
|
-
|
|
1396
570
|
tax_name:string;
|
|
1397
571
|
|
|
1398
|
-
/**
|
|
1399
|
-
* @description The rate of tax used to calculate tax amount
|
|
1400
|
-
|
|
1401
|
-
*/
|
|
1402
|
-
|
|
1403
572
|
tax_rate:number;
|
|
1404
573
|
|
|
1405
|
-
/**
|
|
1406
|
-
* @description Indicates the service period end of the tax rate for the line item.
|
|
1407
|
-
|
|
1408
|
-
*/
|
|
1409
|
-
|
|
1410
574
|
date_to?:number;
|
|
1411
575
|
|
|
1412
|
-
/**
|
|
1413
|
-
* @description Indicates the service period start of the tax rate for the line item.
|
|
1414
|
-
|
|
1415
|
-
*/
|
|
1416
|
-
|
|
1417
576
|
date_from?:number;
|
|
1418
577
|
|
|
1419
|
-
/**
|
|
1420
|
-
* @description Indicates the prorated line item amount in cents.
|
|
1421
|
-
|
|
1422
|
-
*/
|
|
1423
|
-
|
|
1424
578
|
prorated_taxable_amount?:number;
|
|
1425
579
|
|
|
1426
|
-
/**
|
|
1427
|
-
* @description Indicates if tax is applied only on a portion of the line item amount.
|
|
1428
|
-
|
|
1429
|
-
*/
|
|
1430
|
-
|
|
1431
580
|
is_partial_tax_applied?:boolean;
|
|
1432
581
|
|
|
1433
|
-
/**
|
|
1434
|
-
* @description Indicates the non-compliance tax that should not be reported to the jurisdiction.
|
|
1435
|
-
|
|
1436
|
-
*/
|
|
1437
|
-
|
|
1438
582
|
is_non_compliance_tax?:boolean;
|
|
1439
583
|
|
|
1440
|
-
/**
|
|
1441
|
-
* @description Indicates the actual portion of the line item amount that is taxable.
|
|
1442
|
-
|
|
1443
|
-
*/
|
|
1444
|
-
|
|
1445
584
|
taxable_amount:number;
|
|
1446
585
|
|
|
1447
|
-
/**
|
|
1448
|
-
* @description The tax amount
|
|
1449
|
-
|
|
1450
|
-
*/
|
|
1451
|
-
|
|
1452
586
|
tax_amount:number;
|
|
1453
587
|
|
|
1454
|
-
|
|
1455
|
-
* @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.
|
|
1456
|
-
|
|
1457
|
-
*/
|
|
1458
|
-
|
|
1459
|
-
tax_juris_type?:'special' | 'country' | 'unincorporated' | 'other' | 'city' | 'federal' | 'county' | 'state';
|
|
1460
|
-
|
|
1461
|
-
/**
|
|
1462
|
-
* @description The name of the tax jurisdiction
|
|
1463
|
-
|
|
1464
|
-
*/
|
|
588
|
+
tax_juris_type?:'country' | 'federal' | 'state' | 'county' | 'city' | 'special' | 'unincorporated' | 'other';
|
|
1465
589
|
|
|
1466
590
|
tax_juris_name?:string;
|
|
1467
591
|
|
|
1468
|
-
/**
|
|
1469
|
-
* @description The tax jurisdiction code
|
|
1470
|
-
|
|
1471
|
-
*/
|
|
1472
|
-
|
|
1473
592
|
tax_juris_code?:string;
|
|
1474
593
|
|
|
1475
|
-
/**
|
|
1476
|
-
* @description Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.
|
|
1477
|
-
|
|
1478
|
-
*/
|
|
1479
|
-
|
|
1480
594
|
tax_amount_in_local_currency?:number;
|
|
1481
595
|
|
|
1482
|
-
/**
|
|
1483
|
-
* @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.
|
|
1484
|
-
|
|
1485
|
-
*/
|
|
1486
|
-
|
|
1487
596
|
local_currency_code?:string;
|
|
1488
597
|
}
|
|
1489
598
|
export interface LineItemDiscount {
|
|
1490
|
-
line_item_id
|
|
599
|
+
line_item_id:string;
|
|
600
|
+
|
|
601
|
+
discount_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'custom_discount' | 'item_level_discount' | 'document_level_discount';
|
|
1491
602
|
|
|
1492
|
-
|
|
603
|
+
coupon_id?:string;
|
|
1493
604
|
|
|
1494
605
|
entity_id?:string;
|
|
1495
606
|
|
|
1496
|
-
discount_amount
|
|
607
|
+
discount_amount:number;
|
|
1497
608
|
}
|
|
1498
|
-
export interface
|
|
609
|
+
export interface LinkedCreditNote {
|
|
1499
610
|
amount?:number;
|
|
1500
611
|
|
|
1501
|
-
type
|
|
612
|
+
type:'adjustment' | 'refundable' | 'store';
|
|
1502
613
|
|
|
1503
|
-
id
|
|
614
|
+
id:string;
|
|
1504
615
|
|
|
1505
|
-
status
|
|
616
|
+
status:'adjusted' | 'refunded' | 'refund_due' | 'voided';
|
|
1506
617
|
|
|
1507
618
|
amount_adjusted?:number;
|
|
1508
619
|
|
|
1509
620
|
amount_refunded?:number;
|
|
1510
621
|
}
|
|
1511
622
|
export interface ResentOrder {
|
|
1512
|
-
order_id
|
|
623
|
+
order_id:string;
|
|
1513
624
|
|
|
1514
625
|
reason?:string;
|
|
1515
626
|
|