chargebee 2.26.0 → 2.26.1

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