chargebee 2.41.0 → 3.0.0-beta.2
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 +11 -15
- package/LICENSE +1 -1
- package/README.md +90 -170
- package/cjs/RequestWrapper.js +84 -0
- package/cjs/asyncApiSupport.js +39 -0
- package/cjs/chargebee.cjs.js +13 -0
- package/cjs/chargebee.cjs.worker.js +9 -0
- package/cjs/chargebeeError.js +17 -0
- package/cjs/coreCommon.js +72 -0
- package/cjs/createChargebee.js +92 -0
- package/cjs/environment.js +18 -0
- package/cjs/filter.js +1 -0
- package/cjs/net/ClientInterface.js +40 -0
- package/cjs/net/FetchClient.js +86 -0
- package/cjs/net/NodeClient.js +61 -0
- package/cjs/package.json +1 -0
- package/cjs/resources/api_endpoints.js +1086 -0
- package/cjs/util.js +218 -0
- package/esm/RequestWrapper.js +80 -0
- package/esm/asyncApiSupport.js +35 -0
- package/esm/chargebee.esm.js +9 -0
- package/esm/chargebee.esm.worker.js +5 -0
- package/esm/chargebeeError.js +13 -0
- package/esm/coreCommon.js +67 -0
- package/esm/createChargebee.js +88 -0
- package/esm/environment.js +15 -0
- package/esm/filter.js +1 -0
- package/esm/net/ClientInterface.js +35 -0
- package/esm/net/FetchClient.js +81 -0
- package/esm/net/NodeClient.js +56 -0
- package/esm/package.json +1 -0
- package/esm/resources/api_endpoints.js +1083 -0
- package/esm/util.js +202 -0
- package/package.json +69 -38
- package/types/core.d.ts +558 -89
- package/types/index.d.ts +90 -55
- package/types/resources/Address.d.ts +57 -272
- package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
- package/types/resources/AttachedItem.d.ts +91 -329
- package/types/resources/Attribute.d.ts +5 -5
- package/types/resources/BusinessEntity.d.ts +49 -69
- package/types/resources/BusinessEntityTransfer.d.ts +11 -17
- package/types/resources/Card.d.ts +146 -424
- package/types/resources/Comment.d.ts +72 -189
- package/types/resources/Contact.d.ts +12 -64
- package/types/resources/ContractTerm.d.ts +15 -96
- package/types/resources/Coupon.d.ts +282 -758
- package/types/resources/CouponCode.d.ts +56 -52
- package/types/resources/CouponSet.d.ts +92 -234
- package/types/resources/CreditNote.d.ts +588 -1758
- package/types/resources/CreditNoteEstimate.d.ts +131 -157
- package/types/resources/Currency.d.ts +75 -62
- package/types/resources/Customer.d.ts +892 -835
- package/types/resources/CustomerEntitlement.d.ts +24 -35
- package/types/resources/DifferentialPrice.d.ts +116 -314
- package/types/resources/Discount.d.ts +20 -125
- package/types/resources/Download.d.ts +6 -22
- package/types/resources/Entitlement.d.ts +51 -160
- package/types/resources/EntitlementOverride.d.ts +58 -139
- package/types/resources/Estimate.d.ts +1178 -527
- package/types/resources/Event.d.ts +67 -178
- package/types/resources/Export.d.ts +563 -723
- package/types/resources/Feature.d.ts +117 -433
- package/types/resources/GatewayErrorDetail.d.ts +16 -72
- package/types/resources/Gift.d.ts +265 -432
- package/types/resources/Hierarchy.d.ts +8 -36
- package/types/resources/HostedPage.d.ts +1017 -1153
- package/types/resources/ImpactedItem.d.ts +13 -50
- package/types/resources/ImpactedItemPrice.d.ts +13 -15
- package/types/resources/ImpactedSubscription.d.ts +13 -45
- package/types/resources/InAppSubscription.d.ts +93 -389
- package/types/resources/Installment.d.ts +35 -110
- package/types/resources/InstallmentConfig.d.ts +54 -155
- package/types/resources/InstallmentDetail.d.ts +19 -27
- package/types/resources/Invoice.d.ts +1574 -3157
- package/types/resources/InvoiceEstimate.d.ts +131 -161
- package/types/resources/Item.d.ts +133 -611
- package/types/resources/ItemEntitlement.d.ts +78 -215
- package/types/resources/ItemFamily.d.ts +69 -178
- package/types/resources/ItemPrice.d.ts +291 -1203
- package/types/resources/Metadata.d.ts +3 -5
- package/types/resources/Order.d.ts +538 -1471
- package/types/resources/PaymentIntent.d.ts +163 -347
- package/types/resources/PaymentReferenceNumber.d.ts +7 -29
- package/types/resources/PaymentSource.d.ts +476 -1272
- package/types/resources/PaymentVoucher.d.ts +87 -306
- package/types/resources/PortalSession.d.ts +71 -207
- package/types/resources/PriceVariant.d.ts +91 -279
- package/types/resources/PricingPageSession.d.ts +92 -41
- package/types/resources/PromotionalCredit.d.ts +90 -346
- package/types/resources/Purchase.d.ts +185 -315
- package/types/resources/Quote.d.ts +1406 -887
- package/types/resources/QuoteLineGroup.d.ts +125 -452
- package/types/resources/QuotedCharge.d.ts +45 -274
- package/types/resources/QuotedSubscription.d.ts +100 -488
- package/types/resources/Ramp.d.ts +230 -747
- package/types/resources/ResourceMigration.d.ts +25 -80
- package/types/resources/SiteMigrationDetail.d.ts +34 -112
- package/types/resources/Subscription.d.ts +2390 -4336
- package/types/resources/SubscriptionEntitlement.d.ts +59 -160
- package/types/resources/SubscriptionEstimate.d.ts +51 -75
- package/types/resources/TaxWithheld.d.ts +15 -40
- package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
- package/types/resources/TimeMachine.d.ts +43 -97
- package/types/resources/Token.d.ts +15 -85
- package/types/resources/Transaction.d.ts +276 -911
- package/types/resources/UnbilledCharge.d.ts +189 -164
- package/types/resources/Usage.d.ts +89 -279
- package/types/resources/VirtualBankAccount.d.ts +103 -255
- package/types/resources/filter.d.ts +52 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
- package/.github/ISSUE_TEMPLATE/config.yml +0 -6
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
- package/lib/chargebee.js +0 -512
- package/lib/resources/api_endpoints.js +0 -2935
- package/types/resources/NonSubscription.d.ts +0 -30
- package/types/resources/Session.d.ts +0 -41
|
@@ -1,1519 +1,586 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
///<reference path='./filter.d.ts'/>
|
|
2
4
|
declare module 'chargebee' {
|
|
3
5
|
export interface Order {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
fulfillment_status?:string;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* @description The date on which the order will start getting processed.
|
|
91
|
-
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
|
-
order_date?:number;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @description This is the date on which the order will be delivered to the customer.
|
|
98
|
-
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
|
-
shipping_date?:number;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @description The custom note for the order.
|
|
105
|
-
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
|
-
note?:string;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @description The tracking id of the order.
|
|
112
|
-
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
tracking_id?:string;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* @description The tracking url of the order.
|
|
119
|
-
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
|
-
tracking_url?:string;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* @description Unique id to identify a group of orders.
|
|
126
|
-
|
|
127
|
-
*/
|
|
128
|
-
|
|
129
|
-
batch_id?:string;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* @description The source (or the user) from where the order has been created.
|
|
133
|
-
|
|
134
|
-
*/
|
|
135
|
-
|
|
136
|
-
created_by?:string;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* @description Shipment carrier
|
|
140
|
-
|
|
141
|
-
*/
|
|
142
|
-
|
|
143
|
-
shipment_carrier?:string;
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* @description The total round off taken from the invoice level
|
|
147
|
-
|
|
148
|
-
*/
|
|
149
|
-
|
|
150
|
-
invoice_round_off_amount?:number;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* @description The total tax for the order.
|
|
154
|
-
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
|
-
tax?:number;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* @description Total amount paid for the order.
|
|
161
|
-
|
|
162
|
-
*/
|
|
163
|
-
|
|
164
|
-
amount_paid?:number;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* @description Total amount adjusted for the order.
|
|
168
|
-
|
|
169
|
-
*/
|
|
170
|
-
|
|
171
|
-
amount_adjusted?:number;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* @description The total amount issued as credits on behalf of this order.
|
|
175
|
-
|
|
176
|
-
*/
|
|
177
|
-
|
|
178
|
-
refundable_credits_issued?:number;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* @description The total amount that can be issued as credits for this order.
|
|
182
|
-
|
|
183
|
-
*/
|
|
184
|
-
|
|
185
|
-
refundable_credits?:number;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* @description Rounding adjustment
|
|
189
|
-
|
|
190
|
-
*/
|
|
191
|
-
|
|
192
|
-
rounding_adjustement?:number;
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* @description The timestamp indicating the date \& time the order's invoice got paid.
|
|
196
|
-
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
|
-
paid_on?:number;
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* @description The time after which an order becomes unservicable
|
|
203
|
-
|
|
204
|
-
*/
|
|
205
|
-
|
|
206
|
-
shipping_cut_off_date?:number;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* @description The time at which the order was created
|
|
210
|
-
|
|
211
|
-
*/
|
|
212
|
-
|
|
213
|
-
created_at:number;
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* @description The time at which the order status was last updated.
|
|
217
|
-
|
|
218
|
-
*/
|
|
219
|
-
|
|
220
|
-
status_update_at?:number;
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* @description The time at which the order was delivered
|
|
224
|
-
|
|
225
|
-
*/
|
|
226
|
-
|
|
227
|
-
delivered_at?:number;
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* @description The time at which the order was shipped.
|
|
231
|
-
|
|
232
|
-
*/
|
|
233
|
-
|
|
234
|
-
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
|
-
|
|
239
|
-
*/
|
|
240
|
-
|
|
241
|
-
resource_version?:number;
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* @description The order's last modified time.
|
|
245
|
-
|
|
246
|
-
*/
|
|
247
|
-
|
|
248
|
-
updated_at?:number;
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* @description The time at which the order was cancelled.
|
|
252
|
-
|
|
253
|
-
*/
|
|
254
|
-
|
|
255
|
-
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
|
-
|
|
260
|
-
*/
|
|
261
|
-
|
|
262
|
-
resent_status?:'fully_resent' | 'partially_resent';
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* @description Show if the order is resent order or not.
|
|
266
|
-
|
|
267
|
-
*/
|
|
268
|
-
|
|
269
|
-
is_resent:boolean;
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* @description Refers to the original order id of the resent order.
|
|
273
|
-
|
|
274
|
-
*/
|
|
275
|
-
|
|
276
|
-
original_order_id?:string;
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* @description Total discount given for the order.
|
|
280
|
-
|
|
281
|
-
*/
|
|
282
|
-
|
|
283
|
-
discount?:number;
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* @description The order's sub-total
|
|
287
|
-
|
|
288
|
-
*/
|
|
289
|
-
|
|
290
|
-
sub_total?:number;
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* @description Total amount charged for the order.
|
|
294
|
-
|
|
295
|
-
*/
|
|
296
|
-
|
|
297
|
-
total?:number;
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* @description Indicates that this resource has been deleted.
|
|
301
|
-
|
|
302
|
-
*/
|
|
303
|
-
|
|
304
|
-
deleted:boolean;
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* @description The currency code (ISO 4217 format) for the invoice
|
|
308
|
-
|
|
309
|
-
*/
|
|
310
|
-
|
|
311
|
-
currency_code?:string;
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* @description Boolean indicating whether this order is gifted or not.
|
|
315
|
-
|
|
316
|
-
*/
|
|
317
|
-
|
|
318
|
-
is_gifted?:boolean;
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* @description The gift message added by the gifter during purchase
|
|
322
|
-
|
|
323
|
-
*/
|
|
324
|
-
|
|
325
|
-
gift_note?:string;
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* @description The gift_id if the order is a gift order
|
|
329
|
-
|
|
330
|
-
*/
|
|
331
|
-
|
|
332
|
-
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
|
-
|
|
337
|
-
*/
|
|
338
|
-
|
|
339
|
-
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
|
-
|
|
379
|
-
*/
|
|
380
|
-
|
|
381
|
-
line_item_discounts?:Order.LineItemDiscount[];
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* @description The credit notes linked to the order
|
|
385
|
-
|
|
386
|
-
*/
|
|
387
|
-
|
|
388
|
-
linked_credit_notes?:Order.OrderLineItemLinkedCredit[];
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* @description The list of resent orders applied on the order.
|
|
392
|
-
|
|
393
|
-
*/
|
|
394
|
-
|
|
395
|
-
resent_orders?:Order.ResentOrder[];
|
|
6
|
+
id: string;
|
|
7
|
+
document_number?: string;
|
|
8
|
+
invoice_id?: string;
|
|
9
|
+
subscription_id?: string;
|
|
10
|
+
customer_id?: string;
|
|
11
|
+
status?:
|
|
12
|
+
| 'new'
|
|
13
|
+
| 'processing'
|
|
14
|
+
| 'complete'
|
|
15
|
+
| 'cancelled'
|
|
16
|
+
| 'voided'
|
|
17
|
+
| 'queued'
|
|
18
|
+
| 'awaiting_shipment'
|
|
19
|
+
| 'on_hold'
|
|
20
|
+
| 'delivered'
|
|
21
|
+
| 'shipped'
|
|
22
|
+
| 'partially_delivered'
|
|
23
|
+
| 'returned';
|
|
24
|
+
cancellation_reason?:
|
|
25
|
+
| 'shipping_cut_off_passed'
|
|
26
|
+
| 'product_unsatisfactory'
|
|
27
|
+
| 'third_party_cancellation'
|
|
28
|
+
| 'product_not_required'
|
|
29
|
+
| 'delivery_date_missed'
|
|
30
|
+
| 'alternative_found'
|
|
31
|
+
| 'invoice_written_off'
|
|
32
|
+
| 'invoice_voided'
|
|
33
|
+
| 'fraudulent_transaction'
|
|
34
|
+
| 'payment_declined'
|
|
35
|
+
| 'subscription_cancelled'
|
|
36
|
+
| 'product_not_available'
|
|
37
|
+
| 'others'
|
|
38
|
+
| 'order_resent';
|
|
39
|
+
payment_status?: 'not_paid' | 'paid';
|
|
40
|
+
order_type?: 'manual' | 'system_generated';
|
|
41
|
+
price_type: PriceType;
|
|
42
|
+
reference_id?: string;
|
|
43
|
+
fulfillment_status?: string;
|
|
44
|
+
order_date?: number;
|
|
45
|
+
shipping_date?: number;
|
|
46
|
+
note?: string;
|
|
47
|
+
tracking_id?: string;
|
|
48
|
+
tracking_url?: string;
|
|
49
|
+
batch_id?: string;
|
|
50
|
+
created_by?: string;
|
|
51
|
+
shipment_carrier?: string;
|
|
52
|
+
invoice_round_off_amount?: number;
|
|
53
|
+
tax?: number;
|
|
54
|
+
amount_paid?: number;
|
|
55
|
+
amount_adjusted?: number;
|
|
56
|
+
refundable_credits_issued?: number;
|
|
57
|
+
refundable_credits?: number;
|
|
58
|
+
rounding_adjustement?: number;
|
|
59
|
+
paid_on?: number;
|
|
60
|
+
shipping_cut_off_date?: number;
|
|
61
|
+
created_at: number;
|
|
62
|
+
status_update_at?: number;
|
|
63
|
+
delivered_at?: number;
|
|
64
|
+
shipped_at?: number;
|
|
65
|
+
resource_version?: number;
|
|
66
|
+
updated_at?: number;
|
|
67
|
+
cancelled_at?: number;
|
|
68
|
+
resent_status?: 'fully_resent' | 'partially_resent';
|
|
69
|
+
is_resent: boolean;
|
|
70
|
+
original_order_id?: string;
|
|
71
|
+
order_line_items?: Order.OrderLineItem[];
|
|
72
|
+
shipping_address?: Order.ShippingAddress;
|
|
73
|
+
billing_address?: Order.BillingAddress;
|
|
74
|
+
discount?: number;
|
|
75
|
+
sub_total?: number;
|
|
76
|
+
total?: number;
|
|
77
|
+
line_item_taxes?: Order.LineItemTax[];
|
|
78
|
+
line_item_discounts?: Order.LineItemDiscount[];
|
|
79
|
+
linked_credit_notes?: Order.LinkedCreditNote[];
|
|
80
|
+
deleted: boolean;
|
|
81
|
+
currency_code?: string;
|
|
82
|
+
is_gifted?: boolean;
|
|
83
|
+
gift_note?: string;
|
|
84
|
+
gift_id?: string;
|
|
85
|
+
resend_reason?: string;
|
|
86
|
+
resent_orders?: Order.ResentOrder[];
|
|
87
|
+
business_entity_id?: string;
|
|
396
88
|
}
|
|
397
|
-
export namespace Order {
|
|
398
|
-
export class OrderResource {
|
|
399
|
-
/**
|
|
400
|
-
* @description This API is used to retrieve a list of all the available orders.
|
|
401
89
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
delete(order_id:string):ChargebeeRequest<DeleteResponse>;
|
|
470
|
-
|
|
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>;
|
|
90
|
+
export namespace Order {
|
|
91
|
+
export class OrderResource {
|
|
92
|
+
create(
|
|
93
|
+
input: CreateInputParam,
|
|
94
|
+
headers?: ChargebeeRequestHeader,
|
|
95
|
+
): Promise<ChargebeeResponse<CreateResponse>>;
|
|
96
|
+
|
|
97
|
+
update(
|
|
98
|
+
order_id: string,
|
|
99
|
+
input?: UpdateInputParam,
|
|
100
|
+
headers?: ChargebeeRequestHeader,
|
|
101
|
+
): Promise<ChargebeeResponse<UpdateResponse>>;
|
|
102
|
+
|
|
103
|
+
importOrder(
|
|
104
|
+
input: ImportOrderInputParam,
|
|
105
|
+
headers?: ChargebeeRequestHeader,
|
|
106
|
+
): Promise<ChargebeeResponse<ImportOrderResponse>>;
|
|
107
|
+
|
|
108
|
+
assignOrderNumber(
|
|
109
|
+
order_id: string,
|
|
110
|
+
headers?: ChargebeeRequestHeader,
|
|
111
|
+
): Promise<ChargebeeResponse<AssignOrderNumberResponse>>;
|
|
112
|
+
|
|
113
|
+
cancel(
|
|
114
|
+
order_id: string,
|
|
115
|
+
input: CancelInputParam,
|
|
116
|
+
headers?: ChargebeeRequestHeader,
|
|
117
|
+
): Promise<ChargebeeResponse<CancelResponse>>;
|
|
118
|
+
|
|
119
|
+
createRefundableCreditNote(
|
|
120
|
+
order_id: string,
|
|
121
|
+
input: CreateRefundableCreditNoteInputParam,
|
|
122
|
+
headers?: ChargebeeRequestHeader,
|
|
123
|
+
): Promise<ChargebeeResponse<CreateRefundableCreditNoteResponse>>;
|
|
124
|
+
|
|
125
|
+
reopen(
|
|
126
|
+
order_id: string,
|
|
127
|
+
input?: ReopenInputParam,
|
|
128
|
+
headers?: ChargebeeRequestHeader,
|
|
129
|
+
): Promise<ChargebeeResponse<ReopenResponse>>;
|
|
130
|
+
|
|
131
|
+
retrieve(
|
|
132
|
+
order_id: string,
|
|
133
|
+
headers?: ChargebeeRequestHeader,
|
|
134
|
+
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
135
|
+
|
|
136
|
+
delete(
|
|
137
|
+
order_id: string,
|
|
138
|
+
headers?: ChargebeeRequestHeader,
|
|
139
|
+
): Promise<ChargebeeResponse<DeleteResponse>>;
|
|
140
|
+
|
|
141
|
+
list(
|
|
142
|
+
input?: ListInputParam,
|
|
143
|
+
headers?: ChargebeeRequestHeader,
|
|
144
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
145
|
+
|
|
146
|
+
ordersForInvoice(
|
|
147
|
+
invoice_id: string,
|
|
148
|
+
input?: OrdersForInvoiceInputParam,
|
|
149
|
+
headers?: ChargebeeRequestHeader,
|
|
150
|
+
): Promise<ChargebeeResponse<OrdersForInvoiceResponse>>;
|
|
151
|
+
|
|
152
|
+
resend(
|
|
153
|
+
order_id: string,
|
|
154
|
+
input?: ResendInputParam,
|
|
155
|
+
headers?: ChargebeeRequestHeader,
|
|
156
|
+
): Promise<ChargebeeResponse<ResendResponse>>;
|
|
477
157
|
}
|
|
478
|
-
export interface ListResponse {
|
|
479
|
-
/**
|
|
480
|
-
* @description This API is used to retrieve a list of all the available orders.
|
|
481
158
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
list:{order:Order}[];
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* @description This API is used to retrieve a list of all the available orders.
|
|
488
|
-
|
|
489
|
-
*/
|
|
490
|
-
|
|
491
|
-
next_offset?:string;
|
|
159
|
+
export interface CreateResponse {
|
|
160
|
+
order: Order;
|
|
492
161
|
}
|
|
493
|
-
export interface ListInputParam {
|
|
494
|
-
[key : string]: any;
|
|
495
|
-
/**
|
|
496
|
-
* @description The number of resources to be returned.
|
|
497
|
-
|
|
498
|
-
*/
|
|
499
|
-
|
|
500
|
-
limit?:number;
|
|
501
|
-
|
|
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;
|
|
508
|
-
|
|
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;
|
|
515
|
-
|
|
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;
|
|
522
|
-
|
|
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};
|
|
529
|
-
|
|
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};
|
|
536
|
-
|
|
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};
|
|
543
|
-
|
|
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};
|
|
550
|
-
|
|
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
162
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
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};
|
|
620
|
-
|
|
621
|
-
/**
|
|
622
|
-
* @description This API is used to retrieve a list of all the available orders.
|
|
163
|
+
export interface UpdateResponse {
|
|
164
|
+
order: Order;
|
|
165
|
+
}
|
|
623
166
|
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
sort_by?:{asc?:'updated_at' | 'created_at',desc?:'updated_at' | 'created_at'};
|
|
167
|
+
export interface ImportOrderResponse {
|
|
168
|
+
order: Order;
|
|
627
169
|
}
|
|
628
|
-
|
|
629
|
-
|
|
170
|
+
|
|
171
|
+
export interface AssignOrderNumberResponse {
|
|
172
|
+
order: Order;
|
|
630
173
|
}
|
|
631
|
-
export interface CreateInputParam {
|
|
632
|
-
|
|
633
|
-
/**
|
|
634
|
-
* @description Uniquely identifies the order. If not given, this will be auto-generated.
|
|
635
174
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
/**
|
|
641
|
-
* @description The invoice number which acts as an identifier for invoice and is generated sequentially.
|
|
175
|
+
export interface CancelResponse {
|
|
176
|
+
order: Order;
|
|
177
|
+
}
|
|
642
178
|
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
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
|
|
179
|
+
export interface CreateRefundableCreditNoteResponse {
|
|
180
|
+
order: Order;
|
|
181
|
+
}
|
|
649
182
|
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
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.
|
|
183
|
+
export interface ReopenResponse {
|
|
184
|
+
order: Order;
|
|
185
|
+
}
|
|
656
186
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
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;.
|
|
187
|
+
export interface RetrieveResponse {
|
|
188
|
+
order: Order;
|
|
189
|
+
}
|
|
663
190
|
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* @description The custom note for the order.
|
|
191
|
+
export interface DeleteResponse {
|
|
192
|
+
order: Order;
|
|
193
|
+
}
|
|
670
194
|
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
/**
|
|
676
|
-
* @description The tracking id of the order.
|
|
195
|
+
export interface ListResponse {
|
|
196
|
+
list: { order: Order }[];
|
|
197
|
+
next_offset?: string;
|
|
198
|
+
}
|
|
677
199
|
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
/**
|
|
683
|
-
* @description The tracking url of the order.
|
|
200
|
+
export interface OrdersForInvoiceResponse {
|
|
201
|
+
list: { order: Order }[];
|
|
202
|
+
next_offset?: string;
|
|
203
|
+
}
|
|
684
204
|
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
/**
|
|
690
|
-
* @description Unique id to identify a group of orders.
|
|
205
|
+
export interface ResendResponse {
|
|
206
|
+
order: Order;
|
|
207
|
+
}
|
|
691
208
|
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
209
|
+
export interface OrderLineItem {
|
|
210
|
+
id: string;
|
|
211
|
+
invoice_id: string;
|
|
212
|
+
invoice_line_item_id: string;
|
|
213
|
+
unit_price?: number;
|
|
214
|
+
description?: string;
|
|
215
|
+
amount?: number;
|
|
216
|
+
fulfillment_quantity?: number;
|
|
217
|
+
fulfillment_amount?: number;
|
|
218
|
+
tax_amount?: number;
|
|
219
|
+
amount_paid?: number;
|
|
220
|
+
amount_adjusted?: number;
|
|
221
|
+
refundable_credits_issued?: number;
|
|
222
|
+
refundable_credits?: number;
|
|
223
|
+
is_shippable: boolean;
|
|
224
|
+
sku?: string;
|
|
225
|
+
status?:
|
|
226
|
+
| 'queued'
|
|
227
|
+
| 'awaiting_shipment'
|
|
228
|
+
| 'on_hold'
|
|
229
|
+
| 'delivered'
|
|
230
|
+
| 'shipped'
|
|
231
|
+
| 'partially_delivered'
|
|
232
|
+
| 'returned'
|
|
233
|
+
| 'cancelled';
|
|
234
|
+
entity_type:
|
|
235
|
+
| 'adhoc'
|
|
236
|
+
| 'plan_item_price'
|
|
237
|
+
| 'addon_item_price'
|
|
238
|
+
| 'charge_item_price'
|
|
239
|
+
| 'plan_setup'
|
|
240
|
+
| 'plan'
|
|
241
|
+
| 'addon';
|
|
242
|
+
item_level_discount_amount?: number;
|
|
243
|
+
discount_amount?: number;
|
|
244
|
+
entity_id?: string;
|
|
695
245
|
}
|
|
696
|
-
export interface
|
|
697
|
-
|
|
246
|
+
export interface ShippingAddress {
|
|
247
|
+
first_name?: string;
|
|
248
|
+
last_name?: string;
|
|
249
|
+
email?: string;
|
|
250
|
+
company?: string;
|
|
251
|
+
phone?: string;
|
|
252
|
+
line1?: string;
|
|
253
|
+
line2?: string;
|
|
254
|
+
line3?: string;
|
|
255
|
+
city?: string;
|
|
256
|
+
state_code?: string;
|
|
257
|
+
state?: string;
|
|
258
|
+
country?: string;
|
|
259
|
+
zip?: string;
|
|
260
|
+
validation_status?: ValidationStatus;
|
|
261
|
+
index: number;
|
|
698
262
|
}
|
|
699
|
-
export interface
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
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
|
-
*/
|
|
723
|
-
|
|
724
|
-
document_number?:string;
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
* @description The invoice number which acts as an identifier for invoice and is generated sequentially.
|
|
728
|
-
|
|
729
|
-
*/
|
|
730
|
-
|
|
731
|
-
invoice_id:string;
|
|
732
|
-
|
|
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
|
-
*/
|
|
744
|
-
|
|
745
|
-
subscription_id?:string;
|
|
746
|
-
|
|
747
|
-
/**
|
|
748
|
-
* @description The customer for which the order is created.
|
|
749
|
-
|
|
750
|
-
*/
|
|
751
|
-
|
|
752
|
-
customer_id?:string;
|
|
753
|
-
|
|
754
|
-
/**
|
|
755
|
-
* @description The time at which the order was created.
|
|
756
|
-
|
|
757
|
-
*/
|
|
758
|
-
|
|
759
|
-
created_at:number;
|
|
760
|
-
|
|
761
|
-
/**
|
|
762
|
-
* @description The date on which the order will start getting processed.
|
|
763
|
-
|
|
764
|
-
*/
|
|
765
|
-
|
|
766
|
-
order_date:number;
|
|
767
|
-
|
|
768
|
-
/**
|
|
769
|
-
* @description This is the date on which the order has to be shipped to the customer.
|
|
770
|
-
|
|
771
|
-
*/
|
|
772
|
-
|
|
773
|
-
shipping_date:number;
|
|
774
|
-
|
|
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
|
-
reference_id?:string;
|
|
787
|
-
|
|
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
|
-
fulfillment_status?:string;
|
|
798
|
-
|
|
799
|
-
/**
|
|
800
|
-
* @description The custom note for the order.
|
|
801
|
-
|
|
802
|
-
*/
|
|
803
|
-
|
|
804
|
-
note?:string;
|
|
805
|
-
|
|
806
|
-
/**
|
|
807
|
-
* @description The tracking id of the order.
|
|
808
|
-
|
|
809
|
-
*/
|
|
810
|
-
|
|
811
|
-
tracking_id?:string;
|
|
812
|
-
|
|
813
|
-
/**
|
|
814
|
-
* @description The tracking url of the order.
|
|
815
|
-
|
|
816
|
-
*/
|
|
817
|
-
|
|
818
|
-
tracking_url?:string;
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* @description Unique id to identify a group of orders.
|
|
822
|
-
|
|
823
|
-
*/
|
|
824
|
-
|
|
825
|
-
batch_id?:string;
|
|
826
|
-
|
|
827
|
-
/**
|
|
828
|
-
* @description Shipment carrier.
|
|
829
|
-
|
|
830
|
-
*/
|
|
831
|
-
|
|
832
|
-
shipment_carrier?:string;
|
|
833
|
-
|
|
834
|
-
/**
|
|
835
|
-
* @description The time after which an order becomes unservicable.
|
|
836
|
-
|
|
837
|
-
*/
|
|
838
|
-
|
|
839
|
-
shipping_cut_off_date?:number;
|
|
840
|
-
|
|
841
|
-
/**
|
|
842
|
-
* @description The time at which the order was delivered.
|
|
843
|
-
|
|
844
|
-
*/
|
|
845
|
-
|
|
846
|
-
delivered_at?:number;
|
|
847
|
-
|
|
848
|
-
/**
|
|
849
|
-
* @description The time at which the order was shipped.
|
|
850
|
-
|
|
851
|
-
*/
|
|
852
|
-
|
|
853
|
-
shipped_at?:number;
|
|
854
|
-
|
|
855
|
-
/**
|
|
856
|
-
* @description The time at which the order was cancelled.
|
|
857
|
-
|
|
858
|
-
*/
|
|
859
|
-
|
|
860
|
-
cancelled_at?:number;
|
|
861
|
-
|
|
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
|
-
*/
|
|
873
|
-
|
|
874
|
-
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};
|
|
263
|
+
export interface BillingAddress {
|
|
264
|
+
first_name?: string;
|
|
265
|
+
last_name?: string;
|
|
266
|
+
email?: string;
|
|
267
|
+
company?: string;
|
|
268
|
+
phone?: string;
|
|
269
|
+
line1?: string;
|
|
270
|
+
line2?: string;
|
|
271
|
+
line3?: string;
|
|
272
|
+
city?: string;
|
|
273
|
+
state_code?: string;
|
|
274
|
+
state?: string;
|
|
275
|
+
country?: string;
|
|
276
|
+
zip?: string;
|
|
277
|
+
validation_status?: ValidationStatus;
|
|
889
278
|
}
|
|
890
|
-
export interface
|
|
891
|
-
|
|
279
|
+
export interface LineItemTax {
|
|
280
|
+
line_item_id?: string;
|
|
281
|
+
tax_name: string;
|
|
282
|
+
tax_rate: number;
|
|
283
|
+
date_to?: number;
|
|
284
|
+
date_from?: number;
|
|
285
|
+
prorated_taxable_amount?: number;
|
|
286
|
+
is_partial_tax_applied?: boolean;
|
|
287
|
+
is_non_compliance_tax?: boolean;
|
|
288
|
+
taxable_amount: number;
|
|
289
|
+
tax_amount: number;
|
|
290
|
+
tax_juris_type?:
|
|
291
|
+
| 'country'
|
|
292
|
+
| 'federal'
|
|
293
|
+
| 'state'
|
|
294
|
+
| 'county'
|
|
295
|
+
| 'city'
|
|
296
|
+
| 'special'
|
|
297
|
+
| 'unincorporated'
|
|
298
|
+
| 'other';
|
|
299
|
+
tax_juris_name?: string;
|
|
300
|
+
tax_juris_code?: string;
|
|
301
|
+
tax_amount_in_local_currency?: number;
|
|
302
|
+
local_currency_code?: string;
|
|
892
303
|
}
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
304
|
+
export interface LineItemDiscount {
|
|
305
|
+
line_item_id: string;
|
|
306
|
+
discount_type:
|
|
307
|
+
| 'item_level_coupon'
|
|
308
|
+
| 'document_level_coupon'
|
|
309
|
+
| 'promotional_credits'
|
|
310
|
+
| 'prorated_credits'
|
|
311
|
+
| 'custom_discount'
|
|
312
|
+
| 'item_level_discount'
|
|
313
|
+
| 'document_level_discount';
|
|
314
|
+
coupon_id?: string;
|
|
315
|
+
entity_id?: string;
|
|
316
|
+
discount_amount: number;
|
|
896
317
|
}
|
|
897
|
-
export interface
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
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}[];
|
|
318
|
+
export interface LinkedCreditNote {
|
|
319
|
+
amount?: number;
|
|
320
|
+
type: 'adjustment' | 'refundable';
|
|
321
|
+
id: string;
|
|
322
|
+
status: 'adjusted' | 'refunded' | 'refund_due' | 'voided';
|
|
323
|
+
amount_adjusted?: number;
|
|
324
|
+
amount_refunded?: number;
|
|
919
325
|
}
|
|
920
|
-
export interface
|
|
921
|
-
|
|
326
|
+
export interface ResentOrder {
|
|
327
|
+
order_id: string;
|
|
328
|
+
reason?: string;
|
|
329
|
+
amount?: number;
|
|
922
330
|
}
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
/**
|
|
926
|
-
* @description Flag to void credit notes created for cancellation if they are unused.
|
|
331
|
+
// REQUEST PARAMS
|
|
332
|
+
//---------------
|
|
927
333
|
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
334
|
+
export interface CreateInputParam {
|
|
335
|
+
id?: string;
|
|
336
|
+
invoice_id: string;
|
|
337
|
+
status?: 'new' | 'processing' | 'complete' | 'cancelled' | 'voided';
|
|
338
|
+
reference_id?: string;
|
|
339
|
+
fulfillment_status?: string;
|
|
340
|
+
note?: string;
|
|
341
|
+
tracking_id?: string;
|
|
342
|
+
tracking_url?: string;
|
|
343
|
+
batch_id?: string;
|
|
931
344
|
}
|
|
932
|
-
export interface
|
|
933
|
-
|
|
345
|
+
export interface UpdateInputParam {
|
|
346
|
+
reference_id?: string;
|
|
347
|
+
batch_id?: string;
|
|
348
|
+
note?: string;
|
|
349
|
+
shipping_date?: number;
|
|
350
|
+
order_date?: number;
|
|
351
|
+
cancelled_at?: number;
|
|
352
|
+
cancellation_reason?:
|
|
353
|
+
| 'shipping_cut_off_passed'
|
|
354
|
+
| 'product_unsatisfactory'
|
|
355
|
+
| 'third_party_cancellation'
|
|
356
|
+
| 'product_not_required'
|
|
357
|
+
| 'delivery_date_missed'
|
|
358
|
+
| 'alternative_found'
|
|
359
|
+
| 'invoice_written_off'
|
|
360
|
+
| 'invoice_voided'
|
|
361
|
+
| 'fraudulent_transaction'
|
|
362
|
+
| 'payment_declined'
|
|
363
|
+
| 'subscription_cancelled'
|
|
364
|
+
| 'product_not_available'
|
|
365
|
+
| 'others'
|
|
366
|
+
| 'order_resent';
|
|
367
|
+
shipped_at?: number;
|
|
368
|
+
delivered_at?: number;
|
|
369
|
+
tracking_url?: string;
|
|
370
|
+
tracking_id?: string;
|
|
371
|
+
shipment_carrier?: string;
|
|
372
|
+
fulfillment_status?: string;
|
|
373
|
+
status?:
|
|
374
|
+
| 'new'
|
|
375
|
+
| 'processing'
|
|
376
|
+
| 'complete'
|
|
377
|
+
| 'cancelled'
|
|
378
|
+
| 'voided'
|
|
379
|
+
| 'queued'
|
|
380
|
+
| 'awaiting_shipment'
|
|
381
|
+
| 'on_hold'
|
|
382
|
+
| 'delivered'
|
|
383
|
+
| 'shipped'
|
|
384
|
+
| 'partially_delivered'
|
|
385
|
+
| 'returned';
|
|
386
|
+
shipping_address?: ShippingAddressUpdateInputParam;
|
|
387
|
+
order_line_items?: OrderLineItemsUpdateInputParam[];
|
|
388
|
+
}
|
|
389
|
+
export interface ImportOrderInputParam {
|
|
390
|
+
id?: string;
|
|
391
|
+
document_number?: string;
|
|
392
|
+
invoice_id: string;
|
|
393
|
+
status:
|
|
394
|
+
| 'cancelled'
|
|
395
|
+
| 'queued'
|
|
396
|
+
| 'awaiting_shipment'
|
|
397
|
+
| 'on_hold'
|
|
398
|
+
| 'delivered'
|
|
399
|
+
| 'shipped'
|
|
400
|
+
| 'partially_delivered'
|
|
401
|
+
| 'returned';
|
|
402
|
+
subscription_id?: string;
|
|
403
|
+
customer_id?: string;
|
|
404
|
+
created_at: number;
|
|
405
|
+
order_date: number;
|
|
406
|
+
shipping_date: number;
|
|
407
|
+
reference_id?: string;
|
|
408
|
+
fulfillment_status?: string;
|
|
409
|
+
note?: string;
|
|
410
|
+
tracking_id?: string;
|
|
411
|
+
tracking_url?: string;
|
|
412
|
+
batch_id?: string;
|
|
413
|
+
shipment_carrier?: string;
|
|
414
|
+
shipping_cut_off_date?: number;
|
|
415
|
+
delivered_at?: number;
|
|
416
|
+
shipped_at?: number;
|
|
417
|
+
cancelled_at?: number;
|
|
418
|
+
cancellation_reason?:
|
|
419
|
+
| 'shipping_cut_off_passed'
|
|
420
|
+
| 'product_unsatisfactory'
|
|
421
|
+
| 'third_party_cancellation'
|
|
422
|
+
| 'product_not_required'
|
|
423
|
+
| 'delivery_date_missed'
|
|
424
|
+
| 'alternative_found'
|
|
425
|
+
| 'invoice_written_off'
|
|
426
|
+
| 'invoice_voided'
|
|
427
|
+
| 'fraudulent_transaction'
|
|
428
|
+
| 'payment_declined'
|
|
429
|
+
| 'subscription_cancelled'
|
|
430
|
+
| 'product_not_available'
|
|
431
|
+
| 'others'
|
|
432
|
+
| 'order_resent';
|
|
433
|
+
refundable_credits_issued?: number;
|
|
434
|
+
shipping_address?: ShippingAddressImportOrderInputParam;
|
|
435
|
+
billing_address?: BillingAddressImportOrderInputParam;
|
|
934
436
|
}
|
|
935
437
|
export interface CancelInputParam {
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
comment?:string;
|
|
957
|
-
|
|
958
|
-
/**
|
|
959
|
-
* @description The time at which the order was cancelled.
|
|
960
|
-
|
|
961
|
-
*/
|
|
962
|
-
|
|
963
|
-
cancelled_at?:number;
|
|
964
|
-
|
|
965
|
-
/**
|
|
966
|
-
* @description Parameters for credit_note
|
|
967
|
-
|
|
968
|
-
*/
|
|
969
|
-
|
|
970
|
-
credit_note?:{total?:number};
|
|
438
|
+
cancellation_reason:
|
|
439
|
+
| 'shipping_cut_off_passed'
|
|
440
|
+
| 'product_unsatisfactory'
|
|
441
|
+
| 'third_party_cancellation'
|
|
442
|
+
| 'product_not_required'
|
|
443
|
+
| 'delivery_date_missed'
|
|
444
|
+
| 'alternative_found'
|
|
445
|
+
| 'invoice_written_off'
|
|
446
|
+
| 'invoice_voided'
|
|
447
|
+
| 'fraudulent_transaction'
|
|
448
|
+
| 'payment_declined'
|
|
449
|
+
| 'subscription_cancelled'
|
|
450
|
+
| 'product_not_available'
|
|
451
|
+
| 'others'
|
|
452
|
+
| 'order_resent';
|
|
453
|
+
customer_notes?: string;
|
|
454
|
+
comment?: string;
|
|
455
|
+
cancelled_at?: number;
|
|
456
|
+
credit_note?: CreditNoteCancelInputParam;
|
|
971
457
|
}
|
|
972
|
-
export interface
|
|
973
|
-
|
|
458
|
+
export interface CreateRefundableCreditNoteInputParam {
|
|
459
|
+
customer_notes?: string;
|
|
460
|
+
comment?: string;
|
|
461
|
+
credit_note?: CreditNoteCreateRefundableCreditNoteInputParam;
|
|
974
462
|
}
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
order:Order;
|
|
463
|
+
export interface ReopenInputParam {
|
|
464
|
+
void_cancellation_credit_notes?: boolean;
|
|
978
465
|
}
|
|
979
|
-
export interface
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
note?:string;
|
|
1001
|
-
|
|
1002
|
-
/**
|
|
1003
|
-
* @description The date on which the order should be shipped to the customer.
|
|
1004
|
-
|
|
1005
|
-
*/
|
|
1006
|
-
|
|
1007
|
-
shipping_date?:number;
|
|
1008
|
-
|
|
1009
|
-
/**
|
|
1010
|
-
* @description The order date.
|
|
1011
|
-
|
|
1012
|
-
*/
|
|
1013
|
-
|
|
1014
|
-
order_date?:number;
|
|
1015
|
-
|
|
1016
|
-
/**
|
|
1017
|
-
* @description The time at which the order was cancelled.
|
|
1018
|
-
|
|
1019
|
-
*/
|
|
1020
|
-
|
|
1021
|
-
cancelled_at?:number;
|
|
1022
|
-
|
|
1023
|
-
/**
|
|
1024
|
-
* @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.
|
|
1025
|
-
|
|
1026
|
-
*/
|
|
1027
|
-
|
|
1028
|
-
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';
|
|
1029
|
-
|
|
1030
|
-
/**
|
|
1031
|
-
* @description The time at which the order was shipped.
|
|
1032
|
-
|
|
1033
|
-
*/
|
|
1034
|
-
|
|
1035
|
-
shipped_at?:number;
|
|
1036
|
-
|
|
1037
|
-
/**
|
|
1038
|
-
* @description The time at which the order was delivered.
|
|
1039
|
-
|
|
1040
|
-
*/
|
|
1041
|
-
|
|
1042
|
-
delivered_at?:number;
|
|
1043
|
-
|
|
1044
|
-
/**
|
|
1045
|
-
* @description The tracking url of the order.
|
|
1046
|
-
|
|
1047
|
-
*/
|
|
1048
|
-
|
|
1049
|
-
tracking_url?:string;
|
|
1050
|
-
|
|
1051
|
-
/**
|
|
1052
|
-
* @description The tracking id of the order.
|
|
1053
|
-
|
|
1054
|
-
*/
|
|
1055
|
-
|
|
1056
|
-
tracking_id?:string;
|
|
1057
|
-
|
|
1058
|
-
/**
|
|
1059
|
-
* @description The carrier used to ship the goods to the customer. Ex:- FedEx.
|
|
1060
|
-
|
|
1061
|
-
*/
|
|
1062
|
-
|
|
1063
|
-
shipment_carrier?:string;
|
|
1064
|
-
|
|
1065
|
-
/**
|
|
1066
|
-
* @description The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;.
|
|
1067
|
-
|
|
1068
|
-
*/
|
|
1069
|
-
|
|
1070
|
-
fulfillment_status?:string;
|
|
1071
|
-
|
|
1072
|
-
/**
|
|
1073
|
-
* @description The order status. \* 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.
|
|
1074
|
-
|
|
1075
|
-
*/
|
|
1076
|
-
|
|
1077
|
-
status?:'new' | 'partially_delivered' | 'queued' | 'delivered' | 'on_hold' | 'shipped' | 'processing' | 'cancelled' | 'voided' | 'complete' | 'awaiting_shipment' | 'returned';
|
|
1078
|
-
|
|
1079
|
-
/**
|
|
1080
|
-
* @description Parameters for shipping_address
|
|
1081
|
-
|
|
1082
|
-
*/
|
|
1083
|
-
|
|
1084
|
-
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};
|
|
1085
|
-
|
|
1086
|
-
/**
|
|
1087
|
-
* @description Parameters for order_line_items
|
|
1088
|
-
|
|
1089
|
-
*/
|
|
1090
|
-
|
|
1091
|
-
order_line_items?:{id?:string,sku?:string,status?:'shipped' | 'partially_delivered' | 'queued' | 'cancelled' | 'delivered' | 'on_hold' | 'awaiting_shipment' | 'returned'}[];
|
|
466
|
+
export interface ListInputParam {
|
|
467
|
+
limit?: number;
|
|
468
|
+
offset?: string;
|
|
469
|
+
include_deleted?: boolean;
|
|
470
|
+
exclude_deleted_credit_notes?: boolean;
|
|
471
|
+
id?: filter.String;
|
|
472
|
+
invoice_id?: filter.String;
|
|
473
|
+
subscription_id?: filter.String;
|
|
474
|
+
status?: filter.Enum;
|
|
475
|
+
shipping_date?: filter.Timestamp;
|
|
476
|
+
shipped_at?: filter.Timestamp;
|
|
477
|
+
order_type?: filter.Enum;
|
|
478
|
+
order_date?: filter.Timestamp;
|
|
479
|
+
paid_on?: filter.Timestamp;
|
|
480
|
+
updated_at?: filter.Timestamp;
|
|
481
|
+
created_at?: filter.Timestamp;
|
|
482
|
+
resent_status?: filter.Enum;
|
|
483
|
+
is_resent?: filter.Boolean;
|
|
484
|
+
original_order_id?: filter.String;
|
|
485
|
+
'sort_by[asc]'?: string;
|
|
486
|
+
'sort_by[desc]'?: string;
|
|
1092
487
|
}
|
|
1093
|
-
export interface
|
|
1094
|
-
|
|
488
|
+
export interface OrdersForInvoiceInputParam {
|
|
489
|
+
limit?: number;
|
|
490
|
+
offset?: string;
|
|
1095
491
|
}
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
492
|
+
export interface ResendInputParam {
|
|
493
|
+
shipping_date?: number;
|
|
494
|
+
resend_reason?: string;
|
|
495
|
+
order_line_items?: OrderLineItemsResendInputParam[];
|
|
496
|
+
}
|
|
497
|
+
export interface ShippingAddressUpdateInputParam {
|
|
498
|
+
first_name?: string;
|
|
499
|
+
last_name?: string;
|
|
500
|
+
email?: string;
|
|
501
|
+
company?: string;
|
|
502
|
+
phone?: string;
|
|
503
|
+
line1?: string;
|
|
504
|
+
line2?: string;
|
|
505
|
+
line3?: string;
|
|
506
|
+
city?: string;
|
|
507
|
+
state_code?: string;
|
|
508
|
+
state?: string;
|
|
509
|
+
zip?: string;
|
|
510
|
+
country?: string;
|
|
511
|
+
validation_status?: ValidationStatus;
|
|
1099
512
|
}
|
|
1100
|
-
export interface CreateRefundableCreditNoteInputParam {
|
|
1101
|
-
|
|
1102
|
-
/**
|
|
1103
|
-
* @description The Customer Notes to be filled in the Credit Notes created to capture this refund detail.
|
|
1104
|
-
|
|
1105
|
-
*/
|
|
1106
|
-
|
|
1107
|
-
customer_notes?:string;
|
|
1108
|
-
|
|
1109
|
-
/**
|
|
1110
|
-
* @description Comment, if any, on the refund.
|
|
1111
|
-
|
|
1112
|
-
*/
|
|
1113
|
-
|
|
1114
|
-
comment?:string;
|
|
1115
|
-
|
|
1116
|
-
/**
|
|
1117
|
-
* @description Parameters for credit_note
|
|
1118
513
|
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
514
|
+
export interface OrderLineItemsUpdateInputParam {
|
|
515
|
+
id?: string;
|
|
516
|
+
status?:
|
|
517
|
+
| 'queued'
|
|
518
|
+
| 'awaiting_shipment'
|
|
519
|
+
| 'on_hold'
|
|
520
|
+
| 'delivered'
|
|
521
|
+
| 'shipped'
|
|
522
|
+
| 'partially_delivered'
|
|
523
|
+
| 'returned'
|
|
524
|
+
| 'cancelled';
|
|
525
|
+
sku?: string;
|
|
1122
526
|
}
|
|
1123
|
-
export interface
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
fulfillment_amount?:number;
|
|
1139
|
-
|
|
1140
|
-
tax_amount?:number;
|
|
1141
|
-
|
|
1142
|
-
amount_paid?:number;
|
|
1143
|
-
|
|
1144
|
-
amount_adjusted?:number;
|
|
1145
|
-
|
|
1146
|
-
refundable_credits_issued?:number;
|
|
1147
|
-
|
|
1148
|
-
refundable_credits?:number;
|
|
1149
|
-
|
|
1150
|
-
is_shippable?:boolean;
|
|
1151
|
-
|
|
1152
|
-
sku?:string;
|
|
1153
|
-
|
|
1154
|
-
status?:'shipped' | 'partially_delivered' | 'queued' | 'cancelled' | 'delivered' | 'on_hold' | 'awaiting_shipment' | 'returned';
|
|
1155
|
-
|
|
1156
|
-
entity_type?:'addon_item_price' | 'plan_item_price' | 'charge_item_price' | 'adhoc';
|
|
1157
|
-
|
|
1158
|
-
item_level_discount_amount?:number;
|
|
1159
|
-
|
|
1160
|
-
discount_amount?:number;
|
|
1161
|
-
|
|
1162
|
-
entity_id?:string;
|
|
527
|
+
export interface BillingAddressImportOrderInputParam {
|
|
528
|
+
first_name?: string;
|
|
529
|
+
last_name?: string;
|
|
530
|
+
email?: string;
|
|
531
|
+
company?: string;
|
|
532
|
+
phone?: string;
|
|
533
|
+
line1?: string;
|
|
534
|
+
line2?: string;
|
|
535
|
+
line3?: string;
|
|
536
|
+
city?: string;
|
|
537
|
+
state_code?: string;
|
|
538
|
+
state?: string;
|
|
539
|
+
zip?: string;
|
|
540
|
+
country?: string;
|
|
541
|
+
validation_status?: ValidationStatus;
|
|
1163
542
|
}
|
|
1164
|
-
export interface
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
/**
|
|
1180
|
-
* @description The email address.
|
|
1181
|
-
|
|
1182
|
-
*/
|
|
1183
|
-
|
|
1184
|
-
email?:string;
|
|
1185
|
-
|
|
1186
|
-
/**
|
|
1187
|
-
* @description The company name.
|
|
1188
|
-
|
|
1189
|
-
*/
|
|
1190
|
-
|
|
1191
|
-
company?:string;
|
|
1192
|
-
|
|
1193
|
-
/**
|
|
1194
|
-
* @description The phone number.
|
|
1195
|
-
|
|
1196
|
-
*/
|
|
1197
|
-
|
|
1198
|
-
phone?:string;
|
|
1199
|
-
|
|
1200
|
-
/**
|
|
1201
|
-
* @description Address line 1
|
|
1202
|
-
|
|
1203
|
-
*/
|
|
1204
|
-
|
|
1205
|
-
line1?:string;
|
|
1206
|
-
|
|
1207
|
-
/**
|
|
1208
|
-
* @description Address line 2
|
|
1209
|
-
|
|
1210
|
-
*/
|
|
1211
|
-
|
|
1212
|
-
line2?:string;
|
|
1213
|
-
|
|
1214
|
-
/**
|
|
1215
|
-
* @description Address line 3
|
|
1216
|
-
|
|
1217
|
-
*/
|
|
1218
|
-
|
|
1219
|
-
line3?:string;
|
|
1220
|
-
|
|
1221
|
-
/**
|
|
1222
|
-
* @description The name of the city.
|
|
1223
|
-
|
|
1224
|
-
*/
|
|
1225
|
-
|
|
1226
|
-
city?:string;
|
|
1227
|
-
|
|
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
|
-
state_code?:string;
|
|
1234
|
-
|
|
1235
|
-
/**
|
|
1236
|
-
* @description The state/province name.
|
|
1237
|
-
|
|
1238
|
-
*/
|
|
1239
|
-
|
|
1240
|
-
state?:string;
|
|
1241
|
-
|
|
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
|
-
country?:string;
|
|
1255
|
-
|
|
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
|
-
zip?:string;
|
|
1262
|
-
|
|
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
|
-
validation_status?:ValidationStatus;
|
|
1269
|
-
|
|
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;
|
|
543
|
+
export interface ShippingAddressImportOrderInputParam {
|
|
544
|
+
first_name?: string;
|
|
545
|
+
last_name?: string;
|
|
546
|
+
email?: string;
|
|
547
|
+
company?: string;
|
|
548
|
+
phone?: string;
|
|
549
|
+
line1?: string;
|
|
550
|
+
line2?: string;
|
|
551
|
+
line3?: string;
|
|
552
|
+
city?: string;
|
|
553
|
+
state_code?: string;
|
|
554
|
+
state?: string;
|
|
555
|
+
zip?: string;
|
|
556
|
+
country?: string;
|
|
557
|
+
validation_status?: ValidationStatus;
|
|
1276
558
|
}
|
|
1277
|
-
export interface BillingAddress {
|
|
1278
|
-
/**
|
|
1279
|
-
* @description The first name of the billing contact.
|
|
1280
|
-
|
|
1281
|
-
*/
|
|
1282
|
-
|
|
1283
|
-
first_name?:string;
|
|
1284
|
-
|
|
1285
|
-
/**
|
|
1286
|
-
* @description The last name of the billing contact.
|
|
1287
|
-
|
|
1288
|
-
*/
|
|
1289
|
-
|
|
1290
|
-
last_name?:string;
|
|
1291
|
-
|
|
1292
|
-
/**
|
|
1293
|
-
* @description The email address.
|
|
1294
|
-
|
|
1295
|
-
*/
|
|
1296
|
-
|
|
1297
|
-
email?:string;
|
|
1298
|
-
|
|
1299
|
-
/**
|
|
1300
|
-
* @description The company name.
|
|
1301
|
-
|
|
1302
|
-
*/
|
|
1303
|
-
|
|
1304
|
-
company?:string;
|
|
1305
|
-
|
|
1306
|
-
/**
|
|
1307
|
-
* @description The phone number.
|
|
1308
|
-
|
|
1309
|
-
*/
|
|
1310
|
-
|
|
1311
|
-
phone?:string;
|
|
1312
|
-
|
|
1313
|
-
/**
|
|
1314
|
-
* @description Address line 1
|
|
1315
|
-
|
|
1316
|
-
*/
|
|
1317
|
-
|
|
1318
|
-
line1?:string;
|
|
1319
|
-
|
|
1320
|
-
/**
|
|
1321
|
-
* @description Address line 2
|
|
1322
559
|
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
line2?:string;
|
|
1326
|
-
|
|
1327
|
-
/**
|
|
1328
|
-
* @description Address line 3
|
|
1329
|
-
|
|
1330
|
-
*/
|
|
1331
|
-
|
|
1332
|
-
line3?:string;
|
|
1333
|
-
|
|
1334
|
-
/**
|
|
1335
|
-
* @description The name of the city.
|
|
1336
|
-
|
|
1337
|
-
*/
|
|
1338
|
-
|
|
1339
|
-
city?:string;
|
|
1340
|
-
|
|
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
|
-
state_code?:string;
|
|
1347
|
-
|
|
1348
|
-
/**
|
|
1349
|
-
* @description State or Province
|
|
1350
|
-
|
|
1351
|
-
*/
|
|
1352
|
-
|
|
1353
|
-
state?:string;
|
|
1354
|
-
|
|
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
|
-
country?:string;
|
|
1368
|
-
|
|
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
|
-
zip?:string;
|
|
1375
|
-
|
|
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
|
-
validation_status?:ValidationStatus;
|
|
560
|
+
export interface CreditNoteCancelInputParam {
|
|
561
|
+
total?: number;
|
|
1382
562
|
}
|
|
1383
|
-
export interface LineItemTax {
|
|
1384
|
-
/**
|
|
1385
|
-
* @description The unique reference id of the line item for which the tax is applicable
|
|
1386
|
-
|
|
1387
|
-
*/
|
|
1388
|
-
|
|
1389
|
-
line_item_id?:string;
|
|
1390
|
-
|
|
1391
|
-
/**
|
|
1392
|
-
* @description The name of the tax applied
|
|
1393
|
-
|
|
1394
|
-
*/
|
|
1395
|
-
|
|
1396
|
-
tax_name:string;
|
|
1397
|
-
|
|
1398
|
-
/**
|
|
1399
|
-
* @description The rate of tax used to calculate tax amount
|
|
1400
|
-
|
|
1401
|
-
*/
|
|
1402
|
-
|
|
1403
|
-
tax_rate:number;
|
|
1404
|
-
|
|
1405
|
-
/**
|
|
1406
|
-
* @description Indicates the service period end of the tax rate for the line item.
|
|
1407
563
|
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
prorated_taxable_amount?:number;
|
|
1425
|
-
|
|
1426
|
-
/**
|
|
1427
|
-
* @description Indicates if tax is applied only on a portion of the line item amount.
|
|
1428
|
-
|
|
1429
|
-
*/
|
|
1430
|
-
|
|
1431
|
-
is_partial_tax_applied?:boolean;
|
|
1432
|
-
|
|
1433
|
-
/**
|
|
1434
|
-
* @description Indicates the non-compliance tax that should not be reported to the jurisdiction.
|
|
1435
|
-
|
|
1436
|
-
*/
|
|
1437
|
-
|
|
1438
|
-
is_non_compliance_tax?:boolean;
|
|
1439
|
-
|
|
1440
|
-
/**
|
|
1441
|
-
* @description Indicates the actual portion of the line item amount that is taxable.
|
|
1442
|
-
|
|
1443
|
-
*/
|
|
1444
|
-
|
|
1445
|
-
taxable_amount:number;
|
|
1446
|
-
|
|
1447
|
-
/**
|
|
1448
|
-
* @description The tax amount
|
|
1449
|
-
|
|
1450
|
-
*/
|
|
1451
|
-
|
|
1452
|
-
tax_amount:number;
|
|
1453
|
-
|
|
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
|
-
*/
|
|
1465
|
-
|
|
1466
|
-
tax_juris_name?:string;
|
|
1467
|
-
|
|
1468
|
-
/**
|
|
1469
|
-
* @description The tax jurisdiction code
|
|
1470
|
-
|
|
1471
|
-
*/
|
|
1472
|
-
|
|
1473
|
-
tax_juris_code?:string;
|
|
1474
|
-
|
|
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
|
-
tax_amount_in_local_currency?:number;
|
|
1481
|
-
|
|
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
|
-
local_currency_code?:string;
|
|
564
|
+
export interface CreditNoteCreateRefundableCreditNoteInputParam {
|
|
565
|
+
reason_code:
|
|
566
|
+
| 'write_off'
|
|
567
|
+
| 'subscription_change'
|
|
568
|
+
| 'subscription_cancellation'
|
|
569
|
+
| 'subscription_pause'
|
|
570
|
+
| 'chargeback'
|
|
571
|
+
| 'product_unsatisfactory'
|
|
572
|
+
| 'service_unsatisfactory'
|
|
573
|
+
| 'order_change'
|
|
574
|
+
| 'order_cancellation'
|
|
575
|
+
| 'waiver'
|
|
576
|
+
| 'other'
|
|
577
|
+
| 'fraudulent';
|
|
578
|
+
total: number;
|
|
1488
579
|
}
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
entity_id?:string;
|
|
1495
|
-
|
|
1496
|
-
discount_amount?:number;
|
|
1497
|
-
}
|
|
1498
|
-
export interface OrderLineItemLinkedCredit {
|
|
1499
|
-
amount?:number;
|
|
1500
|
-
|
|
1501
|
-
type?:'adjustment' | 'refundable';
|
|
1502
|
-
|
|
1503
|
-
id?:string;
|
|
1504
|
-
|
|
1505
|
-
status?:'refund_due' | 'adjusted' | 'refunded' | 'voided';
|
|
1506
|
-
|
|
1507
|
-
amount_adjusted?:number;
|
|
1508
|
-
|
|
1509
|
-
amount_refunded?:number;
|
|
1510
|
-
}
|
|
1511
|
-
export interface ResentOrder {
|
|
1512
|
-
order_id?:string;
|
|
1513
|
-
|
|
1514
|
-
reason?:string;
|
|
1515
|
-
|
|
1516
|
-
amount?:number;
|
|
580
|
+
|
|
581
|
+
export interface OrderLineItemsResendInputParam {
|
|
582
|
+
id?: string;
|
|
583
|
+
fulfillment_quantity?: number;
|
|
1517
584
|
}
|
|
1518
585
|
}
|
|
1519
|
-
}
|
|
586
|
+
}
|