chargebee 2.51.0 → 2.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +83 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +103 -5
- package/package.json +1 -1
- package/types/core.d.ts +6 -6
- package/types/index.d.ts +10 -0
- package/types/resources/Addon.d.ts +3 -3
- package/types/resources/Address.d.ts +2 -194
- package/types/resources/AdvanceInvoiceSchedule.d.ts +5 -67
- package/types/resources/AttachedItem.d.ts +1 -1
- package/types/resources/Attribute.d.ts +4 -1
- package/types/resources/BillingConfiguration.d.ts +21 -0
- package/types/resources/Brand.d.ts +12 -0
- package/types/resources/BusinessEntity.d.ts +10 -8
- package/types/resources/BusinessEntityTransfer.d.ts +10 -7
- package/types/resources/Card.d.ts +11 -311
- package/types/resources/Comment.d.ts +10 -125
- package/types/resources/Contact.d.ts +2 -44
- package/types/resources/ContractTerm.d.ts +4 -72
- package/types/resources/Coupon.d.ts +4 -41
- package/types/resources/CouponCode.d.ts +67 -35
- package/types/resources/CouponSet.d.ts +12 -121
- package/types/resources/CreditNote.d.ts +89 -95
- package/types/resources/Currency.d.ts +8 -5
- package/types/resources/Customer.d.ts +96 -95
- package/types/resources/CustomerEntitlement.d.ts +3 -1
- package/types/resources/DifferentialPrice.d.ts +1 -1
- package/types/resources/Discount.d.ts +5 -90
- package/types/resources/Download.d.ts +2 -14
- package/types/resources/Entitlement.d.ts +15 -103
- package/types/resources/EntitlementOverride.d.ts +4 -89
- package/types/resources/Estimate.d.ts +6 -14
- package/types/resources/Event.d.ts +24 -109
- package/types/resources/Export.d.ts +116 -432
- package/types/resources/Feature.d.ts +19 -321
- package/types/resources/GatewayErrorDetail.d.ts +6 -48
- package/types/resources/Gift.d.ts +34 -294
- package/types/resources/Hierarchy.d.ts +4 -24
- package/types/resources/HostedPage.d.ts +4 -4
- package/types/resources/ImpactedCustomer.d.ts +23 -0
- package/types/resources/ImpactedItem.d.ts +4 -36
- package/types/resources/ImpactedItemPrice.d.ts +5 -2
- package/types/resources/ImpactedSubscription.d.ts +3 -30
- package/types/resources/InAppSubscription.d.ts +13 -355
- package/types/resources/Invoice.d.ts +112 -126
- package/types/resources/InvoiceEstimate.d.ts +1 -1
- package/types/resources/Item.d.ts +4 -11
- package/types/resources/ItemEntitlement.d.ts +15 -155
- package/types/resources/ItemFamily.d.ts +3 -3
- package/types/resources/ItemPrice.d.ts +7 -7
- package/types/resources/NonSubscription.d.ts +9 -6
- package/types/resources/OmnichannelOneTimeOrder.d.ts +90 -0
- package/types/resources/OmnichannelOneTimeOrderItem.d.ts +24 -0
- package/types/resources/OmnichannelSubscription.d.ts +2 -2
- package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -1
- package/types/resources/OmnichannelSubscriptionItemScheduledChange.d.ts +1 -1
- package/types/resources/Order.d.ts +3 -3
- package/types/resources/PaymentIntent.d.ts +9 -255
- package/types/resources/PaymentReferenceNumber.d.ts +3 -20
- package/types/resources/PaymentSource.d.ts +4 -4
- package/types/resources/PaymentVoucher.d.ts +22 -205
- package/types/resources/Plan.d.ts +3 -3
- package/types/resources/PortalSession.d.ts +4 -146
- package/types/resources/PriceVariant.d.ts +2 -2
- package/types/resources/PricingPageSession.d.ts +2 -2
- package/types/resources/PromotionalCredit.d.ts +12 -215
- package/types/resources/Purchase.d.ts +5 -3
- package/types/resources/Quote.d.ts +32 -14
- package/types/resources/QuotedCharge.d.ts +7 -0
- package/types/resources/QuotedRamp.d.ts +11 -16
- package/types/resources/Ramp.d.ts +7 -7
- package/types/resources/RecordedPurchase.d.ts +8 -1
- package/types/resources/ResourceMigration.d.ts +2 -54
- package/types/resources/SiteMigrationDetail.d.ts +13 -55
- package/types/resources/Subscription.d.ts +33 -29
- package/types/resources/SubscriptionEntitlement.d.ts +6 -106
- package/types/resources/SubscriptionEntitlementsCreatedDetail.d.ts +12 -0
- package/types/resources/SubscriptionEntitlementsUpdatedDetail.d.ts +12 -0
- package/types/resources/SubscriptionEstimate.d.ts +14 -11
- package/types/resources/TaxWithheld.d.ts +14 -26
- package/types/resources/ThirdPartyPaymentMethod.d.ts +2 -19
- package/types/resources/TimeMachine.d.ts +3 -64
- package/types/resources/Token.d.ts +3 -60
- package/types/resources/Transaction.d.ts +8 -8
- package/types/resources/UnbilledCharge.d.ts +1 -1
- package/types/resources/Usage.d.ts +21 -165
- package/types/resources/UsageFile.d.ts +5 -5
- package/types/resources/VirtualBankAccount.d.ts +1 -1
- package/types/resources/WebhookEndpoint.d.ts +117 -0
|
@@ -46,8 +46,6 @@ declare module 'chargebee' {
|
|
|
46
46
|
|
|
47
47
|
channel?:Channel;
|
|
48
48
|
|
|
49
|
-
einvoice?:CreditNote.Einvoice;
|
|
50
|
-
|
|
51
49
|
sub_total:number;
|
|
52
50
|
|
|
53
51
|
sub_total_in_local_currency?:number;
|
|
@@ -62,15 +60,19 @@ declare module 'chargebee' {
|
|
|
62
60
|
|
|
63
61
|
line_items?:CreditNote.LineItem[];
|
|
64
62
|
|
|
65
|
-
|
|
63
|
+
line_item_tiers?:CreditNote.LineItemTier[];
|
|
66
64
|
|
|
67
65
|
line_item_discounts?:CreditNote.LineItemDiscount[];
|
|
68
66
|
|
|
69
|
-
|
|
67
|
+
line_item_taxes?:CreditNote.LineItemTax[];
|
|
68
|
+
|
|
69
|
+
line_item_addresses?:CreditNote.LineItemAddress[];
|
|
70
|
+
|
|
71
|
+
discounts?:CreditNote.Discount[];
|
|
70
72
|
|
|
71
73
|
taxes?:CreditNote.Tax[];
|
|
72
74
|
|
|
73
|
-
|
|
75
|
+
tax_origin?:CreditNote.TaxOrigin;
|
|
74
76
|
|
|
75
77
|
linked_refunds?:CreditNote.LinkedRefund[];
|
|
76
78
|
|
|
@@ -92,11 +94,9 @@ declare module 'chargebee' {
|
|
|
92
94
|
|
|
93
95
|
billing_address?:CreditNote.BillingAddress;
|
|
94
96
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
tax_origin?:CreditNote.TaxOrigin;
|
|
97
|
+
einvoice?:CreditNote.Einvoice;
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
site_details_at_creation?:CreditNote.SiteDetailsAtCreation;
|
|
100
100
|
|
|
101
101
|
}
|
|
102
102
|
export namespace CreditNote {
|
|
@@ -136,7 +136,7 @@ declare module 'chargebee' {
|
|
|
136
136
|
}
|
|
137
137
|
export interface CreateInputParam {
|
|
138
138
|
|
|
139
|
-
line_items?:{amount?:number,date_from?:number,date_to?:number,description?:string,entity_id?:string,entity_type?:'adhoc' | 'plan_item_price' | 'addon_item_price' | 'charge_item_price',quantity?:number,quantity_in_decimal?:string,reference_line_item_id?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
|
|
139
|
+
line_items?:{amount?:number,date_from?:number,date_to?:number,description?:string,entity_id?:string,entity_type?:'adhoc' | 'plan_item_price' | 'addon_item_price' | 'charge_item_price' | 'plan' | 'addon',quantity?:number,quantity_in_decimal?:string,reference_line_item_id?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
|
|
140
140
|
|
|
141
141
|
reference_invoice_id?:string;
|
|
142
142
|
|
|
@@ -164,10 +164,6 @@ declare module 'chargebee' {
|
|
|
164
164
|
export interface RetrieveInputParam {
|
|
165
165
|
|
|
166
166
|
line_item?:{customer_id?:{is?:string},subscription_id?:{is?:string}};
|
|
167
|
-
|
|
168
|
-
line_items_limit?:number;
|
|
169
|
-
|
|
170
|
-
line_items_offset?:string;
|
|
171
167
|
}
|
|
172
168
|
export interface PdfResponse {
|
|
173
169
|
download:Download;
|
|
@@ -200,7 +196,7 @@ declare module 'chargebee' {
|
|
|
200
196
|
}
|
|
201
197
|
export interface RecordRefundInputParam {
|
|
202
198
|
|
|
203
|
-
transaction:{amount?:number,custom_payment_method_id?:string,date:number,payment_method:PaymentMethod,reference_number?:string};
|
|
199
|
+
transaction:{amount?:number,custom_payment_method_id?:string,date:number,id?:string,payment_method:PaymentMethod,reference_number?:string};
|
|
204
200
|
|
|
205
201
|
refund_reason_code?:string;
|
|
206
202
|
|
|
@@ -228,7 +224,7 @@ declare module 'chargebee' {
|
|
|
228
224
|
limit?:number;
|
|
229
225
|
|
|
230
226
|
/**
|
|
231
|
-
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set
|
|
227
|
+
* @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.
|
|
232
228
|
|
|
233
229
|
*/
|
|
234
230
|
|
|
@@ -241,8 +237,6 @@ declare module 'chargebee' {
|
|
|
241
237
|
|
|
242
238
|
einvoice?:{status?:{in?:string,is?:'scheduled' | 'skipped' | 'in_progress' | 'success' | 'failed' | 'registered',is_not?:'scheduled' | 'skipped' | 'in_progress' | 'success' | 'failed' | 'registered',not_in?:string}};
|
|
243
239
|
|
|
244
|
-
show_exempted_tax_lines?:boolean;
|
|
245
|
-
|
|
246
240
|
/**
|
|
247
241
|
* @description Indicates whether to include deleted objects in the list. The deleted objects have the attribute \`deleted\` as \`true\`.
|
|
248
242
|
|
|
@@ -363,7 +357,7 @@ NOTE: Not to be used if *consolidated invoicing* feature is enabled.
|
|
|
363
357
|
|
|
364
358
|
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
365
359
|
|
|
366
|
-
sort_by?:
|
|
360
|
+
sort_by?:object;
|
|
367
361
|
|
|
368
362
|
/**
|
|
369
363
|
* @description The subscription channel this object originated from and is maintained in.
|
|
@@ -387,7 +381,7 @@ NOTE: Not to be used if *consolidated invoicing* feature is enabled.
|
|
|
387
381
|
limit?:number;
|
|
388
382
|
|
|
389
383
|
/**
|
|
390
|
-
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set
|
|
384
|
+
* @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.
|
|
391
385
|
|
|
392
386
|
*/
|
|
393
387
|
|
|
@@ -420,7 +414,7 @@ NOTE: Not to be used if *consolidated invoicing* feature is enabled.
|
|
|
420
414
|
}
|
|
421
415
|
export interface ImportCreditNoteInputParam {
|
|
422
416
|
|
|
423
|
-
line_items:{amount?:number,amount_in_decimal?:string,date_from?:number,date_to?:number,description:string,entity_id?:string,entity_type?:'adhoc' | 'plan_item_price' | 'addon_item_price' | 'charge_item_price',id?:string,item_level_discount1_amount?:number,item_level_discount1_entity_id?:string,item_level_discount2_amount?:number,item_level_discount2_entity_id?:string,quantity?:number,quantity_in_decimal?:string,reference_line_item_id?:string,subscription_id?:string,tax10_amount?:number,tax10_name?:string,tax1_amount?:number,tax1_name?:string,tax2_amount?:number,tax2_name?:string,tax3_amount?:number,tax3_name?:string,tax4_amount?:number,tax4_name?:string,tax5_amount?:number,tax5_name?:string,tax6_amount?:number,tax6_name?:string,tax7_amount?:number,tax7_name?:string,tax8_amount?:number,tax8_name?:string,tax9_amount?:number,tax9_name?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
|
|
417
|
+
line_items:{amount?:number,amount_in_decimal?:string,date_from?:number,date_to?:number,description:string,entity_id?:string,entity_type?:'adhoc' | 'plan_item_price' | 'addon_item_price' | 'charge_item_price' | 'plan_setup' | 'plan' | 'addon',id?:string,item_level_discount1_amount?:number,item_level_discount1_entity_id?:string,item_level_discount2_amount?:number,item_level_discount2_entity_id?:string,quantity?:number,quantity_in_decimal?:string,reference_line_item_id?:string,subscription_id?:string,tax10_amount?:number,tax10_name?:string,tax1_amount?:number,tax1_name?:string,tax2_amount?:number,tax2_name?:string,tax3_amount?:number,tax3_name?:string,tax4_amount?:number,tax4_name?:string,tax5_amount?:number,tax5_name?:string,tax6_amount?:number,tax6_name?:string,tax7_amount?:number,tax7_name?:string,tax8_amount?:number,tax8_name?:string,tax9_amount?:number,tax9_name?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
|
|
424
418
|
|
|
425
419
|
line_item_tiers:{ending_unit?:number,ending_unit_in_decimal?:string,line_item_id:string,quantity_used?:number,quantity_used_in_decimal?:string,starting_unit?:number,starting_unit_in_decimal?:string,unit_amount?:number,unit_amount_in_decimal?:string}[];
|
|
426
420
|
|
|
@@ -430,7 +424,7 @@ NOTE: Not to be used if *consolidated invoicing* feature is enabled.
|
|
|
430
424
|
|
|
431
425
|
allocations:{allocated_amount:number,allocated_at:number,invoice_id:string}[];
|
|
432
426
|
|
|
433
|
-
linked_refunds:{amount:number,date:number,payment_method:PaymentMethod,reference_number?:string}[];
|
|
427
|
+
linked_refunds:{amount:number,date:number,id?:string,payment_method:PaymentMethod,reference_number?:string}[];
|
|
434
428
|
|
|
435
429
|
id:string;
|
|
436
430
|
|
|
@@ -464,15 +458,6 @@ NOTE: Not to be used if *consolidated invoicing* feature is enabled.
|
|
|
464
458
|
|
|
465
459
|
vat_number_prefix?:string;
|
|
466
460
|
}
|
|
467
|
-
export interface Einvoice {
|
|
468
|
-
id:string;
|
|
469
|
-
|
|
470
|
-
reference_number?:string;
|
|
471
|
-
|
|
472
|
-
status:'scheduled' | 'skipped' | 'in_progress' | 'success' | 'failed' | 'registered';
|
|
473
|
-
|
|
474
|
-
message?:string;
|
|
475
|
-
}
|
|
476
461
|
export interface LineItem {
|
|
477
462
|
id?:string;
|
|
478
463
|
|
|
@@ -524,30 +509,6 @@ NOTE: Not to be used if *consolidated invoicing* feature is enabled.
|
|
|
524
509
|
|
|
525
510
|
customer_id?:string;
|
|
526
511
|
}
|
|
527
|
-
export interface Discount {
|
|
528
|
-
amount:number;
|
|
529
|
-
|
|
530
|
-
description?:string;
|
|
531
|
-
|
|
532
|
-
entity_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
|
|
533
|
-
|
|
534
|
-
discount_type?:'fixed_amount' | 'percentage';
|
|
535
|
-
|
|
536
|
-
entity_id?:string;
|
|
537
|
-
|
|
538
|
-
coupon_set_code?:string;
|
|
539
|
-
}
|
|
540
|
-
export interface LineItemDiscount {
|
|
541
|
-
line_item_id:string;
|
|
542
|
-
|
|
543
|
-
discount_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
|
|
544
|
-
|
|
545
|
-
coupon_id?:string;
|
|
546
|
-
|
|
547
|
-
entity_id?:string;
|
|
548
|
-
|
|
549
|
-
discount_amount:number;
|
|
550
|
-
}
|
|
551
512
|
export interface LineItemTier {
|
|
552
513
|
line_item_id?:string;
|
|
553
514
|
|
|
@@ -571,12 +532,16 @@ NOTE: Not to be used if *consolidated invoicing* feature is enabled.
|
|
|
571
532
|
|
|
572
533
|
package_size?:number;
|
|
573
534
|
}
|
|
574
|
-
export interface
|
|
575
|
-
|
|
535
|
+
export interface LineItemDiscount {
|
|
536
|
+
line_item_id:string;
|
|
576
537
|
|
|
577
|
-
|
|
538
|
+
discount_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
|
|
578
539
|
|
|
579
|
-
|
|
540
|
+
coupon_id?:string;
|
|
541
|
+
|
|
542
|
+
entity_id?:string;
|
|
543
|
+
|
|
544
|
+
discount_amount:number;
|
|
580
545
|
}
|
|
581
546
|
export interface LineItemTax {
|
|
582
547
|
line_item_id?:string;
|
|
@@ -609,6 +574,62 @@ NOTE: Not to be used if *consolidated invoicing* feature is enabled.
|
|
|
609
574
|
|
|
610
575
|
local_currency_code?:string;
|
|
611
576
|
}
|
|
577
|
+
export interface LineItemAddress {
|
|
578
|
+
line_item_id?:string;
|
|
579
|
+
|
|
580
|
+
first_name?:string;
|
|
581
|
+
|
|
582
|
+
last_name?:string;
|
|
583
|
+
|
|
584
|
+
email?:string;
|
|
585
|
+
|
|
586
|
+
company?:string;
|
|
587
|
+
|
|
588
|
+
phone?:string;
|
|
589
|
+
|
|
590
|
+
line1?:string;
|
|
591
|
+
|
|
592
|
+
line2?:string;
|
|
593
|
+
|
|
594
|
+
line3?:string;
|
|
595
|
+
|
|
596
|
+
city?:string;
|
|
597
|
+
|
|
598
|
+
state_code?:string;
|
|
599
|
+
|
|
600
|
+
state?:string;
|
|
601
|
+
|
|
602
|
+
country?:string;
|
|
603
|
+
|
|
604
|
+
zip?:string;
|
|
605
|
+
|
|
606
|
+
validation_status?:'not_validated' | 'valid' | 'partially_valid' | 'invalid';
|
|
607
|
+
}
|
|
608
|
+
export interface Discount {
|
|
609
|
+
amount:number;
|
|
610
|
+
|
|
611
|
+
description?:string;
|
|
612
|
+
|
|
613
|
+
entity_type:'item_level_coupon' | 'document_level_coupon' | 'promotional_credits' | 'prorated_credits' | 'item_level_discount' | 'document_level_discount';
|
|
614
|
+
|
|
615
|
+
discount_type?:'fixed_amount' | 'percentage';
|
|
616
|
+
|
|
617
|
+
entity_id?:string;
|
|
618
|
+
|
|
619
|
+
coupon_set_code?:string;
|
|
620
|
+
}
|
|
621
|
+
export interface Tax {
|
|
622
|
+
name:string;
|
|
623
|
+
|
|
624
|
+
amount:number;
|
|
625
|
+
|
|
626
|
+
description?:string;
|
|
627
|
+
}
|
|
628
|
+
export interface TaxOrigin {
|
|
629
|
+
country?:string;
|
|
630
|
+
|
|
631
|
+
registration_number?:string;
|
|
632
|
+
}
|
|
612
633
|
export interface LinkedRefund {
|
|
613
634
|
txn_id:string;
|
|
614
635
|
|
|
@@ -697,46 +718,19 @@ NOTE: Not to be used if *consolidated invoicing* feature is enabled.
|
|
|
697
718
|
|
|
698
719
|
validation_status?:ValidationStatus;
|
|
699
720
|
}
|
|
700
|
-
export interface
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
organization_address?:object;
|
|
704
|
-
}
|
|
705
|
-
export interface TaxOrigin {
|
|
706
|
-
country?:string;
|
|
707
|
-
|
|
708
|
-
registration_number?:string;
|
|
709
|
-
}
|
|
710
|
-
export interface LineItemAddress {
|
|
711
|
-
line_item_id?:string;
|
|
712
|
-
|
|
713
|
-
first_name?:string;
|
|
714
|
-
|
|
715
|
-
last_name?:string;
|
|
716
|
-
|
|
717
|
-
email?:string;
|
|
718
|
-
|
|
719
|
-
company?:string;
|
|
720
|
-
|
|
721
|
-
phone?:string;
|
|
722
|
-
|
|
723
|
-
line1?:string;
|
|
724
|
-
|
|
725
|
-
line2?:string;
|
|
726
|
-
|
|
727
|
-
line3?:string;
|
|
728
|
-
|
|
729
|
-
city?:string;
|
|
730
|
-
|
|
731
|
-
state_code?:string;
|
|
721
|
+
export interface Einvoice {
|
|
722
|
+
id:string;
|
|
732
723
|
|
|
733
|
-
|
|
724
|
+
reference_number?:string;
|
|
734
725
|
|
|
735
|
-
|
|
726
|
+
status:'scheduled' | 'skipped' | 'in_progress' | 'success' | 'failed' | 'registered';
|
|
736
727
|
|
|
737
|
-
|
|
728
|
+
message?:string;
|
|
729
|
+
}
|
|
730
|
+
export interface SiteDetailsAtCreation {
|
|
731
|
+
timezone?:string;
|
|
738
732
|
|
|
739
|
-
|
|
733
|
+
organization_address?:object;
|
|
740
734
|
}
|
|
741
735
|
}
|
|
742
736
|
}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
2
3
|
declare module 'chargebee' {
|
|
3
4
|
export interface Currency {
|
|
4
5
|
|
|
6
|
+
|
|
5
7
|
id?:string;
|
|
6
|
-
|
|
8
|
+
|
|
7
9
|
enabled:boolean;
|
|
8
|
-
|
|
10
|
+
|
|
9
11
|
forex_type?:'manual' | 'auto';
|
|
10
|
-
|
|
12
|
+
|
|
11
13
|
currency_code?:string;
|
|
12
|
-
|
|
14
|
+
|
|
13
15
|
is_base_currency?:boolean;
|
|
14
|
-
|
|
16
|
+
|
|
15
17
|
manual_exchange_rate?:string;
|
|
18
|
+
|
|
16
19
|
}
|
|
17
20
|
export namespace Currency {
|
|
18
21
|
export class CurrencyResource {
|